Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameter file updates #862

Merged
merged 35 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
eaf52a7
Added hydr_solver and stomatal_assim switches to parameter file
rgknox Apr 27, 2022
1879333
converting parameter crown to crown_depth_frac and forcing its use th…
rgknox Apr 27, 2022
3a7e083
Added new param fields for phenology and damage
rgknox Apr 27, 2022
8e85fb1
Sorted fates default param file
rgknox Apr 27, 2022
5e60f74
Added new maxpatch and harvest production parameters.
rgknox Apr 27, 2022
4d66d49
Updating naming convention of nutrient enabled (CNP) allocation param…
rgknox Apr 27, 2022
f64861e
Added maxpatch to parameter file, updated damage bin widths for history
rgknox Apr 29, 2022
c7d048c
First version of the parameter API updater
rgknox May 5, 2022
7912585
Parameter file API updater script is nearly final, incremental progre…
rgknox May 13, 2022
d321625
tweaks to parameter api change couplet
rgknox May 13, 2022
954e343
minor updates to fates default parameters api24
rgknox May 13, 2022
d14ae29
Removing parameter file api24 default v1
rgknox May 13, 2022
1fbd6d0
Updated some parameter names to be more verbose
rgknox May 18, 2022
d77e7b8
Adding model-side changes to the parameter file parameter names. Cha…
rgknox May 24, 2022
a14a31f
Changing some phen parameters to pft level, adding damage codes
rgknox May 25, 2022
5c8c58b
Reverted pft-scale phen parameters back to scalar because the phenolo…
rgknox May 25, 2022
735b33f
Addition of damage history dimensioning, and module flag
rgknox May 27, 2022
64f6c71
Removing export frac check
rgknox May 27, 2022
14fdfe2
minor conflict resolution
rgknox May 27, 2022
401cb25
Minor syntax updates
rgknox May 27, 2022
dbd00f4
Syntax changes, minor
rgknox May 27, 2022
8c85f90
Removing stoich_p2 variables
rgknox May 31, 2022
ce4821b
Small adjustments to parameter update pr, including setting secondary…
rgknox May 31, 2022
e3972d7
merge resolution
rgknox May 31, 2022
11b393c
Updating the default parameter file to api 24
rgknox Jun 1, 2022
380b298
Update the default parameter file
rgknox Jun 2, 2022
6513ff2
Conflict resolutions between the parameter file updates and syntax ch…
rgknox Jun 3, 2022
808e38f
changed array indices to use names indices
rgknox Jun 6, 2022
8078435
Reverting changes to EDCanopyStructureMod for b4b
rgknox Jun 6, 2022
7182c2c
minor fix, removed old maxcohort declaration
rgknox Jun 6, 2022
a1ec3b2
fixed maxCohorts
rgknox Jun 7, 2022
6c4c060
Merge branch 'params-maxpatch-logfinal' of github.com:rgknox/fates in…
rgknox Jun 7, 2022
d3d5b83
Copied fates_params_default_api24.cdl over to the default file
rgknox Jun 8, 2022
4c01c5a
Removing the api24 temporary default parameter file
rgknox Jun 8, 2022
f054c85
Conflict resolution between the parameter update and parteh loop sele…
rgknox Jun 19, 2022
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
13 changes: 6 additions & 7 deletions biogeochem/EDCanopyStructureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ module EDCanopyStructureMod
use FatesInterfaceTypesMod , only : numpft
use FatesInterfaceTypesMod, only : bc_in_type
use FatesPlantHydraulicsMod, only : UpdateH2OVeg,InitHydrCohort, RecruitWaterStorage
use EDTypesMod , only : maxCohortsPerPatch
use PRTGenericMod, only : leaf_organ
use PRTGenericMod, only : all_carbon_elements
use PRTGenericMod, only : leaf_organ
Expand Down Expand Up @@ -1566,19 +1565,19 @@ subroutine leaf_area_profile( currentSite )
currentCohort => currentPatch%shortest
do while(associated(currentCohort))
ft = currentCohort%pft
min_chite = currentCohort%hite - currentCohort%hite * prt_params%crown(ft)
min_chite = currentCohort%hite - currentCohort%hite * prt_params%crown_depth_frac(ft)
max_chite = currentCohort%hite
do iv = 1,N_HITE_BINS
frac_canopy(iv) = 0.0_r8
! this layer is in the middle of the canopy
if(max_chite > maxh(iv).and.min_chite < minh(iv))then
frac_canopy(iv)= min(1.0_r8,dh / (currentCohort%hite*prt_params%crown(ft)))
frac_canopy(iv)= min(1.0_r8,dh / (currentCohort%hite*prt_params%crown_depth_frac(ft) ))
! this is the layer with the bottom of the canopy in it.
elseif(min_chite < maxh(iv).and.min_chite > minh(iv).and.max_chite > maxh(iv))then
frac_canopy(iv) = (maxh(iv) -min_chite ) / (currentCohort%hite*prt_params%crown(ft))
frac_canopy(iv) = (maxh(iv) -min_chite ) / (currentCohort%hite*prt_params%crown_depth_frac(ft) )
! this is the layer with the top of the canopy in it.
elseif(max_chite > minh(iv).and.max_chite < maxh(iv).and.min_chite < minh(iv))then
frac_canopy(iv) = (max_chite - minh(iv)) / (currentCohort%hite*prt_params%crown(ft))
frac_canopy(iv) = (max_chite - minh(iv)) / (currentCohort%hite*prt_params%crown_depth_frac(ft))
elseif(max_chite < maxh(iv).and.min_chite > minh(iv))then !the whole cohort is within this layer.
frac_canopy(iv) = 1.0_r8
endif
Expand Down Expand Up @@ -1674,11 +1673,11 @@ subroutine leaf_area_profile( currentSite )

