From ae2287d287b4a19bc727b3ef6477b24673690802 Mon Sep 17 00:00:00 2001 From: Ty Hesser Date: Fri, 2 Jul 2021 11:27:11 -0500 Subject: [PATCH 01/12] updates to default settings --- .cmtbSettings | 1 + 1 file changed, 1 insertion(+) diff --git a/.cmtbSettings b/.cmtbSettings index deee162..6baa195 100644 --- a/.cmtbSettings +++ b/.cmtbSettings @@ -13,6 +13,7 @@ hpcSettings: hpcCores: 36 hpcNodes: 1 testName: '' +restartFlag: false logfileLoc: ./data/logs workingDirectory: ./data # this is the directory where simulation files and QA/QC plots are made and existing architecture takes over netCDFdir: ./thredds_data # this is the base directory where netCDF files are output From 8d5886043a17e69d255e934d4625a3e09aa046a0 Mon Sep 17 00:00:00 2001 From: Ty Hesser Date: Mon, 26 Jul 2021 20:05:57 -0400 Subject: [PATCH 02/12] updates to cshore --- README.md | 2 +- genericWorkFlow.py | 3 ++- notebooks/cshore/cshore_example.ipynb | 12 +++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bf2fc5e..5fdfab8 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ The test bed is established at the USACE CHL Field REsearch Facility in Duck, No - conda install conda install -c conda-forge cartopy - * netCDF4, pyproj, utm, wavespectra, progressbar, opencv-python + * netCDF4, pyproj, utm (cf), wavespectra (cf), progressbar (cf), opencv (cf) - there's likely more, please add as you find!! :-[] diff --git a/genericWorkFlow.py b/genericWorkFlow.py index 952b541..8ce168e 100755 --- a/genericWorkFlow.py +++ b/genericWorkFlow.py @@ -92,7 +92,8 @@ def Master_workFlow(inputDict): startTime=DT.datetime.strptime(time, '%Y-%m-%dT%H:%M:%SZ'), endTime=DT.datetime.strptime(time, '%Y-%m-%dT%H:%M:%SZ') + DT.timedelta( hours=inputDict['simulationDuration']), runFlag=runFlag, - generateFlag=generateFlag, readFlag=analyzeFlag, pbsFlag=pbsFlag) + generateFlag=generateFlag, readFlag=analyzeFlag, pbsFlag=pbsFlag, + hotStartFlag=hotStartFlag) if generateFlag is True: wavePacket, windPacket, wlPacket, bathyPacket, gridFname, wrr = frontBackNEW.ww3simSetup(time, diff --git a/notebooks/cshore/cshore_example.ipynb b/notebooks/cshore/cshore_example.ipynb index bfd4899..3649dc6 100644 --- a/notebooks/cshore/cshore_example.ipynb +++ b/notebooks/cshore/cshore_example.ipynb @@ -201,7 +201,17 @@ "metadata": {}, "outputs": [], "source": [ - "wl_data" + "rawWind = go.getWind()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "windTimeList = [d1 + datetime.timedelta(seconds=tt) for tt in reltime]\n", + "wind_data = prepdata.prep_wind(rawWind,windTimeList)" ] }, { From 0b611d286d1e0c306a479dc5eb8d8473dda3c144 Mon Sep 17 00:00:00 2001 From: Ty Hesser Date: Mon, 13 Sep 2021 12:20:03 -0500 Subject: [PATCH 03/12] updates for running with hotstart on jim --- frontback/frontBackNEW.py | 4 +++- genericWorkFlow.py | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/frontback/frontBackNEW.py b/frontback/frontBackNEW.py index b23cc61..4f6af1a 100644 --- a/frontback/frontBackNEW.py +++ b/frontback/frontBackNEW.py @@ -30,6 +30,8 @@ def ww3simSetup(startTimeString, inputDict, allWind , allWL, allWave, wrr): """ # begin by setting up input parameters + import pdb + pdb.set_trace() simulationDuration = int(inputDict.get('simulationDuration', 24)) plotFlag = inputDict.get('plotFlag', True) @@ -67,7 +69,7 @@ def ww3simSetup(startTimeString, inputDict, allWind , allWL, allWave, wrr): assert rawspec is not None, "\n++++\nThere's No Wave data between %s and %s \n++++\n" % (startTime, endTime) # use generated time lists for these to provide accurate temporal values _, waveTimeList, wlTimeList, _, windTimeList = prepdata.createDifferentTimeLists(startTime, endTime, rawspec, rawWL, - rawWind=rawwind) + rawWind=rawwind,simTs=30*60) nFreq = np.size(rawspec['wavefreqbin']) # rotate and lower resolution of directional wave spectra wavepacket = prepdata.prep_spec(rawspec, version_prefix, datestr=dateString, plot=plotFlag, full=full, deltaangle=10, diff --git a/genericWorkFlow.py b/genericWorkFlow.py index 952b541..adfef2c 100755 --- a/genericWorkFlow.py +++ b/genericWorkFlow.py @@ -31,6 +31,8 @@ def Master_workFlow(inputDict): pbsFlag = inputDict['pbsFlag'] analyzeFlag = inputDict['analyzeFlag'] plotFlag = inputDict['plotFlag'] + hotStartFlag = inputDict['hotStartFlag'] + hotStartDirectory = inputDict.get('hotStartDirectory',None) modelName = inputDict['modelSettings'].get('modelName', None) log = inputDict.get('logging', True) updateBathy = inputDict['updateBathy'] @@ -90,9 +92,8 @@ def Master_workFlow(inputDict): if modelName in ['ww3']: wrr = wrrClass.ww3io(workingDirectory=workingDirectory,testName=testName, versionPrefix=version_prefix, startTime=DT.datetime.strptime(time, '%Y-%m-%dT%H:%M:%SZ'), - endTime=DT.datetime.strptime(time, '%Y-%m-%dT%H:%M:%SZ') + DT.timedelta( - hours=inputDict['simulationDuration']), runFlag=runFlag, - generateFlag=generateFlag, readFlag=analyzeFlag, pbsFlag=pbsFlag) + endTime=DT.datetime.strptime(endTime, '%Y-%m-%dT%H:%M:%SZ'), runFlag=runFlag, + generateFlag=generateFlag, readFlag=analyzeFlag, pbsFlag=pbsFlag, hotStartFlag=hotStartFlag) if generateFlag is True: wavePacket, windPacket, wlPacket, bathyPacket, gridFname, wrr = frontBackNEW.ww3simSetup(time, @@ -149,17 +150,17 @@ def Master_workFlow(inputDict): print("windPacket has keys: {}".format(windPacket.keys())) except AttributeError: pass - - if pbsFlag is True: - wrr.hpcCores = inputDict['hpcSettings']['hpcCores'] - wrr.hpcNodes = inputDict['hpcSettings']['hpcNodes'] + print(updateBathy) # write simulation files (if assigned) wrr.writeAllFiles(bathyPacket, wavePacket=wavePacket, wlPacket=wlPacket, windPacket=windPacket, - ctdPacket=ctdPacket,gridfname=gridFname,updateBathy=updateBathy) + ctdPacket=ctdPacket,gridfname=gridFname,updateBathy=updateBathy,hotStartDirectory=hotStartDirectory) # run simulation (as appropriate) if runFlag is True: - wrr.runSimulation(modelExecutable=inputDict['modelExecutable']) + if pbsFlag is True: + wrr.hpcCores = inputDict['hpcSettings']['hpcCores'] + wrr.hpcNodes = inputDict['hpcSettings']['hpcNodes'] + wrr.runSimulation(modelExecutable=inputDict['modelExecutable'],hotStartDirectory=hotStartDirectory) # post process (as appropriate) #spatialData, savePointData = wrr.readAllFiles() From c4d0974de06fec05d3b8e5ad03d1338fe2387d30 Mon Sep 17 00:00:00 2001 From: Ty Hesser Date: Tue, 14 Sep 2021 14:23:39 -0400 Subject: [PATCH 04/12] updated cshore notebook --- notebooks/cshore/cshore_example.ipynb | 46 ++++----------------------- 1 file changed, 7 insertions(+), 39 deletions(-) diff --git a/notebooks/cshore/cshore_example.ipynb b/notebooks/cshore/cshore_example.ipynb index 3649dc6..66067ec 100644 --- a/notebooks/cshore/cshore_example.ipynb +++ b/notebooks/cshore/cshore_example.ipynb @@ -55,20 +55,7 @@ "metadata": {}, "outputs": [], "source": [ - "#rawWL = go.getWL()\n", - "#rawwave_data8m = go.getWaveSpec('8m-array')\n", - "rawwave_data6m = go.getWaveData('awac-6m',spec=True)\n", - "#rawwind = go.getWind()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#cmtb_data = getDataFRF.getDataTestBed(d1, d1+datetime.timedelta(minutes=1))\n", - "#bathy_data = cmtb_data.getBathyIntegratedTransect()" + "rawwave_data6m = go.getWaveData('awac-6m',spec=True)" ] }, { @@ -99,15 +86,6 @@ "waves = prepdata.prep_CSHOREwaves(rawwave_data6m, reltime , d1)" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#Bathy stuff is really slow right now. look into it" - ] - }, { "cell_type": "code", "execution_count": null, @@ -120,16 +98,6 @@ "fric_fac = 0.015" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#prof_nums = go.getBathyTransectProfNum()\n", - "#print(prof_nums)" - ] - }, { "cell_type": "code", "execution_count": null, @@ -155,7 +123,7 @@ "metadata": {}, "outputs": [], "source": [ - "b_dict = prepdata.prep_CSHOREbathy(bathy_data, bathy_loc, profile_num, dx, waves, fric_fac)\n", + "b_dict = prepdata.prep_CSHOREbathy(bathy_data, bathy_loc, dx, waves, fric_fac=fric_fac, profile_num=profile_num)\n", "print(bathy_data)\n", "print(b_dict)" ] @@ -227,7 +195,7 @@ "metadata": {}, "outputs": [], "source": [ - "cshoreio = wrr.cshoreio(pathPrefix='/Users/rdchlth9/Codes/cmtb_refactor/notetbooks/cshore/data', fNameBase=fname+'_cmtb', versionPrefix='base',\n", + "cshoreio = wrr.cshoreio(workingDirectory='/Users/rdchlth9/Codes/cmtb_refactor/notetbooks/cshore/data', testName=fname+'_cmtb', versionPrefix='base',\n", " startTime=d1, endTime=d2, runFlag=True,\n", " generateFlag=True, readFlag=False)" ] @@ -367,7 +335,7 @@ "metadata": {}, "outputs": [], "source": [ - "cshoreiofull = wrr.cshoreio(pathPrefix='/Users/rdchlth9/Codes/cmtb_refactor/notetbooks/cshore/data', fNameBase=fname+'_cmtb_full', versionPrefix='base',\n", + "cshoreiofull = wrr.cshoreio(workingDirectory='/Users/rdchlth9/Codes/cmtb_refactor/notetbooks/cshore/data', testName=fname+'_cmtb_full', versionPrefix='base',\n", " startTime=d1, endTime=d2, timeStep=dt, runFlag=True,\n", " generateFlag=True, readFlag=False)" ] @@ -460,8 +428,8 @@ "yy['simulationDuration'] = simduration\n", "yy['modelExecutable'] = '/Users/rdchlth9/Public/cshore/src-repo/cshore.exe'\n", "yy['workingDirectory'] = '/data'\n", - "yy['netCDFdir'] = '/thredds_data'\n", - "yy['logfileLoc'] = '/cmtb_refactor/data'\n", + "yy['netCDFdir'] = '/Users/rdchlth9/Codes/cmtb_refactor/thredds_data'\n", + "yy['logfileLoc'] = '/Users/rdchlth9/Codes/cmtb_refactor/data'\n", "yy['plotFlag'] = False\n", "yy['generateFlag'] = True\n", "yy['runFlag'] = True\n", @@ -484,7 +452,7 @@ "metadata": {}, "outputs": [], "source": [ - "%run ../../genericWorkFlow.py test.yaml" + "#%run ../../genericWorkFlow.py test.yaml" ] }, { From 96e2af3190ef7192622d9cf89b388397ae352a53 Mon Sep 17 00:00:00 2001 From: Ty Hesser Date: Wed, 15 Sep 2021 07:30:10 -0400 Subject: [PATCH 05/12] updating cshore notebook --- notebooks/cshore/cshore_example.ipynb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/notebooks/cshore/cshore_example.ipynb b/notebooks/cshore/cshore_example.ipynb index 66067ec..1d3d9a4 100644 --- a/notebooks/cshore/cshore_example.ipynb +++ b/notebooks/cshore/cshore_example.ipynb @@ -13,6 +13,8 @@ "from prepdata import inputOutput\n", "from prepdata import writeRunRead as wrr\n", "from testbedutils import fileHandling\n", + "from prepdata import py2netCDF as p2nc\n", + "\n", "\n", "import datetime\n", "import matplotlib.pyplot as plt\n", @@ -22,6 +24,7 @@ "import plotly\n", "import pickle\n", "import yaml\n", + "\n", "%matplotlib inline" ] }, @@ -391,7 +394,7 @@ "metadata": {}, "outputs": [], "source": [ - "resultsfull = cshoreiofull.readAllFiles()" + "spatialData, pointData = cshoreiofull.readAllFiles()" ] }, { @@ -400,16 +403,9 @@ "metadata": {}, "outputs": [], "source": [ - "resultsfull['params']" + "spatialData['params']" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "code", "execution_count": null, From 1e6acb00e419ed0e81780ffea93dc30f4060ecb7 Mon Sep 17 00:00:00 2001 From: Ty Hesser Date: Wed, 15 Sep 2021 07:36:57 -0400 Subject: [PATCH 06/12] adding testbed example yaml files for new ww3 and cshore setups --- .../CSHORE_Input_example_v2.yml | 17 +++++++++++++++++ .../ww3_Input_example_v2.yml | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 yaml_files/TestBedExampleInputs/CSHORE_Input_example_v2.yml create mode 100644 yaml_files/TestBedExampleInputs/ww3_Input_example_v2.yml diff --git a/yaml_files/TestBedExampleInputs/CSHORE_Input_example_v2.yml b/yaml_files/TestBedExampleInputs/CSHORE_Input_example_v2.yml new file mode 100644 index 0000000..22c0237 --- /dev/null +++ b/yaml_files/TestBedExampleInputs/CSHORE_Input_example_v2.yml @@ -0,0 +1,17 @@ +THREDDS: CHL +analyzeFlag: true +bathyLoc: survey +endTime: '2018-03-06T00:00:00Z' +generateFlag: true +logfileLoc: ./cmtb_refactor/data +modelExecutable: /Users/rdchlth9/Public/cshore/src-repo/cshore.exe +modelSettings: + modelName: cshore + version_prefix: FIXED +netCDFdir: ./thredds_data +plotFlag: false +profileNumber: 960 +runFlag: true +simulationDuration: 24.0 +startTime: '2018-03-05T00:00:00Z' +workingDirectory: ./data diff --git a/yaml_files/TestBedExampleInputs/ww3_Input_example_v2.yml b/yaml_files/TestBedExampleInputs/ww3_Input_example_v2.yml new file mode 100644 index 0000000..22c0237 --- /dev/null +++ b/yaml_files/TestBedExampleInputs/ww3_Input_example_v2.yml @@ -0,0 +1,17 @@ +THREDDS: CHL +analyzeFlag: true +bathyLoc: survey +endTime: '2018-03-06T00:00:00Z' +generateFlag: true +logfileLoc: ./cmtb_refactor/data +modelExecutable: /Users/rdchlth9/Public/cshore/src-repo/cshore.exe +modelSettings: + modelName: cshore + version_prefix: FIXED +netCDFdir: ./thredds_data +plotFlag: false +profileNumber: 960 +runFlag: true +simulationDuration: 24.0 +startTime: '2018-03-05T00:00:00Z' +workingDirectory: ./data From 1bd62debc6f39495e2c08e472b2e4114c219e8cf Mon Sep 17 00:00:00 2001 From: Ty Hesser Date: Wed, 15 Sep 2021 08:59:07 -0500 Subject: [PATCH 07/12] update cmtbsettings with hotstart flag --- .cmtbSettings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cmtbSettings b/.cmtbSettings index 30f8cd2..b296846 100644 --- a/.cmtbSettings +++ b/.cmtbSettings @@ -14,7 +14,7 @@ hpcSettings: hpcCores: 36 hpcNodes: 1 testName: '' -restartFlag: false +hotStartFlag: false logfileLoc: ./data/logs workingDirectory: ./data # this is the directory where simulation files and QA/QC plots are made and existing architecture takes over netCDFdir: ./thredds_data # this is the base directory where netCDF files are output From 264abfe3e90fc0c495b36e8b8b77488348e34117 Mon Sep 17 00:00:00 2001 From: spike Date: Thu, 16 Sep 2021 05:49:54 -0400 Subject: [PATCH 08/12] updated yml example for WW3 thats in a little more organized shape --- yaml_files/TestBedExampleInputs/ww3_Input_example.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaml_files/TestBedExampleInputs/ww3_Input_example.yml b/yaml_files/TestBedExampleInputs/ww3_Input_example.yml index c1a8ec7..b0c31d9 100644 --- a/yaml_files/TestBedExampleInputs/ww3_Input_example.yml +++ b/yaml_files/TestBedExampleInputs/ww3_Input_example.yml @@ -16,7 +16,7 @@ modelExecutable: /modelSourceCodes/WW3/model/exe # path to all appropriate exe logging: False # optional verbose: True # optional modelSettings: - model: ww3 # model name string, used for filename/path generation + modelName: ww3 # model name string, used for filename/path generation version_prefix: base # controls switched within the code grid: grids/ww3/Mesh_interp_Mar2018.msh # base grid sim REQUIRED From 5cd5f01e8e2f3795e2192d85c37b07e826c4d3ee Mon Sep 17 00:00:00 2001 From: spike Date: Thu, 16 Sep 2021 05:51:44 -0400 Subject: [PATCH 09/12] minor adjustments to generic work flow --- genericWorkFlow.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/genericWorkFlow.py b/genericWorkFlow.py index 7977ea4..1baedc4 100755 --- a/genericWorkFlow.py +++ b/genericWorkFlow.py @@ -127,7 +127,7 @@ def Master_workFlow(inputDict): wrr = pickle.load(open(os.path.join(workingDirectory,f"{dateString}_io.pickle"), 'rb'), protocol=pickle.HIGHEST_PROTOCOL) elif modelName in ['cshore']: - wrr = wrrClass.cshoreio(workingDirectory=workingDirectory,testName=testName, versionPrefix=version_prefix, + wrr = wrrClass.cshoreio(workingDirectory=workingDirectory, testName=testName, versionPrefix=version_prefix, startTime=DT.datetime.strptime(time, '%Y-%m-%dT%H:%M:%SZ'), simulatedRunTime=inputDict['simulationDuration'], endTime=DT.datetime.strptime(time, '%Y-%m-%dT%H:%M:%SZ') + DT.timedelta( @@ -168,7 +168,7 @@ def Master_workFlow(inputDict): if pbsFlag is True: wrr.hpcCores = inputDict['hpcSettings']['hpcCores'] wrr.hpcNodes = inputDict['hpcSettings']['hpcNodes'] - wrr.runSimulation(modelExecutable=inputDict['modelExecutable'],hotStartDirectory=hotStartDirectory) + wrr.runSimulation(modelExecutable=inputDict['modelExecutable'], hotStartDirectory=hotStartDirectory) # post process (as appropriate) if analyzeFlag == True: @@ -203,7 +203,6 @@ def Master_workFlow(inputDict): logging.exception('\nERROR FOUND @ {}\n'.format(time, exc_info=True)) os.chdir(cmtbRootDir) - if __name__ == "__main__": opts, args = getopt.getopt(sys.argv[1:], "h", ["help"]) print('___________________________________\n___________________________________\n___________________' From 7c8989a746f051684e9c75529bf359f3bf368b60 Mon Sep 17 00:00:00 2001 From: spike Date: Thu, 16 Sep 2021 05:52:56 -0400 Subject: [PATCH 10/12] updated comments with frontback new --- frontback/frontBackNEW.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontback/frontBackNEW.py b/frontback/frontBackNEW.py index 7a1ded1..8098cfc 100644 --- a/frontback/frontBackNEW.py +++ b/frontback/frontBackNEW.py @@ -224,9 +224,10 @@ class objects as listed below: spatialPostProcessed = postData.processNLwave(spatialData, wrr=wrr, ncFilesOnly=False) pointPostProcessed = None elif postProcessingDict['phaseAveraged'] == True: - spatialPostProcessed = postData.processwave(spatialData, wrr=wrr, ncFilesOnly=False) - pointPostProcessed = None + spatialPostProcessed = postData.processPAwave(spatialData, wrr=wrr, ncFilesOnly=False) + pointPostProcessed = None # this needs to be developed else: + # place holder for new development spatialPostProcessed, pointPostProcessed = someFunctionPostProcesing(spatialData, pointData) # __________________________2. make netCDF Files________________________________ From b5e0b37f62b1c102d1caf3af10bbb963121522a8 Mon Sep 17 00:00:00 2001 From: spike Date: Fri, 24 Sep 2021 09:14:46 -0400 Subject: [PATCH 11/12] almost working cshore setup --- frontback/frontBackNEW.py | 13 +++++-------- genericWorkFlow.py | 7 ++++--- getdatatestbed | 2 +- prepdata | 2 +- testbedutils | 2 +- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/frontback/frontBackNEW.py b/frontback/frontBackNEW.py index 8098cfc..496cac5 100644 --- a/frontback/frontBackNEW.py +++ b/frontback/frontBackNEW.py @@ -210,8 +210,6 @@ class objects as listed below: # _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ # establishing the resolution of the input datetime # try: - projectStart = DT.datetime.strptime(startTime, '%Y-%m-%dT%H:%M:%SZ') - projectEnd = DT.datetime.strptime(inputDict['endTime'], '%Y-%m-%dT%H:%M:%SZ') dateString = wrr.dateString # a string for file names # _____________________________________________________________________________ @@ -279,10 +277,7 @@ class objects as listed below: # __________________________2bb. point plotting ________________________________ print("is this necessary??") - - - - + def cshoreSimSetup(startTimeString, inputDict, allWave, allBathy, allWL, allWind, allCTD, wrr): """Author: David Young @@ -357,12 +352,14 @@ def cshoreSimSetup(startTimeString, inputDict, allWave, allBathy, allWL, allWind # outputPath=pathPrefix, model=model, waveTimeList=waveTimeList, ww3nFreq=nFreq) # print('TODO: @Ty add values for nFreq here! [frontBackNew.line72]') print(reltime, startTime) - wavepacket = prepdata.prep_CSHOREwaves(rawspec, reltime , startTime) + wavepacket = prepdata.prep_CSHOREwaves(rawspec, reltime , startTime, pierAng=wrr.shoreNormal) wlTimeList = [startTime + DT.timedelta(seconds=tt) for tt in reltime] WLpacket = prepdata.prep_WL(rawWL,wlTimeList) windTimeList= [startTime + DT.timedelta(seconds=tt) for tt in reltime] - windpacket = prepdata.prep_wind(rawwind, windTimeList, model=model) # vector average, rotate winds, correct to 10m + windpacket = prepdata.prep_wind(rawwind, windTimeList, model=model, shoreNormal=wrr.shoreNormal) # vector average, + # rotate winds, + # correct to 10m # pull the stuff I need out of the dict timerun = inputDict['simulationDuration'] diff --git a/genericWorkFlow.py b/genericWorkFlow.py index 1baedc4..a3c4112 100755 --- a/genericWorkFlow.py +++ b/genericWorkFlow.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- import matplotlib -matplotlib.use('Agg') +# matplotlib.use('Agg') import os, getopt, sys, shutil, glob, logging, yaml, re, pickle import datetime as DT import numpy as np @@ -132,7 +132,8 @@ def Master_workFlow(inputDict): simulatedRunTime=inputDict['simulationDuration'], endTime=DT.datetime.strptime(time, '%Y-%m-%dT%H:%M:%SZ') + DT.timedelta( hours=inputDict['simulationDuration']), runFlag=runFlag, - generateFlag=generateFlag, readFlag=analyzeFlag, pbsFlag=pbsFlag) + generateFlag=generateFlag, readFlag=analyzeFlag, pbsFlag=pbsFlag, shoreNormal=72, + xOrigin=rawspec['xFRF']) if generateFlag is True: rawbathy = go.getBathyTransectFromNC(profilenumbers=960) rawctd = go.getCTD() @@ -157,7 +158,7 @@ def Master_workFlow(inputDict): print("windPacket has keys: {}".format(windPacket.keys())) except AttributeError: pass - print(updateBathy) + print(updateBathy) # write simulation files (if assigned) wrr.writeAllFiles(wavePacket=wavePacket, windPacket=windPacket, wlPacket=wlPacket, bathyPacket=bathyPacket, gridfname=gridFname, diff --git a/getdatatestbed b/getdatatestbed index b8d7d6c..0b8cbdc 160000 --- a/getdatatestbed +++ b/getdatatestbed @@ -1 +1 @@ -Subproject commit b8d7d6c202825c1d1ca574894bbfc64b677d7471 +Subproject commit 0b8cbdc91b08b35f4efcf738e7cdcfa94c166701 diff --git a/prepdata b/prepdata index fd544cd..21ac7d1 160000 --- a/prepdata +++ b/prepdata @@ -1 +1 @@ -Subproject commit fd544cd549f2d39ef04e7a6d7900fe09db6ce8c8 +Subproject commit 21ac7d11e010858f55b222ebeed9476a1bcf132a diff --git a/testbedutils b/testbedutils index b12bbba..0a32fff 160000 --- a/testbedutils +++ b/testbedutils @@ -1 +1 @@ -Subproject commit b12bbba4803d0a9cb3935c7f138ed3226c3390d7 +Subproject commit 0a32fff6616495f4e8b8c3c553a05de1b42d057d From af4db2eb18e3bf15c7eaac3b905e52aa77f231ab Mon Sep 17 00:00:00 2001 From: spike Date: Sat, 25 Sep 2021 18:23:00 -0400 Subject: [PATCH 12/12] working with newly polished (working) cshore setup... sorta.. still some work to be done --- .cmtbSettings | 1 + frontback/frontBackNEW.py | 85 ++--- genericWorkFlow.py | 5 +- plotting/operationalPlots.py | 39 ++- prepdata | 2 +- testbedutils | 2 +- yaml_files/waveModels/cshore/cshore_var.yml | 311 ++++++++++++++++++ .../cshore/fixed/cshore_global.yml} | 10 +- yaml_files/ww3_TimeIntrpolatantBug.yml | 25 -- 9 files changed, 370 insertions(+), 110 deletions(-) create mode 100644 yaml_files/waveModels/cshore/cshore_var.yml rename yaml_files/{CSHORE/CSHORE_fixed_global.yml => waveModels/cshore/fixed/cshore_global.yml} (73%) delete mode 100644 yaml_files/ww3_TimeIntrpolatantBug.yml diff --git a/.cmtbSettings b/.cmtbSettings index b296846..c58123d 100644 --- a/.cmtbSettings +++ b/.cmtbSettings @@ -3,6 +3,7 @@ # #################################### # +slack: None runFlag: true analyzeFlag: true plotFlag: false diff --git a/frontback/frontBackNEW.py b/frontback/frontBackNEW.py index 496cac5..7c1659e 100644 --- a/frontback/frontBackNEW.py +++ b/frontback/frontBackNEW.py @@ -4,7 +4,6 @@ from getdatatestbed.getDataFRF import getDataTestBed import datetime as DT import os, glob, makenc, sys, shutil -from subprocess import check_output import netCDF4 as nc import numpy as np import plotting.operationalPlots as oP @@ -258,10 +257,24 @@ class objects as listed below: elif postProcessingDict['phaseAveraged'] is True: variables = ncfile.variables.keys() - for var in variables: - if var in ['waveHs', 'waveDm', 'waveTm'] and plotFlag is True: - plotOutFname = 'test.png' - oP.unstructuredSpatialPlot(plotOutFname, fieldNc=ncfile, variable=var) + if postProcessingDict['gridType'] == 'unstructured': + for var in variables: + if var in ['waveHs', 'waveDm', 'waveTm'] and plotFlag is True: + plotOutFname = 'test.png' + oP.unstructuredSpatialPlot(plotOutFname, fieldNc=ncfile, variable=var) + if postProcessingDict['gridType'] == '1D': + for var in ['aveN', 'aveE', 'waveHs']: + for t, tt in enumerate(ncfile['time'][:]): + plotOutFname = os.path.join(wrr.plottingDirectory, f"CMTB_{wrr.modelName}_{var}_" \ + f"{nc.num2date(tt, ncfile['time'].units).strftime('%Y%m%dT%H%M%SZ')}.png") + oP.plotWaveProfile(ncfile['xFRF'][:], ncfile[var][t], ncfile['elevation'][t], plotOutFname, + variableName=var) + + flist = glob.glob(os.path.join(wrr.plottingDirectory, f"CMTB_*{var}*.png")) + sb.makegif(flist, ofname=os.path.join(wrr.plottingDirectory, f"CMTB_{wrr.modelName}_{var}.gif")) + sb.myTarMaker(os.path.join(wrr.plottingDirectory, f'CMTB_{wrr.modelName}_{var}.tar.gz'), + fileList=flist) + else: raise NotImplementedError("other model plotting types haven't been implemented yet") # __________________________2b. point output _________________________________ @@ -306,34 +319,23 @@ def cshoreSimSetup(startTimeString, inputDict, allWave, allBathy, allWL, allWind # begin by setting up input parameters simulationDuration = int(inputDict.get('simulationDuration', 24)) timeStep = (inputDict.get('timeStep',3600)) - plotFlag = inputDict.get('plotFlag', True) print('TODO: rename these unpacked variables [frontbackNew.preprocess]') - try: - version_prefix = wrr.versionPrefix - except: - version_prefix = inputDict['modelSettings'].get('version_prefix', 'base').lower() - plotFlag = inputDict.get('plotFlag', True) pathPrefix = wrr.workingDirectory - model = wrr.modelName # inputDict['modelSettings'].get('model', 'ww3').lower() rawspec = allWave rawwind = allWind rawWL = allWL rawCTD = allCTD rawBathy = allBathy - - # ___________________define version parameters_________________________________ - full = True # __________________set times _________________________________________________ startTime = DT.datetime.strptime(startTimeString, '%Y-%m-%dT%H:%M:%SZ') endTime = startTime + DT.timedelta(0, simulationDuration * 3600, 0) - dateString = wrr.dateString # startTime.strftime('%Y-%m-%dT%H%M%SZ') ftime = simulationDuration*3600. - reltime = np.arange(0,ftime+timeStep,timeStep) + reltime = np.arange(0, ftime+timeStep, timeStep) print("Model Time Start : %s Model Time End: %s" % (startTime, endTime)) - + model = wrr.modelName # __________________Make Diretories_____________________________________________ fileHandling.makeCMTBfileStructure(pathPrefix) @@ -355,28 +357,18 @@ def cshoreSimSetup(startTimeString, inputDict, allWave, allBathy, allWL, allWind wavepacket = prepdata.prep_CSHOREwaves(rawspec, reltime , startTime, pierAng=wrr.shoreNormal) wlTimeList = [startTime + DT.timedelta(seconds=tt) for tt in reltime] - WLpacket = prepdata.prep_WL(rawWL,wlTimeList) + WLpacket = prepdata.prep_WL(rawWL, wlTimeList) windTimeList= [startTime + DT.timedelta(seconds=tt) for tt in reltime] - windpacket = prepdata.prep_wind(rawwind, windTimeList, model=model, shoreNormal=wrr.shoreNormal) # vector average, - # rotate winds, - # correct to 10m + + # vector average, rotate winds, correct to 10m + windpacket = prepdata.prep_wind(rawwind, windTimeList, model=model, shoreNormal=wrr.shoreNormal) # pull the stuff I need out of the dict timerun = inputDict['simulationDuration'] version_prefix = inputDict['modelSettings']['version_prefix'] profile_num = inputDict['profileNumber'] bathy_loc = inputDict['bathyLoc'] - workingDir = inputDict['workingDirectory'] - if 'THREDDS' in inputDict: - server = inputDict['THREDDS'] - else: - print('Chosing CHL thredds by Default, this may be slower!') - server = 'CHL' - # ____________________GENERAL ASSUMPTION VARIABLES__________ - - model = 'CSHORE' - path_prefix = os.path.join(workingDir, model, '%s/' % version_prefix) - time_step = 1 # time step for model in hours + dx = 1 # cross-shore grid spacing (FRF coord units - m) fric_fac = 0.015 # default friction factor @@ -385,33 +377,12 @@ def cshoreSimSetup(startTimeString, inputDict, allWave, allBathy, allWL, allWind # Time Stuff! if type(timerun) == str: timerun = int(timerun) - #start_time = DT.datetime.strptime(startTime, '%Y-%m-%dT%H:%M:%SZ') start_time = startTime - bathy_loc_List = np.array(['integrated_bathy', 'survey']) - assert start_time.minute == 0 and start_time.second == 0 and start_time.microsecond == 0, 'Your simulation must start on the hour!' - end_time = start_time + DT.timedelta(days=0, hours=timerun) # removed for ilab=1 , minutes=1) - print(end_time) - date_str = start_time.strftime('%Y-%m-%dT%H%M%SZ') - # start making my metadata dict - #meta_dict = {'startTime': DT.datetime.strftime(startTime,'%Y-%m-%dT%H:%M:%SZ'), - # 'timerun': timerun, - # 'time_step': time_step, - # 'dx': dx, - # 'fric_fac': fric_fac, - # 'version': version_prefix} - #ftime = timerun * 3600 # [sec] final time, dictates model duration - #dt = time_step * 3600 # time interval (sec) for wave and water level conditions - #BC_dict = {'timebc_wave': np.arange(0, ftime + dt, dt)} - - bathypacket = prepdata.prep_CSHOREbathy(rawBathy, bathy_loc, dx, wavepacket, profile_num=profile_num,fric_fac=fric_fac) - # ______________________________________________________________________________ - # __________________Make Diretories_____________________________________________ - #if not os.path.exists(path_prefix + date_str): # if it doesn't exist - # os.makedirs(path_prefix + date_str) # make the directory - #if not os.path.exists(path_prefix + date_str + "/figures/"): - # os.makedirs(path_prefix + date_str + "/figures/") + + bathypacket = prepdata.prep_CSHOREbathy(rawBathy, bathy_loc, dx, wavepacket, profile_num=profile_num, + fric_fac=fric_fac) print("Model Time Start : %s Model Time End: %s" % (start_time, end_time)) #print("Files will be placed in {0} folder".format(path_prefix + date_str)) diff --git a/genericWorkFlow.py b/genericWorkFlow.py index a3c4112..6e24f14 100755 --- a/genericWorkFlow.py +++ b/genericWorkFlow.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- import matplotlib -# matplotlib.use('Agg') +matplotlib.use('Agg') import os, getopt, sys, shutil, glob, logging, yaml, re, pickle import datetime as DT import numpy as np @@ -185,7 +185,8 @@ def Master_workFlow(inputDict): if inputDict['slack'] is not None: myslack = cmtbSlack.slack('testbedutils/slackSettings.yml') # initialize - myslack.postMessageWithFiles(f"checkout {wrr.modelName} simulations from {wrr.dateString}", + myslack.postMessageWithFiles(f"Dear Sir/Madam, please look at the plots generated by the " + f"model {wrr.modelName} during the time of {wrr.dateString}", moveFnames) else: diff --git a/plotting/operationalPlots.py b/plotting/operationalPlots.py index a001b53..b6d1c71 100644 --- a/plotting/operationalPlots.py +++ b/plotting/operationalPlots.py @@ -493,7 +493,7 @@ def plotSpatialFieldData(contourpacket, fieldpacket, prefix='', nested=True, **k plt.savefig(prefix + namebase + '_%s.png' % time[tt][0].strftime("%Y%m%d%H%M")) plt.close() -def plotWaveProfile(x, waveHs, bathyToPlot, fname): +def plotWaveProfile(x, waveHs, bathyToPlot, fname, **kwargs): """This function will plot the Cross shore Wave profile at the FRF Xshore array Args: @@ -509,26 +509,25 @@ def plotWaveProfile(x, waveHs, bathyToPlot, fname): a saved plot """ - profileToPlot = waveHs - # if bathyField.ndim == 3: - # bathyToPlot = -bathyField[0, yLocation, :] - # elif bathyField.ndim == 2: - # bathyToPlot = -bathyField[yLocation, :] - # if profileToPlot.shape[0] == 200: - # dx = 5 - # elif profileToPlot.shape[0] == 100: - # dx = 10 - ## setup - + profileToPlot = kwargs.get('variableName', waveHs) + # figure - fig, ax1 = plt.subplots(figsize=(8,4)) - ax1.plot(x, profileToPlot, 'b', lw=3) - ax1.set_ylabel('Wave Height [m]', color='b') - ax2 = ax1.twinx() - ax2.plot(x, bathyToPlot, 'brown', lw=2) - ax2.set_ylabel('Bathymetry Depth[m] NAVD88', color='brown') - plt.xlabel('STWAVE Cross Shore Position [m]') - plt.title('Wave Height at the FRF Cross Shore Array') + fig = plt.figure(figsize=(8,4)) + ax1 = plt.subplot2grid((3,4),(0,0), colspan=4, rowspan=2) + ax1.fill_between(x, waveHs, 0, color='b', alpha=.5, lw=3) + ax1.set_ylabel(f'{profileToPlot}', color='b') + if profileToPlot != 'waveHs': + ax1.set_ylim([-1,1]) + else: + ax1.set_ylim([0,4]) + ax2 = plt.subplot2grid((3,4),(2,0), colspan=4, rowspan=1, sharex=ax1) + ax2.fill_between(x, bathyToPlot, bathyToPlot.min(), color='khaki', lw=2) + + ax2.set_ylabel('Bathymetry [m]') + ax2.set_xlabel('Cross Shore Position [m]') + plt.subplots_adjust(hspace=0) + plt.suptitle(f'Cross-shore evolution of {profileToPlot}') + plt.savefig(fname) plt.close() diff --git a/prepdata b/prepdata index 21ac7d1..aba8c60 160000 --- a/prepdata +++ b/prepdata @@ -1 +1 @@ -Subproject commit 21ac7d11e010858f55b222ebeed9476a1bcf132a +Subproject commit aba8c609f1d39764e7185720c4160ff2a3dcaaed diff --git a/testbedutils b/testbedutils index 0a32fff..2f2f512 160000 --- a/testbedutils +++ b/testbedutils @@ -1 +1 @@ -Subproject commit 0a32fff6616495f4e8b8c3c553a05de1b42d057d +Subproject commit 2f2f512475734245fef6c1a2cbb053b288559a56 diff --git a/yaml_files/waveModels/cshore/cshore_var.yml b/yaml_files/waveModels/cshore/cshore_var.yml new file mode 100644 index 0000000..da1a045 --- /dev/null +++ b/yaml_files/waveModels/cshore/cshore_var.yml @@ -0,0 +1,311 @@ +# CSHORE template + +_variables: ['time', 'xFRF', 'aveE', 'aveN', 'waveHs', 'waveMeanDirection', 'waterLevel', 'setup', 'totalWaterLevel', 'runupMean', 'elevation', 'latitude', 'longitude', 'profileNumber', 'bathymetryDate', 'yFRF', 'waveFlag'] +_attributes: ['notes'] +_dimensions: ['time', 'xFRF'] + + +time: + name: 'time' + units: 'seconds since 1970-01-01 00:00:00' + standard_name: '' + long_name: 'UTC Model Time' + data_type: 'f8' + dim: ['time'] + calendar: 'gregorian' + fill_value: '-999.99' + +xFRF: + name: 'xFRF' + units: 'm' + standard_name: '' + long_name: 'Cross-shore position in m' + data_type: 'f8' + dim: ['xFRF'] + fill_value: '-999.99' + short_name: 'xFRF' + coordinates: 'xFRF yFRF' + description: 'Cross-shore position of the CMTB CSHORE model nodes in FRF coordinates (xFRF)' + + +# hydro stuff +aveE: + name: 'aveE' + units: 'm/s' + standard_name: '' + long_name: 'Depth averaged eastward current' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'Mean Eastward Current' + coordinates: 'xFRF yFRF' + description: 'Depth averaged eastward current at each node along the Modeled Transect from CMTB CSHORE model run' + +stdE: + name: 'stdE' + units: 'm/s' + standard_name: '' + long_name: 'Standard deviation of the depth averaged eastward current' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'Standard Deviation of Eastward Current' + coordinates: 'xFRF yFRF' + description: 'Standard deviation of the depth averaged eastward current at each node along the Modeled Transect from CMTB CSHORE model run' + +aveN: + name: 'aveN' + units: 'm/s' + standard_name: '' + long_name: 'Depth averaged northward current' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'Mean Northward Current' + coordinates: 'xFRF yFRF' + description: 'Depth averaged northward current at each node along the Modeled Transect from CMTB CSHORE model run' + +stdN: + name: 'stdN' + units: 'm/s' + standard_name: '' + long_name: 'Standard deviation of the depth averaged northward current' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'Standard Deviation of Northward Current' + coordinates: 'xFRF yFRF' + description: 'Standard deviation of the depth averaged northward current at each node along the Modeled Transect from CMTB CSHORE model run' + +waveHs: + name: 'waveHs' + units: 'm' + standard_name: '' + long_name: 'Significant Wave Height' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'Wave Height' + coordinates: 'xFRF yFRF' + description: 'Significant Wave Height across the Modeled Transect from CMTB CSHORE model run' + +waveMeanDirection: + name: 'waveMeanDirection' + units: 'Degrees' + standard_name: '' + long_name: 'Mean Wave Direction measured from true north' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'Mean Direction' + coordinates: 'xFRF yFRF' + description: 'Mean wave Direction along the Modeled Transect from CMTB CSHORE model run' + +waterLevel: + name: 'waterLevel' + units: 'm' + standard_name: '' + long_name: 'mean water surface elevation' + data_type: 'f8' + dim: ['time'] + fill_value: '-999.99' + short_name: 'mwl' + coordinates: 'xFRF yFRF' + description: 'Mean water surface elevation along the Modeled Transect from CSHORE model run' + +setup: + name: 'setup' + units: 'm' + standard_name: '' + long_name: 'wave setup/setdown' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'setup' + coordinates: 'xFRF yFRF' + description: 'Wave setup/setdown along the modeled transect from CSHORE model run' + +totalWaterLevel: + name: 'totalWaterLevel' + units: 'm' + standard_name: '' + long_name: '2 percent exceedence runup elevation' + data_type: 'f8' + dim: ['time'] + fill_value: '-999.99' + short_name: 'R2%' + coordinates: '' + description: '2 percent exceedence runup elevation from the CSHORE mode' + +#sediment stuff +qbx: + name: 'qbx' + units: 'm2/s' + standard_name: '' + long_name: 'cross-shore bedload sediment transport rate' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'qbx' + coordinates: 'xFRF yFRF' + description: 'Cross-shore bedload sediment transport rate along the Modeled Transect from CMTB CSHORE model run' + +qsx: + name: 'qsx' + units: 'm2/s' + standard_name: '' + long_name: 'cross-shore suspended sediment transport rate' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'qsx' + coordinates: 'xFRF yFRF' + description: 'Cross-shore suspended sediment transport rate along the Modeled Transect from CMTB CSHORE model run' + +qby: + name: 'qby' + units: 'm2/s' + standard_name: '' + long_name: 'along-shore bedload sediment transport rate' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'qby' + coordinates: 'xFRF yFRF' + description: 'Along-shore bedload sediment transport rate along the Modeled Transect from CMTB CSHORE model run' + +qsy: + name: 'qsy' + units: 'm2/s' + standard_name: '' + long_name: 'along-shore suspended sediment transport rate' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'qsy' + coordinates: 'xFRF yFRF' + description: 'Along-shore suspended sediment transport rate along the Modeled Transect from CMTB CSHORE model run' + +probabilitySuspension: + name: 'probabilitySuspension' + units: '' + standard_name: '' + long_name: 'probability of sediment suspension (0-1)' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'ps' + coordinates: 'xFRF yFRF' + description: 'Probability of sediment suspension (0-1) along the Modeled Transect from CMTB CSHORE model run' + +probabilityMovement: + name: 'probabilityMovement' + units: '' + standard_name: '' + long_name: 'probability of sediment movement (0-1)' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'pb' + coordinates: 'xFRF yFRF' + description: 'Probability of sediment movement (0-1) along the Modeled Transect from CMTB CSHORE model run' + +suspendedSedVolume: + name: 'suspendedSedVolume' + units: 'm3/m2' + standard_name: '' + long_name: 'suspended sediment volume per unit horizontal bottom area' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'vs' + coordinates: 'xFRF yFRF' + description: 'Suspended sedimet volume per unti horizontal bottom area along the Modeled Transect from CMTB CSHORE model run' + + +# morpho stuff +elevation: + name: 'elevation' + units: 'm' + standard_name: '' + long_name: 'bathymetry elevation' + data_type: 'f8' + dim: ['time', 'xFRF'] + fill_value: '-999.99' + short_name: 'bathy' + coordinates: 'xFRF yFRF' + description: 'Bottom elevation for the CSHORE model bathymetry in NAVD88' + + +# extra stuff +latitude: + name: 'latitude' + units: 'Degrees' + standard_name: '' + long_name: 'Latitude of each node in decimal degrees' + data_type: 'f8' + dim: ['xFRF'] + fill_value: '-999.99' + short_name: 'lat' + coordinates: 'xFRF yFRF' + description: 'Latitude of the CMTB CSHORE model nodes in decimal degrees' + +longitude: + name: 'longitude' + units: 'Degrees' + standard_name: '' + long_name: 'Longitude of each node in decimal degrees' + data_type: 'f8' + dim: ['xFRF'] + fill_value: '-999.99' + short_name: 'lon' + coordinates: 'xFRF yFRF' + description: 'Longitude of the CMTB CSHORE model nodes in decimal degrees' + +profileNumber: + name: 'profileNumber' + units: '' + standard_name: '' + long_name: 'The profile number of the initial bathymetry' + data_type: 'f8' + dim: ['time'] + fill_value: '-999.99' + short_name: 'profileNum' + coordinates: '' + description: 'The profile number of the bathymetric survey used to initialize the model' + +bathymetryDate: + name: 'bathymetryDate' + units: 'seconds since 1970-01-01 00:00:00' + standard_name: '' + long_name: 'The date the survey bathymetry used to inialize the model was taken' + data_type: 'f8' + dim: ['time'] + fill_value: '-999.99' + short_name: 'bathyDate' + coordinates: '' + description: 'This marks when the bathymetry was measured if done by a traditional survey technique' + +yFRF: + name: 'yFRF' + units: 'm' + standard_name: '' + long_name: 'The yFRF position of the transect' + data_type: 'f8' + dim: ['time'] + fill_value: '-999.99' + short_name: 'yFRF' + coordinates: 'xFRF yFRF' + description: 'The yFRF position of the BC used in the model (and therefore the entire transect)' + +waveFlag: + name: 'waveFlag' + units: '' + standard_name: '' + long_name: 'Wave quality control flag value' + data_type: 'u2' + dim: ['time'] + fill_value: '-999' + short_name: 'waveFlag' + coordinates: '' + description: 'These flags are markers for the quality of wave input data into the model. There are 2 main flags in place currently:\n 0: Good Data\n1:Linearly Interpolated Data - these data are interpolated due to missing or poorly flagged input data' diff --git a/yaml_files/CSHORE/CSHORE_fixed_global.yml b/yaml_files/waveModels/cshore/fixed/cshore_global.yml similarity index 73% rename from yaml_files/CSHORE/CSHORE_fixed_global.yml rename to yaml_files/waveModels/cshore/fixed/cshore_global.yml index 647ac55..a08397e 100644 --- a/yaml_files/CSHORE/CSHORE_fixed_global.yml +++ b/yaml_files/waveModels/cshore/fixed/cshore_global.yml @@ -2,8 +2,10 @@ featureType: grid title: Fixed CSHORE Results summary: > USACE CSHORE model data generated as part of the Coastal Model Test Bed(CMTB). - This component of the SMTB is composed of CSHORE model runs with a fixed bed for all time steps - I'm not sure what else needs to go here...: + The model data are generated with a fixed (non-evolving) bathymetry boundary condition. + For more information about the CSHORE model, please refer to Kobayashi et al. 2009 and Johnson, + Bradley D., Nobuhisa Kobayashi, and Mark B. Gravens. "Cross-shore numerical model CSHORE for waves, + currents, sediment transport and beach profile evolution." (2012). history: data set created as part of the Coastal Model Test Bed(CMTB), CSHORE model data generated at the FRF source: CMTB CSHORE simulations platform: FRF Cluster - Crunchy @@ -16,8 +18,8 @@ creator_name: USACE/CHL/COAB creator_url: http://frf.usace.army.mil creator_email: frfwebmaster@usace.army.mil license: These data may be redistributed and used without restriction. Data are intended for scholarly use by the research community, with the express agreement that users will properly acknowledge the USACE Field Research Facility and the supporting investigator(s). Use or reproduction of these data for commercial purposes is prohibited without prior written permission. -keywords_vocabulary: FGlobal Change Master Directory (GCMD) Earth Science Keywords; CF Standard Name Table (v23, 23 March 2013) -keywords: Oceans > Ocean Waves > Wave Frequency, Oceans > Ocean Waves > Wave Height, Oceans > Ocean Waves > Wave Period, Oceans > Ocean Waves > Wave Spectra, Oceans > Ocean Waves > Wave Direction, DOD > DOD/USARMY/USACE/CHL/FRF > Field Research Facility, Coastal And Hydraulics Laboratory,U. S. Army Corps Of Engineers, U.S. Army, U. S. Department Of Defense, sea_surface_wave_variance_spectral_density, sea_surface_wave_significant_height, sea_surface_wave_from_direction, sea_surface_wave_directional_variance_spectral_density +keywords_vocabulary: Global Change Master Directory (GCMD) Earth Science Keywords; CF Standard Name Table (v23, 23 March 2013) +keywords: DOD > DOD/USARMY/USACE/CHL/FRF > Field Research Facility, Coastal And Hydraulics Laboratory,U. S. Army Corps Of Engineers, U.S. Army, U. S. Department Of Defense, sea_surface_wave_variance_spectral_density, sea_surface_wave_significant_height, sea_surface_wave_from_direction, sea_surface_wave_directional_variance_spectral_density processing: realtime organization: USACE/CHL/COAB publisher_url: http://frf.usace.army.mil diff --git a/yaml_files/ww3_TimeIntrpolatantBug.yml b/yaml_files/ww3_TimeIntrpolatantBug.yml deleted file mode 100644 index 232cdc2..0000000 --- a/yaml_files/ww3_TimeIntrpolatantBug.yml +++ /dev/null @@ -1,25 +0,0 @@ -# # # # # # # # # # # # -# Data control # -# # # # # # # # # # # # -plotFlag: True # turn plotting on -generateFlag: True # generate simulation input files (go get data, process, and write files) -runFlag: True # run the simulation -analyzeFlag: True # post process simulations (read files, post proces -bathyLoc: integrated_bathy # bathymetry source. OPTIONAL: defaults to integrated_bathy -######################## -#simulations parameters# -######################## -startTime: 2020-10-04T00:00:00Z # project start time -endTime: 2020-10-05T00:00:00Z # project End time -simulationDuration: 24 # duration in hours - how frequently to get new data, size of individual simulations -modelExecutable: /modelSourceCodes/WW3/model/exe # path to all appropriate executables (grid, bounc, shel) -logging: False # optional -verbose: True # optional -modelSettings: - modelName: ww3 # model name string, used for filename/path generation - version_prefix: base # controls switched within the code - grid: grids/ww3/Mesh_interp_Mar2018.msh # base grid sim REQUIRED - -waveSettings: - waveFlag: True -