Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The test bed is established at the USACE CHL Field REsearch Facility in Duck, No
- conda install <package>

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!! :-[]

Expand Down
3 changes: 2 additions & 1 deletion genericWorkFlow.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,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,
Expand Down
72 changes: 23 additions & 49 deletions notebooks/cshore/cshore_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -22,6 +24,7 @@
"import plotly\n",
"import pickle\n",
"import yaml\n",
"\n",
"%matplotlib inline"
]
},
Expand Down Expand Up @@ -55,20 +58,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)"
]
},
{
Expand Down Expand Up @@ -99,15 +89,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,
Expand All @@ -120,16 +101,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,
Expand All @@ -155,7 +126,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)"
]
Expand Down Expand Up @@ -201,7 +172,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)"
]
},
{
Expand All @@ -217,7 +198,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",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thesser1 can we make these paths generic (relative or something like [/your/path/here])

" startTime=d1, endTime=d2, runFlag=True,\n",
" generateFlag=True, readFlag=False)"
]
Expand Down Expand Up @@ -357,7 +338,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",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

" startTime=d1, endTime=d2, timeStep=dt, runFlag=True,\n",
" generateFlag=True, readFlag=False)"
]
Expand Down Expand Up @@ -413,7 +394,7 @@
"metadata": {},
"outputs": [],
"source": [
"resultsfull = cshoreiofull.readAllFiles()"
"spatialData, pointData = cshoreiofull.readAllFiles()"
]
},
{
Expand All @@ -422,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,
Expand All @@ -450,8 +424,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",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

"yy['logfileLoc'] = '/Users/rdchlth9/Codes/cmtb_refactor/data'\n",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

"yy['plotFlag'] = False\n",
"yy['generateFlag'] = True\n",
"yy['runFlag'] = True\n",
Expand All @@ -474,7 +448,7 @@
"metadata": {},
"outputs": [],
"source": [
"%run ../../genericWorkFlow.py test.yaml"
"#%run ../../genericWorkFlow.py test.yaml"
]
},
{
Expand Down
17 changes: 17 additions & 0 deletions yaml_files/TestBedExampleInputs/CSHORE_Input_example_v2.yml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

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
17 changes: 17 additions & 0 deletions yaml_files/TestBedExampleInputs/ww3_Input_example_v2.yml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

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