Enable regional subsetting
What is this new feature?
Write or adapt python function to make regional timeseries or climo plots.
- [ ] Create dictionary of regions to plot
- [ ] Need workflow for unstructured and regular grids (uxarry and xarray approaches)
- build on / adapt existing
region_multicaseexamples in ADF - see also this notebook, cell 22 for a uxarray example.
- build on / adapt existing
- [ ] Develop web interface for displaying results (again maybe build on region_multicase?)
- For example see set_3 and set_6 from current land diags
Another helpful example of regional hydrology from @olyson is on these slides
The current NCL-based diagnostics package gets the regions information from this file:
/glade/campaign/cgd/tss/people/oleson/FROM_LMWG/diag/lnd_diag4.2/code/resources/region_definitions.nc
ncdump -h region_definitions.nc
... int region(region) ; float BOX_S(region) ; BOX_S:long_name = "Southern Boundary" ; BOX_S:_FillValue = -9999.f ; float BOX_N(region) ; BOX_N:long_name = "Northern Boundary" ; BOX_N:_FillValue = -9999.f ; float BOX_W(region) ; BOX_W:long_name = "Western Boundary" ; BOX_W:_FillValue = -9999.f ; float BOX_E(region) ; BOX_E:long_name = "Eastern Boundary" ; BOX_E:_FillValue = -9999.f ; char PS_ID(region, ncl1) ; PS_ID:long_name = "Postscript File Id" ; PS_ID:_FillValue = "" ; char PTITSTR(region, ncl2) ; PTITSTR:long_name = "Region Title" ; PTITSTR:_FillValue = "" ; char BOXSTR(region, ncl3) ; BOXSTR:long_name = "Region Lat/Lon Title" ; BOXSTR:_FillValue = "" ; ...
The main Lab Sea related land regions we've been looking at recently (as shown in the slides linked BELOW) are:
"Canadian_Arctic_B": 58N-70N, 80W-60W "Greenland_A": 58N-70N, 57W-45W
Thanks Keith! seems pretty straightforward to create a python dictionary or .yaml this .nc file that can be read to subset region.
Updated link for the regional hydrology slides is here
I have something that works, but I think there's a lot of steps for this to be fully functional. Compiling a list:
- convert region defintion netCDF file to a yml, read that in instead
- increase number of variables that have a climo plotted; i've just added two, but left room for more in the subplots
- check that all varaibles have climo files; likely to break otherwise
- add option so that this works with a structured grid too
- do conversions so that climo's are being plotted with the preferred units
- add in observations (need to regrid/area weight for this to be accurate)
- need to figure out how to display the figures on the website
Is it worth opening a PR for the script as it stands now? Or better to work through at least some of these first?
Your call. You can always just open a draft PR so others can see it. Alternatively, if you think you'll be able knock off a few of these in relatively short time also OK to wait.
Closed with #386