-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Added ROMS ocean model example notebook #3116
Conversation
Codecov Report
@@ Coverage Diff @@
## scipy19-docs #3116 +/- ##
================================================
+ Coverage 95.99% 95.99% +<.01%
================================================
Files 63 63
Lines 12796 12799 +3
================================================
+ Hits 12284 12287 +3
Misses 512 512 |
* switching out examples to use nbsphinx * added jupyter_client to doc env * allow non netcdf tutorial files
@hetland - thanks so much for this! Now that pydata/xarray-data#13 has been merged, can you try to update your example to use the |
added some extra documentation.
I'm having a hard time getting the docs to compile, they fail when loading the |
Can you post the error and stack trace? |
You have to rebase your feature branch on the upstream/scipy19-docs branch in order to get #3121 to work locally.
|
I just saw the new PR (#3134). You don't need to start a new PR unless something is truly broken here. You can just keep pushing to this one. |
OK, I closed the other pull request, and updated this branch. |
doc/examples/ROMS_ocean_model.ipynb
Outdated
"import cartopy.feature as cfeature\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"%matplotlib inline\n", | ||
"# import cmocean # TODO: Add this dependency to the docs\n", |
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.
Let's keep cmocean
out since it isn't strictly necessary for the example.
"ds = xr.tutorial.open_dataset('ROMS_example.nc', chunks={'ocean_time': 1})\n", | ||
"\n", | ||
"# This is a way to turn on chunking and lazy evaluation. Opening with mfdataset, or \n", | ||
"# setting the chunking in the open_dataset would also achive this.\n", |
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.
"# setting the chunking in the open_dataset would also achive this.\n", | |
"# setting the chunking in the open_dataset would also achieve this.\n", |
doc/examples/ROMS_ocean_model.ipynb
Outdated
"outputs": [], | ||
"source": [ | ||
"section = ds.salt.isel(xi_rho=50, eta_rho=slice(0, 167), ocean_time=0)\n", | ||
"section.plot(x='lon_rho', y='z_rho', figsize=(15, 6), cmap=cmocean.cm.haline, clim=(25, 35))\n", |
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.
Lets just use a standard matplotlib colormap
I am returning to this after some vacation. Thanks so much @hetland for this great example! The test failures are not related to this PR. I see only three things that need to be done to get this ready to merge.
|
… added citation in whats-new.
Thanks for this @hetland! I'm going to merge now! |
I finally got the page to build and it looks great! There was an issue with the ROMS MD5 checksum which I fixed in pydata/xarray-data#17. The checksums .md5 files cannot have newlines at the end. |
It looks awesome! |
* change name of test env to xarray-tests (pydata#3110) * ROMS_ocean_model example added * Allow other tutorial filename extensions (pydata#3121) * switching out examples to use nbsphinx * added jupyter_client to doc env * allow non netcdf tutorial files * Changed load to xr.tutorial.open_dataset(), and added some extra documentation. * change name of test env to xarray-tests (pydata#3110) * ROMS_ocean_model example added * Changed load to xr.tutorial.open_dataset(), and added some extra documentation. * fixed colormap issues leftover from cmocean import * Added intro paragraph to ROMS example notebook, removed comments, and added citation in whats-new.
* Switch doc examples to use nbsphinx (#3105) * switching out examples to use nbsphinx * added jupyter_client to doc env * added ipykernel to doc env * Replace sphinx_gallery with notebook (#3106) * switching out examples to use nbsphinx * added jupyter_client to doc env * moved gallery to notebook * Allow other tutorial filename extensions (#3121) * switching out examples to use nbsphinx * added jupyter_client to doc env * allow non netcdf tutorial files * Added ROMS ocean model example notebook (#3116) * change name of test env to xarray-tests (#3110) * ROMS_ocean_model example added * Allow other tutorial filename extensions (#3121) * switching out examples to use nbsphinx * added jupyter_client to doc env * allow non netcdf tutorial files * Changed load to xr.tutorial.open_dataset(), and added some extra documentation. * change name of test env to xarray-tests (#3110) * ROMS_ocean_model example added * Changed load to xr.tutorial.open_dataset(), and added some extra documentation. * fixed colormap issues leftover from cmocean import * Added intro paragraph to ROMS example notebook, removed comments, and added citation in whats-new. * Add an example of ERA5 and GRIB data & visualization to the gallery (#3199) * Adds an example of ERA5 and GRIB data to the gallery * Add markdown narrative cells to GRIB example * Update load method to use xr.tutorial * Fix load method * require nbsphinx for the documentation builds * add more nbsphinx dependencies * install cfgrib using pip * add the eccodes library to the dependencies * remove the dependency on sphinx-gallery * add the ERA5 GRIB example to the list * update the documentation links Missing: section links in visualization_gallery.ipynb don't work yet, also the one in io.rst (it has a unicode char). * Fix leap year condition in monthly means example (#3464) * Typo correction in docs (#3387) * Update terminology.rst (#3455) Fixed broken link * Error in leap year? I've tried this script; however, it adds +1 to all months of the leap years. It sounds like an error, or I am wrong? So I wrote the condition "and month == 2" line 86 so that only the month of February gets +1. * Fix leap year (#3464) * Update doc/whats-new.rst Co-Authored-By: Deepak Cherian <[email protected]> * fix the reference to the rasterio geocoordinates docs * update whats-new.rst
whats-new.rst
for all changes andapi.rst
for new APIThis is an example of reading and visualizing ROMS model output. A highlight is adding a lazily calculated vertical coordinate. This notebook will need an example ROMS output file to run, called ROMS_example.nc. This will be uploaded to the data repository.