WRF icon indicating copy to clipboard operation
WRF copied to clipboard

Stability function correction for momentum in mos subroutine of SLUCM.

Open joshi994 opened this issue 10 months ago • 2 comments

The first line should be a single-line "purpose" for this change

TYPE: Bug fix

KEYWORDS: Stability function, stability parameter, mos subroutine, Monin-Obukhov similarity theory, Urban canopy model, surface energy balance, Green roof temperature.

SOURCE: Parag Joshi (Brookhaven National Laboratory), Katia Lamer (Brookhaven National Laboratory)

DESCRIPTION OF CHANGES: Problem: The calculations for PSIM in the mos subroutine of module-sf_urban.F has been corrected. The earlier equations has a typo where X (= (1-16\zeta)^1/4) is mentioned instead of X0. In addition, following the formulation of surface energy balance of OSU1DPBL scheme by Ek and Mahrt 1991, it appears that when the following definition is used $\sigma * \theta_s^4 = \sigma T_0^4 (1 + 4((\theta_s - T_0)/T_0)))$ is used, the temperature in the calculations of net flux at the surface should use T_0 (temperature at first atmospheric level). However, in the module TGRP (temperature of the green roof surface at previous time step is used)is used instead of T_0 (please refer to the attached screenshots of the formulation).

Also I am not sure why the term (\theta_0 - T_0) is neglected in the definition of YY (Line/command 1145 WRFv-4.5.2) whereas the equation for the $\theta_s$ in attached screenshot shows the term. Due to insignficant impact?

Solution: Following the formulation, the temperature variable has been updated according. Moreover, the mos subroutine is also corrected by replacing X by X0 where X0 is =X*z0/(z+z0) (as per the WRF/phys/module_sf_urban.F).

ISSUE: For use when this PR closes an issue. Fixes #123

LIST OF MODIFIED FILES: module_sf_urban.F

TESTS CONDUCTED:

  1. A test case could be run to compare the impact of changes in the TGR and stability parameter value as well as CD, US, and ALPHA.

For more details, refer to the pages # 47-50 of the document link in the release note.

RELEASE NOTE: The surface energy balance for the green roof is modified following the OSU1DPBL scheme. The document can be located at:
[https://ftp.emc.ncep.noaa.gov/mmb/gcp/ldas/nceplsm/OSU1DPBL/OSU1DPBL-userguide.pdf]

Screenshot 2024-04-17 at 2 20 50 PM Screenshot 2024-04-17 at 2 38 26 PM ]

joshi994 avatar Apr 17 '24 18:04 joshi994

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

weiwangncar avatar Apr 17 '24 19:04 weiwangncar

I am also bringing @barlage here just in case he has any insights on this problem.

cenlinhe avatar Apr 29 '24 17:04 cenlinhe

@cenlinhe @barlage Can you confirm this PR is correct and approve it?

weiwangncar avatar Aug 06 '24 08:08 weiwangncar

I'll defer to @cenlinhe. I don't have any history with this.

barlage avatar Aug 06 '24 13:08 barlage

I will review the recent discussion one more time. In the meantime, @chenghaow @xuelingbo @doan-van please take a look at this PR discussion and let me know what you think.

cenlinhe avatar Aug 06 '24 14:08 cenlinhe

RGR = EPSV*(RX-SIG*(TA**4.)/60.)

I just went through this thread and agree that this is the correct equation. I also suggest adding a comment here that TA is used because of the linearization to avoid potential future confusion.

chenghaow avatar Aug 06 '24 17:08 chenghaow

I am also agree with this correction.

xuelingbo avatar Aug 07 '24 13:08 xuelingbo

I approve this.

cenlinhe avatar Aug 19 '24 19:08 cenlinhe

@cenlinhe @chenghaow @xuelingbo Anyone wants to address Josh's comment in the PR: "Also I am not sure why the term (\theta_0 - T_0) is neglected in the definition of YY (Line/command 1145 WRFv-4.5.2) whereas the equation for the $\theta_s$ in attached screenshot shows the term. Due to insignificant impact?"

weiwangncar avatar Aug 20 '24 05:08 weiwangncar