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

[Feature]: Add vertical regridding #45

Closed
2 tasks
tomvothecoder opened this issue May 6, 2021 · 8 comments · Fixed by #388
Closed
2 tasks

[Feature]: Add vertical regridding #45

tomvothecoder opened this issue May 6, 2021 · 8 comments · Fixed by #388
Assignees
Labels
type: enhancement New enhancement request

Comments

@tomvothecoder
Copy link
Collaborator

tomvothecoder commented May 6, 2021

Blocked by #71

Describe the solution you'd like

Vertical regridder that can remap hybrid vertical coordinates to standard pressure levels

Acceptance criteria:

  • Remapping to z-levels
  • Add more....

Additional context

cdms has reconstructPressureFromHybrid, logLinearInterpolation, and linearInterpolation

@tomvothecoder tomvothecoder added this to the v1.0.0 milestone Jun 11, 2021
@chengzhuzhang
Copy link
Collaborator

I came across this script that we may be able to refer to..

@durack1
Copy link
Collaborator

durack1 commented Dec 24, 2021

@tomvothecoder @chengzhuzhang the xgcm code base (also xarray) could be a useful reference, see https://xgcm.readthedocs.io/en/latest/transform.html

@chengzhuzhang
Copy link
Collaborator

@durack1 Thank you for the reference.

@tomvothecoder tomvothecoder removed this from the v1.0.0 milestone Jun 21, 2022
@tomvothecoder
Copy link
Collaborator Author

tomvothecoder commented Jul 20, 2022

Meeting Notes (7/20):

Alternative solutions:

  1. Ryan Abernathey and Paul both mentioned vertical regridding is available in xgcm
  2. Jill found this script from GeoCAT: https://github.com/NCAR/geocat-comp/blob/0263d2d77ab22a6be4d1d3f16d5bfcfc68057364/src/geocat/comp/interp_hybrid_to_pressure.py
  3. CDAT's vertical regridding code: https://github.com/CDAT/cdutil/blob/master/cdutil/vertical.py

Action items:

  • Check the similarities and differences between the existing solutions
  • Check the existing solution(s) meets our requirements

@chengzhuzhang
Copy link
Collaborator

chengzhuzhang commented Jul 20, 2022

@tomvothecoder Thank you for summarizing and updating this issue. I added CDAT's vertical regridding code as a reference.

Just a note here that the GeoCAT solution actually calls the interpolate from metpy package to actually do the vertical remapping. By a brief examination, I think both solutions should meet our requirements in terms of functionality. And perhaps performance and use APIs will be two aspects we should focus on.

@chengzhuzhang
Copy link
Collaborator

@jasonb5 Hey, Jason. I spent some time to experiment with the existing vertical regridding methods. Please see the jupyter notebook here: https://github.com/xCDAT/xcdat_test/blob/main/validation/v1.0.0/vertical_interp/Vertical_interp.ipynb

Notice that only xgcm method (the third one in the notebook) is working. And I have hard time to trouble shooting the first two methods. When you have time, would you please also take a look for me. Let me know if you'd like any clarification on this. Thank you!

@jasonb5
Copy link
Collaborator

jasonb5 commented Aug 3, 2022

@chengzhuzhang Thanks, I'll give it a look over.

@chengzhuzhang
Copy link
Collaborator

Hey @jasonb5 , as discussed I added a 4th method, which is to use the cdms2/cdutil approach. The note book now is updated. https://github.com/xCDAT/xcdat_test/blob/main/validation/v1.0.0/vertical_interp/Vertical_interp.ipynb Thank you for looking over!

@tomvothecoder tomvothecoder changed the title Add vertical regridding [Feature]: Add vertical regridding Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New enhancement request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants