@@ -870,20 +870,17 @@ subroutine flush_hvars(this,nc,upfreq_in)
870870 class(fates_history_interface_type) :: this
871871 integer ,intent (in ) :: nc
872872 integer ,intent (in ) :: upfreq_in
873-
874873 integer :: ivar
875- type (fates_history_variable_type),pointer :: hvar
876874 integer :: lb1,ub1,lb2,ub2
877875
878876 do ivar= 1 ,ubound (this% hvars,1 )
879- associate( hvar = > this% hvars(ivar) )
880- if (hvar% upfreq == upfreq_in) then ! Only flush variables with update on dynamics step
881- call hvar% Flush(nc, this% dim_bounds, this% dim_kinds)
882- end if
883- end associate
877+ if (this% hvars(ivar)% upfreq == upfreq_in) then ! Only flush variables with update on dynamics step
878+ call this% hvars(ivar)% flush(nc, this% dim_bounds, this% dim_kinds)
879+
880+ end if
884881 end do
885882
886- end subroutine flush_hvars
883+ end subroutine flush_hvars
887884
888885
889886 ! =====================================================================================
@@ -916,7 +913,6 @@ subroutine set_history_var(this, vname, units, long, use_default, avgflag, vtype
916913 ! not used
917914
918915 ! locals
919- type (fates_history_variable_type), pointer :: hvar
920916 integer :: ub1, lb1, ub2, lb2 ! Bounds for allocating the var
921917 integer :: ityp
922918
@@ -1111,7 +1107,7 @@ subroutine update_history_dyn(this,nc,nsites,sites)
11111107 use EDTypesMod , only : nlevleaf
11121108
11131109 ! Arguments
1114- class(fates_history_interface_type) :: this
1110+ class(fates_history_interface_type) :: this
11151111 integer , intent (in ) :: nc ! clump index
11161112 integer , intent (in ) :: nsites
11171113 type (ed_site_type) , intent (inout ), target :: sites(nsites)
@@ -1136,7 +1132,6 @@ subroutine update_history_dyn(this,nc,nsites,sites)
11361132 real (r8 ) :: patch_scaling_scalar ! ratio of canopy to patch area for counteracting patch scaling
11371133 real (r8 ) :: dbh ! diameter ("at breast height")
11381134
1139- type (fates_history_variable_type),pointer :: hvar
11401135 type (ed_patch_type),pointer :: cpatch
11411136 type (ed_cohort_type),pointer :: ccohort
11421137
@@ -1895,7 +1890,6 @@ subroutine update_history_prod(this,nc,nsites,sites,dt_tstep)
18951890 real (r8 ), parameter :: tiny = 1.e-5_r8 ! some small number
18961891 integer :: ipa2 ! patch incrementer
18971892 integer :: cnlfpft_indx, cnlf_indx, ipft, ican, ileaf ! more iterators and indices
1898- type (fates_history_variable_type),pointer :: hvar
18991893 type (ed_patch_type),pointer :: cpatch
19001894 type (ed_cohort_type),pointer :: ccohort
19011895 real (r8 ) :: per_dt_tstep ! Time step in frequency units (/s)
@@ -2253,7 +2247,6 @@ subroutine update_history_hydraulics(this,nc,nsites,sites,dt_tstep)
22532247 integer :: ipa2 ! patch incrementer
22542248 integer :: iscpf ! index of the scpf group
22552249
2256- type (fates_history_variable_type),pointer :: hvar
22572250 type (ed_patch_type),pointer :: cpatch
22582251 type (ed_cohort_type),pointer :: ccohort
22592252 type (ed_cohort_hydr_type), pointer :: ccohort_hydr
0 commit comments