Skip to content

Commit

Permalink
Dead code removal of edpftconrd
Browse files Browse the repository at this point in the history
EDpftconrd was commented out in a previous commit, but it is no longer
needed and should have been completely removed.

Test suite: ed - yellowstone gnu, intel, pgi
Test baseline: ed-clm-3f3f16f
Test namelist changes: none
Test answer changes: bit for bit
Test summary: all tests pass
  • Loading branch information
bandre-ucar committed Feb 22, 2017
1 parent 3f3f16f commit db6b32d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 199 deletions.
190 changes: 0 additions & 190 deletions components/clm/src/ED/main/EDPftvarcon.F90
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ module EDPftvarcon
__FILE__
!
! !PUBLIC MEMBER FUNCTIONS:
public :: EDpftconrd ! Read and initialize vegetation (PFT) constants

!-----------------------------------------------------------------------

Expand Down Expand Up @@ -757,194 +756,5 @@ subroutine Receive_PFT_nvariants(this, fates_params)

end subroutine Receive_PFT_nvariants

!-----------------------------------------------------------------------
subroutine EDpftconrd( ncid )
!
! !DESCRIPTION:
! Read and initialize vegetation (PFT) constants
!
! !USES:
use ncdio_pio , only : file_desc_t, ncd_io
use abortutils , only : endrun
use shr_log_mod , only : errMsg => shr_log_errMsg
!
! !ARGUMENTS:
implicit none
!
type(file_desc_t), intent(inout) :: ncid ! pio netCDF file id

! !LOCAL VARIABLES:

logical :: readv ! read variable in or not
character(len=32) :: subname = 'EDpftconrd' ! subroutine name

