diff --git a/drivers/hrldas/BiochemVarInTransferMod.F90 b/drivers/hrldas/BiochemVarInTransferMod.F90 index 07828fe8..efe0d5ba 100644 --- a/drivers/hrldas/BiochemVarInTransferMod.F90 +++ b/drivers/hrldas/BiochemVarInTransferMod.F90 @@ -30,6 +30,7 @@ subroutine BiochemVarInTransfer(noahmp, NoahmpIO) associate( & I => noahmp%config%domain%GridIndexI ,& J => noahmp%config%domain%GridIndexJ ,& + N => NoahmpIO%N ,& VegType => noahmp%config%domain%VegType ,& CropType => noahmp%config%domain%CropType ,& OptCropModel => noahmp%config%nmlist%OptCropModel & @@ -37,15 +38,15 @@ subroutine BiochemVarInTransfer(noahmp, NoahmpIO) ! ------------------------------------------------------------------------- ! biochem state variables - noahmp%biochem%state%PlantGrowStage = NoahmpIO%PGSXY (I,J) - noahmp%biochem%state%LeafMass = NoahmpIO%LFMASSXY(I,J) - noahmp%biochem%state%RootMass = NoahmpIO%RTMASSXY(I,J) - noahmp%biochem%state%StemMass = NoahmpIO%STMASSXY(I,J) - noahmp%biochem%state%WoodMass = NoahmpIO%WOODXY (I,J) - noahmp%biochem%state%CarbonMassDeepSoil = NoahmpIO%STBLCPXY(I,J) - noahmp%biochem%state%CarbonMassShallowSoil = NoahmpIO%FASTCPXY(I,J) - noahmp%biochem%state%GrainMass = NoahmpIO%GRAINXY (I,J) - noahmp%biochem%state%GrowDegreeDay = NoahmpIO%GDDXY (I,J) + noahmp%biochem%state%PlantGrowStage = NoahmpIO%PGSXY (I,J,N) + noahmp%biochem%state%LeafMass = NoahmpIO%LFMASSXY(I,J,N) + noahmp%biochem%state%RootMass = NoahmpIO%RTMASSXY(I,J,N) + noahmp%biochem%state%StemMass = NoahmpIO%STMASSXY(I,J,N) + noahmp%biochem%state%WoodMass = NoahmpIO%WOODXY (I,J,N) + noahmp%biochem%state%CarbonMassDeepSoil = NoahmpIO%STBLCPXY(I,J,N) + noahmp%biochem%state%CarbonMassShallowSoil = NoahmpIO%FASTCPXY(I,J,N) + noahmp%biochem%state%GrainMass = NoahmpIO%GRAINXY (I,J,N) + noahmp%biochem%state%GrowDegreeDay = NoahmpIO%GDDXY (I,J,N) noahmp%biochem%state%NitrogenConcFoliage = 1.0 ! for now, set to nitrogen saturation ! biochem parameter variables diff --git a/drivers/hrldas/BiochemVarOutTransferMod.F90 b/drivers/hrldas/BiochemVarOutTransferMod.F90 index 0a4395db..f3e08992 100644 --- a/drivers/hrldas/BiochemVarOutTransferMod.F90 +++ b/drivers/hrldas/BiochemVarOutTransferMod.F90 @@ -27,26 +27,27 @@ subroutine BiochemVarOutTransfer(noahmp, NoahmpIO) ! --------------------------------------------------------------------- associate( & I => noahmp%config%domain%GridIndexI ,& - J => noahmp%config%domain%GridIndexJ & + J => noahmp%config%domain%GridIndexJ ,& + N => NoahmpIO%N & ) ! --------------------------------------------------------------------- ! biochem state variables - NoahmpIO%LFMASSXY(I,J) = noahmp%biochem%state%LeafMass - NoahmpIO%RTMASSXY(I,J) = noahmp%biochem%state%RootMass - NoahmpIO%STMASSXY(I,J) = noahmp%biochem%state%StemMass - NoahmpIO%WOODXY (I,J) = noahmp%biochem%state%WoodMass - NoahmpIO%STBLCPXY(I,J) = noahmp%biochem%state%CarbonMassDeepSoil - NoahmpIO%FASTCPXY(I,J) = noahmp%biochem%state%CarbonMassShallowSoil - NoahmpIO%GDDXY (I,J) = noahmp%biochem%state%GrowDegreeDay - NoahmpIO%PGSXY (I,J) = noahmp%biochem%state%PlantGrowStage - NoahmpIO%GRAINXY (I,J) = noahmp%biochem%state%GrainMass + NoahmpIO%LFMASSXY(I,J,N) = noahmp%biochem%state%LeafMass + NoahmpIO%RTMASSXY(I,J,N) = noahmp%biochem%state%RootMass + NoahmpIO%STMASSXY(I,J,N) = noahmp%biochem%state%StemMass + NoahmpIO%WOODXY (I,J,N) = noahmp%biochem%state%WoodMass + NoahmpIO%STBLCPXY(I,J,N) = noahmp%biochem%state%CarbonMassDeepSoil + NoahmpIO%FASTCPXY(I,J,N) = noahmp%biochem%state%CarbonMassShallowSoil + NoahmpIO%GDDXY (I,J,N) = noahmp%biochem%state%GrowDegreeDay + NoahmpIO%PGSXY (I,J,N) = noahmp%biochem%state%PlantGrowStage + NoahmpIO%GRAINXY (I,J,N) = noahmp%biochem%state%GrainMass ! biochem flux variables - NoahmpIO%NEEXY (I,J) = noahmp%biochem%flux%NetEcoExchange - NoahmpIO%GPPXY (I,J) = noahmp%biochem%flux%GrossPriProduction - NoahmpIO%NPPXY (I,J) = noahmp%biochem%flux%NetPriProductionTot - NoahmpIO%PSNXY (I,J) = noahmp%biochem%flux%PhotosynTotal + NoahmpIO%NEEXY (I,J,N) = noahmp%biochem%flux%NetEcoExchange + NoahmpIO%GPPXY (I,J,N) = noahmp%biochem%flux%GrossPriProduction + NoahmpIO%NPPXY (I,J,N) = noahmp%biochem%flux%NetPriProductionTot + NoahmpIO%PSNXY (I,J,N) = noahmp%biochem%flux%PhotosynTotal end associate diff --git a/drivers/hrldas/ConfigVarInTransferMod.F90 b/drivers/hrldas/ConfigVarInTransferMod.F90 index 5c1faa45..82dc7d22 100644 --- a/drivers/hrldas/ConfigVarInTransferMod.F90 +++ b/drivers/hrldas/ConfigVarInTransferMod.F90 @@ -30,6 +30,7 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO) associate( & I => NoahmpIO%I ,& J => NoahmpIO%J ,& + N => NoahmpIO%N ,& NumSnowLayerMax => NoahmpIO%NSNOW ,& NumSoilLayer => NoahmpIO%NSOIL & ) @@ -85,7 +86,7 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO) noahmp%config%domain%FlagSoilProcess = NoahmpIO%calculate_soil noahmp%config%domain%NumSoilTimeStep = NoahmpIO%soil_update_steps noahmp%config%domain%NumSnowLayerMax = NoahmpIO%NSNOW - noahmp%config%domain%NumSnowLayerNeg = NoahmpIO%ISNOWXY(I,J) + noahmp%config%domain%NumSnowLayerNeg = NoahmpIO%ISNOWXY(I,J,N) noahmp%config%domain%NumSoilLayer = NoahmpIO%NSOIL noahmp%config%domain%GridIndexI = NoahmpIO%I noahmp%config%domain%GridIndexJ = NoahmpIO%J @@ -150,7 +151,7 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO) noahmp%config%domain%DepthSoilLayer(1:NumSoilLayer) = NoahmpIO%ZSOIL(1:NumSoilLayer) noahmp%config%domain%DepthSnowSoilLayer(-NumSnowLayerMax+1:NumSoilLayer) = & - NoahmpIO%ZSNSOXY(I,-NumSnowLayerMax+1:NumSoilLayer,J) + NoahmpIO%ZSNSOXY(I,-NumSnowLayerMax+1:NumSoilLayer,J,N) ! treatment for urban point if ( (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISURBAN_TABLE) .or. (NoahmpIO%IVGTYP(I,J) > NoahmpIO%URBTYPE_beg) ) then @@ -160,7 +161,7 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO) else 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: % + NoahmpIO%GVFMAX(I,J,N) = 0.96 * 100.0 ! unit: % endif endif @@ -172,8 +173,8 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO) if ( (NoahmpIO%IOPT_CROP > 0) .and. (NoahmpIO%CROPCAT(I,J) > 0) ) then noahmp%config%domain%CropType = NoahmpIO%CROPCAT(I,J) noahmp%config%domain%VegType = NoahmpIO%ISCROP_TABLE - NoahmpIO%VEGFRA(I,J) = 0.95 * 100.0 ! unit: % - NoahmpIO%GVFMAX(I,J) = 0.95 * 100.0 ! unit: % + NoahmpIO%VEGFRA(I,J,N) = 0.95 * 100.0 ! unit: % + NoahmpIO%GVFMAX(I,J,N) = 0.95 * 100.0 ! unit: % endif ! correct inconsistent soil type diff --git a/drivers/hrldas/ConfigVarOutTransferMod.F90 b/drivers/hrldas/ConfigVarOutTransferMod.F90 index 402397d3..73884198 100644 --- a/drivers/hrldas/ConfigVarOutTransferMod.F90 +++ b/drivers/hrldas/ConfigVarOutTransferMod.F90 @@ -28,16 +28,17 @@ subroutine ConfigVarOutTransfer(noahmp, NoahmpIO) associate( & I => noahmp%config%domain%GridIndexI ,& J => noahmp%config%domain%GridIndexJ ,& + N => NoahmpIO%N ,& NumSnowLayerMax => noahmp%config%domain%NumSnowLayerMax ,& NumSoilLayer => noahmp%config%domain%NumSoilLayer & ) ! ---------------------------------------------------------------------- ! config domain variables - NoahmpIO%ISNOWXY(I,J) = noahmp%config%domain%NumSnowLayerNeg - NoahmpIO%ZSNSOXY(I,-NumSnowLayerMax+1:NumSoilLayer,J) = & + NoahmpIO%ISNOWXY(I,J,N) = noahmp%config%domain%NumSnowLayerNeg + NoahmpIO%ZSNSOXY(I,-NumSnowLayerMax+1:NumSoilLayer,J,N) = & noahmp%config%domain%DepthSnowSoilLayer(-NumSnowLayerMax+1:NumSoilLayer) - NoahmpIO%FORCZLSM(I,J) = noahmp%config%domain%RefHeightAboveSfc + NoahmpIO%FORCZLSM(I,J,N) = noahmp%config%domain%RefHeightAboveSfc end associate diff --git a/drivers/hrldas/EnergyVarInTransferMod.F90 b/drivers/hrldas/EnergyVarInTransferMod.F90 index 585cc276..bcdf5849 100644 --- a/drivers/hrldas/EnergyVarInTransferMod.F90 +++ b/drivers/hrldas/EnergyVarInTransferMod.F90 @@ -33,6 +33,7 @@ subroutine EnergyVarInTransfer(noahmp, NoahmpIO) associate( & I => noahmp%config%domain%GridIndexI ,& J => noahmp%config%domain%GridIndexJ ,& + N => NoahmpIO%N ,& VegType => noahmp%config%domain%VegType ,& SoilType => noahmp%config%domain%SoilType ,& CropType => noahmp%config%domain%CropType ,& @@ -47,23 +48,23 @@ subroutine EnergyVarInTransfer(noahmp, NoahmpIO) ! ------------------------------------------------------------------------- ! energy state variables - noahmp%energy%state%LeafAreaIndex = NoahmpIO%LAI (I,J) - noahmp%energy%state%StemAreaIndex = NoahmpIO%XSAIXY (I,J) - noahmp%energy%state%SpecHumiditySfcMean = NoahmpIO%QSFC (I,J) - noahmp%energy%state%TemperatureGrd = NoahmpIO%TGXY (I,J) - noahmp%energy%state%TemperatureCanopy = NoahmpIO%TVXY (I,J) - noahmp%energy%state%SnowAgeNondim = NoahmpIO%TAUSSXY (I,J) - noahmp%energy%state%AlbedoSnowPrev = NoahmpIO%ALBOLDXY(I,J) - noahmp%energy%state%PressureVaporCanAir = NoahmpIO%EAHXY (I,J) - noahmp%energy%state%TemperatureCanopyAir = NoahmpIO%TAHXY (I,J) - noahmp%energy%state%ExchCoeffShSfc = NoahmpIO%CHXY (I,J) - noahmp%energy%state%ExchCoeffMomSfc = NoahmpIO%CMXY (I,J) - noahmp%energy%state%TemperatureSoilSnow(-NumSnowLayerMax+1:0) = NoahmpIO%TSNOXY (I,-NumSnowLayerMax+1:0,J) - noahmp%energy%state%TemperatureSoilSnow(1:NumSoilLayer) = NoahmpIO%TSLB (I,1:NumSoilLayer,J) + noahmp%energy%state%LeafAreaIndex = NoahmpIO%LAI (I,J,N) + noahmp%energy%state%StemAreaIndex = NoahmpIO%XSAIXY (I,J,N) + noahmp%energy%state%SpecHumiditySfcMean = NoahmpIO%QSFC (I,J,N) + noahmp%energy%state%TemperatureGrd = NoahmpIO%TGXY (I,J,N) + noahmp%energy%state%TemperatureCanopy = NoahmpIO%TVXY (I,J,N) + noahmp%energy%state%SnowAgeNondim = NoahmpIO%TAUSSXY (I,J,N) + noahmp%energy%state%AlbedoSnowPrev = NoahmpIO%ALBOLDXY(I,J,N) + noahmp%energy%state%PressureVaporCanAir = NoahmpIO%EAHXY (I,J,N) + noahmp%energy%state%TemperatureCanopyAir = NoahmpIO%TAHXY (I,J,N) + noahmp%energy%state%ExchCoeffShSfc = NoahmpIO%CHXY (I,J,N) + noahmp%energy%state%ExchCoeffMomSfc = NoahmpIO%CMXY (I,J,N) + noahmp%energy%state%TemperatureSoilSnow(-NumSnowLayerMax+1:0) = NoahmpIO%TSNOXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%energy%state%TemperatureSoilSnow(1:NumSoilLayer) = NoahmpIO%TSLB (I,1:NumSoilLayer,J,N) 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) + noahmp%energy%state%AlbedoSoilDir(1:NumSwRadBand) = NoahmpIO%ALBSOILDIRXY(I,1:NumSwRadBand,J,N) + noahmp%energy%state%AlbedoSoilDif(1:NumSwRadBand) = NoahmpIO%ALBSOILDIFXY(I,1:NumSwRadBand,J,N) ! 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 @@ -71,7 +72,7 @@ subroutine EnergyVarInTransfer(noahmp, NoahmpIO) endif ! energy flux variables - noahmp%energy%flux%HeatGroundTotAcc = NoahmpIO%ACC_SSOILXY(I,J) + noahmp%energy%flux%HeatGroundTotAcc = NoahmpIO%ACC_SSOILXY(I,J,N) ! energy parameter variables noahmp%energy%param%SoilHeatCapacity = NoahmpIO%CSOIL_TABLE @@ -101,8 +102,8 @@ subroutine EnergyVarInTransfer(noahmp, NoahmpIO) noahmp%energy%param%EmissivityIceSfc = NoahmpIO%EICE_TABLE noahmp%energy%param%ResistanceSoilExp = NoahmpIO%RSURF_EXP_TABLE noahmp%energy%param%ResistanceSnowSfc = NoahmpIO%RSURF_SNOW_TABLE - noahmp%energy%param%VegFracAnnMax = NoahmpIO%GVFMAX(I,J) / 100.0 - noahmp%energy%param%VegFracGreen = NoahmpIO%VEGFRA(I,J) / 100.0 + noahmp%energy%param%VegFracAnnMax = NoahmpIO%GVFMAX(I,J,N) / 100.0 + noahmp%energy%param%VegFracGreen = NoahmpIO%VEGFRA(I,J,N) / 100.0 noahmp%energy%param%TreeCrownRadius = NoahmpIO%RC_TABLE (VegType) noahmp%energy%param%HeightCanopyTop = NoahmpIO%HVT_TABLE (VegType) noahmp%energy%param%HeightCanopyBot = NoahmpIO%HVB_TABLE (VegType) diff --git a/drivers/hrldas/EnergyVarOutTransferMod.F90 b/drivers/hrldas/EnergyVarOutTransferMod.F90 index 23311629..753900b3 100644 --- a/drivers/hrldas/EnergyVarOutTransferMod.F90 +++ b/drivers/hrldas/EnergyVarOutTransferMod.F90 @@ -35,6 +35,7 @@ subroutine EnergyVarOutTransfer(noahmp, NoahmpIO) associate( & I => noahmp%config%domain%GridIndexI ,& J => noahmp%config%domain%GridIndexJ ,& + N => NoahmpIO%N ,& NumSoilLayer => noahmp%config%domain%NumSoilLayer ,& NumSnowLayerMax => noahmp%config%domain%NumSnowLayerMax ,& NumSnowLayerNeg => noahmp%config%domain%NumSnowLayerNeg ,& @@ -67,88 +68,89 @@ subroutine EnergyVarOutTransfer(noahmp, NoahmpIO) noahmp%energy%flux%HeatGroundBareGrd = noahmp%energy%flux%HeatGroundTot noahmp%energy%state%TemperatureGrdBare = noahmp%energy%state%TemperatureGrd noahmp%energy%state%ExchCoeffShBare = noahmp%energy%state%ExchCoeffShSfc - NoahmpIO%LH(I,J) = noahmp%energy%flux%HeatLatentGrd + NoahmpIO%LH(I,J,N) = noahmp%energy%flux%HeatLatentGrd endif if ( IndicatorIceSfc == 0 ) then ! land soil point - NoahmpIO%LH(I,J) = noahmp%energy%flux%HeatLatentGrd + noahmp%energy%flux%HeatLatentCanopy + & - noahmp%energy%flux%HeatLatentTransp + noahmp%energy%flux%HeatLatentIrriEvap + NoahmpIO%LH(I,J,N) = noahmp%energy%flux%HeatLatentGrd + noahmp%energy%flux%HeatLatentCanopy + & + noahmp%energy%flux%HeatLatentTransp + noahmp%energy%flux%HeatLatentIrriEvap endif ! energy flux variables - NoahmpIO%HFX (I,J) = noahmp%energy%flux%HeatSensibleSfc - NoahmpIO%GRDFLX (I,J) = noahmp%energy%flux%HeatGroundTot - NoahmpIO%FSAXY (I,J) = noahmp%energy%flux%RadSwAbsSfc - NoahmpIO%FIRAXY (I,J) = noahmp%energy%flux%RadLwNetSfc - NoahmpIO%APARXY (I,J) = noahmp%energy%flux%RadPhotoActAbsCan - NoahmpIO%SAVXY (I,J) = noahmp%energy%flux%RadSwAbsVeg - NoahmpIO%SAGXY (I,J) = noahmp%energy%flux%RadSwAbsGrd - NoahmpIO%IRCXY (I,J) = noahmp%energy%flux%RadLwNetCanopy - NoahmpIO%IRGXY (I,J) = noahmp%energy%flux%RadLwNetVegGrd - NoahmpIO%SHCXY (I,J) = noahmp%energy%flux%HeatSensibleCanopy - NoahmpIO%SHGXY (I,J) = noahmp%energy%flux%HeatSensibleVegGrd - NoahmpIO%EVGXY (I,J) = noahmp%energy%flux%HeatLatentVegGrd - NoahmpIO%GHVXY (I,J) = noahmp%energy%flux%HeatGroundVegGrd - NoahmpIO%IRBXY (I,J) = noahmp%energy%flux%RadLwNetBareGrd - NoahmpIO%SHBXY (I,J) = noahmp%energy%flux%HeatSensibleBareGrd - NoahmpIO%EVBXY (I,J) = noahmp%energy%flux%HeatLatentBareGrd - NoahmpIO%GHBXY (I,J) = noahmp%energy%flux%HeatGroundBareGrd - NoahmpIO%TRXY (I,J) = noahmp%energy%flux%HeatLatentCanTransp - NoahmpIO%EVCXY (I,J) = noahmp%energy%flux%HeatLatentCanEvap - NoahmpIO%CANHSXY (I,J) = noahmp%energy%flux%HeatCanStorageChg - NoahmpIO%PAHXY (I,J) = noahmp%energy%flux%HeatPrecipAdvSfc - NoahmpIO%PAHGXY (I,J) = noahmp%energy%flux%HeatPrecipAdvVegGrd - NoahmpIO%PAHVXY (I,J) = noahmp%energy%flux%HeatPrecipAdvCanopy - NoahmpIO%PAHBXY (I,J) = noahmp%energy%flux%HeatPrecipAdvBareGrd - NoahmpIO%ACC_SSOILXY(I,J) = noahmp%energy%flux%HeatGroundTotAcc - NoahmpIO%EFLXBXY (I,J) = noahmp%energy%flux%HeatFromSoilBot + NoahmpIO%HFX (I,J,N) = noahmp%energy%flux%HeatSensibleSfc + NoahmpIO%GRDFLX (I,J,N) = noahmp%energy%flux%HeatGroundTot + NoahmpIO%FSAXY (I,J,N) = noahmp%energy%flux%RadSwAbsSfc + NoahmpIO%FIRAXY (I,J,N) = noahmp%energy%flux%RadLwNetSfc + NoahmpIO%APARXY (I,J,N) = noahmp%energy%flux%RadPhotoActAbsCan + NoahmpIO%SAVXY (I,J,N) = noahmp%energy%flux%RadSwAbsVeg + NoahmpIO%SAGXY (I,J,N) = noahmp%energy%flux%RadSwAbsGrd + NoahmpIO%IRCXY (I,J,N) = noahmp%energy%flux%RadLwNetCanopy + NoahmpIO%IRGXY (I,J,N) = noahmp%energy%flux%RadLwNetVegGrd + NoahmpIO%SHCXY (I,J,N) = noahmp%energy%flux%HeatSensibleCanopy + NoahmpIO%SHGXY (I,J,N) = noahmp%energy%flux%HeatSensibleVegGrd + NoahmpIO%EVGXY (I,J,N) = noahmp%energy%flux%HeatLatentVegGrd + NoahmpIO%GHVXY (I,J,N) = noahmp%energy%flux%HeatGroundVegGrd + NoahmpIO%IRBXY (I,J,N) = noahmp%energy%flux%RadLwNetBareGrd + NoahmpIO%SHBXY (I,J,N) = noahmp%energy%flux%HeatSensibleBareGrd + NoahmpIO%EVBXY (I,J,N) = noahmp%energy%flux%HeatLatentBareGrd + NoahmpIO%GHBXY (I,J,N) = noahmp%energy%flux%HeatGroundBareGrd + NoahmpIO%TRXY (I,J,N) = noahmp%energy%flux%HeatLatentCanTransp + NoahmpIO%EVCXY (I,J,N) = noahmp%energy%flux%HeatLatentCanEvap + NoahmpIO%CANHSXY (I,J,N) = noahmp%energy%flux%HeatCanStorageChg + NoahmpIO%PAHXY (I,J,N) = noahmp%energy%flux%HeatPrecipAdvSfc + NoahmpIO%PAHGXY (I,J,N) = noahmp%energy%flux%HeatPrecipAdvVegGrd + NoahmpIO%PAHVXY (I,J,N) = noahmp%energy%flux%HeatPrecipAdvCanopy + NoahmpIO%PAHBXY (I,J,N) = noahmp%energy%flux%HeatPrecipAdvBareGrd + NoahmpIO%ACC_SSOILXY(I,J,N) = noahmp%energy%flux%HeatGroundTotAcc + NoahmpIO%EFLXBXY (I,J,N) = noahmp%energy%flux%HeatFromSoilBot ! energy state variables - NoahmpIO%TSK (I,J) = noahmp%energy%state%TemperatureRadSfc - NoahmpIO%EMISS (I,J) = noahmp%energy%state%EmissivitySfc - NoahmpIO%QSFC (I,J) = noahmp%energy%state%SpecHumiditySfcMean - NoahmpIO%TVXY (I,J) = noahmp%energy%state%TemperatureCanopy - NoahmpIO%TGXY (I,J) = noahmp%energy%state%TemperatureGrd - NoahmpIO%EAHXY (I,J) = noahmp%energy%state%PressureVaporCanAir - NoahmpIO%TAHXY (I,J) = noahmp%energy%state%TemperatureCanopyAir - NoahmpIO%CMXY (I,J) = noahmp%energy%state%ExchCoeffMomSfc - NoahmpIO%CHXY (I,J) = noahmp%energy%state%ExchCoeffShSfc - NoahmpIO%ALBOLDXY(I,J) = noahmp%energy%state%AlbedoSnowPrev - NoahmpIO%LAI (I,J) = noahmp%energy%state%LeafAreaIndex - NoahmpIO%XSAIXY (I,J) = noahmp%energy%state%StemAreaIndex - NoahmpIO%TAUSSXY (I,J) = noahmp%energy%state%SnowAgeNondim - NoahmpIO%Z0 (I,J) = noahmp%energy%state%RoughLenMomSfcToAtm - NoahmpIO%ZNT (I,J) = noahmp%energy%state%RoughLenMomSfcToAtm - NoahmpIO%T2MVXY (I,J) = noahmp%energy%state%TemperatureAir2mVeg - NoahmpIO%T2MBXY (I,J) = noahmp%energy%state%TemperatureAir2mBare - NoahmpIO%TRADXY (I,J) = noahmp%energy%state%TemperatureRadSfc - NoahmpIO%FVEGXY (I,J) = noahmp%energy%state%VegFrac - NoahmpIO%RSSUNXY (I,J) = noahmp%energy%state%ResistanceStomataSunlit - NoahmpIO%RSSHAXY (I,J) = noahmp%energy%state%ResistanceStomataShade - NoahmpIO%BGAPXY (I,J) = noahmp%energy%state%GapBtwCanopy - NoahmpIO%WGAPXY (I,J) = noahmp%energy%state%GapInCanopy - NoahmpIO%TGVXY (I,J) = noahmp%energy%state%TemperatureGrdVeg - NoahmpIO%TGBXY (I,J) = noahmp%energy%state%TemperatureGrdBare - NoahmpIO%CHVXY (I,J) = noahmp%energy%state%ExchCoeffShAbvCan - NoahmpIO%CHBXY (I,J) = noahmp%energy%state%ExchCoeffShBare - NoahmpIO%CHLEAFXY(I,J) = noahmp%energy%state%ExchCoeffShLeaf - NoahmpIO%CHUCXY (I,J) = noahmp%energy%state%ExchCoeffShUndCan - NoahmpIO%CHV2XY (I,J) = noahmp%energy%state%ExchCoeffSh2mVeg - NoahmpIO%CHB2XY (I,J) = noahmp%energy%state%ExchCoeffSh2mBare - NoahmpIO%Q2MVXY (I,J) = noahmp%energy%state%SpecHumidity2mVeg /(1.0-noahmp%energy%state%SpecHumidity2mVeg) ! spec humidity to mixing ratio - NoahmpIO%Q2MBXY (I,J) = noahmp%energy%state%SpecHumidity2mBare/(1.0-noahmp%energy%state%SpecHumidity2mBare) - NoahmpIO%ALBEDO (I,J) = noahmp%energy%state%AlbedoSfc - NoahmpIO%IRRSPLH (I,J) = NoahmpIO%IRRSPLH(I,J) + & - (noahmp%energy%flux%HeatLatentIrriEvap * noahmp%config%domain%MainTimeStep) - 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) + NoahmpIO%TSK (I,J,N) = noahmp%energy%state%TemperatureRadSfc + NoahmpIO%EMISS (I,J,N) = noahmp%energy%state%EmissivitySfc + NoahmpIO%QSFC (I,J,N) = noahmp%energy%state%SpecHumiditySfcMean + NoahmpIO%TVXY (I,J,N) = noahmp%energy%state%TemperatureCanopy + NoahmpIO%TGXY (I,J,N) = noahmp%energy%state%TemperatureGrd + NoahmpIO%EAHXY (I,J,N) = noahmp%energy%state%PressureVaporCanAir + NoahmpIO%TAHXY (I,J,N) = noahmp%energy%state%TemperatureCanopyAir + NoahmpIO%CMXY (I,J,N) = noahmp%energy%state%ExchCoeffMomSfc + NoahmpIO%CHXY (I,J,N) = noahmp%energy%state%ExchCoeffShSfc + NoahmpIO%ALBOLDXY(I,J,N) = noahmp%energy%state%AlbedoSnowPrev + NoahmpIO%LAI (I,J,N) = noahmp%energy%state%LeafAreaIndex + NoahmpIO%XSAIXY (I,J,N) = noahmp%energy%state%StemAreaIndex + NoahmpIO%TAUSSXY (I,J,N) = noahmp%energy%state%SnowAgeNondim + NoahmpIO%Z0 (I,J,N) = noahmp%energy%state%RoughLenMomSfcToAtm + NoahmpIO%ZNT (I,J,N) = noahmp%energy%state%RoughLenMomSfcToAtm + NoahmpIO%T2MVXY (I,J,N) = noahmp%energy%state%TemperatureAir2mVeg + NoahmpIO%T2MBXY (I,J,N) = noahmp%energy%state%TemperatureAir2mBare + NoahmpIO%TRADXY (I,J,N) = noahmp%energy%state%TemperatureRadSfc + NoahmpIO%FVEGXY (I,J,N) = noahmp%energy%state%VegFrac + NoahmpIO%RSSUNXY (I,J,N) = noahmp%energy%state%ResistanceStomataSunlit + NoahmpIO%RSSHAXY (I,J,N) = noahmp%energy%state%ResistanceStomataShade + NoahmpIO%BGAPXY (I,J,N) = noahmp%energy%state%GapBtwCanopy + NoahmpIO%WGAPXY (I,J,N) = noahmp%energy%state%GapInCanopy + NoahmpIO%TGVXY (I,J,N) = noahmp%energy%state%TemperatureGrdVeg + NoahmpIO%TGBXY (I,J,N) = noahmp%energy%state%TemperatureGrdBare + NoahmpIO%CHVXY (I,J,N) = noahmp%energy%state%ExchCoeffShAbvCan + NoahmpIO%CHBXY (I,J,N) = noahmp%energy%state%ExchCoeffShBare + NoahmpIO%CHLEAFXY(I,J,N) = noahmp%energy%state%ExchCoeffShLeaf + NoahmpIO%CHUCXY (I,J,N) = noahmp%energy%state%ExchCoeffShUndCan + NoahmpIO%CHV2XY (I,J,N) = noahmp%energy%state%ExchCoeffSh2mVeg + NoahmpIO%CHB2XY (I,J,N) = noahmp%energy%state%ExchCoeffSh2mBare + NoahmpIO%Q2MVXY (I,J,N) = noahmp%energy%state%SpecHumidity2mVeg /(1.0-noahmp%energy%state%SpecHumidity2mVeg) ! spec humidity to mixing ratio + NoahmpIO%Q2MBXY (I,J,N) = noahmp%energy%state%SpecHumidity2mBare/(1.0-noahmp%energy%state%SpecHumidity2mBare) + NoahmpIO%ALBEDO (I,J,N) = noahmp%energy%state%AlbedoSfc + NoahmpIO%IRRSPLH (I,J,N) = NoahmpIO%IRRSPLH(I,J,N) + & + noahmp%energy%flux%HeatLatentIrriEvap * & + noahmp%config%domain%MainTimeStep + NoahmpIO%TSLB (I,1:NumSoilLayer,J,N) = noahmp%energy%state%TemperatureSoilSnow(1:NumSoilLayer) + NoahmpIO%TSNOXY (I,-NumSnowLayerMax+1:0,J,N) = noahmp%energy%state%TemperatureSoilSnow(-NumSnowLayerMax+1:0) + + NoahmpIO%ALBSOILDIRXY(I,1:NumSwRadBand,J,N) = noahmp%energy%state%AlbedoSoilDir(1:NumSwRadBand) + NoahmpIO%ALBSOILDIFXY(I,1:NumSwRadBand,J,N) = noahmp%energy%state%AlbedoSoilDif(1:NumSwRadBand) + NoahmpIO%ALBSFCDIRXY (I,1:NumSwRadBand,J,N) = noahmp%energy%state%AlbedoSfcDir (1:NumSwRadBand) + NoahmpIO%ALBSFCDIFXY (I,1:NumSwRadBand,J,N) = noahmp%energy%state%AlbedoSfcDif (1:NumSwRadBand) + NoahmpIO%ALBSNOWDIRXY(I,1:NumSwRadBand,J,N) = noahmp%energy%state%AlbedoSnowDir(1:NumSwRadBand) + NoahmpIO%ALBSNOWDIFXY(I,1:NumSwRadBand,J,N) = 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) @@ -158,18 +160,18 @@ subroutine EnergyVarOutTransfer(noahmp, NoahmpIO) (LeafAreaIndSunlit == 0.0) .or. (LeafAreaIndShade == 0.0) .or. & (noahmp%energy%state%ResistanceStomataSunlit == undefined_real) .or. & (noahmp%energy%state%ResistanceStomataShade == undefined_real) ) then - NoahmpIO%RS (I,J) = 0.0 + NoahmpIO%RS (I,J,N) = 0.0 else - NoahmpIO%RS (I,J) = ((1.0 / (noahmp%energy%state%ResistanceStomataSunlit + ResistanceLeafBoundary) * & - noahmp%energy%state%LeafAreaIndSunlit) + & - ((1.0 / (noahmp%energy%state%ResistanceStomataShade + ResistanceLeafBoundary)) * & - noahmp%energy%state%LeafAreaIndShade)) - NoahmpIO%RS (I,J) = 1.0 / NoahmpIO%RS (I,J) ! Resistance + NoahmpIO%RS (I,J,N) = ((1.0 / (noahmp%energy%state%ResistanceStomataSunlit + ResistanceLeafBoundary) * & + noahmp%energy%state%LeafAreaIndSunlit) + & + ((1.0 / (noahmp%energy%state%ResistanceStomataShade + ResistanceLeafBoundary)) * & + noahmp%energy%state%LeafAreaIndShade)) + NoahmpIO%RS (I,J,N) = 1.0 / NoahmpIO%RS (I,J,N) ! Resistance endif ! calculation of snow and soil energy storage - NoahmpIO%SNOWENERGY(I,J) = 0.0 - NoahmpIO%SOILENERGY(I,J) = 0.0 + NoahmpIO%SNOWENERGY(I,J,N) = 0.0 + NoahmpIO%SOILENERGY(I,J,N) = 0.0 do LoopInd = NumSnowLayerNeg+1, NumSoilLayer if ( LoopInd == NumSnowLayerNeg+1 ) then ThicknessSnowSoilLayer = -noahmp%config%domain%DepthSnowSoilLayer(LoopInd) @@ -178,13 +180,13 @@ subroutine EnergyVarOutTransfer(noahmp, NoahmpIO) noahmp%config%domain%DepthSnowSoilLayer(LoopInd) endif if ( LoopInd >= 1 ) then - NoahmpIO%SOILENERGY(I,J) = NoahmpIO%SOILENERGY(I,J) + ThicknessSnowSoilLayer * & - noahmp%energy%state%HeatCapacSoilSnow(LoopInd) * & - (noahmp%energy%state%TemperatureSoilSnow(LoopInd) - 273.16) * 0.001 + NoahmpIO%SOILENERGY(I,J,N) = NoahmpIO%SOILENERGY(I,J,N) + ThicknessSnowSoilLayer * & + noahmp%energy%state%HeatCapacSoilSnow(LoopInd) * & + (noahmp%energy%state%TemperatureSoilSnow(LoopInd) - 273.16) * 0.001 else - NoahmpIO%SNOWENERGY(I,J) = NoahmpIO%SNOWENERGY(I,J) + ThicknessSnowSoilLayer * & - noahmp%energy%state%HeatCapacSoilSnow(LoopInd) * & - (noahmp%energy%state%TemperatureSoilSnow(LoopInd) - 273.16) * 0.001 + NoahmpIO%SNOWENERGY(I,J,N) = NoahmpIO%SNOWENERGY(I,J,N) + ThicknessSnowSoilLayer * & + noahmp%energy%state%HeatCapacSoilSnow(LoopInd) * & + (noahmp%energy%state%TemperatureSoilSnow(LoopInd) - 273.16) * 0.001 endif enddo diff --git a/drivers/hrldas/ForcingVarInTransferMod.F90 b/drivers/hrldas/ForcingVarInTransferMod.F90 index 98cb90f6..d71241cc 100644 --- a/drivers/hrldas/ForcingVarInTransferMod.F90 +++ b/drivers/hrldas/ForcingVarInTransferMod.F90 @@ -33,7 +33,8 @@ subroutine ForcingVarInTransfer(noahmp, NoahmpIO) ! --------------------------------------------------------------- associate( & I => noahmp%config%domain%GridIndexI ,& - J => noahmp%config%domain%GridIndexJ & + J => noahmp%config%domain%GridIndexJ ,& + N => NoahmpIO%N & ) ! --------------------------------------------------------------- @@ -63,8 +64,8 @@ subroutine ForcingVarInTransfer(noahmp, NoahmpIO) 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) + noahmp%forcing%RadSwDirFrac = NoahmpIO%RadSwDirFrac(I,J,N) + noahmp%forcing%RadSwVisFrac = NoahmpIO%RadSwVisFrac(I,J,N) ! SNICAR aerosol deposition flux forcing if ( noahmp%config%nmlist%OptSnowAlbedo == 3 ) then @@ -79,15 +80,15 @@ subroutine ForcingVarInTransfer(noahmp, NoahmpIO) 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) + noahmp%forcing%DepBChydropho = NoahmpIO%DepBChydrophoXY(I,J,N) + noahmp%forcing%DepBChydrophi = NoahmpIO%DepBChydrophiXY(I,J,N) + noahmp%forcing%DepOChydropho = NoahmpIO%DepOChydrophoXY(I,J,N) + noahmp%forcing%DepOChydrophi = NoahmpIO%DepOChydrophiXY(I,J,N) + noahmp%forcing%DepDust1 = NoahmpIO%DepDust1XY(I,J,N) + noahmp%forcing%DepDust2 = NoahmpIO%DepDust2XY(I,J,N) + noahmp%forcing%DepDust3 = NoahmpIO%DepDust3XY(I,J,N) + noahmp%forcing%DepDust4 = NoahmpIO%DepDust4XY(I,J,N) + noahmp%forcing%DepDust5 = NoahmpIO%DepDust5XY(I,J,N) endif endif diff --git a/drivers/hrldas/ForcingVarOutTransferMod.F90 b/drivers/hrldas/ForcingVarOutTransferMod.F90 index f1d51889..ccda6da0 100644 --- a/drivers/hrldas/ForcingVarOutTransferMod.F90 +++ b/drivers/hrldas/ForcingVarOutTransferMod.F90 @@ -27,17 +27,18 @@ subroutine ForcingVarOutTransfer(noahmp, NoahmpIO) ! ------------------------------------------------------------------------- associate( & I => noahmp%config%domain%GridIndexI ,& - J => noahmp%config%domain%GridIndexJ & + J => noahmp%config%domain%GridIndexJ ,& + N => NoahmpIO%N & ) ! ------------------------------------------------------------------------- - NoahmpIO%FORCTLSM (I,J) = noahmp%forcing%TemperatureAirRefHeight - NoahmpIO%FORCQLSM (I,J) = noahmp%forcing%SpecHumidityRefHeight - NoahmpIO%FORCPLSM (I,J) = noahmp%forcing%PressureAirRefHeight - NoahmpIO%FORCWLSM (I,J) = sqrt(noahmp%forcing%WindEastwardRefHeight**2 + & + NoahmpIO%FORCTLSM (I,J,N) = noahmp%forcing%TemperatureAirRefHeight + NoahmpIO%FORCQLSM (I,J,N) = noahmp%forcing%SpecHumidityRefHeight + NoahmpIO%FORCPLSM (I,J,N) = noahmp%forcing%PressureAirRefHeight + NoahmpIO%FORCWLSM (I,J,N) = sqrt(noahmp%forcing%WindEastwardRefHeight**2 + & noahmp%forcing%WindNorthwardRefHeight**2) - NoahmpIO%RadSwDirFrac(I,J) = noahmp%forcing%RadSwDirFrac - NoahmpIO%RadSwVisFrac(I,J) = noahmp%forcing%RadSwVisFrac + NoahmpIO%RadSwDirFrac(I,J,N) = noahmp%forcing%RadSwDirFrac + NoahmpIO%RadSwVisFrac(I,J,N) = noahmp%forcing%RadSwVisFrac end associate diff --git a/drivers/hrldas/Makefile b/drivers/hrldas/Makefile index eb85a108..9bdce0c1 100644 --- a/drivers/hrldas/Makefile +++ b/drivers/hrldas/Makefile @@ -23,7 +23,8 @@ OBJS = NoahmpGroundwaterInitMod.o \ EnergyVarInTransferMod.o \ WaterVarInTransferMod.o \ BiochemVarInTransferMod.o \ - PedoTransferSR2006Mod.o + PedoTransferSR2006Mod.o \ + NoahmpMosaicSortTileCatMod.o all: $(OBJS) @@ -47,6 +48,7 @@ NoahmpIOVarInitMod.o: ../../utility/Machine.o NoahmpIOVarType.o NoahmpReadTableMod.o: ../../utility/Machine.o NoahmpIOVarType.o NoahmpReadNamelistMod.o: ../../utility/Machine.o NoahmpIOVarType.o PedoTransferSR2006Mod.o: ../../utility/Machine.o NoahmpIOVarType.o +NoahmpMosaicSortTileCatMod.o: ../../utility/Machine.o NoahmpIOVarType.o ConfigVarOutTransferMod.o: ../../utility/Machine.o NoahmpIOVarType.o ../../src/NoahmpVarType.o ForcingVarOutTransferMod.o: ../../utility/Machine.o NoahmpIOVarType.o ../../src/NoahmpVarType.o EnergyVarOutTransferMod.o: ../../utility/Machine.o NoahmpIOVarType.o ../../src/NoahmpVarType.o diff --git a/drivers/hrldas/NoahmpDriverMainMod.F90 b/drivers/hrldas/NoahmpDriverMainMod.F90 index c3f62825..e64088d2 100644 --- a/drivers/hrldas/NoahmpDriverMainMod.F90 +++ b/drivers/hrldas/NoahmpDriverMainMod.F90 @@ -46,6 +46,7 @@ subroutine NoahmpDriverMain(NoahmpIO) integer :: I integer :: J integer :: K + integer :: N integer :: JMONTH, JDAY real(kind=kind_noahmp) :: SOLAR_TIME real(kind=kind_noahmp), dimension( 1:NoahmpIO%nsoil ) :: SAND @@ -119,95 +120,109 @@ subroutine NoahmpDriverMain(NoahmpIO) 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 N = 1,NoahmpIO%NumberOfTiles(I,J) ! NoahMP mosaic/subgrid case + 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,N) = 1.0 + NoahmpIO%SMSTOT(I,J,N) = 1.0 do K = 1, NoahmpIO%NSOIL - NoahmpIO%SMOIS(I,K,J) = 1.0 + NoahmpIO%SMOIS(I,K,J,N) = 1.0 + NoahmpIO%TSLB(I,K,J,N) = 273.16 enddo + else + if ( NoahmpIO%XICE(I,J) == 1.0 ) then ! Sea-ice case + NoahmpIO%SMSTAV(I,J,N) = 1.0 + NoahmpIO%SMSTOT(I,J,N) = 1.0 + do K = 1, NoahmpIO%NSOIL + NoahmpIO%SMOIS(I,K,J,N) = 1.0 + enddo + endif endif - endif + enddo 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 + if ( NoahmpIO%XICE(I,J) >= NoahmpIO%XICE_THRESHOLD ) then ! Sea-ice point + NoahmpIO%ICE = 1 + NoahmpIO%SH2O(I,1:NoahmpIO%NSOIL,J, 1:NoahmpIO%NumberOfTiles(I,J)) = 1.0 + NoahmpIO%LAI (I,J,1:NoahmpIO%NumberOfTiles(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)) + if ( (NoahmpIO%XLAND(I,J)-1.5) >= 0.0 ) cycle ILOOP ! Skip any open water points + + MOSAIC_LOOP : do N = 1, NoahmpIO%NumberOfTiles(I,J) ! NoahMP mosaic/subgrid case + + !------------------------------------------------------------------------------------ + ! initialize 2D subgrid index based on lulc/soiltype/hydrotype to 3D subgrid fraction + !------------------------------------------------------------------------------------ + NoahmpIO%N = N + if(NoahmpIO%IOPT_MOSAIC == 1) then ! if mosaic is based ob lulc + NoahmpIO%IVGTYP(I,J) = NoahmpIO%SubGrdIndexSorted(I,J,N) + endif + + !------------------------------------------------------------------------------------ + ! 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 - endif - !------------------------------------------------------------------------ - ! Call 1D Noah-MP LSM - !------------------------------------------------------------------------ + !------------------------------------------------------------------------ + ! 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) + ! 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) + + enddo MOSAIC_LOOP endif ! land-sea split ends diff --git a/drivers/hrldas/NoahmpGroundwaterInitMod.F90 b/drivers/hrldas/NoahmpGroundwaterInitMod.F90 index e37daeb5..70ebeb14 100644 --- a/drivers/hrldas/NoahmpGroundwaterInitMod.F90 +++ b/drivers/hrldas/NoahmpGroundwaterInitMod.F90 @@ -31,16 +31,13 @@ subroutine NoahmpGroundwaterInitMain(grid, NoahmpIO) ! local variables logical :: urbanpt_flag ! added to identify urban pixels - integer :: I,J,K,ITER,itf,jtf,NITER,NCOUNT,NS + integer :: I,J,K,ITER,itf,jtf,NITER,NCOUNT,NS,N real(kind=kind_noahmp) :: BEXP,SMCMAX,PSISAT,SMCWLT,DWSAT,DKSAT real(kind=kind_noahmp) :: FRLIQ,SMCEQDEEP 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 - ! landmask: -1 for water (ice or no ice) and glacial areas, 1 for land where the LSM does its soil moisture calculations - integer, dimension(NoahmpIO%ims:NoahmpIO%ime, NoahmpIO%jms:NoahmpIO%jme) :: LANDMASK - + real(kind=kind_noahmp), dimension(NoahmpIO%ims:NoahmpIO%ime, NoahmpIO%jms:NoahmpIO%jme) :: QLAT, QRF, ZWTXY ! -------------------------------------------------------------------------------- associate( & ids => NoahmpIO%ids ,& @@ -79,20 +76,15 @@ subroutine NoahmpGroundwaterInitMain(grid, NoahmpIO) ! initialize grid index itf = min0(ite,(ide+1)-1) jtf = min0(jte,(jde+1)-1) - - ! initialize land mask - where ( (NoahmpIO%IVGTYP /= NoahmpIO%ISWATER_TABLE) .and. (NoahmpIO%IVGTYP /= NoahmpIO%ISICE_TABLE) ) - LANDMASK = 1 - elsewhere - LANDMASK = -1 - endwhere - + NoahmpIO%PEXPXY = 1.0 DELTAT = 365.0*24*3600.0 ! 1 year ! read just the raw aggregated water table from hi-res map, so that it is better compatible with topography ! use WTD here, to use the lateral communication routine - NoahmpIO%ZWTXY = NoahmpIO%EQZWT + !NoahmpIO%ZWTXY = NoahmpIO%EQZWT + + ZWTXY = NoahmpIO%EQZWT NCOUNT = 0 do NITER = 1, 500 @@ -100,17 +92,17 @@ subroutine NoahmpGroundwaterInitMain(grid, NoahmpIO) ! Calculate lateral flow if ( (NCOUNT > 0) .or. (NITER == 1) ) then QLAT = 0.0 - call LATERALFLOW(NoahmpIO,NoahmpIO%ISLTYP,NoahmpIO%ZWTXY,QLAT,NoahmpIO%FDEPTHXY,& - NoahmpIO%TERRAIN,LANDMASK,DELTAT,NoahmpIO%AREAXY, & + call LATERALFLOW(NoahmpIO,NoahmpIO%ISLTYP,ZWTXY,QLAT,NoahmpIO%FDEPTHXY,& + NoahmpIO%TERRAIN,NoahmpIO%LANDMASK,DELTAT,NoahmpIO%AREAXY, & ids,ide,jds,jde,kds,kde,ims,ime,jms,jme,kms,kme, & its,ite,jts,jte,kts,kte ) NCOUNT = 0 do J = jts, jtf do I = its, itf - if ( LANDMASK(I,J) > 0 ) then + if ( NoahmpIO%LANDMASK(I,J) > 0 ) then if ( QLAT(i,j) > 1.0e-2 ) then NCOUNT = NCOUNT + 1 - NoahmpIO%ZWTXY(I,J) = min(NoahmpIO%ZWTXY(I,J)+0.25, 0.0) + ZWTXY(I,J) = min(ZWTXY(I,J)+0.25, 0.0) endif endif enddo @@ -127,7 +119,7 @@ subroutine NoahmpGroundwaterInitMain(grid, NoahmpIO) enddo !NITER - NoahmpIO%EQZWT=NoahmpIO%ZWTXY + NoahmpIO%EQZWT=ZWTXY ! after adjusting, where qlat > 1cm/year now wtd is at the surface. ! it may still happen that qlat + rech > 0 and eqwtd-rbed <0. There the wtd can @@ -159,22 +151,22 @@ subroutine NoahmpGroundwaterInitMain(grid, NoahmpIO) ! now recompute lateral flow and flow to rivers to initialize deep soil moisture DELTAT = NoahmpIO%WTDDT * 60.0 !timestep in seconds for this calculation QLAT = 0.0 - call LATERALFLOW(NoahmpIO,NoahmpIO%ISLTYP,NoahmpIO%ZWTXY,QLAT,NoahmpIO%FDEPTHXY,& - NoahmpIO%TERRAIN,LANDMASK,DELTAT,NoahmpIO%AREAXY, & + call LATERALFLOW(NoahmpIO,NoahmpIO%ISLTYP,ZWTXY,QLAT,NoahmpIO%FDEPTHXY,& + NoahmpIO%TERRAIN,NoahmpIO%LANDMASK,DELTAT,NoahmpIO%AREAXY, & ids,ide,jds,jde,kds,kde,ims,ime,jms,jme,kms,kme, & its,ite,jts,jte,kts,kte ) ! compute flux from grounwater to rivers in the cell do J = jts, jtf do I = its, itf - if ( LANDMASK(I,J) > 0 ) then - if ( (NoahmpIO%ZWTXY(I,J) > NoahmpIO%RIVERBEDXY(I,J)) .and. & + if ( NoahmpIO%LANDMASK(I,J) > 0 ) then + if ( (ZWTXY(I,J) > NoahmpIO%RIVERBEDXY(I,J)) .and. & (NoahmpIO%EQZWT(I,J) > NoahmpIO%RIVERBEDXY(I,J)) ) then - RCOND = NoahmpIO%RIVERCONDXY(I,J) * exp(NoahmpIO%PEXPXY(I,J)*(NoahmpIO%ZWTXY(I,J)-NoahmpIO%EQZWT(I,J))) + RCOND = NoahmpIO%RIVERCONDXY(I,J) * exp(NoahmpIO%PEXPXY(I,J)*(ZWTXY(I,J)-NoahmpIO%EQZWT(I,J))) else RCOND = NoahmpIO%RIVERCONDXY(I,J) endif - QRF(I,J) = RCOND * (NoahmpIO%ZWTXY(I,J)-NoahmpIO%RIVERBEDXY(I,J)) * DELTAT / NoahmpIO%AREAXY(I,J) + QRF(I,J) = RCOND * (ZWTXY(I,J)-NoahmpIO%RIVERBEDXY(I,J)) * DELTAT / NoahmpIO%AREAXY(I,J) ! for now, dont allow it to go from river to groundwater QRF(I,J) = max(QRF(I,J), 0.0) else @@ -186,88 +178,90 @@ subroutine NoahmpGroundwaterInitMain(grid, NoahmpIO) ! now compute eq. soil moisture, change soil moisture to be compatible with the water table and compute deep soil moisture do J = jts, jtf do I = its, itf + do N = 1, NoahmpIO%NumberOfTiles(I,J) + NoahmpIO%ZWTXY(I,J,N) = ZWTXY(I,J) + BEXP = NoahmpIO%BEXP_TABLE(NoahmpIO%ISLTYP(I,J)) + SMCMAX = NoahmpIO%SMCMAX_TABLE(NoahmpIO%ISLTYP(I,J)) + SMCWLT = NoahmpIO%SMCWLT_TABLE(NoahmpIO%ISLTYP(I,J)) + ! add urban flag + urbanpt_flag = .false. + if ( (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISURBAN_TABLE) .or. & + (NoahmpIO%IVGTYP(I,J) > NoahmpIO%URBTYPE_beg) ) urbanpt_flag = .true. + if ( urbanpt_flag .eqv. .true. ) then + SMCMAX = 0.45 + SMCWLT = 0.40 + endif + DWSAT = NoahmpIO%DWSAT_TABLE(NoahmpIO%ISLTYP(I,J)) + DKSAT = NoahmpIO%DKSAT_TABLE(NoahmpIO%ISLTYP(I,J)) + PSISAT = -NoahmpIO%PSISAT_TABLE(NoahmpIO%ISLTYP(I,J)) + if ( (BEXP > 0.0) .and. (SMCMAX > 0.0) .and. (-PSISAT > 0.0) ) then + ! initialize equilibrium soil moisture for water table diagnostic + call EquilibriumSoilMoisture(NoahmpIO%NSOIL, ZSOIL, SMCMAX, SMCWLT, DWSAT, DKSAT, BEXP, SMCEQ) - BEXP = NoahmpIO%BEXP_TABLE(NoahmpIO%ISLTYP(I,J)) - SMCMAX = NoahmpIO%SMCMAX_TABLE(NoahmpIO%ISLTYP(I,J)) - SMCWLT = NoahmpIO%SMCWLT_TABLE(NoahmpIO%ISLTYP(I,J)) - ! add urban flag - urbanpt_flag = .false. - if ( (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISURBAN_TABLE) .or. & - (NoahmpIO%IVGTYP(I,J) > NoahmpIO%URBTYPE_beg) ) urbanpt_flag = .true. - if ( urbanpt_flag .eqv. .true. ) then - SMCMAX = 0.45 - SMCWLT = 0.40 - endif - DWSAT = NoahmpIO%DWSAT_TABLE(NoahmpIO%ISLTYP(I,J)) - DKSAT = NoahmpIO%DKSAT_TABLE(NoahmpIO%ISLTYP(I,J)) - PSISAT = -NoahmpIO%PSISAT_TABLE(NoahmpIO%ISLTYP(I,J)) - if ( (BEXP > 0.0) .and. (SMCMAX > 0.0) .and. (-PSISAT > 0.0) ) then - ! initialize equilibrium soil moisture for water table diagnostic - call EquilibriumSoilMoisture(NoahmpIO%NSOIL, ZSOIL, SMCMAX, SMCWLT, DWSAT, DKSAT, BEXP, SMCEQ) - NoahmpIO%SMOISEQ(I,1:NoahmpIO%NSOIL,J) = SMCEQ(1:NoahmpIO%NSOIL) + NoahmpIO%SMOISEQ(I,1:NoahmpIO%NSOIL,J,N) = SMCEQ(1:NoahmpIO%NSOIL) - ! make sure that below the water table the layers are saturated and - ! initialize the deep soil moisture - if ( NoahmpIO%ZWTXY(I,J) < (ZSOIL(NoahmpIO%NSOIL)-NoahmpIO%DZS(NoahmpIO%NSOIL)) ) then - ! initialize deep soil moisture so that the flux compensates qlat+qrf - ! use Newton-Raphson method to find soil moisture - EXPON = 2.0 * BEXP + 3.0 - DDZ = ZSOIL(NoahmpIO%NSOIL) - NoahmpIO%ZWTXY(I,J) - CC = PSISAT / DDZ - FLUX = (QLAT(I,J) - QRF(I,J)) / DELTAT - SMC = 0.5 * SMCMAX - do ITER = 1, 100 - DD = (SMC + SMCMAX) / (2.0*SMCMAX) - AA = -DKSAT * DD ** EXPON - BBB = CC * ((SMCMAX / SMC)**BEXP - 1.0) + 1.0 - FUNC = AA * BBB - FLUX - DFUNC = -DKSAT * (EXPON / (2.0*SMCMAX)) * DD ** (EXPON - 1.0) * BBB & - + AA * CC * (-BEXP) * SMCMAX ** BEXP * SMC ** (-BEXP-1.0) - DX = FUNC / DFUNC - SMC = SMC - DX - if ( abs(DX) < 1.0e-6 ) exit - enddo - NoahmpIO%SMCWTDXY(I,J) = max(SMC, 1.0e-4) - elseif ( NoahmpIO%ZWTXY(I,J) < ZSOIL(NoahmpIO%NSOIL) ) then - SMCEQDEEP = SMCMAX * (PSISAT / (PSISAT - NoahmpIO%DZS(NoahmpIO%NSOIL))) ** (1.0/BEXP) - !SMCEQDEEP = MAX(SMCEQDEEP,SMCWLT) - SMCEQDEEP = max(SMCEQDEEP, 1.0e-4) - NoahmpIO%SMCWTDXY(I,J) = SMCMAX * (NoahmpIO%ZWTXY(I,J)-(ZSOIL(NoahmpIO%NSOIL)-NoahmpIO%DZS(NoahmpIO%NSOIL))) + & - SMCEQDEEP * (ZSOIL(NoahmpIO%NSOIL) - NoahmpIO%ZWTXY(I,J)) - else !water table within the resolved layers - NoahmpIO%SMCWTDXY(I,J) = SMCMAX - do K = NoahmpIO%NSOIL, 2, -1 - if ( NoahmpIO%ZWTXY(I,J) >= ZSOIL(K-1) ) then - FRLIQ = NoahmpIO%SH2O(I,K,J) / NoahmpIO%SMOIS(I,K,J) - NoahmpIO%SMOIS(I,K,J) = SMCMAX - NoahmpIO%SH2O(I,K,J) = SMCMAX * FRLIQ - else - if ( NoahmpIO%SMOIS(I,K,J) < SMCEQ(K) ) then - NoahmpIO%ZWTXY(I,J) = ZSOIL(K) + ! make sure that below the water table the layers are saturated and + ! initialize the deep soil moisture + if ( NoahmpIO%ZWTXY(I,J,N) < (ZSOIL(NoahmpIO%NSOIL)-NoahmpIO%DZS(NoahmpIO%NSOIL)) ) then + ! initialize deep soil moisture so that the flux compensates qlat+qrf + ! use Newton-Raphson method to find soil moisture + EXPON = 2.0 * BEXP + 3.0 + DDZ = ZSOIL(NoahmpIO%NSOIL) - NoahmpIO%ZWTXY(I,J,N) + CC = PSISAT / DDZ + FLUX = (QLAT(I,J) - QRF(I,J)) / DELTAT + SMC = 0.5 * SMCMAX + do ITER = 1, 100 + DD = (SMC + SMCMAX) / (2.0*SMCMAX) + AA = -DKSAT * DD ** EXPON + BBB = CC * ((SMCMAX / SMC)**BEXP - 1.0) + 1.0 + FUNC = AA * BBB - FLUX + DFUNC = -DKSAT * (EXPON / (2.0*SMCMAX)) * DD ** (EXPON - 1.0) * BBB & + + AA * CC * (-BEXP) * SMCMAX ** BEXP * SMC ** (-BEXP-1.0) + DX = FUNC / DFUNC + SMC = SMC - DX + if ( abs(DX) < 1.0e-6 ) exit + enddo + NoahmpIO%SMCWTDXY(I,J,N) = max(SMC, 1.0e-4) + elseif ( NoahmpIO%ZWTXY(I,J,N) < ZSOIL(NoahmpIO%NSOIL) ) then + SMCEQDEEP = SMCMAX * (PSISAT / (PSISAT - NoahmpIO%DZS(NoahmpIO%NSOIL))) ** (1.0/BEXP) + !SMCEQDEEP = MAX(SMCEQDEEP,SMCWLT) + SMCEQDEEP = max(SMCEQDEEP, 1.0e-4) + NoahmpIO%SMCWTDXY(I,J,N) = SMCMAX * (NoahmpIO%ZWTXY(I,J,N)-(ZSOIL(NoahmpIO%NSOIL)-NoahmpIO%DZS(NoahmpIO%NSOIL))) + & + SMCEQDEEP * (ZSOIL(NoahmpIO%NSOIL) - NoahmpIO%ZWTXY(I,J,N)) + else !water table within the resolved layers + NoahmpIO%SMCWTDXY(I,J,N) = SMCMAX + do K = NoahmpIO%NSOIL, 2, -1 + if ( NoahmpIO%ZWTXY(I,J,N) >= ZSOIL(K-1) ) then + FRLIQ = NoahmpIO%SH2O(I,K,J,N) / NoahmpIO%SMOIS(I,K,J,N) + NoahmpIO%SMOIS(I,K,J,N) = SMCMAX + NoahmpIO%SH2O(I,K,J,N) = SMCMAX * FRLIQ else - NoahmpIO%ZWTXY(I,J) = (NoahmpIO%SMOIS(I,K,J)*NoahmpIO%DZS(K) - SMCEQ(K)*ZSOIL(K-1) + & - SMCMAX*ZSOIL(K)) / (SMCMAX - SMCEQ(K)) + if ( NoahmpIO%SMOIS(I,K,J,N) < SMCEQ(K) ) then + NoahmpIO%ZWTXY(I,J,N) = ZSOIL(K) + else + NoahmpIO%ZWTXY(I,J,N) = (NoahmpIO%SMOIS(I,K,J,N)*NoahmpIO%DZS(K) - SMCEQ(K)*ZSOIL(K-1) + & + SMCMAX*ZSOIL(K)) / (SMCMAX - SMCEQ(K)) + endif + exit endif - exit - endif - enddo + enddo + endif + else + NoahmpIO%SMOISEQ (I,1:NoahmpIO%NSOIL,J,N) = SMCMAX + NoahmpIO%SMCWTDXY(I,J,N) = SMCMAX + NoahmpIO%ZWTXY(I,J,N) = 0.0 endif - else - NoahmpIO%SMOISEQ (I,1:NoahmpIO%NSOIL,J) = SMCMAX - NoahmpIO%SMCWTDXY(I,J) = SMCMAX - NoahmpIO%ZWTXY(I,J) = 0.0 - endif - ! zero out some arrays - NoahmpIO%QLATXY(I,J) = 0.0 - NoahmpIO%QSLATXY(I,J) = 0.0 - NoahmpIO%QRFXY(I,J) = 0.0 - NoahmpIO%QRFSXY(I,J) = 0.0 - NoahmpIO%DEEPRECHXY(I,J) = 0.0 - NoahmpIO%RECHXY(I,J) = 0.0 - NoahmpIO%QSPRINGXY(I,J) = 0.0 - NoahmpIO%QSPRINGSXY(I,J) = 0.0 - + ! zero out some arrays + NoahmpIO%QLATXY(I,J) = 0.0 + NoahmpIO%QSLATXY(I,J) = 0.0 + NoahmpIO%QRFXY(I,J) = 0.0 + NoahmpIO%QRFSXY(I,J) = 0.0 + NoahmpIO%DEEPRECHXY(I,J,N) = 0.0 + NoahmpIO%RECHXY(I,J,N) = 0.0 + NoahmpIO%QSPRINGXY(I,J) = 0.0 + NoahmpIO%QSPRINGSXY(I,J) = 0.0 + enddo enddo enddo diff --git a/drivers/hrldas/NoahmpIOVarInitMod.F90 b/drivers/hrldas/NoahmpIOVarInitMod.F90 index 1f19d86e..25f33b58 100644 --- a/drivers/hrldas/NoahmpIOVarInitMod.F90 +++ b/drivers/hrldas/NoahmpIOVarInitMod.F90 @@ -22,20 +22,25 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) implicit none type(NoahmpIO_type), intent(inout) :: NoahmpIO - + + ! local variables + integer :: N ! ------------------------------------------------- - 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 & + 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 ,& + NTilesMax => NoahmpIO%NTilesMax & ) ! ------------------------------------------------- +! call mosaic init here! +! seperate ! Input variables if ( .not. allocated (NoahmpIO%COSZEN) ) allocate ( NoahmpIO%COSZEN (XSTART:XEND, YSTART:YEND) ) ! cosine zenith angle @@ -44,7 +49,7 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) if ( .not. allocated (NoahmpIO%ZSOIL) ) allocate ( NoahmpIO%ZSOIL (1:NSOIL) ) ! depth to soil interfaces [m] if ( .not. allocated (NoahmpIO%IVGTYP) ) allocate ( NoahmpIO%IVGTYP (XSTART:XEND, YSTART:YEND) ) ! vegetation type if ( .not. allocated (NoahmpIO%ISLTYP) ) allocate ( NoahmpIO%ISLTYP (XSTART:XEND, YSTART:YEND) ) ! soil type - if ( .not. allocated (NoahmpIO%VEGFRA) ) allocate ( NoahmpIO%VEGFRA (XSTART:XEND, YSTART:YEND) ) ! vegetation fraction [] + if ( .not. allocated (NoahmpIO%VEGFRA) ) allocate ( NoahmpIO%VEGFRA (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! vegetation fraction [] if ( .not. allocated (NoahmpIO%TMN) ) allocate ( NoahmpIO%TMN (XSTART:XEND, YSTART:YEND) ) ! deep soil temperature [K] if ( .not. allocated (NoahmpIO%XLAND) ) allocate ( NoahmpIO%XLAND (XSTART:XEND, YSTART:YEND) ) ! =2 ocean; =1 land/seaice if ( .not. allocated (NoahmpIO%XICE) ) allocate ( NoahmpIO%XICE (XSTART:XEND, YSTART:YEND) ) ! fraction of grid that is seaice @@ -121,184 +126,186 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) endif ! INOUT (with generic LSM equivalent) (as defined in WRF) - if ( .not. allocated (NoahmpIO%TSK) ) allocate ( NoahmpIO%TSK (XSTART:XEND, YSTART:YEND) ) ! surface radiative temperature [K] - if ( .not. allocated (NoahmpIO%HFX) ) allocate ( NoahmpIO%HFX (XSTART:XEND, YSTART:YEND) ) ! sensible heat flux [W m-2] - if ( .not. allocated (NoahmpIO%QFX) ) allocate ( NoahmpIO%QFX (XSTART:XEND, YSTART:YEND) ) ! latent heat flux [kg s-1 m-2] - if ( .not. allocated (NoahmpIO%LH) ) allocate ( NoahmpIO%LH (XSTART:XEND, YSTART:YEND) ) ! latent heat flux [W m-2] - if ( .not. allocated (NoahmpIO%GRDFLX) ) allocate ( NoahmpIO%GRDFLX (XSTART:XEND, YSTART:YEND) ) ! ground/snow heat flux [W m-2] - if ( .not. allocated (NoahmpIO%SMSTAV) ) allocate ( NoahmpIO%SMSTAV (XSTART:XEND, YSTART:YEND) ) ! soil moisture avail. [not used] - if ( .not. allocated (NoahmpIO%SMSTOT) ) allocate ( NoahmpIO%SMSTOT (XSTART:XEND, YSTART:YEND) ) ! total soil water [mm][not used] - if ( .not. allocated (NoahmpIO%SFCRUNOFF)) allocate ( NoahmpIO%SFCRUNOFF (XSTART:XEND, YSTART:YEND) ) ! accumulated surface runoff [m] - if ( .not. allocated (NoahmpIO%UDRUNOFF) ) allocate ( NoahmpIO%UDRUNOFF (XSTART:XEND, YSTART:YEND) ) ! accumulated sub-surface runoff [m] - if ( .not. allocated (NoahmpIO%ALBEDO) ) allocate ( NoahmpIO%ALBEDO (XSTART:XEND, YSTART:YEND) ) ! total grid albedo [] - if ( .not. allocated (NoahmpIO%SNOWC) ) allocate ( NoahmpIO%SNOWC (XSTART:XEND, YSTART:YEND) ) ! snow cover fraction [] - if ( .not. allocated (NoahmpIO%SNOW) ) allocate ( NoahmpIO%SNOW (XSTART:XEND, YSTART:YEND) ) ! snow water equivalent [mm] - if ( .not. allocated (NoahmpIO%SNOWH) ) allocate ( NoahmpIO%SNOWH (XSTART:XEND, YSTART:YEND) ) ! physical snow depth [m] - if ( .not. allocated (NoahmpIO%CANWAT) ) allocate ( NoahmpIO%CANWAT (XSTART:XEND, YSTART:YEND) ) ! total canopy water + ice [mm] - if ( .not. allocated (NoahmpIO%ACSNOM) ) allocate ( NoahmpIO%ACSNOM (XSTART:XEND, YSTART:YEND) ) ! accumulated snow melt leaving pack - if ( .not. allocated (NoahmpIO%ACSNOW) ) allocate ( NoahmpIO%ACSNOW (XSTART:XEND, YSTART:YEND) ) ! accumulated snow on grid - if ( .not. allocated (NoahmpIO%EMISS) ) allocate ( NoahmpIO%EMISS (XSTART:XEND, YSTART:YEND) ) ! surface bulk emissivity - if ( .not. allocated (NoahmpIO%QSFC) ) allocate ( NoahmpIO%QSFC (XSTART:XEND, YSTART:YEND) ) ! bulk surface specific humidity - if ( .not. allocated (NoahmpIO%SMOISEQ) ) allocate ( NoahmpIO%SMOISEQ (XSTART:XEND,1:NSOIL,YSTART:YEND) ) ! equilibrium volumetric soil moisture [m3/m3] - if ( .not. allocated (NoahmpIO%SMOIS) ) allocate ( NoahmpIO%SMOIS (XSTART:XEND,1:NSOIL,YSTART:YEND) ) ! volumetric soil moisture [m3/m3] - if ( .not. allocated (NoahmpIO%SH2O) ) allocate ( NoahmpIO%SH2O (XSTART:XEND,1:NSOIL,YSTART:YEND) ) ! volumetric liquid soil moisture [m3/m3] - if ( .not. allocated (NoahmpIO%TSLB) ) allocate ( NoahmpIO%TSLB (XSTART:XEND,1:NSOIL,YSTART:YEND) ) ! soil temperature [K] + if ( .not. allocated (NoahmpIO%TSK) ) allocate ( NoahmpIO%TSK (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! surface radiative temperature [K] + if ( .not. allocated (NoahmpIO%HFX) ) allocate ( NoahmpIO%HFX (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! sensible heat flux [W m-2] + if ( .not. allocated (NoahmpIO%QFX) ) allocate ( NoahmpIO%QFX (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! latent heat flux [kg s-1 m-2] + if ( .not. allocated (NoahmpIO%LH) ) allocate ( NoahmpIO%LH (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! latent heat flux [W m-2] + if ( .not. allocated (NoahmpIO%GRDFLX) ) allocate ( NoahmpIO%GRDFLX (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! ground/snow heat flux [W m-2] + if ( .not. allocated (NoahmpIO%SMSTAV) ) allocate ( NoahmpIO%SMSTAV (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! soil moisture avail. [not used] + if ( .not. allocated (NoahmpIO%SMSTOT) ) allocate ( NoahmpIO%SMSTOT (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! total soil water [mm][not used] + if ( .not. allocated (NoahmpIO%SFCRUNOFF)) allocate ( NoahmpIO%SFCRUNOFF (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! accumulated surface runoff [m] + if ( .not. allocated (NoahmpIO%UDRUNOFF) ) allocate ( NoahmpIO%UDRUNOFF (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! accumulated sub-surface runoff [m] + if ( .not. allocated (NoahmpIO%ALBEDO) ) allocate ( NoahmpIO%ALBEDO (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! total grid albedo [] + if ( .not. allocated (NoahmpIO%SNOWC) ) allocate ( NoahmpIO%SNOWC (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! snow cover fraction [] + if ( .not. allocated (NoahmpIO%SNOW) ) allocate ( NoahmpIO%SNOW (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! snow water equivalent [mm] + if ( .not. allocated (NoahmpIO%SNOWH) ) allocate ( NoahmpIO%SNOWH (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! physical snow depth [m] + if ( .not. allocated (NoahmpIO%CANWAT) ) allocate ( NoahmpIO%CANWAT (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! total canopy water + ice [mm] + if ( .not. allocated (NoahmpIO%ACSNOM) ) allocate ( NoahmpIO%ACSNOM (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! accumulated snow melt leaving pack + if ( .not. allocated (NoahmpIO%ACSNOW) ) allocate ( NoahmpIO%ACSNOW (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! accumulated snow on grid + if ( .not. allocated (NoahmpIO%EMISS) ) allocate ( NoahmpIO%EMISS (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! surface bulk emissivity + if ( .not. allocated (NoahmpIO%QSFC) ) allocate ( NoahmpIO%QSFC (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! bulk surface specific humidity + if ( .not. allocated (NoahmpIO%SMOISEQ) ) allocate ( NoahmpIO%SMOISEQ (XSTART:XEND,1:NSOIL,YSTART:YEND, 1:NTilesMax) ) ! equilibrium volumetric soil moisture [m3/m3] + if ( .not. allocated (NoahmpIO%SMOIS) ) allocate ( NoahmpIO%SMOIS (XSTART:XEND,1:NSOIL,YSTART:YEND, 1:NTilesMax) ) ! volumetric soil moisture [m3/m3] + if ( .not. allocated (NoahmpIO%SH2O) ) allocate ( NoahmpIO%SH2O (XSTART:XEND,1:NSOIL,YSTART:YEND, 1:NTilesMax) ) ! volumetric liquid soil moisture [m3/m3] + if ( .not. allocated (NoahmpIO%TSLB) ) allocate ( NoahmpIO%TSLB (XSTART:XEND,1:NSOIL,YSTART:YEND, 1:NTilesMax) ) ! soil temperature [K] ! INOUT (with no Noah LSM equivalent) (as defined in WRF) - if ( .not. allocated (NoahmpIO%ISNOWXY) ) allocate ( NoahmpIO%ISNOWXY (XSTART:XEND, YSTART:YEND) ) ! actual no. of snow layers - if ( .not. allocated (NoahmpIO%TVXY) ) allocate ( NoahmpIO%TVXY (XSTART:XEND, YSTART:YEND) ) ! vegetation leaf temperature - if ( .not. allocated (NoahmpIO%TGXY) ) allocate ( NoahmpIO%TGXY (XSTART:XEND, YSTART:YEND) ) ! bulk ground surface temperature - if ( .not. allocated (NoahmpIO%CANICEXY) ) allocate ( NoahmpIO%CANICEXY (XSTART:XEND, YSTART:YEND) ) ! canopy-intercepted ice (mm) - if ( .not. allocated (NoahmpIO%CANLIQXY) ) allocate ( NoahmpIO%CANLIQXY (XSTART:XEND, YSTART:YEND) ) ! canopy-intercepted liquid water (mm) - if ( .not. allocated (NoahmpIO%EAHXY) ) allocate ( NoahmpIO%EAHXY (XSTART:XEND, YSTART:YEND) ) ! canopy air vapor pressure (pa) - if ( .not. allocated (NoahmpIO%TAHXY) ) allocate ( NoahmpIO%TAHXY (XSTART:XEND, YSTART:YEND) ) ! canopy air temperature (k) - if ( .not. allocated (NoahmpIO%CMXY) ) allocate ( NoahmpIO%CMXY (XSTART:XEND, YSTART:YEND) ) ! bulk momentum drag coefficient - if ( .not. allocated (NoahmpIO%CHXY) ) allocate ( NoahmpIO%CHXY (XSTART:XEND, YSTART:YEND) ) ! bulk sensible heat exchange coefficient - if ( .not. allocated (NoahmpIO%FWETXY) ) allocate ( NoahmpIO%FWETXY (XSTART:XEND, YSTART:YEND) ) ! wetted or snowed fraction of the canopy (-) - if ( .not. allocated (NoahmpIO%SNEQVOXY) ) allocate ( NoahmpIO%SNEQVOXY (XSTART:XEND, YSTART:YEND) ) ! snow mass at last time step(mm h2o) - if ( .not. allocated (NoahmpIO%ALBOLDXY) ) allocate ( NoahmpIO%ALBOLDXY (XSTART:XEND, YSTART:YEND) ) ! snow albedo at last time step (-) - if ( .not. allocated (NoahmpIO%QSNOWXY) ) allocate ( NoahmpIO%QSNOWXY (XSTART:XEND, YSTART:YEND) ) ! snowfall on the ground [mm/s] - if ( .not. allocated (NoahmpIO%QRAINXY) ) allocate ( NoahmpIO%QRAINXY (XSTART:XEND, YSTART:YEND) ) ! rainfall on the ground [mm/s] - if ( .not. allocated (NoahmpIO%WSLAKEXY) ) allocate ( NoahmpIO%WSLAKEXY (XSTART:XEND, YSTART:YEND) ) ! lake water storage [mm] - if ( .not. allocated (NoahmpIO%ZWTXY) ) allocate ( NoahmpIO%ZWTXY (XSTART:XEND, YSTART:YEND) ) ! water table depth [m] - if ( .not. allocated (NoahmpIO%WAXY) ) allocate ( NoahmpIO%WAXY (XSTART:XEND, YSTART:YEND) ) ! water in the "aquifer" [mm] - if ( .not. allocated (NoahmpIO%WTXY) ) allocate ( NoahmpIO%WTXY (XSTART:XEND, YSTART:YEND) ) ! groundwater storage [mm] - if ( .not. allocated (NoahmpIO%SMCWTDXY) ) allocate ( NoahmpIO%SMCWTDXY (XSTART:XEND, YSTART:YEND) ) ! soil moisture below the bottom of the column (m3m-3) - if ( .not. allocated (NoahmpIO%DEEPRECHXY)) allocate ( NoahmpIO%DEEPRECHXY (XSTART:XEND, YSTART:YEND) ) ! recharge to the water table when deep (m) - if ( .not. allocated (NoahmpIO%RECHXY) ) allocate ( NoahmpIO%RECHXY (XSTART:XEND, YSTART:YEND) ) ! recharge to the water table (diagnostic) (m) - if ( .not. allocated (NoahmpIO%LFMASSXY) ) allocate ( NoahmpIO%LFMASSXY (XSTART:XEND, YSTART:YEND) ) ! leaf mass [g/m2] - if ( .not. allocated (NoahmpIO%RTMASSXY) ) allocate ( NoahmpIO%RTMASSXY (XSTART:XEND, YSTART:YEND) ) ! mass of fine roots [g/m2] - if ( .not. allocated (NoahmpIO%STMASSXY) ) allocate ( NoahmpIO%STMASSXY (XSTART:XEND, YSTART:YEND) ) ! stem mass [g/m2] - if ( .not. allocated (NoahmpIO%WOODXY) ) allocate ( NoahmpIO%WOODXY (XSTART:XEND, YSTART:YEND) ) ! mass of wood (incl. woody roots) [g/m2] - if ( .not. allocated (NoahmpIO%GRAINXY) ) allocate ( NoahmpIO%GRAINXY (XSTART:XEND, YSTART:YEND) ) ! mass of grain XING [g/m2] - if ( .not. allocated (NoahmpIO%GDDXY) ) allocate ( NoahmpIO%GDDXY (XSTART:XEND, YSTART:YEND) ) ! growing degree days XING FOUR - if ( .not. allocated (NoahmpIO%STBLCPXY) ) allocate ( NoahmpIO%STBLCPXY (XSTART:XEND, YSTART:YEND) ) ! stable carbon in deep soil [g/m2] - if ( .not. allocated (NoahmpIO%FASTCPXY) ) allocate ( NoahmpIO%FASTCPXY (XSTART:XEND, YSTART:YEND) ) ! short-lived carbon, shallow soil [g/m2] - if ( .not. allocated (NoahmpIO%LAI) ) allocate ( NoahmpIO%LAI (XSTART:XEND, YSTART:YEND) ) ! leaf area index - if ( .not. allocated (NoahmpIO%XSAIXY) ) allocate ( NoahmpIO%XSAIXY (XSTART:XEND, YSTART:YEND) ) ! stem area index - if ( .not. allocated (NoahmpIO%TAUSSXY) ) allocate ( NoahmpIO%TAUSSXY (XSTART:XEND, YSTART:YEND) ) ! snow age factor - if ( .not. allocated (NoahmpIO%TSNOXY) ) allocate ( NoahmpIO%TSNOXY (XSTART:XEND,-NSNOW+1:0, YSTART:YEND) ) ! snow temperature [K] - if ( .not. allocated (NoahmpIO%ZSNSOXY) ) allocate ( NoahmpIO%ZSNSOXY (XSTART:XEND,-NSNOW+1:NSOIL,YSTART:YEND) ) ! snow layer depth [m] - if ( .not. allocated (NoahmpIO%SNICEXY) ) allocate ( NoahmpIO%SNICEXY (XSTART:XEND,-NSNOW+1:0, YSTART:YEND) ) ! snow layer ice [mm] - if ( .not. allocated (NoahmpIO%SNLIQXY) ) allocate ( NoahmpIO%SNLIQXY (XSTART:XEND,-NSNOW+1:0, YSTART:YEND) ) ! snow layer liquid water [mm] + if ( .not. allocated (NoahmpIO%ISNOWXY) ) allocate ( NoahmpIO%ISNOWXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! actual no. of snow layers + if ( .not. allocated (NoahmpIO%TVXY) ) allocate ( NoahmpIO%TVXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! vegetation leaf temperature + if ( .not. allocated (NoahmpIO%TGXY) ) allocate ( NoahmpIO%TGXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! bulk ground surface temperature + if ( .not. allocated (NoahmpIO%CANICEXY) ) allocate ( NoahmpIO%CANICEXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! canopy-intercepted ice (mm) + if ( .not. allocated (NoahmpIO%CANLIQXY) ) allocate ( NoahmpIO%CANLIQXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! canopy-intercepted liquid water (mm) + if ( .not. allocated (NoahmpIO%EAHXY) ) allocate ( NoahmpIO%EAHXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! canopy air vapor pressure (pa) + if ( .not. allocated (NoahmpIO%TAHXY) ) allocate ( NoahmpIO%TAHXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! canopy air temperature (k) + if ( .not. allocated (NoahmpIO%CMXY) ) allocate ( NoahmpIO%CMXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! bulk momentum drag coefficient + if ( .not. allocated (NoahmpIO%CHXY) ) allocate ( NoahmpIO%CHXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! bulk sensible heat exchange coefficient + if ( .not. allocated (NoahmpIO%FWETXY) ) allocate ( NoahmpIO%FWETXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! wetted or snowed fraction of the canopy (-) + if ( .not. allocated (NoahmpIO%SNEQVOXY) ) allocate ( NoahmpIO%SNEQVOXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! snow mass at last time step(mm h2o) + if ( .not. allocated (NoahmpIO%ALBOLDXY) ) allocate ( NoahmpIO%ALBOLDXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! snow albedo at last time step (-) + if ( .not. allocated (NoahmpIO%QSNOWXY) ) allocate ( NoahmpIO%QSNOWXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! snowfall on the ground [mm/s] + if ( .not. allocated (NoahmpIO%QRAINXY) ) allocate ( NoahmpIO%QRAINXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! rainfall on the ground [mm/s] + if ( .not. allocated (NoahmpIO%WSLAKEXY) ) allocate ( NoahmpIO%WSLAKEXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! lake water storage [mm] + if ( .not. allocated (NoahmpIO%ZWTXY) ) allocate ( NoahmpIO%ZWTXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! water table depth [m] + if ( .not. allocated (NoahmpIO%WAXY) ) allocate ( NoahmpIO%WAXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! water in the "aquifer" [mm] + if ( .not. allocated (NoahmpIO%WTXY) ) allocate ( NoahmpIO%WTXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! groundwater storage [mm] + if ( .not. allocated (NoahmpIO%SMCWTDXY) ) allocate ( NoahmpIO%SMCWTDXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! soil moisture below the bottom of the column (m3m-3) + if ( .not. allocated (NoahmpIO%DEEPRECHXY)) allocate ( NoahmpIO%DEEPRECHXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! recharge to the water table when deep (m) + if ( .not. allocated (NoahmpIO%RECHXY) ) allocate ( NoahmpIO%RECHXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! recharge to the water table (diagnostic) (m) + if ( .not. allocated (NoahmpIO%LFMASSXY) ) allocate ( NoahmpIO%LFMASSXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! leaf mass [g/m2] + if ( .not. allocated (NoahmpIO%RTMASSXY) ) allocate ( NoahmpIO%RTMASSXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! mass of fine roots [g/m2] + if ( .not. allocated (NoahmpIO%STMASSXY) ) allocate ( NoahmpIO%STMASSXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! stem mass [g/m2] + if ( .not. allocated (NoahmpIO%WOODXY) ) allocate ( NoahmpIO%WOODXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! mass of wood (incl. woody roots) [g/m2] + if ( .not. allocated (NoahmpIO%GRAINXY) ) allocate ( NoahmpIO%GRAINXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! mass of grain XING [g/m2] + if ( .not. allocated (NoahmpIO%GDDXY) ) allocate ( NoahmpIO%GDDXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! growing degree days XING FOUR + if ( .not. allocated (NoahmpIO%STBLCPXY) ) allocate ( NoahmpIO%STBLCPXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! stable carbon in deep soil [g/m2] + if ( .not. allocated (NoahmpIO%FASTCPXY) ) allocate ( NoahmpIO%FASTCPXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! short-lived carbon, shallow soil [g/m2] + if ( .not. allocated (NoahmpIO%LAI) ) allocate ( NoahmpIO%LAI (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! leaf area index + if ( .not. allocated (NoahmpIO%XSAIXY) ) allocate ( NoahmpIO%XSAIXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! stem area index + if ( .not. allocated (NoahmpIO%TAUSSXY) ) allocate ( NoahmpIO%TAUSSXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! snow age factor + if ( .not. allocated (NoahmpIO%TSNOXY) ) allocate ( NoahmpIO%TSNOXY (XSTART:XEND,-NSNOW+1:0, YSTART:YEND, 1:NTilesMax) ) ! snow temperature [K] + if ( .not. allocated (NoahmpIO%ZSNSOXY) ) allocate ( NoahmpIO%ZSNSOXY (XSTART:XEND,-NSNOW+1:NSOIL,YSTART:YEND, 1:NTilesMax) ) ! snow layer depth [m] + if ( .not. allocated (NoahmpIO%SNICEXY) ) allocate ( NoahmpIO%SNICEXY (XSTART:XEND,-NSNOW+1:0, YSTART:YEND, 1:NTilesMax) ) ! snow layer ice [mm] + if ( .not. allocated (NoahmpIO%SNLIQXY) ) allocate ( NoahmpIO%SNLIQXY (XSTART:XEND,-NSNOW+1:0, YSTART:YEND, 1:NTilesMax) ) ! snow layer liquid water [mm] ! irrigation - if ( .not. allocated (NoahmpIO%IRFRACT) ) allocate ( NoahmpIO%IRFRACT (XSTART:XEND,YSTART:YEND) ) ! irrigation fraction - if ( .not. allocated (NoahmpIO%SIFRACT) ) allocate ( NoahmpIO%SIFRACT (XSTART:XEND,YSTART:YEND) ) ! sprinkler irrigation fraction - if ( .not. allocated (NoahmpIO%MIFRACT) ) allocate ( NoahmpIO%MIFRACT (XSTART:XEND,YSTART:YEND) ) ! micro irrigation fraction - if ( .not. allocated (NoahmpIO%FIFRACT) ) allocate ( NoahmpIO%FIFRACT (XSTART:XEND,YSTART:YEND) ) ! flood irrigation fraction - if ( .not. allocated (NoahmpIO%IRNUMSI) ) allocate ( NoahmpIO%IRNUMSI (XSTART:XEND,YSTART:YEND) ) ! irrigation event number, Sprinkler - if ( .not. allocated (NoahmpIO%IRNUMMI) ) allocate ( NoahmpIO%IRNUMMI (XSTART:XEND,YSTART:YEND) ) ! irrigation event number, Micro - if ( .not. allocated (NoahmpIO%IRNUMFI) ) allocate ( NoahmpIO%IRNUMFI (XSTART:XEND,YSTART:YEND) ) ! irrigation event number, Flood - if ( .not. allocated (NoahmpIO%IRWATSI) ) allocate ( NoahmpIO%IRWATSI (XSTART:XEND,YSTART:YEND) ) ! irrigation water amount [m] to be applied, Sprinkler - if ( .not. allocated (NoahmpIO%IRWATMI) ) allocate ( NoahmpIO%IRWATMI (XSTART:XEND,YSTART:YEND) ) ! irrigation water amount [m] to be applied, Micro - if ( .not. allocated (NoahmpIO%IRWATFI) ) allocate ( NoahmpIO%IRWATFI (XSTART:XEND,YSTART:YEND) ) ! irrigation water amount [m] to be applied, Flood - if ( .not. allocated (NoahmpIO%IRELOSS) ) allocate ( NoahmpIO%IRELOSS (XSTART:XEND,YSTART:YEND) ) ! loss of irrigation water to evaporation,sprinkler [mm] - if ( .not. allocated (NoahmpIO%IRSIVOL) ) allocate ( NoahmpIO%IRSIVOL (XSTART:XEND,YSTART:YEND) ) ! amount of irrigation by sprinkler (mm) - if ( .not. allocated (NoahmpIO%IRMIVOL) ) allocate ( NoahmpIO%IRMIVOL (XSTART:XEND,YSTART:YEND) ) ! amount of irrigation by micro (mm) - if ( .not. allocated (NoahmpIO%IRFIVOL) ) allocate ( NoahmpIO%IRFIVOL (XSTART:XEND,YSTART:YEND) ) ! amount of irrigation by micro (mm) - if ( .not. allocated (NoahmpIO%IRRSPLH) ) allocate ( NoahmpIO%IRRSPLH (XSTART:XEND,YSTART:YEND) ) ! latent heating from sprinkler evaporation (w/m2) - if ( .not. allocated (NoahmpIO%LOCTIM) ) allocate ( NoahmpIO%LOCTIM (XSTART:XEND,YSTART:YEND) ) ! local time + if ( .not. allocated (NoahmpIO%IRFRACT) ) allocate ( NoahmpIO%IRFRACT (XSTART:XEND,YSTART:YEND) ) ! irrigation fraction + if ( .not. allocated (NoahmpIO%SIFRACT) ) allocate ( NoahmpIO%SIFRACT (XSTART:XEND,YSTART:YEND) ) ! sprinkler irrigation fraction + if ( .not. allocated (NoahmpIO%MIFRACT) ) allocate ( NoahmpIO%MIFRACT (XSTART:XEND,YSTART:YEND) ) ! micro irrigation fraction + if ( .not. allocated (NoahmpIO%FIFRACT) ) allocate ( NoahmpIO%FIFRACT (XSTART:XEND,YSTART:YEND) ) ! flood irrigation fraction + if ( .not. allocated (NoahmpIO%IRNUMSI) ) allocate ( NoahmpIO%IRNUMSI (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! irrigation event number, Sprinkler + if ( .not. allocated (NoahmpIO%IRNUMMI) ) allocate ( NoahmpIO%IRNUMMI (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! irrigation event number, Micro + if ( .not. allocated (NoahmpIO%IRNUMFI) ) allocate ( NoahmpIO%IRNUMFI (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! irrigation event number, Flood + if ( .not. allocated (NoahmpIO%IRWATSI) ) allocate ( NoahmpIO%IRWATSI (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! irrigation water amount [m] to be applied, Sprinkler + if ( .not. allocated (NoahmpIO%IRWATMI) ) allocate ( NoahmpIO%IRWATMI (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! irrigation water amount [m] to be applied, Micro + if ( .not. allocated (NoahmpIO%IRWATFI) ) allocate ( NoahmpIO%IRWATFI (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! irrigation water amount [m] to be applied, Flood + if ( .not. allocated (NoahmpIO%IRELOSS) ) allocate ( NoahmpIO%IRELOSS (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! loss of irrigation water to evaporation,sprinkler [mm] + if ( .not. allocated (NoahmpIO%IRSIVOL) ) allocate ( NoahmpIO%IRSIVOL (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! amount of irrigation by sprinkler (mm) + if ( .not. allocated (NoahmpIO%IRMIVOL) ) allocate ( NoahmpIO%IRMIVOL (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! amount of irrigation by micro (mm) + if ( .not. allocated (NoahmpIO%IRFIVOL) ) allocate ( NoahmpIO%IRFIVOL (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! amount of irrigation by micro (mm) + if ( .not. allocated (NoahmpIO%IRRSPLH) ) allocate ( NoahmpIO%IRRSPLH (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! latent heating from sprinkler evaporation (w/m2) + if ( .not. allocated (NoahmpIO%LOCTIM) ) allocate ( NoahmpIO%LOCTIM (XSTART:XEND,YSTART:YEND ) ) ! local time ! OUT (with no Noah LSM equivalent) (as defined in WRF) - if ( .not. allocated (NoahmpIO%T2MVXY) ) allocate ( NoahmpIO%T2MVXY (XSTART:XEND,YSTART:YEND) ) ! 2m temperature of vegetation part - if ( .not. allocated (NoahmpIO%T2MBXY) ) allocate ( NoahmpIO%T2MBXY (XSTART:XEND,YSTART:YEND) ) ! 2m temperature of bare ground part - if ( .not. allocated (NoahmpIO%Q2MVXY) ) allocate ( NoahmpIO%Q2MVXY (XSTART:XEND,YSTART:YEND) ) ! 2m mixing ratio of vegetation part - if ( .not. allocated (NoahmpIO%Q2MBXY) ) allocate ( NoahmpIO%Q2MBXY (XSTART:XEND,YSTART:YEND) ) ! 2m mixing ratio of bare ground part - if ( .not. allocated (NoahmpIO%TRADXY) ) allocate ( NoahmpIO%TRADXY (XSTART:XEND,YSTART:YEND) ) ! surface radiative temperature (k) - if ( .not. allocated (NoahmpIO%NEEXY) ) allocate ( NoahmpIO%NEEXY (XSTART:XEND,YSTART:YEND) ) ! net ecosys exchange (g/m2/s CO2) - if ( .not. allocated (NoahmpIO%GPPXY) ) allocate ( NoahmpIO%GPPXY (XSTART:XEND,YSTART:YEND) ) ! gross primary assimilation [g/m2/s C] - if ( .not. allocated (NoahmpIO%NPPXY) ) allocate ( NoahmpIO%NPPXY (XSTART:XEND,YSTART:YEND) ) ! net primary productivity [g/m2/s C] - if ( .not. allocated (NoahmpIO%FVEGXY) ) allocate ( NoahmpIO%FVEGXY (XSTART:XEND,YSTART:YEND) ) ! Noah-MP vegetation fraction [-] - if ( .not. allocated (NoahmpIO%RUNSFXY) ) allocate ( NoahmpIO%RUNSFXY (XSTART:XEND,YSTART:YEND) ) ! surface runoff [mm per soil timestep] - if ( .not. allocated (NoahmpIO%RUNSBXY) ) allocate ( NoahmpIO%RUNSBXY (XSTART:XEND,YSTART:YEND) ) ! subsurface runoff [mm per soil timestep] - if ( .not. allocated (NoahmpIO%ECANXY) ) allocate ( NoahmpIO%ECANXY (XSTART:XEND,YSTART:YEND) ) ! evaporation of intercepted water (mm/s) - if ( .not. allocated (NoahmpIO%EDIRXY) ) allocate ( NoahmpIO%EDIRXY (XSTART:XEND,YSTART:YEND) ) ! soil surface evaporation rate (mm/s] - if ( .not. allocated (NoahmpIO%ETRANXY) ) allocate ( NoahmpIO%ETRANXY (XSTART:XEND,YSTART:YEND) ) ! transpiration rate (mm/s) - if ( .not. allocated (NoahmpIO%FSAXY) ) allocate ( NoahmpIO%FSAXY (XSTART:XEND,YSTART:YEND) ) ! total absorbed solar radiation (w/m2) - if ( .not. allocated (NoahmpIO%FIRAXY) ) allocate ( NoahmpIO%FIRAXY (XSTART:XEND,YSTART:YEND) ) ! total net longwave rad (w/m2) [+ to atm] - if ( .not. allocated (NoahmpIO%APARXY) ) allocate ( NoahmpIO%APARXY (XSTART:XEND,YSTART:YEND) ) ! photosyn active energy by canopy (w/m2) - if ( .not. allocated (NoahmpIO%PSNXY) ) allocate ( NoahmpIO%PSNXY (XSTART:XEND,YSTART:YEND) ) ! total photosynthesis (umol co2/m2/s) [+] - if ( .not. allocated (NoahmpIO%SAVXY) ) allocate ( NoahmpIO%SAVXY (XSTART:XEND,YSTART:YEND) ) ! solar rad absorbed by veg. (w/m2) - if ( .not. allocated (NoahmpIO%SAGXY) ) allocate ( NoahmpIO%SAGXY (XSTART:XEND,YSTART:YEND) ) ! solar rad absorbed by ground (w/m2) - if ( .not. allocated (NoahmpIO%RSSUNXY) ) allocate ( NoahmpIO%RSSUNXY (XSTART:XEND,YSTART:YEND) ) ! sunlit leaf stomatal resistance (s/m) - if ( .not. allocated (NoahmpIO%RSSHAXY) ) allocate ( NoahmpIO%RSSHAXY (XSTART:XEND,YSTART:YEND) ) ! shaded leaf stomatal resistance (s/m) - if ( .not. allocated (NoahmpIO%BGAPXY) ) allocate ( NoahmpIO%BGAPXY (XSTART:XEND,YSTART:YEND) ) ! between gap fraction - if ( .not. allocated (NoahmpIO%WGAPXY) ) allocate ( NoahmpIO%WGAPXY (XSTART:XEND,YSTART:YEND) ) ! within gap fraction - if ( .not. allocated (NoahmpIO%TGVXY) ) allocate ( NoahmpIO%TGVXY (XSTART:XEND,YSTART:YEND) ) ! under canopy ground temperature[K] - if ( .not. allocated (NoahmpIO%TGBXY) ) allocate ( NoahmpIO%TGBXY (XSTART:XEND,YSTART:YEND) ) ! bare ground temperature [K] - if ( .not. allocated (NoahmpIO%CHVXY) ) allocate ( NoahmpIO%CHVXY (XSTART:XEND,YSTART:YEND) ) ! sensible heat exchange coefficient vegetated - if ( .not. allocated (NoahmpIO%CHBXY) ) allocate ( NoahmpIO%CHBXY (XSTART:XEND,YSTART:YEND) ) ! sensible heat exchange coefficient bare-ground - if ( .not. allocated (NoahmpIO%SHGXY) ) allocate ( NoahmpIO%SHGXY (XSTART:XEND,YSTART:YEND) ) ! veg ground sen. heat [w/m2] [+ to atm] - if ( .not. allocated (NoahmpIO%SHCXY) ) allocate ( NoahmpIO%SHCXY (XSTART:XEND,YSTART:YEND) ) ! canopy sen. heat [w/m2] [+ to atm] - if ( .not. allocated (NoahmpIO%SHBXY) ) allocate ( NoahmpIO%SHBXY (XSTART:XEND,YSTART:YEND) ) ! bare sensible heat [w/m2] [+ to atm] - if ( .not. allocated (NoahmpIO%EVGXY) ) allocate ( NoahmpIO%EVGXY (XSTART:XEND,YSTART:YEND) ) ! veg ground evap. heat [w/m2] [+ to atm] - if ( .not. allocated (NoahmpIO%EVBXY) ) allocate ( NoahmpIO%EVBXY (XSTART:XEND,YSTART:YEND) ) ! bare soil evaporation [w/m2] [+ to atm] - if ( .not. allocated (NoahmpIO%GHVXY) ) allocate ( NoahmpIO%GHVXY (XSTART:XEND,YSTART:YEND) ) ! veg ground heat flux [w/m2] [+ to soil] - if ( .not. allocated (NoahmpIO%GHBXY) ) allocate ( NoahmpIO%GHBXY (XSTART:XEND,YSTART:YEND) ) ! bare ground heat flux [w/m2] [+ to soil] - if ( .not. allocated (NoahmpIO%IRGXY) ) allocate ( NoahmpIO%IRGXY (XSTART:XEND,YSTART:YEND) ) ! veg ground net LW rad. [w/m2] [+ to atm] - if ( .not. allocated (NoahmpIO%IRCXY) ) allocate ( NoahmpIO%IRCXY (XSTART:XEND,YSTART:YEND) ) ! canopy net LW rad. [w/m2] [+ to atm] - if ( .not. allocated (NoahmpIO%IRBXY) ) allocate ( NoahmpIO%IRBXY (XSTART:XEND,YSTART:YEND) ) ! bare net longwave rad. [w/m2] [+ to atm] - if ( .not. allocated (NoahmpIO%TRXY) ) allocate ( NoahmpIO%TRXY (XSTART:XEND,YSTART:YEND) ) ! transpiration [w/m2] [+ to atm] - if ( .not. allocated (NoahmpIO%EVCXY) ) allocate ( NoahmpIO%EVCXY (XSTART:XEND,YSTART:YEND) ) ! canopy evaporation heat [w/m2] [+ to atm] - if ( .not. allocated (NoahmpIO%CHLEAFXY) ) allocate ( NoahmpIO%CHLEAFXY (XSTART:XEND,YSTART:YEND) ) ! leaf exchange coefficient - if ( .not. allocated (NoahmpIO%CHUCXY) ) allocate ( NoahmpIO%CHUCXY (XSTART:XEND,YSTART:YEND) ) ! under canopy exchange coefficient - if ( .not. allocated (NoahmpIO%CHV2XY) ) allocate ( NoahmpIO%CHV2XY (XSTART:XEND,YSTART:YEND) ) ! veg 2m exchange coefficient - if ( .not. allocated (NoahmpIO%CHB2XY) ) allocate ( NoahmpIO%CHB2XY (XSTART:XEND,YSTART:YEND) ) ! bare 2m exchange coefficient - if ( .not. allocated (NoahmpIO%RS) ) allocate ( NoahmpIO%RS (XSTART:XEND,YSTART:YEND) ) ! Total stomatal resistance (s/m) - if ( .not. allocated (NoahmpIO%Z0) ) allocate ( NoahmpIO%Z0 (XSTART:XEND,YSTART:YEND) ) ! roughness length output to WRF - if ( .not. allocated (NoahmpIO%ZNT) ) allocate ( NoahmpIO%ZNT (XSTART:XEND,YSTART:YEND) ) ! roughness length output to WRF - if ( .not. allocated (NoahmpIO%QTDRAIN) ) allocate ( NoahmpIO%QTDRAIN (XSTART:XEND,YSTART:YEND) ) ! tile drainage (mm) - if ( .not. allocated (NoahmpIO%TD_FRACTION)) allocate ( NoahmpIO%TD_FRACTION (XSTART:XEND,YSTART:YEND) ) ! tile drainage fraction - if ( .not. allocated (NoahmpIO%XLONG) ) allocate ( NoahmpIO%XLONG (XSTART:XEND,YSTART:YEND) ) ! longitude - if ( .not. allocated (NoahmpIO%TERRAIN) ) allocate ( NoahmpIO%TERRAIN (XSTART:XEND,YSTART:YEND) ) ! terrain height - if ( .not. allocated (NoahmpIO%GVFMIN) ) allocate ( NoahmpIO%GVFMIN (XSTART:XEND,YSTART:YEND) ) ! annual minimum in vegetation fraction - if ( .not. allocated (NoahmpIO%GVFMAX) ) allocate ( NoahmpIO%GVFMAX (XSTART:XEND,YSTART:YEND) ) ! annual maximum in vegetation fraction + if ( .not. allocated (NoahmpIO%T2MVXY) ) allocate ( NoahmpIO%T2MVXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! 2m temperature of vegetation part + if ( .not. allocated (NoahmpIO%T2MBXY) ) allocate ( NoahmpIO%T2MBXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! 2m temperature of bare ground part + if ( .not. allocated (NoahmpIO%Q2MVXY) ) allocate ( NoahmpIO%Q2MVXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! 2m mixing ratio of vegetation part + if ( .not. allocated (NoahmpIO%Q2MBXY) ) allocate ( NoahmpIO%Q2MBXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! 2m mixing ratio of bare ground part + if ( .not. allocated (NoahmpIO%TRADXY) ) allocate ( NoahmpIO%TRADXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! surface radiative temperature (k) + if ( .not. allocated (NoahmpIO%NEEXY) ) allocate ( NoahmpIO%NEEXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! net ecosys exchange (g/m2/s CO2) + if ( .not. allocated (NoahmpIO%GPPXY) ) allocate ( NoahmpIO%GPPXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! gross primary assimilation [g/m2/s C] + if ( .not. allocated (NoahmpIO%NPPXY) ) allocate ( NoahmpIO%NPPXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! net primary productivity [g/m2/s C] + if ( .not. allocated (NoahmpIO%FVEGXY) ) allocate ( NoahmpIO%FVEGXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! Noah-MP vegetation fraction [-] + if ( .not. allocated (NoahmpIO%RUNSFXY) ) allocate ( NoahmpIO%RUNSFXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! surface runoff [mm per soil timestep] + if ( .not. allocated (NoahmpIO%RUNSBXY) ) allocate ( NoahmpIO%RUNSBXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! subsurface runoff [mm per soil timestep] + if ( .not. allocated (NoahmpIO%ECANXY) ) allocate ( NoahmpIO%ECANXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! evaporation of intercepted water (mm/s) + if ( .not. allocated (NoahmpIO%EDIRXY) ) allocate ( NoahmpIO%EDIRXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! soil surface evaporation rate (mm/s] + if ( .not. allocated (NoahmpIO%ETRANXY) ) allocate ( NoahmpIO%ETRANXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! transpiration rate (mm/s) + if ( .not. allocated (NoahmpIO%FSAXY) ) allocate ( NoahmpIO%FSAXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! total absorbed solar radiation (w/m2) + if ( .not. allocated (NoahmpIO%FIRAXY) ) allocate ( NoahmpIO%FIRAXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! total net longwave rad (w/m2) [+ to atm] + if ( .not. allocated (NoahmpIO%APARXY) ) allocate ( NoahmpIO%APARXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! photosyn active energy by canopy (w/m2) + if ( .not. allocated (NoahmpIO%PSNXY) ) allocate ( NoahmpIO%PSNXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! total photosynthesis (umol co2/m2/s) [+] + if ( .not. allocated (NoahmpIO%SAVXY) ) allocate ( NoahmpIO%SAVXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! solar rad absorbed by veg. (w/m2) + if ( .not. allocated (NoahmpIO%SAGXY) ) allocate ( NoahmpIO%SAGXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! solar rad absorbed by ground (w/m2) + if ( .not. allocated (NoahmpIO%RSSUNXY) ) allocate ( NoahmpIO%RSSUNXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! sunlit leaf stomatal resistance (s/m) + if ( .not. allocated (NoahmpIO%RSSHAXY) ) allocate ( NoahmpIO%RSSHAXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! shaded leaf stomatal resistance (s/m) + if ( .not. allocated (NoahmpIO%BGAPXY) ) allocate ( NoahmpIO%BGAPXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! between gap fraction + if ( .not. allocated (NoahmpIO%WGAPXY) ) allocate ( NoahmpIO%WGAPXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! within gap fraction + if ( .not. allocated (NoahmpIO%TGVXY) ) allocate ( NoahmpIO%TGVXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! under canopy ground temperature[K] + if ( .not. allocated (NoahmpIO%TGBXY) ) allocate ( NoahmpIO%TGBXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! bare ground temperature [K] + if ( .not. allocated (NoahmpIO%CHVXY) ) allocate ( NoahmpIO%CHVXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! sensible heat exchange coefficient vegetated + if ( .not. allocated (NoahmpIO%CHBXY) ) allocate ( NoahmpIO%CHBXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! sensible heat exchange coefficient bare-ground + if ( .not. allocated (NoahmpIO%SHGXY) ) allocate ( NoahmpIO%SHGXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! veg ground sen. heat [w/m2] [+ to atm] + if ( .not. allocated (NoahmpIO%SHCXY) ) allocate ( NoahmpIO%SHCXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! canopy sen. heat [w/m2] [+ to atm] + if ( .not. allocated (NoahmpIO%SHBXY) ) allocate ( NoahmpIO%SHBXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! bare sensible heat [w/m2] [+ to atm] + if ( .not. allocated (NoahmpIO%EVGXY) ) allocate ( NoahmpIO%EVGXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! veg ground evap. heat [w/m2] [+ to atm] + if ( .not. allocated (NoahmpIO%EVBXY) ) allocate ( NoahmpIO%EVBXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! bare soil evaporation [w/m2] [+ to atm] + if ( .not. allocated (NoahmpIO%GHVXY) ) allocate ( NoahmpIO%GHVXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! veg ground heat flux [w/m2] [+ to soil] + if ( .not. allocated (NoahmpIO%GHBXY) ) allocate ( NoahmpIO%GHBXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! bare ground heat flux [w/m2] [+ to soil] + if ( .not. allocated (NoahmpIO%IRGXY) ) allocate ( NoahmpIO%IRGXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! veg ground net LW rad. [w/m2] [+ to atm] + if ( .not. allocated (NoahmpIO%IRCXY) ) allocate ( NoahmpIO%IRCXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! canopy net LW rad. [w/m2] [+ to atm] + if ( .not. allocated (NoahmpIO%IRBXY) ) allocate ( NoahmpIO%IRBXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! bare net longwave rad. [w/m2] [+ to atm] + if ( .not. allocated (NoahmpIO%TRXY) ) allocate ( NoahmpIO%TRXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! transpiration [w/m2] [+ to atm] + if ( .not. allocated (NoahmpIO%EVCXY) ) allocate ( NoahmpIO%EVCXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! canopy evaporation heat [w/m2] [+ to atm] + if ( .not. allocated (NoahmpIO%CHLEAFXY) ) allocate ( NoahmpIO%CHLEAFXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! leaf exchange coefficient + if ( .not. allocated (NoahmpIO%CHUCXY) ) allocate ( NoahmpIO%CHUCXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! under canopy exchange coefficient + if ( .not. allocated (NoahmpIO%CHV2XY) ) allocate ( NoahmpIO%CHV2XY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! veg 2m exchange coefficient + if ( .not. allocated (NoahmpIO%CHB2XY) ) allocate ( NoahmpIO%CHB2XY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! bare 2m exchange coefficient + if ( .not. allocated (NoahmpIO%RS) ) allocate ( NoahmpIO%RS (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! Total stomatal resistance (s/m) + if ( .not. allocated (NoahmpIO%Z0) ) allocate ( NoahmpIO%Z0 (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! roughness length output to WRF + if ( .not. allocated (NoahmpIO%ZNT) ) allocate ( NoahmpIO%ZNT (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! roughness length output to WRF + if ( .not. allocated (NoahmpIO%QTDRAIN) ) allocate ( NoahmpIO%QTDRAIN (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! tile drainage (mm) + if ( .not. allocated (NoahmpIO%TD_FRACTION)) allocate ( NoahmpIO%TD_FRACTION (XSTART:XEND,YSTART:YEND) ) ! tile drainage fraction + + if ( .not. allocated (NoahmpIO%XLONG) ) allocate ( NoahmpIO%XLONG (XSTART:XEND,YSTART:YEND ) ) ! longitude + if ( .not. allocated (NoahmpIO%TERRAIN) ) allocate ( NoahmpIO%TERRAIN (XSTART:XEND,YSTART:YEND ) ) ! terrain height + + if ( .not. allocated (NoahmpIO%GVFMIN) ) allocate ( NoahmpIO%GVFMIN (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! annual minimum in vegetation fraction + if ( .not. allocated (NoahmpIO%GVFMAX) ) allocate ( NoahmpIO%GVFMAX (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! annual maximum in vegetation fraction ! additional output variables - if ( .not. allocated (NoahmpIO%PAHXY) ) allocate ( NoahmpIO%PAHXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%PAHGXY) ) allocate ( NoahmpIO%PAHGXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%PAHBXY) ) allocate ( NoahmpIO%PAHBXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%PAHVXY) ) allocate ( NoahmpIO%PAHVXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QINTSXY) ) allocate ( NoahmpIO%QINTSXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QINTRXY) ) allocate ( NoahmpIO%QINTRXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QDRIPSXY) ) allocate ( NoahmpIO%QDRIPSXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QDRIPRXY) ) allocate ( NoahmpIO%QDRIPRXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QTHROSXY) ) allocate ( NoahmpIO%QTHROSXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QTHRORXY) ) allocate ( NoahmpIO%QTHRORXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QSNSUBXY) ) allocate ( NoahmpIO%QSNSUBXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QSNFROXY) ) allocate ( NoahmpIO%QSNFROXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QSUBCXY) ) allocate ( NoahmpIO%QSUBCXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QFROCXY) ) allocate ( NoahmpIO%QFROCXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QEVACXY) ) allocate ( NoahmpIO%QEVACXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QDEWCXY) ) allocate ( NoahmpIO%QDEWCXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QFRZCXY) ) allocate ( NoahmpIO%QFRZCXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QMELTCXY) ) allocate ( NoahmpIO%QMELTCXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QSNBOTXY) ) allocate ( NoahmpIO%QSNBOTXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%QMELTXY) ) allocate ( NoahmpIO%QMELTXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%PONDINGXY) ) allocate ( NoahmpIO%PONDINGXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%FPICEXY) ) allocate ( NoahmpIO%FPICEXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%RAINLSM) ) allocate ( NoahmpIO%RAINLSM (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%SNOWLSM) ) allocate ( NoahmpIO%SNOWLSM (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%FORCTLSM) ) allocate ( NoahmpIO%FORCTLSM (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%FORCQLSM) ) allocate ( NoahmpIO%FORCQLSM (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%FORCPLSM) ) allocate ( NoahmpIO%FORCPLSM (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%FORCZLSM) ) allocate ( NoahmpIO%FORCZLSM (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%FORCWLSM) ) allocate ( NoahmpIO%FORCWLSM (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%EFLXBXY) ) allocate ( NoahmpIO%EFLXBXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%SOILENERGY) ) allocate ( NoahmpIO%SOILENERGY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%SNOWENERGY) ) allocate ( NoahmpIO%SNOWENERGY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%CANHSXY) ) allocate ( NoahmpIO%CANHSXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%ACC_DWATERXY)) allocate ( NoahmpIO%ACC_DWATERXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%ACC_PRCPXY) ) allocate ( NoahmpIO%ACC_PRCPXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%ACC_ECANXY) ) allocate ( NoahmpIO%ACC_ECANXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%ACC_ETRANXY) ) allocate ( NoahmpIO%ACC_ETRANXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%ACC_EDIRXY) ) allocate ( NoahmpIO%ACC_EDIRXY (XSTART:XEND, YSTART:YEND) ) - if ( .not. allocated (NoahmpIO%ACC_SSOILXY) ) allocate ( NoahmpIO%ACC_SSOILXY (XSTART:XEND, YSTART:YEND) ) - 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) ) + if ( .not. allocated (NoahmpIO%PAHXY) ) allocate ( NoahmpIO%PAHXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%PAHGXY) ) allocate ( NoahmpIO%PAHGXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%PAHBXY) ) allocate ( NoahmpIO%PAHBXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%PAHVXY) ) allocate ( NoahmpIO%PAHVXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QINTSXY) ) allocate ( NoahmpIO%QINTSXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QINTRXY) ) allocate ( NoahmpIO%QINTRXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QDRIPSXY) ) allocate ( NoahmpIO%QDRIPSXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QDRIPRXY) ) allocate ( NoahmpIO%QDRIPRXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QTHROSXY) ) allocate ( NoahmpIO%QTHROSXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QTHRORXY) ) allocate ( NoahmpIO%QTHRORXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QSNSUBXY) ) allocate ( NoahmpIO%QSNSUBXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QSNFROXY) ) allocate ( NoahmpIO%QSNFROXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QSUBCXY) ) allocate ( NoahmpIO%QSUBCXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QFROCXY) ) allocate ( NoahmpIO%QFROCXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QEVACXY) ) allocate ( NoahmpIO%QEVACXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QDEWCXY) ) allocate ( NoahmpIO%QDEWCXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QFRZCXY) ) allocate ( NoahmpIO%QFRZCXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QMELTCXY) ) allocate ( NoahmpIO%QMELTCXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QSNBOTXY) ) allocate ( NoahmpIO%QSNBOTXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%QMELTXY) ) allocate ( NoahmpIO%QMELTXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%PONDINGXY) ) allocate ( NoahmpIO%PONDINGXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%FPICEXY) ) allocate ( NoahmpIO%FPICEXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%RAINLSM) ) allocate ( NoahmpIO%RAINLSM (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%SNOWLSM) ) allocate ( NoahmpIO%SNOWLSM (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%FORCTLSM) ) allocate ( NoahmpIO%FORCTLSM (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%FORCQLSM) ) allocate ( NoahmpIO%FORCQLSM (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%FORCPLSM) ) allocate ( NoahmpIO%FORCPLSM (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%FORCZLSM) ) allocate ( NoahmpIO%FORCZLSM (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%FORCWLSM) ) allocate ( NoahmpIO%FORCWLSM (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%EFLXBXY) ) allocate ( NoahmpIO%EFLXBXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%SOILENERGY) ) allocate ( NoahmpIO%SOILENERGY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%SNOWENERGY) ) allocate ( NoahmpIO%SNOWENERGY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%CANHSXY) ) allocate ( NoahmpIO%CANHSXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%ACC_DWATERXY)) allocate ( NoahmpIO%ACC_DWATERXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%ACC_PRCPXY) ) allocate ( NoahmpIO%ACC_PRCPXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%ACC_ECANXY) ) allocate ( NoahmpIO%ACC_ECANXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%ACC_ETRANXY) ) allocate ( NoahmpIO%ACC_ETRANXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%ACC_EDIRXY) ) allocate ( NoahmpIO%ACC_EDIRXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%ACC_SSOILXY) ) allocate ( NoahmpIO%ACC_SSOILXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%ACC_QINSURXY)) allocate ( NoahmpIO%ACC_QINSURXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%ACC_QSEVAXY) ) allocate ( NoahmpIO%ACC_QSEVAXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%ACC_ETRANIXY)) allocate ( NoahmpIO%ACC_ETRANIXY (XSTART:XEND,1:NSOIL,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%ACC_GLAFLWXY)) allocate ( NoahmpIO%ACC_GLAFLWXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! 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,7 +325,7 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) if ( .not. allocated (NoahmpIO%RECHCLIM) ) allocate ( NoahmpIO%RECHCLIM (XSTART:XEND,YSTART:YEND) ) if ( .not. allocated (NoahmpIO%RIVERMASK) ) allocate ( NoahmpIO%RIVERMASK (XSTART:XEND,YSTART:YEND) ) if ( .not. allocated (NoahmpIO%NONRIVERXY) ) allocate ( NoahmpIO%NONRIVERXY (XSTART:XEND,YSTART:YEND) ) - + if ( .not. allocated (NoahmpIO%LANDMASK) ) allocate ( NoahmpIO%LANDMASK (XSTART:XEND,YSTART:YEND) ) ! Needed for SNICAR SNOW ALBEDO (IOPT_ALB = 3) if ( NoahmpIO%IOPT_ALB == 3 ) then @@ -366,48 +373,48 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) 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) ) + if ( .not. allocated (NoahmpIO%SNRDSXY) ) allocate ( NoahmpIO%SNRDSXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) ! snow layer effective grain radius [microns, m-6] + if ( .not. allocated (NoahmpIO%SNFRXY) ) allocate ( NoahmpIO%SNFRXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) ! snow layer rate of snow freezing [mm/s] + if ( .not. allocated (NoahmpIO%BCPHIXY) ) allocate ( NoahmpIO%BCPHIXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%BCPHOXY) ) allocate ( NoahmpIO%BCPHOXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%OCPHIXY) ) allocate ( NoahmpIO%OCPHIXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%OCPHOXY) ) allocate ( NoahmpIO%OCPHOXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DUST1XY) ) allocate ( NoahmpIO%DUST1XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DUST2XY) ) allocate ( NoahmpIO%DUST2XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DUST3XY) ) allocate ( NoahmpIO%DUST3XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DUST4XY) ) allocate ( NoahmpIO%DUST4XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DUST5XY) ) allocate ( NoahmpIO%DUST5XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%MassConcBCPHIXY) ) allocate ( NoahmpIO%MassConcBCPHIXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%MassConcBCPHOXY) ) allocate ( NoahmpIO%MassConcBCPHOXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%MassConcOCPHIXY) ) allocate ( NoahmpIO%MassConcOCPHIXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%MassConcOCPHOXY) ) allocate ( NoahmpIO%MassConcOCPHOXY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%MassConcDUST1XY) ) allocate ( NoahmpIO%MassConcDUST1XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%MassConcDUST2XY) ) allocate ( NoahmpIO%MassConcDUST2XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%MassConcDUST3XY) ) allocate ( NoahmpIO%MassConcDUST3XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%MassConcDUST4XY) ) allocate ( NoahmpIO%MassConcDUST4XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%MassConcDUST5XY) ) allocate ( NoahmpIO%MassConcDUST5XY (XSTART:XEND,-NSNOW+1:0,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DepBChydrophoXY) ) allocate ( NoahmpIO%DepBChydrophoXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DepBChydrophiXY) ) allocate ( NoahmpIO%DepBChydrophiXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DepOChydrophoXY) ) allocate ( NoahmpIO%DepOChydrophoXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DepOChydrophiXY) ) allocate ( NoahmpIO%DepOChydrophiXY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DepDust1XY) ) allocate ( NoahmpIO%DepDust1XY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DepDust2XY) ) allocate ( NoahmpIO%DepDust2XY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DepDust3XY) ) allocate ( NoahmpIO%DepDust3XY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DepDust4XY) ) allocate ( NoahmpIO%DepDust4XY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) + if ( .not. allocated (NoahmpIO%DepDust5XY) ) allocate ( NoahmpIO%DepDust5XY (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) 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 + if ( .not. allocated (NoahmpIO%ALBSNOWDIRXY) ) allocate ( NoahmpIO%ALBSNOWDIRXY (XSTART:XEND,1:NUMRAD,YSTART:YEND, 1:NTilesMax) ) ! snow albedo (direct) + if ( .not. allocated (NoahmpIO%ALBSNOWDIFXY) ) allocate ( NoahmpIO%ALBSNOWDIFXY (XSTART:XEND,1:NUMRAD,YSTART:YEND, 1:NTilesMax) ) ! snow albedo (diffuse) + if ( .not. allocated (NoahmpIO%ALBSFCDIRXY) ) allocate ( NoahmpIO%ALBSFCDIRXY (XSTART:XEND,1:NUMRAD,YSTART:YEND, 1:NTilesMax) ) ! surface albedo (direct) + if ( .not. allocated (NoahmpIO%ALBSFCDIFXY) ) allocate ( NoahmpIO%ALBSFCDIFXY (XSTART:XEND,1:NUMRAD,YSTART:YEND, 1:NTilesMax) ) ! surface albedo (diffuse) + if ( .not. allocated (NoahmpIO%ALBSOILDIRXY) ) allocate ( NoahmpIO%ALBSOILDIRXY (XSTART:XEND,1:NUMRAD,YSTART:YEND, 1:NTilesMax) ) ! soil albedo (direct) + if ( .not. allocated (NoahmpIO%ALBSOILDIFXY) ) allocate ( NoahmpIO%ALBSOILDIFXY (XSTART:XEND,1:NUMRAD,YSTART:YEND, 1:NTilesMax) ) ! soil albedo (diffuse) + if ( .not. allocated (NoahmpIO%RadSwVisFrac) ) allocate ( NoahmpIO%RadSwVisFrac (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! downward solar radation visible fraction + if ( .not. allocated (NoahmpIO%RadSwDirFrac) ) allocate ( NoahmpIO%RadSwDirFrac (XSTART:XEND,YSTART:YEND, 1:NTilesMax) ) ! 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%PGSXY) ) allocate ( NoahmpIO%PGSXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) if ( .not. allocated (NoahmpIO%CROPCAT) ) allocate ( NoahmpIO%CROPCAT (XSTART:XEND, YSTART:YEND) ) if ( .not. allocated (NoahmpIO%PLANTING) ) allocate ( NoahmpIO%PLANTING (XSTART:XEND, YSTART:YEND) ) if ( .not. allocated (NoahmpIO%HARVEST) ) allocate ( NoahmpIO%HARVEST (XSTART:XEND, YSTART:YEND) ) @@ -416,12 +423,12 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) ! 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] + if ( .not. allocated (NoahmpIO%FSATXY) ) allocate ( NoahmpIO%FSATXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! saturated fraction of the grid (-) + if ( .not. allocated (NoahmpIO%WSURFXY)) allocate ( NoahmpIO%WSURFXY (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! 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] + if ( .not. allocated (NoahmpIO%FSATMX) ) allocate ( NoahmpIO%FSATMX (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! maximum saturated fraction + if ( .not. allocated (NoahmpIO%WCAP) ) allocate ( NoahmpIO%WCAP (XSTART:XEND, YSTART:YEND, 1:NTilesMax) ) ! maximum wetland capacity [m] endif ! Single- and Multi-layer Urban Models @@ -568,6 +575,7 @@ subroutine NoahmpIOVarInitDefault(NoahmpIO) NoahmpIO%IVGTYP = undefined_int NoahmpIO%ISLTYP = undefined_int NoahmpIO%ISNOWXY = undefined_int + NoahmpIO%LANDMASK = undefined_int NoahmpIO%COSZEN = undefined_real NoahmpIO%XLAT = undefined_real NoahmpIO%DZ8W = undefined_real diff --git a/drivers/hrldas/NoahmpIOVarType.F90 b/drivers/hrldas/NoahmpIOVarType.F90 index 42934326..0928a807 100644 --- a/drivers/hrldas/NoahmpIOVarType.F90 +++ b/drivers/hrldas/NoahmpIOVarType.F90 @@ -17,7 +17,7 @@ module NoahmpIOVarType type, public :: NoahmpIO_type !------------------------------------------------------------------------ -! general 2-D/3-D Noah-MP variables +! general 2-D/3-D Noah-MP variables ! not added mosaic dimension !------------------------------------------------------------------------ ! IN only (as defined in WRF) @@ -66,6 +66,9 @@ module NoahmpIOVarType integer :: IOPT_COMPACT ! snowpack compaction (1->Anderson1976; 2->Abolafia-Rosenzweig2024) integer :: IOPT_SCF ! snow cover fraction (1->NiuYang07; 2->Abolafia-Rosenzweig2025) integer :: IOPT_WETLAND ! wetland model option (0->off; 1->Zhang2022 fixed parameter; 2->Zhang2022 read in 2D parameter) + integer :: IOPT_MOSAIC ! Noah-MP Subgrid mosaic scheme (0->off; 1->ON based on land cover) + integer :: IOPT_MOSAIC_NTILES ! Maximum Number subgrid tiles required? (Default=1, in this case Mosaic Scheme is off) + integer :: IOPT_MOSAIC_OUTPUT ! output mosaic variables (0=write grid-avg value; 1=write subgrid values) 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] @@ -81,7 +84,7 @@ module NoahmpIOVarType real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: DZ8W ! thickness of atmo layers [m] real(kind=kind_noahmp), allocatable, dimension(:) :: DZS ! thickness of soil layers [m] real(kind=kind_noahmp), allocatable, dimension(:) :: ZSOIL ! depth to soil interfaces [m] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: VEGFRA ! vegetation fraction [] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: VEGFRA ! vegetation fraction [] real(kind=kind_noahmp), allocatable, dimension(:,:) :: TMN ! deep soil temperature [K] real(kind=kind_noahmp), allocatable, dimension(:,:) :: XLAND ! =2 ocean; =1 land/seaice real(kind=kind_noahmp), allocatable, dimension(:,:) :: XICE ! fraction of grid that is seaice @@ -119,7 +122,7 @@ module NoahmpIOVarType real(kind=kind_noahmp), allocatable, dimension(:,:) :: ZWATBLE2D ! water table depth #endif - ! Spatially varying fields (for now it is de-activated) + ! Spatially varying fields (for now it is de-activated) real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: soilcomp ! Soil sand and clay content [fraction] real(kind=kind_noahmp), allocatable, dimension(:,:) :: soilcl1 ! Soil texture class with depth real(kind=kind_noahmp), allocatable, dimension(:,:) :: soilcl2 ! Soil texture class with depth @@ -161,179 +164,179 @@ module NoahmpIOVarType real(kind=kind_noahmp), allocatable, dimension(:,:) :: TD_SPAC ! tile spacing ! INOUT (with generic LSM equivalent) (as defined in WRF) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: TSK ! surface radiative temperature [K] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: HFX ! sensible heat flux [W m-2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QFX ! latent heat flux [kg s-1 m-2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: LH ! latent heat flux [W m-2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: GRDFLX ! ground/snow heat flux [W m-2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SMSTAV ! soil moisture avail. [not used] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SMSTOT ! total soil water [mm][not used] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SFCRUNOFF ! accumulated surface runoff [m] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: UDRUNOFF ! accumulated sub-surface runoff [m] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ALBEDO ! total grid albedo [] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SNOWC ! snow cover fraction [] - real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SMOISEQ ! volumetric soil moisture [m3/m3] - real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SMOIS ! volumetric soil moisture [m3/m3] - real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SH2O ! volumetric liquid soil moisture [m3/m3] - real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TSLB ! soil temperature [K] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SNOW ! snow water equivalent [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SNOWH ! physical snow depth [m] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CANWAT ! total canopy water + ice [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACSNOM ! accumulated snow melt leaving pack - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACSNOW ! accumulated snow on grid - real(kind=kind_noahmp), allocatable, dimension(:,:) :: EMISS ! surface bulk emissivity - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QSFC ! bulk surface specific humidity + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TSK ! surface radiative temperature [K] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: HFX ! sensible heat flux [W m-2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QFX ! latent heat flux [kg s-1 m-2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: LH ! latent heat flux [W m-2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: GRDFLX ! ground/snow heat flux [W m-2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SMSTAV ! soil moisture avail. [not used] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SMSTOT ! total soil water [mm][not used] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SFCRUNOFF ! accumulated surface runoff [m] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: UDRUNOFF ! accumulated sub-surface runoff [m] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ALBEDO ! total grid albedo [] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SNOWC ! snow cover fraction [] + real(kind=kind_noahmp), allocatable, dimension(:,:,:,:) :: SMOISEQ ! volumetric soil moisture [m3/m3] + real(kind=kind_noahmp), allocatable, dimension(:,:,:,:) :: SMOIS ! volumetric soil moisture [m3/m3] + real(kind=kind_noahmp), allocatable, dimension(:,:,:,:) :: SH2O ! volumetric liquid soil moisture [m3/m3] + real(kind=kind_noahmp), allocatable, dimension(:,:,:,:) :: TSLB ! soil temperature [K] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SNOW ! snow water equivalent [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SNOWH ! physical snow depth [m] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CANWAT ! total canopy water + ice [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ACSNOM ! accumulated snow melt leaving pack + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ACSNOW ! accumulated snow on grid + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: EMISS ! surface bulk emissivity + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QSFC ! bulk surface specific humidity ! INOUT (with no Noah LSM equivalent) (as defined in WRF) - integer, allocatable, dimension(:,:) :: ISNOWXY ! actual no. of snow layers - real(kind=kind_noahmp), allocatable, dimension(:,:) :: TVXY ! vegetation leaf temperature - real(kind=kind_noahmp), allocatable, dimension(:,:) :: TGXY ! bulk ground surface temperature - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CANICEXY ! canopy-intercepted ice (mm) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CANLIQXY ! canopy-intercepted liquid water (mm) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: EAHXY ! canopy air vapor pressure (pa) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: TAHXY ! canopy air temperature (k) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CMXY ! bulk momentum drag coefficient - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CHXY ! bulk sensible heat exchange coefficient - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FWETXY ! wetted or snowed fraction of the canopy (-) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SNEQVOXY ! snow mass at last time step(mm h2o) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ALBOLDXY ! snow albedo at last time step (-) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QSNOWXY ! snowfall on the ground [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QRAINXY ! rainfall on the ground [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: WSLAKEXY ! lake water storage [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ZWTXY ! water table depth [m] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: WAXY ! water in the "aquifer" [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: WTXY ! groundwater storage [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SMCWTDXY ! groundwater storage [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: DEEPRECHXY ! groundwater storage [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: RECHXY ! groundwater storage [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TSNOXY ! snow temperature [K] - real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ZSNSOXY ! snow layer depth [m] - real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SNICEXY ! snow layer ice [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SNLIQXY ! snow layer liquid water [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: LFMASSXY ! leaf mass [g/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: RTMASSXY ! mass of fine roots [g/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: STMASSXY ! stem mass [g/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: WOODXY ! mass of wood (incl. woody roots) [g/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: GRAINXY ! XING mass of grain!THREE - real(kind=kind_noahmp), allocatable, dimension(:,:) :: GDDXY ! XINGgrowingdegressday - real(kind=kind_noahmp), allocatable, dimension(:,:) :: STBLCPXY ! stable carbon in deep soil [g/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FASTCPXY ! short-lived carbon, shallow soil [g/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: LAI ! leaf area index - real(kind=kind_noahmp), allocatable, dimension(:,:) :: XSAIXY ! stem area index - real(kind=kind_noahmp), allocatable, dimension(:,:) :: TAUSSXY ! snow age factor + integer, allocatable, dimension(:,:,:) :: ISNOWXY ! actual no. of snow layers + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TVXY ! vegetation leaf temperature + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TGXY ! bulk ground surface temperature + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CANICEXY ! canopy-intercepted ice (mm) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CANLIQXY ! canopy-intercepted liquid water (mm) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: EAHXY ! canopy air vapor pressure (pa) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TAHXY ! canopy air temperature (k) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CMXY ! bulk momentum drag coefficient + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CHXY ! bulk sensible heat exchange coefficient + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FWETXY ! wetted or snowed fraction of the canopy (-) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SNEQVOXY ! snow mass at last time step(mm h2o) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ALBOLDXY ! snow albedo at last time step (-) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QSNOWXY ! snowfall on the ground [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QRAINXY ! rainfall on the ground [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: WSLAKEXY ! lake water storage [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ZWTXY ! water table depth [m] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: WAXY ! water in the "aquifer" [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: WTXY ! groundwater storage [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SMCWTDXY ! groundwater storage [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: DEEPRECHXY ! groundwater storage [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: RECHXY ! groundwater storage [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:,:) :: TSNOXY ! snow temperature [K] + real(kind=kind_noahmp), allocatable, dimension(:,:,:,:) :: ZSNSOXY ! snow layer depth [m] + real(kind=kind_noahmp), allocatable, dimension(:,:,:,:) :: SNICEXY ! snow layer ice [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:,:) :: SNLIQXY ! snow layer liquid water [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: LFMASSXY ! leaf mass [g/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: RTMASSXY ! mass of fine roots [g/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: STMASSXY ! stem mass [g/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: WOODXY ! mass of wood (incl. woody roots) [g/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: GRAINXY ! XING mass of grain!THREE + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: GDDXY ! XINGgrowingdegressday + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: STBLCPXY ! stable carbon in deep soil [g/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FASTCPXY ! short-lived carbon, shallow soil [g/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: LAI ! leaf area index + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: XSAIXY ! stem area index + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TAUSSXY ! snow age factor ! irrigation - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRFRACT ! irrigation fraction - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SIFRACT ! sprinkler irrigation fraction - real(kind=kind_noahmp), allocatable, dimension(:,:) :: MIFRACT ! micro irrigation fraction - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FIFRACT ! flood irrigation fraction - integer, allocatable, dimension(:,:) :: IRNUMSI ! irrigation event number, Sprinkler - integer, allocatable, dimension(:,:) :: IRNUMMI ! irrigation event number, Micro - integer, allocatable, dimension(:,:) :: IRNUMFI ! irrigation event number, Flood - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRWATSI ! irrigation water amount [m] to be applied, Sprinkler - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRWATMI ! irrigation water amount [m] to be applied, Micro - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRWATFI ! irrigation water amount [m] to be applied, Flood - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRELOSS ! loss of irrigation water to evaporation,sprinkler [m/timestep] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRSIVOL ! amount of irrigation by sprinkler (mm) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRMIVOL ! amount of irrigation by micro (mm) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRFIVOL ! amount of irrigation by micro (mm) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRRSPLH ! latent heating from sprinkler evaporation (w/m2) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: LOCTIM ! local time + real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRFRACT ! irrigation fraction + real(kind=kind_noahmp), allocatable, dimension(:,:) :: SIFRACT ! sprinkler irrigation fraction + real(kind=kind_noahmp), allocatable, dimension(:,:) :: MIFRACT ! micro irrigation fraction + real(kind=kind_noahmp), allocatable, dimension(:,:) :: FIFRACT ! flood irrigation fraction + integer, allocatable, dimension(:,:,:) :: IRNUMSI ! irrigation event number, Sprinkler + integer, allocatable, dimension(:,:,:) :: IRNUMMI ! irrigation event number, Micro + integer, allocatable, dimension(:,:,:) :: IRNUMFI ! irrigation event number, Flood + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRWATSI ! irrigation water amount [m] to be applied, Sprinkler + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRWATMI ! irrigation water amount [m] to be applied, Micro + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRWATFI ! irrigation water amount [m] to be applied, Flood + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRELOSS ! loss of irrigation water to evaporation,sprinkler [m/timestep] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRSIVOL ! amount of irrigation by sprinkler (mm) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRMIVOL ! amount of irrigation by micro (mm) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRFIVOL ! amount of irrigation by micro (mm) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRRSPLH ! latent heating from sprinkler evaporation (w/m2) + real(kind=kind_noahmp), allocatable, dimension(:,:) :: LOCTIM ! local time ! OUT (with no Noah LSM equivalent) (as defined in WRF) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: T2MVXY ! 2m temperature of vegetation part - real(kind=kind_noahmp), allocatable, dimension(:,:) :: T2MBXY ! 2m temperature of bare ground part - real(kind=kind_noahmp), allocatable, dimension(:,:) :: Q2MVXY ! 2m mixing ratio of vegetation part - real(kind=kind_noahmp), allocatable, dimension(:,:) :: Q2MBXY ! 2m mixing ratio of bare ground part - real(kind=kind_noahmp), allocatable, dimension(:,:) :: TRADXY ! surface radiative temperature (k) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: NEEXY ! net ecosys exchange (g/m2/s CO2) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: GPPXY ! gross primary assimilation [g/m2/s C] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: NPPXY ! net primary productivity [g/m2/s C] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FVEGXY ! Noah-MP vegetation fraction [-] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: RUNSFXY ! surface runoff [mm per soil timestep] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: RUNSBXY ! subsurface runoff [mm per soil timestep] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ECANXY ! evaporation of intercepted water (mm/s) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: EDIRXY ! soil surface evaporation rate (mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ETRANXY ! transpiration rate (mm/s) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FSAXY ! total absorbed solar radiation (w/m2) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FIRAXY ! total net longwave rad (w/m2) [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: APARXY ! photosyn active energy by canopy (w/m2) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: PSNXY ! total photosynthesis (umol co2/m2/s) [+] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SAVXY ! solar rad absorbed by veg. (w/m2) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SAGXY ! solar rad absorbed by ground (w/m2) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: RSSUNXY ! sunlit leaf stomatal resistance (s/m) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: RSSHAXY ! shaded leaf stomatal resistance (s/m) - real(kind=kind_noahmp), allocatable, dimension(:,:) :: BGAPXY ! between gap fraction - real(kind=kind_noahmp), allocatable, dimension(:,:) :: WGAPXY ! within gap fraction - real(kind=kind_noahmp), allocatable, dimension(:,:) :: TGVXY ! under canopy ground temperature[K] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: TGBXY ! bare ground temperature [K] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CHVXY ! sensible heat exchange coefficient vegetated - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CHBXY ! sensible heat exchange coefficient bare-ground - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SHGXY ! veg ground sen. heat [w/m2] [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SHCXY ! canopy sen. heat [w/m2] [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SHBXY ! bare sensible heat [w/m2] [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: EVGXY ! veg ground evap. heat [w/m2] [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: EVBXY ! bare soil evaporation [w/m2] [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: GHVXY ! veg ground heat flux [w/m2] [+ to soil] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: GHBXY ! bare ground heat flux [w/m2] [+ to soil] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRGXY ! veg ground net LW rad. [w/m2] [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRCXY ! canopy net LW rad. [w/m2] [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: IRBXY ! bare net longwave rad. [w/m2] [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: TRXY ! transpiration [w/m2] [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: EVCXY ! canopy evaporation heat [w/m2] [+ to atm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CHLEAFXY ! leaf exchange coefficient - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CHUCXY ! under canopy exchange coefficient - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CHV2XY ! veg 2m exchange coefficient - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CHB2XY ! bare 2m exchange coefficient - real(kind=kind_noahmp), allocatable, dimension(:,:) :: RS ! Total stomatal resistance [s/m] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: Z0 ! roughness length output to WRF - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ZNT ! roughness length output to WRF - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QTDRAIN ! tile drain discharge [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: T2MVXY ! 2m temperature of vegetation part + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: T2MBXY ! 2m temperature of bare ground part + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: Q2MVXY ! 2m mixing ratio of vegetation part + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: Q2MBXY ! 2m mixing ratio of bare ground part + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TRADXY ! surface radiative temperature (k) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: NEEXY ! net ecosys exchange (g/m2/s CO2) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: GPPXY ! gross primary assimilation [g/m2/s C] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: NPPXY ! net primary productivity [g/m2/s C] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FVEGXY ! Noah-MP vegetation fraction [-] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: RUNSFXY ! surface runoff [mm per soil timestep] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: RUNSBXY ! subsurface runoff [mm per soil timestep] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ECANXY ! evaporation of intercepted water (mm/s) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: EDIRXY ! soil surface evaporation rate (mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ETRANXY ! transpiration rate (mm/s) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FSAXY ! total absorbed solar radiation (w/m2) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FIRAXY ! total net longwave rad (w/m2) [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: APARXY ! photosyn active energy by canopy (w/m2) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: PSNXY ! total photosynthesis (umol co2/m2/s) [+] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SAVXY ! solar rad absorbed by veg. (w/m2) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SAGXY ! solar rad absorbed by ground (w/m2) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: RSSUNXY ! sunlit leaf stomatal resistance (s/m) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: RSSHAXY ! shaded leaf stomatal resistance (s/m) + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: BGAPXY ! between gap fraction + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: WGAPXY ! within gap fraction + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TGVXY ! under canopy ground temperature[K] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TGBXY ! bare ground temperature [K] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CHVXY ! sensible heat exchange coefficient vegetated + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CHBXY ! sensible heat exchange coefficient bare-ground + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SHGXY ! veg ground sen. heat [w/m2] [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SHCXY ! canopy sen. heat [w/m2] [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SHBXY ! bare sensible heat [w/m2] [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: EVGXY ! veg ground evap. heat [w/m2] [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: EVBXY ! bare soil evaporation [w/m2] [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: GHVXY ! veg ground heat flux [w/m2] [+ to soil] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: GHBXY ! bare ground heat flux [w/m2] [+ to soil] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRGXY ! veg ground net LW rad. [w/m2] [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRCXY ! canopy net LW rad. [w/m2] [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: IRBXY ! bare net longwave rad. [w/m2] [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: TRXY ! transpiration [w/m2] [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: EVCXY ! canopy evaporation heat [w/m2] [+ to atm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CHLEAFXY ! leaf exchange coefficient + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CHUCXY ! under canopy exchange coefficient + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CHV2XY ! veg 2m exchange coefficient + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CHB2XY ! bare 2m exchange coefficient + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: RS ! Total stomatal resistance [s/m] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: Z0 ! roughness length output to WRF + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ZNT ! roughness length output to WRF + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QTDRAIN ! tile drain discharge [mm] ! additional output variables - real(kind=kind_noahmp), allocatable, dimension(:,:) :: PAHXY ! precipitation advected heat [W/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: PAHGXY ! precipitation advected heat [W/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: PAHBXY ! precipitation advected heat [W/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: PAHVXY ! precipitation advected heat [W/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QINTSXY ! canopy intercepted snow [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QINTRXY ! canopy intercepted rain [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QDRIPSXY ! canopy dripping snow [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QDRIPRXY ! canopy dripping rain [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QTHROSXY ! canopy throughfall snow [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QTHRORXY ! canopy throughfall rain [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QSNSUBXY ! snowpack sublimation rate [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QMELTXY ! snowpack melting rate due to phase change [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QSNFROXY ! snowpack frost rate [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QSUBCXY ! canopy snow sublimation rate [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QFROCXY ! canopy snow frost rate [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QEVACXY ! canopy water evaporation rate [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QDEWCXY ! canopy water dew rate [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QFRZCXY ! canopy water freezing rate [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QMELTCXY ! canopy snow melting rate [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: QSNBOTXY ! total water (melt+rain through snow) out of snowpack bottom [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: PONDINGXY ! total surface ponding [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FPICEXY ! fraction of ice in total precipitation - real(kind=kind_noahmp), allocatable, dimension(:,:) :: RAINLSM ! total rain rate at the surface [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SNOWLSM ! total snow rate at the surface [mm/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FORCTLSM ! surface temperature as LSM forcing [K] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FORCQLSM ! surface specific humidity as LSM forcing [kg/kg] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FORCPLSM ! surface pressure as LSM forcing [Pa] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FORCZLSM ! reference height as LSM input [m] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: FORCWLSM ! surface wind speed as LSM forcing [m/s] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACC_SSOILXY ! accumulated ground heat flux [W/m2 * dt_soil/dt_main] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACC_QINSURXY ! accumulated water flux into soil [m/s * dt_soil/dt_main] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACC_QSEVAXY ! accumulated soil surface evaporation [m/s * dt_soil/dt_main] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: EFLXBXY ! accumulated heat flux through soil bottom per soil timestep [J/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SOILENERGY ! energy content in soil relative to 273.16 [KJ/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: SNOWENERGY ! energy content in snow relative to 273.16 [KJ/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: CANHSXY ! canopy heat storage change [W/m2] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACC_DWATERXY ! accumulated snow,soil,canopy water change per soil timestep [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACC_PRCPXY ! accumulated precipitation per soil timestep [mm] - real(kind=kind_noahmp), allocatable, dimension(:,:) :: ACC_ECANXY ! accumulated net canopy evaporation per soil timestep [mm] - 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 + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: PAHXY ! precipitation advected heat [W/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: PAHGXY ! precipitation advected heat [W/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: PAHBXY ! precipitation advected heat [W/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: PAHVXY ! precipitation advected heat [W/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QINTSXY ! canopy intercepted snow [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QINTRXY ! canopy intercepted rain [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QDRIPSXY ! canopy dripping snow [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QDRIPRXY ! canopy dripping rain [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QTHROSXY ! canopy throughfall snow [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QTHRORXY ! canopy throughfall rain [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QSNSUBXY ! snowpack sublimation rate [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QMELTXY ! snowpack melting rate due to phase change [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QSNFROXY ! snowpack frost rate [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QSUBCXY ! canopy snow sublimation rate [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QFROCXY ! canopy snow frost rate [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QEVACXY ! canopy water evaporation rate [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QDEWCXY ! canopy water dew rate [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QFRZCXY ! canopy water freezing rate [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QMELTCXY ! canopy snow melting rate [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: QSNBOTXY ! total water (melt+rain through snow) out of snowpack bottom [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: PONDINGXY ! total surface ponding [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FPICEXY ! fraction of ice in total precipitation + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: RAINLSM ! total rain rate at the surface [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SNOWLSM ! total snow rate at the surface [mm/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FORCTLSM ! surface temperature as LSM forcing [K] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FORCQLSM ! surface specific humidity as LSM forcing [kg/kg] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FORCPLSM ! surface pressure as LSM forcing [Pa] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FORCZLSM ! reference height as LSM input [m] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: FORCWLSM ! surface wind speed as LSM forcing [m/s] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ACC_SSOILXY ! accumulated ground heat flux [W/m2 * dt_soil/dt_main] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ACC_QINSURXY ! accumulated water flux into soil [m/s * dt_soil/dt_main] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ACC_QSEVAXY ! accumulated soil surface evaporation [m/s * dt_soil/dt_main] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: EFLXBXY ! accumulated heat flux through soil bottom per soil timestep [J/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SOILENERGY ! energy content in soil relative to 273.16 [KJ/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SNOWENERGY ! energy content in snow relative to 273.16 [KJ/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: CANHSXY ! canopy heat storage change [W/m2] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ACC_DWATERXY ! accumulated snow,soil,canopy water change per soil timestep [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ACC_PRCPXY ! accumulated precipitation per soil timestep [mm] + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: ACC_ECANXY ! accumulated net canopy evaporation per soil timestep [mm] + 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 @@ -361,7 +364,7 @@ module NoahmpIOVarType integer :: NUMRAD = 2 ! number of shortwave band !------------------------------------------------------------------------ -! Needed for SNICAR SNOW ALBEDO (IOPT_ALB = 3) +! Needed for SNICAR SNOW ALBEDO (IOPT_ALB = 3) !------------------------------------------------------------------------ integer :: SNICAR_BANDNUMBER_OPT !number of wavelength bands used in SNICAR snow albedo calculation @@ -439,54 +442,55 @@ module NoahmpIOVarType 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 + + 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 !------------------------------------------------------------------------ - real(kind=kind_noahmp), allocatable, dimension(:,:) :: TD_FRACTION ! tile drainage fraction + real(kind=kind_noahmp), allocatable, dimension(:,:) :: TD_FRACTION ! tile drainage fraction - !------------------------------------------------------------------------ ! Needed for crop model (OPT_CROP=1) !------------------------------------------------------------------------ - integer, allocatable, dimension(:,:) :: PGSXY ! plant growth stage + integer, allocatable, dimension(:,:,:) :: PGSXY ! plant growth stage integer, allocatable, dimension(:,:) :: CROPCAT ! crop category real(kind=kind_noahmp), allocatable, dimension(:,:) :: PLANTING ! planting day real(kind=kind_noahmp), allocatable, dimension(:,:) :: HARVEST ! harvest day @@ -496,10 +500,10 @@ module NoahmpIOVarType !------------------------------------------------------------------------ ! 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] + 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 @@ -640,8 +644,8 @@ module NoahmpIOVarType real(kind=kind_noahmp), allocatable, dimension(:,:) :: XLONG ! longitude real(kind=kind_noahmp), allocatable, dimension(:,:) :: TERRAIN ! terrain height - real(kind=kind_noahmp), allocatable, dimension(:,:) :: GVFMIN ! annual minimum in vegetation fraction - real(kind=kind_noahmp), allocatable, dimension(:,:) :: GVFMAX ! annual maximum in vegetation fraction + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: GVFMIN ! annual minimum in vegetation fraction + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: GVFMAX ! annual maximum in vegetation fraction !------------------------------------------------------------------------ ! End 2D variables not used in WRF @@ -651,6 +655,22 @@ module NoahmpIOVarType CHARACTER(LEN=256) :: LLANDUSE ! (=USGS, using USGS landuse classification) !------------------------------------------------------------------------ +! NoahMP mosaic scheme valiables +!------------------------------------------------------------------------ + + integer :: NumMosaicCat ! number of mosiac category, which is equal to number of soil type or lulc type, etc. + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SubGrdFrac ! Subgrid fraction for lulc or soiltype or hydro type ; input from geo_em file + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SubGrdFracRescaled ! land use fraction scaled as per the selected number of NumberOfTiles to 100% + real(kind=kind_noahmp), allocatable, dimension(:,:,:) :: SubGrdFracMosaic ! scaled land use fraction subset for the selected number of NumberOfTiles + integer, allocatable, dimension(:,:,:) :: SubGrdIndexSorted ! land use index sorted in decreasing order of llandusef + integer, allocatable, dimension(:,:) :: NumberOfTiles ! maximum number of tiles in each grid or N_tiles; for noahmp 1D looping + integer :: NTilesMax ! Maximum mosaic category across the domain to initialize the NoahmpIO & IO + ! this will help to initialize for only limited dimension than all lulc categories. + integer, allocatable, dimension(:,:) :: LANDMASK ! it is required for MMF GW scheme. Not directly related to Mosiac. As IVGTYP is + ! being updated in mosaic loop, masking water later based on IVGTYP may not work. + ! landmask: -1 for water (ice or no ice) and glacial areas, 1 for land where the LSM does its soil moisture calculations + CHARACTER(LEN=24) :: SubGrdFracName ! variable name in the netcdf input (eg, for lulc, it is LLANDUSEF) +!------------------------------------------------------------------------ ! Timing: !------------------------------------------------------------------------ @@ -669,6 +689,7 @@ module NoahmpIOVarType integer :: I integer :: J + integer :: N integer :: SLOPETYP integer :: YEARLEN integer :: NSNOW = 3 ! number of snow layers fixed to 3 diff --git a/drivers/hrldas/NoahmpInitMainMod.F90 b/drivers/hrldas/NoahmpInitMainMod.F90 index 8c6a9956..b9c70c04 100644 --- a/drivers/hrldas/NoahmpInitMainMod.F90 +++ b/drivers/hrldas/NoahmpInitMainMod.F90 @@ -24,7 +24,7 @@ subroutine NoahmpInitMain(NoahmpIO) ! local variables integer :: ide,jde,its,jts,itf,jtf - integer :: I,J,errflag,NS,IZ + integer :: I,J,errflag,NS,IZ,N,NTiles logical :: urbanpt_flag real(kind=kind_noahmp) :: BEXP, SMCMAX, PSISAT, FK real(kind=kind_noahmp), parameter :: BLIM = 5.5 @@ -41,6 +41,14 @@ subroutine NoahmpInitMain(NoahmpIO) itf = min0(NoahmpIO%ite, ide-1) jtf = min0(NoahmpIO%jte, jde-1) + ! initialize land mask + where ( (NoahmpIO%IVGTYP /= NoahmpIO%ISWATER_TABLE) .and. (NoahmpIO%IVGTYP /= NoahmpIO%ISICE_TABLE) .and. & + (NoahmpIO%XLAND-1.5 .LT. 0.) .and. (NoahmpIO%XICE .LT. NoahmpIO%XICE_THRESHOLD) ) + NoahmpIO%LANDMASK = 1 + elsewhere + NoahmpIO%LANDMASK = -1 + endwhere +print*,shape(NoahmpIO%NumberOfTiles),jts,jtf,its,itf ! only initialize for non-restart case if ( .not. NoahmpIO%restart_flag ) then @@ -50,7 +58,9 @@ subroutine NoahmpInitMain(NoahmpIO) print*, 'SNOW HEIGHT NOT FOUND - VALUE DEFINED IN LSMINIT' do J = jts, jtf do I = its, itf - NoahmpIO%SNOWH(I,J) = NoahmpIO%SNOW(I,J) * 0.005 ! SNOW in mm and SNOWH in m + do N=1, NoahmpIO%NumberOfTiles(I,J) + NoahmpIO%SNOWH(I,J,N) = NoahmpIO%SNOW(I,J,N) * 0.005 ! SNOW in mm and SNOWH in m + enddo enddo enddo endif @@ -59,16 +69,18 @@ subroutine NoahmpInitMain(NoahmpIO) ! the Noah-MP code does it internally but if we don't do it here, problems ensue do J = jts, jtf do I = its, itf - if ( NoahmpIO%SNOW(I,J) < 0.0 ) NoahmpIO%SNOW(I,J) = 0.0 - if ( NoahmpIO%SNOWH(I,J) < 0.0 ) NoahmpIO%SNOWH(I,J) = 0.0 - if ( (NoahmpIO%SNOW(I,J) > 0.0) .and. (NoahmpIO%SNOWH(I,J) == 0.0) ) & - NoahmpIO%SNOWH(I,J) = NoahmpIO%SNOW(I,J) * 0.005 - if ( (NoahmpIO%SNOWH(I,J) > 0.0) .and. (NoahmpIO%SNOW(I,J) == 0.0) ) & - NoahmpIO%SNOW(I,J) = NoahmpIO%SNOWH(I,J) / 0.005 - if ( NoahmpIO%SNOW(I,J) > 2000.0 ) then - NoahmpIO%SNOWH(I,J) = NoahmpIO%SNOWH(I,J) * 2000.0 / NoahmpIO%SNOW(I,J) ! SNOW in mm and SNOWH in m - NoahmpIO%SNOW (I,J) = 2000.0 ! cap SNOW at 2000, maintain density - endif + do N=1, NoahmpIO%NumberOfTiles(I,J) + if ( NoahmpIO%SNOW(I,J,N) < 0.0 ) NoahmpIO%SNOW(I,J,N) = 0.0 + if ( NoahmpIO%SNOWH(I,J,N) < 0.0 ) NoahmpIO%SNOWH(I,J,N) = 0.0 + if ( (NoahmpIO%SNOW(I,J,N) > 0.0) .and. (NoahmpIO%SNOWH(I,J,N) == 0.0) ) & + NoahmpIO%SNOWH(I,J,N) = NoahmpIO%SNOW(I,J,N) * 0.005 + if ( (NoahmpIO%SNOWH(I,J,N) > 0.0) .and. (NoahmpIO%SNOW(I,J,N) == 0.0) ) & + NoahmpIO%SNOW(I,J,N) = NoahmpIO%SNOWH(I,J,N) / 0.005 + if ( NoahmpIO%SNOW(I,J,N) > 2000.0 ) then + NoahmpIO%SNOWH(I,J,N) = NoahmpIO%SNOWH(I,J,N) * 2000.0 / NoahmpIO%SNOW(I,J,N) ! SNOW in mm and SNOWH in m + NoahmpIO%SNOW (I,J,N) = 2000.0 ! cap SNOW at 2000, maintain density + endif + enddo enddo enddo @@ -87,171 +99,199 @@ subroutine NoahmpInitMain(NoahmpIO) ! initialize soil liquid water content SH2O do J = jts , jtf do I = its , itf - if ( (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISICE_TABLE) .and. & - (NoahmpIO%XICE(I,J) <= 0.0) ) then - do NS = 1, NoahmpIO%NSOIL - NoahmpIO%SMOIS(I,NS,J) = 1.0 ! glacier starts all frozen - NoahmpIO%SH2O(I,NS,J) = 0.0 - NoahmpIO%TSLB(I,NS,J) = min(NoahmpIO%TSLB(I,NS,J), 263.15) ! set glacier temp to at most -10C - enddo - ! NoahmpIO%TMN(I,J) = min(NoahmpIO%TMN(I,J), 263.15) ! set deep temp to at most -10C - NoahmpIO%SNOW(I,J) = max(NoahmpIO%SNOW(I,J), 10.0) ! set SWE to at least 10mm - NoahmpIO%SNOWH(I,J) = NoahmpIO%SNOW(I,J) * 0.005 ! SNOW in mm and SNOWH in m - else - BEXP = NoahmpIO%BEXP_TABLE (NoahmpIO%ISLTYP(I,J)) - SMCMAX = NoahmpIO%SMCMAX_TABLE(NoahmpIO%ISLTYP(I,J)) - PSISAT = NoahmpIO%PSISAT_TABLE(NoahmpIO%ISLTYP(I,J)) - do NS = 1, NoahmpIO%NSOIL - if ( NoahmpIO%SMOIS(I,NS,J) > SMCMAX ) NoahmpIO%SMOIS(I,NS,J) = SMCMAX - enddo - if ( (BEXP > 0.0) .and. (SMCMAX > 0.0) .and. (PSISAT > 0.0) ) then + do N = 1, NoahmpIO%NumberOfTiles(I,J) + if(NoahmpIO%IOPT_MOSAIC == 1) then ! if mosaic is based ob lulc + NoahmpIO%IVGTYP(I,J) = NoahmpIO%SubGrdIndexSorted(I,J,N) + endif + if ( (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISICE_TABLE) .and. & + (NoahmpIO%XICE(I,J) <= 0.0) ) then do NS = 1, NoahmpIO%NSOIL - if ( NoahmpIO%TSLB(I,NS,J) < 273.149 ) then - FK = (((HLICE / (GRAV0*(-PSISAT))) * & - ((NoahmpIO%TSLB(I,NS,J)-T0) / NoahmpIO%TSLB(I,NS,J)))**(-1/BEXP))*SMCMAX - FK = max(FK, 0.02) - NoahmpIO%SH2O(I,NS,J) = min(FK, NoahmpIO%SMOIS(I,NS,J)) - else - NoahmpIO%SH2O(I,NS,J) = NoahmpIO%SMOIS(I,NS,J) - endif + NoahmpIO%SMOIS(I,NS,J,N) = 1.0 ! glacier starts all frozen + NoahmpIO%SH2O(I,NS,J,N) = 0.0 + NoahmpIO%TSLB(I,NS,J,N) = min(NoahmpIO%TSLB(I,NS,J,N), 263.15) ! set glacier temp to at most -10C enddo + ! NoahmpIO%TMN(I,J) = min(NoahmpIO%TMN(I,J), 263.15) ! set deep temp to at most -10C + NoahmpIO%SNOW(I,J,N) = max(NoahmpIO%SNOW(I,J,N), 10.0) ! set SWE to at least 10mm + NoahmpIO%SNOWH(I,J,N) = NoahmpIO%SNOW(I,J,N) * 0.005 ! SNOW in mm and SNOWH in m else + BEXP = NoahmpIO%BEXP_TABLE (NoahmpIO%ISLTYP(I,J)) + SMCMAX = NoahmpIO%SMCMAX_TABLE(NoahmpIO%ISLTYP(I,J)) + PSISAT = NoahmpIO%PSISAT_TABLE(NoahmpIO%ISLTYP(I,J)) do NS = 1, NoahmpIO%NSOIL - NoahmpIO%SH2O(I,NS,J) = NoahmpIO%SMOIS(I,NS,J) + if ( NoahmpIO%SMOIS(I,NS,J,N) > SMCMAX ) NoahmpIO%SMOIS(I,NS,J,N) = SMCMAX enddo + if ( (BEXP > 0.0) .and. (SMCMAX > 0.0) .and. (PSISAT > 0.0) ) then + do NS = 1, NoahmpIO%NSOIL + if ( NoahmpIO%TSLB(I,NS,J,N) < 273.149 ) then + FK = (((HLICE / (GRAV0*(-PSISAT))) * & + ((NoahmpIO%TSLB(I,NS,J,N)-T0) / NoahmpIO%TSLB(I,NS,J,N)))**(-1/BEXP))*SMCMAX + FK = max(FK, 0.02) + NoahmpIO%SH2O(I,NS,J,N) = min(FK, NoahmpIO%SMOIS(I,NS,J,N)) + else + NoahmpIO%SH2O(I,NS,J,N) = NoahmpIO%SMOIS(I,NS,J,N) + endif + enddo + else + do NS = 1, NoahmpIO%NSOIL + NoahmpIO%SH2O(I,NS,J,N) = NoahmpIO%SMOIS(I,NS,J,N) + enddo + endif endif - endif + enddo enddo ! I enddo ! J ! initilize other quantities do J = jts, jtf do I = its, itf - NoahmpIO%QTDRAIN(I,J) = 0.0 - NoahmpIO%TVXY(I,J) = NoahmpIO%TSK(I,J) - NoahmpIO%TGXY(I,J) = NoahmpIO%TSK(I,J) - if ( (NoahmpIO%SNOW(I,J) > 0.0) .and. (NoahmpIO%TSK(i,j) > 273.15) ) NoahmpIO%TVXY(I,J) = 273.15 - if ( (NoahmpIO%SNOW(I,J) > 0.0) .and. (NoahmpIO%TSK(I,J) > 273.15) ) NoahmpIO%TGXY(I,J) = 273.15 - NoahmpIO%CANWAT(I,J) = 0.0 - NoahmpIO%CANLIQXY(I,J) = NoahmpIO%CANWAT(I,J) - NoahmpIO%CANICEXY(I,J) = 0.0 - NoahmpIO%EAHXY(I,J) = 2000.0 - NoahmpIO%TAHXY(I,J) = NoahmpIO%TSK(I,J) - NoahmpIO%T2MVXY(I,J) = NoahmpIO%TSK(I,J) - NoahmpIO%T2MBXY(I,J) = NoahmpIO%TSK(I,J) - if ( (NoahmpIO%SNOW(I,J) > 0.0) .and. (NoahmpIO%TSK(I,J) > 273.15) ) NoahmpIO%TAHXY(I,J) = 273.15 - if ( (NoahmpIO%SNOW(I,J) > 0.0) .and. (NoahmpIO%TSK(I,J) > 273.15) ) NoahmpIO%T2MVXY(I,J) = 273.15 - if ( (NoahmpIO%SNOW(I,J) > 0.0) .and. (NoahmpIO%TSK(I,J) > 273.15) ) NoahmpIO%T2MBXY(I,J) = 273.15 - NoahmpIO%CMXY(I,J) = 0.0 - NoahmpIO%CHXY(I,J) = 0.0 - NoahmpIO%FWETXY(I,J) = 0.0 - NoahmpIO%SNEQVOXY(I,J) = 0.0 - NoahmpIO%ALBOLDXY(I,J) = 0.65 - 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) - NoahmpIO%ZWTXY(I,J) = (25.0 + 2.0) - NoahmpIO%WAXY(i,j)/1000/0.2 - else - NoahmpIO%WAXY(I,J) = 0.0 - NoahmpIO%WTXY(I,J) = 0.0 - NoahmpIO%AREAXY(I,J) = (max(10.0,NoahmpIO%DX) * max(10.0,NoahmpIO%DY)) / & - (NoahmpIO%MSFTX(I,J) * NoahmpIO%MSFTY(I,J)) - endif - - urbanpt_flag = .false. - if ( (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISURBAN_TABLE) .or. & - (NoahmpIO%IVGTYP(I,J) > NoahmpIO%URBTYPE_beg) ) then - urbanpt_flag = .true. - endif - - if ( (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISBARREN_TABLE) .or. & - (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISICE_TABLE) .or. & - ((NoahmpIO%SF_URBAN_PHYSICS == 0) .and. (urbanpt_flag .eqv. .true.)) .or. & - (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISWATER_TABLE) ) then - NoahmpIO%LAI(I,J) = 0.0 - NoahmpIO%XSAIXY(I,J) = 0.0 - NoahmpIO%LFMASSXY(I,J) = 0.0 - NoahmpIO%STMASSXY(I,J) = 0.0 - NoahmpIO%RTMASSXY(I,J) = 0.0 - NoahmpIO%WOODXY(I,J) = 0.0 - NoahmpIO%STBLCPXY(I,J) = 0.0 - NoahmpIO%FASTCPXY(I,J) = 0.0 - NoahmpIO%GRAINXY(I,J) = 1.0e-10 - NoahmpIO%GDDXY(I,J) = 0 - NoahmpIO%CROPCAT(I,J) = 0 - else - if ( (NoahmpIO%LAI(I,J) > 100) .or. (NoahmpIO%LAI(I,J) < 0) ) & - NoahmpIO%LAI(I,J) = 0.0 - NoahmpIO%LAI(I,J) = max(NoahmpIO%LAI(I,J), 0.05) ! at least start with 0.05 for arbitrary initialization (v3.7) - NoahmpIO%XSAIXY(I,J) = max(0.1*NoahmpIO%LAI(I,J), 0.05) ! MB: arbitrarily initialize SAI using input LAI (v3.7) - if ( urbanpt_flag .eqv. .true. ) then - NoahmpIO%LFMASSXY(I,J) = NoahmpIO%LAI(I,J) * 1000.0 / & - max(NoahmpIO%SLA_TABLE(NoahmpIO%NATURAL_TABLE),1.0)! use LAI to initialize (v3.7) + do N = 1, NoahmpIO%NumberOfTiles(I,J) + if(NoahmpIO%IOPT_MOSAIC == 1) then ! if mosaic is based ons lulc + NoahmpIO%IVGTYP(I,J) = NoahmpIO%SubGrdIndexSorted(I,J,N) + endif + NoahmpIO%QTDRAIN(I,J,N) = 0.0 + NoahmpIO%TVXY(I,J,N) = NoahmpIO%TSK(I,J,N) + NoahmpIO%TGXY(I,J,N) = NoahmpIO%TSK(I,J,N) + if ( (NoahmpIO%SNOW(I,J,N) > 0.0) .and. (NoahmpIO%TSK(I,J,N) > 273.15) ) NoahmpIO%TVXY(I,J,N) = 273.15 + if ( (NoahmpIO%SNOW(I,J,N) > 0.0) .and. (NoahmpIO%TSK(I,J,N) > 273.15) ) NoahmpIO%TGXY(I,J,N) = 273.15 + NoahmpIO%CANWAT(I,J,N) = 0.0 + NoahmpIO%CANLIQXY(I,J,N) = NoahmpIO%CANWAT(I,J,N) + NoahmpIO%CANICEXY(I,J,N) = 0.0 + NoahmpIO%EAHXY(I,J,N) = 2000.0 + NoahmpIO%TAHXY(I,J,N) = NoahmpIO%TSK(I,J,N) + NoahmpIO%T2MVXY(I,J,N) = NoahmpIO%TSK(I,J,N) + NoahmpIO%T2MBXY(I,J,N) = NoahmpIO%TSK(I,J,N) + if ( (NoahmpIO%SNOW(I,J,N) > 0.0) .and. (NoahmpIO%TSK(I,J,N) > 273.15) ) NoahmpIO%TAHXY(I,J,N) = 273.15 + if ( (NoahmpIO%SNOW(I,J,N) > 0.0) .and. (NoahmpIO%TSK(I,J,N) > 273.15) ) NoahmpIO%T2MVXY(I,J,N) = 273.15 + if ( (NoahmpIO%SNOW(I,J,N) > 0.0) .and. (NoahmpIO%TSK(I,J,N) > 273.15) ) NoahmpIO%T2MBXY(I,J,N) = 273.15 + NoahmpIO%CMXY(I,J,N) = 0.0 + NoahmpIO%CHXY(I,J,N) = 0.0 + NoahmpIO%FWETXY(I,J,N) = 0.0 + NoahmpIO%SNEQVOXY(I,J,N) = 0.0 + NoahmpIO%ALBOLDXY(I,J,N) = 0.65 + NoahmpIO%QSNOWXY(I,J,N) = 0.0 + NoahmpIO%QRAINXY(I,J,N) = 0.0 + NoahmpIO%WSLAKEXY(I,J,N) = 0.0 + if ( NoahmpIO%IOPT_WETLAND > 0 ) then + NoahmpIO%FSATXY(I,J,N) = 0.0 + NoahmpIO%WSURFXY(I,J,N) = 0.0 + endif + if ( NoahmpIO%IOPT_RUNSUB /= 5 ) then + NoahmpIO%WAXY(I,J,N) = 4900.0 + NoahmpIO%WTXY(I,J,N) = NoahmpIO%WAXY(I,J,N) + NoahmpIO%ZWTXY(I,J,N) = (25.0 + 2.0) - NoahmpIO%WAXY(I,J,N)/1000/0.2 else - NoahmpIO%LFMASSXY(I,J) = NoahmpIO%LAI(I,J) * 1000.0 / & - max(NoahmpIO%SLA_TABLE(NoahmpIO%IVGTYP(I,J)),1.0) ! use LAI to initialize (v3.7) + NoahmpIO%WAXY(I,J,N) = 0.0 + NoahmpIO%WTXY(I,J,N) = 0.0 + NoahmpIO%AREAXY(I,J) = (max(10.0,NoahmpIO%DX) * max(10.0,NoahmpIO%DY)) / & + (NoahmpIO%MSFTX(I,J) * NoahmpIO%MSFTY(I,J)) endif - NoahmpIO%STMASSXY(I,J) = NoahmpIO%XSAIXY(I,J) * 1000.0 / 3.0 ! use SAI to initialize (v3.7) - NoahmpIO%RTMASSXY(I,J) = 500.0 ! these are all arbitrary and probably should be - NoahmpIO%WOODXY(I,J) = 500.0 ! in the table or read from initialization - NoahmpIO%STBLCPXY(I,J) = 1000.0 - NoahmpIO%FASTCPXY(I,J) = 1000.0 - NoahmpIO%GRAINXY(I,J) = 1.0e-10 - NoahmpIO%GDDXY(I,J) = 0 - ! Initialize crop for crop model - if ( NoahmpIO%IOPT_CROP == 1 ) then - NoahmpIO%CROPCAT(I,J) = NoahmpIO%default_crop_table - if ( NoahmpIO%CROPTYPE(I,5,J) >= 0.5 ) then - NoahmpIO%RTMASSXY(I,J) = 0.0 - NoahmpIO%WOODXY (I,J) = 0.0 - if ( (NoahmpIO%CROPTYPE(I,1,J) > NoahmpIO%CROPTYPE(I,2,J)) .and. & - (NoahmpIO%CROPTYPE(I,1,J) > NoahmpIO%CROPTYPE(I,3,J)) .and. & - (NoahmpIO%CROPTYPE(I,1,J) > NoahmpIO%CROPTYPE(I,4,J)) ) then ! choose corn - NoahmpIO%CROPCAT(I,J) = 1 - NoahmpIO%LFMASSXY(I,J) = NoahmpIO%LAI(I,J) / 0.015 ! Initialize lfmass Zhe Zhang 2020-07-13 - NoahmpIO%STMASSXY(I,J) = NoahmpIO%XSAIXY(I,J) / 0.003 - elseif ( (NoahmpIO%CROPTYPE(I,2,J) > NoahmpIO%CROPTYPE(I,1,J)) .and. & - (NoahmpIO%CROPTYPE(I,2,J) > NoahmpIO%CROPTYPE(I,3,J)) .and. & - (NoahmpIO%CROPTYPE(I,2,J) > NoahmpIO%CROPTYPE(I,4,J)) ) then ! choose soybean - NoahmpIO%CROPCAT(I,J) = 2 - NoahmpIO%LFMASSXY(I,J) = NoahmpIO%LAI(I,J) / 0.030 ! Initialize lfmass Zhe Zhang 2020-07-13 - NoahmpIO%STMASSXY(I,J) = NoahmpIO%XSAIXY(I,J) / 0.003 - else - NoahmpIO%CROPCAT(I,J) = NoahmpIO%default_crop_table - NoahmpIO%LFMASSXY(I,J) = NoahmpIO%LAI(I,J) / 0.035 - NoahmpIO%STMASSXY(I,J) = NoahmpIO%XSAIXY(I,J) / 0.003 - endif - endif + urbanpt_flag = .false. + if ( (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISURBAN_TABLE) .or. & + (NoahmpIO%IVGTYP(I,J) > NoahmpIO%URBTYPE_beg) ) then + urbanpt_flag = .true. endif - ! Noah-MP irrigation scheme - if ( (NoahmpIO%IOPT_IRR >= 1) .and. (NoahmpIO%IOPT_IRR <= 3) ) then - if ( (NoahmpIO%IOPT_IRRM == 0) .or. (NoahmpIO%IOPT_IRRM ==1) ) then ! sprinkler - NoahmpIO%IRNUMSI(I,J) = 0 - NoahmpIO%IRWATSI(I,J) = 0.0 - NoahmpIO%IRELOSS(I,J) = 0.0 - NoahmpIO%IRRSPLH(I,J) = 0.0 - elseif ( (NoahmpIO%IOPT_IRRM == 0) .or. (NoahmpIO%IOPT_IRRM == 2) ) then ! micro or drip - NoahmpIO%IRNUMMI(I,J) = 0 - NoahmpIO%IRWATMI(I,J) = 0.0 - NoahmpIO%IRMIVOL(I,J) = 0.0 - elseif ( (NoahmpIO%IOPT_IRRM == 0) .or. (NoahmpIO%IOPT_IRRM == 3) ) then ! flood - NoahmpIO%IRNUMFI(I,J) = 0 - NoahmpIO%IRWATFI(I,J) = 0.0 - NoahmpIO%IRFIVOL(I,J) = 0.0 - endif + if ( (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISBARREN_TABLE) .or. & + (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISICE_TABLE) .or. & + ((NoahmpIO%SF_URBAN_PHYSICS == 0) .and. (urbanpt_flag .eqv. .true.)) .or. & + (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISWATER_TABLE) ) then + NoahmpIO%LAI(I,J,N) = 0.0 + NoahmpIO%XSAIXY(I,J,N) = 0.0 + NoahmpIO%LFMASSXY(I,J,N) = 0.0 + NoahmpIO%STMASSXY(I,J,N) = 0.0 + NoahmpIO%RTMASSXY(I,J,N) = 0.0 + NoahmpIO%WOODXY(I,J,N) = 0.0 + NoahmpIO%STBLCPXY(I,J,N) = 0.0 + NoahmpIO%FASTCPXY(I,J,N) = 0.0 + NoahmpIO%GRAINXY(I,J,N) = 1.0e-10 + NoahmpIO%GDDXY(I,J,N) = 0 + NoahmpIO%CROPCAT(I,J) = 0 + else + if ( (NoahmpIO%LAI(I,J,N) > 100) .or. (NoahmpIO%LAI(I,J,N) < 0) ) & + NoahmpIO%LAI(I,J,N) = 0.0 + NoahmpIO%LAI(I,J,N) = max(NoahmpIO%LAI(I,J,N), 0.05) ! at least start with 0.05 for arbitrary initialization (v3.7) + NoahmpIO%XSAIXY(I,J,N) = max(0.1*NoahmpIO%LAI(I,J,N), 0.05) ! MB: arbitrarily initialize SAI using input LAI (v3.7) + if ( urbanpt_flag .eqv. .true. ) then + NoahmpIO%LFMASSXY(I,J,N) = NoahmpIO%LAI(I,J,N) * 1000.0 / & + max(NoahmpIO%SLA_TABLE(NoahmpIO%NATURAL_TABLE),1.0)! use LAI to initialize (v3.7) + else + NoahmpIO%LFMASSXY(I,J,N) = NoahmpIO%LAI(I,J,N) * 1000.0 / & + max(NoahmpIO%SLA_TABLE(NoahmpIO%IVGTYP(I,J)),1.0) ! use LAI to initialize (v3.7) + endif + NoahmpIO%STMASSXY(I,J,N) = NoahmpIO%XSAIXY(I,J,N) * 1000.0 / 3.0 ! use SAI to initialize (v3.7) + NoahmpIO%RTMASSXY(I,J,N) = 500.0 ! these are all arbitrary and probably should be + NoahmpIO%WOODXY(I,J,N) = 500.0 ! in the table or read from initialization + NoahmpIO%STBLCPXY(I,J,N) = 1000.0 + NoahmpIO%FASTCPXY(I,J,N) = 1000.0 + NoahmpIO%GRAINXY(I,J,N) = 1.0e-10 + NoahmpIO%GDDXY(I,J,N) = 0 + + ! Initialize crop for crop model + if ( (NoahmpIO%IOPT_CROP == 1) .and. (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISCROP_TABLE) ) then + NoahmpIO%CROPCAT(I,J) = NoahmpIO%default_crop_table + if ( NoahmpIO%CROPTYPE(I,5,J) >= 0.5 ) then + NoahmpIO%RTMASSXY(I,J,N) = 0.0 + NoahmpIO%WOODXY (I,J,N) = 0.0 + if ( (NoahmpIO%CROPTYPE(I,1,J) > NoahmpIO%CROPTYPE(I,2,J)) .and. & + (NoahmpIO%CROPTYPE(I,1,J) > NoahmpIO%CROPTYPE(I,3,J)) .and. & + (NoahmpIO%CROPTYPE(I,1,J) > NoahmpIO%CROPTYPE(I,4,J)) ) then ! choose corn + NoahmpIO%CROPCAT(I,J) = 1 + NoahmpIO%LFMASSXY(I,J,N) = NoahmpIO%LAI(I,J,N) / 0.015 ! Initialize lfmass Zhe Zhang 2020-07-13 + NoahmpIO%STMASSXY(I,J,N) = NoahmpIO%XSAIXY(I,J,N) / 0.003 + elseif ( (NoahmpIO%CROPTYPE(I,2,J) > NoahmpIO%CROPTYPE(I,1,J)) .and. & + (NoahmpIO%CROPTYPE(I,2,J) > NoahmpIO%CROPTYPE(I,3,J)) .and. & + (NoahmpIO%CROPTYPE(I,2,J) > NoahmpIO%CROPTYPE(I,4,J)) ) then ! choose soybean + NoahmpIO%CROPCAT(I,J) = 2 + NoahmpIO%LFMASSXY(I,J,N) = NoahmpIO%LAI(I,J,N) / 0.030 ! Initialize lfmass Zhe Zhang 2020-07-13 + NoahmpIO%STMASSXY(I,J,N) = NoahmpIO%XSAIXY(I,J,N) / 0.003 + else + NoahmpIO%CROPCAT(I,J) = NoahmpIO%default_crop_table + NoahmpIO%LFMASSXY(I,J,N) = NoahmpIO%LAI(I,J,N) / 0.035 + NoahmpIO%STMASSXY(I,J,N) = NoahmpIO%XSAIXY(I,J,N) / 0.003 + endif + endif + endif + + ! Noah-MP irrigation scheme + if ( (NoahmpIO%IOPT_IRR >= 1) .and. (NoahmpIO%IOPT_IRR <= 3) .and. & + (NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISCROP_TABLE) ) then + if ( (NoahmpIO%IOPT_IRRM == 0) .or. (NoahmpIO%IOPT_IRRM ==1) ) then ! sprinkler + NoahmpIO%IRNUMSI(I,J,N) = 0 + NoahmpIO%IRWATSI(I,J,N) = 0.0 + NoahmpIO%IRELOSS(I,J,N) = 0.0 + NoahmpIO%IRRSPLH(I,J,N) = 0.0 + elseif ( (NoahmpIO%IOPT_IRRM == 0) .or. (NoahmpIO%IOPT_IRRM == 2) ) then ! micro or drip + NoahmpIO%IRNUMMI(I,J,N) = 0 + NoahmpIO%IRWATMI(I,J,N) = 0.0 + NoahmpIO%IRMIVOL(I,J,N) = 0.0 + elseif ( (NoahmpIO%IOPT_IRRM == 0) .or. (NoahmpIO%IOPT_IRRM == 3) ) then ! flood + NoahmpIO%IRNUMFI(I,J,N) = 0 + NoahmpIO%IRWATFI(I,J,N) = 0.0 + NoahmpIO%IRFIVOL(I,J,N) = 0.0 + endif + endif + + ! scale irrigation and tile drainage area fractions to subgrid crop fraction + if ( NoahmpIO%IVGTYP(I,J) == NoahmpIO%ISCROP_TABLE ) then + if( NoahmpIO%SubGrdFracMosaic(I,J,N) > 0.0 ) then + NoahmpIO%IRFRACT(I,J) = NoahmpIO%IRFRACT(I,J)/NoahmpIO%SubGrdFracMosaic(I,J,N) + NoahmpIO%SIFRACT(I,J) = NoahmpIO%SIFRACT(I,J)/NoahmpIO%SubGrdFracMosaic(I,J,N) + NoahmpIO%MIFRACT(I,J) = NoahmpIO%MIFRACT(I,J)/NoahmpIO%SubGrdFracMosaic(I,J,N) + NoahmpIO%FIFRACT(I,J) = NoahmpIO%FIFRACT(I,J)/NoahmpIO%SubGrdFracMosaic(I,J,N) + NoahmpIO%TD_FRACTION(I,J) = NoahmpIO%TD_FRACTION(I,J)/NoahmpIO%SubGrdFracMosaic(I,J,N) + else + NoahmpIO%IRFRACT(I,J) = 0.0 + NoahmpIO%SIFRACT(I,J) = 0.0 + NoahmpIO%MIFRACT(I,J) = 0.0 + NoahmpIO%FIFRACT(I,J) = 0.0 + NoahmpIO%TD_FRACTION(I,J) = 0.0 + endif + endif endif - endif - enddo ! I - enddo ! J + enddo ! N + enddo ! I + enddo ! J ! Given the soil layer thicknesses (in DZS), initialize the soil layer ! depths from the surface. @@ -275,27 +315,29 @@ subroutine NoahmpInitMain(NoahmpIO) 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 + do N = 1, NoahmpIO%NumberOfTiles(I,J) + if ( (NoahmpIO%SNLIQXY(I,IZ,J,N)+NoahmpIO%SNICEXY(I,IZ,J,N)) > 0.0 ) then + NoahmpIO%MassConcBCPHIXY(I,IZ,J,N) = NoahmpIO%BCPHIXY(I,IZ,J,N) / (NoahmpIO%SNLIQXY(I,IZ,J,N) + NoahmpIO%SNICEXY(I,IZ,J,N)) + NoahmpIO%MassConcBCPHOXY(I,IZ,J,N) = NoahmpIO%BCPHOXY(I,IZ,J,N) / (NoahmpIO%SNLIQXY(I,IZ,J,N) + NoahmpIO%SNICEXY(I,IZ,J,N)) + NoahmpIO%MassConcOCPHIXY(I,IZ,J,N) = NoahmpIO%OCPHIXY(I,IZ,J,N) / (NoahmpIO%SNLIQXY(I,IZ,J,N) + NoahmpIO%SNICEXY(I,IZ,J,N)) + NoahmpIO%MassConcOCPHOXY(I,IZ,J,N) = NoahmpIO%OCPHOXY(I,IZ,J,N) / (NoahmpIO%SNLIQXY(I,IZ,J,N) + NoahmpIO%SNICEXY(I,IZ,J,N)) + NoahmpIO%MassConcDUST1XY(I,IZ,J,N) = NoahmpIO%DUST1XY(I,IZ,J,N) / (NoahmpIO%SNLIQXY(I,IZ,J,N) + NoahmpIO%SNICEXY(I,IZ,J,N)) + NoahmpIO%MassConcDUST2XY(I,IZ,J,N) = NoahmpIO%DUST2XY(I,IZ,J,N) / (NoahmpIO%SNLIQXY(I,IZ,J,N) + NoahmpIO%SNICEXY(I,IZ,J,N)) + NoahmpIO%MassConcDUST3XY(I,IZ,J,N) = NoahmpIO%DUST3XY(I,IZ,J,N) / (NoahmpIO%SNLIQXY(I,IZ,J,N) + NoahmpIO%SNICEXY(I,IZ,J,N)) + NoahmpIO%MassConcDUST4XY(I,IZ,J,N) = NoahmpIO%DUST4XY(I,IZ,J,N) / (NoahmpIO%SNLIQXY(I,IZ,J,N) + NoahmpIO%SNICEXY(I,IZ,J,N)) + NoahmpIO%MassConcDUST5XY(I,IZ,J,N) = NoahmpIO%DUST5XY(I,IZ,J,N) / (NoahmpIO%SNLIQXY(I,IZ,J,N) + NoahmpIO%SNICEXY(I,IZ,J,N)) + else + NoahmpIO%MassConcBCPHIXY(I,IZ,J,N) = 0.0 + NoahmpIO%MassConcBCPHOXY(I,IZ,J,N) = 0.0 + NoahmpIO%MassConcOCPHIXY(I,IZ,J,N) = 0.0 + NoahmpIO%MassConcOCPHOXY(I,IZ,J,N) = 0.0 + NoahmpIO%MassConcDUST1XY(I,IZ,J,N) = 0.0 + NoahmpIO%MassConcDUST2XY(I,IZ,J,N) = 0.0 + NoahmpIO%MassConcDUST3XY(I,IZ,J,N) = 0.0 + NoahmpIO%MassConcDUST4XY(I,IZ,J,N) = 0.0 + NoahmpIO%MassConcDUST5XY(I,IZ,J,N) = 0.0 + endif + enddo enddo enddo enddo diff --git a/drivers/hrldas/NoahmpMosaicSortTileCatMod.F90 b/drivers/hrldas/NoahmpMosaicSortTileCatMod.F90 new file mode 100644 index 00000000..5cd7ad67 --- /dev/null +++ b/drivers/hrldas/NoahmpMosaicSortTileCatMod.F90 @@ -0,0 +1,152 @@ +module NoahmpMosaicSortTileCatMod + +!!! This module part of NoahMP Mosaic/Subgrid Tiling Scheme +!!! Purpose: To sort and identify most dominant lulc/soiltype/hydro types in a grid +!!! identify dominant that contributed to > 90% grid area and +!!! scale the dominant ones to 100% + +! ------------------------ Code history ----------------------------------- +! Original code : Prasanth Valayamkunnath (IISER Thiruvananthapuram) +! Date : July 10, 2025 +! ------------------------------------------------------------------------- + + use Machine + use NoahmpIOVarType + + implicit none + +contains + +!=== sort landuse/soiltype/hydrotype index based on area fraction and identify most dominant types + + subroutine NoahmpMosaicSortTileCat (NoahmpIO) + + implicit none + + type(NoahmpIO_type), intent(inout) :: NoahmpIO + +!--------------------------------------------------------------------- +! Local Variables +!--------------------------------------------------------------------- + + integer :: i, j, k, m + integer :: max_index + integer :: temp_idx + integer :: n_dominant + integer, allocatable, dimension(:) :: sorted_indices + real(kind=kind_noahmp) :: cumulative_sum + real(kind=kind_noahmp) :: temp_val + real(kind=kind_noahmp), allocatable, dimension(:) :: frac_vec + real(kind=kind_noahmp), allocatable, dimension(:) :: sorted_values + real(kind=kind_noahmp), allocatable, dimension(:) :: rescaled_values +! ------------------------------------------------------------------------- + associate( & + XSTART => NoahmpIO%XSTART ,& + XEND => NoahmpIO%XEND ,& + YSTART => NoahmpIO%YSTART ,& + YEND => NoahmpIO%YEND ,& + NumMosaicCat => noahmpio%NumMosaicCat ,& + SubGrdFrac => NoahmpIO%SubGrdFrac ,& + SubGrdFracRescaled => NoahmpIO%SubGrdFracRescaled ,& + SubGrdIndexSorted => NoahmpIO%SubGrdIndexSorted ,& + NumberOfTiles => NoahmpIO%NumberOfTiles ,& + NTilesMax => NoahmpIO%NTilesMax ,& + NTiles_user => NoahmpIO%IOPT_MOSAIC_NTILES & + ) +! ------------------------------------------------------------------------- + +! Step1: Allocate local vectors + if ( .not. allocated (sorted_indices) ) allocate ( sorted_indices (NumMosaicCat) ) + if ( .not. allocated (frac_vec) ) allocate ( frac_vec (NumMosaicCat) ) + if ( .not. allocated (sorted_values) ) allocate ( sorted_values (NumMosaicCat) ) + if ( .not. allocated (rescaled_values)) allocate ( rescaled_values (NumMosaicCat) ) + + + ! initialize temp variables + temp_val = 0. + NTilesMax = 0 + cumulative_sum = 0. + +! Step 2: Loop over each grid cell (i,j) + do i = XSTART, XEND + do j = YSTART, YEND + + ! Extract fractions and initialize sorting arrays + do k = 1, NumMosaicCat + if (k .eq. NoahmpIO%ISWATER) then ! to skip water fractions in the grid + SubGrdFrac(i,j,k) = 0. + endif + frac_vec(k) = SubGrdFrac(i,j,k) + sorted_indices(k) = k + sorted_values(k) = frac_vec(k) + end do + + ! Sort descending by fraction value (Selection Sort) + do k = 1, NumMosaicCat - 1 + max_index = k + do m = k + 1, NumMosaicCat + if (sorted_values(m) > sorted_values(max_index)) then + max_index = m + end if + end do + + ! Swap values + temp_val = sorted_values(k) + sorted_values(k) = sorted_values(max_index) + sorted_values(max_index) = temp_val + + temp_idx = sorted_indices(k) + sorted_indices(k) = sorted_indices(max_index) + sorted_indices(max_index) = temp_idx + end do + + ! Step 3: Identify dominant types (sum > 0.9) + cumulative_sum = 0.0 + n_dominant = 0 + do k = 1, NumMosaicCat + if (sorted_values(k) == 0) exit + ! Now limit the number of tiles to user defined number from the namelist + if (k <= NTiles_user) then + n_dominant = k + cumulative_sum = cumulative_sum + sorted_values(k) ! + if (cumulative_sum > 0.9) exit + else + exit + endif + end do + + ! Step 4: Rescale selected values to sum to 1 + do k = 1, n_dominant + rescaled_values(k) = sorted_values(k) / cumulative_sum + end do + + !print for diagnosis + !if(i .eq. 450 .and. j .eq. 450) then + ! WRITE(*,'(A,I2,A,I2,A)') 'Grid (', i, ',', j, '): Dominant Land Cover Types (>90% of total)' + ! DO k = 1, n_dominant + ! WRITE(*,'(A,I2,A,F7.4,A,F7.4)') ' Type: ', sorted_indices(k), & + ! ' Original: ', sorted_values(k), ' Rescaled: ', rescaled_values(k) + ! END DO + ! WRITE(*,'(A,F7.4)') ' Sum of Rescaled Fractions: ', SUM(rescaled_values(1:n_dominant)) + ! PRINT *, '-------------------------------------------------------------' + !end if + + if(n_dominant==0)SubGrdIndexSorted(i,j,k) = NoahmpIO%ISWATER + + do k = 1, n_dominant + SubGrdFracRescaled(i,j,k) = rescaled_values(k) + SubGrdIndexSorted(i,j,k) = sorted_indices(k) + NumberOfTiles(i,j) = n_dominant ! it is <= NTiles_user + NTilesMax = min(max(NTilesMax,n_dominant), NTiles_user) ! maximum value across domain + if( (SubGrdFracRescaled(i,j,k)==0) .and. (SubGrdIndexSorted(i,j,k)==0) )then + SubGrdIndexSorted(i,j,k) = NoahmpIO%ISWATER + endif + enddo + end do + end do + + end associate + + end subroutine NoahmpMosaicSortTileCat + +end module NoahmpMosaicSortTileCatMod diff --git a/drivers/hrldas/NoahmpReadNamelistMod.F90 b/drivers/hrldas/NoahmpReadNamelistMod.F90 index 444db52d..b77e6174 100644 --- a/drivers/hrldas/NoahmpReadNamelistMod.F90 +++ b/drivers/hrldas/NoahmpReadNamelistMod.F90 @@ -138,6 +138,13 @@ subroutine NoahmpReadNamelist(NoahmpIO) character(len=256) :: forcing_name_DUST4 = "DUST4" character(len=256) :: forcing_name_DUST5 = "DUST5" + ! NoahMP Mosaic + character(len=256) :: mosaic_fract_name = "LANDUSEF" ! subgrid fraction name (e.g. "LANDUSEF") + integer :: mosaic_scheme_option = 0 ! = 1 for LULC; = 2 for hydrology; = 3 for soiltype + integer :: mosaic_number_of_tiles = 1 ! maximum number of tiles to be considered + integer :: mosaic_write_output = 0 ! write subgrid model states to output + integer :: mosaic_number_of_categories = 21 ! Number of categories as per input data; 21 as per MODIS LULC + namelist / NOAHLSM_OFFLINE / & #ifdef WRF_HYDRO finemesh,finemesh_factor,forc_typ, snow_assim , GEO_STATIC_FLNM, HRLDAS_ini_typ, & @@ -171,7 +178,9 @@ subroutine NoahmpReadNamelist(NoahmpIO) 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 + forcing_name_DUST3, forcing_name_DUST4, forcing_name_DUST5, & + mosaic_scheme_option, mosaic_fract_name, mosaic_number_of_tiles, & + mosaic_write_output, mosaic_number_of_categories !--------------------------------------------------------------- ! Initialize namelist variables to dummy values, so we can tell @@ -380,6 +389,12 @@ subroutine NoahmpReadNamelist(NoahmpIO) NoahmpIO%IOPT_COMPACT = snow_compaction_option NoahmpIO%IOPT_WETLAND = wetland_option NoahmpIO%IOPT_SCF = snow_cover_option + ! NoahMP Mosaic scheme variables + NoahmpIO%IOPT_MOSAIC = mosaic_scheme_option + NoahmpIO%IOPT_MOSAIC_NTILES = mosaic_number_of_tiles + NoahmpIO%IOPT_MOSAIC_OUTPUT = mosaic_write_output + NoahmpIO%SubGrdFracName = mosaic_fract_name + NoahmpIO%NumMosaicCat = mosaic_number_of_categories ! basic model setup variables NoahmpIO%indir = indir NoahmpIO%forcing_timestep = forcing_timestep diff --git a/drivers/hrldas/NoahmpSnowInitMod.F90 b/drivers/hrldas/NoahmpSnowInitMod.F90 index cc5d5a46..fb3f643a 100644 --- a/drivers/hrldas/NoahmpSnowInitMod.F90 +++ b/drivers/hrldas/NoahmpSnowInitMod.F90 @@ -22,7 +22,7 @@ subroutine NoahmpSnowInitMain(NoahmpIO) type(NoahmpIO_type), intent(inout) :: NoahmpIO ! local variables - integer :: I,J,IZ,itf,jtf + integer :: I,J,IZ,itf,jtf,N real(kind=kind_noahmp), dimension(-NoahmpIO%NSNOW+1: 0) :: DZSNO real(kind=kind_noahmp), dimension(-NoahmpIO%NSNOW+1:NoahmpIO%NSOIL) :: DZSNSO @@ -44,89 +44,89 @@ subroutine NoahmpSnowInitMain(NoahmpIO) do J = NoahmpIO%jts, jtf do I = NoahmpIO%its, itf - - ! initialize snow layers and thickness - ! no explicit snow layer - if ( NoahmpIO%SNOWH(I,J) < 0.025 ) then - NoahmpIO%ISNOWXY(I,J) = 0 - DZSNO(-NoahmpIO%NSNOW+1:0) = 0.0 - else - ! 1 layer snow - if ( (NoahmpIO%SNOWH(I,J) >= 0.025) .and. (NoahmpIO%SNOWH(I,J) <= 0.05) ) then - NoahmpIO%ISNOWXY(I,J) = -1 - DZSNO(0) = NoahmpIO%SNOWH(I,J) - ! 2 layer snow - elseif ( (NoahmpIO%SNOWH(I,J) > 0.05) .and. (NoahmpIO%SNOWH(I,J) <= 0.10) ) then - NoahmpIO%ISNOWXY(I,J) = -2 - DZSNO(-1) = NoahmpIO%SNOWH(I,J) / 2.0 - DZSNO( 0) = NoahmpIO%SNOWH(I,J) / 2.0 - ! 2 layer thick snow - elseif ( (NoahmpIO%SNOWH(I,J) > 0.10) .and. (NoahmpIO%SNOWH(I,J) <= 0.25) ) then - NoahmpIO%ISNOWXY(I,J) = -2 - DZSNO(-1) = 0.05 - DZSNO( 0) = NoahmpIO%SNOWH(I,J) - DZSNO(-1) - ! 3 layer snow - elseif ( (NoahmpIO%SNOWH(I,J) > 0.25) .and. (NoahmpIO%SNOWH(I,J) <= 0.45) ) then - NoahmpIO%ISNOWXY(I,J) = -3 - DZSNO(-2) = 0.05 - DZSNO(-1) = 0.5 * (NoahmpIO%SNOWH(I,J)-DZSNO(-2)) - DZSNO( 0) = 0.5 * (NoahmpIO%SNOWH(I,J)-DZSNO(-2)) - ! 3 layer thick snow - elseif ( NoahmpIO%SNOWH(I,J) > 0.45 ) then - NoahmpIO%ISNOWXY(I,J) = -3 - DZSNO(-2) = 0.05 - DZSNO(-1) = 0.20 - DZSNO( 0) = NoahmpIO%SNOWH(I,J) - DZSNO(-1) - DZSNO(-2) + do N=1, NoahmpIO%NumberOfTiles(I,J) + ! initialize snow layers and thickness + ! no explicit snow layer + if ( NoahmpIO%SNOWH(I,J,N) < 0.025 ) then + NoahmpIO%ISNOWXY(I,J,N) = 0 + DZSNO(-NoahmpIO%NSNOW+1:0) = 0.0 else - print*, "Problem with the logic assigning snow layers." - stop + ! 1 layer snow + if ( (NoahmpIO%SNOWH(I,J,N) >= 0.025) .and. (NoahmpIO%SNOWH(I,J,N) <= 0.05) ) then + NoahmpIO%ISNOWXY(I,J,N) = -1 + DZSNO(0) = NoahmpIO%SNOWH(I,J,N) + ! 2 layer snow + elseif ( (NoahmpIO%SNOWH(I,J,N) > 0.05) .and. (NoahmpIO%SNOWH(I,J,N) <= 0.10) ) then + NoahmpIO%ISNOWXY(I,J,N) = -2 + DZSNO(-1) = NoahmpIO%SNOWH(I,J,N) / 2.0 + DZSNO( 0) = NoahmpIO%SNOWH(I,J,N) / 2.0 + ! 2 layer thick snow + elseif ( (NoahmpIO%SNOWH(I,J,N) > 0.10) .and. (NoahmpIO%SNOWH(I,J,N) <= 0.25) ) then + NoahmpIO%ISNOWXY(I,J,N) = -2 + DZSNO(-1) = 0.05 + DZSNO( 0) = NoahmpIO%SNOWH(I,J,N) - DZSNO(-1) + ! 3 layer snow + elseif ( (NoahmpIO%SNOWH(I,J,N) > 0.25) .and. (NoahmpIO%SNOWH(I,J,N) <= 0.45) ) then + NoahmpIO%ISNOWXY(I,J,N) = -3 + DZSNO(-2) = 0.05 + DZSNO(-1) = 0.5 * (NoahmpIO%SNOWH(I,J,N)-DZSNO(-2)) + DZSNO( 0) = 0.5 * (NoahmpIO%SNOWH(I,J,N)-DZSNO(-2)) + ! 3 layer thick snow + elseif ( NoahmpIO%SNOWH(I,J,N) > 0.45 ) then + NoahmpIO%ISNOWXY(I,J,N) = -3 + DZSNO(-2) = 0.05 + DZSNO(-1) = 0.20 + DZSNO( 0) = NoahmpIO%SNOWH(I,J,N) - DZSNO(-1) - DZSNO(-2) + else + print*, "Problem with the logic assigning snow layers." + stop + endif + endif + + ! initialize snow temperatuer and ice/liquid content + NoahmpIO%TSNOXY (I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%SNICEXY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%SNLIQXY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + do IZ = NoahmpIO%ISNOWXY(I,J,N)+1, 0 + NoahmpIO%TSNOXY(I,IZ,J,N) = NoahmpIO%TGXY(I,J,N) + NoahmpIO%SNLIQXY(I,IZ,J,N) = 0.0 + NoahmpIO%SNICEXY(I,IZ,J,N) = 1.0 * DZSNO(IZ) * (NoahmpIO%SNOW(I,J,N)/NoahmpIO%SNOWH(I,J,N)) + enddo + + ! Assign local variable DZSNSO, the soil/snow layer thicknesses, for snow layers + do IZ = NoahmpIO%ISNOWXY(I,J,N)+1, 0 + DZSNSO(IZ) = -DZSNO(IZ) + enddo + + ! Assign local variable DZSNSO, the soil/snow layer thicknesses, for soil layers + DZSNSO(1) = NoahmpIO%ZSOIL(1) + do IZ = 2, NoahmpIO%NSOIL + DZSNSO(IZ) = NoahmpIO%ZSOIL(IZ) - NoahmpIO%ZSOIL(IZ-1) + enddo + + ! Assign ZSNSOXY, the layer depths, for soil and snow layers + NoahmpIO%ZSNSOXY(I,NoahmpIO%ISNOWXY(I,J,N)+1,J,N) = DZSNSO(NoahmpIO%ISNOWXY(I,J,N)+1) + do IZ = NoahmpIO%ISNOWXY(I,J,N)+2, NoahmpIO%NSOIL + NoahmpIO%ZSNSOXY(I,IZ,J,N) = NoahmpIO%ZSNSOXY(I,IZ-1,J,N) + DZSNSO(IZ) + enddo + + ! SNICAR + if ( NoahmpIO%IOPT_ALB == 3 )then + NoahmpIO%SNRDSXY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%SNFRXY (I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%BCPHIXY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%BCPHOXY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%OCPHIXY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%OCPHOXY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%DUST1XY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%DUST2XY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%DUST3XY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%DUST4XY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 + NoahmpIO%DUST5XY(I,-NoahmpIO%NSNOW+1:0,J,N) = 0.0 endif - endif - - ! initialize snow temperatuer and ice/liquid content - NoahmpIO%TSNOXY (I,-NoahmpIO%NSNOW+1:0,J) = 0.0 - NoahmpIO%SNICEXY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 - NoahmpIO%SNLIQXY(I,-NoahmpIO%NSNOW+1:0,J) = 0.0 - do IZ = NoahmpIO%ISNOWXY(I,J)+1, 0 - NoahmpIO%TSNOXY(I,IZ,J) = NoahmpIO%TGXY(I,J) - NoahmpIO%SNLIQXY(I,IZ,J) = 0.0 - NoahmpIO%SNICEXY(I,IZ,J) = 1.0 * DZSNO(IZ) * (NoahmpIO%SNOW(I,J)/NoahmpIO%SNOWH(I,J)) - enddo - - ! Assign local variable DZSNSO, the soil/snow layer thicknesses, for snow layers - do IZ = NoahmpIO%ISNOWXY(I,J)+1, 0 - DZSNSO(IZ) = -DZSNO(IZ) - enddo - - ! Assign local variable DZSNSO, the soil/snow layer thicknesses, for soil layers - DZSNSO(1) = NoahmpIO%ZSOIL(1) - do IZ = 2, NoahmpIO%NSOIL - DZSNSO(IZ) = NoahmpIO%ZSOIL(IZ) - NoahmpIO%ZSOIL(IZ-1) - enddo - - ! Assign ZSNSOXY, the layer depths, for soil and snow layers - NoahmpIO%ZSNSOXY(I,NoahmpIO%ISNOWXY(I,J)+1,J) = DZSNSO(NoahmpIO%ISNOWXY(I,J)+1) - do IZ = NoahmpIO%ISNOWXY(I,J)+2, NoahmpIO%NSOIL - 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 + enddo ! N + enddo ! I + enddo ! J end subroutine NoahmpSnowInitMain diff --git a/drivers/hrldas/WaterVarInTransferMod.F90 b/drivers/hrldas/WaterVarInTransferMod.F90 index 3ecdae39..f801de40 100644 --- a/drivers/hrldas/WaterVarInTransferMod.F90 +++ b/drivers/hrldas/WaterVarInTransferMod.F90 @@ -37,6 +37,7 @@ subroutine WaterVarInTransfer(noahmp, NoahmpIO) associate( & I => noahmp%config%domain%GridIndexI ,& J => noahmp%config%domain%GridIndexJ ,& + N => NoahmpIO%N ,& NumSnowLayerMax => noahmp%config%domain%NumSnowLayerMax ,& NumSoilLayer => noahmp%config%domain%NumSoilLayer ,& VegType => noahmp%config%domain%VegType ,& @@ -48,38 +49,38 @@ subroutine WaterVarInTransfer(noahmp, NoahmpIO) ! ------------------------------------------------------------------------- ! water state variables - noahmp%water%state%CanopyLiqWater = NoahmpIO%CANLIQXY (I,J) - noahmp%water%state%CanopyIce = NoahmpIO%CANICEXY (I,J) - noahmp%water%state%CanopyWetFrac = NoahmpIO%FWETXY (I,J) - noahmp%water%state%SnowWaterEquiv = NoahmpIO%SNOW (I,J) - noahmp%water%state%SnowWaterEquivPrev = NoahmpIO%SNEQVOXY (I,J) - noahmp%water%state%SnowDepth = NoahmpIO%SNOWH (I,J) + noahmp%water%state%CanopyLiqWater = NoahmpIO%CANLIQXY (I,J,N) + noahmp%water%state%CanopyIce = NoahmpIO%CANICEXY (I,J,N) + noahmp%water%state%CanopyWetFrac = NoahmpIO%FWETXY (I,J,N) + noahmp%water%state%SnowWaterEquiv = NoahmpIO%SNOW (I,J,N) + noahmp%water%state%SnowWaterEquivPrev = NoahmpIO%SNEQVOXY (I,J,N) + noahmp%water%state%SnowDepth = NoahmpIO%SNOWH (I,J,N) noahmp%water%state%IrrigationFracFlood = NoahmpIO%FIFRACT (I,J) - noahmp%water%state%IrrigationAmtFlood = NoahmpIO%IRWATFI (I,J) + noahmp%water%state%IrrigationAmtFlood = NoahmpIO%IRWATFI (I,J,N) noahmp%water%state%IrrigationFracMicro = NoahmpIO%MIFRACT (I,J) - noahmp%water%state%IrrigationAmtMicro = NoahmpIO%IRWATMI (I,J) + noahmp%water%state%IrrigationAmtMicro = NoahmpIO%IRWATMI (I,J,N) noahmp%water%state%IrrigationFracSprinkler = NoahmpIO%SIFRACT (I,J) - noahmp%water%state%IrrigationAmtSprinkler = NoahmpIO%IRWATSI (I,J) - noahmp%water%state%WaterTableDepth = NoahmpIO%ZWTXY (I,J) - noahmp%water%state%SoilMoistureToWT = NoahmpIO%SMCWTDXY (I,J) + noahmp%water%state%IrrigationAmtSprinkler = NoahmpIO%IRWATSI (I,J,N) + noahmp%water%state%WaterTableDepth = NoahmpIO%ZWTXY (I,J,N) + noahmp%water%state%SoilMoistureToWT = NoahmpIO%SMCWTDXY (I,J,N) noahmp%water%state%TileDrainFrac = NoahmpIO%TD_FRACTION(I,J) - noahmp%water%state%WaterStorageAquifer = NoahmpIO%WAXY (I,J) - noahmp%water%state%WaterStorageSoilAqf = NoahmpIO%WTXY (I,J) - noahmp%water%state%WaterStorageLake = NoahmpIO%WSLAKEXY (I,J) + noahmp%water%state%WaterStorageAquifer = NoahmpIO%WAXY (I,J,N) + noahmp%water%state%WaterStorageSoilAqf = NoahmpIO%WTXY (I,J,N) + noahmp%water%state%WaterStorageLake = NoahmpIO%WSLAKEXY (I,J,N) noahmp%water%state%IrrigationFracGrid = NoahmpIO%IRFRACT (I,J) - noahmp%water%state%IrrigationCntSprinkler = NoahmpIO%IRNUMSI (I,J) - noahmp%water%state%IrrigationCntMicro = NoahmpIO%IRNUMMI (I,J) - noahmp%water%state%IrrigationCntFlood = NoahmpIO%IRNUMFI (I,J) - noahmp%water%state%SnowIce (-NumSnowLayerMax+1:0) = NoahmpIO%SNICEXY (I,-NumSnowLayerMax+1:0,J) - noahmp%water%state%SnowLiqWater(-NumSnowLayerMax+1:0) = NoahmpIO%SNLIQXY (I,-NumSnowLayerMax+1:0,J) - noahmp%water%state%SoilLiqWater (1:NumSoilLayer) = NoahmpIO%SH2O (I,1:NumSoilLayer,J) - noahmp%water%state%SoilMoisture (1:NumSoilLayer) = NoahmpIO%SMOIS (I,1:NumSoilLayer,J) - noahmp%water%state%SoilMoistureEqui (1:NumSoilLayer) = NoahmpIO%SMOISEQ (I,1:NumSoilLayer,J) + noahmp%water%state%IrrigationCntSprinkler = NoahmpIO%IRNUMSI (I,J,N) + noahmp%water%state%IrrigationCntMicro = NoahmpIO%IRNUMMI (I,J,N) + noahmp%water%state%IrrigationCntFlood = NoahmpIO%IRNUMFI (I,J,N) + noahmp%water%state%SnowIce (-NumSnowLayerMax+1:0) = NoahmpIO%SNICEXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%SnowLiqWater(-NumSnowLayerMax+1:0) = NoahmpIO%SNLIQXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%SoilLiqWater (1:NumSoilLayer) = NoahmpIO%SH2O (I,1:NumSoilLayer,J,N) + noahmp%water%state%SoilMoisture (1:NumSoilLayer) = NoahmpIO%SMOIS (I,1:NumSoilLayer,J,N) + noahmp%water%state%SoilMoistureEqui (1:NumSoilLayer) = NoahmpIO%SMOISEQ (I,1:NumSoilLayer,J,N) 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) + noahmp%water%state%SoilSaturateFrac = NoahmpIO%FSATXY (I,J,N) + noahmp%water%state%WaterStorageWetland = NoahmpIO%WSURFXY (I,J,N) endif #ifdef WRF_HYDRO noahmp%water%state%WaterTableHydro = NoahmpIO%ZWATBLE2D (I,J) @@ -87,41 +88,41 @@ subroutine WaterVarInTransfer(noahmp, NoahmpIO) #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) + noahmp%water%state%SnowRadius (-NumSnowLayerMax+1:0) = NoahmpIO%SNRDSXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassBChydrophi(-NumSnowLayerMax+1:0) = NoahmpIO%BCPHIXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassBChydropho(-NumSnowLayerMax+1:0) = NoahmpIO%BCPHOXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassOChydrophi(-NumSnowLayerMax+1:0) = NoahmpIO%OCPHIXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassOChydropho(-NumSnowLayerMax+1:0) = NoahmpIO%OCPHOXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassDust1(-NumSnowLayerMax+1:0) = NoahmpIO%DUST1XY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassDust2(-NumSnowLayerMax+1:0) = NoahmpIO%DUST2XY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassDust3(-NumSnowLayerMax+1:0) = NoahmpIO%DUST3XY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassDust4(-NumSnowLayerMax+1:0) = NoahmpIO%DUST4XY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassDust5(-NumSnowLayerMax+1:0) = NoahmpIO%DUST5XY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassConcBChydrophi(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcBCPHIXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassConcBChydropho(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcBCPHOXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassConcOChydrophi(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcOCPHIXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassConcOChydropho(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcOCPHOXY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassConcDust1(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcDUST1XY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassConcDust2(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcDUST2XY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassConcDust3(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcDUST3XY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassConcDust4(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcDUST4XY (I,-NumSnowLayerMax+1:0,J,N) + noahmp%water%state%MassConcDust5(-NumSnowLayerMax+1:0) = NoahmpIO%MassConcDUST5XY (I,-NumSnowLayerMax+1:0,J,N) endif ! water flux variables - noahmp%water%flux%EvapSoilSfcLiqAcc = NoahmpIO%ACC_QSEVAXY (I,J) - noahmp%water%flux%SoilSfcInflowAcc = NoahmpIO%ACC_QINSURXY(I,J) - noahmp%water%flux%SfcWaterTotChgAcc = NoahmpIO%ACC_DWATERXY(I,J) - noahmp%water%flux%PrecipTotAcc = NoahmpIO%ACC_PRCPXY (I,J) - noahmp%water%flux%EvapCanopyNetAcc = NoahmpIO%ACC_ECANXY (I,J) - 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) + noahmp%water%flux%EvapSoilSfcLiqAcc = NoahmpIO%ACC_QSEVAXY (I,J,N) + noahmp%water%flux%SoilSfcInflowAcc = NoahmpIO%ACC_QINSURXY(I,J,N) + noahmp%water%flux%SfcWaterTotChgAcc = NoahmpIO%ACC_DWATERXY(I,J,N) + noahmp%water%flux%PrecipTotAcc = NoahmpIO%ACC_PRCPXY (I,J,N) + noahmp%water%flux%EvapCanopyNetAcc = NoahmpIO%ACC_ECANXY (I,J,N) + noahmp%water%flux%TranspirationAcc = NoahmpIO%ACC_ETRANXY (I,J,N) + noahmp%water%flux%EvapGroundNetAcc = NoahmpIO%ACC_EDIRXY (I,J,N) + noahmp%water%flux%TranspWatLossSoilAcc(1:NumSoilLayer)= NoahmpIO%ACC_ETRANIXY(I,1:NumSoilLayer,J,N) + noahmp%water%flux%GlacierExcessFlowAcc = NoahmpIO%ACC_GLAFLWXY(I,J,N) ! SNICAR if ( noahmp%config%nmlist%OptSnowAlbedo == 3 ) then - noahmp%water%flux%SnowFreezeRate(-NumSnowLayerMax+1:0) = NoahmpIO%SNFRXY(I,-NumSnowLayerMax+1:0,J) + noahmp%water%flux%SnowFreezeRate(-NumSnowLayerMax+1:0) = NoahmpIO%SNFRXY(I,-NumSnowLayerMax+1:0,J,N) endif @@ -270,8 +271,8 @@ subroutine WaterVarInTransfer(noahmp, NoahmpIO) ! 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) + noahmp%water%param%SoilSfcSatFracMax = NoahmpIO%FSATMX(I,J,N) + noahmp%water%param%WetlandCapMax = NoahmpIO%WCAP(I,J,N) endif ! derived water parameters @@ -292,9 +293,9 @@ subroutine WaterVarInTransfer(noahmp, NoahmpIO) endif noahmp%water%state%SnowIceFracPrev = 0.0 - noahmp%water%state%SnowIceFracPrev(NumSnowLayerNeg+1:0) = NoahmpIO%SNICEXY(I,NumSnowLayerNeg+1:0,J) / & - (NoahmpIO%SNICEXY(I,NumSnowLayerNeg+1:0,J) + & - NoahmpIO%SNLIQXY(I,NumSnowLayerNeg+1:0,J)) + noahmp%water%state%SnowIceFracPrev(NumSnowLayerNeg+1:0) = NoahmpIO%SNICEXY(I,NumSnowLayerNeg+1:0,J,N) / & + (NoahmpIO%SNICEXY(I,NumSnowLayerNeg+1:0,J,N) + & + NoahmpIO%SNLIQXY(I,NumSnowLayerNeg+1:0,J,N)) if ( (noahmp%config%nmlist%OptSoilProperty == 3) .and. (.not. noahmp%config%domain%FlagUrban) ) then if (.not. allocated(SoilSand)) allocate( SoilSand(1:NumSoilLayer) ) diff --git a/drivers/hrldas/WaterVarOutTransferMod.F90 b/drivers/hrldas/WaterVarOutTransferMod.F90 index b404bd31..6155a58b 100644 --- a/drivers/hrldas/WaterVarOutTransferMod.F90 +++ b/drivers/hrldas/WaterVarOutTransferMod.F90 @@ -28,6 +28,7 @@ subroutine WaterVarOutTransfer(noahmp, NoahmpIO) associate( & I => noahmp%config%domain%GridIndexI ,& J => noahmp%config%domain%GridIndexJ ,& + N => NoahmpIO%N ,& NumSnowLayerMax => noahmp%config%domain%NumSnowLayerMax ,& NumSoilLayer => noahmp%config%domain%NumSoilLayer ,& IndicatorIceSfc => noahmp%config%domain%IndicatorIceSfc & @@ -56,118 +57,119 @@ 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,N) = noahmp%water%flux%EvapGroundNet endif if ( IndicatorIceSfc == 0 ) then ! land soil point - NoahmpIO%QFX(I,J) = noahmp%water%flux%EvapCanopyNet + noahmp%water%flux%EvapGroundNet + & - noahmp%water%flux%Transpiration + noahmp%water%flux%EvapIrriSprinkler + NoahmpIO%QFX(I,J,N) = noahmp%water%flux%EvapCanopyNet + noahmp%water%flux%EvapGroundNet + & + noahmp%water%flux%Transpiration + noahmp%water%flux%EvapIrriSprinkler endif - NoahmpIO%SMSTAV (I,J) = 0.0 ! [maintained as Noah consistency] water - NoahmpIO%SMSTOT (I,J) = 0.0 ! [maintained as Noah consistency] water - NoahmpIO%SFCRUNOFF (I,J) = NoahmpIO%SFCRUNOFF(I,J) + noahmp%water%flux%RunoffSurface - NoahmpIO%UDRUNOFF (I,J) = NoahmpIO%UDRUNOFF (I,J) + noahmp%water%flux%RunoffSubsurface - NoahmpIO%QTDRAIN (I,J) = NoahmpIO%QTDRAIN (I,J) + noahmp%water%flux%TileDrain - NoahmpIO%SNOWC (I,J) = noahmp%water%state%SnowCoverFrac - 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 - NoahmpIO%CANLIQXY (I,J) = noahmp%water%state%CanopyLiqWater - NoahmpIO%CANICEXY (I,J) = noahmp%water%state%CanopyIce - NoahmpIO%FWETXY (I,J) = noahmp%water%state%CanopyWetFrac - NoahmpIO%SNEQVOXY (I,J) = noahmp%water%state%SnowWaterEquivPrev - NoahmpIO%QSNOWXY (I,J) = noahmp%water%flux%SnowfallGround - NoahmpIO%QRAINXY (I,J) = noahmp%water%flux%RainfallGround - NoahmpIO%WSLAKEXY (I,J) = noahmp%water%state%WaterStorageLake - NoahmpIO%ZWTXY (I,J) = noahmp%water%state%WaterTableDepth - NoahmpIO%WAXY (I,J) = noahmp%water%state%WaterStorageAquifer - NoahmpIO%WTXY (I,J) = noahmp%water%state%WaterStorageSoilAqf - NoahmpIO%RUNSFXY (I,J) = noahmp%water%flux%RunoffSurface - NoahmpIO%RUNSBXY (I,J) = noahmp%water%flux%RunoffSubsurface - NoahmpIO%ECANXY (I,J) = noahmp%water%flux%EvapCanopyNet - NoahmpIO%EDIRXY (I,J) = noahmp%water%flux%EvapGroundNet - NoahmpIO%ETRANXY (I,J) = noahmp%water%flux%Transpiration - NoahmpIO%QINTSXY (I,J) = noahmp%water%flux%InterceptCanopySnow - NoahmpIO%QINTRXY (I,J) = noahmp%water%flux%InterceptCanopyRain - NoahmpIO%QDRIPSXY (I,J) = noahmp%water%flux%DripCanopySnow - NoahmpIO%QDRIPRXY (I,J) = noahmp%water%flux%DripCanopyRain - NoahmpIO%QTHROSXY (I,J) = noahmp%water%flux%ThroughfallSnow - NoahmpIO%QTHRORXY (I,J) = noahmp%water%flux%ThroughfallRain - NoahmpIO%QSNSUBXY (I,J) = noahmp%water%flux%SublimSnowSfcIce - NoahmpIO%QSNFROXY (I,J) = noahmp%water%flux%FrostSnowSfcIce - NoahmpIO%QSUBCXY (I,J) = noahmp%water%flux%SublimCanopyIce - NoahmpIO%QFROCXY (I,J) = noahmp%water%flux%FrostCanopyIce - NoahmpIO%QEVACXY (I,J) = noahmp%water%flux%EvapCanopyLiq - NoahmpIO%QDEWCXY (I,J) = noahmp%water%flux%DewCanopyLiq - NoahmpIO%QFRZCXY (I,J) = noahmp%water%flux%FreezeCanopyLiq - NoahmpIO%QMELTCXY (I,J) = noahmp%water%flux%MeltCanopyIce - NoahmpIO%QSNBOTXY (I,J) = noahmp%water%flux%SnowBotOutflow - NoahmpIO%QMELTXY (I,J) = noahmp%water%flux%MeltGroundSnow - NoahmpIO%PONDINGXY (I,J) = noahmp%water%state%PondSfcThinSnwTrans + & - noahmp%water%state%PondSfcThinSnwComb + noahmp%water%state%PondSfcThinSnwMelt - NoahmpIO%FPICEXY (I,J) = noahmp%water%state%FrozenPrecipFrac - NoahmpIO%RAINLSM (I,J) = noahmp%water%flux%RainfallRefHeight - NoahmpIO%SNOWLSM (I,J) = noahmp%water%flux%SnowfallRefHeight - NoahmpIO%ACC_QINSURXY(I,J) = noahmp%water%flux%SoilSfcInflowAcc - NoahmpIO%ACC_QSEVAXY (I,J) = noahmp%water%flux%EvapSoilSfcLiqAcc - NoahmpIO%ACC_DWATERXY(I,J) = noahmp%water%flux%SfcWaterTotChgAcc - NoahmpIO%ACC_PRCPXY (I,J) = noahmp%water%flux%PrecipTotAcc - 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 - NoahmpIO%SMOIS (I,1:NumSoilLayer,J) = noahmp%water%state%SoilMoisture(1:NumSoilLayer) - NoahmpIO%SH2O (I,1:NumSoilLayer,J) = noahmp%water%state%SoilLiqWater(1:NumSoilLayer) - NoahmpIO%ACC_ETRANIXY(I,1:NumSoilLayer,J) = noahmp%water%flux%TranspWatLossSoilAcc(1:NumSoilLayer) - 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) + NoahmpIO%SMSTAV (I,J,N) = 0.0 ! [maintained as Noah consistency] water + NoahmpIO%SMSTOT (I,J,N) = 0.0 ! [maintained as Noah consistency] water + NoahmpIO%SFCRUNOFF (I,J,N) = NoahmpIO%SFCRUNOFF(I,J,N) + noahmp%water%flux%RunoffSurface + NoahmpIO%UDRUNOFF (I,J,N) = NoahmpIO%UDRUNOFF (I,J,N) + noahmp%water%flux%RunoffSubsurface + NoahmpIO%QTDRAIN (I,J,N) = NoahmpIO%QTDRAIN (I,J,N) + noahmp%water%flux%TileDrain + NoahmpIO%SNOWC (I,J,N) = noahmp%water%state%SnowCoverFrac + NoahmpIO%SNOW (I,J,N) = noahmp%water%state%SnowWaterEquiv + NoahmpIO%SNOWH (I,J,N) = noahmp%water%state%SnowDepth + NoahmpIO%CANWAT (I,J,N) = noahmp%water%state%CanopyLiqWater + noahmp%water%state%CanopyIce + NoahmpIO%ACSNOW (I,J,N) = NoahmpIO%ACSNOW(I,J,N) + NoahmpIO%RAINBL (I,J) * noahmp%water%state%FrozenPrecipFrac + NoahmpIO%ACSNOM (I,J,N) = NoahmpIO%ACSNOM(I,J,N) + noahmp%water%flux%MeltGroundSnow * NoahmpIO%DTBL + NoahmpIO%CANLIQXY (I,J,N) = noahmp%water%state%CanopyLiqWater + NoahmpIO%CANICEXY (I,J,N) = noahmp%water%state%CanopyIce + NoahmpIO%FWETXY (I,J,N) = noahmp%water%state%CanopyWetFrac + NoahmpIO%SNEQVOXY (I,J,N) = noahmp%water%state%SnowWaterEquivPrev + NoahmpIO%QSNOWXY (I,J,N) = noahmp%water%flux%SnowfallGround + NoahmpIO%QRAINXY (I,J,N) = noahmp%water%flux%RainfallGround + NoahmpIO%WSLAKEXY (I,J,N) = noahmp%water%state%WaterStorageLake + NoahmpIO%ZWTXY (I,J,N) = noahmp%water%state%WaterTableDepth + NoahmpIO%WAXY (I,J,N) = noahmp%water%state%WaterStorageAquifer + NoahmpIO%WTXY (I,J,N) = noahmp%water%state%WaterStorageSoilAqf + NoahmpIO%RUNSFXY (I,J,N) = noahmp%water%flux%RunoffSurface + NoahmpIO%RUNSBXY (I,J,N) = noahmp%water%flux%RunoffSubsurface + NoahmpIO%ECANXY (I,J,N) = noahmp%water%flux%EvapCanopyNet + NoahmpIO%EDIRXY (I,J,N) = noahmp%water%flux%EvapGroundNet + NoahmpIO%ETRANXY (I,J,N) = noahmp%water%flux%Transpiration + NoahmpIO%QINTSXY (I,J,N) = noahmp%water%flux%InterceptCanopySnow + NoahmpIO%QINTRXY (I,J,N) = noahmp%water%flux%InterceptCanopyRain + NoahmpIO%QDRIPSXY (I,J,N) = noahmp%water%flux%DripCanopySnow + NoahmpIO%QDRIPRXY (I,J,N) = noahmp%water%flux%DripCanopyRain + NoahmpIO%QTHROSXY (I,J,N) = noahmp%water%flux%ThroughfallSnow + NoahmpIO%QTHRORXY (I,J,N) = noahmp%water%flux%ThroughfallRain + NoahmpIO%QSNSUBXY (I,J,N) = noahmp%water%flux%SublimSnowSfcIce + NoahmpIO%QSNFROXY (I,J,N) = noahmp%water%flux%FrostSnowSfcIce + NoahmpIO%QSUBCXY (I,J,N) = noahmp%water%flux%SublimCanopyIce + NoahmpIO%QFROCXY (I,J,N) = noahmp%water%flux%FrostCanopyIce + NoahmpIO%QEVACXY (I,J,N) = noahmp%water%flux%EvapCanopyLiq + NoahmpIO%QDEWCXY (I,J,N) = noahmp%water%flux%DewCanopyLiq + NoahmpIO%QFRZCXY (I,J,N) = noahmp%water%flux%FreezeCanopyLiq + NoahmpIO%QMELTCXY (I,J,N) = noahmp%water%flux%MeltCanopyIce + NoahmpIO%QSNBOTXY (I,J,N) = noahmp%water%flux%SnowBotOutflow + NoahmpIO%QMELTXY (I,J,N) = noahmp%water%flux%MeltGroundSnow + NoahmpIO%PONDINGXY (I,J,N) = noahmp%water%state%PondSfcThinSnwTrans + & + noahmp%water%state%PondSfcThinSnwComb + & + noahmp%water%state%PondSfcThinSnwMelt + NoahmpIO%FPICEXY (I,J,N) = noahmp%water%state%FrozenPrecipFrac + NoahmpIO%RAINLSM (I,J,N) = noahmp%water%flux%RainfallRefHeight + NoahmpIO%SNOWLSM (I,J,N) = noahmp%water%flux%SnowfallRefHeight + NoahmpIO%ACC_QINSURXY(I,J,N) = noahmp%water%flux%SoilSfcInflowAcc + NoahmpIO%ACC_QSEVAXY (I,J,N) = noahmp%water%flux%EvapSoilSfcLiqAcc + NoahmpIO%ACC_DWATERXY(I,J,N) = noahmp%water%flux%SfcWaterTotChgAcc + NoahmpIO%ACC_PRCPXY (I,J,N) = noahmp%water%flux%PrecipTotAcc + NoahmpIO%ACC_ECANXY (I,J,N) = noahmp%water%flux%EvapCanopyNetAcc + NoahmpIO%ACC_ETRANXY (I,J,N) = noahmp%water%flux%TranspirationAcc + NoahmpIO%ACC_EDIRXY (I,J,N) = noahmp%water%flux%EvapGroundNetAcc + NoahmpIO%ACC_GLAFLWXY(I,J,N) = noahmp%water%flux%GlacierExcessFlowAcc + NoahmpIO%RECHXY (I,J,N) = NoahmpIO%RECHXY(I,J,N) + (noahmp%water%state%RechargeGwShallowWT*1.0e3) + NoahmpIO%DEEPRECHXY (I,J,N) = NoahmpIO%DEEPRECHXY(I,J,N) + noahmp%water%state%RechargeGwDeepWT + NoahmpIO%SMCWTDXY (I,J,N) = noahmp%water%state%SoilMoistureToWT + NoahmpIO%SMOIS (I,1:NumSoilLayer,J,N) = noahmp%water%state%SoilMoisture(1:NumSoilLayer) + NoahmpIO%SH2O (I,1:NumSoilLayer,J,N) = noahmp%water%state%SoilLiqWater(1:NumSoilLayer) + NoahmpIO%ACC_ETRANIXY(I,1:NumSoilLayer,J,N) = noahmp%water%flux%TranspWatLossSoilAcc(1:NumSoilLayer) + NoahmpIO%SNICEXY (I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%SnowIce(-NumSnowLayerMax+1:0) + NoahmpIO%SNLIQXY (I,-NumSnowLayerMax+1:0,J,N) = 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) + NoahmpIO%SNRDSXY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%SnowRadius(-NumSnowLayerMax+1:0) + NoahmpIO%SNFRXY (I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%flux%SnowFreezeRate(-NumSnowLayerMax+1:0) + NoahmpIO%BCPHIXY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassBChydrophi(-NumSnowLayerMax+1:0) + NoahmpIO%BCPHOXY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassBChydropho(-NumSnowLayerMax+1:0) + NoahmpIO%OCPHIXY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassOChydrophi(-NumSnowLayerMax+1:0) + NoahmpIO%OCPHOXY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassOChydropho(-NumSnowLayerMax+1:0) + NoahmpIO%DUST1XY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassDust1(-NumSnowLayerMax+1:0) + NoahmpIO%DUST2XY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassDust2(-NumSnowLayerMax+1:0) + NoahmpIO%DUST3XY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassDust3(-NumSnowLayerMax+1:0) + NoahmpIO%DUST4XY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassDust4(-NumSnowLayerMax+1:0) + NoahmpIO%DUST5XY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassDust5(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcBCPHIXY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassConcBChydrophi(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcBCPHOXY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassConcBChydropho(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcOCPHIXY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassConcOChydrophi(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcOCPHOXY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassConcOChydropho(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcDUST1XY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassConcDust1(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcDUST2XY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassConcDust2(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcDUST3XY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassConcDust3(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcDUST4XY(I,-NumSnowLayerMax+1:0,J,N) = noahmp%water%state%MassConcDust4(-NumSnowLayerMax+1:0) + NoahmpIO%MassConcDUST5XY(I,-NumSnowLayerMax+1:0,J,N) = 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,N) = noahmp%water%state%IrrigationCntSprinkler + NoahmpIO%IRNUMMI(I,J,N) = noahmp%water%state%IrrigationCntMicro + NoahmpIO%IRNUMFI(I,J,N) = noahmp%water%state%IrrigationCntFlood + NoahmpIO%IRWATSI(I,J,N) = noahmp%water%state%IrrigationAmtSprinkler + NoahmpIO%IRWATMI(I,J,N) = noahmp%water%state%IrrigationAmtMicro + NoahmpIO%IRWATFI(I,J,N) = noahmp%water%state%IrrigationAmtFlood + NoahmpIO%IRSIVOL(I,J,N) = NoahmpIO%IRSIVOL(I,J,N) + (noahmp%water%flux%IrrigationRateSprinkler*1000.0) + NoahmpIO%IRMIVOL(I,J,N) = NoahmpIO%IRMIVOL(I,J,N) + (noahmp%water%flux%IrrigationRateMicro*1000.0) + NoahmpIO%IRFIVOL(I,J,N) = NoahmpIO%IRFIVOL(I,J,N) + (noahmp%water%flux%IrrigationRateFlood*1000.0) + NoahmpIO%IRELOSS(I,J,N) = NoahmpIO%IRELOSS(I,J,N) + (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 + NoahmpIO%WSURFXY(I,J,N) = noahmp%water%state%WaterStorageWetland + NoahmpIO%FSATXY (I,J,N) = noahmp%water%state%SoilSaturateFrac endif #ifdef WRF_HYDRO diff --git a/src/GroundWaterMmfMod.F90 b/src/GroundWaterMmfMod.F90 index b58f4b33..f304d1ba 100644 --- a/src/GroundWaterMmfMod.F90 +++ b/src/GroundWaterMmfMod.F90 @@ -21,87 +21,81 @@ module GroundWaterMmfMod contains - subroutine WTABLE_mmf_noahmp (NoahmpIO ,NSOIL ,XLAND ,XICE ,XICE_THRESHOLD,& - ISICE ,ISLTYP ,SMOISEQ ,DZS ,WTDDT ,& !in - FDEPTH ,AREA ,TOPO ,ISURBAN ,IVGTYP ,& !in - RIVERCOND ,RIVERBED ,EQWTD ,PEXP ,& !in - SMOIS ,SH2OXY ,SMCWTD ,WTD , QLAT, QRF ,& !inout - DEEPRECH ,QSPRING ,QSLAT ,QRFS ,QSPRINGS ,RECH ,& !inout - ids,ide, jds,jde, kds,kde, & - ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte ) + subroutine WTABLE_mmf_noahmp (NoahmpIO) ! ---------------------------------------------------------------------- -! USE NOAHMP_TABLES, ONLY: BEXP_TABLE, DKSAT_TABLE, SMCMAX_TABLE,PSISAT_TABLE, SMCWLT_TABLE -! ---------------------------------------------------------------------- - IMPLICIT NONE + implicit none ! ---------------------------------------------------------------------- ! IN only - type(NoahmpIO_type), intent(in) :: NoahmpIO - - INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde, & - & ims,ime, jms,jme, kms,kme, & - & its,ite, jts,jte, kts,kte - REAL(kind=kind_noahmp), INTENT(IN) :: WTDDT - REAL(kind=kind_noahmp), INTENT(IN) :: XICE_THRESHOLD - INTEGER, INTENT(IN ) :: ISICE - REAL(kind=kind_noahmp), DIMENSION( ims:ime, jms:jme ) , & - & INTENT(IN ) :: XLAND, & - XICE - INTEGER, DIMENSION( ims:ime, jms:jme ) , & - INTENT(IN ) :: ISLTYP, & - IVGTYP - INTEGER, INTENT(IN) :: nsoil - INTEGER, INTENT(IN) :: ISURBAN - REAL(kind=kind_noahmp), DIMENSION( ims:ime , 1:nsoil, jms:jme ), & - & INTENT(IN) :: SMOISEQ - REAL(kind=kind_noahmp), DIMENSION(1:nsoil), INTENT(IN) :: DZS - REAL(kind=kind_noahmp), DIMENSION( ims:ime, jms:jme ) , & - & INTENT(IN) :: FDEPTH, & - AREA, & - TOPO, & - EQWTD, & - PEXP, & - RIVERBED, & - RIVERCOND - -! IN and OUT - - REAL(kind=kind_noahmp), DIMENSION( ims:ime , 1:nsoil, jms:jme ), & - & INTENT(INOUT) :: SMOIS, & - & SH2OXY - - - REAL(kind=kind_noahmp), DIMENSION( ims:ime, jms:jme ) , & - & INTENT(INOUT) :: WTD, & - SMCWTD, & - DEEPRECH, & - QSLAT, & - QRFS, & - QSPRINGS, & - RECH - -!OUT - - REAL(kind=kind_noahmp), DIMENSION( ims:ime, jms:jme ) , & - & INTENT(OUT) :: QRF, & !groundwater - river water flux - QSPRING !water springing at the surface from groundwater convergence in the column + type(NoahmpIO_type), intent(inout) :: NoahmpIO !LOCAL - INTEGER :: I,J,K - REAL(kind=kind_noahmp), DIMENSION( 0:NSOIL) :: ZSOIL !depth of soil layer-bottom [m] - REAL(kind=kind_noahmp), DIMENSION( 1:NSOIL) :: SMCEQ !equilibrium soil water content [m3/m3] - REAL(kind=kind_noahmp), DIMENSION( 1:NSOIL) :: SMC,SH2O - REAL(kind=kind_noahmp) :: DELTAT,RCOND,TOTWATER,PSI & - ,WFLUXDEEP,WCNDDEEP,DDZ,SMCWTDMID & - ,WPLUS,WMINUS - REAL(kind=kind_noahmp), DIMENSION( ims:ime, jms:jme ), INTENT(OUT) :: QLAT - INTEGER, DIMENSION( ims:ime, jms:jme ) :: LANDMASK !-1 for water (ice or no ice) and glacial areas, 1 for land where the LSM does its soil moisture calculations. + integer :: I,J,K,N + real(kind=kind_noahmp), dimension(0:NoahmpIO%NSOIL) :: ZSOIL !depth of soil layer-bottom [m] + real(kind=kind_noahmp), dimension(1:NoahmpIO%NSOIL) :: SMCEQ !equilibrium soil water content [m3/m3] + real(kind=kind_noahmp), dimension(1:NoahmpIO%NSOIL) :: SMC,SH2O + real(kind=kind_noahmp) :: DELTAT,RCOND,TOTWATER,PSI, & + WFLUXDEEP,WCNDDEEP,DDZ,SMCWTDMID, & + WPLUS,WMINUS - REAL(kind=kind_noahmp) :: BEXP,DKSAT,PSISAT,SMCMAX,SMCWLT - + real(kind=kind_noahmp) :: BEXP,DKSAT,PSISAT,SMCMAX,SMCWLT + real(kind=kind_noahmp), dimension(NoahmpIO%ims:NoahmpIO%ime, NoahmpIO%jms:NoahmpIO%jme) :: WaterTableAvg ! grid average WTPD for laterflow subroutine +! -------------------------------------------------------------------------------- + associate( & + ids => NoahmpIO%ids ,& + ide => NoahmpIO%ide ,& + jds => NoahmpIO%jds ,& + jde => NoahmpIO%jde ,& + kds => NoahmpIO%kds ,& + kde => NoahmpIO%kde ,& + ims => NoahmpIO%ims ,& + ime => NoahmpIO%ime ,& + jms => NoahmpIO%jms ,& + jme => NoahmpIO%jme ,& + kms => NoahmpIO%kms ,& + kme => NoahmpIO%kme ,& + its => NoahmpIO%its ,& + ite => NoahmpIO%ite ,& + jts => NoahmpIO%jts ,& + jte => NoahmpIO%jte ,& + kts => NoahmpIO%kts ,& + kte => NoahmpIO%kte ,& + NSOIL => NoahmpIO%NSOIL ,& + ISLTYP => NoahmpIO%ISLTYP ,& + SMOISEQ => NoahmpIO%SMOISEQ ,& ! mosaic + DZS => NoahmpIO%DZS ,& + WTDDT => NoahmpIO%WTDDT ,& + FDEPTH => NoahmpIO%FDEPTHXY ,& + AREA => NoahmpIO%AREAXY ,& + TOPO => NoahmpIO%TERRAIN ,& + ISURBAN => NoahmpIO%ISURBAN ,& + IVGTYP => NoahmpIO%IVGTYP ,& + RIVERCOND => NoahmpIO%RIVERCONDXY ,& + RIVERBED => NoahmpIO%RIVERBEDXY ,& + EQWTD => NoahmpIO%EQZWT ,& + PEXP => NoahmpIO%PEXPXY ,& + SMOIS => NoahmpIO%SMOIS ,& ! mosaic + SH2OXY => NoahmpIO%SH2O ,& ! mosaic + SMCWTD => NoahmpIO%SMCWTDXY ,& ! mosaic + WTD => NoahmpIO%ZWTXY ,& ! mosaic + QLAT => NoahmpIO%QLATXY ,& + QRF => NoahmpIO%QRFXY ,& + DEEPRECH => NoahmpIO%DEEPRECHXY ,& + QSPRING => NoahmpIO%QSPRINGXY ,& + QSLAT => NoahmpIO%QSLATXY ,& + QRFS => NoahmpIO%QRFSXY ,& + QSPRINGS => NoahmpIO%QSPRINGSXY ,& + RECH => NoahmpIO%RECHXY ,& + LANDMASK => NoahmpIO%LANDMASK ,& + NumberOfTiles => NoahmpIO%NumberOfTiles ,& + SubGrdFracMosaic => NoahmpIO%SubGrdFracMosaic & + ) +! -------------------------------------------------------------------------------- + + + WaterTableAvg = 0.0 DELTAT = WTDDT * 60. !timestep in seconds for this calculation ZSOIL(0) = 0. @@ -110,19 +104,30 @@ subroutine WTABLE_mmf_noahmp (NoahmpIO ,NSOIL ,XLAND ,XICE ,XICE_THRESH ZSOIL(K) = -DZS(K) + ZSOIL(K-1) END DO - WHERE(XLAND-1.5.LT.0..AND.XICE.LT. XICE_THRESHOLD.AND.IVGTYP.NE.ISICE) - LANDMASK=1 - ELSEWHERE - LANDMASK=-1 - ENDWHERE - +! calculate grid average WTD from subgrid WTD + IF (NoahmpIO%IOPT_MOSAIC .NE. 0) THEN + DO J=jts,jte + DO I=its,ite + IF(LANDMASK(I,J).GT.0)THEN + DO N = 1, NumberOfTiles(I,J) + WaterTableAvg (I,J) = WaterTableAvg (I,J) + & + WTD (I,J,N) * SubGrdFracMosaic (I,J,N) + ENDDO + ENDIF + ENDDO + ENDDO + ELSE + WaterTableAvg = WTD(:,:,1) + ENDIF !Calculate lateral flow + QLAT = 0. - CALL LATERALFLOW(NoahmpIO, ISLTYP,WTD,QLAT,FDEPTH,TOPO,LANDMASK,DELTAT,AREA & - ,ids,ide,jds,jde,kds,kde & - ,ims,ime,jms,jme,kms,kme & - ,its,ite,jts,jte,kts,kte ) + CALL LATERALFLOW (NoahmpIO, ISLTYP,WaterTableAvg ,& + QLAT,FDEPTH,TOPO,LANDMASK,DELTAT,AREA ,& + ids,ide,jds,jde,kds,kde ,& + ims,ime,jms,jme,kms,kme ,& + its,ite,jts,jte,kts,kte ) !compute flux from grounwater to rivers in the cell @@ -130,12 +135,12 @@ subroutine WTABLE_mmf_noahmp (NoahmpIO ,NSOIL ,XLAND ,XICE ,XICE_THRESH DO J=jts,jte DO I=its,ite IF(LANDMASK(I,J).GT.0)THEN - IF(WTD(I,J) .GT. RIVERBED(I,J) .AND. EQWTD(I,J) .GT. RIVERBED(I,J)) THEN - RCOND = RIVERCOND(I,J) * EXP(PEXP(I,J)*(WTD(I,J)-EQWTD(I,J))) + IF(WaterTableAvg(I,J) .GT. RIVERBED(I,J) .AND. EQWTD(I,J) .GT. RIVERBED(I,J)) THEN + RCOND = RIVERCOND(I,J) * EXP(PEXP(I,J)*(WaterTableAvg(I,J)-EQWTD(I,J))) ELSE RCOND = RIVERCOND(I,J) ENDIF - QRF(I,J) = RCOND * (WTD(I,J)-RIVERBED(I,J)) * DELTAT/AREA(I,J) + QRF(I,J) = RCOND * (WaterTableAvg(I,J)-RIVERBED(I,J)) * DELTAT/AREA(I,J) !for now, dont allow it to go from river to groundwater QRF(I,J) = MAX(QRF(I,J),0.) ELSE @@ -146,56 +151,60 @@ subroutine WTABLE_mmf_noahmp (NoahmpIO ,NSOIL ,XLAND ,XICE ,XICE_THRESH DO J=jts,jte DO I=its,ite - IF(LANDMASK(I,J).GT.0)THEN - - BEXP = NoahmpIO%BEXP_TABLE (ISLTYP(I,J)) - DKSAT = NoahmpIO%DKSAT_TABLE (ISLTYP(I,J)) - PSISAT = -1.0*NoahmpIO%PSISAT_TABLE (ISLTYP(I,J)) - SMCMAX = NoahmpIO%SMCMAX_TABLE (ISLTYP(I,J)) - SMCWLT = NoahmpIO%SMCWLT_TABLE (ISLTYP(I,J)) - - IF(IVGTYP(I,J)==NoahmpIO%ISURBAN)THEN - SMCMAX = 0.45 - SMCWLT = 0.40 - ENDIF - + IF(LANDMASK(I,J).GT.0)THEN + BEXP = NoahmpIO%BEXP_TABLE (ISLTYP(I,J)) ! mosaic added for soil vars + DKSAT = NoahmpIO%DKSAT_TABLE (ISLTYP(I,J)) + PSISAT = -1.0*NoahmpIO%PSISAT_TABLE (ISLTYP(I,J)) + SMCMAX = NoahmpIO%SMCMAX_TABLE (ISLTYP(I,J)) + SMCWLT = NoahmpIO%SMCWLT_TABLE (ISLTYP(I,J)) + + IF(IVGTYP(I,J)==NoahmpIO%ISURBAN)THEN + SMCMAX = 0.45 + SMCWLT = 0.40 + ENDIF + + DO N = 1, NumberOfTiles(I,J) !for deep water table calculate recharge - IF(WTD(I,J) < ZSOIL(NSOIL)-DZS(NSOIL))THEN + IF(WTD(I,J,N) < ZSOIL(NSOIL)-DZS(NSOIL))THEN !assume all liquid if the wtd is deep - DDZ = ZSOIL(NSOIL)-WTD(I,J) - SMCWTDMID = 0.5 * (SMCWTD(I,J) + SMCMAX ) - PSI = PSISAT * ( SMCMAX / SMCWTD(I,J) ) ** BEXP - WCNDDEEP = DKSAT * ( SMCWTDMID / SMCMAX ) ** (2.0*BEXP + 3.0) - WFLUXDEEP = - DELTAT * WCNDDEEP * ( (PSISAT-PSI) / DDZ - 1.) + DDZ = ZSOIL(NSOIL)-WTD(I,J,N) + SMCWTDMID = 0.5 * (SMCWTD(I,J,N) + SMCMAX ) + PSI = PSISAT * ( SMCMAX / SMCWTD(I,J,N) ) ** BEXP + WCNDDEEP = DKSAT * ( SMCWTDMID / SMCMAX ) ** (2.0*BEXP + 3.0) + WFLUXDEEP = - DELTAT * WCNDDEEP * ( (PSISAT-PSI) / DDZ - 1.) !update deep soil moisture - SMCWTD(I,J) = SMCWTD(I,J) + (DEEPRECH(I,J) - WFLUXDEEP) / DDZ - WPLUS = MAX((SMCWTD(I,J)-SMCMAX), 0.0) * DDZ - WMINUS = MAX((1.E-4-SMCWTD(I,J)), 0.0) * DDZ - SMCWTD(I,J) = MAX( MIN(SMCWTD(I,J),SMCMAX) , 1.E-4) - WFLUXDEEP = WFLUXDEEP + WPLUS - WMINUS - DEEPRECH(I,J) = WFLUXDEEP - ENDIF + SMCWTD(I,J,N) = SMCWTD(I,J,N) + (DEEPRECH(I,J,N) - WFLUXDEEP) / DDZ + WPLUS = MAX((SMCWTD(I,J,N)-SMCMAX), 0.0) * DDZ + WMINUS = MAX((1.E-4-SMCWTD(I,J,N)), 0.0) * DDZ + SMCWTD(I,J,N) = MAX( MIN(SMCWTD(I,J,N),SMCMAX) , 1.E-4) + WFLUXDEEP = WFLUXDEEP + WPLUS - WMINUS + DEEPRECH(I,J,N) = WFLUXDEEP + ENDIF !Total water flux to or from groundwater in the cell - TOTWATER = QLAT(I,J) - QRF(I,J) + DEEPRECH(I,J) + IF (NoahmpIO%IOPT_MOSAIC .NE. 0) THEN + TOTWATER = SubGrdFracMosaic (I,J,N) * (QLAT(I,J) - QRF(I,J)) + DEEPRECH(I,J,N) + ELSE + TOTWATER = QLAT(I,J) - QRF(I,J) + DEEPRECH(I,J,N) !If mosaic not ON, N=1 + ENDIF - SMC(1:NSOIL) = SMOIS(I,1:NSOIL,J) - SH2O(1:NSOIL) = SH2OXY(I,1:NSOIL,J) - SMCEQ(1:NSOIL) = SMOISEQ(I,1:NSOIL,J) + SMC(1:NSOIL) = SMOIS(I,1:NSOIL,J,N) + SH2O(1:NSOIL) = SH2OXY(I,1:NSOIL,J,N) + SMCEQ(1:NSOIL) = SMOISEQ(I,1:NSOIL,J,N) !Update the water table depth and soil moisture - CALL UPDATEWTD ( NSOIL, DZS , ZSOIL, SMCEQ, SMCMAX, SMCWLT, PSISAT, BEXP ,I , J , &!in - TOTWATER, WTD(I,J), SMC, SH2O, SMCWTD(I,J) , &!inout - QSPRING(I,J) ) !out + CALL UPDATEWTD ( NSOIL, DZS , ZSOIL, SMCEQ, SMCMAX, SMCWLT, PSISAT, BEXP, I, J, &!in + TOTWATER, WTD(I,J,N), SMC, SH2O, SMCWTD(I,J,N), &!inout + QSPRING(I,J) ) !out !now update soil moisture - SMOIS(I,1:NSOIL,J) = SMC(1:NSOIL) - SH2OXY(I,1:NSOIL,J) = SH2O(1:NSOIL) - - ENDIF - ENDDO - ENDDO + SMOIS(I,1:NSOIL,J,N) = SMC(1:NSOIL) + SH2OXY(I,1:NSOIL,J,N) = SH2O(1:NSOIL) + ENDDO ! N + ENDIF + ENDDO ! I + ENDDO ! J !accumulate fluxes for output @@ -203,15 +212,18 @@ subroutine WTABLE_mmf_noahmp (NoahmpIO ,NSOIL ,XLAND ,XICE ,XICE_THRESH DO I=its,ite IF(LANDMASK(I,J).GT.0)THEN QSLAT(I,J) = QSLAT(I,J) + QLAT(I,J)*1.E3 - QRFS(I,J) = QRFS(I,J) + QRF(I,J)*1.E3 - QSPRINGS(I,J) = QSPRINGS(I,J) + QSPRING(I,J)*1.E3 - RECH(I,J) = RECH(I,J) + DEEPRECH(I,J)*1.E3 -!zero out DEEPRECH - DEEPRECH(I,J) =0. + QRFS(I,J) = QRFS(I,J) + QRF(I,J)*1.E3 + DO N = 1, NumberOfTiles(I,J) + QSPRINGS(I,J) = QSPRINGS(I,J) + QSPRING(I,J)*1.E3 + RECH(I,J,N) = RECH(I,J,N) + DEEPRECH(I,J,N)*1.E3 + !zero out DEEPRECH + DEEPRECH(I,J,N) =0. + ENDDO ENDIF ENDDO ENDDO + end associate end subroutine WTABLE_mmf_noahmp