diff --git a/drivers/erf/ConfigVarInTransferMod.F90 b/drivers/erf/ConfigVarInTransferMod.F90 index f71caa17..fcb79b0c 100644 --- a/drivers/erf/ConfigVarInTransferMod.F90 +++ b/drivers/erf/ConfigVarInTransferMod.F90 @@ -59,10 +59,26 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO) noahmp%config%nmlist%OptRunoffSurface = NoahmpIO%IOPT_RUNSRF noahmp%config%nmlist%OptRunoffSubsurface = NoahmpIO%IOPT_RUNSUB noahmp%config%nmlist%OptGlacierTreatment = NoahmpIO%IOPT_GLA + noahmp%config%nmlist%OptSnowCompaction = NoahmpIO%IOPT_COMPACT + noahmp%config%nmlist%OptWetlandModel = NoahmpIO%IOPT_WETLAND + + if ( noahmp%config%nmlist%OptSnowAlbedo == 3 ) then ! SNICAR namelist + noahmp%config%nmlist%OptSnicarSnowShape = NoahmpIO%SNICAR_SNOWSHAPE_OPT + noahmp%config%nmlist%OptSnicarRTSolver = NoahmpIO%SNICAR_RTSOLVER_OPT + noahmp%config%nmlist%OptSnicarBandNum = NoahmpIO%SNICAR_BANDNUMBER_OPT + noahmp%config%nmlist%OptSnicarSolarSpec = NoahmpIO%SNICAR_SOLARSPEC_OPT + noahmp%config%nmlist%OptSnicarSnwOptic = NoahmpIO%SNICAR_SNOWOPTICS_OPT + noahmp%config%nmlist%OptSnicarDustOptic = NoahmpIO%SNICAR_DUSTOPTICS_OPT + noahmp%config%nmlist%FlagSnicarSnowBCIntmix = NoahmpIO%SNICAR_SNOWBC_INTMIX + noahmp%config%nmlist%FlagSnicarSnowDustIntmix = NoahmpIO%SNICAR_SNOWDUST_INTMIX + noahmp%config%nmlist%FlagSnicarUseAerosol = NoahmpIO%SNICAR_USE_AEROSOL + noahmp%config%nmlist%FlagSnicarUseOC = NoahmpIO%SNICAR_USE_OC + noahmp%config%nmlist%FlagSnicarAerosolReadTable = NoahmpIO%SNICAR_AEROSOL_READTABLE + endif ! config domain variable noahmp%config%domain%SurfaceType = 1 - noahmp%config%domain%NumSwRadBand = 2 + noahmp%config%domain%NumSwRadBand = NoahmpIO%NUMRAD noahmp%config%domain%SoilColor = 4 noahmp%config%domain%NumCropGrowStage = 8 noahmp%config%domain%FlagSoilProcess = NoahmpIO%calculate_soil @@ -74,7 +90,7 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO) noahmp%config%domain%GridIndexJ = NoahmpIO%J noahmp%config%domain%MainTimeStep = NoahmpIO%DTBL noahmp%config%domain%SoilTimeStep = NoahmpIO%DTBL * NoahmpIO%soil_update_steps - noahmp%config%domain%GridSize = NoahmpIO%DX + noahmp%config%domain%GridSize = sqrt(NoahmpIO%DX * NoahmpIO%DY) noahmp%config%domain%LandUseDataName = NoahmpIO%LLANDUSE noahmp%config%domain%VegType = NoahmpIO%IVGTYP(I,J) noahmp%config%domain%CropType = NoahmpIO%CROPCAT(I,J) @@ -93,6 +109,14 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO) noahmp%config%domain%RunoffSlopeType = NoahmpIO%SLOPETYP noahmp%config%domain%DepthSoilTempBottom = NoahmpIO%ZBOT_TABLE + if ( noahmp%config%nmlist%OptSnowAlbedo == 3 ) then ! SNICAR variables + noahmp%config%domain%NumTempSnwAgeSnicar = NoahmpIO%idx_T_max + noahmp%config%domain%NumTempGradSnwAgeSnicar = NoahmpIO%idx_Tgrd_max + noahmp%config%domain%NumDensitySnwAgeSnicar = NoahmpIO%idx_rhos_max + noahmp%config%domain%NumSnicarRadBand = NoahmpIO%snicar_numrad_snw + noahmp%config%domain%NumRadiusSnwMieSnicar = NoahmpIO%idx_Mie_snw_mx + endif + ! the following initialization cannot be done in ConfigVarInitMod ! because the NumSoilLayer and NumSnowLayerMax are initialized with input values in this module if ( .not. allocated(noahmp%config%domain%DepthSoilLayer) ) & @@ -136,7 +160,7 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO) noahmp%config%domain%VegType = NoahmpIO%NATURAL_TABLE ! set rural vegetation type based on table natural ! urban is handled by explicit urban scheme outside Noah-MP NoahmpIO%GVFMAX(I,J) = 0.96 * 100.0 ! unit: % - endif + endif endif ! treatment for crop point diff --git a/drivers/erf/EnergyVarInTransferMod.F90 b/drivers/erf/EnergyVarInTransferMod.F90 index 2f4f8cee..585cc276 100644 --- a/drivers/erf/EnergyVarInTransferMod.F90 +++ b/drivers/erf/EnergyVarInTransferMod.F90 @@ -30,17 +30,19 @@ subroutine EnergyVarInTransfer(noahmp, NoahmpIO) integer :: SoilLayerIndex ! ------------------------------------------------------------------------- - associate( & - I => noahmp%config%domain%GridIndexI ,& - J => noahmp%config%domain%GridIndexJ ,& - VegType => noahmp%config%domain%VegType ,& - SoilType => noahmp%config%domain%SoilType ,& - CropType => noahmp%config%domain%CropType ,& - SoilColor => noahmp%config%domain%SoilColor ,& - FlagUrban => noahmp%config%domain%FlagUrban ,& - NumSnowLayerMax => noahmp%config%domain%NumSnowLayerMax ,& - NumSoilLayer => noahmp%config%domain%NumSoilLayer ,& - NumSwRadBand => noahmp%config%domain%NumSwRadBand & + associate( & + I => noahmp%config%domain%GridIndexI ,& + J => noahmp%config%domain%GridIndexJ ,& + VegType => noahmp%config%domain%VegType ,& + SoilType => noahmp%config%domain%SoilType ,& + CropType => noahmp%config%domain%CropType ,& + SoilColor => noahmp%config%domain%SoilColor ,& + FlagUrban => noahmp%config%domain%FlagUrban ,& + NumSnowLayerMax => noahmp%config%domain%NumSnowLayerMax ,& + NumSoilLayer => noahmp%config%domain%NumSoilLayer ,& + NumSwRadBand => noahmp%config%domain%NumSwRadBand ,& + NumSnicarRadBand => noahmp%config%domain%NumSnicarRadBand ,& + NumRadiusSnwMieSnicar => noahmp%config%domain%NumRadiusSnwMieSnicar & ) ! ------------------------------------------------------------------------- @@ -60,6 +62,8 @@ subroutine EnergyVarInTransfer(noahmp, NoahmpIO) noahmp%energy%state%TemperatureSoilSnow(1:NumSoilLayer) = NoahmpIO%TSLB (I,1:NumSoilLayer,J) noahmp%energy%state%PressureAtmosCO2 = NoahmpIO%CO2_TABLE * noahmp%forcing%PressureAirRefHeight noahmp%energy%state%PressureAtmosO2 = NoahmpIO%O2_TABLE * noahmp%forcing%PressureAirRefHeight + noahmp%energy%state%AlbedoSoilDir(1:NumSwRadBand) = NoahmpIO%ALBSOILDIRXY(I,1:NumSwRadBand,J) + noahmp%energy%state%AlbedoSoilDif(1:NumSwRadBand) = NoahmpIO%ALBSOILDIFXY(I,1:NumSwRadBand,J) ! vegetation treatment for USGS land types (playa, lava, sand to bare) if ( (VegType == 25) .or. (VegType == 26) .or. (VegType == 27) ) then noahmp%energy%state%VegFrac = 0.0 @@ -129,23 +133,67 @@ subroutine EnergyVarInTransfer(noahmp, NoahmpIO) noahmp%energy%param%AlbedoLakeFrz (1:NumSwRadBand) = NoahmpIO%ALBLAK_TABLE(1:NumSwRadBand) noahmp%energy%param%ScatterCoeffSnow (1:NumSwRadBand) = NoahmpIO%OMEGAS_TABLE(1:NumSwRadBand) + if ( noahmp%config%nmlist%OptSnowAlbedo == 3 ) then ! SNICAR variables + noahmp%energy%param%RadSwWgtDif (1:NumSnicarRadBand) = NoahmpIO%flx_wgt_dif(1:NumSnicarRadBand) + noahmp%energy%param%RadSwWgtDir (1:NumSnicarRadBand) = NoahmpIO%flx_wgt_dir(1:NumSnicarRadBand) + noahmp%energy%param%SsAlbBCphi (1:NumSnicarRadBand) = NoahmpIO%ss_alb_bc1 (1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmBCphi (1:NumSnicarRadBand) = NoahmpIO%asm_prm_bc1 (1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassBCphi (1:NumSnicarRadBand) = NoahmpIO%ext_cff_mss_bc1 (1:NumSnicarRadBand) + noahmp%energy%param%SsAlbBCpho (1:NumSnicarRadBand) = NoahmpIO%ss_alb_bc2 (1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmBCpho (1:NumSnicarRadBand) = NoahmpIO%asm_prm_bc2 (1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassBCpho (1:NumSnicarRadBand) = NoahmpIO%ext_cff_mss_bc2 (1:NumSnicarRadBand) + noahmp%energy%param%SsAlbOCphi (1:NumSnicarRadBand) = NoahmpIO%ss_alb_oc1 (1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmOCphi (1:NumSnicarRadBand) = NoahmpIO%asm_prm_oc1 (1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassOCphi (1:NumSnicarRadBand) = NoahmpIO%ext_cff_mss_oc1 (1:NumSnicarRadBand) + noahmp%energy%param%SsAlbOCpho (1:NumSnicarRadBand) = NoahmpIO%ss_alb_oc2 (1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmOCpho (1:NumSnicarRadBand) = NoahmpIO%asm_prm_oc2 (1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassOCpho (1:NumSnicarRadBand) = NoahmpIO%ext_cff_mss_oc2 (1:NumSnicarRadBand) + noahmp%energy%param%SsAlbDustB1 (1:NumSnicarRadBand) = NoahmpIO%ss_alb_dst1 (1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmDustB1 (1:NumSnicarRadBand) = NoahmpIO%asm_prm_dst1 (1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassDustB1 (1:NumSnicarRadBand) = NoahmpIO%ext_cff_mss_dst1 (1:NumSnicarRadBand) + noahmp%energy%param%SsAlbDustB2 (1:NumSnicarRadBand) = NoahmpIO%ss_alb_dst2 (1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmDustB2 (1:NumSnicarRadBand) = NoahmpIO%asm_prm_dst2 (1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassDustB2 (1:NumSnicarRadBand) = NoahmpIO%ext_cff_mss_dst2 (1:NumSnicarRadBand) + noahmp%energy%param%SsAlbDustB3 (1:NumSnicarRadBand) = NoahmpIO%ss_alb_dst3 (1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmDustB3 (1:NumSnicarRadBand) = NoahmpIO%asm_prm_dst3 (1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassDustB3 (1:NumSnicarRadBand) = NoahmpIO%ext_cff_mss_dst3 (1:NumSnicarRadBand) + noahmp%energy%param%SsAlbDustB4 (1:NumSnicarRadBand) = NoahmpIO%ss_alb_dst4 (1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmDustB4 (1:NumSnicarRadBand) = NoahmpIO%asm_prm_dst4 (1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassDustB4 (1:NumSnicarRadBand) = NoahmpIO%ext_cff_mss_dst4 (1:NumSnicarRadBand) + noahmp%energy%param%SsAlbDustB5 (1:NumSnicarRadBand) = NoahmpIO%ss_alb_dst5 (1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmDustB5 (1:NumSnicarRadBand) = NoahmpIO%asm_prm_dst5 (1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassDustB5 (1:NumSnicarRadBand) = NoahmpIO%ext_cff_mss_dst5 (1:NumSnicarRadBand) + noahmp%energy%param%SsAlbSnwRadDir (1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) = & + NoahmpIO%ss_alb_snw_drc (1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmSnwRadDir (1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) = & + NoahmpIO%asm_prm_snw_drc (1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassSnwRadDir(1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) = & + NoahmpIO%ext_cff_mss_snw_drc(1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) + noahmp%energy%param%SsAlbSnwRadDif (1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) = & + NoahmpIO%ss_alb_snw_dfs (1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) + noahmp%energy%param%AsyPrmSnwRadDif (1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) = & + NoahmpIO%asm_prm_snw_dfs (1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) + noahmp%energy%param%ExtCffMassSnwRadDif(1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) = & + NoahmpIO%ext_cff_mss_snw_dfs(1:NumRadiusSnwMieSnicar,1:NumSnicarRadBand) + endif + do SoilLayerIndex = 1, size(SoilType) - noahmp%energy%param%SoilQuartzFrac(SoilLayerIndex) = NoahmpIO%QUARTZ_TABLE(SoilType(SoilLayerIndex)) + noahmp%energy%param%SoilQuartzFrac(SoilLayerIndex) = NoahmpIO%QUARTZ_TABLE(SoilType(SoilLayerIndex)) enddo ! spatial varying soil input if ( noahmp%config%nmlist%OptSoilProperty == 4 ) then - noahmp%energy%param%SoilQuartzFrac(1:NumSoilLayer) = NoahmpIO%QUARTZ_3D(I,1:NumSoilLayer,J) + noahmp%energy%param%SoilQuartzFrac(1:NumSoilLayer) = NoahmpIO%QUARTZ_3D(I,1:NumSoilLayer,J) endif if ( FlagUrban .eqv. .true. ) noahmp%energy%param%SoilHeatCapacity = 3.0e6 if ( CropType > 0 ) then - noahmp%energy%param%ConductanceLeafMin = NoahmpIO%BPI_TABLE (CropType) - noahmp%energy%param%Co2MmConst25C = NoahmpIO%KC25I_TABLE(CropType) - noahmp%energy%param%O2MmConst25C = NoahmpIO%KO25I_TABLE(CropType) - noahmp%energy%param%Co2MmConstQ10 = NoahmpIO%AKCI_TABLE (CropType) - noahmp%energy%param%O2MmConstQ10 = NoahmpIO%AKOI_TABLE (CropType) + noahmp%energy%param%ConductanceLeafMin = NoahmpIO%BPI_TABLE (CropType) + noahmp%energy%param%Co2MmConst25C = NoahmpIO%KC25I_TABLE(CropType) + noahmp%energy%param%O2MmConst25C = NoahmpIO%KO25I_TABLE(CropType) + noahmp%energy%param%Co2MmConstQ10 = NoahmpIO%AKCI_TABLE (CropType) + noahmp%energy%param%O2MmConstQ10 = NoahmpIO%AKOI_TABLE (CropType) endif end associate diff --git a/drivers/erf/EnergyVarOutTransferMod.F90 b/drivers/erf/EnergyVarOutTransferMod.F90 index 00658527..23311629 100644 --- a/drivers/erf/EnergyVarOutTransferMod.F90 +++ b/drivers/erf/EnergyVarOutTransferMod.F90 @@ -38,6 +38,7 @@ subroutine EnergyVarOutTransfer(noahmp, NoahmpIO) NumSoilLayer => noahmp%config%domain%NumSoilLayer ,& NumSnowLayerMax => noahmp%config%domain%NumSnowLayerMax ,& NumSnowLayerNeg => noahmp%config%domain%NumSnowLayerNeg ,& + NumSwRadBand => noahmp%config%domain%NumSwRadBand ,& IndicatorIceSfc => noahmp%config%domain%IndicatorIceSfc & ) !----------------------------------------------------------------------- @@ -142,6 +143,13 @@ subroutine EnergyVarOutTransfer(noahmp, NoahmpIO) NoahmpIO%TSLB (I,1:NumSoilLayer,J) = noahmp%energy%state%TemperatureSoilSnow(1:NumSoilLayer) NoahmpIO%TSNOXY (I,-NumSnowLayerMax+1:0,J) = noahmp%energy%state%TemperatureSoilSnow(-NumSnowLayerMax+1:0) + NoahmpIO%ALBSOILDIRXY(I,1:NumSwRadBand,J) = noahmp%energy%state%AlbedoSoilDir(1:NumSwRadBand) + NoahmpIO%ALBSOILDIFXY(I,1:NumSwRadBand,J) = noahmp%energy%state%AlbedoSoilDif(1:NumSwRadBand) + NoahmpIO%ALBSFCDIRXY (I,1:NumSwRadBand,J) = noahmp%energy%state%AlbedoSfcDir (1:NumSwRadBand) + NoahmpIO%ALBSFCDIFXY (I,1:NumSwRadBand,J) = noahmp%energy%state%AlbedoSfcDif (1:NumSwRadBand) + NoahmpIO%ALBSNOWDIRXY(I,1:NumSwRadBand,J) = noahmp%energy%state%AlbedoSnowDir(1:NumSwRadBand) + NoahmpIO%ALBSNOWDIFXY(I,1:NumSwRadBand,J) = noahmp%energy%state%AlbedoSnowDif(1:NumSwRadBand) + ! New Calculation of total Canopy/Stomatal Conductance Based on Bonan et al. (2011), Inverse of Canopy Resistance (below) LeafAreaIndSunlit = max(noahmp%energy%state%LeafAreaIndSunlit, 0.0) LeafAreaIndShade = max(noahmp%energy%state%LeafAreaIndShade, 0.0) diff --git a/drivers/erf/ForcingVarInTransferMod.F90 b/drivers/erf/ForcingVarInTransferMod.F90 index 5cef99c5..98cb90f6 100644 --- a/drivers/erf/ForcingVarInTransferMod.F90 +++ b/drivers/erf/ForcingVarInTransferMod.F90 @@ -62,6 +62,35 @@ subroutine ForcingVarInTransfer(noahmp, NoahmpIO) noahmp%forcing%PrecipNonConvRefHeight = noahmp%forcing%PrecipNonConvRefHeight + PrecipOtherRefHeight noahmp%forcing%PrecipSnowRefHeight = noahmp%forcing%PrecipSnowRefHeight + PrecipOtherRefHeight * NoahmpIO%SR(I,J) + ! downward solar radiation direct/diffuse and visible/NIR partition + noahmp%forcing%RadSwDirFrac = NoahmpIO%RadSwDirFrac(I,J) + noahmp%forcing%RadSwVisFrac = NoahmpIO%RadSwVisFrac(I,J) + + ! SNICAR aerosol deposition flux forcing + if ( noahmp%config%nmlist%OptSnowAlbedo == 3 ) then + if ( noahmp%config%nmlist%FlagSnicarAerosolReadTable .eqv. .true. ) then + noahmp%forcing%DepBChydropho = NoahmpIO%DepBChydropho_TABLE + noahmp%forcing%DepBChydrophi = NoahmpIO%DepBChydrophi_TABLE + noahmp%forcing%DepOChydropho = NoahmpIO%DepOChydropho_TABLE + noahmp%forcing%DepOChydrophi = NoahmpIO%DepOChydrophi_TABLE + noahmp%forcing%DepDust1 = NoahmpIO%DepDust1_TABLE + noahmp%forcing%DepDust2 = NoahmpIO%DepDust2_TABLE + noahmp%forcing%DepDust3 = NoahmpIO%DepDust3_TABLE + noahmp%forcing%DepDust4 = NoahmpIO%DepDust4_TABLE + noahmp%forcing%DepDust5 = NoahmpIO%DepDust5_TABLE + else + noahmp%forcing%DepBChydropho = NoahmpIO%DepBChydrophoXY(I,J) + noahmp%forcing%DepBChydrophi = NoahmpIO%DepBChydrophiXY(I,J) + noahmp%forcing%DepOChydropho = NoahmpIO%DepOChydrophoXY(I,J) + noahmp%forcing%DepOChydrophi = NoahmpIO%DepOChydrophiXY(I,J) + noahmp%forcing%DepDust1 = NoahmpIO%DepDust1XY(I,J) + noahmp%forcing%DepDust2 = NoahmpIO%DepDust2XY(I,J) + noahmp%forcing%DepDust3 = NoahmpIO%DepDust3XY(I,J) + noahmp%forcing%DepDust4 = NoahmpIO%DepDust4XY(I,J) + noahmp%forcing%DepDust5 = NoahmpIO%DepDust5XY(I,J) + endif + endif + end associate end subroutine ForcingVarInTransfer diff --git a/drivers/erf/ForcingVarOutTransferMod.F90 b/drivers/erf/ForcingVarOutTransferMod.F90 index 87e6da36..f1d51889 100644 --- a/drivers/erf/ForcingVarOutTransferMod.F90 +++ b/drivers/erf/ForcingVarOutTransferMod.F90 @@ -25,9 +25,9 @@ subroutine ForcingVarOutTransfer(noahmp, NoahmpIO) type(NoahmpIO_type), intent(inout) :: NoahmpIO ! ------------------------------------------------------------------------- - associate( & - I => noahmp%config%domain%GridIndexI ,& - J => noahmp%config%domain%GridIndexJ & + associate( & + I => noahmp%config%domain%GridIndexI ,& + J => noahmp%config%domain%GridIndexJ & ) ! ------------------------------------------------------------------------- @@ -36,6 +36,8 @@ subroutine ForcingVarOutTransfer(noahmp, NoahmpIO) NoahmpIO%FORCPLSM (I,J) = noahmp%forcing%PressureAirRefHeight NoahmpIO%FORCWLSM (I,J) = sqrt(noahmp%forcing%WindEastwardRefHeight**2 + & noahmp%forcing%WindNorthwardRefHeight**2) + NoahmpIO%RadSwDirFrac(I,J) = noahmp%forcing%RadSwDirFrac + NoahmpIO%RadSwVisFrac(I,J) = noahmp%forcing%RadSwVisFrac end associate diff --git a/drivers/erf/NoahmpDriverMainMod.F90 b/drivers/erf/NoahmpDriverMainMod.F90 index b0842008..86ec42cd 100644 --- a/drivers/erf/NoahmpDriverMainMod.F90 +++ b/drivers/erf/NoahmpDriverMainMod.F90 @@ -1,283 +1,286 @@ -module NoahmpDriverMainMod - - use Machine - use NoahmpVarType - use NoahmpIOVarType - use ConfigVarInitMod - use EnergyVarInitMod - use ForcingVarInitMod - use WaterVarInitMod - use BiochemVarInitMod - use ConfigVarInTransferMod - use EnergyVarInTransferMod - use ForcingVarInTransferMod - use WaterVarInTransferMod - use BiochemVarInTransferMod - use ConfigVarOutTransferMod - use ForcingVarOutTransferMod - use EnergyVarOutTransferMod - use WaterVarOutTransferMod - use BiochemVarOutTransferMod - use NoahmpMainMod - use NoahmpMainGlacierMod - -#if ( WRF_CHEM == 1 ) - USE module_data_gocart_dust -#endif - - implicit none - -contains - - subroutine NoahmpDriverMain(NoahmpIO) - -! ------------------------ Code history ----------------------------------- -! Original Noah-MP subroutine: noahmplsm -! Original code: Guo-Yue Niu and Noah-MP team (Niu et al. 2011) -! Refactered code: C. He, P. Valayamkunnath, & refactor team (He et al. 2023) -! ------------------------------------------------------------------------- - - implicit none - - type(NoahmpIO_type), intent(inout) :: NoahmpIO - - ! local variables - type(noahmp_type) :: noahmp - integer :: I - integer :: J - integer :: K - integer :: JMONTH, JDAY - real(kind=kind_noahmp) :: SOLAR_TIME - real(kind=kind_noahmp), dimension(1:NoahmpIO%nsoil) :: SAND - real(kind=kind_noahmp), dimension(1:NoahmpIO%nsoil) :: CLAY - real(kind=kind_noahmp), dimension(1:NoahmpIO%nsoil) :: ORGM -! ------------------------------------------------------------------------- - - NoahmpIO%P8W(:, 2, :) = NoahmpIO%P8W(:, 1, :) ! WRF uses lowest two layers - NoahmpIO%T_PHY(:, 2, :) = NoahmpIO%T_PHY(:, 1, :) ! Only pressure is needed in two layer but fill the rest - NoahmpIO%U_PHY(:, 2, :) = NoahmpIO%U_PHY(:, 1, :) ! - NoahmpIO%V_PHY(:, 2, :) = NoahmpIO%V_PHY(:, 1, :) ! - NoahmpIO%QV_CURR(:, 2, :) = NoahmpIO%QV_CURR(:, 1, :) ! - NoahmpIO%RAINBL = NoahmpIO%RAINBL*NoahmpIO%DTBL ! RAINBL in WRF is [mm] - NoahmpIO%SNOWBL = NoahmpIO%SNOWBL*NoahmpIO%DTBL ! - NoahmpIO%SR = 0.0 ! Will only use component if opt_snf=4 - NoahmpIO%RAINCV = 0.0 - NoahmpIO%RAINNCV = NoahmpIO%RAINBL - NoahmpIO%RAINSHV = 0.0 - NoahmpIO%SNOWNCV = NoahmpIO%SNOWBL - NoahmpIO%GRAUPELNCV = 0.0 - NoahmpIO%HAILNCV = 0.0 - NoahmpIO%DZ8W = 2*NoahmpIO%ZLVL ! 2* to be consistent with WRF model level - - NoahmpIO%SWDDIR = NoahmpIO%SWDOWN*0.7 ! following noahmplsm ATM 70% direct radiation - NoahmpIO%SWDDIF = NoahmpIO%SWDOWN*0.3 ! following noahmplsm ATM 30% diffuse radiation - - IF (NoahmpIO%ITIMESTEP == 1) THEN - if (NoahmpIO%rank == 0) write(*,'("Noah-MP ITIMESTEP == 1 setting initial guess for variables")') - NoahmpIO%EAHXY = (NoahmpIO%P8W(:, 1, :)*NoahmpIO%QV_CURR(:, 1, :))/(0.622+NoahmpIO%QV_CURR(:, 1, :)) ! Initial guess only. - NoahmpIO%TAHXY = NoahmpIO%T_PHY(:, 1, :) ! Initial guess only. - NoahmpIO%CHXY = 0.1 - NoahmpIO%CMXY = 0.1 - END IF - - IF (NoahmpIO%ITIMESTEP > 0) THEN - if (NoahmpIO%rank == 0) write(*,'("Noah-MP running physical processes")') - NoahmpIO%MP_RAINC = NoahmpIO%RAINCV - NoahmpIO%MP_RAINNC = NoahmpIO%RAINNCV - NoahmpIO%MP_SHCV = NoahmpIO%RAINSHV - NoahmpIO%MP_SNOW = NoahmpIO%SNOWNCV - NoahmpIO%MP_GRAUP = NoahmpIO%GRAUPELNCV - NoahmpIO%MP_HAIL = NoahmpIO%HAILNCV - - !--------------------------------------------------------------------- - ! Treatment of Noah-MP soil timestep - !--------------------------------------------------------------------- - NoahmpIO%CALCULATE_SOIL = .false. - NoahmpIO%SOIL_UPDATE_STEPS = nint(NoahmpIO%SOILTSTEP/NoahmpIO%DTBL) - NoahmpIO%SOIL_UPDATE_STEPS = max(NoahmpIO%SOIL_UPDATE_STEPS, 1) - - if (NoahmpIO%SOIL_UPDATE_STEPS == 1) then - NoahmpIO%ACC_SSOILXY = 0.0 - NoahmpIO%ACC_QINSURXY = 0.0 - NoahmpIO%ACC_QSEVAXY = 0.0 - NoahmpIO%ACC_ETRANIXY = 0.0 - NoahmpIO%ACC_DWATERXY = 0.0 - NoahmpIO%ACC_PRCPXY = 0.0 - NoahmpIO%ACC_ECANXY = 0.0 - NoahmpIO%ACC_ETRANXY = 0.0 - NoahmpIO%ACC_EDIRXY = 0.0 - end if - - if (NoahmpIO%SOIL_UPDATE_STEPS > 1) then - if (mod(NoahmpIO%ITIMESTEP, NoahmpIO%SOIL_UPDATE_STEPS) == 1) then - NoahmpIO%ACC_SSOILXY = 0.0 - NoahmpIO%ACC_QINSURXY = 0.0 - NoahmpIO%ACC_QSEVAXY = 0.0 - NoahmpIO%ACC_ETRANIXY = 0.0 - NoahmpIO%ACC_DWATERXY = 0.0 - NoahmpIO%ACC_PRCPXY = 0.0 - NoahmpIO%ACC_ECANXY = 0.0 - NoahmpIO%ACC_ETRANXY = 0.0 - NoahmpIO%ACC_EDIRXY = 0.0 - end if - end if - - if (mod(NoahmpIO%ITIMESTEP, NoahmpIO%SOIL_UPDATE_STEPS) == 0) NoahmpIO%CALCULATE_SOIL = .true. - - !--------------------------------------------------------------------- - ! Prepare Noah-MP driver - !--------------------------------------------------------------------- - - ! find length of year for phenology (also S Hemisphere) - NoahmpIO%YEARLEN = 365 - if (mod(NoahmpIO%YR, 4) == 0) then - NoahmpIO%YEARLEN = 366 - if (mod(NoahmpIO%YR, 100) == 0) then - NoahmpIO%YEARLEN = 365 - if (mod(NoahmpIO%YR, 400) == 0) then - NoahmpIO%YEARLEN = 366 - end if - end if - end if - - ! depth to soil interfaces (<0) [m] - NoahmpIO%ZSOIL(1) = -NoahmpIO%DZS(1) - do K = 2, NoahmpIO%NSOIL - NoahmpIO%ZSOIL(K) = -NoahmpIO%DZS(K)+NoahmpIO%ZSOIL(K-1) - end do - - JLOOP: do J = NoahmpIO%JTS, NoahmpIO%JTE - - NoahmpIO%J = J - if (NoahmpIO%ITIMESTEP == 1) then - do I = NoahmpIO%ITS, NoahmpIO%ITE - if ((NoahmpIO%XLAND(I, J)-1.5) >= 0.0) then ! Open water point - if (NoahmpIO%XICE(I, J) == 1.0) print *, ' sea-ice at water point, I=', I, 'J=', J - NoahmpIO%SMSTAV(I, J) = 1.0 - NoahmpIO%SMSTOT(I, J) = 1.0 - do K = 1, NoahmpIO%NSOIL - NoahmpIO%SMOIS(I, K, J) = 1.0 - NoahmpIO%TSLB(I, K, J) = 273.16 - end do - else - if (NoahmpIO%XICE(I, J) == 1.0) then ! Sea-ice case - NoahmpIO%SMSTAV(I, J) = 1.0 - NoahmpIO%SMSTOT(I, J) = 1.0 - do K = 1, NoahmpIO%NSOIL - NoahmpIO%SMOIS(I, K, J) = 1.0 - end do - end if - end if - end do - end if ! end of initialization over ocean - - ILOOP: do I = NoahmpIO%ITS, NoahmpIO%ITE - - NoahmpIO%I = I - if (NoahmpIO%XICE(I, J) >= NoahmpIO%XICE_THRESHOLD) then ! Sea-ice point - NoahmpIO%ICE = 1 - NoahmpIO%SH2O(I, 1:NoahmpIO%NSOIL, J) = 1.0 - NoahmpIO%LAI(I, J) = 0.01 - cycle ILOOP ! Skip any sea-ice points - else - if ((NoahmpIO%XLAND(I, J)-1.5) >= 0.0) cycle ILOOP ! Skip any open water points - - !------------------------------------------------------------------------------------ - ! initialize Data Types and transfer all the inputs from 2-D to 1-D column variables - !------------------------------------------------------------------------------------ - call ConfigVarInitDefault(noahmp) - call ConfigVarInTransfer(noahmp, NoahmpIO) - call ForcingVarInitDefault(noahmp) - call ForcingVarInTransfer(noahmp, NoahmpIO) - call EnergyVarInitDefault(noahmp) - call EnergyVarInTransfer(noahmp, NoahmpIO) - call WaterVarInitDefault(noahmp) - call WaterVarInTransfer(noahmp, NoahmpIO) - call BiochemVarInitDefault(noahmp) - call BiochemVarInTransfer(noahmp, NoahmpIO) - - !--------------------------------------------------------------------- - ! hydrological processes for vegetation in urban model - ! irrigate vegetaion only in urban area, MAY-SEP, 9-11pm - ! need to be separated from Noah-MP into outside urban specific module - !--------------------------------------------------------------------- - if ((NoahmpIO%IVGTYP(I, J) == NoahmpIO%ISURBAN_TABLE) .or. & - (NoahmpIO%IVGTYP(I, J) > NoahmpIO%URBTYPE_beg)) then - if ((NoahmpIO%SF_URBAN_PHYSICS > 0) .and. (NoahmpIO%IRI_URBAN == 1)) then - SOLAR_TIME = (NoahmpIO%JULIAN-int(NoahmpIO%JULIAN))*24+NoahmpIO%XLONG(I, J)/15.0 - if (SOLAR_TIME < 0.0) SOLAR_TIME = SOLAR_TIME+24.0 - call CAL_MON_DAY(int(NoahmpIO%JULIAN), NoahmpIO%YR, JMONTH, JDAY) - if ((SOLAR_TIME >= 21.0) .and. (SOLAR_TIME <= 23.0) .and. & - (JMONTH >= 5) .and. (JMONTH <= 9)) then - noahmp%water%state%SoilMoisture(1) = & - max(noahmp%water%state%SoilMoisture(1), noahmp%water%param%SoilMoistureFieldCap(1)) - noahmp%water%state%SoilMoisture(2) = & - max(noahmp%water%state%SoilMoisture(2), noahmp%water%param%SoilMoistureFieldCap(2)) - end if - end if - end if - - !------------------------------------------------------------------------ - ! Call 1D Noah-MP LSM - !------------------------------------------------------------------------ - - ! glacier ice - if (noahmp%config%domain%VegType == noahmp%config%domain%IndexIcePoint) then - noahmp%config%domain%IndicatorIceSfc = -1 ! Land-ice point - noahmp%forcing%TemperatureSoilBottom = min(noahmp%forcing%TemperatureSoilBottom, 263.15) ! set deep glaicer temp to >= -10C - call NoahmpMainGlacier(noahmp) - ! non-glacier land - else - noahmp%config%domain%IndicatorIceSfc = 0 ! land soil point. - call NoahmpMain(noahmp) - end if ! glacial split ends - - !--------------------------------------------------------------------- - ! Transfer 1-D Noah-MP column variables to 2-D output variables - !--------------------------------------------------------------------- - call ConfigVarOutTransfer(noahmp, NoahmpIO) - call ForcingVarOutTransfer(noahmp, NoahmpIO) - call EnergyVarOutTransfer(noahmp, NoahmpIO) - call WaterVarOutTransfer(noahmp, NoahmpIO) - call BiochemVarOutTransfer(noahmp, NoahmpIO) - - end if ! land-sea split ends - - end do ILOOP ! I loop - end do JLOOP ! J loop - end if - - end subroutine NoahmpDriverMain - - SUBROUTINE CAL_MON_DAY(JULDAY, julyr, Jmonth, Jday) - IMPLICIT NONE - INTEGER, INTENT(IN) :: JULDAY, julyr - INTEGER, INTENT(OUT) :: Jmonth, Jday - LOGICAL :: LEAP, NOT_FIND_DATE - INTEGER :: MONTH(12), itmpday, itmpmon, i - DATA MONTH/31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/ - NOT_FIND_DATE = .true. - - itmpday = JULDAY - itmpmon = 1 - LEAP = .FALSE. - IF (MOD(julyr, 4) .EQ. 0) THEN - MONTH(2) = 29 - LEAP = .TRUE. - END IF - - i = 1 - DO WHILE (NOT_FIND_DATE) - IF (itmpday .GT. MONTH(i)) THEN - itmpday = itmpday-MONTH(i) - ELSE - Jday = itmpday - Jmonth = i - NOT_FIND_DATE = .false. - END IF - i = i+1 - END DO - - END SUBROUTINE CAL_MON_DAY - -end module NoahmpDriverMainMod +module NoahmpDriverMainMod + + use Machine + use NoahmpVarType + use NoahmpIOVarType + use ConfigVarInitMod + use EnergyVarInitMod + use ForcingVarInitMod + use WaterVarInitMod + use BiochemVarInitMod + use ConfigVarInTransferMod + use EnergyVarInTransferMod + use ForcingVarInTransferMod + use WaterVarInTransferMod + use BiochemVarInTransferMod + use ConfigVarOutTransferMod + use ForcingVarOutTransferMod + use EnergyVarOutTransferMod + use WaterVarOutTransferMod + use BiochemVarOutTransferMod + use NoahmpMainMod + use NoahmpMainGlacierMod +#if ( WRF_CHEM == 1 ) + USE module_data_gocart_dust +#endif + + implicit none + +contains + + subroutine NoahmpDriverMain(NoahmpIO) + +! ------------------------ Code history ----------------------------------- +! Original Noah-MP subroutine: noahmplsm +! Original code: Guo-Yue Niu and Noah-MP team (Niu et al. 2011) +! Refactered code: C. He, P. Valayamkunnath, & refactor team (He et al. 2023) +! ------------------------------------------------------------------------- + + implicit none + + type(NoahmpIO_type), intent(inout) :: NoahmpIO + + ! local variables + type(noahmp_type) :: noahmp + integer :: I + integer :: J + integer :: K + integer :: JMONTH, JDAY + real(kind=kind_noahmp) :: SOLAR_TIME + real(kind=kind_noahmp), dimension( 1:NoahmpIO%nsoil ) :: SAND + real(kind=kind_noahmp), dimension( 1:NoahmpIO%nsoil ) :: CLAY + real(kind=kind_noahmp), dimension( 1:NoahmpIO%nsoil ) :: ORGM +! ------------------------------------------------------------------------- + + NoahmpIO%P8W(:, 2, :) = NoahmpIO%P8W(:, 1, :) ! WRF uses lowest two layers + NoahmpIO%T_PHY(:, 2, :) = NoahmpIO%T_PHY(:, 1, :) ! Only pressure is needed in two layer but fill the rest + NoahmpIO%U_PHY(:, 2, :) = NoahmpIO%U_PHY(:, 1, :) ! + NoahmpIO%V_PHY(:, 2, :) = NoahmpIO%V_PHY(:, 1, :) ! + NoahmpIO%QV_CURR(:, 2, :) = NoahmpIO%QV_CURR(:, 1, :) ! + NoahmpIO%RAINBL = NoahmpIO%RAINBL*NoahmpIO%DTBL ! RAINBL in WRF is [mm] + NoahmpIO%SNOWBL = NoahmpIO%SNOWBL*NoahmpIO%DTBL ! + NoahmpIO%SR = 0.0 ! Will only use component if opt_snf=4 + NoahmpIO%RAINCV = 0.0 + NoahmpIO%RAINNCV = NoahmpIO%RAINBL + NoahmpIO%RAINSHV = 0.0 + NoahmpIO%SNOWNCV = NoahmpIO%SNOWBL + NoahmpIO%GRAUPELNCV = 0.0 + NoahmpIO%HAILNCV = 0.0 + NoahmpIO%DZ8W = 2*NoahmpIO%ZLVL ! 2* to be consistent with WRF model level + + NoahmpIO%SWDDIR = NoahmpIO%SWDOWN*0.7 ! following noahmplsm ATM 70% direct radiation + NoahmpIO%SWDDIF = NoahmpIO%SWDOWN*0.3 ! following noahmplsm ATM 30% diffuse radiation + + IF (NoahmpIO%ITIMESTEP == 1) THEN + if (NoahmpIO%rank == 0) write(*,'("Noah-MP ITIMESTEP == 1 setting initial guess for variables")') + NoahmpIO%EAHXY = (NoahmpIO%P8W(:, 1, :)*NoahmpIO%QV_CURR(:, 1, :))/(0.622+NoahmpIO%QV_CURR(:, 1, :)) ! Initial guess only. + NoahmpIO%TAHXY = NoahmpIO%T_PHY(:, 1, :) ! Initial guess only. + NoahmpIO%CHXY = 0.1 + NoahmpIO%CMXY = 0.1 + END IF + + IF (NoahmpIO%ITIMESTEP > 0) THEN + if (NoahmpIO%rank == 0) write(*,'("Noah-MP running physical processes")') + NoahmpIO%MP_RAINC = NoahmpIO%RAINCV + NoahmpIO%MP_RAINNC = NoahmpIO%RAINNCV + NoahmpIO%MP_SHCV = NoahmpIO%RAINSHV + NoahmpIO%MP_SNOW = NoahmpIO%SNOWNCV + NoahmpIO%MP_GRAUP = NoahmpIO%GRAUPELNCV + NoahmpIO%MP_HAIL = NoahmpIO%HAILNCV + + !--------------------------------------------------------------------- + ! Treatment of Noah-MP soil timestep + !--------------------------------------------------------------------- + NoahmpIO%CALCULATE_SOIL = .false. + NoahmpIO%SOIL_UPDATE_STEPS = nint(NoahmpIO%SOILTSTEP / NoahmpIO%DTBL) + NoahmpIO%SOIL_UPDATE_STEPS = max(NoahmpIO%SOIL_UPDATE_STEPS,1) + + if ( NoahmpIO%SOIL_UPDATE_STEPS == 1 ) then + NoahmpIO%ACC_SSOILXY = 0.0 + NoahmpIO%ACC_QINSURXY = 0.0 + NoahmpIO%ACC_QSEVAXY = 0.0 + NoahmpIO%ACC_ETRANIXY = 0.0 + NoahmpIO%ACC_DWATERXY = 0.0 + NoahmpIO%ACC_PRCPXY = 0.0 + NoahmpIO%ACC_ECANXY = 0.0 + NoahmpIO%ACC_ETRANXY = 0.0 + NoahmpIO%ACC_EDIRXY = 0.0 + NoahmpIO%ACC_GLAFLWXY = 0.0 + endif + + if ( NoahmpIO%SOIL_UPDATE_STEPS > 1 ) then + if ( mod(NoahmpIO%ITIMESTEP, NoahmpIO%SOIL_UPDATE_STEPS) == 1 ) then + NoahmpIO%ACC_SSOILXY = 0.0 + NoahmpIO%ACC_QINSURXY = 0.0 + NoahmpIO%ACC_QSEVAXY = 0.0 + NoahmpIO%ACC_ETRANIXY = 0.0 + NoahmpIO%ACC_DWATERXY = 0.0 + NoahmpIO%ACC_PRCPXY = 0.0 + NoahmpIO%ACC_ECANXY = 0.0 + NoahmpIO%ACC_ETRANXY = 0.0 + NoahmpIO%ACC_EDIRXY = 0.0 + NoahmpIO%ACC_GLAFLWXY = 0.0 + end if + endif + + !if ( mod(NoahmpIO%ITIMESTEP, NoahmpIO%SOIL_UPDATE_STEPS) == 0 ) NoahmpIO%CALCULATE_SOIL = .true. + ! Prevent stale values of calculate_soil from leaking across cpu threads in if-statement above + NoahmpIO%CALCULATE_SOIL = mod(NoahmpIO%ITIMESTEP, NoahmpIO%SOIL_UPDATE_STEPS) == 0 + + !--------------------------------------------------------------------- + ! Prepare Noah-MP driver + !--------------------------------------------------------------------- + + ! find length of year for phenology (also S Hemisphere) + NoahmpIO%YEARLEN = 365 + if (mod(NoahmpIO%YR,4) == 0)then + NoahmpIO%YEARLEN = 366 + if (mod(NoahmpIO%YR,100) == 0)then + NoahmpIO%YEARLEN = 365 + if (mod(NoahmpIO%YR,400) == 0)then + NoahmpIO%YEARLEN = 366 + endif + endif + endif + + ! depth to soil interfaces (<0) [m] + NoahmpIO%ZSOIL(1) = -NoahmpIO%DZS(1) + do K = 2, NoahmpIO%NSOIL + NoahmpIO%ZSOIL(K) = -NoahmpIO%DZS(K) + NoahmpIO%ZSOIL(K-1) + enddo + + JLOOP : do J = NoahmpIO%JTS, NoahmpIO%JTE + + NoahmpIO%J = J + if ( NoahmpIO%ITIMESTEP == 1 ) then + do I = NoahmpIO%ITS, NoahmpIO%ITE + if ( (NoahmpIO%XLAND(I,J)-1.5) >= 0.0 ) then ! Open water point + if ( NoahmpIO%XICE(I,J) == 1.0 ) print*,' sea-ice at water point, I=',I,'J=',J + NoahmpIO%SMSTAV(I,J) = 1.0 + NoahmpIO%SMSTOT(I,J) = 1.0 + do K = 1, NoahmpIO%NSOIL + NoahmpIO%SMOIS(I,K,J) = 1.0 + NoahmpIO%TSLB(I,K,J) = 273.16 + enddo + else + if ( NoahmpIO%XICE(I,J) == 1.0 ) then ! Sea-ice case + NoahmpIO%SMSTAV(I,J) = 1.0 + NoahmpIO%SMSTOT(I,J) = 1.0 + do K = 1, NoahmpIO%NSOIL + NoahmpIO%SMOIS(I,K,J) = 1.0 + enddo + endif + endif + enddo + endif ! end of initialization over ocean + + ILOOP : do I = NoahmpIO%ITS, NoahmpIO%ITE + + NoahmpIO%I = I + if ( NoahmpIO%XICE(I,J) >= NoahmpIO%XICE_THRESHOLD ) then ! Sea-ice point + NoahmpIO%ICE = 1 + NoahmpIO%SH2O(I,1:NoahmpIO%NSOIL,J) = 1.0 + NoahmpIO%LAI (I,J) = 0.01 + cycle ILOOP ! Skip any sea-ice points + else + if ( (NoahmpIO%XLAND(I,J)-1.5) >= 0.0 ) cycle ILOOP ! Skip any open water points + + !------------------------------------------------------------------------------------ + ! initialize Data Types and transfer all the inputs from 2-D to 1-D column variables + !------------------------------------------------------------------------------------ + call ConfigVarInitDefault (noahmp) + call ConfigVarInTransfer (noahmp, NoahmpIO) + call ForcingVarInitDefault (noahmp) + call ForcingVarInTransfer (noahmp, NoahmpIO) + call EnergyVarInitDefault (noahmp) + call EnergyVarInTransfer (noahmp, NoahmpIO) + call WaterVarInitDefault (noahmp) + call WaterVarInTransfer (noahmp, NoahmpIO) + call BiochemVarInitDefault (noahmp) + call BiochemVarInTransfer (noahmp, NoahmpIO) + + !--------------------------------------------------------------------- + ! hydrological processes for vegetation in urban model + ! irrigate vegetaion only in urban area, MAY-SEP, 9-11pm + ! need to be separated from Noah-MP into outside urban specific module + !--------------------------------------------------------------------- + if ( (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISURBAN_TABLE) .or. & + (NoahmpIO%IVGTYP(I,J) > NoahmpIO%URBTYPE_beg) ) then + if ( (NoahmpIO%SF_URBAN_PHYSICS > 0) .and. (NoahmpIO%IRI_URBAN == 1) ) then + SOLAR_TIME = (NoahmpIO%JULIAN - int(NoahmpIO%JULIAN))*24 + NoahmpIO%XLONG(I,J)/15.0 + if ( SOLAR_TIME < 0.0 ) SOLAR_TIME = SOLAR_TIME + 24.0 + call CAL_MON_DAY(int(NoahmpIO%JULIAN), NoahmpIO%YR, JMONTH, JDAY) + if ( (SOLAR_TIME >= 21.0) .and. (SOLAR_TIME <= 23.0) .and. & + (JMONTH >= 5) .and. (JMONTH <= 9) ) then + noahmp%water%state%SoilMoisture(1) = & + max(noahmp%water%state%SoilMoisture(1),noahmp%water%param%SoilMoistureFieldCap(1)) + noahmp%water%state%SoilMoisture(2) = & + max(noahmp%water%state%SoilMoisture(2),noahmp%water%param%SoilMoistureFieldCap(2)) + endif + endif + endif + + !------------------------------------------------------------------------ + ! Call 1D Noah-MP LSM + !------------------------------------------------------------------------ + + ! glacier ice + if (noahmp%config%domain%VegType == noahmp%config%domain%IndexIcePoint ) then + noahmp%config%domain%IndicatorIceSfc = -1 ! Land-ice point + noahmp%forcing%TemperatureSoilBottom = min(noahmp%forcing%TemperatureSoilBottom,263.15) ! set deep glaicer temp to >= -10C + call NoahmpMainGlacier(noahmp) + ! non-glacier land + else + noahmp%config%domain%IndicatorIceSfc = 0 ! land soil point. + call NoahmpMain(noahmp) + endif ! glacial split ends + + !--------------------------------------------------------------------- + ! Transfer 1-D Noah-MP column variables to 2-D output variables + !--------------------------------------------------------------------- + call ConfigVarOutTransfer (noahmp, NoahmpIO) + call ForcingVarOutTransfer(noahmp, NoahmpIO) + call EnergyVarOutTransfer (noahmp, NoahmpIO) + call WaterVarOutTransfer (noahmp, NoahmpIO) + call BiochemVarOutTransfer(noahmp, NoahmpIO) + + endif ! land-sea split ends + + enddo ILOOP ! I loop + enddo JLOOP ! J loop + end if + + end subroutine NoahmpDriverMain + + SUBROUTINE CAL_MON_DAY(JULDAY, julyr, Jmonth, Jday) + IMPLICIT NONE + INTEGER, INTENT(IN) :: JULDAY, julyr + INTEGER, INTENT(OUT) :: Jmonth, Jday + LOGICAL :: LEAP, NOT_FIND_DATE + INTEGER :: MONTH(12), itmpday, itmpmon, i + DATA MONTH/31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/ + NOT_FIND_DATE = .true. + + itmpday = JULDAY + itmpmon = 1 + LEAP = .FALSE. + IF (MOD(julyr, 4) .EQ. 0) THEN + MONTH(2) = 29 + LEAP = .TRUE. + END IF + + i = 1 + DO WHILE (NOT_FIND_DATE) + IF (itmpday .GT. MONTH(i)) THEN + itmpday = itmpday-MONTH(i) + ELSE + Jday = itmpday + Jmonth = i + NOT_FIND_DATE = .false. + END IF + i = i+1 + END DO + + END SUBROUTINE CAL_MON_DAY + +end module NoahmpDriverMainMod diff --git a/drivers/erf/NoahmpGroundwaterInitMod.F90 b/drivers/erf/NoahmpGroundwaterInitMod.F90 index d00a239a..28a9d9e4 100644 --- a/drivers/erf/NoahmpGroundwaterInitMod.F90 +++ b/drivers/erf/NoahmpGroundwaterInitMod.F90 @@ -18,24 +18,21 @@ subroutine NoahmpGroundwaterInitMain(NoahmpIO) ! --------------------------------------------------------------------------- use GroundWaterMmfMod, only : LATERALFLOW - -#if (EM_CORE == 1) -#ifdef DM_PARALLEL - use module_dm , only : ntasks_x,ntasks_y,local_communicator,mytask,ntasks - use module_comm_dm, only : halo_em_hydro_noahmp_sub -#endif -#endif +#ifdef MPP_LAND + use module_mpp_land +#endif + implicit none type(NoahmpIO_type), intent(inout) :: NoahmpIO - + ! local variables logical :: urbanpt_flag ! added to identify urban pixels integer :: I,J,K,ITER,itf,jtf,NITER,NCOUNT,NS real(kind=kind_noahmp) :: BEXP,SMCMAX,PSISAT,SMCWLT,DWSAT,DKSAT real(kind=kind_noahmp) :: FRLIQ,SMCEQDEEP - real(kind=kind_noahmp) :: DELTAT,RCOND,TOTWATER + real(kind=kind_noahmp) :: DELTAT,RCOND,TOTWATER,RCOUNT real(kind=kind_noahmp) :: AA,BBB,CC,DD,DX,FUNC,DFUNC,DDZ,EXPON,SMC,FLUX real(kind=kind_noahmp), dimension(1:NoahmpIO%NSOIL) :: SMCEQ,ZSOIL real(kind=kind_noahmp), dimension(NoahmpIO%ims:NoahmpIO%ime, NoahmpIO%jms:NoahmpIO%jme) :: QLAT, QRF @@ -97,11 +94,7 @@ subroutine NoahmpGroundwaterInitMain(NoahmpIO) NCOUNT = 0 do NITER = 1, 500 -#if (EM_CORE == 1) -#ifdef DM_PARALLEL -# include "HALO_EM_HYDRO_NOAHMP.inc" -#endif -#endif + ! Calculate lateral flow if ( (NCOUNT > 0) .or. (NITER == 1) ) then QLAT = 0.0 @@ -122,14 +115,16 @@ subroutine NoahmpGroundwaterInitMain(NoahmpIO) enddo endif - enddo !NITER -#if (EM_CORE == 1) -#ifdef DM_PARALLEL -# include "HALO_EM_HYDRO_NOAHMP.inc" -#endif +#ifdef MPP_LAND + rcount=float(ncount) + call sum_real1(rcount) + ncount=nint(rcount) #endif + enddo !NITER + + NoahmpIO%EQZWT=NoahmpIO%ZWTXY ! after adjusting, where qlat > 1cm/year now wtd is at the surface. diff --git a/drivers/erf/NoahmpIOVarInitMod.F90 b/drivers/erf/NoahmpIOVarInitMod.F90 index 11483d38..fc13167a 100644 --- a/drivers/erf/NoahmpIOVarInitMod.F90 +++ b/drivers/erf/NoahmpIOVarInitMod.F90 @@ -23,17 +23,18 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) implicit none type(NoahmpIO_type), intent(inout) :: NoahmpIO - + ! ------------------------------------------------- - associate( & - XSTART => NoahmpIO%XSTART ,& - XEND => NoahmpIO%XEND ,& - YSTART => NoahmpIO%YSTART ,& - YEND => NoahmpIO%YEND ,& - KDS => NoahmpIO%KDS ,& - KDE => NoahmpIO%KDE ,& - NSOIL => NoahmpIO%NSOIL ,& - NSNOW => NoahmpIO%NSNOW & + associate( & + XSTART => NoahmpIO%XSTART ,& + XEND => NoahmpIO%XEND ,& + YSTART => NoahmpIO%YSTART ,& + YEND => NoahmpIO%YEND ,& + KDS => NoahmpIO%KDS ,& + KDE => NoahmpIO%KDE ,& + NSOIL => NoahmpIO%NSOIL ,& + NSNOW => NoahmpIO%NSNOW ,& + NUMRAD => NoahmpIO%NUMRAD & ) ! ------------------------------------------------- @@ -298,6 +299,7 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) if ( .not. allocated (NoahmpIO%ACC_QINSURXY)) allocate ( NoahmpIO%ACC_QINSURXY (XSTART:XEND, YSTART:YEND) ) if ( .not. allocated (NoahmpIO%ACC_QSEVAXY) ) allocate ( NoahmpIO%ACC_QSEVAXY (XSTART:XEND, YSTART:YEND) ) if ( .not. allocated (NoahmpIO%ACC_ETRANIXY)) allocate ( NoahmpIO%ACC_ETRANIXY (XSTART:XEND,1:NSOIL,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%ACC_GLAFLWXY)) allocate ( NoahmpIO%ACC_GLAFLWXY (XSTART:XEND, YSTART:YEND) ) ! Needed for MMF_RUNOFF (IOPT_RUN = 5); not part of MP driver in WRF if ( .not. allocated (NoahmpIO%MSFTX) ) allocate ( NoahmpIO%MSFTX (XSTART:XEND,YSTART:YEND) ) @@ -318,6 +320,93 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) if ( .not. allocated (NoahmpIO%RIVERMASK) ) allocate ( NoahmpIO%RIVERMASK (XSTART:XEND,YSTART:YEND) ) if ( .not. allocated (NoahmpIO%NONRIVERXY) ) allocate ( NoahmpIO%NONRIVERXY (XSTART:XEND,YSTART:YEND) ) + ! Needed for SNICAR SNOW ALBEDO (IOPT_ALB = 3) + if ( NoahmpIO%IOPT_ALB == 3 ) then + + if ( NoahmpIO%SNICAR_BANDNUMBER_OPT == 1 ) then + NoahmpIO%snicar_numrad_snw = 5 + elseif ( NoahmpIO%SNICAR_BANDNUMBER_OPT == 2 ) then + NoahmpIO%snicar_numrad_snw = 480 + endif + + if ( .not. allocated (NoahmpIO%ss_alb_snw_drc) ) allocate ( NoahmpIO%ss_alb_snw_drc (NoahmpIO%idx_Mie_snw_mx,NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_snw_drc) ) allocate ( NoahmpIO%asm_prm_snw_drc (NoahmpIO%idx_Mie_snw_mx,NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_snw_drc) ) allocate ( NoahmpIO%ext_cff_mss_snw_drc (NoahmpIO%idx_Mie_snw_mx,NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ss_alb_snw_dfs) ) allocate ( NoahmpIO%ss_alb_snw_dfs (NoahmpIO%idx_Mie_snw_mx,NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_snw_dfs) ) allocate ( NoahmpIO%asm_prm_snw_dfs (NoahmpIO%idx_Mie_snw_mx,NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_snw_dfs) ) allocate ( NoahmpIO%ext_cff_mss_snw_dfs (NoahmpIO%idx_Mie_snw_mx,NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ss_alb_bc1) ) allocate ( NoahmpIO%ss_alb_bc1 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_bc1) ) allocate ( NoahmpIO%asm_prm_bc1 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_bc1) ) allocate ( NoahmpIO%ext_cff_mss_bc1 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ss_alb_bc2) ) allocate ( NoahmpIO%ss_alb_bc2 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_bc2) ) allocate ( NoahmpIO%asm_prm_bc2 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_bc2) ) allocate ( NoahmpIO%ext_cff_mss_bc2 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ss_alb_oc1) ) allocate ( NoahmpIO%ss_alb_oc1 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_oc1) ) allocate ( NoahmpIO%asm_prm_oc1 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_oc1) ) allocate ( NoahmpIO%ext_cff_mss_oc1 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ss_alb_oc2) ) allocate ( NoahmpIO%ss_alb_oc2 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_oc2) ) allocate ( NoahmpIO%asm_prm_oc2 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_oc2) ) allocate ( NoahmpIO%ext_cff_mss_oc2 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ss_alb_dst1) ) allocate ( NoahmpIO%ss_alb_dst1 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_dst1) ) allocate ( NoahmpIO%asm_prm_dst1 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_dst1)) allocate ( NoahmpIO%ext_cff_mss_dst1 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ss_alb_dst2) ) allocate ( NoahmpIO%ss_alb_dst2 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_dst2) ) allocate ( NoahmpIO%asm_prm_dst2 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_dst2)) allocate ( NoahmpIO%ext_cff_mss_dst2 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ss_alb_dst3) ) allocate ( NoahmpIO%ss_alb_dst3 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_dst3) ) allocate ( NoahmpIO%asm_prm_dst3 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_dst3)) allocate ( NoahmpIO%ext_cff_mss_dst3 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ss_alb_dst4) ) allocate ( NoahmpIO%ss_alb_dst4 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_dst4) ) allocate ( NoahmpIO%asm_prm_dst4 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_dst4)) allocate ( NoahmpIO%ext_cff_mss_dst4 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ss_alb_dst5) ) allocate ( NoahmpIO%ss_alb_dst5 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%asm_prm_dst5) ) allocate ( NoahmpIO%asm_prm_dst5 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%ext_cff_mss_dst5)) allocate ( NoahmpIO%ext_cff_mss_dst5 (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%flx_wgt_dir) ) allocate ( NoahmpIO%flx_wgt_dir (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%flx_wgt_dif) ) allocate ( NoahmpIO%flx_wgt_dif (NoahmpIO%snicar_numrad_snw) ) + if ( .not. allocated (NoahmpIO%snowage_tau) ) allocate ( NoahmpIO%snowage_tau (NoahmpIO%idx_rhos_max,NoahmpIO%idx_Tgrd_max,NoahmpIO%idx_T_max) ) + if ( .not. allocated (NoahmpIO%snowage_kappa) ) allocate ( NoahmpIO%snowage_kappa (NoahmpIO%idx_rhos_max,NoahmpIO%idx_Tgrd_max,NoahmpIO%idx_T_max) ) + if ( .not. allocated (NoahmpIO%snowage_drdt0) ) allocate ( NoahmpIO%snowage_drdt0 (NoahmpIO%idx_rhos_max,NoahmpIO%idx_Tgrd_max,NoahmpIO%idx_T_max) ) + if ( .not. allocated (NoahmpIO%SNRDSXY) ) allocate ( NoahmpIO%SNRDSXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) ! snow layer effective grain radius [microns, m-6] + if ( .not. allocated (NoahmpIO%SNFRXY) ) allocate ( NoahmpIO%SNFRXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) ! snow layer rate of snow freezing [mm/s] + if ( .not. allocated (NoahmpIO%BCPHIXY) ) allocate ( NoahmpIO%BCPHIXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%BCPHOXY) ) allocate ( NoahmpIO%BCPHOXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%OCPHIXY) ) allocate ( NoahmpIO%OCPHIXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%OCPHOXY) ) allocate ( NoahmpIO%OCPHOXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DUST1XY) ) allocate ( NoahmpIO%DUST1XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DUST2XY) ) allocate ( NoahmpIO%DUST2XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DUST3XY) ) allocate ( NoahmpIO%DUST3XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DUST4XY) ) allocate ( NoahmpIO%DUST4XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DUST5XY) ) allocate ( NoahmpIO%DUST5XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%MassConcBCPHIXY) ) allocate ( NoahmpIO%MassConcBCPHIXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%MassConcBCPHOXY) ) allocate ( NoahmpIO%MassConcBCPHOXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%MassConcOCPHIXY) ) allocate ( NoahmpIO%MassConcOCPHIXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%MassConcOCPHOXY) ) allocate ( NoahmpIO%MassConcOCPHOXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%MassConcDUST1XY) ) allocate ( NoahmpIO%MassConcDUST1XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%MassConcDUST2XY) ) allocate ( NoahmpIO%MassConcDUST2XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%MassConcDUST3XY) ) allocate ( NoahmpIO%MassConcDUST3XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%MassConcDUST4XY) ) allocate ( NoahmpIO%MassConcDUST4XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%MassConcDUST5XY) ) allocate ( NoahmpIO%MassConcDUST5XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DepBChydrophoXY) ) allocate ( NoahmpIO%DepBChydrophoXY (XSTART:XEND,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DepBChydrophiXY) ) allocate ( NoahmpIO%DepBChydrophiXY (XSTART:XEND,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DepOChydrophoXY) ) allocate ( NoahmpIO%DepOChydrophoXY (XSTART:XEND,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DepOChydrophiXY) ) allocate ( NoahmpIO%DepOChydrophiXY (XSTART:XEND,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DepDust1XY) ) allocate ( NoahmpIO%DepDust1XY (XSTART:XEND,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DepDust2XY) ) allocate ( NoahmpIO%DepDust2XY (XSTART:XEND,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DepDust3XY) ) allocate ( NoahmpIO%DepDust3XY (XSTART:XEND,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DepDust4XY) ) allocate ( NoahmpIO%DepDust4XY (XSTART:XEND,YSTART:YEND) ) + if ( .not. allocated (NoahmpIO%DepDust5XY) ) allocate ( NoahmpIO%DepDust5XY (XSTART:XEND,YSTART:YEND) ) + endif + + if ( .not. allocated (NoahmpIO%ALBSNOWDIRXY) ) allocate ( NoahmpIO%ALBSNOWDIRXY (XSTART:XEND,1:NUMRAD,YSTART:YEND) ) ! snow albedo (direct) + if ( .not. allocated (NoahmpIO%ALBSNOWDIFXY) ) allocate ( NoahmpIO%ALBSNOWDIFXY (XSTART:XEND,1:NUMRAD,YSTART:YEND) ) ! snow albedo (diffuse) + if ( .not. allocated (NoahmpIO%ALBSFCDIRXY) ) allocate ( NoahmpIO%ALBSFCDIRXY (XSTART:XEND,1:NUMRAD,YSTART:YEND) ) ! surface albedo (direct) + if ( .not. allocated (NoahmpIO%ALBSFCDIFXY) ) allocate ( NoahmpIO%ALBSFCDIFXY (XSTART:XEND,1:NUMRAD,YSTART:YEND) ) ! surface albedo (diffuse) + if ( .not. allocated (NoahmpIO%ALBSOILDIRXY) ) allocate ( NoahmpIO%ALBSOILDIRXY (XSTART:XEND,1:NUMRAD,YSTART:YEND) ) ! soil albedo (direct) + if ( .not. allocated (NoahmpIO%ALBSOILDIFXY) ) allocate ( NoahmpIO%ALBSOILDIFXY (XSTART:XEND,1:NUMRAD,YSTART:YEND) ) ! soil albedo (diffuse) + if ( .not. allocated (NoahmpIO%RadSwVisFrac) ) allocate ( NoahmpIO%RadSwVisFrac (XSTART:XEND,YSTART:YEND) ) ! downward solar radation visible fraction + if ( .not. allocated (NoahmpIO%RadSwDirFrac) ) allocate ( NoahmpIO%RadSwDirFrac (XSTART:XEND,YSTART:YEND) ) ! downward solar radation direct fraction + ! Needed for crop model (OPT_CROP=1) if ( .not. allocated (NoahmpIO%PGSXY) ) allocate ( NoahmpIO%PGSXY (XSTART:XEND, YSTART:YEND) ) if ( .not. allocated (NoahmpIO%CROPCAT) ) allocate ( NoahmpIO%CROPCAT (XSTART:XEND, YSTART:YEND) ) @@ -326,6 +415,16 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) if ( .not. allocated (NoahmpIO%SEASON_GDD)) allocate ( NoahmpIO%SEASON_GDD (XSTART:XEND, YSTART:YEND) ) if ( .not. allocated (NoahmpIO%CROPTYPE) ) allocate ( NoahmpIO%CROPTYPE (XSTART:XEND,5,YSTART:YEND) ) + ! Needed for Zhang et al. 2022 wetland model (OPT_WETLAND=1 or 2) + if ( NoahmpIO%IOPT_WETLAND > 0 ) then + if ( .not. allocated (NoahmpIO%FSATXY) ) allocate ( NoahmpIO%FSATXY (XSTART:XEND, YSTART:YEND) ) ! saturated fraction of the grid (-) + if ( .not. allocated (NoahmpIO%WSURFXY)) allocate ( NoahmpIO%WSURFXY (XSTART:XEND, YSTART:YEND) ) ! wetland water storage [mm] + endif + if ( NoahmpIO%IOPT_WETLAND == 2 ) then + if ( .not. allocated (NoahmpIO%FSATMX) ) allocate ( NoahmpIO%FSATMX (XSTART:XEND, YSTART:YEND) ) ! maximum saturated fraction + if ( .not. allocated (NoahmpIO%WCAP) ) allocate ( NoahmpIO%WCAP (XSTART:XEND, YSTART:YEND) ) ! maximum wetland capacity [m] + endif + ! Single- and Multi-layer Urban Models if ( NoahmpIO%SF_URBAN_PHYSICS > 0 ) then if ( .not. allocated (NoahmpIO%sh_urb2d) ) allocate ( NoahmpIO%sh_urb2d (XSTART:XEND,YSTART:YEND) ) @@ -340,7 +439,6 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) if ( .not. allocated (NoahmpIO%lb_urb2d) ) allocate ( NoahmpIO%lb_urb2d (XSTART:XEND,YSTART:YEND) ) if ( .not. allocated (NoahmpIO%hgt_urb2d) ) allocate ( NoahmpIO%hgt_urb2d (XSTART:XEND,YSTART:YEND) ) if ( .not. allocated (NoahmpIO%ust) ) allocate ( NoahmpIO%ust (XSTART:XEND,YSTART:YEND) ) - !ENDIF !IF(NoahmpIO%SF_URBAN_PHYSICS == 1 ) THEN ! single layer urban model if ( .not. allocated (NoahmpIO%cmr_sfcdif) ) allocate ( NoahmpIO%cmr_sfcdif (XSTART:XEND, YSTART:YEND) ) @@ -596,6 +694,14 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) NoahmpIO%CANHSXY = undefined_real NoahmpIO%Z0 = undefined_real NoahmpIO%ZNT = undefined_real + NoahmpIO%ALBSNOWDIRXY = undefined_real + NoahmpIO%ALBSNOWDIFXY = undefined_real + NoahmpIO%ALBSFCDIRXY = undefined_real + NoahmpIO%ALBSFCDIFXY = undefined_real + NoahmpIO%ALBSOILDIRXY = 0.0 + NoahmpIO%ALBSOILDIFXY = 0.0 + NoahmpIO%RadSwVisFrac = undefined_real + NoahmpIO%RadSwDirFrac = undefined_real NoahmpIO%TAUSSXY = 0.0 NoahmpIO%DEEPRECHXY = 0.0 NoahmpIO%RECHXY = 0.0 @@ -652,6 +758,7 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) NoahmpIO%ACC_ECANXY = 0.0 NoahmpIO%ACC_ETRANXY = 0.0 NoahmpIO%ACC_EDIRXY = 0.0 + NoahmpIO%ACC_GLAFLWXY = 0.0 ! MMF Groundwater NoahmpIO%TERRAIN = undefined_real @@ -672,6 +779,77 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) NoahmpIO%QSLATXY = undefined_real NoahmpIO%QLATXY = undefined_real + ! SNICAR snow albedo + if ( NoahmpIO%IOPT_ALB == 3 ) then + NoahmpIO%ss_alb_snw_drc = undefined_real + NoahmpIO%asm_prm_snw_drc = undefined_real + NoahmpIO%ext_cff_mss_snw_drc = undefined_real + NoahmpIO%ss_alb_snw_dfs = undefined_real + NoahmpIO%asm_prm_snw_dfs = undefined_real + NoahmpIO%ext_cff_mss_snw_dfs = undefined_real + NoahmpIO%ss_alb_bc1 = undefined_real + NoahmpIO%asm_prm_bc1 = undefined_real + NoahmpIO%ext_cff_mss_bc1 = undefined_real + NoahmpIO%ss_alb_bc2 = undefined_real + NoahmpIO%asm_prm_bc2 = undefined_real + NoahmpIO%ext_cff_mss_bc2 = undefined_real + NoahmpIO%ss_alb_oc1 = undefined_real + NoahmpIO%asm_prm_oc1 = undefined_real + NoahmpIO%ext_cff_mss_oc1 = undefined_real + NoahmpIO%ss_alb_oc2 = undefined_real + NoahmpIO%asm_prm_oc2 = undefined_real + NoahmpIO%ext_cff_mss_oc2 = undefined_real + NoahmpIO%ss_alb_dst1 = undefined_real + NoahmpIO%asm_prm_dst1 = undefined_real + NoahmpIO%ext_cff_mss_dst1 = undefined_real + NoahmpIO%ss_alb_dst2 = undefined_real + NoahmpIO%asm_prm_dst2 = undefined_real + NoahmpIO%ext_cff_mss_dst2 = undefined_real + NoahmpIO%ss_alb_dst3 = undefined_real + NoahmpIO%asm_prm_dst3 = undefined_real + NoahmpIO%ext_cff_mss_dst3 = undefined_real + NoahmpIO%ss_alb_dst4 = undefined_real + NoahmpIO%asm_prm_dst4 = undefined_real + NoahmpIO%ext_cff_mss_dst4 = undefined_real + NoahmpIO%ss_alb_dst5 = undefined_real + NoahmpIO%asm_prm_dst5 = undefined_real + NoahmpIO%ext_cff_mss_dst5 = undefined_real + NoahmpIO%flx_wgt_dir = undefined_real + NoahmpIO%flx_wgt_dif = undefined_real + NoahmpIO%snowage_tau = undefined_real + NoahmpIO%snowage_kappa = undefined_real + NoahmpIO%snowage_drdt0 = undefined_real + NoahmpIO%SNRDSXY = undefined_real + NoahmpIO%SNFRXY = undefined_real + NoahmpIO%BCPHOXY = undefined_real + NoahmpIO%BCPHIXY = undefined_real + NoahmpIO%OCPHOXY = undefined_real + NoahmpIO%OCPHIXY = undefined_real + NoahmpIO%DUST1XY = undefined_real + NoahmpIO%DUST2XY = undefined_real + NoahmpIO%DUST3XY = undefined_real + NoahmpIO%DUST4XY = undefined_real + NoahmpIO%DUST5XY = undefined_real + NoahmpIO%MassConcBCPHOXY = undefined_real + NoahmpIO%MassConcBCPHIXY = undefined_real + NoahmpIO%MassConcOCPHOXY = undefined_real + NoahmpIO%MassConcOCPHIXY = undefined_real + NoahmpIO%MassConcDUST1XY = undefined_real + NoahmpIO%MassConcDUST2XY = undefined_real + NoahmpIO%MassConcDUST3XY = undefined_real + NoahmpIO%MassConcDUST4XY = undefined_real + NoahmpIO%MassConcDUST5XY = undefined_real + NoahmpIO%DepBChydrophoXY = undefined_real + NoahmpIO%DepBChydrophiXY = undefined_real + NoahmpIO%DepOChydrophoXY = undefined_real + NoahmpIO%DepOChydrophiXY = undefined_real + NoahmpIO%DepDust1XY = undefined_real + NoahmpIO%DepDust2XY = undefined_real + NoahmpIO%DepDust3XY = undefined_real + NoahmpIO%DepDust4XY = undefined_real + NoahmpIO%DepDust5XY = undefined_real + endif + ! crop model NoahmpIO%PGSXY = undefined_int NoahmpIO%CROPCAT = undefined_int @@ -702,6 +880,16 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) NoahmpIO%IRRSPLH = 0.0 NoahmpIO%LOCTIM = undefined_real + ! wetland model (Zhang et al. 2022) + if ( NoahmpIO%IOPT_WETLAND > 0 ) then + NoahmpIO%FSATXY = undefined_real + NoahmpIO%WSURFXY = undefined_real + endif + if ( NoahmpIO%IOPT_WETLAND == 2 ) then + NoahmpIO%FSATMX = undefined_real + NoahmpIO%WCAP = undefined_real + endif + ! spatial varying soil texture if ( NoahmpIO%IOPT_SOIL > 1 ) then NoahmpIO%SOILCL1 = undefined_real @@ -851,7 +1039,7 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) #endif end associate - + end subroutine NoahmpIOVarInitDefault end module NoahmpIOVarInitMod diff --git a/drivers/erf/NoahmpIOVarType.F90 b/drivers/erf/NoahmpIOVarType.F90 index cbbcf988..921463a4 100644 --- a/drivers/erf/NoahmpIOVarType.F90 +++ b/drivers/erf/NoahmpIOVarType.F90 @@ -6,7 +6,7 @@ module NoahmpIOVarType ! ------------------------ Code history ----------------------------------- ! Original code: Guo-Yue Niu and Noah-MP team (Niu et al. 2011) ! Refactered code: C. He, P. Valayamkunnath & refactor team (He et al. 2023) -! Fortran-C API: A. Dhruv, M. Buehlmann, & R. Kotamarthi (2024) +! Fortran-C API: A. Dhruv, M. Buehlmann, & R. Kotamarthi (2024) ! ------------------------------------------------------------------------- use, intrinsic :: iso_c_binding, only: C_INT, C_DOUBLE, C_PTR, C_CHAR @@ -53,7 +53,7 @@ module NoahmpIOVarType integer :: IOPT_FRZ ! supercooled liquid water (1-> NY06; 2->Koren99) integer :: IOPT_INF ! frozen soil permeability (1-> NY06; 2->Koren99) integer :: IOPT_RAD ! radiation transfer (1->gap=F(3D,cosz); 2->gap=0; 3->gap=1-Fveg) - integer :: IOPT_ALB ! snow surface albedo (1->BATS; 2->CLASS) + integer :: IOPT_ALB ! snow surface albedo (1->BATS; 2->CLASS; 3->SNICAR) integer :: IOPT_SNF ! rainfall & snowfall (1-Jordan91; 2->BATS; 3->Noah) integer :: IOPT_TKSNO ! snow thermal conductivity: 1 -> Stieglitz(yen,1965) scheme (default), 2 -> Anderson, 1976 scheme, 3 -> constant, 4 -> Verseghy (1991) scheme, 5 -> Douvill(Yen, 1981) scheme integer :: IOPT_TBOT ! lower boundary of soil temperature (1->zero-flux; 2->Noah) @@ -68,6 +68,8 @@ module NoahmpIOVarType integer :: IOPT_IRRM ! irrigation method (0->dynamic; 1-> sprinkler; 2-> micro; 3-> flood) integer :: IOPT_INFDV ! infiltration options for dynamic VIC (1->Philip; 2-> Green-Ampt;3->Smith-Parlange) integer :: IOPT_TDRN ! drainage option (0->off; 1->simple scheme; 2->Hooghoudt's scheme) + integer :: IOPT_COMPACT ! snowpack compaction (1->Anderson1976; 2->Abolafia-Rosenzweig2024) + integer :: IOPT_WETLAND ! wetland model option (0->off; 1->Zhang2022 fixed parameter; 2->Zhang2022 read in 2D parameter) real(kind=kind_noahmp) :: XICE_THRESHOLD ! fraction of grid determining seaice real(kind=kind_noahmp) :: JULIAN ! Julian day real(kind=kind_noahmp) :: DTBL ! timestep [s] @@ -114,11 +116,11 @@ module NoahmpIOVarType real(kind=kind_noahmp), allocatable, dimension(:,:) :: MP_HAIL ! hail precipitation entering land model [mm] ! MB/AN : v3.7 #ifdef WRF_HYDRO - real(kind=kind_noahmp), allocatable, dimension(:,:) :: infxsrt ! surface infiltration - real(kind=kind_noahmp), allocatable, dimension(:,:) :: sfcheadrt ! surface water head - real(kind=kind_noahmp), allocatable, dimension(:,:) :: soldrain ! soil drainage - real(kind=kind_noahmp), allocatable, dimension(:,:) :: qtiledrain ! tile drainage - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ZWATBLE2D ! water table depth + real(kind=kind_noahmp), allocatable, dimension(:,:) :: infxsrt ! surface infiltration + real(kind=kind_noahmp), allocatable, dimension(:,:) :: sfcheadrt ! surface water head + real(kind=kind_noahmp), allocatable, dimension(:,:) :: soldrain ! soil drainage + real(kind=kind_noahmp), allocatable, dimension(:,:) :: qtiledrain ! tile drainage + real(kind=kind_noahmp), allocatable, dimension(:,:) :: ZWATBLE2D ! water table depth #endif ! Spatially varying fields (for now it is de-activated) @@ -335,6 +337,7 @@ module NoahmpIOVarType real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACC_ETRANXY ! accumulated transpiration per soil timestep [mm] real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACC_EDIRXY ! accumulated net ground (soil/snow) evaporation per soil timestep [mm] real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ACC_ETRANIXY ! accumualted transpiration rate within soil timestep [m/s * dt_soil/dt_main] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACC_GLAFLWXY ! accumulated glacier excessive flow [mm] per soil timestep !------------------------------------------------------------------------ ! Needed for MMF_RUNOFF (IOPT_RUN = 5); not part of MP driver in WRF @@ -359,6 +362,124 @@ module NoahmpIOVarType real(kind=kind_noahmp), allocatable, dimension(:,:) :: NONRIVERXY ! non-river portion real(kind=kind_noahmp) :: WTDDT = 30.0 ! frequency of groundwater call [minutes] integer :: STEPWTD ! step of groundwater call + integer :: NUMRAD = 2 ! number of shortwave band + +!------------------------------------------------------------------------ +! Needed for SNICAR SNOW ALBEDO (IOPT_ALB = 3) +!------------------------------------------------------------------------ + + integer :: SNICAR_BANDNUMBER_OPT !number of wavelength bands used in SNICAR snow albedo calculation + ! 1->5;2->480 + integer :: SNICAR_SOLARSPEC_OPT !type of downward solar radiation spectrum for SNICAR snow albedo calculation + ! 1->mid-latitude winter;2->mid-latitude summer;3->sub-Arctic winter; + ! 4->sub-Arctic summer;5->Summit,Greenland,summer;6->High Mountain summer; + integer :: SNICAR_SNOWOPTICS_OPT !snow optics type using different refractive index databases in SNICAR + ! 1->Warren (1984);2->Warren and Brandt (2008);3->Picard et al (2016) + integer :: SNICAR_DUSTOPTICS_OPT !dust optics type for SNICAR snow albedo calculation + ! 1->Saharan dust (Balkanski et al., 2007, central hematite) + ! 2->San Juan Mountains dust, CO (Skiles et al, 2017) + ! 3->Greenland dust (Polashenski et al., 2015, central absorptivity) + integer :: SNICAR_RTSOLVER_OPT !option for two different SNICAR radiative transfer solver + ! 1->Toon et a 1989 2-stream (Flanner et al. 2007) + ! 2->Adding-doubling 2-stream (Dang et al.2019) + integer :: SNICAR_SNOWSHAPE_OPT !option for snow grain shape in SNICAR (He et al. 2017 JC) + ! 1->sphere; 2->spheroid; 3->hexagonal plate; 4->Koch snowflake + logical :: SNICAR_USE_AEROSOL !option to turn on/off aerosol deposition flux effect in snow in SNICAR + logical :: SNICAR_SNOWBC_INTMIX !option to activate BC-snow internal mixing in SNICAR (He et al. 2017 JC) + ! false->external mixing for all BC; true->internal mixing for hydrophilic BC + logical :: SNICAR_SNOWDUST_INTMIX !option to activate dust-snow internal mixing in SNICAR (He et al. 2017 JC) + ! false->external mixing for all dust; true->internal mixing for all dust + logical :: SNICAR_USE_OC !option to activate OC in snow in SNICAR + logical :: SNICAR_AEROSOL_READTABLE !option to read aerosol deposition fluxes from table (on) or NetCDF forcing file (off) + integer :: idx_Mie_snw_mx = 1471 ! number of effective radius indices used in Mie lookup table [idx] + integer :: snicar_numrad_snw ! wavelength bands used in SNICAR snow albedo calculation + integer :: idx_T_max = 11 ! maxiumum temperature index used in aging lookup table [idx] + integer :: idx_Tgrd_max = 31 ! maxiumum temperature gradient index used in aging lookup table [idx] + integer :: idx_rhos_max = 8 ! maxiumum snow density index used in aging lookup table [idx] + character(len=256) :: forcing_name_BCPHI ! forcing variable for hydrophilic black carbon deposition flux [kg/m2/s] + character(len=256) :: forcing_name_BCPHO ! forcing variable for hydrophobic black carbon deposition flux [kg/m2/s] + character(len=256) :: forcing_name_OCPHI ! forcing variable for hydrophilic organic carbon deposition flux [kg/m2/s] + character(len=256) :: forcing_name_OCPHO ! forcing variable for hydrophobic organic carbon deposition flux [kg/m2/s] + character(len=256) :: forcing_name_DUST1 ! forcing variable for dust size bin 1 deposition flux [kg/m2/s] + character(len=256) :: forcing_name_DUST2 ! forcing variable for dust size bin 2 deposition flux [kg/m2/s] + character(len=256) :: forcing_name_DUST3 ! forcing variable for dust size bin 3 deposition flux [kg/m2/s] + character(len=256) :: forcing_name_DUST4 ! forcing variable for dust size bin 4 deposition flux [kg/m2/s] + character(len=256) :: forcing_name_DUST5 ! forcing variable for dust size bin 5 deposition flux [kg/m2/s] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: ss_alb_snw_drc ! Mie single scatter albedos for direct-beam ice + real(kind=kind_noahmp), allocatable, dimension(:,:) :: asm_prm_snw_drc ! asymmetry parameter of direct-beam ice + real(kind=kind_noahmp), allocatable, dimension(:,:) :: ext_cff_mss_snw_drc ! mass extinction coefficient for direct-beam ice [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: ss_alb_snw_dfs ! Mie single scatter albedos for diffuse ice + real(kind=kind_noahmp), allocatable, dimension(:,:) :: asm_prm_snw_dfs ! asymmetry parameter of diffuse ice + real(kind=kind_noahmp), allocatable, dimension(:,:) :: ext_cff_mss_snw_dfs ! mass extinction coefficient for diffuse ice [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:) :: ss_alb_bc1 ! Mie single scatter albedos for hydrophillic BC + real(kind=kind_noahmp), allocatable, dimension(:) :: asm_prm_bc1 ! asymmetry parameter for hydrophillic BC + real(kind=kind_noahmp), allocatable, dimension(:) :: ext_cff_mss_bc1 ! mass extinction coefficient for hydrophillic BC [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:) :: ss_alb_bc2 ! Mie single scatter albedos for hydrophobic BC + real(kind=kind_noahmp), allocatable, dimension(:) :: asm_prm_bc2 ! asymmetry parameter for hydrophobic BC + real(kind=kind_noahmp), allocatable, dimension(:) :: ext_cff_mss_bc2 ! mass extinction coefficient for hydrophobic BC [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:) :: ss_alb_oc1 ! Mie single scatter albedos for hydrophillic OC + real(kind=kind_noahmp), allocatable, dimension(:) :: asm_prm_oc1 ! asymmetry parameter for hydrophillic OC + real(kind=kind_noahmp), allocatable, dimension(:) :: ext_cff_mss_oc1 ! mass extinction coefficient for hydrophillic OC [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:) :: ss_alb_oc2 ! Mie single scatter albedos for hydrophobic OC + real(kind=kind_noahmp), allocatable, dimension(:) :: asm_prm_oc2 ! asymmetry parameter for hydrophobic OC + real(kind=kind_noahmp), allocatable, dimension(:) :: ext_cff_mss_oc2 ! mass extinction coefficient for hydrophobic OC [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:) :: ss_alb_dst1 ! Mie single scatter albedos for dust species 1 + real(kind=kind_noahmp), allocatable, dimension(:) :: asm_prm_dst1 ! asymmetry parameter for dust species 1 + real(kind=kind_noahmp), allocatable, dimension(:) :: ext_cff_mss_dst1 ! mass extinction coefficient for dust species 1 [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:) :: ss_alb_dst2 ! Mie single scatter albedos for dust species 2 + real(kind=kind_noahmp), allocatable, dimension(:) :: asm_prm_dst2 ! asymmetry parameter for dust species 2 + real(kind=kind_noahmp), allocatable, dimension(:) :: ext_cff_mss_dst2 ! mass extinction coefficient for dust species 2 [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:) :: ss_alb_dst3 ! Mie single scatter albedos for dust species 3 + real(kind=kind_noahmp), allocatable, dimension(:) :: asm_prm_dst3 ! asymmetry parameter for dust species 3 + real(kind=kind_noahmp), allocatable, dimension(:) :: ext_cff_mss_dst3 ! mass extinction coefficient for dust species 3 [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:) :: ss_alb_dst4 ! Mie single scatter albedos for dust species 4 + real(kind=kind_noahmp), allocatable, dimension(:) :: asm_prm_dst4 ! asymmetry parameter for dust species 4 + real(kind=kind_noahmp), allocatable, dimension(:) :: ext_cff_mss_dst4 ! mass extinction coefficient for dust species 4 [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:) :: ss_alb_dst5 ! Mie single scatter albedos for dust species 5 + real(kind=kind_noahmp), allocatable, dimension(:) :: asm_prm_dst5 ! asymmetry parameter for dust species 5 + real(kind=kind_noahmp), allocatable, dimension(:) :: ext_cff_mss_dst5 ! mass extinction coefficient for dust species 5 [m2/kg] + real(kind=kind_noahmp), allocatable, dimension(:) :: flx_wgt_dir ! downward direct solar radiation spectral weights for wavelength band + real(kind=kind_noahmp), allocatable, dimension(:) :: flx_wgt_dif ! downward diffuse solar radiation spectral weights for wavelength band + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: snowage_tau ! Snow aging parameters retrieved from lookup table [hour] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: snowage_kappa ! Snow aging parameters retrieved from lookup table [unitless] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: snowage_drdt0 ! Snow aging parameters retrieved from lookup table [m2 kg-1 hr-1] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SNRDSXY ! snow layer effective grain radius [microns, m-6] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SNFRXY ! snow layer rate of snow freezing [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: BCPHIXY ! mass of hydrophillic Black Carbon in snow [kg/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: BCPHOXY ! mass of hydrophobic Black Carbon in snow [kg/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: OCPHIXY ! mass of hydrophillic Organic Carbon in snow [kg/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: OCPHOXY ! mass of hydrophobic Organic Carbon in snow [kg/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: DUST1XY ! mass of dust species 1 in snow [kg/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: DUST2XY ! mass of dust species 2 in snow [kg/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: DUST3XY ! mass of dust species 3 in snow [kg/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: DUST4XY ! mass of dust species 4 in snow [kg/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: DUST5XY ! mass of dust species 5 in snow [kg/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: MassConcBCPHIXY ! mass concentration of hydrophillic Black Carbon in snow [kg/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: MassConcBCPHOXY ! mass concentration of hydrophobic Black Carbon in snow [kg/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: MassConcOCPHIXY ! mass concentration of hydrophillic Organic Carbon in snow [kg/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: MassConcOCPHOXY ! mass concentration of hydrophobic Organic Carbon in snow [kg/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: MassConcDUST1XY ! mass concentration of dust species 1 in snow [kg/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: MassConcDUST2XY ! mass concentration of dust species 2 in snow [kg/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: MassConcDUST3XY ! mass concentration of dust species 3 in snow [kg/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: MassConcDUST4XY ! mass concentration of dust species 4 in snow [kg/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: MassConcDUST5XY ! mass concentration of dust species 5 in snow [kg/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: DepBChydrophoXY ! hydrophobic Black Carbon deposition [kg m-2 s-1] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: DepBChydrophiXY ! hydrophillic Black Carbon deposition [kg m-2 s-1] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: DepOChydrophoXY ! hydrophobic Organic Carbon deposition [kg m-2 s-1] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: DepOChydrophiXY ! hydrophillic Organic Carbon deposition [kg m-2 s-1] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: DepDust1XY ! dust species 1 deposition [kg m-2 s-1] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: DepDust2XY ! dust species 2 deposition [kg m-2 s-1] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: DepDust3XY ! dust species 3 deposition [kg m-2 s-1] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: DepDust4XY ! dust species 4 deposition [kg m-2 s-1] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: DepDust5XY ! dust species 5 deposition [kg m-2 s-1] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ALBSOILDIRXY ! soil albedo (direct) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ALBSOILDIFXY ! soil albedo (diffuse) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ALBSNOWDIRXY ! snow albedo (direct) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ALBSNOWDIFXY ! snow albedo (diffuse) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ALBSFCDIRXY ! surface albedo (direct) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ALBSFCDIFXY ! surface albedo (diffuse) + real(kind=kind_noahmp), allocatable, dimension(:,:) :: RadSwVisFrac ! fraction of downward solar visible band + real(kind=kind_noahmp), allocatable, dimension(:,:) :: RadSwDirFrac ! fraction of downward solar direct band !------------------------------------------------------------------------ ! Needed for TILE DRAINAGE IF IOPT_TDRN = 1 OR 2 @@ -376,6 +497,14 @@ module NoahmpIOVarType real(kind=kind_noahmp), allocatable, dimension(:,:) :: SEASON_GDD ! seasonal GDD real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CROPTYPE ! crop type +!------------------------------------------------------------------------ +! Needed for wetland model (OPT_WETLAND=1 or 2) +!------------------------------------------------------------------------ + real(kind=kind_noahmp), allocatable, dimension(:,:) :: FSATXY ! saturated fraction of the grid (-) + real(kind=kind_noahmp), allocatable, dimension(:,:) :: WSURFXY ! wetland water storage [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:) :: FSATMX ! maximum saturated fraction + real(kind=kind_noahmp), allocatable, dimension(:,:) :: WCAP ! maximum wetland capacity [m] + !------------------------------------------------------------------------ ! Single- and Multi-layer Urban Models !------------------------------------------------------------------------ @@ -546,10 +675,11 @@ module NoahmpIOVarType integer :: J integer :: SLOPETYP integer :: YEARLEN - integer(C_INT), pointer :: NSNOW ! number of snow layers fixed to 3 + integer(C_INT), pointer :: NSNOW ! number of snow layers fixed to 3 logical :: update_lai, update_veg integer :: spinup_loop logical :: reset_spinup_date + logical :: reset_spinup_datea !--------------------------------------------------------------------- ! File naming, parallel @@ -644,6 +774,8 @@ module NoahmpIOVarType character(len=256) :: forcing_name_SW character(len=256) :: forcing_name_PR character(len=256) :: forcing_name_SN + character(len=256) :: forcing_name_DirFrac + character(len=256) :: forcing_name_VisFrac integer :: noahmp_output ! =0: default output; >0 include additional output integer :: split_output_count @@ -657,6 +789,8 @@ module NoahmpIOVarType character(len=256) :: external_lai_filename_template character(len=256) :: agdata_flnm character(len=256) :: tdinput_flnm + character(len=256) :: snicar_optic_flnm ! SNICAR filename for optics parameters + character(len=256) :: snicar_age_flnm ! SNICAR filename for snow aging parameters integer(C_INT), pointer :: xstart, xend, ystart, yend integer :: MAX_SOIL_LEVELS real(kind=kind_noahmp), allocatable, dimension(:) :: soil_thick_input @@ -783,6 +917,12 @@ module NoahmpIOVarType real(kind=kind_noahmp) :: C5_SNOWCOMPACT_TABLE ! snow desctructive metamorphism compaction parameter3 real(kind=kind_noahmp) :: DM_SNOWCOMPACT_TABLE ! upper Limit on destructive metamorphism compaction [kg/m3] real(kind=kind_noahmp) :: ETA0_SNOWCOMPACT_TABLE ! snow viscosity coefficient [kg-s/m2] + real(kind=kind_noahmp) :: SNOWCOMPACTm_AR24_TABLE ! snow compaction m parameter for linear sfc temp fitting from AR24 + real(kind=kind_noahmp) :: SNOWCOMPACTb_AR24_TABLE ! snow compaction b parameter for linear sfc temp fitting from AR24 + real(kind=kind_noahmp) :: SNOWCOMPACT_P1_AR24_TABLE ! lower constrain for SnowCompactBurdenFac for high pressure bin from AR24 + real(kind=kind_noahmp) :: SNOWCOMPACT_P2_AR24_TABLE ! lower constrain for SnowCompactBurdenFac for mid pressure bin from AR24 + real(kind=kind_noahmp) :: SNOWCOMPACT_P3_AR24_TABLE ! lower constrain for SnowCompactBurdenFac for low pressure bin from AR24 + real(kind=kind_noahmp) :: SNOWCOMPACT_Up_AR24_TABLE ! upper constraint on SnowCompactBurdenFac from AR24 real(kind=kind_noahmp) :: SNLIQMAXFRAC_TABLE ! maximum liquid water fraction in snow real(kind=kind_noahmp) :: SWEMAXGLA_TABLE ! Maximum SWE allowed at glaciers (mm) real(kind=kind_noahmp) :: WSLMAX_TABLE ! maximum lake water storage (mm) @@ -796,6 +936,34 @@ module NoahmpIOVarType real(kind=kind_noahmp) :: Z0SOIL_TABLE ! Bare-soil roughness length (m) (i.e., under the canopy) real(kind=kind_noahmp) :: Z0LAKE_TABLE ! Lake surface roughness length (m) + ! SNICAR scheme parameters + real(kind=kind_noahmp) :: DepBChydropho_TABLE ! hydrophobic Black Carbon deposition [kg m-2 s-1], assume constant read from table + real(kind=kind_noahmp) :: DepBChydrophi_TABLE ! hydrophillic Black Carbon deposition [kg m-2 s-1], assume constant read from table + real(kind=kind_noahmp) :: DepOChydropho_TABLE ! hydrophobic Organic Carbon deposition [kg m-2 s-1], assume constant read from table + real(kind=kind_noahmp) :: DepOChydrophi_TABLE ! hydrophillic Organic Carbon deposition [kg m-2 s-1], assume constant read from table + real(kind=kind_noahmp) :: DepDust1_TABLE ! dust species 1 deposition [kg m-2 s-1], assume constant read from table + real(kind=kind_noahmp) :: DepDust2_TABLE ! dust species 2 deposition [kg m-2 s-1], assume constant read from table + real(kind=kind_noahmp) :: DepDust3_TABLE ! dust species 3 deposition [kg m-2 s-1], assume constant read from table + real(kind=kind_noahmp) :: DepDust4_TABLE ! dust species 4 deposition [kg m-2 s-1], assume constant read from table + real(kind=kind_noahmp) :: DepDust5_TABLE ! dust species 5 deposition [kg m-2 s-1], assume constant read from table + real(kind=kind_noahmp) :: SnowRadiusMin_TABLE ! minimum allowed snow effective radius (also cold "fresh snow" value) [microns] + real(kind=kind_noahmp) :: FreshSnowRadiusMax_TABLE ! maximum warm fresh snow effective radius [microns] + real(kind=kind_noahmp) :: SnowRadiusRefrz_TABLE ! effective radius of re-frozen snow [microns] + real(kind=kind_noahmp) :: ScavEffMeltScale_TABLE ! Scaling factor modifying scavenging factors for aerosol in meltwater (-) + real(kind=kind_noahmp) :: ScavEffMeltBCphi_TABLE ! scavenging factor for hydrophillic BC inclusion in meltwater [frc] + real(kind=kind_noahmp) :: ScavEffMeltBCpho_TABLE ! scavenging factor for hydrophobic BC inclusion in meltwater [frc] + real(kind=kind_noahmp) :: ScavEffMeltOCphi_TABLE ! scavenging factor for hydrophillic OC inclusion in meltwater [frc] + real(kind=kind_noahmp) :: ScavEffMeltOCpho_TABLE ! scavenging factor for hydrophobic OC inclusion in meltwater [frc] + real(kind=kind_noahmp) :: ScavEffMeltDust1_TABLE ! scavenging factor for dust species 1 inclusion in meltwater [frc] + real(kind=kind_noahmp) :: ScavEffMeltDust2_TABLE ! scavenging factor for dust species 2 inclusion in meltwater [frc] + real(kind=kind_noahmp) :: ScavEffMeltDust3_TABLE ! scavenging factor for dust species 3 inclusion in meltwater [frc] + real(kind=kind_noahmp) :: ScavEffMeltDust4_TABLE ! scavenging factor for dust species 4 inclusion in meltwater [frc] + real(kind=kind_noahmp) :: ScavEffMeltDust5_TABLE ! scavenging factor for dust species 5 inclusion in meltwater [frc] + real(kind=kind_noahmp) :: SnowRadiusMax_TABLE ! maximum allowed snow effective radius [microns] + real(kind=kind_noahmp) :: SnowWetAgeC1Brun89_TABLE ! constant for liquid water grain growth [m3 s-1], from Brun89 + real(kind=kind_noahmp) :: SnowWetAgeC2Brun89_TABLE ! Constant for liquid water grain growth [m3 s-1], from Brun89: corrected for LWC + real(kind=kind_noahmp) :: SnowAgeScaleFac_TABLE ! Arbitrary scaling factor applied to snow aging rate (-) + ! irrigation parameters integer :: IRR_HAR_TABLE ! number of days before harvest date to stop irrigation real(kind=kind_noahmp) :: IRR_FRAC_TABLE ! irrigation Fraction @@ -873,6 +1041,9 @@ module NoahmpIOVarType real(kind=kind_noahmp), allocatable, dimension(:,:) :: RTCT_TABLE ! fraction of carbohydrate translocation from root to grain real(kind=kind_noahmp), allocatable, dimension(:) :: BIO2LAI_TABLE ! leaf area per living leaf biomass [m2/kg] + ! wetland parameter (OPT_WETLAND=1) + real(kind=kind_noahmp) :: WCAP_TABLE ! maximum surface wetland capacity + ! soil parameters integer :: SLCATS_TABLE ! number of soil categories real(kind=kind_noahmp), allocatable, dimension(:) :: BEXP_TABLE ! soil B parameter diff --git a/drivers/erf/NoahmpInitMainMod.F90 b/drivers/erf/NoahmpInitMainMod.F90 index c8b02475..f22346f7 100644 --- a/drivers/erf/NoahmpInitMainMod.F90 +++ b/drivers/erf/NoahmpInitMainMod.F90 @@ -16,16 +16,15 @@ subroutine NoahmpInitMain(NoahmpIO) ! Original Noah-MP subroutine: NOAHMP_INIT ! Original code: Guo-Yue Niu and Noah-MP team (Niu et al. 2011) ! Refactered code: C. He, P. Valayamkunnath, & refactor team (He et al. 2023) -! Fortran-C API: A. Dhruv, M. Buehlmann, & R. Kotamarthi (2024) ! --------------------------------------------------------------------------- implicit none - - type(NoahmpIO_type), intent(inout) :: NoahmpIO + + type(NoahmpIO_type), intent(inout) :: NoahmpIO ! local variables integer :: ide,jde,its,jts,itf,jtf - integer :: I,J,errflag,NS + integer :: I,J,errflag,NS,IZ logical :: urbanpt_flag real(kind=kind_noahmp) :: BEXP, SMCMAX, PSISAT, FK real(kind=kind_noahmp), parameter :: BLIM = 5.5 @@ -39,13 +38,12 @@ subroutine NoahmpInitMain(NoahmpIO) jde = NoahmpIO%jde+1 its = NoahmpIO%its jts = NoahmpIO%jts + itf = min0(NoahmpIO%ite, ide-1) + jtf = min0(NoahmpIO%jte, jde-1) ! only initialize for non-restart case if ( .not. NoahmpIO%restart_flag ) then - itf = min0(NoahmpIO%ite, ide-1) - jtf = min0(NoahmpIO%jte, jde-1) - ! initialize physical snow height SNOWH if ( .not. NoahmpIO%FNDSNOWH ) then ! If no SNOWH do the following @@ -152,6 +150,10 @@ subroutine NoahmpInitMain(NoahmpIO) NoahmpIO%QSNOWXY(I,J) = 0.0 NoahmpIO%QRAINXY(I,J) = 0.0 NoahmpIO%WSLAKEXY(I,J) = 0.0 + if ( NoahmpIO%IOPT_WETLAND > 0 ) then + NoahmpIO%FSATXY(I,J) = 0.0 + NoahmpIO%WSURFXY(I,J) = 0.0 + endif if ( NoahmpIO%IOPT_RUNSUB /= 5 ) then NoahmpIO%WAXY(I,J) = 4900.0 NoahmpIO%WTXY(I,J) = NoahmpIO%WAXY(i,j) @@ -281,9 +283,39 @@ subroutine NoahmpInitMain(NoahmpIO) NoahmpIO%SHBXY = 0.0 NoahmpIO%EVBXY = 0.0 - if (NoahmpIO%rank == 0) print*, "NTIME = ", NoahmpIO%NTIME , "KHOUR=",NoahmpIO%KHOUR,"dtbl = ", NoahmpIO%dtbl + if (NoahmpIO%rank == 0) print*, "NTIME = ", NoahmpIO%NTIME , "KHOUR=",NoahmpIO%KHOUR,"dtbl = ", NoahmpIO%dtbl call system_clock(count=NoahmpIO%clock_count_1) ! Start a timer - + + if ( NoahmpIO%IOPT_ALB == 3 ) then ! initialize SNICAR aerosol content in snow + do J = jts, jtf + do I = its, itf + do IZ = -NoahmpIO%NSNOW+1, 0 + if ( (NoahmpIO%SNLIQXY(I,IZ,J)+NoahmpIO%SNICEXY(I,IZ,J)) > 0.0 ) then + NoahmpIO%MassConcBCPHIXY(I,IZ,J) = NoahmpIO%BCPHIXY(I,IZ,J) / (NoahmpIO%SNLIQXY(I,IZ,J) + NoahmpIO%SNICEXY(I,IZ,J)) + NoahmpIO%MassConcBCPHOXY(I,IZ,J) = NoahmpIO%BCPHOXY(I,IZ,J) / (NoahmpIO%SNLIQXY(I,IZ,J) + NoahmpIO%SNICEXY(I,IZ,J)) + NoahmpIO%MassConcOCPHIXY(I,IZ,J) = NoahmpIO%OCPHIXY(I,IZ,J) / (NoahmpIO%SNLIQXY(I,IZ,J) + NoahmpIO%SNICEXY(I,IZ,J)) + NoahmpIO%MassConcOCPHOXY(I,IZ,J) = NoahmpIO%OCPHOXY(I,IZ,J) / (NoahmpIO%SNLIQXY(I,IZ,J) + NoahmpIO%SNICEXY(I,IZ,J)) + NoahmpIO%MassConcDUST1XY(I,IZ,J) = NoahmpIO%DUST1XY(I,IZ,J) / (NoahmpIO%SNLIQXY(I,IZ,J) + NoahmpIO%SNICEXY(I,IZ,J)) + NoahmpIO%MassConcDUST2XY(I,IZ,J) = NoahmpIO%DUST2XY(I,IZ,J) / (NoahmpIO%SNLIQXY(I,IZ,J) + NoahmpIO%SNICEXY(I,IZ,J)) + NoahmpIO%MassConcDUST3XY(I,IZ,J) = NoahmpIO%DUST3XY(I,IZ,J) / (NoahmpIO%SNLIQXY(I,IZ,J) + NoahmpIO%SNICEXY(I,IZ,J)) + NoahmpIO%MassConcDUST4XY(I,IZ,J) = NoahmpIO%DUST4XY(I,IZ,J) / (NoahmpIO%SNLIQXY(I,IZ,J) + NoahmpIO%SNICEXY(I,IZ,J)) + NoahmpIO%MassConcDUST5XY(I,IZ,J) = NoahmpIO%DUST5XY(I,IZ,J) / (NoahmpIO%SNLIQXY(I,IZ,J) + NoahmpIO%SNICEXY(I,IZ,J)) + else + NoahmpIO%MassConcBCPHIXY(I,IZ,J) = 0.0 + NoahmpIO%MassConcBCPHOXY(I,IZ,J) = 0.0 + NoahmpIO%MassConcOCPHIXY(I,IZ,J) = 0.0 + NoahmpIO%MassConcOCPHOXY(I,IZ,J) = 0.0 + NoahmpIO%MassConcDUST1XY(I,IZ,J) = 0.0 + NoahmpIO%MassConcDUST2XY(I,IZ,J) = 0.0 + NoahmpIO%MassConcDUST3XY(I,IZ,J) = 0.0 + NoahmpIO%MassConcDUST4XY(I,IZ,J) = 0.0 + NoahmpIO%MassConcDUST5XY(I,IZ,J) = 0.0 + endif + enddo + enddo + enddo + endif + end subroutine NoahmpInitMain end module NoahmpInitMainMod diff --git a/drivers/erf/NoahmpReadNamelistMod.F90 b/drivers/erf/NoahmpReadNamelistMod.F90 index 0f2ca277..861b2dc7 100644 --- a/drivers/erf/NoahmpReadNamelistMod.F90 +++ b/drivers/erf/NoahmpReadNamelistMod.F90 @@ -59,7 +59,6 @@ subroutine NoahmpReadNamelist(NoahmpIO) real(kind=kind_noahmp) :: urban_atmosphere_thickness = 2.0 real(kind=kind_noahmp) :: soil_timestep = 0.0 ! soil timestep (default=0: same as main noahmp timestep) - ! derived urban dimensions character(len=256) :: forcing_name_T = "T2D" character(len=256) :: forcing_name_Q = "Q2D" character(len=256) :: forcing_name_U = "U2D" @@ -69,6 +68,8 @@ subroutine NoahmpReadNamelist(NoahmpIO) character(len=256) :: forcing_name_SW = "SWDOWN" character(len=256) :: forcing_name_PR = "RAINRATE" character(len=256) :: forcing_name_SN = "" + character(len=256) :: forcing_name_DirFrac = "" + character(len=256) :: forcing_name_VisFrac = "" integer :: dynamic_veg_option = 4 integer :: canopy_stomatal_resistance_option = 1 integer :: btr_option = 1 @@ -80,6 +81,7 @@ subroutine NoahmpReadNamelist(NoahmpIO) integer :: radiative_transfer_option = 3 integer :: snow_albedo_option = 1 integer :: snow_thermal_conductivity = 1 + integer :: snow_compaction_option = 2 integer :: pcp_partition_option = 1 integer :: tbot_option = 2 integer :: temp_time_scheme_option = 1 @@ -92,6 +94,7 @@ subroutine NoahmpReadNamelist(NoahmpIO) integer :: irrigation_method = 0 integer :: dvic_infiltration_option = 1 integer :: tile_drainage_option = 0 + integer :: wetland_option = 0 integer :: split_output_count = 1 logical :: skip_first_output = .false. integer :: khour = -9999 @@ -103,15 +106,39 @@ subroutine NoahmpReadNamelist(NoahmpIO) character(len=256) :: external_lai_filename_template = " " character(len=256) :: agdata_flnm = " " character(len=256) :: tdinput_flnm = " " + character(len=256) :: snicar_optic_flnm = "snicar_optics_5bnd_c013122.nc" + character(len=256) :: snicar_age_flnm = "snicar_drdt_bst_fit_60_c070416.nc" integer :: xstart = 0 integer :: ystart = 0 integer :: xend = -1 integer :: yend = -1 integer, parameter :: MAX_SOIL_LEVELS = 10 ! maximum soil levels in namelist real(kind=kind_noahmp), dimension(MAX_SOIL_LEVELS) :: soil_thick_input ! depth to soil interfaces from namelist [m] - integer :: NSNOW + integer :: NSNOW character(len=256) :: LLANDUSE = "" - + + ! Snow, Ice, and Aerosol Radiative (SNICAR) model parameters + integer :: snicar_bandnumber_option = 1 + integer :: snicar_solarspec_option = 1 + integer :: snicar_snowoptics_option = 3 + integer :: snicar_dustoptics_option = 1 + integer :: snicar_rtsolver_option = 2 + integer :: snicar_snowshape_option = 3 + logical :: snicar_use_aerosol = .true. + logical :: snicar_snowbc_intmix = .true. + logical :: snicar_snowdust_intmix = .false. + logical :: snicar_use_oc = .false. + logical :: snicar_aerosol_readtable = .false. + character(len=256) :: forcing_name_BCPHI = "BCPHI" + character(len=256) :: forcing_name_BCPHO = "BCPHO" + character(len=256) :: forcing_name_OCPHI = "OCPHI" + character(len=256) :: forcing_name_OCPHO = "OCPHO" + character(len=256) :: forcing_name_DUST1 = "DUST1" + character(len=256) :: forcing_name_DUST2 = "DUST2" + character(len=256) :: forcing_name_DUST3 = "DUST3" + character(len=256) :: forcing_name_DUST4 = "DUST4" + character(len=256) :: forcing_name_DUST5 = "DUST5" + namelist / NOAHLSM_OFFLINE / & #ifdef WRF_HYDRO finemesh,finemesh_factor,forc_typ, snow_assim , GEO_STATIC_FLNM, HRLDAS_ini_typ, & @@ -123,12 +150,13 @@ subroutine NoahmpReadNamelist(NoahmpIO) spinup_loops, & forcing_name_T,forcing_name_Q,forcing_name_U,forcing_name_V,forcing_name_P, & forcing_name_LW,forcing_name_SW,forcing_name_PR,forcing_name_SN, & + forcing_name_DirFrac, forcing_name_VisFrac, & dynamic_veg_option, canopy_stomatal_resistance_option, & - btr_option, surface_drag_option, supercooled_water_option, & + btr_option, surface_drag_option, supercooled_water_option, & frozen_soil_option, radiative_transfer_option, snow_albedo_option, & snow_thermal_conductivity, surface_runoff_option, subsurface_runoff_option, & - pcp_partition_option, tbot_option, temp_time_scheme_option, & - glacier_option, surface_resistance_option, & + pcp_partition_option, tbot_option, temp_time_scheme_option, wetland_option, & + glacier_option, surface_resistance_option, snow_compaction_option, & irrigation_option, irrigation_method, dvic_infiltration_option, & tile_drainage_option,soil_data_option, pedotransfer_option, crop_option, & sf_urban_physics,use_wudapt_lcz,num_urban_hi,urban_atmosphere_thickness, & @@ -136,10 +164,15 @@ subroutine NoahmpReadNamelist(NoahmpIO) num_urban_nf ,num_urban_nz,num_urban_nbui,num_urban_ngr , & split_output_count, & khour, kday, zlvl, erf_setup_file, & - spatial_filename, agdata_flnm, tdinput_flnm, & + spatial_filename, agdata_flnm, tdinput_flnm, snicar_optic_flnm, snicar_age_flnm, & external_veg_filename_template, external_lai_filename_template, & - xstart, xend, ystart, yend, nsnow, llanduse - + xstart, xend, ystart, yend, nsnow, llanduse, & + snicar_bandnumber_option, snicar_solarspec_option, snicar_snowoptics_option, & + snicar_dustoptics_option, snicar_rtsolver_option, snicar_snowshape_option, & + snicar_use_aerosol, snicar_snowbc_intmix, snicar_snowdust_intmix, & + snicar_use_oc, snicar_aerosol_readtable, forcing_name_BCPHI, forcing_name_BCPHO, & + forcing_name_OCPHI, forcing_name_OCPHO, forcing_name_DUST1, forcing_name_DUST2, & + forcing_name_DUST3, forcing_name_DUST4, forcing_name_DUST5 !--------------------------------------------------------------- ! Initialize namelist variables to dummy values, so we can tell @@ -348,6 +381,8 @@ subroutine NoahmpReadNamelist(NoahmpIO) NoahmpIO%IOPT_IRRM = irrigation_method NoahmpIO%IOPT_INFDV = dvic_infiltration_option NoahmpIO%IOPT_TDRN = tile_drainage_option + NoahmpIO%IOPT_COMPACT = snow_compaction_option + NoahmpIO%IOPT_WETLAND = wetland_option ! basic model setup variables NoahmpIO%indir = indir NoahmpIO%forcing_timestep = forcing_timestep @@ -384,6 +419,8 @@ subroutine NoahmpReadNamelist(NoahmpIO) NoahmpIO%forcing_name_SW = forcing_name_SW NoahmpIO%forcing_name_PR = forcing_name_PR NoahmpIO%forcing_name_SN = forcing_name_SN + NoahmpIO%forcing_name_DirFrac = forcing_name_DirFrac + NoahmpIO%forcing_name_VisFrac = forcing_name_VisFrac NoahmpIO%split_output_count = split_output_count NoahmpIO%skip_first_output = skip_first_output NoahmpIO%khour = khour @@ -401,7 +438,30 @@ subroutine NoahmpReadNamelist(NoahmpIO) NoahmpIO%yend = yend NoahmpIO%MAX_SOIL_LEVELS = MAX_SOIL_LEVELS NoahmpIO%soil_thick_input = soil_thick_input - + ! SNICAR + NoahmpIO%snicar_optic_flnm = snicar_optic_flnm + NoahmpIO%snicar_age_flnm = snicar_age_flnm + NoahmpIO%SNICAR_BANDNUMBER_OPT = snicar_bandnumber_option + NoahmpIO%SNICAR_SOLARSPEC_OPT = snicar_solarspec_option + NoahmpIO%SNICAR_SNOWOPTICS_OPT = snicar_snowoptics_option + NoahmpIO%SNICAR_DUSTOPTICS_OPT = snicar_dustoptics_option + NoahmpIO%SNICAR_RTSOLVER_OPT = snicar_rtsolver_option + NoahmpIO%SNICAR_SNOWSHAPE_OPT = snicar_snowshape_option + NoahmpIO%SNICAR_USE_AEROSOL = snicar_use_aerosol + NoahmpIO%SNICAR_SNOWBC_INTMIX = snicar_snowbc_intmix + NoahmpIO%SNICAR_SNOWDUST_INTMIX = snicar_snowdust_intmix + NoahmpIO%SNICAR_USE_OC = snicar_use_oc + NoahmpIO%SNICAR_AEROSOL_READTABLE = snicar_aerosol_readtable + NoahmpIO%forcing_name_BCPHI = forcing_name_BCPHI + NoahmpIO%forcing_name_BCPHO = forcing_name_BCPHO + NoahmpIO%forcing_name_OCPHI = forcing_name_OCPHI + NoahmpIO%forcing_name_OCPHO = forcing_name_OCPHO + NoahmpIO%forcing_name_DUST1 = forcing_name_DUST1 + NoahmpIO%forcing_name_DUST2 = forcing_name_DUST2 + NoahmpIO%forcing_name_DUST3 = forcing_name_DUST3 + NoahmpIO%forcing_name_DUST4 = forcing_name_DUST4 + NoahmpIO%forcing_name_DUST5 = forcing_name_DUST5 + !--------------------------------------------------------------------- ! NAMELIST check end !--------------------------------------------------------------------- diff --git a/drivers/erf/NoahmpReadTableMod.F90 b/drivers/erf/NoahmpReadTableMod.F90 index 3c834a1f..8d40d8cb 100644 --- a/drivers/erf/NoahmpReadTableMod.F90 +++ b/drivers/erf/NoahmpReadTableMod.F90 @@ -111,15 +111,19 @@ subroutine NoahmpReadTable(NoahmpIO) BATS_NIR_NEW, BATS_VIS_AGE, BATS_NIR_AGE, BATS_VIS_DIR, BATS_NIR_DIR, & RSURF_SNOW, RSURF_EXP, C2_SNOWCOMPACT, C3_SNOWCOMPACT, C4_SNOWCOMPACT, & C5_SNOWCOMPACT, DM_SNOWCOMPACT, ETA0_SNOWCOMPACT, SNLIQMAXFRAC, SWEMAXGLA, & + SNOWCOMPACTm_AR24,SNOWCOMPACTb_AR24,SNOWCOMPACT_P1_AR24, SNOWCOMPACT_P2_AR24,& + SNOWCOMPACT_P3_AR24, SNOWCOMPACT_Up_AR24, & WSLMAX, ROUS, CMIC, SNOWDEN_MAX, CLASS_ALB_REF, CLASS_SNO_AGE, CLASS_ALB_NEW,& - PSIWLT, Z0SOIL, Z0LAKE + PSIWLT, Z0SOIL, Z0LAKE, WCAP namelist / noahmp_global_parameters / CO2, O2, TIMEAN, FSATMX, Z0SNO, SSI, SNOW_RET_FAC ,SNOW_EMIS, SWEMX, TAU0, & GRAIN_GROWTH, EXTRA_GROWTH, DIRT_SOOT, BATS_COSZ, BATS_VIS_NEW, & BATS_NIR_NEW, BATS_VIS_AGE, BATS_NIR_AGE, BATS_VIS_DIR, BATS_NIR_DIR, & RSURF_SNOW, RSURF_EXP, C2_SNOWCOMPACT, C3_SNOWCOMPACT, C4_SNOWCOMPACT, & C5_SNOWCOMPACT, DM_SNOWCOMPACT, ETA0_SNOWCOMPACT, SNLIQMAXFRAC, SWEMAXGLA, & + SNOWCOMPACTm_AR24,SNOWCOMPACTb_AR24,SNOWCOMPACT_P1_AR24, SNOWCOMPACT_P2_AR24,& + SNOWCOMPACT_P3_AR24, SNOWCOMPACT_Up_AR24, & WSLMAX, ROUS, CMIC, SNOWDEN_MAX, CLASS_ALB_REF, CLASS_SNO_AGE, CLASS_ALB_NEW,& - PSIWLT, Z0SOIL, Z0LAKE + PSIWLT, Z0SOIL, Z0LAKE, WCAP ! irrigation parameters integer :: IRR_HAR @@ -176,7 +180,7 @@ subroutine NoahmpReadTable(NoahmpIO) namelist / noahmp_tiledrain_parameters / NSOILTYPE, DRAIN_LAYER_OPT, TDSMC_FAC, TD_DEPTH, TD_DC, TD_DCOEF, TD_D,& TD_ADEPTH, TD_RADI, TD_SPAC, TD_DDRAIN, KLAT_FAC - ! optional parameters + ! pedotransfer soil function parameters real(kind=kind_noahmp) :: sr2006_theta_1500t_a, sr2006_theta_1500t_b, sr2006_theta_1500t_c, & sr2006_theta_1500t_d, sr2006_theta_1500t_e, sr2006_theta_1500t_f, & sr2006_theta_1500t_g, sr2006_theta_1500_a , sr2006_theta_1500_b, & @@ -204,6 +208,22 @@ subroutine NoahmpReadTable(NoahmpIO) sr2006_psi_e_a, sr2006_psi_e_b, sr2006_psi_e_c, sr2006_smcmax_a, & sr2006_smcmax_b + ! SNICAR parameters + real(kind=kind_noahmp) :: DepBChydropho, DepBChydrophi, DepOChydropho, DepOChydrophi, & + DepDust1, DepDust2, DepDust3, DepDust4, DepDust5, & + SnowRadiusMin, FreshSnowRadiusMax, SnowRadiusRefrz, ScavEffMeltScale, & + ScavEffMeltBCphi, ScavEffMeltBCpho, ScavEffMeltOCphi, ScavEffMeltOCpho,& + ScavEffMeltDust1, ScavEffMeltDust2, ScavEffMeltDust3, ScavEffMeltDust4,& + ScavEffMeltDust5, SnowRadiusMax, SnowWetAgeC1Brun89, SnowAgeScaleFac, & + SnowWetAgeC2Brun89 + namelist / noahmp_snicar_parameters / DepBChydropho, DepBChydrophi, DepOChydropho, DepOChydrophi, & + DepDust1, DepDust2, DepDust3, DepDust4, DepDust5, & + SnowRadiusMin, FreshSnowRadiusMax, SnowRadiusRefrz, ScavEffMeltScale, & + ScavEffMeltBCphi, ScavEffMeltBCpho, ScavEffMeltOCphi, ScavEffMeltOCpho,& + ScavEffMeltDust1, ScavEffMeltDust2, ScavEffMeltDust3, ScavEffMeltDust4,& + ScavEffMeltDust5, SnowRadiusMax, SnowWetAgeC1Brun89, SnowAgeScaleFac, & + SnowWetAgeC2Brun89 + !-------------------------------------------------- !=== allocate multi-dim input table variables !-------------------------------------------------- @@ -481,46 +501,53 @@ subroutine NoahmpReadTable(NoahmpIO) NoahmpIO%EICE_TABLE = undefined_real ! global parameters - NoahmpIO%CO2_TABLE = undefined_real - NoahmpIO%O2_TABLE = undefined_real - NoahmpIO%TIMEAN_TABLE = undefined_real - NoahmpIO%FSATMX_TABLE = undefined_real - NoahmpIO%Z0SNO_TABLE = undefined_real - NoahmpIO%SSI_TABLE = undefined_real - NoahmpIO%SNOW_RET_FAC_TABLE = undefined_real - NoahmpIO%SNOW_EMIS_TABLE = undefined_real - NoahmpIO%SWEMX_TABLE = undefined_real - NoahmpIO%TAU0_TABLE = undefined_real - NoahmpIO%GRAIN_GROWTH_TABLE = undefined_real - NoahmpIO%EXTRA_GROWTH_TABLE = undefined_real - NoahmpIO%DIRT_SOOT_TABLE = undefined_real - NoahmpIO%BATS_COSZ_TABLE = undefined_real - NoahmpIO%BATS_VIS_NEW_TABLE = undefined_real - NoahmpIO%BATS_NIR_NEW_TABLE = undefined_real - NoahmpIO%BATS_VIS_AGE_TABLE = undefined_real - NoahmpIO%BATS_NIR_AGE_TABLE = undefined_real - NoahmpIO%BATS_VIS_DIR_TABLE = undefined_real - NoahmpIO%BATS_NIR_DIR_TABLE = undefined_real - NoahmpIO%RSURF_SNOW_TABLE = undefined_real - NoahmpIO%RSURF_EXP_TABLE = undefined_real - NoahmpIO%C2_SNOWCOMPACT_TABLE = undefined_real - NoahmpIO%C3_SNOWCOMPACT_TABLE = undefined_real - NoahmpIO%C4_SNOWCOMPACT_TABLE = undefined_real - NoahmpIO%C5_SNOWCOMPACT_TABLE = undefined_real - NoahmpIO%DM_SNOWCOMPACT_TABLE = undefined_real - NoahmpIO%ETA0_SNOWCOMPACT_TABLE = undefined_real - NoahmpIO%SNLIQMAXFRAC_TABLE = undefined_real - NoahmpIO%SWEMAXGLA_TABLE = undefined_real - NoahmpIO%WSLMAX_TABLE = undefined_real - NoahmpIO%ROUS_TABLE = undefined_real - NoahmpIO%CMIC_TABLE = undefined_real - NoahmpIO%SNOWDEN_MAX_TABLE = undefined_real - NoahmpIO%CLASS_ALB_REF_TABLE = undefined_real - NoahmpIO%CLASS_SNO_AGE_TABLE = undefined_real - NoahmpIO%CLASS_ALB_NEW_TABLE = undefined_real - NoahmpIO%PSIWLT_TABLE = undefined_real - NoahmpIO%Z0SOIL_TABLE = undefined_real - NoahmpIO%Z0LAKE_TABLE = undefined_real + NoahmpIO%CO2_TABLE = undefined_real + NoahmpIO%O2_TABLE = undefined_real + NoahmpIO%TIMEAN_TABLE = undefined_real + NoahmpIO%FSATMX_TABLE = undefined_real + NoahmpIO%Z0SNO_TABLE = undefined_real + NoahmpIO%SSI_TABLE = undefined_real + NoahmpIO%SNOW_RET_FAC_TABLE = undefined_real + NoahmpIO%SNOW_EMIS_TABLE = undefined_real + NoahmpIO%SWEMX_TABLE = undefined_real + NoahmpIO%TAU0_TABLE = undefined_real + NoahmpIO%GRAIN_GROWTH_TABLE = undefined_real + NoahmpIO%EXTRA_GROWTH_TABLE = undefined_real + NoahmpIO%DIRT_SOOT_TABLE = undefined_real + NoahmpIO%BATS_COSZ_TABLE = undefined_real + NoahmpIO%BATS_VIS_NEW_TABLE = undefined_real + NoahmpIO%BATS_NIR_NEW_TABLE = undefined_real + NoahmpIO%BATS_VIS_AGE_TABLE = undefined_real + NoahmpIO%BATS_NIR_AGE_TABLE = undefined_real + NoahmpIO%BATS_VIS_DIR_TABLE = undefined_real + NoahmpIO%BATS_NIR_DIR_TABLE = undefined_real + NoahmpIO%RSURF_SNOW_TABLE = undefined_real + NoahmpIO%RSURF_EXP_TABLE = undefined_real + NoahmpIO%C2_SNOWCOMPACT_TABLE = undefined_real + NoahmpIO%C3_SNOWCOMPACT_TABLE = undefined_real + NoahmpIO%C4_SNOWCOMPACT_TABLE = undefined_real + NoahmpIO%C5_SNOWCOMPACT_TABLE = undefined_real + NoahmpIO%DM_SNOWCOMPACT_TABLE = undefined_real + NoahmpIO%ETA0_SNOWCOMPACT_TABLE = undefined_real + NoahmpIO%SNOWCOMPACTm_AR24_TABLE = undefined_real + NoahmpIO%SNOWCOMPACTb_AR24_TABLE = undefined_real + NoahmpIO%SNOWCOMPACT_P1_AR24_TABLE = undefined_real + NoahmpIO%SNOWCOMPACT_P2_AR24_TABLE = undefined_real + NoahmpIO%SNOWCOMPACT_P3_AR24_TABLE = undefined_real + NoahmpIO%SNOWCOMPACT_Up_AR24_TABLE = undefined_real + NoahmpIO%SNLIQMAXFRAC_TABLE = undefined_real + NoahmpIO%SWEMAXGLA_TABLE = undefined_real + NoahmpIO%WSLMAX_TABLE = undefined_real + NoahmpIO%ROUS_TABLE = undefined_real + NoahmpIO%CMIC_TABLE = undefined_real + NoahmpIO%SNOWDEN_MAX_TABLE = undefined_real + NoahmpIO%CLASS_ALB_REF_TABLE = undefined_real + NoahmpIO%CLASS_SNO_AGE_TABLE = undefined_real + NoahmpIO%CLASS_ALB_NEW_TABLE = undefined_real + NoahmpIO%PSIWLT_TABLE = undefined_real + NoahmpIO%Z0SOIL_TABLE = undefined_real + NoahmpIO%Z0LAKE_TABLE = undefined_real + NoahmpIO%WCAP_TABLE = undefined_real ! irrigation parameters NoahmpIO%IRR_HAR_TABLE = undefined_int @@ -599,7 +626,7 @@ subroutine NoahmpReadTable(NoahmpIO) NoahmpIO%TD_DDRAIN_TABLE = undefined_real NoahmpIO%KLAT_FAC_TABLE = undefined_real - ! optional parameters + ! pedotransfer soil function parameters NoahmpIO%sr2006_theta_1500t_a_TABLE = undefined_real NoahmpIO%sr2006_theta_1500t_b_TABLE = undefined_real NoahmpIO%sr2006_theta_1500t_c_TABLE = undefined_real @@ -640,6 +667,34 @@ subroutine NoahmpReadTable(NoahmpIO) NoahmpIO%sr2006_psi_e_c_TABLE = undefined_real NoahmpIO%sr2006_smcmax_a_TABLE = undefined_real NoahmpIO%sr2006_smcmax_b_TABLE = undefined_real + + !SNICAR + NoahmpIO%DepBChydropho_TABLE = undefined_real + NoahmpIO%DepBChydrophi_TABLE = undefined_real + NoahmpIO%DepOChydropho_TABLE = undefined_real + NoahmpIO%DepOChydrophi_TABLE = undefined_real + NoahmpIO%DepDust1_TABLE = undefined_real + NoahmpIO%DepDust2_TABLE = undefined_real + NoahmpIO%DepDust3_TABLE = undefined_real + NoahmpIO%DepDust4_TABLE = undefined_real + NoahmpIO%DepDust5_TABLE = undefined_real + NoahmpIO%SnowRadiusMin_TABLE = undefined_real + NoahmpIO%FreshSnowRadiusMax_TABLE = undefined_real + NoahmpIO%SnowRadiusRefrz_TABLE = undefined_real + NoahmpIO%ScavEffMeltScale_TABLE = undefined_real + NoahmpIO%ScavEffMeltBCphi_TABLE = undefined_real + NoahmpIO%ScavEffMeltBCpho_TABLE = undefined_real + NoahmpIO%ScavEffMeltOCphi_TABLE = undefined_real + NoahmpIO%ScavEffMeltOCpho_TABLE = undefined_real + NoahmpIO%ScavEffMeltDust1_TABLE = undefined_real + NoahmpIO%ScavEffMeltDust2_TABLE = undefined_real + NoahmpIO%ScavEffMeltDust3_TABLE = undefined_real + NoahmpIO%ScavEffMeltDust4_TABLE = undefined_real + NoahmpIO%ScavEffMeltDust5_TABLE = undefined_real + NoahmpIO%SnowRadiusMax_TABLE = undefined_real + NoahmpIO%SnowWetAgeC1Brun89_TABLE = undefined_real + NoahmpIO%SnowWetAgeC2Brun89_TABLE = undefined_real + NoahmpIO%SnowAgeScaleFac_TABLE = undefined_real !--------------------------------------------------------------- ! transfer values from table to input variables @@ -877,46 +932,53 @@ subroutine NoahmpReadTable(NoahmpIO) close(15) ! assign values - NoahmpIO%CO2_TABLE = CO2 - NoahmpIO%O2_TABLE = O2 - NoahmpIO%TIMEAN_TABLE = TIMEAN - NoahmpIO%FSATMX_TABLE = FSATMX - NoahmpIO%Z0SNO_TABLE = Z0SNO - NoahmpIO%SSI_TABLE = SSI - NoahmpIO%SNOW_RET_FAC_TABLE = SNOW_RET_FAC - NoahmpIO%SNOW_EMIS_TABLE = SNOW_EMIS - NoahmpIO%SWEMX_TABLE = SWEMX - NoahmpIO%TAU0_TABLE = TAU0 - NoahmpIO%GRAIN_GROWTH_TABLE = GRAIN_GROWTH - NoahmpIO%EXTRA_GROWTH_TABLE = EXTRA_GROWTH - NoahmpIO%DIRT_SOOT_TABLE = DIRT_SOOT - NoahmpIO%BATS_COSZ_TABLE = BATS_COSZ - NoahmpIO%BATS_VIS_NEW_TABLE = BATS_VIS_NEW - NoahmpIO%BATS_NIR_NEW_TABLE = BATS_NIR_NEW - NoahmpIO%BATS_VIS_AGE_TABLE = BATS_VIS_AGE - NoahmpIO%BATS_NIR_AGE_TABLE = BATS_NIR_AGE - NoahmpIO%BATS_VIS_DIR_TABLE = BATS_VIS_DIR - NoahmpIO%BATS_NIR_DIR_TABLE = BATS_NIR_DIR - NoahmpIO%RSURF_SNOW_TABLE = RSURF_SNOW - NoahmpIO%RSURF_EXP_TABLE = RSURF_EXP - NoahmpIO%C2_SNOWCOMPACT_TABLE = C2_SNOWCOMPACT - NoahmpIO%C3_SNOWCOMPACT_TABLE = C3_SNOWCOMPACT - NoahmpIO%C4_SNOWCOMPACT_TABLE = C4_SNOWCOMPACT - NoahmpIO%C5_SNOWCOMPACT_TABLE = C5_SNOWCOMPACT - NoahmpIO%DM_SNOWCOMPACT_TABLE = DM_SNOWCOMPACT - NoahmpIO%ETA0_SNOWCOMPACT_TABLE = ETA0_SNOWCOMPACT - NoahmpIO%SNLIQMAXFRAC_TABLE = SNLIQMAXFRAC - NoahmpIO%SWEMAXGLA_TABLE = SWEMAXGLA - NoahmpIO%WSLMAX_TABLE = WSLMAX - NoahmpIO%ROUS_TABLE = ROUS - NoahmpIO%CMIC_TABLE = CMIC - NoahmpIO%SNOWDEN_MAX_TABLE = SNOWDEN_MAX - NoahmpIO%CLASS_ALB_REF_TABLE = CLASS_ALB_REF - NoahmpIO%CLASS_SNO_AGE_TABLE = CLASS_SNO_AGE - NoahmpIO%CLASS_ALB_NEW_TABLE = CLASS_ALB_NEW - NoahmpIO%PSIWLT_TABLE = PSIWLT - NoahmpIO%Z0SOIL_TABLE = Z0SOIL - NoahmpIO%Z0LAKE_TABLE = Z0LAKE + NoahmpIO%CO2_TABLE = CO2 + NoahmpIO%O2_TABLE = O2 + NoahmpIO%TIMEAN_TABLE = TIMEAN + NoahmpIO%FSATMX_TABLE = FSATMX + NoahmpIO%Z0SNO_TABLE = Z0SNO + NoahmpIO%SSI_TABLE = SSI + NoahmpIO%SNOW_RET_FAC_TABLE = SNOW_RET_FAC + NoahmpIO%SNOW_EMIS_TABLE = SNOW_EMIS + NoahmpIO%SWEMX_TABLE = SWEMX + NoahmpIO%TAU0_TABLE = TAU0 + NoahmpIO%GRAIN_GROWTH_TABLE = GRAIN_GROWTH + NoahmpIO%EXTRA_GROWTH_TABLE = EXTRA_GROWTH + NoahmpIO%DIRT_SOOT_TABLE = DIRT_SOOT + NoahmpIO%BATS_COSZ_TABLE = BATS_COSZ + NoahmpIO%BATS_VIS_NEW_TABLE = BATS_VIS_NEW + NoahmpIO%BATS_NIR_NEW_TABLE = BATS_NIR_NEW + NoahmpIO%BATS_VIS_AGE_TABLE = BATS_VIS_AGE + NoahmpIO%BATS_NIR_AGE_TABLE = BATS_NIR_AGE + NoahmpIO%BATS_VIS_DIR_TABLE = BATS_VIS_DIR + NoahmpIO%BATS_NIR_DIR_TABLE = BATS_NIR_DIR + NoahmpIO%RSURF_SNOW_TABLE = RSURF_SNOW + NoahmpIO%RSURF_EXP_TABLE = RSURF_EXP + NoahmpIO%C2_SNOWCOMPACT_TABLE = C2_SNOWCOMPACT + NoahmpIO%C3_SNOWCOMPACT_TABLE = C3_SNOWCOMPACT + NoahmpIO%C4_SNOWCOMPACT_TABLE = C4_SNOWCOMPACT + NoahmpIO%C5_SNOWCOMPACT_TABLE = C5_SNOWCOMPACT + NoahmpIO%DM_SNOWCOMPACT_TABLE = DM_SNOWCOMPACT + NoahmpIO%ETA0_SNOWCOMPACT_TABLE = ETA0_SNOWCOMPACT + NoahmpIO%SNOWCOMPACTm_AR24_TABLE = SNOWCOMPACTm_AR24 + NoahmpIO%SNOWCOMPACTb_AR24_TABLE = SNOWCOMPACTb_AR24 + NoahmpIO%SNOWCOMPACT_P1_AR24_TABLE = SNOWCOMPACT_P1_AR24 + NoahmpIO%SNOWCOMPACT_P2_AR24_TABLE = SNOWCOMPACT_P2_AR24 + NoahmpIO%SNOWCOMPACT_P3_AR24_TABLE = SNOWCOMPACT_P3_AR24 + NoahmpIO%SNOWCOMPACT_Up_AR24_TABLE = SNOWCOMPACT_Up_AR24 + NoahmpIO%SNLIQMAXFRAC_TABLE = SNLIQMAXFRAC + NoahmpIO%SWEMAXGLA_TABLE = SWEMAXGLA + NoahmpIO%WSLMAX_TABLE = WSLMAX + NoahmpIO%ROUS_TABLE = ROUS + NoahmpIO%CMIC_TABLE = CMIC + NoahmpIO%SNOWDEN_MAX_TABLE = SNOWDEN_MAX + NoahmpIO%CLASS_ALB_REF_TABLE = CLASS_ALB_REF + NoahmpIO%CLASS_SNO_AGE_TABLE = CLASS_SNO_AGE + NoahmpIO%CLASS_ALB_NEW_TABLE = CLASS_ALB_NEW + NoahmpIO%PSIWLT_TABLE = PSIWLT + NoahmpIO%Z0SOIL_TABLE = Z0SOIL + NoahmpIO%Z0LAKE_TABLE = Z0LAKE + NoahmpIO%WCAP_TABLE = WCAP !---------------- NoahmpTable.TBL irrigation parameters inquire( file='NoahmpTable.TBL', exist=file_named ) @@ -1122,7 +1184,7 @@ subroutine NoahmpReadTable(NoahmpIO) NoahmpIO%TD_DDRAIN_TABLE(1:NSOILTYPE) = TD_DDRAIN(1:NSOILTYPE) NoahmpIO%KLAT_FAC_TABLE (1:NSOILTYPE) = KLAT_FAC (1:NSOILTYPE) - !---------------- NoahmpTable.TBL optional parameters + !---------------- NoahmpTable.TBL pedotransfer soil function parameters inquire( file='NoahmpTable.TBL', exist=file_named ) if ( file_named ) then open(15, file="NoahmpTable.TBL", status='old', form='formatted', action='read', iostat=ierr) @@ -1177,6 +1239,47 @@ subroutine NoahmpReadTable(NoahmpIO) NoahmpIO%sr2006_smcmax_a_TABLE = sr2006_smcmax_a NoahmpIO%sr2006_smcmax_b_TABLE = sr2006_smcmax_b + !---------------- NoahmpTable.TBL SNICAR parameters + inquire( file='NoahmpTable.TBL', exist=file_named ) + if ( file_named ) then + open(15, file="NoahmpTable.TBL", status='old', form='formatted', action='read', iostat=ierr) + else + open(15, status='old', form='formatted', action='read', iostat=ierr) + end if + if (ierr /= 0) then + if (NoahmpIO%rank == 0) write(*,'("WARNING: Cannot find file NoahmpTable.TBL")') + endif + read(15,noahmp_snicar_parameters) + close(15) + + ! assign values + NoahmpIO%DepBChydropho_TABLE = DepBChydropho + NoahmpIO%DepBChydrophi_TABLE = DepBChydrophi + NoahmpIO%DepOChydropho_TABLE = DepOChydropho + NoahmpIO%DepOChydrophi_TABLE = DepOChydrophi + NoahmpIO%DepDust1_TABLE = DepDust1 + NoahmpIO%DepDust2_TABLE = DepDust2 + NoahmpIO%DepDust3_TABLE = DepDust3 + NoahmpIO%DepDust4_TABLE = DepDust4 + NoahmpIO%DepDust5_TABLE = DepDust5 + NoahmpIO%SnowRadiusMin_TABLE = SnowRadiusMin + NoahmpIO%FreshSnowRadiusMax_TABLE = FreshSnowRadiusMax + NoahmpIO%SnowRadiusRefrz_TABLE = SnowRadiusRefrz + NoahmpIO%ScavEffMeltScale_TABLE = ScavEffMeltScale + NoahmpIO%ScavEffMeltBCphi_TABLE = ScavEffMeltBCphi + NoahmpIO%ScavEffMeltBCpho_TABLE = ScavEffMeltBCpho + NoahmpIO%ScavEffMeltOCphi_TABLE = ScavEffMeltOCphi + NoahmpIO%ScavEffMeltOCpho_TABLE = ScavEffMeltOCpho + NoahmpIO%ScavEffMeltDust1_TABLE = ScavEffMeltDust1 + NoahmpIO%ScavEffMeltDust2_TABLE = ScavEffMeltDust2 + NoahmpIO%ScavEffMeltDust3_TABLE = ScavEffMeltDust3 + NoahmpIO%ScavEffMeltDust4_TABLE = ScavEffMeltDust4 + NoahmpIO%ScavEffMeltDust5_TABLE = ScavEffMeltDust5 + NoahmpIO%SnowRadiusMax_TABLE = SnowRadiusMax + NoahmpIO%SnowWetAgeC1Brun89_TABLE = SnowWetAgeC1Brun89 + NoahmpIO%SnowWetAgeC2Brun89_TABLE = SnowWetAgeC2Brun89 + NoahmpIO%SnowAgeScaleFac_TABLE = SnowAgeScaleFac + end subroutine NoahmpReadTable end module NoahmpReadTableMod diff --git a/drivers/erf/NoahmpSnowInitMod.F90 b/drivers/erf/NoahmpSnowInitMod.F90 index 6c5dd3c8..cc5d5a46 100644 --- a/drivers/erf/NoahmpSnowInitMod.F90 +++ b/drivers/erf/NoahmpSnowInitMod.F90 @@ -35,6 +35,8 @@ subroutine NoahmpSnowInitMain(NoahmpIO) ! SNICEXY is the frozen content of a snow layer. Initial estimate based on SNOWH and SNOW ! SNLIQXY is the liquid content of a snow layer. Initialized to 0.0 ! ZNSNOXY is the layer depth from the surface. +! SNRDSXY is the snow layer effective grain radius [microns, m-6] +! SNFRXY is the snow layer rate of snow freezing [mm/s] !------------------------------------------------------------------------------------------ itf = min0(NoahmpIO%ite, (NoahmpIO%ide+1)-1) @@ -108,6 +110,21 @@ subroutine NoahmpSnowInitMain(NoahmpIO) NoahmpIO%ZSNSOXY(I,IZ,J) = NoahmpIO%ZSNSOXY(I,IZ-1,J) + DZSNSO(IZ) enddo + ! SNICAR + if ( NoahmpIO%IOPT_ALB == 3 )then + NoahmpIO%SNRDSXY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + NoahmpIO%SNFRXY (I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + NoahmpIO%BCPHIXY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + NoahmpIO%BCPHOXY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + NoahmpIO%OCPHIXY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + NoahmpIO%OCPHOXY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + NoahmpIO%DUST1XY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + NoahmpIO%DUST2XY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + NoahmpIO%DUST3XY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + NoahmpIO%DUST4XY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + NoahmpIO%DUST5XY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 + endif + enddo ! I enddo ! J diff --git a/drivers/erf/NoahmpTable.TBL b/drivers/erf/NoahmpTable.TBL index c9d37c5b..82d1cb2d 100644 --- a/drivers/erf/NoahmpTable.TBL +++ b/drivers/erf/NoahmpTable.TBL @@ -423,49 +423,90 @@ &noahmp_global_parameters ! atmospheric constituants - CO2 = 395.0e-06 ! CO2 partial pressure - O2 = 0.209 ! O2 partial pressure + CO2 = 395.0e-06 ! CO2 partial pressure + O2 = 0.209 ! O2 partial pressure ! runoff parameters used for SIMTOP and SIMGM - TIMEAN = 10.5 ! gridcell mean topgraphic index (global mean) - FSATMX = 0.38 ! maximum surface saturated fraction (global mean) - ROUS = 0.20 ! specific yield [-] for Niu et al. 2007 groundwater scheme (OptRunoffSubsurface=1) - CMIC = 0.80 ! microprore content (0.0-1.0), 0.0: close to free drainage + TIMEAN = 10.5 ! gridcell mean topgraphic index (global mean) + FSATMX = 0.38 ! maximum surface saturated fraction (global mean) + ROUS = 0.20 ! specific yield [-] for Niu et al. 2007 groundwater scheme (OptRunoffSubsurface=1) + CMIC = 0.80 ! microprore content (0.0-1.0), 0.0: close to free drainage ! parameters for snow processes - SSI = 0.03 ! liquid water holding capacity for snowpack (m3/m3) - SNOW_RET_FAC = 5.0e-5 ! snowpack water release timescale factor (1/s) - SNOW_EMIS = 0.95 ! snow emissivity - SWEMX = 1.00 ! new snow mass to fully cover old snow (mm), equivalent to 10mm depth (density = 100 kg/m3) - TAU0 = 1.0e6 ! tau0 from Yang97 eqn. 10a for BATS snow aging - GRAIN_GROWTH = 5000.0 ! growth from vapor diffusion Yang97 eqn. 10b for BATS snow aging - EXTRA_GROWTH = 10.0 ! extra growth near freezing Yang97 eqn. 10c for BATS snow aging - DIRT_SOOT = 0.3 ! dirt and soot term Yang97 eqn. 10d for BATS snow aging - BATS_COSZ = 2.0 ! zenith angle snow albedo adjustment; b in Yang97 eqn. 15 for BATS snow albedo - BATS_VIS_NEW = 0.95 ! new snow visible albedo for BATS snow albedo - BATS_NIR_NEW = 0.65 ! new snow NIR albedo for BATS snow albedo - BATS_VIS_AGE = 0.2 ! age factor for diffuse visible snow albedo Yang97 eqn. 17 for BATS snow albedo - BATS_NIR_AGE = 0.5 ! age factor for diffuse NIR snow albedo Yang97 eqn. 18 for BATS snow albedo - BATS_VIS_DIR = 0.4 ! cosz factor for direct visible snow albedo Yang97 eqn. 15 for BATS snow albedo - BATS_NIR_DIR = 0.4 ! cosz factor for direct NIR snow albedo Yang97 eqn. 16 for BATS snow albedo - C2_SNOWCOMPACT = 21.0e-3 ! overburden snow compaction parameter (m3/kg) - C3_SNOWCOMPACT = 2.5e-6 ! snow desctructive metamorphism compaction parameter1 [1/s] - C4_SNOWCOMPACT = 0.04 ! snow desctructive metamorphism compaction parameter2 [1/k] - C5_SNOWCOMPACT = 2.0 ! snow desctructive metamorphism compaction parameter3 - DM_SNOWCOMPACT = 100.0 ! upper Limit on destructive metamorphism compaction [kg/m3] - ETA0_SNOWCOMPACT = 1.33e+6 ! snow viscosity coefficient [kg-s/m2], Anderson1979: 0.52e6~1.38e6; 1.33e+6 optimized based on SNOTEL obs (He et al. 2021 JGR) - SNLIQMAXFRAC = 0.4 ! maximum liquid water fraction in snow - SWEMAXGLA = 5000.0 ! Maximum SWE allowed at glaciers (mm) - SNOWDEN_MAX = 120.0 ! maximum fresh snowfall density (kg/m3) - CLASS_ALB_REF = 0.55 ! reference snow albedo in CLASS scheme - CLASS_SNO_AGE = 3600.0 ! snow aging e-folding time (s) in CLASS albedo scheme - CLASS_ALB_NEW = 0.84 ! fresh snow albedo in CLASS scheme - RSURF_SNOW = 50.0 ! surface resistence for snow [s/m] - Z0SNO = 0.002 ! snow surface roughness length (m) + SSI = 0.03 ! liquid water holding capacity for snowpack (m3/m3) + SNOW_RET_FAC = 5.0e-5 ! snowpack water release timescale factor (1/s) + SNOW_EMIS = 0.95 ! snow emissivity + SNLIQMAXFRAC = 0.4 ! maximum liquid water fraction in snow + SWEMAXGLA = 5000.0 ! Maximum SWE allowed at glaciers (mm) + SNOWDEN_MAX = 120.0 ! maximum fresh snowfall density (kg/m3) + RSURF_SNOW = 50.0 ! surface resistence for snow [s/m] + Z0SNO = 0.002 ! snow surface roughness length (m) + ! BATS snow albedo parameters + SWEMX = 1.00 ! new snow mass to fully cover old snow (mm), equivalent to 10mm depth (density = 100 kg/m3) + TAU0 = 1.0e6 ! tau0 from Yang97 eqn. 10a for BATS snow aging + GRAIN_GROWTH = 5000.0 ! growth from vapor diffusion Yang97 eqn. 10b for BATS snow aging + EXTRA_GROWTH = 10.0 ! extra growth near freezing Yang97 eqn. 10c for BATS snow aging + DIRT_SOOT = 0.3 ! dirt and soot term Yang97 eqn. 10d for BATS snow aging + BATS_COSZ = 2.0 ! zenith angle snow albedo adjustment; b in Yang97 eqn. 15 for BATS snow albedo + BATS_VIS_NEW = 0.95 ! new snow visible albedo for BATS snow albedo + BATS_NIR_NEW = 0.65 ! new snow NIR albedo for BATS snow albedo + BATS_VIS_AGE = 0.2 ! age factor for diffuse visible snow albedo Yang97 eqn. 17 for BATS snow albedo + BATS_NIR_AGE = 0.5 ! age factor for diffuse NIR snow albedo Yang97 eqn. 18 for BATS snow albedo + BATS_VIS_DIR = 0.4 ! cosz factor for direct visible snow albedo Yang97 eqn. 15 for BATS snow albedo + BATS_NIR_DIR = 0.4 ! cosz factor for direct NIR snow albedo Yang97 eqn. 16 for BATS snow albedo + ! CLASS snow albedo parameters + CLASS_ALB_REF = 0.55 ! reference snow albedo in CLASS scheme + CLASS_SNO_AGE = 3600.0 ! snow aging e-folding time (s) in CLASS albedo scheme + CLASS_ALB_NEW = 0.84 ! fresh snow albedo in CLASS scheme + ! general snow compaction parameter + C2_SNOWCOMPACT = 21.0e-3 ! overburden snow compaction parameter (m3/kg) + C3_SNOWCOMPACT = 2.5e-6 ! snow desctructive metamorphism compaction parameter1 [1/s] + C4_SNOWCOMPACT = 0.04 ! snow desctructive metamorphism compaction parameter2 [1/k] + C5_SNOWCOMPACT = 2.0 ! snow desctructive metamorphism compaction parameter3 + DM_SNOWCOMPACT = 100.0 ! upper Limit on destructive metamorphism compaction [kg/m3] + ETA0_SNOWCOMPACT = 1.33e+6 ! snow viscosity coefficient [kg-s/m2], Anderson1979: 0.52e6~1.38e6; 1.33e+6 optimized based on SNOTEL obs (He et al. 2021 JGR) + ! additional snow compaction parameters for Abolafia-Rosenzweig et al. 2024 (AR24) scheme + SNOWCOMPACTm_AR24 = -0.000695 ! snow compaction m parameter for linear sfc temp fitting from AR24 + SNOWCOMPACTb_AR24 = 0.206067 ! snow compaction b parameter for linear sfc temp fitting from AR24 + SNOWCOMPACT_P1_AR24 = 0.017 ! lower constraint for SnowCompactBurdenFac for high pressure bin from AR24 + SNOWCOMPACT_P2_AR24 = 0.018 ! lower constraint for SnowCompactBurdenFac for mid pressure bin from AR24 + SNOWCOMPACT_P3_AR24 = 0.019 ! lower constraint for SnowCompactBurdenFac for low pressure bin from AR24 + SNOWCOMPACT_Up_AR24 = 0.0315 ! upper constraint on SnowCompactBurdenFac from AR24 ! other soil and hydrological parameters RSURF_EXP = 5.0 ! exponent in the shape parameter for soil resistance option 1 WSLMAX = 5000.0 ! maximum lake water storage (mm) PSIWLT = -150.0 ! metric potential for wilting point (m) Z0SOIL = 0.002 ! Bare-soil roughness length (m) (i.e., under the canopy) Z0LAKE = 0.01 ! Lake surface roughness length (m) + ! wetland parameter + WCAP = 0.10 ! maximum wetland water holding capacity [m] (tunable) from Zhang et al. 2022 +/ + +&noahmp_snicar_parameters + SnowRadiusMin = 54.526 ! minimum allowed snow effective radius (also cold "fresh snow" value), can't be lower than 30.0 [microns] + SnowRadiusMax = 1500 ! maximum allowed snow effective radius [microns], needs to be lower than that covered by SNICAR input database + FreshSnowRadiusMax = 204.526 ! maximum warm fresh snow effective radius [microns] + SnowRadiusRefrz = 1000.0 ! Effective radius of re-frozen snow [microns] + DepBChydropho = 0.0 ! hydrophobic Black Carbon deposition [kg m-2 s-1], assume constant read from table + DepBChydrophi = 0.0 ! hydrophillic Black Carbon deposition [kg m-2 s-1], assume constant read from table + DepOChydropho = 0.0 ! hydrophobic Organic Carbon deposition [kg m-2 s-1], assume constant read from table + DepOChydrophi = 0.0 ! hydrophillic Organic Carbon deposition [kg m-2 s-1], assume constant read from table + DepDust1 = 0.0 ! dust species 1 deposition [kg m-2 s-1], assume constant read from table + DepDust2 = 0.0 ! dust species 2 deposition [kg m-2 s-1], assume constant read from table + DepDust3 = 0.0 ! dust species 3 deposition [kg m-2 s-1], assume constant read from table + DepDust4 = 0.0 ! dust species 4 deposition [kg m-2 s-1], assume constant read from table + DepDust5 = 0.0 ! dust species 5 deposition [kg m-2 s-1], assume constant read from table + ScavEffMeltScale = 1.0 ! Scaling factor modifying scavenging factors for aerosol in meltwater (-) + ScavEffMeltBCphi = 0.20 ! scavenging factor for hydrophillic BC inclusion in meltwater [frc] + ScavEffMeltBCpho = 0.03 ! scavenging factor for hydrophobic BC inclusion in meltwater [frc] + ScavEffMeltOCphi = 0.20 ! scavenging factor for hydrophillic OC inclusion in meltwater [frc] + ScavEffMeltOCpho = 0.03 ! scavenging factor for hydrophobic OC inclusion in meltwater [frc] + ScavEffMeltDust1 = 0.02 ! scavenging factor for dust species 1 inclusion in meltwater [frc] + ScavEffMeltDust2 = 0.02 ! scavenging factor for dust species 2 inclusion in meltwater [frc] + ScavEffMeltDust3 = 0.01 ! scavenging factor for dust species 3 inclusion in meltwater [frc] + ScavEffMeltDust4 = 0.01 ! scavenging factor for dust species 4 inclusion in meltwater [frc] + ScavEffMeltDust5 = 0.01 ! scavenging factor for dust species 5 inclusion in meltwater [frc] + SnowWetAgeC1Brun89 = 0.0 ! constant for liquid water grain growth [m3 s-1], from Brun89 + SnowWetAgeC2Brun89 = 4.22e-13 ! Constant for liquid water grain growth [m3 s-1], from Brun89: corrected for LWC [%] + SnowAgeScaleFac = 1.0 ! Arbitrary tuning/scaling factor applied to snow aging rate (-) / &noahmp_irrigation_parameters @@ -482,35 +523,35 @@ &noahmp_crop_parameters ! NCROP = 5 - ! 1: Corn - ! 2: Soybean - ! 3: Sorghum - ! 4: Rice - ! 5: Winter wheat + ! 1: Corn (Zhang et al. 2020 JAMES) + ! 2: Soybean (Zhang et al. 2020 JAMES) + ! 3: Sorghum (not calibrated, placeholder) + ! 4: Rice (not calibrated, placeholder) + ! 5: Spring wheat (Zhang et al. 2023 GMD) DEFAULT_CROP = 0 ! default crop type (1-5); if =0, use generic dynamic vegetation !------------------------------------------------------- ! CropType: 1 2 3 4 5 !------------------------------------------------------- - PLTDAY = 111, 131, 111, 111, 111, ! Planting date - HSDAY = 300, 280, 300, 300, 300, ! Harvest date + PLTDAY = 111, 131, 111, 111, 145, ! Planting date + HSDAY = 300, 280, 300, 300, 273, ! Harvest date PLANTPOP = 78.0, 78.0, 78.0, 78.0, 78.0, ! Plant density [per ha] - GDDTBASE = 10.0, 10.0, 10.0, 10.0, 10.0, ! Base temperature for Grow Degree Day (GDD) accumulation [C] + GDDTBASE = 10.0, 10.0, 10.0, 10.0, 5.0, ! Base temperature for Grow Degree Day (GDD) accumulation [C] GDDTCUT = 30.0, 30.0, 30.0, 30.0, 30.0, ! Upper temperature for Grow Degree Day (GDD) accumulation [C] - GDDS1 = 50.0, 60.0, 50.0, 50.0, 50.0, ! Grow Degree Day (GDD) from seeding to emergence - GDDS2 = 625.0, 675.0, 718.0, 718.0, 718.0, ! Grow Degree Day (GDD) from seeding to initial vegetative - GDDS3 = 933.0, 1183.0, 933.0, 933.0, 933.0, ! Grow Degree Day (GDD) from seeding to post vegetative - GDDS4 = 1103.0, 1253.0, 1103.0, 1103.0, 1103.0, ! Grow Degree Day (GDD) from seeding to intial reproductive - GDDS5 = 1555.0, 1605.0, 1555.0, 1555.0, 1555.0, ! Grow Degree Day (GDD) from seeding to pysical maturity - C3PSNI = 0.0, 1.0, 1.0, 1.0, 1.0, ! photosynthetic pathway: 0.0 = c4, 1.0 = c3; the following 11 *I parameters added by Z. Zhang, 2020/02 + GDDS1 = 50.0, 60.0, 50.0, 50.0, 150.0, ! Grow Degree Day (GDD) from seeding to emergence + GDDS2 = 625.0, 675.0, 718.0, 718.0, 450.0, ! Grow Degree Day (GDD) from seeding to initial vegetative + GDDS3 = 933.0, 1183.0, 933.0, 933.0, 770.0, ! Grow Degree Day (GDD) from seeding to post vegetative + GDDS4 = 1103.0, 1253.0, 1103.0, 1103.0, 950.0, ! Grow Degree Day (GDD) from seeding to intial reproductive + GDDS5 = 1555.0, 1605.0, 1555.0, 1555.0, 1120.0, ! Grow Degree Day (GDD) from seeding to pysical maturity + C3PSNI = 0.0, 1.0, 0.0, 1.0, 1.0, ! photosynthetic pathway: 0.0 = c4, 1.0 = c3; the following 11 *I parameters added by Z. Zhang, 2020/02 KC25I = 30.0, 30.0, 30.0, 30.0, 30.0, ! CO2 michaelis-menten constant at 25 degC (pa) AKCI = 2.1, 2.1, 2.1, 2.1, 2.1, ! q10 for KC25; change in CO2 Michaelis-Menten constant for every 10-degC temperature change KO25I = 3.E4, 3.E4, 3.E4, 3.E4, 3.E4, ! O2 michaelis-menten constant at 25 degC (pa) AKOI = 1.2, 1.2, 1.2, 1.2, 1.2, ! q10 for KO25; change in O2 Michaelis-Menten constant for every 10-degC temperature change - AVCMXI = 2.4, 2.4, 2.4, 2.4, 2.4, ! q10 for VCMZ25; change in maximum rate of carboxylation for every 10-degC temperature change - VCMX25I = 60.0, 80.0, 60.0, 60.0, 55.0, ! maximum rate of carboxylation at 25c (umol CO2/m2/s) - BPI = 4.E4, 1.E4, 2.E3, 2.E3, 2.E3, ! minimum leaf conductance (umol/m2/s) + AVCMXI = 2.4, 2.4, 2.4, 2.4, 1.5, ! q10 for VCMZ25; change in maximum rate of carboxylation for every 10-degC temperature change + VCMX25I = 60.0, 80.0, 60.0, 60.0, 60.0, ! maximum rate of carboxylation at 25c (umol CO2/m2/s) + BPI = 4.E4, 1.E4, 2.E3, 2.E3, 1.E4, ! minimum leaf conductance (umol/m2/s) MPI = 4., 9., 6., 9., 9., ! slope of conductance-to-photosynthesis relationship FOLNMXI = 1.5, 1.5, 1.5, 1.5, 1.5, ! foliage nitrogen concentration when f(n)=1 (%) QE25I = 0.05, 0.06, 0.06, 0.06, 0.06, ! quantum efficiency at 25 degC (umol CO2/umol photon) @@ -545,8 +586,8 @@ LF_OVRC_S2 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of leaf turnover [1/s] at growth stage 2 LF_OVRC_S3 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of leaf turnover [1/s] at growth stage 3 LF_OVRC_S4 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of leaf turnover [1/s] at growth stage 4 - LF_OVRC_S5 = 0.2, 0.2, 0.48, 0.48, 0.48, ! fraction of leaf turnover [1/s] at growth stage 5 - LF_OVRC_S6 = 0.3, 0.3, 0.48, 0.48, 0.48, ! fraction of leaf turnover [1/s] at growth stage 6 + LF_OVRC_S5 = 0.2, 0.2, 0.48, 0.48, 0.05, ! fraction of leaf turnover [1/s] at growth stage 5 + LF_OVRC_S6 = 0.3, 0.3, 0.48, 0.48, 0.05, ! fraction of leaf turnover [1/s] at growth stage 6 LF_OVRC_S7 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of leaf turnover [1/s] at growth stage 7 LF_OVRC_S8 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of leaf turnover [1/s] at growth stage 8 ST_OVRC_S1 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of stem turnover [1/s] at growth stage 1 @@ -565,67 +606,67 @@ RT_OVRC_S6 = 0.06, 0.06, 0.06, 0.06, 0.06, ! fraction of root tunrover [1/s] at growth stage 6 RT_OVRC_S7 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of root tunrover [1/s] at growth stage 7 RT_OVRC_S8 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of root tunrover [1/s] at growth stage 8 - LFMR25 = 0.8, 1.0, 1.0, 1.0, 1.0, ! leaf maintenance respiration at 25C [umol CO2/m2/s] - STMR25 = 0.05, 0.05, 0.1, 0.1, 0.1, ! stem maintenance respiration at 25C [umol CO2/kg bio/s] - RTMR25 = 0.05, 0.05, 0.0, 0.0, 0.0, ! root maintenance respiration at 25C [umol CO2/kg bio/s] - GRAINMR25 = 0.0, 0.0, 0.1, 0.1, 0.1, ! grain maintenance respiration at 25C [umol CO2/kg bio/s] + LFMR25 = 0.8, 1.0, 1.0, 1.0, 0.8, ! leaf maintenance respiration at 25C [umol CO2/m2/s] + STMR25 = 0.05, 0.05, 0.1, 0.1, 0.05, ! stem maintenance respiration at 25C [umol CO2/kg bio/s] + RTMR25 = 0.05, 0.05, 0.0, 0.0, 0.05, ! root maintenance respiration at 25C [umol CO2/kg bio/s] + GRAINMR25 = 0.0, 0.0, 0.1, 0.1, 0.0, ! grain maintenance respiration at 25C [umol CO2/kg bio/s] LFPT_S1 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to leaf at growth stage 1 LFPT_S2 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to leaf at growth stage 2 LFPT_S3 = 0.36, 0.4, 0.4, 0.4, 0.4, ! fraction of carbohydrate flux to leaf at growth stage 3 - LFPT_S4 = 0.1, 0.2, 0.2, 0.2, 0.2, ! fraction of carbohydrate flux to leaf at growth stage 4 - LFPT_S5 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to leaf at growth stage 5 + LFPT_S4 = 0.1, 0.2, 0.2, 0.2, 0.3, ! fraction of carbohydrate flux to leaf at growth stage 4 + LFPT_S5 = 0.0, 0.0, 0.0, 0.0, 0.1, ! fraction of carbohydrate flux to leaf at growth stage 5 LFPT_S6 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to leaf at growth stage 6 LFPT_S7 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to leaf at growth stage 7 LFPT_S8 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to leaf at growth stage 8 STPT_S1 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to stem at growth stage 1 STPT_S2 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to stem at growth stage 2 - STPT_S3 = 0.24, 0.2, 0.2, 0.2, 0.2, ! fraction of carbohydrate flux to stem at growth stage 3 - STPT_S4 = 0.6, 0.5, 0.5, 0.5, 0.5, ! fraction of carbohydrate flux to stem at growth stage 4 - STPT_S5 = 0.0, 0.0, 0.15, 0.15, 0.15, ! fraction of carbohydrate flux to stem at growth stage 5 - STPT_S6 = 0.0, 0.0, 0.05, 0.05, 0.05, ! fraction of carbohydrate flux to stem at growth stage 6 + STPT_S3 = 0.24, 0.2, 0.2, 0.2, 0.5, ! fraction of carbohydrate flux to stem at growth stage 3 + STPT_S4 = 0.6, 0.5, 0.5, 0.5, 0.6, ! fraction of carbohydrate flux to stem at growth stage 4 + STPT_S5 = 0.0, 0.0, 0.15, 0.15, 0.2, ! fraction of carbohydrate flux to stem at growth stage 5 + STPT_S6 = 0.0, 0.0, 0.05, 0.05, 0.2, ! fraction of carbohydrate flux to stem at growth stage 6 STPT_S7 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to stem at growth stage 7 STPT_S8 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to stem at growth stage 8 RTPT_S1 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to root at growth stage 1 RTPT_S2 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to root at growth stage 2 - RTPT_S3 = 0.4, 0.4, 0.4, 0.4, 0.4, ! fraction of carbohydrate flux to root at growth stage 3 - RTPT_S4 = 0.3, 0.3, 0.3, 0.3, 0.3, ! fraction of carbohydrate flux to root at growth stage 4 + RTPT_S3 = 0.4, 0.4, 0.4, 0.4, 0.1, ! fraction of carbohydrate flux to root at growth stage 3 + RTPT_S4 = 0.3, 0.3, 0.3, 0.3, 0.1, ! fraction of carbohydrate flux to root at growth stage 4 RTPT_S5 = 0.05, 0.05, 0.05, 0.05, 0.05, ! fraction of carbohydrate flux to root at growth stage 5 - RTPT_S6 = 0.0, 0.0, 0.05, 0.05, 0.05, ! fraction of carbohydrate flux to root at growth stage 6 + RTPT_S6 = 0.0, 0.0, 0.05, 0.05, 0.0, ! fraction of carbohydrate flux to root at growth stage 6 RTPT_S7 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to root at growth stage 7 RTPT_S8 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to root at growth stage 8 GRAINPT_S1 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to grain at growth stage 1 GRAINPT_S2 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to grain at growth stage 2 GRAINPT_S3 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to grain at growth stage 3 GRAINPT_S4 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to grain at growth stage 4 - GRAINPT_S5 = 0.95, 0.95, 0.8, 0.8, 0.8, ! fraction of carbohydrate flux to grain at growth stage 5 - GRAINPT_S6 = 1.0, 1.0, 0.9, 0.9, 0.9, ! fraction of carbohydrate flux to grain at growth stage 6 + GRAINPT_S5 = 0.95, 0.95, 0.8, 0.8, 0.7, ! fraction of carbohydrate flux to grain at growth stage 5 + GRAINPT_S6 = 1.0, 1.0, 0.9, 0.9, 0.8, ! fraction of carbohydrate flux to grain at growth stage 6 GRAINPT_S7 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to grain at growth stage 7 GRAINPT_S8 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate flux to grain at growth stage 8 LFCT_S1 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from leaf to grain at growth stage 1 LFCT_S2 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from leaf to grain at growth stage 2 - LFCT_S3 = 0.0, 0.0, 0.4, 0.4, 0.4, ! fraction of carbohydrate translocation from leaf to grain at growth stage 3 - LFCT_S4 = 0.0, 0.0, 0.3, 0.3, 0.3, ! fraction of carbohydrate translocation from leaf to grain at growth stage 4 - LFCT_S5 = 0.0, 0.0, 0.05, 0.05, 0.05, ! fraction of carbohydrate translocation from leaf to grain at growth stage 5 - LFCT_S6 = 0.0, 0.0, 0.05, 0.05, 0.05, ! fraction of carbohydrate translocation from leaf to grain at growth stage 6 + LFCT_S3 = 0.0, 0.0, 0.4, 0.4, 0.0, ! fraction of carbohydrate translocation from leaf to grain at growth stage 3 + LFCT_S4 = 0.0, 0.0, 0.3, 0.3, 0.0, ! fraction of carbohydrate translocation from leaf to grain at growth stage 4 + LFCT_S5 = 0.0, 0.0, 0.05, 0.05, 0.0, ! fraction of carbohydrate translocation from leaf to grain at growth stage 5 + LFCT_S6 = 0.0, 0.0, 0.05, 0.05, 0.0, ! fraction of carbohydrate translocation from leaf to grain at growth stage 6 LFCT_S7 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from leaf to grain at growth stage 7 LFCT_S8 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from leaf to grain at growth stage 8 STCT_S1 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from stem to grain at growth stage 1 STCT_S2 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from stem to grain at growth stage 2 - STCT_S3 = 0.0, 0.0, 0.4, 0.4, 0.4, ! fraction of carbohydrate translocation from stem to grain at growth stage 3 - STCT_S4 = 0.0, 0.0, 0.3, 0.3, 0.3, ! fraction of carbohydrate translocation from stem to grain at growth stage 4 - STCT_S5 = 0.0, 0.0, 0.05, 0.05, 0.05, ! fraction of carbohydrate translocation from stem to grain at growth stage 5 - STCT_S6 = 0.0, 0.0, 0.05, 0.05, 0.05, ! fraction of carbohydrate translocation from stem to grain at growth stage 6 + STCT_S3 = 0.0, 0.0, 0.4, 0.4, 0.0, ! fraction of carbohydrate translocation from stem to grain at growth stage 3 + STCT_S4 = 0.0, 0.0, 0.3, 0.3, 0.0, ! fraction of carbohydrate translocation from stem to grain at growth stage 4 + STCT_S5 = 0.0, 0.0, 0.05, 0.05, 0.0, ! fraction of carbohydrate translocation from stem to grain at growth stage 5 + STCT_S6 = 0.0, 0.0, 0.05, 0.05, 0.0, ! fraction of carbohydrate translocation from stem to grain at growth stage 6 STCT_S7 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from stem to grain at growth stage 7 STCT_S8 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from stem to grain at growth stage 8 RTCT_S1 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from root to grain at growth stage 1 RTCT_S2 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from root to grain at growth stage 2 - RTCT_S3 = 0.0, 0.0, 0.4, 0.4, 0.4, ! fraction of carbohydrate translocation from root to grain at growth stage 3 - RTCT_S4 = 0.0, 0.0, 0.3, 0.3, 0.3, ! fraction of carbohydrate translocation from root to grain at growth stage 4 - RTCT_S5 = 0.0, 0.0, 0.05, 0.05, 0.05, ! fraction of carbohydrate translocation from root to grain at growth stage 5 - RTCT_S6 = 0.0, 0.0, 0.05, 0.05, 0.05, ! fraction of carbohydrate translocation from root to grain at growth stage 6 + RTCT_S3 = 0.0, 0.0, 0.4, 0.4, 0.0, ! fraction of carbohydrate translocation from root to grain at growth stage 3 + RTCT_S4 = 0.0, 0.0, 0.3, 0.3, 0.0, ! fraction of carbohydrate translocation from root to grain at growth stage 4 + RTCT_S5 = 0.0, 0.0, 0.05, 0.05, 0.0, ! fraction of carbohydrate translocation from root to grain at growth stage 5 + RTCT_S6 = 0.0, 0.0, 0.05, 0.05, 0.0, ! fraction of carbohydrate translocation from root to grain at growth stage 6 RTCT_S7 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from root to grain at growth stage 7 RTCT_S8 = 0.0, 0.0, 0.0, 0.0, 0.0, ! fraction of carbohydrate translocation from root to grain at growth stage 8 - BIO2LAI = 0.015, 0.030, 0.015, 0.015, 0.015, ! leaf area per living leaf biomass [m2/kg] + BIO2LAI = 0.015, 0.030, 0.015, 0.015, 0.025, ! leaf area per living leaf biomass [m2/kg] / &noahmp_tiledrain_parameters @@ -854,3 +895,4 @@ ! GDVIC: mean capilary drive (m) for dynamic VIC runoff GDVIC = 0.050, 0.070, 0.130, 0.200, 0.170, 0.110, 0.260, 0.350, 0.260, 0.300, 0.380, 0.410, 0.500, 0.001, 0.010, 0.001, 0.001, 0.050, 0.020 / + diff --git a/drivers/erf/WaterVarInTransferMod.F90 b/drivers/erf/WaterVarInTransferMod.F90 index b7208851..9875a248 100644 --- a/drivers/erf/WaterVarInTransferMod.F90 +++ b/drivers/erf/WaterVarInTransferMod.F90 @@ -77,10 +77,37 @@ subroutine WaterVarInTransfer(noahmp, NoahmpIO) noahmp%water%state%SoilMoistureEqui (1:NumSoilLayer) = NoahmpIO%SMOISEQ (I,1:NumSoilLayer,J) noahmp%water%state%RechargeGwDeepWT = 0.0 noahmp%water%state%RechargeGwShallowWT = 0.0 + if ( noahmp%config%nmlist%OptWetlandModel > 0 ) then + noahmp%water%state%SoilSaturateFrac = NoahmpIO%FSATXY (I,J) + noahmp%water%state%WaterStorageWetland = NoahmpIO%WSURFXY (I,J) + endif #ifdef WRF_HYDRO noahmp%water%state%WaterTableHydro = NoahmpIO%ZWATBLE2D (I,J) noahmp%water%state%WaterHeadSfc = NoahmpIO%sfcheadrt (I,J) #endif + ! SNICAR + if ( noahmp%config%nmlist%OptSnowAlbedo == 3 ) then + noahmp%water%state%SnowRadius (-NumSnowLayerMax+1:0) = NoahmpIO%SNRDSXY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassBChydrophi(-NumSnowLayerMax+1:0) = NoahmpIO%BCPHIXY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassBChydropho(-NumSnowLayerMax+1:0) = NoahmpIO%BCPHOXY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassOChydrophi(-NumSnowLayerMax+1:0) = NoahmpIO%OCPHIXY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassOChydropho(-NumSnowLayerMax+1:0) = NoahmpIO%OCPHOXY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassDust1(-NumSnowLayerMax+1:0) = NoahmpIO%DUST1XY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassDust2(-NumSnowLayerMax+1:0) = NoahmpIO%DUST2XY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassDust3(-NumSnowLayerMax+1:0) = NoahmpIO%DUST3XY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassDust4(-NumSnowLayerMax+1:0) = NoahmpIO%DUST4XY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassDust5(-NumSnowLayerMax+1:0) = NoahmpIO%DUST5XY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassConcBChydrophi(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcBCPHIXY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassConcBChydropho(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcBCPHOXY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassConcOChydrophi(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcOCPHIXY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassConcOChydropho(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcOCPHOXY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassConcDust1(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcDUST1XY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassConcDust2(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcDUST2XY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassConcDust3(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcDUST3XY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassConcDust4(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcDUST4XY (I,-NumSnowLayerMax+1:0,J) + noahmp%water%state%MassConcDust5(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcDUST5XY (I,-NumSnowLayerMax+1:0,J) + endif + ! water flux variables noahmp%water%flux%EvapSoilSfcLiqAcc = NoahmpIO%ACC_QSEVAXY (I,J) @@ -91,6 +118,12 @@ subroutine WaterVarInTransfer(noahmp, NoahmpIO) noahmp%water%flux%TranspirationAcc = NoahmpIO%ACC_ETRANXY (I,J) noahmp%water%flux%EvapGroundNetAcc = NoahmpIO%ACC_EDIRXY (I,J) noahmp%water%flux%TranspWatLossSoilAcc(1:NumSoilLayer)= NoahmpIO%ACC_ETRANIXY(I,1:NumSoilLayer,J) + noahmp%water%flux%GlacierExcessFlowAcc = NoahmpIO%ACC_GLAFLWXY(I,J) + ! SNICAR + if ( noahmp%config%nmlist%OptSnowAlbedo == 3 ) then + noahmp%water%flux%SnowFreezeRate(-NumSnowLayerMax+1:0) = NoahmpIO%SNFRXY(I,-NumSnowLayerMax+1:0,J) + endif + ! water parameter variables noahmp%water%param%DrainSoilLayerInd = NoahmpIO%DRAIN_LAYER_OPT_TABLE @@ -101,6 +134,12 @@ subroutine WaterVarInTransfer(noahmp, NoahmpIO) noahmp%water%param%SnowCompactAgingFac3 = NoahmpIO%C5_SNOWCOMPACT_TABLE noahmp%water%param%SnowCompactAgingMax = NoahmpIO%DM_SNOWCOMPACT_TABLE noahmp%water%param%SnowViscosityCoeff = NoahmpIO%ETA0_SNOWCOMPACT_TABLE + noahmp%water%param%SnowCompactmAR24 = NoahmpIO%SNOWCOMPACTm_AR24_TABLE + noahmp%water%param%SnowCompactbAR24 = NoahmpIO%SNOWCOMPACTb_AR24_TABLE + noahmp%water%param%SnowCompactP1AR24 = NoahmpIO%SNOWCOMPACT_P1_AR24_TABLE + noahmp%water%param%SnowCompactP2AR24 = NoahmpIO%SNOWCOMPACT_P2_AR24_TABLE + noahmp%water%param%SnowCompactP3AR24 = NoahmpIO%SNOWCOMPACT_P3_AR24_TABLE + noahmp%water%param%BurdenFacUpAR24 = NoahmpIO%SNOWCOMPACT_Up_AR24_TABLE noahmp%water%param%SnowLiqFracMax = NoahmpIO%SNLIQMAXFRAC_TABLE noahmp%water%param%SnowLiqHoldCap = NoahmpIO%SSI_TABLE noahmp%water%param%SnowLiqReleaseFac = NoahmpIO%SNOW_RET_FAC_TABLE @@ -146,7 +185,33 @@ subroutine WaterVarInTransfer(noahmp, NoahmpIO) noahmp%water%param%DrainWatDepToImperv = NoahmpIO%TD_D_TABLE(SoilType(1)) noahmp%water%param%NumSoilLayerRoot = NoahmpIO%NROOT_TABLE(VegType) noahmp%water%param%SoilDrainSlope = NoahmpIO%SLOPE_TABLE(RunoffSlopeType) + noahmp%water%param%WetlandCapMax = NoahmpIO%WCAP_TABLE + + ! SNICAR + if ( noahmp%config%nmlist%OptSnowAlbedo == 3 )then + noahmp%water%param%snowage_tau = NoahmpIO%snowage_tau + noahmp%water%param%snowage_kappa = NoahmpIO%snowage_kappa + noahmp%water%param%snowage_drdt0 = NoahmpIO%snowage_drdt0 + noahmp%water%param%SnowRadiusMin = NoahmpIO%SnowRadiusMin_TABLE + noahmp%water%param%FreshSnowRadiusMax = NoahmpIO%FreshSnowRadiusMax_TABLE + noahmp%water%param%SnowRadiusRefrz = NoahmpIO%SnowRadiusRefrz_TABLE + noahmp%water%param%ScavEffMeltScale = NoahmpIO%ScavEffMeltScale_TABLE + noahmp%water%param%ScavEffMeltBCphi = NoahmpIO%ScavEffMeltBCphi_TABLE + noahmp%water%param%ScavEffMeltBCpho = NoahmpIO%ScavEffMeltBCpho_TABLE + noahmp%water%param%ScavEffMeltOCphi = NoahmpIO%ScavEffMeltOCphi_TABLE + noahmp%water%param%ScavEffMeltOCpho = NoahmpIO%ScavEffMeltOCpho_TABLE + noahmp%water%param%ScavEffMeltDust1 = NoahmpIO%ScavEffMeltDust1_TABLE + noahmp%water%param%ScavEffMeltDust2 = NoahmpIO%ScavEffMeltDust2_TABLE + noahmp%water%param%ScavEffMeltDust3 = NoahmpIO%ScavEffMeltDust3_TABLE + noahmp%water%param%ScavEffMeltDust4 = NoahmpIO%ScavEffMeltDust4_TABLE + noahmp%water%param%ScavEffMeltDust5 = NoahmpIO%ScavEffMeltDust5_TABLE + noahmp%water%param%SnowRadiusMax = NoahmpIO%SnowRadiusMax_TABLE + noahmp%water%param%SnowWetAgeC1Brun89 = NoahmpIO%SnowWetAgeC1Brun89_TABLE + noahmp%water%param%SnowWetAgeC2Brun89 = NoahmpIO%SnowWetAgeC2Brun89_TABLE + noahmp%water%param%SnowAgeScaleFac = NoahmpIO%SnowAgeScaleFac_TABLE + endif + ! soil properties do IndexSoilLayer = 1, size(SoilType) noahmp%water%param%SoilMoistureSat (IndexSoilLayer) = NoahmpIO%SMCMAX_TABLE(SoilType(IndexSoilLayer)) noahmp%water%param%SoilMoistureWilt (IndexSoilLayer) = NoahmpIO%SMCWLT_TABLE(SoilType(IndexSoilLayer)) @@ -199,6 +264,12 @@ subroutine WaterVarInTransfer(noahmp, NoahmpIO) noahmp%water%param%DrainTubeDist = NoahmpIO%TD_SPAC (I,J) ! tile spacing endif + ! spatial varying wetland parameters from input + if ( noahmp%config%nmlist%OptWetlandModel == 2 ) then + noahmp%water%param%SoilSfcSatFracMax = NoahmpIO%FSATMX(I,J) + noahmp%water%param%WetlandCapMax = NoahmpIO%WCAP(I,J) + endif + ! derived water parameters noahmp%water%param%SoilInfilMaxCoeff = noahmp%water%param%SoilInfilFacRef * & noahmp%water%param%SoilWatConductivitySat(1) / & diff --git a/drivers/erf/WaterVarOutTransferMod.F90 b/drivers/erf/WaterVarOutTransferMod.F90 index 7a30df02..b404bd31 100644 --- a/drivers/erf/WaterVarOutTransferMod.F90 +++ b/drivers/erf/WaterVarOutTransferMod.F90 @@ -56,7 +56,7 @@ subroutine WaterVarOutTransfer(noahmp, NoahmpIO) noahmp%water%flux%TileDrain = 0.0 noahmp%water%flux%RunoffSurface = noahmp%water%flux%RunoffSurface * noahmp%config%domain%MainTimeStep noahmp%water%flux%RunoffSubsurface = noahmp%water%flux%RunoffSubsurface * noahmp%config%domain%MainTimeStep - NoahmpIO%QFX(I,J) = noahmp%water%flux%EvapGroundNet + NoahmpIO%QFX(I,J) = noahmp%water%flux%EvapGroundNet endif if ( IndicatorIceSfc == 0 ) then ! land soil point @@ -73,10 +73,8 @@ subroutine WaterVarOutTransfer(noahmp, NoahmpIO) NoahmpIO%SNOW (I,J) = noahmp%water%state%SnowWaterEquiv NoahmpIO%SNOWH (I,J) = noahmp%water%state%SnowDepth NoahmpIO%CANWAT (I,J) = noahmp%water%state%CanopyLiqWater + noahmp%water%state%CanopyIce - NoahmpIO%ACSNOW (I,J) = NoahmpIO%ACSNOW(I,J) + (NoahmpIO%RAINBL (I,J) * noahmp%water%state%FrozenPrecipFrac) - NoahmpIO%ACSNOM (I,J) = NoahmpIO%ACSNOM(I,J) + (noahmp%water%flux%MeltGroundSnow * NoahmpIO%DTBL) + & - noahmp%water%state%PondSfcThinSnwMelt + noahmp%water%state%PondSfcThinSnwComb + & - noahmp%water%state%PondSfcThinSnwTrans + NoahmpIO%ACSNOW (I,J) = NoahmpIO%ACSNOW(I,J) + NoahmpIO%RAINBL (I,J) * noahmp%water%state%FrozenPrecipFrac + NoahmpIO%ACSNOM (I,J) = NoahmpIO%ACSNOM(I,J) + noahmp%water%flux%MeltGroundSnow * NoahmpIO%DTBL NoahmpIO%CANLIQXY (I,J) = noahmp%water%state%CanopyLiqWater NoahmpIO%CANICEXY (I,J) = noahmp%water%state%CanopyIce NoahmpIO%FWETXY (I,J) = noahmp%water%state%CanopyWetFrac @@ -120,6 +118,7 @@ subroutine WaterVarOutTransfer(noahmp, NoahmpIO) NoahmpIO%ACC_ECANXY (I,J) = noahmp%water%flux%EvapCanopyNetAcc NoahmpIO%ACC_ETRANXY (I,J) = noahmp%water%flux%TranspirationAcc NoahmpIO%ACC_EDIRXY (I,J) = noahmp%water%flux%EvapGroundNetAcc + NoahmpIO%ACC_GLAFLWXY(I,J) = noahmp%water%flux%GlacierExcessFlowAcc NoahmpIO%RECHXY (I,J) = NoahmpIO%RECHXY(I,J) + (noahmp%water%state%RechargeGwShallowWT*1.0e3) NoahmpIO%DEEPRECHXY (I,J) = NoahmpIO%DEEPRECHXY(I,J) + noahmp%water%state%RechargeGwDeepWT NoahmpIO%SMCWTDXY (I,J) = noahmp%water%state%SoilMoistureToWT @@ -129,17 +128,47 @@ subroutine WaterVarOutTransfer(noahmp, NoahmpIO) NoahmpIO%SNICEXY (I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%SnowIce(-NumSnowLayerMax+1:0) NoahmpIO%SNLIQXY (I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%SnowLiqWater(-NumSnowLayerMax+1:0) + !SNICAR + if ( noahmp%config%nmlist%OptSnowAlbedo == 3 ) then + NoahmpIO%SNRDSXY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%SnowRadius(-NumSnowLayerMax+1:0) + NoahmpIO%SNFRXY (I,-NumSnowLayerMax+1:0,J) = noahmp%water%flux%SnowFreezeRate(-NumSnowLayerMax+1:0) + NoahmpIO%BCPHIXY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassBChydrophi(-NumSnowLayerMax+1:0) + NoahmpIO%BCPHOXY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassBChydropho(-NumSnowLayerMax+1:0) + NoahmpIO%OCPHIXY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassOChydrophi(-NumSnowLayerMax+1:0) + NoahmpIO%OCPHOXY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassOChydropho(-NumSnowLayerMax+1:0) + NoahmpIO%DUST1XY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassDust1(-NumSnowLayerMax+1:0) + NoahmpIO%DUST2XY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassDust2(-NumSnowLayerMax+1:0) + NoahmpIO%DUST3XY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassDust3(-NumSnowLayerMax+1:0) + NoahmpIO%DUST4XY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassDust4(-NumSnowLayerMax+1:0) + NoahmpIO%DUST5XY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassDust5(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcBCPHIXY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassConcBChydrophi(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcBCPHOXY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassConcBChydropho(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcOCPHIXY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassConcOChydrophi(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcOCPHOXY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassConcOChydropho(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcDUST1XY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassConcDust1(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcDUST2XY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassConcDust2(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcDUST3XY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassConcDust3(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcDUST4XY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassConcDust4(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcDUST5XY(I,-NumSnowLayerMax+1:0,J) = noahmp%water%state%MassConcDust5(-NumSnowLayerMax+1:0) + endif + ! irrigation - NoahmpIO%IRNUMSI (I,J) = noahmp%water%state%IrrigationCntSprinkler - NoahmpIO%IRNUMMI (I,J) = noahmp%water%state%IrrigationCntMicro - NoahmpIO%IRNUMFI (I,J) = noahmp%water%state%IrrigationCntFlood - NoahmpIO%IRWATSI (I,J) = noahmp%water%state%IrrigationAmtSprinkler - NoahmpIO%IRWATMI (I,J) = noahmp%water%state%IrrigationAmtMicro - NoahmpIO%IRWATFI (I,J) = noahmp%water%state%IrrigationAmtFlood - NoahmpIO%IRSIVOL (I,J) = NoahmpIO%IRSIVOL(I,J)+(noahmp%water%flux%IrrigationRateSprinkler*1000.0) - NoahmpIO%IRMIVOL (I,J) = NoahmpIO%IRMIVOL(I,J)+(noahmp%water%flux%IrrigationRateMicro*1000.0) - NoahmpIO%IRFIVOL (I,J) = NoahmpIO%IRFIVOL(I,J)+(noahmp%water%flux%IrrigationRateFlood*1000.0) - NoahmpIO%IRELOSS (I,J) = NoahmpIO%IRELOSS(I,J)+(noahmp%water%flux%EvapIrriSprinkler*NoahmpIO%DTBL) + NoahmpIO%IRNUMSI(I,J) = noahmp%water%state%IrrigationCntSprinkler + NoahmpIO%IRNUMMI(I,J) = noahmp%water%state%IrrigationCntMicro + NoahmpIO%IRNUMFI(I,J) = noahmp%water%state%IrrigationCntFlood + NoahmpIO%IRWATSI(I,J) = noahmp%water%state%IrrigationAmtSprinkler + NoahmpIO%IRWATMI(I,J) = noahmp%water%state%IrrigationAmtMicro + NoahmpIO%IRWATFI(I,J) = noahmp%water%state%IrrigationAmtFlood + NoahmpIO%IRSIVOL(I,J) = NoahmpIO%IRSIVOL(I,J) + (noahmp%water%flux%IrrigationRateSprinkler*1000.0) + NoahmpIO%IRMIVOL(I,J) = NoahmpIO%IRMIVOL(I,J) + (noahmp%water%flux%IrrigationRateMicro*1000.0) + NoahmpIO%IRFIVOL(I,J) = NoahmpIO%IRFIVOL(I,J) + (noahmp%water%flux%IrrigationRateFlood*1000.0) + NoahmpIO%IRELOSS(I,J) = NoahmpIO%IRELOSS(I,J) + (noahmp%water%flux%EvapIrriSprinkler*NoahmpIO%DTBL) + + ! wetland (Zhang2022) + if ( noahmp%config%nmlist%OptWetlandModel > 0 ) then + NoahmpIO%WSURFXY(I,J) = noahmp%water%state%WaterStorageWetland + NoahmpIO%FSATXY (I,J) = noahmp%water%state%SoilSaturateFrac + endif #ifdef WRF_HYDRO NoahmpIO%infxsrt (I,J) = max(noahmp%water%flux%RunoffSurface, 0.0) ! mm, surface runoff diff --git a/src/BalanceErrorCheckGlacierMod.F90 b/src/BalanceErrorCheckGlacierMod.F90 index a1beb7ea..5afb8e76 100644 --- a/src/BalanceErrorCheckGlacierMod.F90 +++ b/src/BalanceErrorCheckGlacierMod.F90 @@ -146,12 +146,14 @@ subroutine BalanceEnergyCheckGlacier(noahmp) endif ! SNICAR - if ( OptSnowAlbedo == 3 .and. abs(RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer))>0.001) then ! original check is 0.0001, precision issue - write(*,*) "RadSwAbsGrd gridmean = ", RadSwAbsGrd - write(*,*) "sum(RadSwAbsSnowSoilLayer) gridmean = ", sum(RadSwAbsSnowSoilLayer) - write(*,*) "RadSwAbsSnowSoilLayer gridmean = ", RadSwAbsSnowSoilLayer - write(*,*) "RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer) gridmean = ", RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer) - stop "Error: SNICAR snow albedo radiation budget problem in NoahMP LSM" + if ( OptSnowAlbedo == 3 ) then + if ( abs(RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer))>0.001 ) then ! original check is 0.0001, precision issue + write(*,*) "RadSwAbsGrd gridmean = ", RadSwAbsGrd + write(*,*) "sum(RadSwAbsSnowSoilLayer) gridmean = ", sum(RadSwAbsSnowSoilLayer) + write(*,*) "RadSwAbsSnowSoilLayer gridmean = ", RadSwAbsSnowSoilLayer + write(*,*) "RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer) gridmean = ", RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer) + stop "Error: SNICAR snow albedo radiation budget problem in NoahMP LSM" + endif endif ! error in surface energy balance should be <0.01 W/m2 diff --git a/src/BalanceErrorCheckMod.F90 b/src/BalanceErrorCheckMod.F90 index 40160386..b3f21065 100644 --- a/src/BalanceErrorCheckMod.F90 +++ b/src/BalanceErrorCheckMod.F90 @@ -235,12 +235,14 @@ subroutine BalanceEnergyCheck(noahmp) endif ! SNICAR - if ( OptSnowAlbedo == 3 .and. abs(RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer))>0.001 ) then ! original check is 0.0001, precision issue - write(*,*) "RadSwAbsGrd gridmean = ", RadSwAbsGrd - write(*,*) "sum(RadSwAbsSnowSoilLayer) gridmean = ", sum(RadSwAbsSnowSoilLayer) - write(*,*) "RadSwAbsSnowSoilLayer gridmean = ", RadSwAbsSnowSoilLayer - write(*,*) "RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer) gridmean = ", RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer) - stop "Error: SNICAR snow albedo radiation budget problem in NoahMP LSM" + if ( OptSnowAlbedo == 3 ) then + if ( abs(RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer))>0.001 ) then ! original check is 0.0001, precision issue + write(*,*) "RadSwAbsGrd gridmean = ", RadSwAbsGrd + write(*,*) "sum(RadSwAbsSnowSoilLayer) gridmean = ", sum(RadSwAbsSnowSoilLayer) + write(*,*) "RadSwAbsSnowSoilLayer gridmean = ", RadSwAbsSnowSoilLayer + write(*,*) "RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer) gridmean = ", RadSwAbsGrd-sum(RadSwAbsSnowSoilLayer) + stop "Error: SNICAR snow albedo radiation budget problem in NoahMP LSM" + endif endif ! error in surface energy balance should be <0.01 W/m2 diff --git a/src/GlacierTemperatureMainMod.F90 b/src/GlacierTemperatureMainMod.F90 index 36bf817f..bc48ae62 100644 --- a/src/GlacierTemperatureMainMod.F90 +++ b/src/GlacierTemperatureMainMod.F90 @@ -64,14 +64,16 @@ subroutine GlacierTemperatureMain(noahmp) ! compute solar penetration through snowpack and glacier ice RadSwPenetrateGrd(-NumSnowLayerMax+1:NumSoilLayer) = 0.0 - if (OptSnowAlbedo == 3 .and. NumSnowLayerNeg < 0 .and. sum(RadSwAbsSnowSoilLayer) > 0.0) then - do IndLoop = NumSnowLayerNeg+1, 1, 1 - if (IndLoop == NumSnowLayerNeg+1) then - RadSwPenetrateGrd(IndLoop) = RadSwAbsSnowSoilLayer(IndLoop) - RadSwAbsGrd - else - RadSwPenetrateGrd(IndLoop) = RadSwAbsSnowSoilLayer(IndLoop) - endif - enddo + if (OptSnowAlbedo == 3 .and. NumSnowLayerNeg < 0) then + if (sum(RadSwAbsSnowSoilLayer) > 0.0) then + do IndLoop = NumSnowLayerNeg+1, 1, 1 + if (IndLoop == NumSnowLayerNeg+1) then + RadSwPenetrateGrd(IndLoop) = RadSwAbsSnowSoilLayer(IndLoop) - RadSwAbsGrd + else + RadSwPenetrateGrd(IndLoop) = RadSwAbsSnowSoilLayer(IndLoop) + endif + enddo + endif endif ! adjust DepthSoilTempBottom from glacier ice surface to DepthSoilTempBotToSno from snow surface diff --git a/src/SnowRadiationSnicarMod.F90 b/src/SnowRadiationSnicarMod.F90 index 38b1cc12..e781af1b 100644 --- a/src/SnowRadiationSnicarMod.F90 +++ b/src/SnowRadiationSnicarMod.F90 @@ -565,10 +565,10 @@ subroutine SnowRadiationSnicar(noahmp,FlagSwRadType) SnowLayerTop = snl_lcl + 1 ! Set local aerosol array - if (FlagSnicarUseAerosol == .true.) then + if (FlagSnicarUseAerosol .eqv. .true.) then mss_cnc_aer_lcl(:,1) = MassConcBChydrophi(:) mss_cnc_aer_lcl(:,2) = MassConcBChydropho(:) - if (FlagSnicarUseOC == .true.) then + if (FlagSnicarUseOC .eqv. .true.) then mss_cnc_aer_lcl(:,3) = MassConcOChydrophi(:) mss_cnc_aer_lcl(:,4) = MassConcOChydropho(:) else @@ -1519,7 +1519,7 @@ subroutine SnowRadiationSnicar(noahmp,FlagSwRadType) ! ERROR check: negative absorption if (flx_abs_lcl(i,LoopInd) < -0.0001) then !original -0.00001, but not work for Koch snowflake - write (*,"(a,e13.6,i,i,i,i)") "SNICAR ERROR: negative absoption : ", & + write (*,"(a,e13.6,i0,i0,i0,i0)") "SNICAR ERROR: negative absoption : ", & flx_abs_lcl(i,LoopInd),i,LoopInd,SnowLayerTop,SnowLayerBottom write(*,*) "SNICAR_AD STATS: L_snw(0)= ", L_snw(0) write(*,*) "SNICAR_AD STATS: snw_rds_lcl(0)= ", snw_rds_lcl(0) diff --git a/src/SoilSnowTemperatureMainMod.F90 b/src/SoilSnowTemperatureMainMod.F90 index 5f5034cc..63ff5a61 100644 --- a/src/SoilSnowTemperatureMainMod.F90 +++ b/src/SoilSnowTemperatureMainMod.F90 @@ -65,14 +65,16 @@ subroutine SoilSnowTemperatureMain(noahmp) ! compute solar penetration through snowpack and soil RadSwPenetrateGrd(-NumSnowLayerMax+1:NumSoilLayer) = 0.0 - if (OptSnowAlbedo == 3 .and. NumSnowLayerNeg < 0 .and. sum(RadSwAbsSnowSoilLayer) > 0.0) then - do IndLoop = NumSnowLayerNeg+1, 1, 1 - if (IndLoop == NumSnowLayerNeg+1) then - RadSwPenetrateGrd(IndLoop) = RadSwAbsSnowSoilLayer(IndLoop) - RadSwAbsGrd - else - RadSwPenetrateGrd(IndLoop) = RadSwAbsSnowSoilLayer(IndLoop) - endif - enddo + if (OptSnowAlbedo == 3 .and. NumSnowLayerNeg < 0) then + if (sum(RadSwAbsSnowSoilLayer) > 0.0) then + do IndLoop = NumSnowLayerNeg+1, 1, 1 + if (IndLoop == NumSnowLayerNeg+1) then + RadSwPenetrateGrd(IndLoop) = RadSwAbsSnowSoilLayer(IndLoop) - RadSwAbsGrd + else + RadSwPenetrateGrd(IndLoop) = RadSwAbsSnowSoilLayer(IndLoop) + endif + enddo + endif endif ! adjust DepthSoilTempBottom from soil surface to DepthSoilTempBotToSno from snow surface diff --git a/src/SurfaceAlbedoGlacierMod.F90 b/src/SurfaceAlbedoGlacierMod.F90 index 11fae889..15cb0731 100644 --- a/src/SurfaceAlbedoGlacierMod.F90 +++ b/src/SurfaceAlbedoGlacierMod.F90 @@ -56,8 +56,6 @@ subroutine SurfaceAlbedoGlacier(noahmp) AlbedoGrdDif (IndBand) = 0.0 AlbedoSnowDir(IndBand) = 0.0 AlbedoSnowDif(IndBand) = 0.0 - FracRadSwAbsSnowDir(:,IndBand) = 0.0 - FracRadSwAbsSnowDif(:,IndBand) = 0.0 enddo ! snow aging (allow nighttime BATS snow albedo aging) @@ -65,6 +63,8 @@ subroutine SurfaceAlbedoGlacier(noahmp) ! snow grain size and aging for SNICAR if ( OptSnowAlbedo == 3 ) then + FracRadSwAbsSnowDir = 0.0 + FracRadSwAbsSnowDif = 0.0 call SnowFreshRadius(noahmp) call SnowAgingSnicar(noahmp) endif diff --git a/src/SurfaceAlbedoMod.F90 b/src/SurfaceAlbedoMod.F90 index 53cf553a..49f39874 100644 --- a/src/SurfaceAlbedoMod.F90 +++ b/src/SurfaceAlbedoMod.F90 @@ -106,8 +106,6 @@ subroutine SurfaceAlbedo(noahmp) RadSwReflVegDif (IndBand) = 0.0 RadSwReflGrdDir (IndBand) = 0.0 RadSwReflGrdDif (IndBand) = 0.0 - FracRadSwAbsSnowDir(:,IndBand) = 0.0 - FracRadSwAbsSnowDif(:,IndBand) = 0.0 enddo VegAreaIndEff = LeafAreaIndEff + StemAreaIndEff @@ -116,6 +114,8 @@ subroutine SurfaceAlbedo(noahmp) ! snow grain size and aging for SNICAR if ( OptSnowAlbedo == 3 ) then + FracRadSwAbsSnowDir = 0.0 + FracRadSwAbsSnowDif = 0.0 call SnowFreshRadius(noahmp) call SnowAgingSnicar(noahmp) endif diff --git a/src/SurfaceRadiationGlacierMod.F90 b/src/SurfaceRadiationGlacierMod.F90 index 5bf757d5..56c76bb3 100644 --- a/src/SurfaceRadiationGlacierMod.F90 +++ b/src/SurfaceRadiationGlacierMod.F90 @@ -57,12 +57,12 @@ subroutine SurfaceRadiationGlacier(noahmp) RadSwAbsGrd = 0.0 RadSwAbsSfc = 0.0 RadSwReflSfc = 0.0 - RadSwAbsSnowSoilLayer(:) = 0.0 if ( OptSnowAlbedo == 3 ) then if (.not. allocated(FracRadSwAbsSnowDirMean)) allocate(FracRadSwAbsSnowDirMean(-NumSnowLayerMax+1:1,1:NumSwRadBand)) if (.not. allocated(FracRadSwAbsSnowDifMean)) allocate(FracRadSwAbsSnowDifMean(-NumSnowLayerMax+1:1,1:NumSwRadBand)) FracRadSwAbsSnowDirMean(:,:) = 0.0 FracRadSwAbsSnowDifMean(:,:) = 0.0 + RadSwAbsSnowSoilLayer(:) = 0.0 endif ! aggretate radiative flux diff --git a/src/SurfaceRadiationMod.F90 b/src/SurfaceRadiationMod.F90 index 364901cc..ab91a862 100644 --- a/src/SurfaceRadiationMod.F90 +++ b/src/SurfaceRadiationMod.F90 @@ -91,6 +91,7 @@ subroutine SurfaceRadiation(noahmp) if (.not. allocated(FracRadSwAbsSnowDifMean)) allocate(FracRadSwAbsSnowDifMean(-NumSnowLayerMax+1:1,1:NumSwRadBand)) FracRadSwAbsSnowDirMean(:,:) = 0.0 FracRadSwAbsSnowDifMean(:,:) = 0.0 + RadSwAbsSnowSoilLayer(:) = 0.0 endif MinThr = 1.0e-6 @@ -104,7 +105,6 @@ subroutine SurfaceRadiation(noahmp) RadSwReflGrd = 0.0 RadPhotoActAbsSunlit = 0.0 RadPhotoActAbsShade = 0.0 - RadSwAbsSnowSoilLayer(:) = 0.0 ! aggregate radiative flux do IndBand = 1, NumSwRadBand