diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index fb1a25db37..b67ff853ac 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -24,6 +24,7 @@ module histFileMod use PatchType , only : patch use EDParamsMod , only : nclmax use EDParamsMod , only : nlevleaf + use EDParamsMod , only : num_emission_compounds use FatesInterfaceTypesMod , only : nlevsclass, nlevage, nlevcoage use FatesInterfaceTypesMod , only : nlevheight use FatesInterfaceTypesMod , only : nlevdamage @@ -2498,6 +2499,7 @@ subroutine htape_create (t, histrest) call ncd_defdim(lnfid, 'fates_levage', nlevage, dimid) call ncd_defdim(lnfid, 'fates_levheight', nlevheight, dimid) call ncd_defdim(lnfid, 'fates_levfuel', nfsc, dimid) + call ncd_defdim(lnfid, 'fates_levemis', num_emission_compounds, dimid) call ncd_defdim(lnfid, 'fates_levcwdsc', ncwd, dimid) call ncd_defdim(lnfid, 'fates_levscpf', nlevsclass*numpft_fates, dimid) call ncd_defdim(lnfid, 'fates_levcapf', nlevcoage*numpft_fates, dimid) @@ -3045,6 +3047,7 @@ subroutine htape_timeconst(t, mode) use FatesInterfaceTypesMod, only : fates_hdim_agmap_levagepft use FatesInterfaceTypesMod, only : fates_hdim_pftmap_levagepft use FatesInterfaceTypesMod, only : fates_hdim_levfuel + use FatesInterfaceTypesMod, only : fates_hdim_levemis use FatesInterfaceTypesMod, only : fates_hdim_levdamage use FatesInterfaceTypesMod, only : fates_hdim_levcwdsc use FatesInterfaceTypesMod, only : fates_hdim_levcan @@ -3155,6 +3158,8 @@ subroutine htape_timeconst(t, mode) long_name='FATES pft number', ncid=nfid(t)) call ncd_defvar(varname='fates_levfuel',xtype=ncd_int, dim1name='fates_levfuel', & long_name='FATES fuel index', ncid=nfid(t)) + call ncd_defvar(varname='fates_levemis',xtype=ncd_int, dim1name='fates_levemis', & + long_name='FATES fire emissions index', ncid=nfid(t)) call ncd_defvar(varname='fates_levcwdsc',xtype=ncd_int, dim1name='fates_levcwdsc', & long_name='FATES cwd size class', ncid=nfid(t)) call ncd_defvar(varname='fates_levcan',xtype=ncd_int, dim1name='fates_levcan', & @@ -3227,6 +3232,7 @@ subroutine htape_timeconst(t, mode) call ncd_io(varname='fates_levheight',data=fates_hdim_levheight, ncid=nfid(t), flag='write') call ncd_io(varname='fates_levpft',data=fates_hdim_levpft, ncid=nfid(t), flag='write') call ncd_io(varname='fates_levfuel',data=fates_hdim_levfuel, ncid=nfid(t), flag='write') + call ncd_io(varname='fates_levemis',data=fates_hdim_levemis, ncid=nfid(t), flag='write') call ncd_io(varname='fates_levcdam',data=fates_hdim_levdamage, ncid=nfid(t), flag='write') call ncd_io(varname='fates_levcwdsc',data=fates_hdim_levcwdsc, ncid=nfid(t), flag='write') call ncd_io(varname='fates_levcan',data=fates_hdim_levcan, ncid=nfid(t), flag='write') @@ -5520,6 +5526,8 @@ subroutine hist_addfld2d (fname, type2d, units, avgflag, long_name, type1d_out, num2d = nlevage case ('fates_levheight') num2d = nlevheight + case ('fates_levemis') + num2d = num_emission_compounds case ('fates_levfuel') num2d = nfsc case ('fates_levcwdsc') diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 7039884847..1f856859e2 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -1540,9 +1540,14 @@ subroutine wrap_update_hlmfates_dyn(this, nc, bounds_clump, & z0m(p) = this%fates(nc)%bc_out(s)%z0m_pa(ifp) displa(p) = this%fates(nc)%bc_out(s)%displa_pa(ifp) dleaf_patch(p) = this%fates(nc)%bc_out(s)%dleaf_pa(ifp) - end do ! veg pach - if(abs(areacheck - 1.0_r8).gt.1.e-9_r8)then + if(this%fates(nc)%bc_out(s)%fire_emissions_pa(ifp,1).gt.0_r8)then + write(*,*) 'positive fire emissions',this%fates(nc)%bc_out(s)%fire_emissions_pa(ifp,1) + endif + + end do ! veg pach + + if(abs(areacheck - 1.0_r8).gt.1.e-9_r8)then write(iulog,*) 'area wrong in interface',areacheck - 1.0_r8 call endrun(msg=errMsg(sourcefile, __LINE__)) endif @@ -3113,7 +3118,7 @@ subroutine init_history_io(this,bounds_proc) use FatesConstantsMod, only : fates_short_string_length, fates_long_string_length use FatesIOVariableKindMod, only : site_r8, site_soil_r8, site_size_pft_r8 use FatesIOVariableKindMod, only : site_size_r8, site_pft_r8, site_age_r8 - use FatesIOVariableKindMod, only : site_coage_r8, site_coage_pft_r8 + use FatesIOVariableKindMod, only : site_coage_r8, site_coage_pft_r8, site_emis_r8 use FatesIOVariableKindMod, only : site_fuel_r8, site_cwdsc_r8, site_scag_r8 use FatesIOVariableKindMod, only : site_scagpft_r8, site_agepft_r8 use FatesIOVariableKindMod, only : site_can_r8, site_cnlf_r8, site_cnlfpft_r8 @@ -3218,7 +3223,7 @@ subroutine init_history_io(this,bounds_proc) set_lake=0._r8,set_urb=0._r8) case(site_soil_r8, site_size_pft_r8, site_size_r8, site_pft_r8, & - site_age_r8, site_height_r8, site_coage_r8,site_coage_pft_r8, & + site_age_r8, site_emis_r8, site_height_r8, site_coage_r8,site_coage_pft_r8, & site_fuel_r8, site_cwdsc_r8, site_clscpf_r8, & site_can_r8,site_cnlf_r8, site_cnlfpft_r8, site_scag_r8, & site_scagpft_r8, site_agepft_r8, site_elem_r8, site_elpft_r8, &