You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@grantfirl@dustinswales It is questioned in the code as to why the following logic even exists since cases thus far have both included "pa" and "zh". Nonetheless, things seem to be reversed and should be fixed if we intend to keep the logic.
It appears that logic for reading in pa/zh in scm_input.F90 is flip-flopped. The logical lev_in_altitude is set to "false" when the units for the variable lev are in "Pa" and set to "true" when in "m" (L1210).
Next, when reading in the actual profiles (L1512), if lev_in_altitude is "true" (lev units are in meters), there is a requirement to read in "pa", with the option to read in "zh" if it exists. It is similarly flipped for the logic that lev_in_altitude is "false".
The fix would be to change the requirement of those vars, for example:
if (lev_in_altitude) then
call NetCDF_read_var(ncid, "pa", .True., input_pres) >>> call NetCDF_read_var(ncid, "pa", .False., input_pres)
!zh could be defined in addition to lev, use if so
call NetCDF_read_var(ncid, "zh", .False., input_height) >>> call NetCDF_read_var(ncid, "zh", .True., input_height)
The text was updated successfully, but these errors were encountered:
@grantfirl @dustinswales It is questioned in the code as to why the following logic even exists since cases thus far have both included "pa" and "zh". Nonetheless, things seem to be reversed and should be fixed if we intend to keep the logic.
It appears that logic for reading in pa/zh in scm_input.F90 is flip-flopped. The logical
lev_in_altitude
is set to "false" when the units for the variablelev
are in "Pa" and set to "true" when in "m" (L1210).Next, when reading in the actual profiles (L1512), if
lev_in_altitude
is "true" (lev units are in meters), there is a requirement to read in "pa", with the option to read in "zh" if it exists. It is similarly flipped for the logic thatlev_in_altitude
is "false".The fix would be to change the requirement of those vars, for example:
The text was updated successfully, but these errors were encountered: