From f6054842a7f7c4b995402d69c9b03cf9cb0a78d8 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 17 Oct 2017 17:40:18 -0600 Subject: [PATCH] Shorten lines so can compile with nag compiler on hobart --- biogeochem/EDCohortDynamicsMod.F90 | 27 ++++++++++++++++++--------- biogeochem/EDPatchDynamicsMod.F90 | 6 ++++-- fire/SFMainMod.F90 | 3 ++- main/FatesHistoryInterfaceMod.F90 | 4 ++-- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 46f297da..aaed748f 100755 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -853,18 +853,27 @@ subroutine fuse_cohorts(patchptr, bc_in) currentCohort%fmort = (currentCohort%n*currentCohort%fmort + nextc%n*nextc%fmort)/newn ! npp diagnostics - currentCohort%npp_leaf = (currentCohort%n*currentCohort%npp_leaf + nextc%n*nextc%npp_leaf)/newn - currentCohort%npp_froot = (currentCohort%n*currentCohort%npp_froot + nextc%n*nextc%npp_froot)/newn - currentCohort%npp_bsw = (currentCohort%n*currentCohort%npp_bsw + nextc%n*nextc%npp_bsw)/newn - currentCohort%npp_bdead = (currentCohort%n*currentCohort%npp_bdead + nextc%n*nextc%npp_bdead)/newn - currentCohort%npp_bseed = (currentCohort%n*currentCohort%npp_bseed + nextc%n*nextc%npp_bseed)/newn - currentCohort%npp_store = (currentCohort%n*currentCohort%npp_store + nextc%n*nextc%npp_store)/newn + currentCohort%npp_leaf = (currentCohort%n*currentCohort%npp_leaf + nextc%n*nextc%npp_leaf) & + /newn + currentCohort%npp_froot = (currentCohort%n*currentCohort%npp_froot + nextc%n*nextc%npp_froot) & + /newn + currentCohort%npp_bsw = (currentCohort%n*currentCohort%npp_bsw + nextc%n*nextc%npp_bsw) & + /newn + currentCohort%npp_bdead = (currentCohort%n*currentCohort%npp_bdead + nextc%n*nextc%npp_bdead) & + /newn + currentCohort%npp_bseed = (currentCohort%n*currentCohort%npp_bseed + nextc%n*nextc%npp_bseed) & + /newn + currentCohort%npp_store = (currentCohort%n*currentCohort%npp_store + nextc%n*nextc%npp_store) & + /newn ! biomass and dbh tendencies currentCohort%ddbhdt = (currentCohort%n*currentCohort%ddbhdt + nextc%n*nextc%ddbhdt)/newn - currentCohort%dbalivedt = (currentCohort%n*currentCohort%dbalivedt + nextc%n*nextc%dbalivedt)/newn - currentCohort%dbdeaddt = (currentCohort%n*currentCohort%dbdeaddt + nextc%n*nextc%dbdeaddt)/newn - currentCohort%dbstoredt = (currentCohort%n*currentCohort%dbstoredt + nextc%n*nextc%dbstoredt)/newn + currentCohort%dbalivedt = (currentCohort%n*currentCohort%dbalivedt + nextc%n*nextc%dbalivedt) & + /newn + currentCohort%dbdeaddt = (currentCohort%n*currentCohort%dbdeaddt + nextc%n*nextc%dbdeaddt) & + /newn + currentCohort%dbstoredt = (currentCohort%n*currentCohort%dbstoredt + nextc%n*nextc%dbstoredt) & + /newn do i=1, nlevleaf if (currentCohort%year_net_uptake(i) == 999._r8 .or. nextc%year_net_uptake(i) == 999._r8) then diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index 4bbf6194..24da7600 100755 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -530,8 +530,10 @@ subroutine average_patch_properties( currentPatch, newPatch, patch_site_areadis ! some of their area has been carved out for this new patches which is receiving donations. ! Lets maintain conservation on that pre-existing mass flux in these newly disturbed patches - newPatch%root_litter_out(p) = newPatch%root_litter_out(p) + currentPatch%root_litter_out(p) * patch_site_areadis/newPatch%area - newPatch%leaf_litter_out(p) = newPatch%leaf_litter_out(p) + currentPatch%leaf_litter_out(p) * patch_site_areadis/newPatch%area + newPatch%root_litter_out(p) = newPatch%root_litter_out(p) + currentPatch%root_litter_out(p) * & + patch_site_areadis/newPatch%area + newPatch%leaf_litter_out(p) = newPatch%leaf_litter_out(p) + currentPatch%leaf_litter_out(p) * & + patch_site_areadis/newPatch%area enddo diff --git a/fire/SFMainMod.F90 b/fire/SFMainMod.F90 index 8a5ab941..8980b3ca 100755 --- a/fire/SFMainMod.F90 +++ b/fire/SFMainMod.F90 @@ -468,7 +468,8 @@ subroutine rate_of_spread ( currentSite ) if (DEBUG) then if ( hlm_masterproc == itrue .and.DEBUG) write(fates_log(),*) 'SF - c ',c - if ( hlm_masterproc == itrue .and.DEBUG) write(fates_log(),*) 'SF - currentPatch%effect_wspeed ',currentPatch%effect_wspeed + if ( hlm_masterproc == itrue .and.DEBUG) write(fates_log(),*) 'SF - currentPatch%effect_wspeed ', & + currentPatch%effect_wspeed if ( hlm_masterproc == itrue .and.DEBUG) write(fates_log(),*) 'SF - b ',b if ( hlm_masterproc == itrue .and.DEBUG) write(fates_log(),*) 'SF - beta_ratio ',beta_ratio if ( hlm_masterproc == itrue .and.DEBUG) write(fates_log(),*) 'SF - e ',e diff --git a/main/FatesHistoryInterfaceMod.F90 b/main/FatesHistoryInterfaceMod.F90 index 740955d7..d5509351 100644 --- a/main/FatesHistoryInterfaceMod.F90 +++ b/main/FatesHistoryInterfaceMod.F90 @@ -2964,8 +2964,8 @@ subroutine define_history_vars(this, initialize_variables) upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_nplant_understory_si_scag ) call this%set_history_var(vname='DDBH_CANOPY_SCAG',units = 'cm/yr/ha', & - long='growth rate of canopy plantsnumber of plants per hectare in canopy in each size x age class', use_default='inactive', & - avgflag='A', vtype=site_scag_r8, hlms='CLM:ALM', flushval=0.0_r8, & + long='growth rate of canopy plantsnumber of plants per hectare in canopy in each size x age class', & + use_default='inactive', avgflag='A', vtype=site_scag_r8, hlms='CLM:ALM', flushval=0.0_r8, & upfreq=1, ivar=ivar, initialize=initialize_variables, index = ih_ddbh_canopy_si_scag ) call this%set_history_var(vname='DDBH_UNDERSTORY_SCAG',units = 'cm/yr/ha', &