From 94ad1e48d82b0c240b1c3a7289165ea86c5ac47a Mon Sep 17 00:00:00 2001 From: joshi994 <160153650+joshi994@users.noreply.github.com> Date: Fri, 15 Mar 2024 13:54:11 -0400 Subject: [PATCH 01/12] The net longwave flux absorbed by the building wall, RB2, in module_sf_urban.F is underestimating the value by a factor of emissivty of the wall, EPSG, as it is multiplied twice. I corrected the equation in the aforementioned module. (#2016) TYPE: Bug fix KEYWORDS: Longwave flux, radiation/energy balance, Surface temperature, Urban climate, SLUCM SOURCE: Parag Joshi (Brookhaven National Lab), Katia Lamer (Brookhaven National Lab) DESCRIPTION OF CHANGES: Problem: The net long wave fluxes absorbed by the building walls is being underestimated due to multiplication of the emissivity twice in the equation. The command/lines that evaluate RB2 in the module_sf_urban.F (Lines 1300 and 1419 of WRF version-4.5.2) reflect the net long wave fluxes absorbed by building walls. Solution: The code has been corrected by referring to the equation A9 of in the article, Kusaka & Kimora 2004, Journal of Applied Meteorology. ISSUE: For use when this PR closes an issue. Fixes #2011 LIST OF MODIFIED FILES: M module_sf_urban.F TESTS CONDUCTED: 1. Tests were conducted by the LSM group at NCAR/RAL. 2. It passed Jenkins tests. RELEASE NOTE: Correcting the net long wave fluxes for application in modeling urban climate using Single Layer Urban Canopy Model (SLUCM). It slightly improved 2-m temperature in urban area. --- phys/module_sf_urban.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phys/module_sf_urban.F b/phys/module_sf_urban.F index a4b78c5c86..f42a5bb805 100644 --- a/phys/module_sf_urban.F +++ b/phys/module_sf_urban.F @@ -1297,7 +1297,7 @@ SUBROUTINE urban(LSOLAR, & ! L RB2=EPSB*( (1.-EPSG)*VFWG*VFGS*RX & +(1.-EPSG)*EPSB*VFGW*VFWG*SIG*(TBP**4.)/60. & +(1.-EPSB)*VFWS*(1.-2.*VFWS)*RX & - +(1.-EPSB)*VFWG*(1.-2.*VFWS)*EPSG*SIG*EPSG*TGP**4./60. & + +(1.-EPSB)*VFWG*(1.-2.*VFWS)*SIG*EPSG*TGP**4./60. & +EPSB*(1.-EPSB)*(1.-2.*VFWS)*(1.-2.*VFWS)*SIG*TBP**4./60. ) RG=RG1+RG2 @@ -1416,7 +1416,7 @@ SUBROUTINE urban(LSOLAR, & ! L RB2=EPSB*( (1.-EPSG)*VFWG*VFGS*RX & +(1.-EPSG)*EPSB*VFGW*VFWG*SIG*(TBP**4.)/60. & +(1.-EPSB)*VFWS*(1.-2.*VFWS)*RX & - +(1.-EPSB)*VFWG*(1.-2.*VFWS)*EPSG*SIG*EPSG*TGP**4./60. & + +(1.-EPSB)*VFWG*(1.-2.*VFWS)*SIG*EPSG*TGP**4./60. & +EPSB*(1.-EPSB)*(1.-2.*VFWS)*(1.-2.*VFWS)*SIG*TBP**4./60. ) RG=RG1+RG2 From 7c5f7c7d87720449d5a0611ba0431e18fe0e93c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Fita?= <96058724+LluisFB@users.noreply.github.com> Date: Thu, 10 Apr 2025 19:25:26 -0300 Subject: [PATCH 02/12] Fix for a do loop index in bep_bem urban code (#2196) TYPE: bug fix KEYWORDS: module_sf_bep_bem.F, loop index, debugging-crash SOURCE: L. Fita (UBA/CIMA/IFAECI) DESCRIPTION OF CHANGES: Problem: The loop index in line 1600 of subroutine module_sf_bep_bem.F should be up to `nzu`, instead of `nz_um`. Solution: This PR fixes the index. ISSUE: For use when this PR closes an issue. Fixes #2194 LIST OF MODIFIED FILES: M phys/module_sf_bep_bem.F TESTS CONDUCTED: 1. Code was modified and recompiled in serial debug mode and it did not crashed 2. The Jenkins tests are all passing. RELEASE NOTE: This PR fixed a loop index error in bep_bem urban code. --- phys/module_sf_bep_bem.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phys/module_sf_bep_bem.F b/phys/module_sf_bep_bem.F index f249700a08..656fa1bc90 100644 --- a/phys/module_sf_bep_bem.F +++ b/phys/module_sf_bep_bem.F @@ -1597,7 +1597,7 @@ subroutine BEP1D(itimestep,ix,iy,iurb,kms,kme,kts,kte,z,dt,ua,va,pt,da,pr,pt0, - do iz=1,nz_um !Compute the outdoor temperature + do iz=1,nzu !Compute the outdoor temperature tmp_u(iz)=pt_u(iz)*(pr_u(iz)/p0)**(rcp_u) end do From 39ea5f01b9705a3ee1fdd98a5b2a3c65117f4853 Mon Sep 17 00:00:00 2001 From: Cenlin_He Date: Tue, 23 Jan 2024 11:32:59 -0700 Subject: [PATCH 03/12] Update urban LCZ parameter table with more reasonable values (#1969) TYPE: enhancement KEYWORDS: urban, parameter SOURCE: Reported by Benjamin Fersch (Karlsruhe Institute of Technology, Germany), fixed by Alberto Martilli (CIEMAT, Spain) DESCRIPTION OF CHANGES: Problem: Current urban LCZ parameter table includes some unreasonable values for urban morphology (e.g., too large road width) and thermal properties (e.g., CAPR, CAPB, CAPG, AKSR, AKPB, AKPG). The LCZ classification is mainly a classification based on morphology, rather than thermal properties, so it should use the same thermal properties for different LCZs unless users have specific information from other local data sources. Solution: Use morphological parameters correspond to mid-range values of Stewart and Oke 2012, and all the LCZ classes have the same thermal properties. ISSUE: [For use when this PR closes an issue.](https://github.com/wrf-model/WRF/issues/1954) LIST OF MODIFIED FILES: URBPARM_LCZ.TBL TESTS CONDUCTED: 1. The mods fix the problem. 2. It passed regression tests. RELEASE NOTE: Update urban LCZ parameter table (URBPARM_LCZ.TBL) with more reasonable values. --- run/URBPARM_LCZ.TBL | 96 +++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/run/URBPARM_LCZ.TBL b/run/URBPARM_LCZ.TBL index 80e6809c17..450d765f9d 100644 --- a/run/URBPARM_LCZ.TBL +++ b/run/URBPARM_LCZ.TBL @@ -32,21 +32,21 @@ SIGMA_ZED: 4.0, 3.0, 1.0, 1., 1., 1., 1., 1., 1., 1., 1. # ROOF_WIDTH: Roof (i.e., building) width [ m ] # (sf_urban_physics=1) -ROOF_WIDTH: 31.7, 25.7, 17.6, 17.6, 17.6, 17.6, 17.6, 17.6, 17.6, 17.6, 10. +ROOF_WIDTH: 22.2, 22., 9.6, 42.86, 26.25, 13., 25., 28.9, 43.33, 23.8, 5. # # ROAD_WIDTH: road width [ m ] # (sf_urban_physics=1) # -ROAD_WIDTH: 98.9, 39.2, 108.0, 108.0, 108.0, 108.0, 108.0, 108.0, 108.0, 108.0, 108.0 +ROAD_WIDTH: 20., 14., 5.2, 50.0, 35.0, 13.0, 3.33, 32.5, 43.3, 28.6, 100.0 # # AH: Anthropogenic heat [ W m{-2} ] # (sf_urban_physics=1) # -AH: 100.0, 35.0, 30.0, 30.0, 15.0, 10.0, 30.0, 40.0, 5.0, 300.0, 0 +AH: 175.0, 37.5, 37.5, 25.0, 12.5, 12.5, 17.5, 25.0, 5.0, 350.0, 350.0 # @@ -54,7 +54,7 @@ AH: 100.0, 35.0, 30.0, 30.0, 15.0, 10.0, 30.0, 40.0, 5.0, 300.0, 0 # (sf_urban_physics=1) # -ALH: 20.0, 25.0, 40.0, 20.0, 25.0, 40.0, 20.0, 25.0, 40.0, 20.0, 0 +ALH: 20.0, 25.0, 40.0,20.0, 25.0, 40.0,20.0, 25.0, 40.0,20.0, 25.0 # # AKANDA_URBAN: Coefficient modifying the Kanda approach to computing @@ -232,90 +232,92 @@ DZGR: 0.05 0.10 0.15 0.20 # (sf_urban_physics=1,2,3) # -FRC_URB: 1.00, 0.99, 1.00, 0.65, 0.7, 0.65, 0.3, 0.85, 0.3, 0.55, 1.00 +FRC_URB: 0.95, 0.9,0.85, 0.65, 0.7, 0.6, 0.85, 0.85, 0.3, 0.55, 1.00 + # # CAPR: Heat capacity of roof [ J m{-3} K{-1} ] # (sf_urban_physics=1,2,3) # -CAPR: 1.8E6, 1.8E6, 1.44E6, 1.8E6, 1.8E6, 1.44E6, 2.0E6, 1.8E6, 1.44E6, 2.0E6, 1.8E6 +CAPR: 1.32E6,1.32E6,1.32E6, 1.32E6, 1.32E6, 1.32E6, 1.32E6, 1.32E6, 1.32E6, 1.32E6, 1.32E6 # # CAPB: Heat capacity of building wall [ J m{-3} K{-1} ] # (sf_urban_physics=1,2,3) # -CAPB: 1.8E6, 2.67E6, 2.05E6, 2.0E6, 2.0E6, 2.05E6, 0.72E6, 1.8E6, 2.56E6, 1.69E6, 1.8E6 +CAPB: 1.54E6,1.54E6,1.54E6, 1.54E6, 1.54E6, 1.54E6, 1.54E6, 1.54E6, 1.54E6, 1.54E6, 1.54E6 # # CAPG: Heat capacity of ground (road) [ J m{-3} K{-1} ] # (sf_urban_physics=1,2,3) # -CAPG: 1.75E6, 1.68E6, 1.63E6, 1.54E6, 1.50E6, 1.47E6, 1.67E6, 1.38E6, 1.37E6, 1.49E6, 1.38E6 +CAPG: 1.74E6,1.74E6,1.74E6, 1.74E6, 1.74E6, 1.74E6, 1.74E6, 1.74E6, 1.74E6, 1.74E6, 1.74E6 # # AKSR: Thermal conductivity of roof [ J m{-1} s{-1} K{-1} ] # (sf_urban_physics=1,2,3) # -AKSR: 1.25, 1.25, 1.00, 1.25, 1.25, 1.00, 2.0, 1.25, 1.00, 2.00, 1.25 +AKSR: 1.54,1.54,1.54, 1.54, 1.54, 1.54, 1.54, 1.54, 1.54, 1.54, 1.54 # # AKSB: Thermal conductivity of building wall [ J m{-1} s{-1} K{-1} ] # (sf_urban_physics=1,2,3) # -AKSB: 1.09, 1.5, 1.25, 1.45, 1.45, 1.25, 0.5, 1.25, 1.00, 1.33, 1.25 +AKSB: 1.51,1.51,1.51, 1.51, 1.51, 1.51,1.51,1.51,1.51, 1.51, 1.51 # # AKSG: Thermal conductivity of ground (road) [ J m{-1} s{-1} K{-1} ] # (sf_urban_physics=1,2,3) # -AKSG: 0.77, 0.73, 0.69, 0.64, 0.62, 0.60, 0.72, 0.51, 0.55, 0.61, 0.51 +AKSG: 0.82, 0.82, 0.82, 0.82, 0.82, 0.82, 0.82, 0.82, 0.82, 0.82, 0.82 # # ALBR: Surface albedo of roof [ fraction ] # (sf_urban_physics=1,2,3) # -ALBR: 0.13, 0.18, 0.15, 0.13, 0.13, 0.13, 0.15, 0.18, 0.13, 0.10, 0.13 +ALBR: 0.30, 0.30 0.30, 0.30, 0.30, 0.30, 0.30, 0.30, 0.30, 0.30, 0.30 + # # ALBB: Surface albedo of building wall [ fraction ] # (sf_urban_physics=1,2,3) # -ALBB: 0.25, 0.20, 0.20, 0.25, 0.25, 0.25, 0.20, 0.25, 0.25, 0.20, 0.20 +ALBB: 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3 # # ALBG: Surface albedo of ground (road) [ fraction ] # (sf_urban_physics=1,2,3) # -ALBG: 0.14, 0.14, 0.14, 0.14, 0.14, 0.14, 0.18, 0.14, 0.14, 0.14, 0.14 +ALBG: 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08 # # EPSR: Surface emissivity of roof [ - ] # (sf_urban_physics=1,2,3) # -EPSR: 0.91, 0.91, 0.91, 0.91, 0.91, 0.91, 0.28, 0.91, 0.91, 0.91, 0.95 +EPSR: 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90 # # EPSB: Surface emissivity of building wall [-] # (sf_urban_physics=1,2,3) # -EPSB: 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.95 +EPSB: 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90, 0.90 # # EPSG: Surface emissivity of ground (road) [ - ] # (sf_urban_physics=1,2,3) # -EPSG: 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.92, 0.95, 0.95, 0.95, 0.95 +EPSG: 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95, 0.95 # # Z0B: Roughness length for momentum, over building wall [ m ] @@ -348,14 +350,14 @@ Z0R: 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01 # (sf_urban_physics=1,2,3) # -TRLEND: 299.00, 299.00, 299.00, 299.00, 299.00, 299.00, 299.00, 299.00, 299.00, 299.00, 299.00 +TRLEND: 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00 # # TBLEND: Lower boundary temperature for building wall temperature [ K ] # (sf_urban_physics=1,2,3) # -TBLEND: 299.00, 299.00, 299.00, 299.00, 299.00, 299.00, 299.00, 299.00, 299.00, 299.00, 299.00 +TBLEND: 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00 # # TGLEND: Lower boundary temperature for ground (road) temperature [ K ] @@ -368,7 +370,7 @@ TGLEND: 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, 293.00, # (sf_urban_physics=3) # -COP: 3.5, 3.5, 3.5, 3.5, 3.5, 3.5, 3.5, 3.5, 3.5, 3.5, 3.5 +COP: 4., 4., 4., 4., 4., 4., 4., 4., 4., 4., 4. # # BLDAC_FRC: fraction of buildings installed with A/C systems [ - ] # (sf_urban_physics=3) @@ -388,7 +390,7 @@ COOLED_FRC: 1.0, 1.0, 1.0,1.0, 1.0, 1.0,1.0, 1.0, 1.0,1.0, 1.0 # (sf_urban_physics=3) # -PWIN: 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.9, 0.2, 0.2, 0.2, 0.0 +PWIN: 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.0 # # BETA: Thermal efficiency of heat exchanger @@ -450,7 +452,7 @@ GAPHUM: 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0.005, 0. # (sf_urban_physics=3) # -PERFLO: 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.00 +PERFLO: 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.00 # @@ -465,7 +467,7 @@ HSEQUIP: 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.5 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 # (sf_urban_physics=3) # -HSEQUIP_SCALE_FACTOR: 36.00, 20.00, 20.00, 36.00, 20.00, 20.00, 20.00, 36.00, 20.00, 20.00, 20.00 +HSEQUIP_SCALE_FACTOR: 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00, 20.00 # @@ -480,7 +482,7 @@ GR_FLAG:0 # (sf_urban_physics=3) # -GR_TYPE: 2 +GR_TYPE: 1 # # GR_FRAC_ROOF: fraction of green roof over the roof (0:1) @@ -502,8 +504,9 @@ IRHO:0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1 # (sf_urban_physics=3) # -PV_FRAC_ROOF: 0,0,0,0,0,0,0,0,0,0,0 +PV_FRAC_ROOF: 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0. +# STREET PARAMETERS: @@ -513,26 +516,26 @@ STREET PARAMETERS: # category direction width width # [index] [deg from N] [m] [m] - 1 0.0 15. 12. - 1 90.0 15. 12. - 2 0.0 10. 20. - 2 90.0 10. 20. - 3 0.0 5.7 9. - 3 90.0 5.7 9. - 4 0.0 30.0 20. - 4 90.0 30.0 20. - 5 0.0 20.0 20. - 5 90.0 20.0 20. - 6 0.0 12.4 10.5 - 6 90.0 12.4 10.5 - 7 0.0 10. 20. - 7 90.0 10. 20. - 8 0.0 32.5 28.8 - 8 90.0 32.5 28.8 - 9 0.0 10. 10. - 9 90.0 10. 10. - 10 0.0 28.5 23.8 - 10 90.0 28.5 23.8 + 1 0.0 20. 22.22 + 1 90.0 20. 22.22 + 2 0.0 14. 22. + 2 90.0 14. 22. + 3 0.0 5.2 9.6 + 3 90.0 5.2 9.6 + 4 0.0 50.0 42.86 + 4 90.0 50.0 42.86 + 5 0.0 35.0 26.25 + 5 90.0 35.0 26.25 + 6 0.0 13.0 13. + 6 90.0 13.0 13. + 7 0.0 3.33 25. + 7 90.0 3.33 25. + 8 0.0 32.5 28.9 + 8 90.0 32.5 28.9 + 9 0.0 43.3 43.33 + 9 90.0 43.3 43.33 + 10 0.0 28.6 23.8 + 10 90.0 28.6 23.8 11 0.0 100. 5. 11 90.0 100. 5. @@ -639,7 +642,6 @@ BUILDING HEIGHTS: 11 # height Percentage # [m] [%] - 5.0 100.0 + 5.0 100.0 END BUILDING HEIGHTS - From 68267944e39b484a8f215e2a20ce98abb16db545 Mon Sep 17 00:00:00 2001 From: Cenlin_He Date: Wed, 24 Jan 2024 11:14:12 -0700 Subject: [PATCH 04/12] Update WRF develop with bug fix for LAI initialization for urban pxiel in Noah-MP (#1990) TYPE: bug fix KEYWORDS: LAI, urban, Noah-MP SOURCE: Cenlin He (NCAR/RAL) DESCRIPTION OF CHANGES: Problem: Before bug fix, Noah-MP (v4.5 and earlier versions) initializes leaf mass from the table parameter based on land type. However, this causes model crash if the LCZ capability is activated for urban pixel, because the LCZ land type index (51-61) is out of the MODIS or USGS land type number. This code is in module_sf_noahmpdrv.F file. Solution: Add an if-statement to assign default natural vegetation type for urban pixels with large land type index to represent rural portion of the urban pixel. This is related to a reported Noah-MP issue (NCAR/noahmp#104). LIST OF MODIFIED FILES: phys/noahmp/drivers/wrf/module_sf_noahmpdrv.F TESTS CONDUCTED: - The mods fix the problem - It passed the regression tests. RELEASE NOTE: This PR fixed a bug in Noah-MP for uninitialized leaf area index when LCZ is used. --- phys/noahmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phys/noahmp b/phys/noahmp index e348cac8f1..4c5576356e 160000 --- a/phys/noahmp +++ b/phys/noahmp @@ -1 +1 @@ -Subproject commit e348cac8f1949f88cd122dcf9c3a84bd3f3b0451 +Subproject commit 4c5576356ebe4946a66b4ef7f93ab1b635547366 From 9e8acb16a91fa711c8a35652c3cba4d44cb4f060 Mon Sep 17 00:00:00 2001 From: Cenlin_He Date: Fri, 12 Jan 2024 18:21:49 -0700 Subject: [PATCH 05/12] Bug fix for Noah-MP vegetation and urban (NCAR/noahmp#91, NCAR/noahmp#92) TYPE: bug fix KEYWORDS: Noah-MP, vegetation fraction scaling SOURCE: Cenlin He (NCAR/RAL) DESCRIPTION OF CHANGES: A bug fix for Noah-MP related processes: There is a bug in vegetation fraction (FVEG) scaling for stomata resistance calculation (https://github.com/NCAR/noahmp/issues/92) and canopy interception calculation (https://github.com/NCAR/noahmp/issues/91). LIST OF MODIFIED FILES: list of changed files (use `git diff --name-status master` to get formatted list): phys/noahmp/src/module_sf_noahmplsm.F TESTS CONDUCTED: 1. Tested successfully in NCAR Cheyenne HPC for 13-km run over the entire CONUS region 2. The Jenkins tests are all passing. RELEASE NOTE: Noah-MP bug fix for vegetation fraction scaling. --- phys/noahmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phys/noahmp b/phys/noahmp index 4c5576356e..d26d2b7434 160000 --- a/phys/noahmp +++ b/phys/noahmp @@ -1 +1 @@ -Subproject commit 4c5576356ebe4946a66b4ef7f93ab1b635547366 +Subproject commit d26d2b74341f85537ed76b96adb930950b5dcc65 From 565c18606d7f8026d17b14c87b9656e38bfc43cb Mon Sep 17 00:00:00 2001 From: David Robertson Date: Fri, 12 Jan 2024 21:53:21 -0500 Subject: [PATCH 06/12] Remove arbitrary limiting of heat fluxes (#1924) TYPE: bug fix KEYWORDS: surface layer, latent heat flux limit SOURCE: David Robertson, Rutgers University DESCRIPTION OF CHANGES: Problem: Arbitrary limitation in the computation of QFX and HFX in modules module_sf_sfclay.F and module_sf_sfclayrev.F that affects the computation latent heat fluxes and sensible heat flux in coastal areas that limit fog layers. Solution: The zero downward latent heat flux limit is removed. LIST OF MODIFIED FILES: M phys/module_sf_sfclay.F M phys/module_sf_sfclayrev.F TESTS CONDUCTED: - Ran the coupled WRF-ROMS standard test case for Hurricane Irene. - It passed regression tests. RELEASE NOTE: This PR removed zero negative latent heat flux limit (atmosphere to water) in the revised MM5 and original MM5 surface layer schemes. --- phys/module_sf_sfclay.F | 4 ++-- phys/module_sf_sfclayrev.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phys/module_sf_sfclay.F b/phys/module_sf_sfclay.F index 2b3ba578f0..8cdaaa158c 100644 --- a/phys/module_sf_sfclay.F +++ b/phys/module_sf_sfclay.F @@ -892,7 +892,7 @@ SUBROUTINE SFCLAY1D(J,UX,VX,T1D,QV1D,P1D,dz8w1d, & ! DO 370 I=its,ite QFX(I)=FLQC(I)*(QSFC(I)-QX(I)) - QFX(I)=AMAX1(QFX(I),0.) +! QFX(I)=AMAX1(QFX(I),0.) LH(I)=XLV*QFX(I) 370 CONTINUE @@ -910,7 +910,7 @@ SUBROUTINE SFCLAY1D(J,UX,VX,T1D,QV1D,P1D,dz8w1d, & ! ENDIF ELSEIF(XLAND(I)-1.5.LT.0.)THEN HFX(I)=FLHC(I)*(THGB(I)-THX(I)) - HFX(I)=AMAX1(HFX(I),-250.) +! HFX(I)=AMAX1(HFX(I),-250.) ENDIF 400 CONTINUE diff --git a/phys/module_sf_sfclayrev.F b/phys/module_sf_sfclayrev.F index 9f65730122..2a3ca5a01d 100644 --- a/phys/module_sf_sfclayrev.F +++ b/phys/module_sf_sfclayrev.F @@ -1041,7 +1041,7 @@ SUBROUTINE SFCLAYREV1D(J,UX,VX,T1D,QV1D,P1D,dz8w1d, & DO 370 I=its,ite QFX(I)=FLQC(I)*(QSFC(I)-QX(I)) - QFX(I)=AMAX1(QFX(I),0.) +! QFX(I)=AMAX1(QFX(I),0.) LH(I)=XLV*QFX(I) 370 CONTINUE @@ -1059,7 +1059,7 @@ SUBROUTINE SFCLAYREV1D(J,UX,VX,T1D,QV1D,P1D,dz8w1d, & ! ENDIF ELSEIF(XLAND(I)-1.5.LT.0.)THEN HFX(I)=FLHC(I)*(THGB(I)-THX(I)) - HFX(I)=AMAX1(HFX(I),-250.) +! HFX(I)=AMAX1(HFX(I),-250.) ENDIF 400 CONTINUE From fc22ac2a7ee5daf1dcf4c650288925c16fa5c8b6 Mon Sep 17 00:00:00 2001 From: Lluis Fita Borrell Date: Mon, 24 Feb 2025 14:16:46 -0300 Subject: [PATCH 07/12] Fixing issue #2039 focing the reading of urbfrac from 'URBPARM_LCZ.TBL' --- dyn_em/module_initialize_real.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dyn_em/module_initialize_real.F b/dyn_em/module_initialize_real.F index 96629232bf..e8d5c8ea19 100644 --- a/dyn_em/module_initialize_real.F +++ b/dyn_em/module_initialize_real.F @@ -3101,7 +3101,7 @@ SUBROUTINE init_domain_rk ( grid & ENDIF IF ( grid%FRC_URB2D(i,j) == 0. ) THEN - IF ( (MMINLU == 'NLCD40' .OR. MMINLU == 'MODIFIED_IGBP_MODIS_NOAH') .AND. & + IF ( (MMINLU == 'NLCD40') .AND. & (grid%ivgtyp(i,j)==24 .OR. grid%ivgtyp(i,j)==25 .OR. grid%ivgtyp(i,j)==26 .OR. grid%ivgtyp(i,j)==13) ) grid%FRC_URB2D(i,j) = 0.9 IF ( MMINLU == 'USGS' .AND. grid%ivgtyp(i,j)==1 ) grid%FRC_URB2D(i,j) = 0.9 ENDIF From d826f5010c7f5b1bda894d04856389ac855c70aa Mon Sep 17 00:00:00 2001 From: Lukas Pilz Date: Fri, 17 Jan 2025 02:05:13 +0100 Subject: [PATCH 08/12] Bug fix for overwriting of LCZ urban cells in LU_INDEX with default USGS urban category. (#2153) TYPE: bug fix KEYWORDS: LCZ, USGS SOURCE: Lukas Pilz (Heidelberg University) DESCRIPTION OF CHANGES: Problem: As shown in #2152, for USGS data the wrfinput LU_INDEX field has major differences to the met_em LU_INDEX field. Cells in LU_INDEX which have LCZ categories (>30) were overwritten with the default USGS urban category (1) where FRC_URB2D > 0.5. Solution: Add a check similar to the MODIS case above. ISSUE: Fixes #2152 LIST OF MODIFIED FILES: M dyn_em/module_initialize_real.F TESTS CONDUCTED: 1. Did local tests, the only differences between wrfinput and met_em which remain are changing LU_INDEX 28 to 16, which is a water body redesignation as to my knowledge. 2. Jenkins tests have passed. RELEASE NOTE: Bug fix for wrfinput where LCZ urban cells in LU_INDEX were overwritten with default USGS urban category. --- dyn_em/module_initialize_real.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dyn_em/module_initialize_real.F b/dyn_em/module_initialize_real.F index e8d5c8ea19..bb23fbaca0 100644 --- a/dyn_em/module_initialize_real.F +++ b/dyn_em/module_initialize_real.F @@ -3097,7 +3097,7 @@ SUBROUTINE init_domain_rk ( grid & (grid%ivgtyp(i,j).NE.13 .AND. grid%ivgtyp(i,j).NE.24 .AND. grid%ivgtyp(i,j).NE.25 .AND. grid%ivgtyp(i,j).NE.26 .AND. grid%ivgtyp(i,j).LT.30)) grid%ivgtyp(i,j)=13 ELSE IF ( MMINLU == "USGS" ) THEN IF ( grid%FRC_URB2D(i,j) .GE. 0.5 .AND. & - grid%ivgtyp(i,j).NE.1 ) grid%ivgtyp(i,j)=1 + grid%ivgtyp(i,j).NE.1 .AND. grid%ivgtyp(i,j).LT.30) grid%ivgtyp(i,j)=1 ENDIF IF ( grid%FRC_URB2D(i,j) == 0. ) THEN From 199804495c2c862428345fd4d74133bc86f4ba6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Fita?= <96058724+LluisFB@users.noreply.github.com> Date: Thu, 10 Apr 2025 19:25:26 -0300 Subject: [PATCH 09/12] Fix for a do loop index in bep_bem urban code (#2196) TYPE: bug fix KEYWORDS: module_sf_bep_bem.F, loop index, debugging-crash SOURCE: L. Fita (UBA/CIMA/IFAECI) DESCRIPTION OF CHANGES: Problem: The loop index in line 1600 of subroutine module_sf_bep_bem.F should be up to `nzu`, instead of `nz_um`. Solution: This PR fixes the index. ISSUE: For use when this PR closes an issue. Fixes #2194 LIST OF MODIFIED FILES: M phys/module_sf_bep_bem.F TESTS CONDUCTED: 1. Code was modified and recompiled in serial debug mode and it did not crashed 2. The Jenkins tests are all passing. RELEASE NOTE: This PR fixed a loop index error in bep_bem urban code. --- phys/noahmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phys/noahmp b/phys/noahmp index d26d2b7434..88f40a53bd 160000 --- a/phys/noahmp +++ b/phys/noahmp @@ -1 +1 @@ -Subproject commit d26d2b74341f85537ed76b96adb930950b5dcc65 +Subproject commit 88f40a53bda028afe37e61eca1d2620de1a3a7dd From a03eaf8839bed9c835aa02a2f0a514f075246343 Mon Sep 17 00:00:00 2001 From: Josipa Milovac Date: Mon, 12 May 2025 16:55:54 +0200 Subject: [PATCH 10/12] Bug fix in module_sf_noahdrv.F (A.Martilli) Bug affecting calculation of t2veg_urb2d in module_sf_noahdrv.F is fixed. --- phys/module_sf_noahdrv.F | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/phys/module_sf_noahdrv.F b/phys/module_sf_noahdrv.F index 5c7df673a2..760826560f 100644 --- a/phys/module_sf_noahdrv.F +++ b/phys/module_sf_noahdrv.F @@ -68,6 +68,11 @@ SUBROUTINE lsm(DZ8W,QV3D,P8W3D,T3D,TSK, & !Optional Urban TR_URB2D,TB_URB2D,TG_URB2D,TC_URB2D,QC_URB2D, & !H urban UC_URB2D, & !H urban +!CORDEX + T2G_URB2D,T2R_URB2D,T2VEG_URB2D, & + TCAN_URB2D,UCAN_URB2D,QCAN_URB2D, & + TGROUND_URB2D,TROOF_URB2D, & +!CORDEX XXXR_URB2D,XXXB_URB2D,XXXG_URB2D,XXXC_URB2D, & !H urban TRL_URB3D,TBL_URB3D,TGL_URB3D, & !H urban SH_URB2D,LH_URB2D,G_URB2D,RN_URB2D,TS_URB2D, & !H urban @@ -535,6 +540,16 @@ SUBROUTINE lsm(DZ8W,QV3D,P8W3D,T3D,TSK, & REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: TB_URB2D REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: TG_URB2D REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: TC_URB2D +!CORDEX + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: T2G_URB2D + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: T2R_URB2D + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: T2VEG_URB2D + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: TCAN_URB2D + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: UCAN_URB2D + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: QCAN_URB2D + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: TGROUND_URB2D + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: TROOF_URB2D +!CORDEX REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: QC_URB2D REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: UC_URB2D REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: XXXR_URB2D @@ -686,6 +701,9 @@ SUBROUTINE lsm(DZ8W,QV3D,P8W3D,T3D,TSK, & REAL :: CMR_URB, CHR_URB, CMC_URB, CHC_URB, CMGR_URB, CHGR_URB REAL :: frc_urb,lb_urb REAL :: check +!CORDEX + real aa_veg,a2_veg,ptg_rur,zhalf +!CORDEX ! ---------------------------------------------------------------------- ! DECLARATIONS END - urban ! ---------------------------------------------------------------------- @@ -1658,6 +1676,10 @@ SUBROUTINE lsm(DZ8W,QV3D,P8W3D,T3D,TSK, & b_t_bep,b_e_bep,b_q_bep,dlg_bep, & dl_u_bep,sf_bep,vl_bep, & rl_up_urb,rs_abs_urb,emiss_urb,grdflx_urb,qv3d, & +!CORDEX + tground_urb2d,troof_urb2d,tcan_urb2d, & + t2g_urb2d,t2r_urb2d,ucan_urb2d,qcan_urb2d, & +!CORDEX ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & its,ite, jts,jte, kts,kte ) @@ -1752,6 +1774,17 @@ SUBROUTINE lsm(DZ8W,QV3D,P8W3D,T3D,TSK, & ! print*,'ust',ust(i,j) ! print*,'swdown,glw',swdown(i,j),glw(i,j) ! endif +!CORDEX here I do a simple log interpolation between the surface temperature of the vegetated frction, tsk_rural, and the lowest +!model level value of temperature + zhalf=dz8w(i,1,j)/2. + aa_veg=0.4/alog(zhalf/znt(i,j)) + a2_veg=0.4/alog(2./znt(i,j)) + ptg_rur=tsk_rural(i,j)*(1.e5/p_phy(i,1,j))**0.286 + t2veg_urb2d(i,j)=(1.-aa_veg/a2_veg)*ptg_rur+aa_veg/a2_veg*th_phy(i,1,j) + t2veg_urb2d(i,j)=t2veg_urb2d(i,j)*(p_phy(i,1,j)/1.e5)**0.286 + + +!CORDEX else SH_URB2D(I,J) = 0. LH_URB2D(I,J) = 0. From 3d3c97358026599fc4e8efa0ae5cc6d1babc6704 Mon Sep 17 00:00:00 2001 From: Josipa Milovac Date: Mon, 12 May 2025 17:00:57 +0200 Subject: [PATCH 11/12] Near-surface diagnostics in BEP+BEM redefined (A.Martilli) In module_surface_driver.F near-surface diagnostics (e.g.T2) set to be equal to the weighted average of the vaules over the urban fraction (e.g. T2G_URB2D) and vegetation fraction (e.g. T2VEG_URB2D). NOTE: TCAN_URB2D as it is now is basically the temperature of the lowest model level - not the temperature of the urban canyon. Defintion of this TCAN_URB2D is opened to be redefined in the future if needed. SLUCM is having a different approct to defind this temperature. --- phys/module_surface_driver.F | 113 ++++++++++++++++++++++++++++------- 1 file changed, 93 insertions(+), 20 deletions(-) diff --git a/phys/module_surface_driver.F b/phys/module_surface_driver.F index f1592a1f00..f4fdfcac1c 100644 --- a/phys/module_surface_driver.F +++ b/phys/module_surface_driver.F @@ -187,6 +187,11 @@ SUBROUTINE surface_driver( & & ,num_road_layers, dzr, dzb, dzg & !I urban & ,tr_urb2d,tb_urb2d,tg_urb2d,tc_urb2d,qc_urb2d & !H urban & ,uc_urb2d & !H urban +!CORDEX + & ,t2g_urb2d,t2r_urb2d,t2veg_urb2d & + & ,tcan_urb2d,ucan_urb2d,qcan_urb2d & + & ,tground_urb2d,troof_urb2d & +!CORDEX & ,xxxr_urb2d,xxxb_urb2d,xxxg_urb2d,xxxc_urb2d & !H urban & ,cmcr_urb2d,tgr_urb2d,tgrl_urb3d,smr_urb3d & !H urban & ,julian,julyr,drelr_urb2d,drelb_urb2d,drelg_urb2d & !H urban @@ -360,7 +365,12 @@ SUBROUTINE surface_driver( & USE module_sf_gfs USE module_sf_noahdrv ! danli mosaic, the " ,only : lsm " needs to be deleted USE module_sf_noahlsm, only : LCZ_1,LCZ_2,LCZ_3,LCZ_4,LCZ_5,LCZ_6,LCZ_7,LCZ_8,LCZ_9,LCZ_10,LCZ_11 - USE module_sf_noahmpdrv, only : noahmplsm, noahmp_urban + USE module_sf_noahmpdrv, only : noahmplsm,noahmp_urban +!CORDEX- BUG + USE NOAHMP_TABLES, ONLY: ISURBAN_TABLE,LCZ_1_TABLE,LCZ_2_TABLE,LCZ_3_TABLE,LCZ_4_TABLE, & + LCZ_5_TABLE,LCZ_6_TABLE,LCZ_7_TABLE,LCZ_8_TABLE, & + LCZ_9_TABLE,LCZ_10_TABLE,LCZ_11_TABLE +!CORDEX- BUG USE module_sf_noahmp_groundwater USE module_sf_noah_seaice_drv #ifdef WRF_USE_CLM @@ -1273,6 +1283,16 @@ SUBROUTINE surface_driver( & REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: TC_URB2D !urban REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: QC_URB2D !urban REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: UC_URB2D !urban +!CORDEX + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: T2G_URB2D !urban + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: T2R_URB2D !urban + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: T2VEG_URB2D !urban + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: TCAN_URB2D !urban + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: UCAN_URB2D !urban + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: QCAN_URB2D !urban + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: TGROUND_URB2D !urban + REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: TROOF_URB2D !urban +!CORDEX REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: XXXR_URB2D !urban REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: XXXB_URB2D !urban REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT):: XXXG_URB2D !urban @@ -2838,6 +2858,11 @@ SUBROUTINE surface_driver( & ,cmgr_sfcdif,chgr_sfcdif & ,tr_urb2d,tb_urb2d,tg_urb2d,tc_urb2d,qc_urb2d, & !H urban uc_urb2d, & !H urban +!CORDEX + t2g_urb2d,t2r_urb2d,t2veg_urb2d, & + tcan_urb2d,ucan_urb2d,qcan_urb2d, & + tground_urb2d,troof_urb2d, & +!CORDEX xxxr_urb2d,xxxb_urb2d,xxxg_urb2d,xxxc_urb2d, & !H urban trl_urb3d,tbl_urb3d,tgl_urb3d, & !H urban sh_urb2d,lh_urb2d,g_urb2d,rn_urb2d,ts_urb2d, & !H urban @@ -3008,15 +3033,29 @@ SUBROUTINE surface_driver( & IF((SF_URBAN_PHYSICS.eq.2).OR.(SF_URBAN_PHYSICS.eq.3)) THEN DO j=j_start(ij),j_end(ij) !urban DO i=i_start(ij),i_end(ij) !urban +! write(*,*)'ivgtyp',IVGTYP(I,J),LCZ_2,LCZ_6,LCZ_8 IF( IVGTYP(I,J) == ISURBAN .or. IVGTYP(I,J) == LCZ_1 .or. IVGTYP(I,J) == LCZ_2 .or. & IVGTYP(I,J) == LCZ_3 .or. IVGTYP(I,J) == LCZ_4 .or. IVGTYP(I,J) == LCZ_5 .or. & IVGTYP(I,J) == LCZ_6 .or. IVGTYP(I,J) == LCZ_7 .or. IVGTYP(I,J) == LCZ_8 .or. & IVGTYP(I,J) == LCZ_9 .or. IVGTYP(I,J) == LCZ_10 .or. IVGTYP(I,J) == LCZ_11 )THEN - T2(I,J) = TH_PHY(i,1,j)/((1.E5/PSFC(I,J))**RCP) !urban - TH2(I,J) = TH_PHY(i,1,j) !urban - Q2(I,J) = qv_curr(i,1,j) !urban - U10(I,J) = U_phy(I,1,J) !urban - V10(I,J) = V_phy(I,1,J) !urban + ! T2(I,J) = TH_PHY(i,1,j)/((1.E5/PSFC(I,J))**RCP) !urban + T2(I,J)=FRC_URB2D(I,J)*T2G_URB2D(I,J)+(1.-FRC_URB2D(I,J))*T2VEG_URB2D(I,J) + TH2(I,J) = TH_PHY(i,1,j) !urban + Q2(I,J) = qv_curr(i,1,j) !urban + U10(I,J) = U_phy(I,1,J) !urban + V10(I,J) = V_phy(I,1,J) !urban +!CORDEX ! for non urban points put 1.e20 for urban diagnostic variables + else + tsk_rural(i,j)=1.e20 + tcan_urb2d(i,j)=1.e20 + ucan_urb2d(i,j)=1.e20 + qcan_urb2d(i,j)=1.e20 + t2g_urb2d(i,j)=1.e20 + t2r_urb2d(i,j)=1.e20 + t2veg_urb2d(i,j)=1.e20 + troof_urb2d(i,j)=1.e20 + tground_urb2d(i,j)=1.e20 +!CORDEX END IF !urban ENDDO !urban ENDDO !urban @@ -3170,6 +3209,16 @@ SUBROUTINE surface_driver( & IF(SF_URBAN_PHYSICS > 0 ) THEN !urban + DO j=j_start(ij),j_end(ij) + DO i=i_start(ij),i_end(ij) + IF( IVGTYP(I,J) == ISURBAN .or. IVGTYP(I,J) == LCZ_1_TABLE .or. IVGTYP(I,J) == LCZ_2_TABLE .or. & + IVGTYP(I,J) == LCZ_3_TABLE .or. IVGTYP(I,J) == LCZ_4_TABLE .or. IVGTYP(I,J) == LCZ_5_TABLE .or. & + IVGTYP(I,J) == LCZ_6_TABLE .or. IVGTYP(I,J) == LCZ_7_TABLE .or. IVGTYP(I,J) == LCZ_8_TABLE .or. & + IVGTYP(I,J) == LCZ_9_TABLE .or. IVGTYP(I,J) == LCZ_10_TABLE .or. IVGTYP(I,J) == LCZ_11_TABLE )THEN + tsk_rural(i,j)=tsk(i,j) + ENDIF + ENDDO + ENDDO call noahmp_urban (sf_urban_physics, NUM_SOIL_LAYERS, IVGTYP,ITIMESTEP, & ! IN : Model configuration DTBL, COSZEN, XLAT_URB2D, & ! IN : Time/Space-related T_PHY, QV_CURR, U_PHY, V_PHY, SWDOWN, & ! IN : Forcing @@ -3184,6 +3233,12 @@ SUBROUTINE surface_driver( & chc_sfcdif, cmgr_sfcdif, chgr_sfcdif, & tr_urb2d, tb_urb2d, tg_urb2d, & !H urban tc_urb2d, qc_urb2d, uc_urb2d, & !H urban + tsk_rural, & +!CORDEX + t2g_urb2d, t2r_urb2d, & + tcan_urb2d, ucan_urb2d, qcan_urb2d, & + tground_urb2d, troof_urb2d, & +!CORDEX xxxr_urb2d, xxxb_urb2d, xxxg_urb2d, xxxc_urb2d, & !H urban trl_urb3d, tbl_urb3d, tgl_urb3d, & !H urban sh_urb2d, lh_urb2d, g_urb2d, rn_urb2d, ts_urb2d, & !H urban @@ -3223,7 +3278,6 @@ SUBROUTINE surface_driver( & a_e_bep, b_u_bep, b_v_bep, & !O multi-layer urban b_t_bep, b_q_bep, b_e_bep, dlg_bep, & !O multi-layer urban dl_u_bep, sf_bep, vl_bep) !O multi-layer urban - ENDIF IF ( iopt_run .EQ. 5 ) THEN @@ -3341,10 +3395,10 @@ SUBROUTINE surface_driver( & ENDIF TH2(I,J) = T2(I,J)*(1.E5/PSFC(I,J))**RCP ! ELSEIF (IVGTYP(I,J) == ISURBAN .OR. IVGTYP(I,J) == ISICE .OR. FVEGXY(I,J) == 0.0 ) THEN - ELSEIF( IVGTYP(I,J) == ISURBAN .or. IVGTYP(I,J) == LCZ_1 .or. IVGTYP(I,J) == LCZ_2 .or. & - IVGTYP(I,J) == LCZ_3 .or. IVGTYP(I,J) == LCZ_4 .or. IVGTYP(I,J) == LCZ_5 .or. & - IVGTYP(I,J) == LCZ_6 .or. IVGTYP(I,J) == LCZ_7 .or. IVGTYP(I,J) == LCZ_8 .or. & - IVGTYP(I,J) == LCZ_9 .or. IVGTYP(I,J) == LCZ_10 .or. IVGTYP(I,J) == LCZ_11 .or. & + ELSEIF( IVGTYP(I,J) == ISURBAN .or. IVGTYP(I,J) == LCZ_1_TABLE .or. IVGTYP(I,J) == LCZ_2_TABLE .or. & + IVGTYP(I,J) == LCZ_3_TABLE .or. IVGTYP(I,J) == LCZ_4_TABLE .or. IVGTYP(I,J) == LCZ_5_TABLE .or. & + IVGTYP(I,J) == LCZ_6_TABLE .or. IVGTYP(I,J) == LCZ_7_TABLE .or. IVGTYP(I,J) == LCZ_8_TABLE .or. & + IVGTYP(I,J) == LCZ_9_TABLE .or. IVGTYP(I,J) == LCZ_10_TABLE .or. IVGTYP(I,J) == LCZ_11_TABLE .or. & (IVGTYP(I,J) == ISICE .AND. XICE(I,J) .LT. XICE_THRESHOLD)) THEN Q2(I,J) = Q2MBXY(I,J) @@ -3369,10 +3423,10 @@ SUBROUTINE surface_driver( & IF(SF_URBAN_PHYSICS.eq.1) THEN DO j=j_start(ij),j_end(ij) !urban DO i=i_start(ij),i_end(ij) !urban - IF( IVGTYP(I,J) == ISURBAN .or. IVGTYP(I,J) == LCZ_1 .or. IVGTYP(I,J) == LCZ_2 .or. & - IVGTYP(I,J) == LCZ_3 .or. IVGTYP(I,J) == LCZ_4 .or. IVGTYP(I,J) == LCZ_5 .or. & - IVGTYP(I,J) == LCZ_6 .or. IVGTYP(I,J) == LCZ_7 .or. IVGTYP(I,J) == LCZ_8 .or. & - IVGTYP(I,J) == LCZ_9 .or. IVGTYP(I,J) == LCZ_10 .or. IVGTYP(I,J) == LCZ_11 )THEN + IF( IVGTYP(I,J) == ISURBAN .or. IVGTYP(I,J) == LCZ_1_TABLE .or. IVGTYP(I,J) == LCZ_2_TABLE .or. & + IVGTYP(I,J) == LCZ_3_TABLE .or. IVGTYP(I,J) == LCZ_4_TABLE .or. IVGTYP(I,J) == LCZ_5_TABLE .or. & + IVGTYP(I,J) == LCZ_6_TABLE .or. IVGTYP(I,J) == LCZ_7_TABLE .or. IVGTYP(I,J) == LCZ_8_TABLE .or. & + IVGTYP(I,J) == LCZ_9_TABLE .or. IVGTYP(I,J) == LCZ_10_TABLE .or. IVGTYP(I,J) == LCZ_11_TABLE )THEN Q2(I,J) = (FVEGXY(I,J)*Q2MVXY(I,J) + (1.-FVEGXY(I,J))*Q2MBXY(I,J))*(1.-FRC_URB2D(I,J)) + & Q2_URB2D(I,J)*FRC_URB2D(I,J) T2(I,J) = (FVEGXY(I,J)*T2MVXY(I,J) + (1.-FVEGXY(I,J))*T2MBXY(I,J))*(1.-FRC_URB2D(I,J)) + & @@ -3391,17 +3445,36 @@ SUBROUTINE surface_driver( & ENDIF IF((SF_URBAN_PHYSICS.eq.2).OR.(SF_URBAN_PHYSICS.eq.3)) THEN + ! write(*,*)'entering section',j_start(ij),j_end(ij),i_start(ij),i_end(ij) DO j=j_start(ij),j_end(ij) !urban DO i=i_start(ij),i_end(ij) !urban - IF( IVGTYP(I,J) == ISURBAN .or. IVGTYP(I,J) == LCZ_1 .or. IVGTYP(I,J) == LCZ_2 .or. & - IVGTYP(I,J) == LCZ_3 .or. IVGTYP(I,J) == LCZ_4 .or. IVGTYP(I,J) == LCZ_5 .or. & - IVGTYP(I,J) == LCZ_6 .or. IVGTYP(I,J) == LCZ_7 .or. IVGTYP(I,J) == LCZ_8 .or. & - IVGTYP(I,J) == LCZ_9 .or. IVGTYP(I,J) == LCZ_10 .or. IVGTYP(I,J) == LCZ_11 )THEN - T2(I,J) = TH_PHY(i,1,j)/((1.E5/PSFC(I,J))**RCP) !urban +!CORDEX - BUG + IF( IVGTYP(I,J) == ISURBAN .or. IVGTYP(I,J) == LCZ_1_TABLE .or. IVGTYP(I,J) == LCZ_2_TABLE .or. & + IVGTYP(I,J) == LCZ_3_TABLE .or. IVGTYP(I,J) == LCZ_4_TABLE .or. IVGTYP(I,J) == LCZ_5_TABLE .or. & + IVGTYP(I,J) == LCZ_6_TABLE .or. IVGTYP(I,J) == LCZ_7_TABLE .or. IVGTYP(I,J) == LCZ_8_TABLE .or. & + IVGTYP(I,J) == LCZ_9_TABLE .or. IVGTYP(I,J) == LCZ_10_TABLE .or. IVGTYP(I,J) == LCZ_11_TABLE )THEN +!CORDEX - BUG + T2VEG_URB2D(I,J) = FVEGXY(I,J)*T2MVXY(I,J) + (1.-FVEGXY(I,J))*T2MBXY(I,J) + ! T2(I,J) = TH_PHY(i,1,j)/((1.E5/PSFC(I,J))**RCP) !urban + T2(I,J)=FRC_URB2D(I,J)*T2G_URB2D(I,J)+(1.-FRC_URB2D(I,J))*T2VEG_URB2D(I,J) TH2(I,J) = TH_PHY(i,1,j) !urban Q2(I,J) = qv_curr(i,1,j) !urban U10(I,J) = U_phy(I,1,J) !urban V10(I,J) = V_phy(I,1,J) !urban +!CORDEX +!CORDEX +!CORDEX ! for non urban points put 1.e20 for urban diagnostic variables + else + tsk_rural(i,j)=1.e20 + tcan_urb2d(i,j)=1.e20 + ucan_urb2d(i,j)=1.e20 + qcan_urb2d(i,j)=1.e20 + t2g_urb2d(i,j)=1.e20 + t2r_urb2d(i,j)=1.e20 + t2veg_urb2d(i,j)=1.e20 + troof_urb2d(i,j)=1.e20 + tground_urb2d(i,j)=1.e20 +!CORDEX END IF !urban ENDDO !urban ENDDO !urban From 00cf7ff311427c8ca8bd908d4e9fbddef1a8e6d9 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Wed, 28 May 2025 13:56:36 +0200 Subject: [PATCH 12/12] Point phys/noahmp to the latest version before merging --- phys/noahmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phys/noahmp b/phys/noahmp index 88f40a53bd..ba0ce72e88 160000 --- a/phys/noahmp +++ b/phys/noahmp @@ -1 +1 @@ -Subproject commit 88f40a53bda028afe37e61eca1d2620de1a3a7dd +Subproject commit ba0ce72e882e0b28e25174b27a227bbfb0afc34f