Closed cccccoldrun closed 7 months ago
Hello @cccccoldrun, thanks for submitting this bug report, someone from the geocat-comp dev team will look into this shortly!
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.
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.
Actually, if you have seen the code about the function,the top and bottom is different from the mid layers. 3750 is (25000-17500)/2 bottom:2500 is 850000(surface pressure)-(85000+80000)/2 top:250 (2500+2000)/2-2000(top pressure)
From: bnepal22 @.> Sent: Tuesday, July 30, 2024 2:35:33 PM To: NCAR/geocat-comp @.> Cc: cccccoldrun @.>; Mention @.> Subject: Re: [NCAR/geocat-comp] geocat.comp.meteorology.delta_pressure is different with dpres_plev (Issue #538)
Hello @ALLhttps://github.com/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.
— Reply to this email directly, view it on GitHubhttps://github.com/NCAR/geocat-comp/issues/538#issuecomment-2257575928, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXOR3YTRDFO6GZYA2RD2FUTZO4X3LAVCNFSM6AAAAABBOCTHKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJXGU3TKOJSHA. You are receiving this because you were mentioned.Message ID: @.***>
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 = 850100.
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