Closed irowebbn closed 3 years ago
I believe a NaN return will come from data not being present. I am tempted to say your namelist.input file
may not have specified close enough to the ground level, but I don't want to resolve that that is truly the case just yet. Have you tried using the z
variable in getvar
instead? We had another issue open (#124) that was having issues with interpolation using z
and a fix is using z = getvar(wrfin, "z", msl=False)
. Let me know if that fixes it or if anything changes in your output.
Let me give that a try and see what I can come up with.
I have a few 3D fields that I got from my WRF output using
wrf.getvar
, temp, rel humidity, wind speed, etc. The vertical levels are according to eta level. To get values at a given altitude in meters, I have used both thewrf.vinterp
function withght_agl
orwrf.interplevel
with theheight_agl
as the vert field, depending on what I'm trying to do.For the most part, I get what I expect from these, except for the first 25 meters above ground level (the region I am most concerned with), which are always
NaN
. If I doExtrapolate=True
, they are filed in as below-ground values, which is not the case. The terrain is very flat at the location being modelled, but just to check I interpolated with the sea level values and plotted the terrain top and there was still a 25 meter or so gap.Is there a base surface value that needs to be provided in order for interpolation to continue all the way down to the ground?
I can provide code snippets as needed but I am not sure what would be most helpful.