Skip to content

Commit

Permalink
2024 Updates and Bug Fixes for the P-X LSM (#2023)
Browse files Browse the repository at this point in the history
Pleim-Xiu LSM MODIS LCZ Compatibility & Surface Evaporation Update

TYPE: bug fix & physics refinement

KEYWORDS: MODIS, LCZ, P-X LSM, Latent Heat Flux

SOURCE: Robert Gilliam & Jon Pleim, US EPA

DESCRIPTION OF CHANGES:
Problem:

User indicated that the P-X LSM errored for MODIS LCZ 61 NUM_LAND_CAT configuration.
Currently, we account for evaporation from transpiration, soil in both vegetated and non-veg parts, and wet leaves. But we only account for the latent heat effects on Tg from transpiration and evaporation from non-veg soil.
This fix adds latent heat effects on Tg from soil in vegetated parts and from wet leaves.
Fix for rare case where GRDFLX goes NaN because of a divide by zero based on a soil parameter when a water cell turns to sea ice.
Solution:
Logic checks in module_physics_init.F and module_sf_pxlsm.F were adjusted for 61 category inputs. P-X LSM data table, module_sf_pxlsm_data.F was updated for MODIS 61 categories. Default for LCZ 51-61 was set to MODIS urban class. We also added updates for the evaporation from vegetation and wet canopy.

ISSUE:
Fixes: #1965

LIST OF MODIFIED FILES:
M phys/module_physics_init.F
M phys/module_sf_pxlsm.F
M phys/module_sf_pxlsm_data.F

- Tested 61 class LCZ with PX LSM for a 1 day simulation with updated codes. Ran base MODIS 21 class scheme with same code before and after LCZ update. The results were identical after a 24 hour simulation. This confirms updates do not impact other MODIS settings in the P-X LSM. The MODIS 21 was by nature not identical to the MODIS 61, but similar enough and differences follow underlying differences in MODIS datasets.
- The Jenkins tests are all passing.

RELEASE NOTE:
Pleim-Xiu LSM is now compatible with 61 category MODIS LCZ landuse dataset. A mode of latent heat effects on Tg from vegetated parts and from wet leaves is added to Pleim-Xiu LSM.
  • Loading branch information
coastwx authored Mar 27, 2024
1 parent 9e265af commit b7f31dc
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 44 deletions.
3 changes: 2 additions & 1 deletion phys/module_physics_init.F
Original file line number Diff line number Diff line change
Expand Up @@ -3520,7 +3520,8 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
CASE (PXLSMSCHEME)
if(config_flags%num_land_cat .ne. 20 .and. config_flags%num_land_cat .ne. 21 .and. & ! MODIS
config_flags%num_land_cat .ne. 24 .and. config_flags%num_land_cat .ne. 28 .and. & ! USGS
config_flags%num_land_cat .ne. 40 .and. config_flags%num_land_cat .ne. 50 ) & ! NLCD
config_flags%num_land_cat .ne. 40 .and. config_flags%num_land_cat .ne. 50 .and. & ! NLCD
config_flags%num_land_cat .ne. 61 ) & ! MODIS W/LCZ
CALL wrf_error_fatal ( 'module_physics_init: PX LSM option requires USGS, MODIS, or NLCD' )
CALL LSMINIT(VEGFRA,SNOW,SNOWC,SNOWH,CANWAT,SMSTAV, &
SMSTOT, SFCRUNOFF,UDRUNOFF,ACSNOW, &
Expand Down
73 changes: 43 additions & 30 deletions phys/module_sf_pxlsm.F
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ SUBROUTINE pxlsm(U3D, V3D, DZ8W, QV3D,T3D,TH3D, RHO, &
LAND_USE_TYPE = 'MODIS'
ELSE IF (NLCAT == 21) THEN
LAND_USE_TYPE = 'MODIS'
ELSE IF (NLCAT == 61) THEN
LAND_USE_TYPE = 'MODIS'
ELSE IF (NLCAT == 24) THEN
LAND_USE_TYPE = 'USGS'
ELSE IF (NLCAT == 28) THEN
Expand Down Expand Up @@ -526,17 +528,19 @@ SUBROUTINE pxlsm(U3D, V3D, DZ8W, QV3D,T3D,TH3D, RHO, &
! are converted to ice/snow for more reasonable treatment.
IF( (XICE(I,J).GE.0.5) .OR. &
(SST(I,J).LE.270.0.AND.XLAND(I,J).GE.1.50) ) THEN
XLAND(I,J) = 1.0
IFLAND = 1.0
ZNT(I,J) = 0.001 ! Ice
SMOIS(I,1,J) = 1.0 ! FWSAT
SMOIS(I,2,J) = 1.0 ! FWSAT
XICE(I,J) = 1.0
ALBEDO(I,J) = 0.7
SNOWC(I,J) = 1.0
SNOW_FRA = 1.0
VEGF_PX(I,J) = 0.0
LAI(I,J) = 0.0
XLAND(I,J) = 1.0
IFLAND = 1.0
ZNT(I,J) = 0.001
SMOIS(I,1,J) = 1.0
SMOIS(I,2,J) = 1.0
XICE(I,J) = 1.0
ALBEDO(I,J) = 0.7
SNOWC(I,J) = 1.0
SNOW_FRA = 1.0
VEGF_PX(I,J) = 0.0
LAI_PX(I,J) = 0.0
LAI(I,J) = 0.0
FCGSAT = 3.670
ENDIF
!-------------------------------------------------------------

Expand Down Expand Up @@ -652,10 +656,15 @@ SUBROUTINE pxlsm(U3D, V3D, DZ8W, QV3D,T3D,TH3D, RHO, &

END DO ! Time internal PX time loop

IF (IFLAND .LT. 1.5) TSK(I,J) = TSLB(I,1,J) ! ATV 02/20: changed for compatibility with sst_skin = 1.
CANWAT(I,J)= WR * 1000. ! convert WR back to mm for CANWAT
RAW = RA(I,J) + 4.503 / USTAR
QSFC(I,J) = QFX(I,J) * RAW / DENS1 + QV1
IF (IFLAND .GE. 1.5) THEN
TSK(I,J) = SST(I,J) ! Skin temp set to sea surface temperature for open water
GRDFLX(I,J) = 0.0
ELSE
TSK(I,J) = TSLB(I,1,J) ! Skin temp set to 1 cm soil temperature in PX for now
ENDIF
CANWAT(I,J) = WR * 1000. ! convert WR back to mm for CANWAT
RAW = RA(I,J) + 4.503 / USTAR
QSFC(I,J) = QFX(I,J) * RAW / DENS1 + QV1

ENDDO ! END MIAN I LOOP
ENDDO ! END MAIN J LOOP
Expand Down Expand Up @@ -1175,6 +1184,7 @@ SUBROUTINE SURFPX(DTPBL, IFLAND, ISNOW, NUDGEX, XICE1, SOLDN, GSW, & !in
REAL :: RSOIL, LDRY, DP ! Soil model updates - JEP 12/14
REAL :: C1MAX,ZZA,ZZB,ZDEL,ZLY,ZA,ZB,ZY2
REAL :: Rinc, Hcan ! JEP 2020
REAL :: CQ3BG,CQ3VW,CQ3VG,SIGG
!... Parameters
REAL :: ZOBS, GAMAH, BETAH, SIGF, BH, CT_SNOW, CT_IMPERV
Expand Down Expand Up @@ -1287,7 +1297,7 @@ SUBROUTINE SURFPX(DTPBL, IFLAND, ISNOW, NUDGEX, XICE1, SOLDN, GSW, & !in
VEGFRC, ISNOW, ISTI, IFLAND, LAI, BETAP, &
WG, W2, WR, &
RSTMIN, WWLT, WFC, RSOIL, RINC, &
EG, ER, ETR, CQ4, RS, FASS)
EG, ER, ETR, CQ4, RS, FASS, SIGG)
!--------------------------------------------------------------------
!--------------------------------------------------------------------
Expand Down Expand Up @@ -1330,18 +1340,17 @@ SUBROUTINE SURFPX(DTPBL, IFLAND, ISNOW, NUDGEX, XICE1, SOLDN, GSW, & !in
! IMPERVIOUS weighting scheme -- Subtract highly accurate impervious fraction from cell
! remainder is split between ground and vegetation. CT is a weighted fractional average.
! Snow CT is then applied for final heat capacity
IMF = AMAX1(0.0,IMPERV/100.0)
VEGF = (1.0 - IMF) * VEGFRC
SOILF= (1.0 - IMF) * (1.0 - VEGFRC)
CT = 1./( IMF/CT_IMPERV + VEGF/CV + SOILF/CG)
CT = 1./(SNOW_FRA/CT_SNOW + (1-SNOW_FRA)/CT)
CAPG = 1.0/CT
IMF = AMAX1(0.0,IMPERV/100.0)
VEGF = (1.0 - IMF) * VEGFRC
SOILF = (1.0 - IMF) * (1.0 - VEGFRC)
CT = 1./( IMF/CT_IMPERV + VEGF/CV + SOILF/CG)
CT = 1./(SNOW_FRA/CT_SNOW + (1-SNOW_FRA)/CT)
CAPG = 1.0/CT
SOILFLX = 2.0 * PI * TAUINV * (TG - T2)
GRDFLX = SOILFLX / CT
ENDIF
!-----------------------------------------------------------------------------------------
!--------------------------------------------------------------------
!-- ASSIMILATION --- COMPUTE SOIL MOISTURE NUDGING FROM TA2 and RH2
!-------COMPUTE ASSIMILATION COEFFICIENTS FOR ALL I
Expand Down Expand Up @@ -1374,7 +1383,10 @@ SUBROUTINE SURFPX(DTPBL, IFLAND, ISNOW, NUDGEX, XICE1, SOLDN, GSW, & !in
!-- Calculate the coefficients for implicit calculation of TG
CQ1 = (1.0 - 0.622 * LV * CRANKP / (r_d * TG)) * QSS
CQ2 = 0.622 * LV * QSS * CRANKP / (r_d * TG * TG)
CQ3 = DENS1 * (1.0 - VEGFRC) / (RAW + RSOIL)
CQ3BG = DENS1 * (1.0 - VEGFRC) / (RAW + RSOIL)
CQ3VW = DENS1 * VEGFRC*SIGG / RAW
CQ3VG = DENS1 * VEGFRC / (RAW + RSOIL + RINC)
CQ3 = CQ3BG + CQ3VW + CQ3VG
COEFFNP1 = 1.0 + DTPBL * CRANKP * (4.0 * EMISSI * STBOLT * TG ** 3 &
* CT + DENS1 * CPAIR / RAH * CPOT * CT + 2.0 * PI &
* TAUINV ) + DTPBL * (CT * LV * CQ2 * (CQ3 + CQ4))
Expand Down Expand Up @@ -1497,8 +1509,8 @@ END SUBROUTINE surfpx
SUBROUTINE QFLUX (DENS1, QV1, TA1, RG, RAW, QSS, & ! in
VEGFRC, ISNOW, ISTI, IFLAND, LAI, BETAP, & ! in
WG, W2, WR, & ! in
RSTMIN, WWLT, WFC, RSOIL, RINC, & ! in !Soil model updates - JEP 12/14
EG, ER, ETR, CQ4, RS, FASS) ! out
RSTMIN, WWLT, WFC, RSOIL, RINC, & ! in
EG, ER, ETR, CQ4, RS, FASS, SIGG ) ! out
!-------------------------------------------------------------------------
!
Expand Down Expand Up @@ -1535,9 +1547,10 @@ SUBROUTINE QFLUX (DENS1, QV1, TA1, RG, RAW, QSS, & ! in
!-- EG evaporation from ground (bare soil)
!-- ER evaporation from canopy
!-- ETR transpiration from vegetation
!-- CQ4
!-- CQ4 CQ4 is used for the implicit calculation of TG in SURFACE
!-- RS surface resistence
!-- FASS parameter for soil moisture nudging
!-- SIGG near ground-first layer moisture difference for evap or dew (1)
!-------------------------------------------------------------------------
!-------------------------------------------------------------------------
Expand All @@ -1554,12 +1567,12 @@ SUBROUTINE QFLUX (DENS1, QV1, TA1, RG, RAW, QSS, & ! in
REAL , INTENT(INOUT) :: BETAP, RSOIL
REAL, INTENT(IN) :: WWLT, WFC, RINC
REAL , INTENT(OUT) :: EG, ER, ETR, CQ4, RS, FASS
REAL , INTENT(OUT) :: EG, ER, ETR, CQ4, RS, FASS, SIGG
!... Local Variables
!... Real
REAL :: WRMAX, DELTA, SIGG, RADL, RADF, W2AVAIL, W2MXAV
REAL :: WRMAX, DELTA, RADL, RADF, W2AVAIL, W2MXAV
REAL :: FTOT, F1, F2, F3, F4
REAL :: FSHELT, GS, GA, FX
REAL :: PAR, F1MAX
Expand Down
101 changes: 88 additions & 13 deletions phys/module_sf_pxlsm_data.F
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ MODULE module_sf_pxlsm_data
! 18 175. 30. 70. 50. 3.4 2.0 0.80 15. 45. wooded tundra
! 19 120. 15. 40. 20. 2.4 1.0 0.40 15. 50. mixed tundra
! 20 100. 10. 20. 5. 1.4 0.1 .015 25. 75. barren tundra
! 21 9999. 0.1 00. 00. 0.0 0.0 0.01 8.0 08. inland lakes
! 22-50 Unassigned
! 51-61 150. 80. 5. 5. 2.0 0.5 0.04 11. 46. Urban LCZ 1-10 * Static urban settings *
!------------------------------------------------------------------------------------
!****************************************************************************************
!****************************************************************************************
REAL, DIMENSION(21), TARGET :: RSMIN_MODIS, Z00_MODIS, &
REAL, DIMENSION(61), TARGET :: RSMIN_MODIS, Z00_MODIS, &
VEG0_MODIS, VEGMN0_MODIS, &
LAI0_MODIS, LAIMN0_MODIS, &
SNUP0_MODIS, ALBF_MODIS, &
Expand All @@ -44,55 +47,127 @@ MODULE module_sf_pxlsm_data
/ 175.0, 120.0, 175.0, 200.0, 200.0, &
200.0, 200.0, 150.0, 120.0, 100.0, &
200.0, 70.0, 150.0, 100.0, 9999.0, &
100.0, 9999.0, 175.0, 120.0, 100.0, 9999.0 /
100.0, 9999.0, 175.0, 120.0, 100.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
150.0, 150.0, 150.0, 150.0, 150.0, &
150.0, 150.0, 150.0, 150.0, 150.0, 150.0 /

DATA Z00_MODIS &
/ 100.0, 90.0, 100.0, 100.0, 100.0, &
15.0, 15.0, 25.0, 15.0, 7.0, &
20.0, 10.0, 80.0, 30.0, 1.2, &
5.0, 0.1, 30.0, 15.0, 10.0, 0.1 /
5.0, 0.1, 30.0, 15.0, 10.0, &
0.1, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
80.0, 80.0, 80.0, 80.0, 80.0, &
80.0, 80.0, 80.0, 80.0, 80.0, 80.0 /

DATA VEG0_MODIS &
/ 93.0, 92.0, 60.0, 91.0, 92.0, &
40.0, 20.0, 70.0, 70.0, 50.0, &
65.0, 90.0, 5.0, 80.0, 0.1, &
0.5, 0.0, 70.0, 40.0, 20.0, 0.0 /
0.5, 0.0, 70.0, 40.0, 20.0, &
0.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
5.0, 5.0, 5.0, 5.0, 5.0, &
5.0, 5.0, 5.0, 5.0, 5.0, 5.0 /

DATA VEGMN0_MODIS &
/ 93.0, 92.0, 60.0, 91.0, 92.0, &
20.0, 10.0, 60.0, 40.0, 20.0, &
35.0, 20.0, 5.0, 40.0, 0.1, &
0.5, 0.0, 50.0, 20.0, 5.0, 0.0 /
0.5, 0.0, 50.0, 20.0, 5.0, &
0.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
5.0, 5.0, 5.0, 5.0, 5.0, &
5.0, 5.0, 5.0, 5.0, 5.0, 5.0 /

DATA LAI0_MODIS &
/ 5.5, 6.0, 3.0, 6.0, 5.5, &
1.5, 1.5, 2.3, 1.5, 1.5, &
2.5, 3.5, 2.0, 3.5, 0.1, &
0.2, 0.0, 3.4, 2.4, 1.4, 0.0 /
0.2, 0.0, 3.4, 2.4, 1.4, &
0.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
2.0, 2.0, 2.0, 2.0, 2.0, &
2.0, 2.0, 2.0, 2.0, 2.0, 2.0 /

DATA LAIMN0_MODIS &
/ 3.5, 3.5, 1.5, 2.0, 2.5, &
1.0, 1.3, 2.0, 1.5, 1.5, &
2.0, 1.5, 1.5, 1.5, 0.1, &
0.1, 0.0, 2.0, 1.0, 0.1, 0.0 /
0.1, 0.0, 2.0, 1.0, 0.1, &
0.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
1.5, 1.5, 1.5, 1.5, 1.5, &
1.5, 1.5, 1.5, 1.5, 1.5, 1.5 /

DATA SNUP0_MODIS &
/ 0.08, 0.08, 0.08, 0.08, 0.08, &
0.03, 0.035, 0.03, 0.04, 0.04, &
0.08, 0.04, 0.04, 0.04, 0.02, &
0.02, 0.01, 0.80, 0.40, 0.015, 0.01 /
/ 0.08, 0.08, 0.08, 0.08, 0.08, &
0.03, 0.035, 0.03, 0.04, 0.04, &
0.08, 0.04, 0.04, 0.04, 0.02, &
0.02, 0.01, 0.80, 0.40, 0.015, &
0.01, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
0.04, 0.04, 0.04, 0.04, 0.04, &
0.04, 0.04, 0.04, 0.04, 0.04, 0.04 /

DATA ALBF_MODIS &
/ 12.0, 12.0, 14.0, 16.0, 13.0, &
22.0, 20.0, 22.0, 20.0, 19.0, &
17.0, 18.0, 11.0, 18.0, 60.0, &
25.0, 8.0, 15.0, 15.0, 25.0, 8.0 /
25.0, 8.0, 15.0, 15.0, 25.0, &
8.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
11.0, 11.0, 11.0, 11.0, 11.0, &
11.0, 11.0, 11.0, 11.0, 11.0, 11.0 /

DATA SNOALB_MODIS &
/ 30.0, 30.0, 30.0, 40.0, 35.0, &
50.0, 60.0, 50.0, 50.0, 70.0, &
50.0, 66.0, 46.0, 68.0, 82.0, &
75.0, 8.0, 45.0, 55.0, 75.0, 8.0 /
75.0, 8.0, 45.0, 55.0, 75.0, &
8.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
9999.0, 9999.0, 9999.0, 9999.0, 9999.0, &
46.0, 46.0, 46.0, 46.0, 46.0, &
46.0, 46.0, 46.0, 46.0, 46.0, 46.0 /

!****************************************************************************************
!****************************************************************************************
Expand Down

0 comments on commit b7f31dc

Please sign in to comment.