layer_top_hite = currentCohort%hite - &
( real(iv-1,r8)/currentCohort%NV * currentCohort%hite * &
prt_params%crown(currentCohort%pft) )
prt_params%crown_depth_frac(currentCohort%pft) )

layer_bottom_hite = currentCohort%hite - &
( real(iv,r8)/currentCohort%NV * currentCohort%hite * &
prt_params%crown(currentCohort%pft) )
prt_params%crown_depth_frac(currentCohort%pft) )

fraction_exposed = 1.0_r8
if(currentSite%snow_depth > layer_top_hite)then
Expand Down
7 changes: 3 additions & 4 deletions biogeochem/EDCohortDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module EDCohortDynamicsMod
use FatesLitterMod , only : ncwd
use FatesLitterMod , only : ndcmpy
use FatesLitterMod , only : litter_type
use EDTypesMod , only : maxCohortsPerPatch
use EDParamsMod , only : max_cohort_per_patch
use EDTypesMod , only : AREA
use EDTypesMod , only : min_npm2, min_nppatch
use EDTypesMod , only : min_n_safemath
Expand Down Expand Up @@ -1072,7 +1072,6 @@ subroutine fuse_cohorts(currentSite, currentPatch, bc_in)
use FatesInterfaceTypesMod , only : hlm_use_cohort_age_tracking
use FatesConstantsMod , only : itrue
use FatesConstantsMod, only : days_per_year
use EDTypesMod , only : maxCohortsPerPatch

!
! !ARGUMENTS
Expand Down Expand Up @@ -1565,7 +1564,7 @@ subroutine fuse_cohorts(currentSite, currentPatch, bc_in)


if ( hlm_use_cohort_age_tracking .eq.itrue) then
if ( nocohorts > maxCohortsPerPatch ) then
if ( nocohorts > max_cohort_per_patch ) then
iterate = 1
!---------------------------------------------------------------------!
! Making profile tolerance larger means that more fusion will happen !
Expand All @@ -1580,7 +1579,7 @@ subroutine fuse_cohorts(currentSite, currentPatch, bc_in)

else

if (nocohorts > maxCohortsPerPatch) then
if (nocohorts > max_cohort_per_patch) then
iterate = 1
!---------------------------------------------------------------------!
! Making profile tolerance larger means that more fusion will happen !
Expand Down
24 changes: 13 additions & 11 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ module EDPatchDynamicsMod
use EDTypesMod , only : homogenize_seed_pfts
use EDTypesMod , only : n_dbh_bins, area, patchfusion_dbhbin_loweredges
use EDtypesMod , only : force_patchfuse_min_biomass
use EDTypesMod , only : maxPatchesPerSite
use EDTypesMod , only : maxPatchesPerSite_by_disttype
use EDTypesMod , only : ed_site_type, ed_patch_type, ed_cohort_type
use EDTypesMod , only : site_massbal_type
use EDTypesMod , only : site_fluxdiags_type
Expand Down Expand Up @@ -90,6 +88,9 @@ module EDPatchDynamicsMod
use SFParamsMod, only : SF_VAL_CWD_FRAC
use EDParamsMod, only : logging_event_code
use EDParamsMod, only : logging_export_frac
use EDParamsMod, only : maxpatch_primary
use EDParamsMod, only : maxpatch_secondary
use EDParamsMod, only : maxpatch_total
use FatesRunningMeanMod, only : ema_24hr, fixed_24hr, ema_lpa

