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

hydro fix and simple fixes #955

Merged
merged 3 commits into from
Dec 1, 2022
Merged
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
1 change: 1 addition & 0 deletions biogeophys/FatesPlantHydraulicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2750,6 +2750,7 @@ subroutine hydraulics_bc ( nsites, sites, bc_in, bc_out, dtime)
ccohort=>cpatch%tallest
do while(associated(ccohort))

ccohort_hydr => ccohort%co_hydr
sum_l_aroot = sum(ccohort_hydr%l_aroot_layer(:))
ft = ccohort%pft

Expand Down
2 changes: 0 additions & 2 deletions main/EDTypesMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ module EDTypesMod
real(r8), parameter, public :: min_n_safemath = 1.0E-12_r8 ! in some cases, we want to immediately remove super small
! number densities of cohorts to prevent FPEs

character*4 yearchar

! special mode to cause PFTs to create seed mass of all currently-existing PFTs
logical, parameter, public :: homogenize_seed_pfts = .false.

Expand Down
14 changes: 7 additions & 7 deletions main/FatesHistoryInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2209,6 +2209,8 @@ subroutine update_history_dyn(this,nc,nsites,sites)

io_si = sites(s)%h_gid

flux_diags_c => sites(s)%flux_diags(element_pos(carbon12_element))

! set the fates fraction to one, since it is zero on non-fates columns, &
! the average is the total gridcell fates fraction
hio_fates_fraction_si(io_si) = 1._r8
Expand Down Expand Up @@ -3216,7 +3218,7 @@ subroutine update_history_dyn(this,nc,nsites,sites)
! Update Litter Flux Variables

litt_c => cpatch%litter(element_pos(carbon12_element))
flux_diags_c => sites(s)%flux_diags(element_pos(carbon12_element))


do i_cwd = 1, ncwd

Expand Down Expand Up @@ -3462,12 +3464,10 @@ subroutine update_history_dyn(this,nc,nsites,sites)
! Some carbon only litter diagnostics (legacy)
! ------------------------------------------------------------------------------

flux_diags => sites(s)%flux_diags(element_pos(carbon12_element))

hio_litter_in_si(io_si) = (sum(flux_diags%cwd_ag_input(:)) + &
sum(flux_diags%cwd_bg_input(:)) + &
sum(flux_diags%leaf_litter_input(:)) + &
sum(flux_diags%root_litter_input(:))) * &
hio_litter_in_si(io_si) = (sum(flux_diags_c%cwd_ag_input(:)) + &
sum(flux_diags_c%cwd_bg_input(:)) + &
sum(flux_diags_c%leaf_litter_input(:)) + &
sum(flux_diags_c%root_litter_input(:))) * &
AREA_INV * days_per_sec

hio_litter_out_si(io_si) = 0._r8
Expand Down