ADF icon indicating copy to clipboard operation
ADF copied to clipboard

Vertical interpolation should always try to use pressure (PMID) when possible

Open nusbaume opened this issue 2 years ago • 1 comments

New feature type

New regridding method or regridding enhancement

What is this new feature?

It was raised by @JulioTBacmeister that when interpolating to the default ADF pressure levels, the ADF should just try to use the model mid-level pressure (PMID) when possible, as most of the CAM dycores are now capable of outputting it as a history variable. Then only if pressure is unavailable should it try to use alternative methods (e.g. converting hybrid or height coordinates to pressure levels).

Before this is done, however, the ADF should modify it's current handling of PMID such that it is only output once, instead of for every 3-D variable.

Assistance required?

No, I will make a PR when the feature is ready

Extra info

Implementing this feature might also benefit from having the ADF determine what the vertical coordinate of the model data is near the start of the ADF run itself (such as in the upcoming AdfInfo class initialization).

nusbaume avatar Jul 14 '22 20:07 nusbaume

I'm going to add on to this issue slightly based on input from the AMWG dev group in this issue: https://github.com/NCAR/amwg_dev/issues/211

For models that have higher tops than the default pressure levels we're using in ADF, we should provide an option to either: (a) use user-specified pressure levels for the interpolation or (b) try to use the model's hybrid coefficients (or similar) to define levels.

In either case, those values would be passed as the kwarg new_levels to either pmid_to_plev or lev_to_plev from the regridding script (e.g., regrid_and_vert_interp.py).

When PMID is available, maybe we'd have to do a global average to get levels? For hybrid, we could use Adam's suggestion of P0*hyam + P0*hybm as a rough guide. In the case of hybrid-sigma levels, there's a point (around 90hPa) where the levels become pure pressure levels, so maybe we could instead construct the average pressure field P0*hyam + PS*hybm and do a global average; that would provide the actually correct pressure levels above the cutoff, and would be appropriate for log(p) plots, I think.

brianpm avatar Jan 19 '23 22:01 brianpm