! CIME globals
Expand Down Expand Up @@ -2319,15 +2320,16 @@ subroutine fuse_patches( csite, bc_in )
! to let there be one for each type of nocomp PFT on the site. this is likely to lead to problems
! if anthropogenic disturance is enabled.
if (hlm_use_nocomp.eq.itrue) then
maxpatches(primaryforest) = max(maxPatchesPerSite_by_disttype(primaryforest), sum(csite%use_this_pft))
maxpatches(secondaryforest) = maxPatchesPerSite - maxpatches(primaryforest)
if (maxPatchesPerSite .lt. maxpatches(primaryforest)) then
maxpatches(primaryforest) = max(maxpatch_primary, sum(csite%use_this_pft))
maxpatches(secondaryforest) = maxpatch_total - maxpatches(primaryforest)
if (maxpatch_total .lt. maxpatches(primaryforest)) then
write(fates_log(),*) 'too many PFTs and not enough patches for nocomp w/o fixed biogeog'
write(fates_log(),*) 'maxPatchesPerSite,numpft',maxPatchesPerSite,numpft, sum(csite%use_this_pft)
write(fates_log(),*) 'maxpatch_total,numpft',maxpatch_total,numpft, sum(csite%use_this_pft)
call endrun(msg=errMsg(sourcefile, __LINE__))
endif
else
maxpatches(:) = maxPatchesPerSite_by_disttype(:)
maxpatches(primaryforest) = maxpatch_primary
maxpatches(secondaryforest) = maxpatch_secondary
endif

currentPatch => currentSite%youngest_patch
Expand Down Expand Up @@ -2363,7 +2365,7 @@ subroutine fuse_patches( csite, bc_in )
iterate = 1

!---------------------------------------------------------------------!
! Keep doing this until nopatches <= maxPatchesPerSite !
! Keep doing this until nopatches <= maxpatch_total !
!---------------------------------------------------------------------!

iterate_eq_1_loop: do while(iterate == 1)
Expand Down Expand Up @@ -2505,10 +2507,10 @@ subroutine fuse_patches( csite, bc_in )
! a patch x patch loop, reset the patch fusion tolerance to the starting !
! value so that any subsequent fusions in this loop are done with that !
! value. otherwise we can end up in a situation where we've loosened the !
! fusion tolerance to get nopatches <= maxPatchesPerSite, but then, !
! fusion tolerance to get nopatches <= maxpatch_total, but then, !
! having accomplished that, we continue through all the patch x patch !
! combinations and then all the patches get fused, ending up with !
! nopatches << maxPatchesPerSite and losing all heterogeneity. !
! nopatches << maxpatch_total and losing all heterogeneity. !
!------------------------------------------------------------------------!

profiletol = ED_val_patch_fusion_tol
Expand Down Expand Up @@ -2567,7 +2569,7 @@ subroutine fuse_patches( csite, bc_in )
iterate = 0
endif

enddo iterate_eq_1_loop ! iterate .eq. 1 ==> nopatches>maxPatchesPerSite
enddo iterate_eq_1_loop ! iterate .eq. 1 ==> nopatches>maxpatch_total

end do disttype_loop

Expand Down
49 changes: 24 additions & 25 deletions biogeochem/EDPhysiologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,6 @@ subroutine phenology( currentSite, bc_in )
use EDParamsMod, only : ED_val_phen_a, ED_val_phen_b, ED_val_phen_c, ED_val_phen_chiltemp
use EDParamsMod, only : ED_val_phen_mindayson, ED_val_phen_ncolddayslim, ED_val_phen_coldtemp


!
! !ARGUMENTS:
type(ed_site_type), intent(inout), target :: currentSite
Expand Down Expand Up @@ -1942,28 +1941,28 @@ subroutine recruitment( currentSite, currentPatch, bc_in )
case(nitrogen_element)

mass_demand = &
c_struct*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(struct_organ)) + &
c_leaf*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(leaf_organ)) + &
c_fnrt*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(fnrt_organ)) + &
c_sapw*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(sapw_organ)) + &
c_struct*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(struct_organ)) + &
c_leaf*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(leaf_organ)) + &
c_fnrt*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(fnrt_organ)) + &
c_sapw*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(sapw_organ)) + &
StorageNutrientTarget(ft, element_id, &
c_leaf*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(leaf_organ)), &
c_fnrt*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(fnrt_organ)), &
c_sapw*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(sapw_organ)), &
c_struct*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(struct_organ)))
c_leaf*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(leaf_organ)), &
c_fnrt*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(fnrt_organ)), &
c_sapw*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(sapw_organ)), &
c_struct*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(struct_organ)))

case(phosphorus_element)

mass_demand = &
c_struct*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(struct_organ)) + &
c_leaf*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(leaf_organ)) + &
c_fnrt*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(fnrt_organ)) + &
c_sapw*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(sapw_organ)) + &
c_struct*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(struct_organ)) + &
c_leaf*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(leaf_organ)) + &
c_fnrt*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(fnrt_organ)) + &
c_sapw*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(sapw_organ)) + &
StorageNutrientTarget(ft, element_id, &
c_leaf*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(leaf_organ)), &
c_fnrt*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(fnrt_organ)), &
c_sapw*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(sapw_organ)), &
c_struct*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(struct_organ)))
c_leaf*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(leaf_organ)), &
c_fnrt*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(fnrt_organ)), &
c_sapw*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(sapw_organ)), &
c_struct*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(struct_organ)))

case default
write(fates_log(),*) 'Undefined element type in recruitment'
Expand Down Expand Up @@ -2017,19 +2016,19 @@ subroutine recruitment( currentSite, currentPatch, bc_in )

case(nitrogen_element)

m_struct = c_struct*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(struct_organ))
m_leaf = c_leaf*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(leaf_organ))
m_fnrt = c_fnrt*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(fnrt_organ))
m_sapw = c_sapw*prt_params%nitr_stoich_p2(ft,prt_params%organ_param_id(sapw_organ))
m_struct = c_struct*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(struct_organ))
m_leaf = c_leaf*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(leaf_organ))
m_fnrt = c_fnrt*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(fnrt_organ))
m_sapw = c_sapw*prt_params%nitr_stoich_p1(ft,prt_params%organ_param_id(sapw_organ))
m_store = StorageNutrientTarget(ft, element_id, m_leaf, m_fnrt, m_sapw, m_struct )
m_repro = 0._r8

case(phosphorus_element)

m_struct = c_struct*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(struct_organ))
m_leaf = c_leaf*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(leaf_organ))
m_fnrt = c_fnrt*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(fnrt_organ))
m_sapw = c_sapw*prt_params%phos_stoich_p2(ft,prt_params%organ_param_id(sapw_organ))
m_struct = c_struct*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(struct_organ))
m_leaf = c_leaf*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(leaf_organ))
m_fnrt = c_fnrt*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(fnrt_organ))
m_sapw = c_sapw*prt_params%phos_stoich_p1(ft,prt_params%organ_param_id(sapw_organ))
m_store = StorageNutrientTarget(ft, element_id, m_leaf, m_fnrt, m_sapw, m_struct )
m_repro = 0._r8

Expand Down
2 changes: 1 addition & 1 deletion biogeochem/FatesAllometryMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2008,7 +2008,7 @@ subroutine CrownDepth(height,ft,crown_depth)
! Original FATES crown depth heigh used for hydraulics
! crown_depth = min(height,0.1_r8)

crown_depth = prt_params%crown(ft) * height
crown_depth = prt_params%crown_depth_frac(ft) * height


return
Expand Down
1 change: 0 additions & 1 deletion biogeophys/EDSurfaceAlbedoMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module EDSurfaceRadiationMod
#include "shr_assert.h"

use EDTypesMod , only : ed_patch_type, ed_site_type
use EDTypesMod , only : maxPatchesPerSite
use EDTypesMod , only : maxpft
use FatesConstantsMod , only : r8 => fates_r8
use FatesConstantsMod , only : itrue
Expand Down
18 changes: 9 additions & 9 deletions biogeophys/FatesPlantHydraulicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module FatesPlantHydraulicsMod
use EDParamsMod , only : hydr_psi0
use EDParamsMod , only : hydr_psicap
use EDParamsMod , only : hydr_htftype_node
use EDParamsMod , only : hydr_solver_type
use EDParamsMod , only : hydr_solver

