Description
When running the single-layer UCM with NUDAPT data, the phys/module_sf_noahdrv.F file currently uses the following statements to determine whether to print information of urban parameters or not from module_sf_urban.F:
! NUDAPT for SLUCM
mh_urb = mh_urb2d(I,J)
stdh_urb = stdh_urb2d(I,J)
lp_urb = lp_urb2d(I,J)
hgt_urb = hgt_urb2d(I,J)
lf_urb = 0.0
DO K = 1,4
lf_urb(K)=lf_urb2d(I,K,J)
ENDDO
frc_urb = frc_urb2d(I,J)
lb_urb = lb_urb2d(I,J)
check = 0
if (I.eq.73.and.J.eq.125)THEN
check = 1
end if
This if (I.eq.73.and.J.eq.125)THEN
seems to be a legacy hard-coded statement for inspection using a specific domain configuration, which will not work for different domains. This might need to be removed. NoahmpUrbanDriverMainMod.F in HRLDAS also uses this statement.
Activity
cenlinhe commentedon Aug 1, 2024
I think you are right. This is likely a legacy. My guess is that this code is trying to print out the NUDAPT data to make sure they are read in correctly but do not want to print out the NUDAPT parameter values for the entire domain. So here it selects an arbitrary point for the printing purpose. I think if we remove this here, we could just set the check=0 so that it will not print out the variables for the entire domain which is too much. I also cc'ed @xuelingbo @doan-van , just in case they have any other thoughts based on their SLUCM modeling experience.
xuelingbo commentedon Aug 7, 2024
I agree with @cenlinhe that we can remove the conditional statements and keep the
check = 0
, so that it will not print out messages when wecall urban
. However, this may be inconvenient for debugging or user verification of key values. So a more refined approach would be to follow what we did inurban_var_init
(https://github.com/wrf-model/WRF/blob/0a11865f97680fdd6865b278ea29d910e5db3ed7/phys/module_sf_urban.F#L2994C7-L3046C14):Move
check
intosubroutine URBAN
to be a local variable and set to be 0, and then print the message once by change the value ofcheck
to be 1 after print.