@@ -869,20 +869,17 @@ subroutine flush_hvars(this,nc,upfreq_in)
869869 class(fates_history_interface_type) :: this
870870 integer ,intent (in ) :: nc
871871 integer ,intent (in ) :: upfreq_in
872-
873872 integer :: ivar
874- type (fates_history_variable_type),pointer :: hvar
875873 integer :: lb1,ub1,lb2,ub2
876874
877875 do ivar= 1 ,ubound (this% hvars,1 )
878- associate( hvar = > this% hvars(ivar) )
879- if (hvar% upfreq == upfreq_in) then ! Only flush variables with update on dynamics step
880- call hvar% Flush(nc, this% dim_bounds, this% dim_kinds)
881- end if
882- end associate
876+ if (this% hvars(ivar)% upfreq == upfreq_in) then ! Only flush variables with update on dynamics step
877+ call this% hvars(ivar)% flush(nc, this% dim_bounds, this% dim_kinds)
878+
879+ end if
883880 end do
884881
885- end subroutine flush_hvars
882+ end subroutine flush_hvars
886883
887884
888885 ! =====================================================================================
@@ -915,7 +912,6 @@ subroutine set_history_var(this, vname, units, long, use_default, avgflag, vtype
915912 ! not used
916913
917914 ! locals
918- type (fates_history_variable_type), pointer :: hvar
919915 integer :: ub1, lb1, ub2, lb2 ! Bounds for allocating the var
920916 integer :: ityp
921917
@@ -1110,7 +1106,7 @@ subroutine update_history_dyn(this,nc,nsites,sites)
11101106 use EDTypesMod , only : nlevleaf
11111107
11121108 ! Arguments
1113- class(fates_history_interface_type) :: this
1109+ class(fates_history_interface_type) :: this
11141110 integer , intent (in ) :: nc ! clump index
11151111 integer , intent (in ) :: nsites
11161112 type (ed_site_type) , intent (inout ), target :: sites(nsites)
@@ -1135,7 +1131,6 @@ subroutine update_history_dyn(this,nc,nsites,sites)
11351131 real (r8 ) :: patch_scaling_scalar ! ratio of canopy to patch area for counteracting patch scaling
11361132 real (r8 ) :: dbh ! diameter ("at breast height")
11371133
1138- type (fates_history_variable_type),pointer :: hvar
11391134 type (ed_patch_type),pointer :: cpatch
11401135 type (ed_cohort_type),pointer :: ccohort
11411136
@@ -1888,7 +1883,6 @@ subroutine update_history_prod(this,nc,nsites,sites,dt_tstep)
18881883 real (r8 ), parameter :: tiny = 1.e-5_r8 ! some small number
18891884 integer :: ipa2 ! patch incrementer
18901885 integer :: cnlfpft_indx, cnlf_indx, ipft, ican, ileaf ! more iterators and indices
1891- type (fates_history_variable_type),pointer :: hvar
18921886 type (ed_patch_type),pointer :: cpatch
18931887 type (ed_cohort_type),pointer :: ccohort
18941888 real (r8 ) :: per_dt_tstep ! Time step in frequency units (/s)
@@ -2246,7 +2240,6 @@ subroutine update_history_hydraulics(this,nc,nsites,sites,dt_tstep)
22462240 integer :: ipa2 ! patch incrementer
22472241 integer :: iscpf ! index of the scpf group
22482242
2249- type (fates_history_variable_type),pointer :: hvar
22502243 type (ed_patch_type),pointer :: cpatch
22512244 type (ed_cohort_type),pointer :: ccohort
22522245 type (ed_cohort_hydr_type), pointer :: ccohort_hydr
0 commit comments