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

Fixes to interpolation to pressure levels #158

Merged
merged 13 commits into from
Feb 19, 2025
Merged

Fixes to interpolation to pressure levels #158

merged 13 commits into from
Feb 19, 2025

Conversation

djgagne
Copy link
Collaborator

@djgagne djgagne commented Feb 11, 2025

I made some significant revisions to the pressure level interpolation module to accommodate the issues @yingkaisha 's PR raised and to make the pressure interpolation process for geopotential and temperature consistent with CESM/ECMWF. New features:

  • surface geopotential is now passed into credit.interp.full_state_pressure_interpolation as a numpy array rather than embedded in xarray Dataset with other state variables.
  • output.py updated to reflect changed API.
  • temperature and geopotential are extrapolated below ground based on Trenberth et al. 1993.
  • mean sea level pressure reduction implemented based on Trenberth et al. 1993 and CAM fortran code. The formula adjusts the temperature and lapse rate correction based on the surface height. According to the paper you might still see some wonkiness in the Himalayas/Tibetan plateau, which would require some west-east interpolation over mountains.
  • pressure to hybrid coordinate interpolation implemented. Interpolation routine ignores levels below ground but also requires surface pressure field to do so.

@djgagne
Copy link
Collaborator Author

djgagne commented Feb 18, 2025

Everything should be ready for review now. Test passes and inference code runs on casper.

@djgagne
Copy link
Collaborator Author

djgagne commented Feb 19, 2025

I have increased confidence that the IFS postprocessing documentation is wrong about two things. Equation 3 has ps and pL flipped, as does equation 6. It also looks like the height-dependent temperature corrections are being used to extrapolate geopotential after all. My answers are now really close to those from ERA5 and are probably about as close as I can get without direct access to the FULL POS source code, which I am still working on getting. @jsschreck and @yingkaisha please look over because I want to get everything merged this afternoon.

@djgagne
Copy link
Collaborator Author

djgagne commented Feb 19, 2025

Thanks John! Merging now.

@djgagne djgagne merged commit 5d1de36 into main Feb 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants