I have some CAM-SE output that I remap to a regular grid and then save as a zarr file. Now I'd like read that zarr file, and then interpolate the Z3 geopotential height field onto the Z500 and Z200 levels. I use the interp_hybrid_to_pressure function from geocat, and it runs, but the output looks weird. I can't figure out what is going wrong here. Any thoughts?
Screenshot-2024-02-14-at-4.49.46-PM.png
The sample script is here:
glade/u/home/mberdahl/FirstLook_LIGruns/DASK_scripts/HistoricalAnalysis/TestHighRes_Z3_interp.ipynb
It looks the data for the top hybrid level might be getting assigned as a surface pressure array. Could that be the issue? Apologies if I'm missing something - still getting familiar with some of these datasets/functionality.
@Katelyn FitzGerald I think the levels are ordered from top of atmosphere, so I'm pulling the last level (lev = -1) to serve as my surface pressure array.
Is data.isel(lev=-1)
the right value for the ps
argument? I would expect that argument to be something out of the full dataset rather than values from the data array you are trying to interpolate. @Katelyn FitzGerald or @Brian Medeiros can correct me if I'm wrong, but from the documentation it looks like it should be an array of surface pressures (possibly in units of Pascals), not your data values at the surface
Similarly, I think you want to multiply new_levels
by 100 to convert from hectopascals or millibars to pascals; p0
looks to be in the right units already
Hi @Michael Levy , ok that makes more sense - I was confused about this myself. I will give that a shot and let you know if it works.
OK thanks for alerting me to this --- it works no problem now. Many thanks @Michael Levy .
Katelyn FitzGerald has marked this topic as resolved.
Mira Berdahl has marked this topic as unresolved.
After looking at some of the output from the interpolation from hybrid grid onto the 500mb level, it appears the output is still not what I expect. It contains topographic influence, which I believe ought not be there. I've double checked all my pressure field inputs are in Pa.
Here is what Z500 looks like:
Screenshot-2024-02-15-at-2.40.16-PM.png
The sample script is here:
glade/u/home/mberdahl/FirstLook_LIGruns/DASK_scripts/HistoricalAnalysis/TestHighRes_Z3_interp.ipynb
Hi @Mira Berdahl , just checking if you are using the "PS" variable from CAM as the surface pressure (ps
) input? That should contain the actual differences in surface pressure/height, and should (I think?) remove the surface signal. Of course if that still doesn't work please let me know. Thanks!
Hi @Jesse Nusbaumer , great question. It looks like I had accidentally been calling PSL instead of PS. This makes WAY more sense to me now. Thanks!
Last updated: May 16 2025 at 17:14 UTC