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

geocat.comp.meteorology.delta_pressure is different with dpres_plev #538

Closed
cccccoldrun opened this issue Jan 5, 2024 · 4 comments · Fixed by #571
Closed

geocat.comp.meteorology.delta_pressure is different with dpres_plev #538

cccccoldrun opened this issue Jan 5, 2024 · 4 comments · Fixed by #571
Assignees
Labels
bug Something isn't working support Support request opened by outside user/collaborator

Comments

@cccccoldrun
Copy link

###this is the ncl code
plev = (/ 1000.,950.,900.,850.,800.,750.,700.,650.,600.,
550.,500.,450.,400.,350.,300.,250.,200.,
175.,150.,125.,100., 80., 70., 60., 50.,
40., 30., 25., 20. /)

plev = plev*100.
plev@units = "Pa" ; Pa = kg/(m s2) (Pascal)

ptop = min(plev)

psfc = 850*100.
psfc@units = "Pa"

dp = dpres_plevel(plev, psfc, ptop, 0) ; dp(30)
print(dp)

##this is the python code:
import geocat.comp as gc
import numpy as np
plev = [ 1000.,950.,900.,850.,800.,750.,700.,650.,600.,
550.,500.,450.,400.,350.,300.,250.,200.,
175.,150.,125.,100., 80., 70., 60., 50.,
40., 30., 25., 20. ]
plev = np.array(plev)100.
ptop = min(plev)
psfc = 850
100.
dp = gc.meteorology.delta_pressure(plev, psfc)
print(dp)

but the result is different if the psfc is lower than the first value of plev
屏幕截图 2024-01-05 162143
屏幕截图 2024-01-05 162521

@cccccoldrun cccccoldrun added bug Something isn't working support Support request opened by outside user/collaborator labels Jan 5, 2024
@anissa111
Copy link
Member

Hello @cccccoldrun, thanks for submitting this bug report, someone from the geocat-comp dev team will look into this shortly!

@kafitzgerald
Copy link
Contributor

Thanks, @cccccoldrun!

I looked into this briefly and confirmed we don't account for this case (where the specified surface pressure (psfc) is less than some values of the given pressure levels (plev)).

Instead of assigning a missing/fill value like the NCL routine, gc.meteorology.delta_pressure attempts to compute those values.

It'd be good to get a fix in for this and get test coverage.

@bnepal22
Copy link

Hello @ALL I am confuse, does computing thickness between two pressure level here based on hypsometric equation or its jjust simple difference between two pressure level. As in the shared result above , the 3rd value why it is 2500 if its the difference between 85000-80000, similarly for the 16th value why its 3750 and so on. Could you kindly please clarify this. I am completely confuse.

@cccccoldrun
Copy link
Author

cccccoldrun commented Aug 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working support Support request opened by outside user/collaborator
Projects
None yet
4 participants