From 4c5576356ebe4946a66b4ef7f93ab1b635547366 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Thu, 4 Jan 2024 16:56:30 -0700 Subject: [PATCH 1/4] bug fix for LAI initialization for urban pixel --- drivers/wrf/module_sf_noahmpdrv.F | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/wrf/module_sf_noahmpdrv.F b/drivers/wrf/module_sf_noahmpdrv.F index 3497f4ef..870ed749 100644 --- a/drivers/wrf/module_sf_noahmpdrv.F +++ b/drivers/wrf/module_sf_noahmpdrv.F @@ -2181,7 +2181,11 @@ SUBROUTINE NOAHMP_INIT ( MMINLU, SNOW , SNOWH , CANWAT , ISLTYP , IVGTYP, XLAT lai (I,J) = max(lai(i,j),0.05) ! at least start with 0.05 for arbitrary initialization (v3.7) xsaixy (I,J) = max(0.1*lai(I,J),0.05) ! MB: arbitrarily initialize SAI using input LAI (v3.7) - masslai = 1000. / max(SLA_TABLE(IVGTYP(I,J)),1.0) ! conversion from lai to mass (v3.7) + if (urbanpt_flag) then + masslai = 1000. / max(SLA_TABLE(NATURAL_TABLE),1.0) ! conversion from lai to mass (v3.7) + else + masslai = 1000. / max(SLA_TABLE(IVGTYP(I,J)),1.0) ! conversion from lai to mass (v3.7) + endif lfmassxy (I,J) = lai(i,j)*masslai ! use LAI to initialize (v3.7) masssai = 1000. / 3.0 ! conversion from lai to mass (v3.7) stmassxy (I,J) = xsaixy(i,j)*masssai ! use SAI to initialize (v3.7) From 0a496a4e291dc876c2eae047cafe81c2872eacfa Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Wed, 18 Oct 2023 16:57:31 -0600 Subject: [PATCH 2/4] bug fix for FVEG scaling for stomata & canopy interception --- src/module_sf_noahmplsm.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module_sf_noahmplsm.F b/src/module_sf_noahmplsm.F index 29f26c91..a4b86f4e 100644 --- a/src/module_sf_noahmplsm.F +++ b/src/module_sf_noahmplsm.F @@ -5078,7 +5078,7 @@ SUBROUTINE STOMATA (parameters,VEGTYP ,MPE ,APAR ,FOLN ,ILOC , JLO ! initialize RS=RSMAX and PSN=0 because will only do calculations ! for APAR > 0, in which case RS <= RSMAX and PSN >= 0 - APAR_scale = APAR / max(FVEG,1.0e-6) ! scaling APAR back to stand scale + APAR = APAR / max(FVEG,1.0e-6) ! scaling APAR back to stand scale CF = SFCPRS/(8.314*SFCTMP)*1.0e06 RS = 1.0/parameters%BP * CF PSN = 0.0 From d26d2b74341f85537ed76b96adb930950b5dcc65 Mon Sep 17 00:00:00 2001 From: cenlinhe Date: Sun, 22 Oct 2023 14:57:29 -0600 Subject: [PATCH 3/4] further bug fix for FVEG scale in stomatal resistance --- src/module_sf_noahmplsm.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module_sf_noahmplsm.F b/src/module_sf_noahmplsm.F index a4b86f4e..29f26c91 100644 --- a/src/module_sf_noahmplsm.F +++ b/src/module_sf_noahmplsm.F @@ -5078,7 +5078,7 @@ SUBROUTINE STOMATA (parameters,VEGTYP ,MPE ,APAR ,FOLN ,ILOC , JLO ! initialize RS=RSMAX and PSN=0 because will only do calculations ! for APAR > 0, in which case RS <= RSMAX and PSN >= 0 - APAR = APAR / max(FVEG,1.0e-6) ! scaling APAR back to stand scale + APAR_scale = APAR / max(FVEG,1.0e-6) ! scaling APAR back to stand scale CF = SFCPRS/(8.314*SFCTMP)*1.0e06 RS = 1.0/parameters%BP * CF PSN = 0.0 From 88f40a53bda028afe37e61eca1d2620de1a3a7dd Mon Sep 17 00:00:00 2001 From: Lluis Fita Borrell Date: Fri, 11 Apr 2025 14:52:39 -0300 Subject: [PATCH 4/4] Fixing issue https://github.com/NCAR/noahmp/issues/115 --- drivers/wrf/module_sf_noahmpdrv.F | 2 +- src/module_sf_noahmplsm.F | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/wrf/module_sf_noahmpdrv.F b/drivers/wrf/module_sf_noahmpdrv.F index 870ed749..bcc18719 100644 --- a/drivers/wrf/module_sf_noahmpdrv.F +++ b/drivers/wrf/module_sf_noahmpdrv.F @@ -2004,7 +2004,7 @@ SUBROUTINE NOAHMP_INIT ( MMINLU, SNOW , SNOWH , CANWAT , ISLTYP , IVGTYP, XLAT call read_mp_crop_parameters() call read_tiledrain_parameters() call read_mp_optional_parameters() - if(iopt_irr >= 1) call read_mp_irrigation_parameters() + call read_mp_irrigation_parameters(iopt_irr) IF( .NOT. restart ) THEN diff --git a/src/module_sf_noahmplsm.F b/src/module_sf_noahmplsm.F index 29f26c91..8cdbfc81 100644 --- a/src/module_sf_noahmplsm.F +++ b/src/module_sf_noahmplsm.F @@ -12188,8 +12188,10 @@ subroutine read_mp_crop_parameters() end subroutine read_mp_crop_parameters - subroutine read_mp_irrigation_parameters() + subroutine read_mp_irrigation_parameters(iopt_irr) implicit none + + INTEGER, INTENT(in) :: iopt_irr integer :: ierr logical :: file_named @@ -12216,12 +12218,18 @@ subroutine read_mp_irrigation_parameters() FIRTFAC_TABLE = -1.0E36 ! flood application rate factor IR_RAIN_TABLE = -1.0E36 ! maximum precipitation to stop irrigation trigger - inquire( file='MPTABLE.TBL', exist=file_named ) - if ( file_named ) then - open(15, file="MPTABLE.TBL", status='old', form='formatted', action='read', iostat=ierr) - else - open(15, status='old', form='formatted', action='read', iostat=ierr) - end if + IF (iopt_irr >= 1) THEN + inquire( file='MPTABLE.TBL', exist=file_named ) + if ( file_named ) then + open(15, file="MPTABLE.TBL", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + ELSE + ! Nothing to read, nothing to do + RETURN + + END IF if (ierr /= 0) then write(*,'("WARNING: Cannot find file MPTABLE.TBL")')