Skip to content

Commit bb4287c

Browse files
ckovenglemieux
authored andcommitted
elm-side bugfixes for lupft-dimensioned hist vars
1 parent a3d323d commit bb4287c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

components/elm/src/main/elmfates_interfaceMod.F90

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3337,7 +3337,7 @@ subroutine init_history_io(this,bounds_proc)
33373337
use FatesIOVariableKindMod, only : site_coage_r8, site_coage_pft_r8
33383338
use FatesIOVariableKindMod, only : site_can_r8, site_cnlf_r8, site_cnlfpft_r8
33393339
use FatesIOVariableKindMod, only : site_cdpf_r8, site_cdsc_r8, site_cdam_r8
3340-
use FatesIOVariableKindMod, only : site_landuse_r8, site_lulu_r8
3340+
use FatesIOVariableKindMod, only : site_landuse_r8, site_lulu_r8, site_lupft_r8
33413341
use FatesIODimensionsMod, only : fates_bounds_type
33423342

33433343

@@ -3439,7 +3439,7 @@ subroutine init_history_io(this,bounds_proc)
34393439
site_scagpft_r8, site_agepft_r8, site_elem_r8, site_elpft_r8, &
34403440
site_elcwd_r8, site_elage_r8, site_coage_r8, site_coage_pft_r8, &
34413441
site_agefuel_r8,site_cdsc_r8, site_cdpf_r8, site_cdam_r8, &
3442-
site_landuse_r8, site_lulu_r8)
3442+
site_landuse_r8, site_lulu_r8, site_lupft_r8)
34433443

34443444
d_index = fates_hist%dim_kinds(dk_index)%dim2_index
34453445
dim2name = fates_hist%dim_bounds(d_index)%name
@@ -3797,6 +3797,9 @@ subroutine hlm_bounds_to_fates_bounds(hlm, fates)
37973797
fates%lulu_begin = 1
37983798
fates%lulu_end = n_landuse_cats * n_landuse_cats
37993799

3800+
fates%lupft_begin = 1
3801+
fates%lupft_end = n_landuse_cats * numpft_fates
3802+
38003803
end subroutine hlm_bounds_to_fates_bounds
38013804

38023805
! ======================================================================================

components/elm/src/main/histFileMod.F90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,6 +1958,7 @@ subroutine htape_create (t, histrest)
19581958
call ncd_defdim(lnfid, 'fates_levagefuel', nlevage_fates * nfc_fates, dimid)
19591959
call ncd_defdim(lnfid, 'fates_levlanduse', n_landuse_cats, dimid)
19601960
call ncd_defdim(lnfid, 'fates_levlulu', n_landuse_cats * n_landuse_cats, dimid)
1961+
call ncd_defdim(lnfid, 'fates_levlupft', n_landuse_cats * numpft_fates, dimid)
19611962
end if
19621963

19631964
if ( .not. lhistrest )then
@@ -4856,6 +4857,8 @@ subroutine hist_addfld2d (fname, type2d, units, avgflag, long_name, type1d_out,
48564857
num2d = n_landuse_cats
48574858
case ('fates_levlulu')
48584859
num2d = n_landuse_cats * n_landuse_cats
4860+
case ('fates_levlupft')
4861+
num2d = n_landuse_cats * numpft_fates
48594862
case ('fates_levage')
48604863
num2d = nlevage_fates
48614864
case ('fates_levfuel')

0 commit comments

Comments
 (0)