!X! call ncd_io('max_dbh',EDPftvarcon_inst%max_dbh, 'read', ncid, readvar=readv)
!X! if ( .not. readv ) call endrun( trim(subname)//' ERROR: error in reading in pft data' )

!X! call ncd_io('freezetol',EDPftvarcon_inst%freezetol, 'read', ncid, readvar=readv)
!X! if ( .not. readv ) call endrun( trim(subname)//' ERROR: error in reading in pft data' )
!X!
!X! call ncd_io('wood_density',EDPftvarcon_inst%wood_density, 'read', ncid, readvar=readv)
!X! if ( .not. readv ) call endrun( trim(subname)//' ERROR: error in reading in pft data' )
!X!
!X! call ncd_io('alpha_stem',EDPftvarcon_inst%alpha_stem, 'read', ncid, readvar=readv)
!X! if ( .not. readv ) call endrun( trim(subname)//' ERROR: error in reading in pft data' )
!X!
!X! call ncd_io('hgt_min',EDPftvarcon_inst%hgt_min, 'read', ncid, readvar=readv)
!X! if ( .not. readv ) call endrun( trim(subname)//' ERROR: error in reading in pft data' )
!X!
!X! call ncd_io('cushion',EDPftvarcon_inst%cushion, 'read', ncid, readvar=readv)
!X! if ( .not. readv ) call endrun( trim(subname)//' ERROR: error in reading in pft data' )
!X!
!X! call ncd_io('leaf_stor_priority',EDPftvarcon_inst%leaf_stor_priority, 'read', ncid, readvar=readv)
!X! if ( .not. readv ) call endrun( trim(subname)//' ERROR: error in reading in pft data' )
!X!
!X! call ncd_io('leafwatermax',EDPftvarcon_inst%leafwatermax, 'read', ncid, readvar=readv)
!X! if ( .not. readv ) call endrun( trim(subname)//' ERROR: error in reading in pft data' )
!X!
!X! call ncd_io('rootresist',EDPftvarcon_inst%rootresist,'read', ncid, readvar=readv)
!X! if ( .not. readv ) call endrun( trim(subname)//' ERROR: error in reading in pft data' )
!X!
!X! call ncd_io('soilbeta',EDPftvarcon_inst%soilbeta,'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('crown',EDPftvarcon_inst%crown,'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('bark_scaler',EDPftvarcon_inst%bark_scaler,'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('crown_kill',EDPftvarcon_inst%crown_kill,'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('initd',EDPftvarcon_inst%initd,'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('sd_mort',EDPftvarcon_inst%sd_mort,'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('seed_rain',EDPftvarcon_inst%seed_rain,'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('BB_slope',EDPftvarcon_inst%BB_slope,'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('root_long',EDPftvarcon_inst%root_long, 'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('seed_alloc',EDPftvarcon_inst%seed_alloc, 'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('clone_alloc',EDPftvarcon_inst%clone_alloc, 'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('sapwood_ratio',EDPftvarcon_inst%sapwood_ratio, 'read', ncid, readvar=readv)
!X! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')
!X!
!X! call ncd_io('woody', EDPftvarcon_inst%woody, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('stress_decid', EDPftvarcon_inst%stress_decid, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('season_decid', EDPftvarcon_inst%season_decid, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('evergreen', EDPftvarcon_inst%evergreen, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('froot_leaf', EDPftvarcon_inst%froot_leaf, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('slatop', EDPftvarcon_inst%slatop, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('leaf_long', EDPftvarcon_inst%leaf_long, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))

!X! call ncd_io('rootprof_beta', EDPftvarcon_inst%rootprof_beta, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))

!X! call ncd_io('roota_par', EDPftvarcon_inst%roota_par, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('rootb_par', EDPftvarcon_inst%rootb_par, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('lf_flab', EDPftvarcon_inst%lf_flab, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('lf_fcel', EDPftvarcon_inst%lf_fcel, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('lf_flig', EDPftvarcon_inst%lf_flig, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('fr_flab', EDPftvarcon_inst%fr_flab, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('fr_fcel', EDPftvarcon_inst%fr_fcel, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('fr_flig', EDPftvarcon_inst%fr_flig, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))

!X! call ncd_io('rholvis', EDPftvarcon_inst%rhol(:,ivis), 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('rholnir', EDPftvarcon_inst%rhol(:,inir), 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('rhosvis', EDPftvarcon_inst%rhos(:,ivis), 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('rhosnir', EDPftvarcon_inst% rhos(:,inir), 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('taulvis', EDPftvarcon_inst%taul(:,ivis), 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('taulnir', EDPftvarcon_inst%taul(:,inir), 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('tausvis', EDPftvarcon_inst%taus(:,ivis), 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('tausnir', EDPftvarcon_inst%taus(:,inir), 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))

!X! call ncd_io('xl', EDPftvarcon_inst%xl, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('c3psn', EDPftvarcon_inst%c3psn, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('flnr', EDPftvarcon_inst%flnr, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('fnitr', EDPftvarcon_inst%fnitr, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('leafcn', EDPftvarcon_inst%leafcn, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('frootcn', EDPftvarcon_inst%frootcn, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('smpso', EDPftvarcon_inst%smpso, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('smpsc', EDPftvarcon_inst%smpsc, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))
!X!
!X! call ncd_io('grperc', EDPftvarcon_inst%grperc, 'read', ncid, readvar=readv, posNOTonfile=.true.)
!X! if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__))

! HOLDING ON SEW ENSITIVITY-ANALYSIS PARAMETERS UNTIL MACHINE CONFIGS SET RGK/CX
! call ncd_io('dbh2h_m',EDPftvarcon_inst%dbh2h_m, 'read', ncid, readvar=readv)
! if ( .not. readv) call endrun(trim(subname)// ' ERROR : error in reading in pft data')

end subroutine EDpftconrd

end module EDPftvarcon

10 changes: 1 addition & 9 deletions components/clm/src/utils/clmfates_paraminterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ subroutine FatesReadPFTs()
use spmdMod, only : masterproc

use FatesParametersInterface, only : fates_parameters_type
use EDPftvarcon , only : EDpftconrd, EDPftvarcon_inst
use EDPftvarcon , only : EDPftvarcon_inst

use fileutils , only : getfil
use ncdio_pio , only : file_desc_t, ncd_pio_closefile, ncd_pio_openfile
Expand All @@ -97,16 +97,8 @@ subroutine FatesReadPFTs()
call fates_params%Init()
call EDPftvarcon_inst%Init()

! FIXME(bja, 2017-01) old style read for some parameters, remove
! when all pfts are read with new infrastructure.
!X! call getfil (fates_paramfile, locfn, 0)
!X! call ncd_pio_openfile (ncid, trim(locfn), 0)
!X! call EDpftconrd ( ncid )
!X! call ncd_pio_closefile(ncid)

call EDPftvarcon_inst%Register(fates_params)


is_host_file = .false.
call ParametersFromNetCDF(fates_paramfile, is_host_file, fates_params)

Expand Down

0 comments on commit db6b32d

Please sign in to comment.