Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions drivers/hrldas/BiochemVarInTransferMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,23 @@ 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 &
)
! -------------------------------------------------------------------------

! 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
Expand Down
29 changes: 15 additions & 14 deletions drivers/hrldas/BiochemVarOutTransferMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 6 additions & 5 deletions drivers/hrldas/ConfigVarInTransferMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ subroutine ConfigVarInTransfer(noahmp, NoahmpIO)
associate( &
I => NoahmpIO%I ,&
J => NoahmpIO%J ,&
N => NoahmpIO%N ,&
NumSnowLayerMax => NoahmpIO%NSNOW ,&
NumSoilLayer => NoahmpIO%NSOIL &
)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions drivers/hrldas/ConfigVarOutTransferMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
37 changes: 19 additions & 18 deletions drivers/hrldas/EnergyVarInTransferMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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 ,&
Expand All @@ -47,31 +48,31 @@ 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
noahmp%energy%state%LeafAreaIndex = 0.0
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
Expand Down Expand Up @@ -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)
Expand Down
Loading