-
Notifications
You must be signed in to change notification settings - Fork 10
Tjh/add notebooks #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2
Are you sure you want to change the base?
Changes from 6 commits
ae2287d
bdca4de
8d58860
0b611d2
c4d0974
db3f33f
96e2af3
6e19768
1e6acb0
dd75174
fe826a1
63c23db
1bd62de
9a8a035
2fc3c44
2259e19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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" | ||
| ] | ||
| }, | ||
|
|
@@ -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)" | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -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, | ||
|
|
@@ -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, | ||
|
|
@@ -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)" | ||
| ] | ||
|
|
@@ -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)" | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -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", | ||
| " startTime=d1, endTime=d2, runFlag=True,\n", | ||
| " generateFlag=True, readFlag=False)" | ||
| ] | ||
|
|
@@ -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", | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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)" | ||
| ] | ||
|
|
@@ -413,7 +394,7 @@ | |
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "resultsfull = cshoreiofull.readAllFiles()" | ||
| "spatialData, pointData = cshoreiofull.readAllFiles()" | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -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, | ||
|
|
@@ -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", | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
| "yy['logfileLoc'] = '/Users/rdchlth9/Codes/cmtb_refactor/data'\n", | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||
|
|
@@ -474,7 +448,7 @@ | |
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "%run ../../genericWorkFlow.py test.yaml" | ||
| "#%run ../../genericWorkFlow.py test.yaml" | ||
| ] | ||
| }, | ||
| { | ||
|
|
||
| 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 | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| 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 | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment.
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])