WRF icon indicating copy to clipboard operation
WRF copied to clipboard

Incorrect equation/Bug

Open joshi994 opened this issue 1 year ago • 5 comments

Describe the bug

Module_sf_urban.f which evaluates the building wall temperature (TB) and the road temperature (TG) solving the nonlinear simultaneous equations evaluates the derivative of RB2 (net long wave fluxes absorbed by the building wall with respect to the TG. In the command/line 1303 and 1422 the surface emissivity of the road ($\epsilon_G$), EPSG, is appearing twice. However, the derivative of RB2, DRBDTG2, w.r.t TG in line/command 1313 has EPSG appearing only once. From equation A9 (or B.9 of Lusaka and Kimora, J. of Metro. Society of Japan, Vol 82 No. 1, 67-80, 2004)of the article, Kusaka & Kimora 2004, Journal of Applied Meteorology, it appears that the equation calculating RB2 is wrong.

To Reproduce Steps to reproduce the behavior: Use Single Layer Urban Canopy Model (SLUCM) and a compiler depending on the compatibility for testing.

Expected behavior After correcting the equation, the net longwave fluxes, RB2, absorbed by the building wall should increase as 0 < EPSG < 1 causing an underestimation of the fluxes.

Screenshots Please refer to the attached correct equation and the command lines in the module. Screenshot (425) Screenshot (426) Screenshot (427)

Attachments NA.

Additional context NA (the issue is consistent in all versions of WRF.

joshi994 avatar Feb 22 '24 19:02 joshi994

Might have been better as an actual PR where the difference can be seen more clearly in the review process.

dudhia avatar Feb 22 '24 20:02 dudhia

To do a PR you would need to create your own fork first. We have instructions somewhere.

dudhia avatar Feb 22 '24 20:02 dudhia

@cenlinhe Comment?

weiwangncar avatar Feb 22 '24 21:02 weiwangncar

@dudhia I will submit a pull request at my earliest. During the WRF tutorial, I was suggested to use the WRF forum but it didn't work so I submitted a new issue.

joshi994 avatar Feb 22 '24 22:02 joshi994

This is indeed a bug. I saw the user already submitted a PR for this issue: https://github.com/wrf-model/WRF/pull/2016

cenlinhe avatar Mar 06 '24 23:03 cenlinhe