Skip to content
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

Enable regional subsetting #368

Open
3 tasks
wwieder opened this issue Apr 6, 2025 · 5 comments
Open
3 tasks

Enable regional subsetting #368

wwieder opened this issue Apr 6, 2025 · 5 comments
Labels
enhancement New feature or request high priority This needs to be done ASAP LDF Specific request for land diagnostics

Comments

@wwieder
Copy link
Collaborator

wwieder commented Apr 6, 2025

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_multicase examples in ADF
    • see also this notebook, cell 22 for a uxarray example.
  • Develop web interface for displaying results (again maybe build on region_multicase?)
@wwieder wwieder added enhancement New feature or request high priority This needs to be done ASAP LDF Specific request for land diagnostics labels Apr 6, 2025
@wwieder wwieder moved this to Todo in LDF on ADF Apr 6, 2025
@wwieder
Copy link
Collaborator Author

wwieder commented Apr 9, 2025

Another helpful example of regional hydrology from @olyson is on these slides

@olyson
Copy link

olyson commented Apr 9, 2025

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

@wwieder
Copy link
Collaborator Author

wwieder commented Apr 9, 2025

Thanks Keith! seems pretty straightforward to create a python dictionary or .yaml this .nc file that can be read to subset region.

@olyson
Copy link

olyson commented Apr 9, 2025

Updated link for the regional hydrology slides is here

@megandevlan
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority This needs to be done ASAP LDF Specific request for land diagnostics
Projects
Status: Todo
Development

No branches or pull requests

3 participants