use EDTypesMod , only : ed_site_type
use EDTypesMod , only : ed_patch_type
Expand Down Expand Up @@ -1468,7 +1468,7 @@ subroutine InitHydrSites(sites,bc_in)
case(rhizlayer_aggmeth_none)

csite_hydr%nlevrhiz = bc_in(s)%nlevsoil
call sites(s)%si_hydr%InitHydrSite(numpft,nlevsclass,hydr_solver_type,bc_in(s)%nlevsoil)
call sites(s)%si_hydr%InitHydrSite(numpft,nlevsclass,hydr_solver,bc_in(s)%nlevsoil)

do j=1,csite_hydr%nlevrhiz
csite_hydr%map_r2s(j,1) = j
Expand All @@ -1480,7 +1480,7 @@ subroutine InitHydrSites(sites,bc_in)
case(rhizlayer_aggmeth_combine12)

csite_hydr%nlevrhiz = max(1,bc_in(s)%nlevsoil-1)
call sites(s)%si_hydr%InitHydrSite(numpft,nlevsclass,hydr_solver_type,bc_in(s)%nlevsoil)
call sites(s)%si_hydr%InitHydrSite(numpft,nlevsclass,hydr_solver,bc_in(s)%nlevsoil)

csite_hydr%map_r2s(1,1) = 1
j_bc = min(2,bc_in(s)%nlevsoil) ! this protects 1 soil layer
Expand All @@ -1498,7 +1498,7 @@ subroutine InitHydrSites(sites,bc_in)
case(rhizlayer_aggmeth_balN)

csite_hydr%nlevrhiz = min(aggN,bc_in(s)%nlevsoil)
call sites(s)%si_hydr%InitHydrSite(numpft,nlevsclass,hydr_solver_type,bc_in(s)%nlevsoil)
call sites(s)%si_hydr%InitHydrSite(numpft,nlevsclass,hydr_solver,bc_in(s)%nlevsoil)

ntoagg = int(ceiling(real(bc_in(s)%nlevsoil)/real(csite_hydr%nlevrhiz)-nearzero))

Expand Down Expand Up @@ -2627,21 +2627,21 @@ subroutine hydraulics_bc ( nsites, sites, bc_in, bc_out, dtime)
! from leaf to the current soil layer. This does NOT
! update cohort%th_*

if(hydr_solver_type == hydr_solver_2DNewton) then
if(hydr_solver == hydr_solver_2DNewton) then

call MatSolve2D(csite_hydr,ccohort,ccohort_hydr, &
dtime,qflx_tran_veg_indiv, &
sapflow,rootuptake(1:nlevrhiz),wb_err_plant,dwat_plant, &
dth_layershell_col)

elseif(hydr_solver_type == hydr_solver_2DPicard) then
elseif(hydr_solver == hydr_solver_2DPicard) then

call PicardSolve2D(csite_hydr,ccohort,ccohort_hydr, &
dtime,qflx_tran_veg_indiv, &
sapflow,rootuptake(1:nlevrhiz),wb_err_plant,dwat_plant, &
dth_layershell_col,csite_hydr%num_nodes)

elseif(hydr_solver_type == hydr_solver_1DTaylor ) then
elseif(hydr_solver == hydr_solver_1DTaylor ) then

! ---------------------------------------------------------------------------------
! Approach: do nlevsoi_hyd sequential solutions to Richards' equation,
Expand Down Expand Up @@ -4942,7 +4942,7 @@ subroutine MatSolve2D(csite_hydr,cohort,cohort_hydr, &


! This NaN's the scratch arrays
call csite_hydr%FlushSiteScratch(hydr_solver_type)
call csite_hydr%FlushSiteScratch(hydr_solver)

! This is the maximum number of iterations needed for this cohort
! (each soil layer has a different number, this saves the max)
Expand Down Expand Up @@ -5725,7 +5725,7 @@ subroutine PicardSolve2D(csite_hydr,cohort,cohort_hydr, &


! This NaN's the scratch arrays
call csite_hydr%FlushSiteScratch(hydr_solver_type)
call csite_hydr%FlushSiteScratch(hydr_solver)

! This is the maximum number of iterations needed for this cohort
! (each soil layer has a different number, this saves the max)
Expand Down
Loading