diff --git a/ldt/DAobs/ASCAT_TUW/readASCATTUWsmObs.F90 b/ldt/DAobs/ASCAT_TUW/readASCATTUWsmObs.F90 index 445d401e1..561c01d76 100644 --- a/ldt/DAobs/ASCAT_TUW/readASCATTUWsmObs.F90 +++ b/ldt/DAobs/ASCAT_TUW/readASCATTUWsmObs.F90 @@ -129,7 +129,7 @@ subroutine read_ASCATTUW_data(n, odir, yr,mo,da,sm_data) ! !EOP real, parameter :: err_threshold = 0.03 - character*200 :: ls_comm, cmd2 + character(len=LDT_CONST_PATH_LEN) :: ls_comm, cmd2 character(len=LDT_CONST_PATH_LEN) :: fname integer :: ftn1, ftn2 integer :: fsize,n_data diff --git a/ldt/DAobs/Aquarius_L2sm/readAquariusL2smObs.F90 b/ldt/DAobs/Aquarius_L2sm/readAquariusL2smObs.F90 index f749b44bd..cc21db7f4 100644 --- a/ldt/DAobs/Aquarius_L2sm/readAquariusL2smObs.F90 +++ b/ldt/DAobs/Aquarius_L2sm/readAquariusL2smObs.F90 @@ -42,12 +42,11 @@ subroutine readAquariusL2smObs(n) logical :: alarmCheck logical :: file_exists integer :: c,r,i,j - character(len=LDT_CONST_PATH_LEN) :: fname character(len=LDT_CONST_PATH_LEN) :: aquarius_filename character*7 :: yyyyddd character*4 :: fyr character*2 :: fmo,fda - character*200 :: list_files + character(len=LDT_CONST_PATH_LEN) :: list_files integer :: sind integer :: yr,doy,mo,da,hr,mn,ss integer :: ftn diff --git a/ldt/DAobs/CDFS_GVF/CDFS_GVF_obsMod.F90 b/ldt/DAobs/CDFS_GVF/CDFS_GVF_obsMod.F90 index a99cef84a..1ac513743 100644 --- a/ldt/DAobs/CDFS_GVF/CDFS_GVF_obsMod.F90 +++ b/ldt/DAobs/CDFS_GVF/CDFS_GVF_obsMod.F90 @@ -19,6 +19,7 @@ module CDFSGVFobsMod ! !USES: use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use map_utils implicit none @@ -35,7 +36,7 @@ module CDFSGVFobsMod !EOP type, public :: cdfsgvfdec - character*100 :: odir + character(len=LDT_CONST_PATH_LEN) :: odir integer :: nc, nr real :: gridDesci(50) real, allocatable :: gvfobs(:,:) diff --git a/ldt/DAobs/CDFS_GVF/readCDFS_GVFObs.F90 b/ldt/DAobs/CDFS_GVF/readCDFS_GVFObs.F90 index 0c56f8720..ed7f488e5 100644 --- a/ldt/DAobs/CDFS_GVF/readCDFS_GVFObs.F90 +++ b/ldt/DAobs/CDFS_GVF/readCDFS_GVFObs.F90 @@ -20,6 +20,7 @@ subroutine readCDFS_GVFObs(n) ! !USES: use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_logMod use LDT_DAobsDataMod @@ -40,7 +41,7 @@ subroutine readCDFS_GVFObs(n) logical :: alarmCheck logical :: file_exists integer :: c,r - character*100 :: fname + character(len=LDT_CONST_PATH_LEN) :: fname real :: gvfobs(LDT_rc%lnc(n)*LDT_rc%lnr(n)) !----------------------------------------------------------------------- diff --git a/ldt/DAobs/GEOS_FP_TEFFobs/GEOSTEFF_obsMod.F90 b/ldt/DAobs/GEOS_FP_TEFFobs/GEOSTEFF_obsMod.F90 index 0d58f2891..7faa7ff08 100644 --- a/ldt/DAobs/GEOS_FP_TEFFobs/GEOSTEFF_obsMod.F90 +++ b/ldt/DAobs/GEOS_FP_TEFFobs/GEOSTEFF_obsMod.F90 @@ -19,6 +19,7 @@ module GEOSTEFF_obsMod ! !USES: use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN implicit none @@ -34,7 +35,7 @@ module GEOSTEFF_obsMod !EOP type, public :: geoTeffdec - character*100 :: odir + character(len=LDT_CONST_PATH_LEN) :: odir integer :: nc, nr real :: gridDesci(50) real, allocatable :: teffobs(:,:) diff --git a/ldt/DAobs/GEOS_FP_TEFFobs/readGEOSTEFFObs.F90 b/ldt/DAobs/GEOS_FP_TEFFobs/readGEOSTEFFObs.F90 index e7a91f891..16f827afe 100644 --- a/ldt/DAobs/GEOS_FP_TEFFobs/readGEOSTEFFObs.F90 +++ b/ldt/DAobs/GEOS_FP_TEFFobs/readGEOSTEFFObs.F90 @@ -20,6 +20,7 @@ subroutine readGEOSTEFFObs(n) ! !USES: use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_logMod use LDT_DAobsDataMod @@ -39,7 +40,7 @@ subroutine readGEOSTEFFObs(n) logical :: file_exists integer :: c,r - character*100 :: fname + character(len=LDT_CONST_PATH_LEN) :: fname real :: tsoil01obs(LDT_rc%lnc(n)*LDT_rc%lnr(n)) real :: tsoil02obs(LDT_rc%lnc(n)*LDT_rc%lnr(n)) real :: kk, cc_6am, cc_6pm !parameters for calculating effective soil temperature diff --git a/ldt/DAobs/GRACE_tws/readGRACEtwsObs.F90 b/ldt/DAobs/GRACE_tws/readGRACEtwsObs.F90 index 16acf7321..71ecb431b 100644 --- a/ldt/DAobs/GRACE_tws/readGRACEtwsObs.F90 +++ b/ldt/DAobs/GRACE_tws/readGRACEtwsObs.F90 @@ -853,7 +853,7 @@ subroutine create_lsm_twsoutput_filename(n, form, fname, odir, wstyle, wopt,mnam character(len=1) :: fproj integer :: curr_mo = 0 character(len=LDT_CONST_PATH_LEN) :: dname - character(len=200), save :: out_fname + character(len=LDT_CONST_PATH_LEN), save :: out_fname integer :: i, c !ag (21Dec2017) diff --git a/ldt/DAobs/LISlsmPrecipobs/LISlsmPrecip_obsMod.F90 b/ldt/DAobs/LISlsmPrecipobs/LISlsmPrecip_obsMod.F90 index e4cd01de1..93fb77d2e 100644 --- a/ldt/DAobs/LISlsmPrecipobs/LISlsmPrecip_obsMod.F90 +++ b/ldt/DAobs/LISlsmPrecipobs/LISlsmPrecip_obsMod.F90 @@ -23,6 +23,8 @@ module LISlsmPrecip_obsMod ! 16 Nov 2021 Mahdi Navari Initial Specification (based on LISlsmSM_obsMod) ! + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + PRIVATE !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: @@ -45,7 +47,7 @@ module LISlsmPrecip_obsMod character*50 :: format character*50 :: wstyle character*50 :: wopt - character*100 :: odir + character(len=LDT_CONST_PATH_LEN) :: odir character*20 :: security_class character*20 :: distribution_class character*20 :: data_category diff --git a/ldt/DAobs/LISlsmPrecipobs/readLISlsmPrecipobs.F90 b/ldt/DAobs/LISlsmPrecipobs/readLISlsmPrecipobs.F90 index 71e38a895..cc62790dd 100644 --- a/ldt/DAobs/LISlsmPrecipobs/readLISlsmPrecipobs.F90 +++ b/ldt/DAobs/LISlsmPrecipobs/readLISlsmPrecipobs.F90 @@ -24,6 +24,7 @@ subroutine readLISlsmPrecipobs(n) #if (defined USE_GRIBAPI) use grib_api #endif + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_DAobsDataMod use LDT_historyMod @@ -39,7 +40,7 @@ subroutine readLISlsmPrecipobs(n) integer, intent(in) :: n - character*200 :: fname + character(len=LDT_CONST_PATH_LEN) :: fname logical :: file_exists real :: precip_data(LDT_rc%lnc(n),LDT_rc%lnr(n)) @@ -215,6 +216,7 @@ subroutine create_lsm_output_fname(n, form, fname, odir, wstyle, wopt, & distribution_class, data_category, & area_of_data, write_interval) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod @@ -301,8 +303,8 @@ subroutine create_lsm_output_fname(n, form, fname, odir, wstyle, wopt, & character*1 :: fres1(10) character(len=1) :: fproj integer :: curr_mo = 0 - character(len=200) :: dname - character(len=200), save :: out_fname + character(len=LDT_CONST_PATH_LEN) :: dname + character(len=LDT_CONST_PATH_LEN), save :: out_fname integer :: i, c mname = 'SURFACEMODEL' diff --git a/ldt/DAobs/LISlsmTEFFobs/LISlsmTEFF_obsMod.F90 b/ldt/DAobs/LISlsmTEFFobs/LISlsmTEFF_obsMod.F90 index 5057275fb..3cc7e4733 100644 --- a/ldt/DAobs/LISlsmTEFFobs/LISlsmTEFF_obsMod.F90 +++ b/ldt/DAobs/LISlsmTEFFobs/LISlsmTEFF_obsMod.F90 @@ -24,6 +24,8 @@ module LISlsmTEFF_obsMod ! 01 Nov 2021 Yonghwan Kwon: Modified for effective soil temperature ! + use LDT_constantsMod, only : LDT_CONST_PATH_LEN + PRIVATE !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: @@ -46,7 +48,7 @@ module LISlsmTEFF_obsMod character*50 :: format character*50 :: wstyle character*50 :: wopt - character*100 :: odir + character(len=LDT_CONST_PATH_LEN) :: odir character*20 :: security_class character*20 :: distribution_class character*20 :: data_category diff --git a/ldt/DAobs/LISlsmTEFFobs/readLISlsmTEFFObs.F90 b/ldt/DAobs/LISlsmTEFFobs/readLISlsmTEFFObs.F90 index 71a8da85a..8608ca521 100644 --- a/ldt/DAobs/LISlsmTEFFobs/readLISlsmTEFFObs.F90 +++ b/ldt/DAobs/LISlsmTEFFobs/readLISlsmTEFFObs.F90 @@ -22,6 +22,7 @@ subroutine readLISlsmTEFFobs(n) #if (defined USE_GRIBAPI) use grib_api #endif + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_DAobsDataMod use LDT_historyMod @@ -38,7 +39,7 @@ subroutine readLISlsmTEFFobs(n) integer, intent(in) :: n - character*200 :: fname + character(len=LDT_CONST_PATH_LEN) :: fname logical :: file_exists real :: teff_data(LDT_rc%lnc(n),LDT_rc%lnr(n)) @@ -228,6 +229,7 @@ subroutine create_lsm_teff_output_filename(n, form, fname, odir, wstyle, wopt, & distribution_class, data_category, & area_of_data, write_interval) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod @@ -314,8 +316,8 @@ subroutine create_lsm_teff_output_filename(n, form, fname, odir, wstyle, wopt, & character*1 :: fres1(10) character(len=1) :: fproj integer :: curr_mo = 0 - character(len=200) :: dname - character(len=200), save :: out_fname + character(len=LDT_CONST_PATH_LEN) :: dname + character(len=LDT_CONST_PATH_LEN), save :: out_fname integer :: i, c mname = 'SURFACEMODEL' diff --git a/ldt/DAobs/NASA_SMAPsm/readNASASMAPsmObs.F90 b/ldt/DAobs/NASA_SMAPsm/readNASASMAPsmObs.F90 index eca37bcf7..c7a65a6fb 100644 --- a/ldt/DAobs/NASA_SMAPsm/readNASASMAPsmObs.F90 +++ b/ldt/DAobs/NASA_SMAPsm/readNASASMAPsmObs.F90 @@ -62,7 +62,7 @@ subroutine readNASASMAPsmObs(n) character*8 :: yyyymmdd character*4 :: yyyy character*2 :: mm, dd, hh - character*200 :: list_files + character(len=LDT_CONST_PATH_LEN) :: list_files character(len=LDT_CONST_PATH_LEN) :: smap_filename(10) real :: smobs(LDT_rc%lnc(n)*LDT_rc%lnr(n)) character(len=3) :: CRID diff --git a/ldt/DAobs/NASA_SMAPvod/readNASASMAPvodObs.F90 b/ldt/DAobs/NASA_SMAPvod/readNASASMAPvodObs.F90 index f892bfc06..d8cfeb37e 100644 --- a/ldt/DAobs/NASA_SMAPvod/readNASASMAPvodObs.F90 +++ b/ldt/DAobs/NASA_SMAPvod/readNASASMAPvodObs.F90 @@ -52,7 +52,7 @@ subroutine readNASASMAPvodObs(n) character*8 :: yyyymmdd character*4 :: yyyy character*2 :: mm,dd,hh - character*200 :: list_files + character(len=LDT_CONST_PATH_LEN) :: list_files character(len=LDT_CONST_PATH_LEN) :: fname character(len=LDT_CONST_PATH_LEN) :: smap_filename(10) real :: vod_out(LDT_rc%lnc(n)*LDT_rc%lnr(n)) diff --git a/ldt/DAobs/SMAP_E_OPLsm/SMAPEOPL_SM_obsMod.F90 b/ldt/DAobs/SMAP_E_OPLsm/SMAPEOPL_SM_obsMod.F90 index b08c69b6d..695b1bbfe 100644 --- a/ldt/DAobs/SMAP_E_OPLsm/SMAPEOPL_SM_obsMod.F90 +++ b/ldt/DAobs/SMAP_E_OPLsm/SMAPEOPL_SM_obsMod.F90 @@ -19,6 +19,7 @@ module SMAPEOPLSMobsMod ! !USES: use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use map_utils implicit none @@ -35,7 +36,7 @@ module SMAPEOPLSMobsMod !EOP type, public :: smapeoplsmdec - character*100 :: odir + character(len=LDT_CONST_PATH_LEN) :: odir integer :: nc, nr real :: gridDesci(50) real, allocatable :: smobs(:,:) diff --git a/ldt/DAobs/SMAP_E_OPLsm/readSMAPEOPL_SMObs.F90 b/ldt/DAobs/SMAP_E_OPLsm/readSMAPEOPL_SMObs.F90 index 1dd82949a..91488f1a1 100644 --- a/ldt/DAobs/SMAP_E_OPLsm/readSMAPEOPL_SMObs.F90 +++ b/ldt/DAobs/SMAP_E_OPLsm/readSMAPEOPL_SMObs.F90 @@ -20,6 +20,7 @@ subroutine readSMAPEOPL_SMObs(n) ! !USES: use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_logMod use LDT_timeMgrMod @@ -39,14 +40,14 @@ subroutine readSMAPEOPL_SMObs(n) real*8 :: timenow real :: smobs(LDT_rc%lnc(n)*LDT_rc%lnr(n)) - character*100 :: fname + character(len=LDT_CONST_PATH_LEN) :: fname integer :: mn_ind integer :: mn, ss integer :: doy character*8 :: yyyymmdd character*2 :: hh - character*200 :: list_files - character*100 :: smap_filename(10) + character(len=LDT_CONST_PATH_LEN) :: list_files + character(len=LDT_CONST_PATH_LEN) :: smap_filename(10) integer :: i integer :: ftn, ierr real :: gmt diff --git a/ldt/DAobs/SMOS_L2sm/readSMOSL2smObs.F90 b/ldt/DAobs/SMOS_L2sm/readSMOSL2smObs.F90 index 6d2b198fd..a1a0c41ad 100644 --- a/ldt/DAobs/SMOS_L2sm/readSMOSL2smObs.F90 +++ b/ldt/DAobs/SMOS_L2sm/readSMOSL2smObs.F90 @@ -98,10 +98,9 @@ subroutine readSMOSL2smObs(n) logical :: alarmCheck logical :: file_exists integer :: c,r,i,j - character(len=LDT_CONST_PATH_LEN) :: fname character(len=LDT_CONST_PATH_LEN) :: smos_filename character*8 :: yyyymmdd - character*200 :: list_files + character(len=LDT_CONST_PATH_LEN) :: list_files integer :: sind integer :: yr,mo,da,hr,mn,ss integer :: ftn diff --git a/ldt/DAobs/SMOS_NRTNN_L2sm/readSMOSNRTNNL2smObs.F90 b/ldt/DAobs/SMOS_NRTNN_L2sm/readSMOSNRTNNL2smObs.F90 index f202348eb..e05a946a1 100644 --- a/ldt/DAobs/SMOS_NRTNN_L2sm/readSMOSNRTNNL2smObs.F90 +++ b/ldt/DAobs/SMOS_NRTNN_L2sm/readSMOSNRTNNL2smObs.F90 @@ -54,7 +54,6 @@ subroutine readSMOSNRTNNL2smObs(n) logical :: file_exists integer :: c, r, i, j character(len=LDT_CONST_PATH_LEN) :: fname - character(len=LDT_CONST_PATH_LEN) :: nc_filename integer :: mn_ind integer :: yr, mo, da, hr, mn, ss integer :: doy @@ -66,7 +65,7 @@ subroutine readSMOSNRTNNL2smObs(n) character*8 :: yyyymmdd character*4 :: yyyy character*2 :: mm, dd, hh - character*100 :: list_files + character(len=LDT_CONST_PATH_LEN) :: list_files character(len=LDT_CONST_PATH_LEN) :: smos_filename(10) real :: smobs(LDT_rc%lnc(n)*LDT_rc%lnr(n)) integer :: lat_varid, lon_varid, sm_varid, dim_ids(2) @@ -145,6 +144,7 @@ subroutine read_SMOSNRTL2sm_data(n, fname, smobs_inp) #if(defined USE_NETCDF3 || defined USE_NETCDF4) use netcdf #endif + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_logMod use LDT_timeMgrMod @@ -156,7 +156,7 @@ subroutine read_SMOSNRTL2sm_data(n, fname, smobs_inp) ! !INPUT PARAMETERS: ! integer :: n - character (len=200) :: fname + character(len=LDT_CONST_PATH_LEN) :: fname real :: smobs_inp(LDT_rc%lnc(n),LDT_rc%lnr(n)) !real*8 :: time diff --git a/ldt/DAobs/VIIRS_GVF/VIIRS_GVF_obsMod.F90 b/ldt/DAobs/VIIRS_GVF/VIIRS_GVF_obsMod.F90 index 01dc43f22..420d71d2c 100644 --- a/ldt/DAobs/VIIRS_GVF/VIIRS_GVF_obsMod.F90 +++ b/ldt/DAobs/VIIRS_GVF/VIIRS_GVF_obsMod.F90 @@ -19,6 +19,7 @@ module VIIRSGVFobsMod ! !USES: use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use map_utils implicit none @@ -35,7 +36,7 @@ module VIIRSGVFobsMod !EOP type, public :: viirsgvfdec - character*100 :: odir + character(len=LDT_CONST_PATH_LEN) :: odir integer :: nc, nr real :: gridDesci(50) real, allocatable :: gvfobs(:,:) diff --git a/ldt/DAobs/VIIRS_GVF/readVIIRS_GVFObs.F90 b/ldt/DAobs/VIIRS_GVF/readVIIRS_GVFObs.F90 index 5842ad0fb..998cc3ae8 100644 --- a/ldt/DAobs/VIIRS_GVF/readVIIRS_GVFObs.F90 +++ b/ldt/DAobs/VIIRS_GVF/readVIIRS_GVFObs.F90 @@ -20,6 +20,7 @@ subroutine readVIIRS_GVFObs(n) ! !USES: use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_logMod use LDT_DAobsDataMod @@ -40,7 +41,7 @@ subroutine readVIIRS_GVFObs(n) logical :: alarmCheck logical :: file_exists integer :: c,r - character*100 :: fname + character(len=LDT_CONST_PATH_LEN) :: fname integer :: vtype real :: gvfobs(LDT_rc%lnc(n)*LDT_rc%lnr(n)) diff --git a/ldt/SMAP_E_OPL/ARFSSMRETRIEVAL.F90 b/ldt/SMAP_E_OPL/ARFSSMRETRIEVAL.F90 index 2f7584c7d..3d8d565fd 100644 --- a/ldt/SMAP_E_OPL/ARFSSMRETRIEVAL.F90 +++ b/ldt/SMAP_E_OPL/ARFSSMRETRIEVAL.F90 @@ -36,12 +36,13 @@ subroutine ARFSSMRETRIEVAL(SMAPFILE, & USE varsio_m USE algo_vpol_m use LDT_ARFSSM_netcdfMod, only: LDT_ARFSSM_write_netcdf + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit USE LDT_smap_e_oplMod IMPLICIT NONE ! !ARGUMENTS: - CHARACTER (len=100) :: SMAPFILE + CHARACTER (len=LDT_CONST_PATH_LEN) :: SMAPFILE REAL*4, DIMENSION(2560,1920), intent(in) :: TS_bfresample_01, & TS_bfresample_02, TS_bfresample_03 REAL*4, DIMENSION(2560,1920) :: ARFS_SNOW, UTChr @@ -51,7 +52,7 @@ subroutine ARFSSMRETRIEVAL(SMAPFILE, & type(ESMF_Time), intent(in) :: thirdtime !EOP INTEGER :: i, j, nrow, mcol - CHARACTER (len=100) :: fname_TAU + CHARACTER (len=LDT_CONST_PATH_LEN) :: fname_TAU CHARACTER (len=5) :: DOY_chr REAL*4 :: C, K, sm_retrieval, tau_return REAL*4, DIMENSION(2560,1920) :: ARFS_TB @@ -66,7 +67,7 @@ subroutine ARFSSMRETRIEVAL(SMAPFILE, & INTEGER*4 :: ios, NX, NY INTEGER*4 :: ncid, nid, tsoil01id - character (len=100) :: retrieval_fname + character (len=LDT_CONST_PATH_LEN) :: retrieval_fname integer :: L1B_dir_len,L1B_fname_len real :: utc_check diff --git a/ldt/SMAP_E_OPL/LDT_smap_e_oplMod.F90 b/ldt/SMAP_E_OPL/LDT_smap_e_oplMod.F90 index 90ad7b676..7ced41e5e 100644 --- a/ldt/SMAP_E_OPL/LDT_smap_e_oplMod.F90 +++ b/ldt/SMAP_E_OPL/LDT_smap_e_oplMod.F90 @@ -27,6 +27,8 @@ module LDT_smap_e_oplMod + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none private @@ -38,11 +40,11 @@ module LDT_smap_e_oplMod ! Public type type, public :: smap_e_opl_dec - character*100 :: L1Bdir, L1Bresampledir, L1Bresampledir_02, SMoutdir - character*100 :: LISdir, LISsnowdir - character*100 :: TAUdir, OMEGAfile, BDfile, & + character(len=LDT_CONST_PATH_LEN) :: L1Bdir, L1Bresampledir, L1Bresampledir_02, SMoutdir + character(len=LDT_CONST_PATH_LEN) :: LISdir, LISsnowdir + character(len=LDT_CONST_PATH_LEN) :: TAUdir, OMEGAfile, BDfile, & CLAYfile, Hfile, LCfile - character*100 :: dailystats_ref, dailystats_lis + character(len=LDT_CONST_PATH_LEN) :: dailystats_ref, dailystats_lis character*10 :: date_curr integer :: L1BresampWriteOpt, L1Btype, SMAPfilelistSuffixNumber integer :: Teffscale @@ -243,6 +245,7 @@ subroutine LDT_smap_e_oplRun(n) ! !USES: use esmf + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_logMod @@ -254,8 +257,8 @@ subroutine LDT_smap_e_oplRun(n) integer, external :: LDT_create_subdirs integer :: i, fi integer :: ftn, ierr - character*100 :: fname - character*100 :: smap_L1B_filename(10) + character(len=LDT_CONST_PATH_LEN) :: fname + character(len=LDT_CONST_PATH_LEN) :: smap_L1B_filename(10) character*8 :: yyyymmdd, yyyymmdd_01, yyyymmdd_02, yyyymmdd_03 character*6 :: hhmmss(10) character*4 :: yyyy, yyyy_01, yyyy_02, yyyy_03 @@ -520,6 +523,8 @@ end subroutine LDT_smap_e_oplRun subroutine search_SMAPL1B_files(ndir,date_curr,L1Btype,suffix) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + implicit none ! !ARGUMENTS: character (len=*) :: ndir @@ -530,7 +535,7 @@ subroutine search_SMAPL1B_files(ndir,date_curr,L1Btype,suffix) character*8 :: yyyymmdd character*2 :: hh character*2 :: tmp - character*200 :: list_files + character(len=LDT_CONST_PATH_LEN) :: list_files yyyymmdd = date_curr(1:8) hh = date_curr(9:10) diff --git a/ldt/SMAP_E_OPL/SMAPL1BTOL1C_ARFS.F90 b/ldt/SMAP_E_OPL/SMAPL1BTOL1C_ARFS.F90 index 3f73ca329..5d5d70c90 100644 --- a/ldt/SMAP_E_OPL/SMAPL1BTOL1C_ARFS.F90 +++ b/ldt/SMAP_E_OPL/SMAPL1BTOL1C_ARFS.F90 @@ -27,16 +27,17 @@ subroutine SMAPL1BRESAMPLE(SMAPFILE,L1B_dir,Orbit,ARFS_TIME) USE FUNCTIONS USE TOOLSUBS USE invdist_l1b2arfs + use LDT_constantsMod, only: LDT_CONST_PATH_LEN USE LDT_logMod USE LDT_smap_e_oplMod IMPLICIT NONE INTEGER :: i, j, nrow, mcol - CHARACTER (len=100) :: SMAPFILE - character (len=100) :: L1B_dir + CHARACTER (len=LDT_CONST_PATH_LEN) :: SMAPFILE + character (len=LDT_CONST_PATH_LEN) :: L1B_dir character (len=20) :: variable_name(13) - character (len=100) :: resample_filename(13) + character (len=LDT_CONST_PATH_LEN) :: resample_filename(13) character (len=1) :: Orbit integer :: var_i integer :: L1B_dir_len,L1B_fname_len diff --git a/ldt/SMAP_E_OPL/SMAPL1BTOL1C_ARFS_SUBSET.F90 b/ldt/SMAP_E_OPL/SMAPL1BTOL1C_ARFS_SUBSET.F90 index 57a4343a0..83ca56309 100644 --- a/ldt/SMAP_E_OPL/SMAPL1BTOL1C_ARFS_SUBSET.F90 +++ b/ldt/SMAP_E_OPL/SMAPL1BTOL1C_ARFS_SUBSET.F90 @@ -30,16 +30,16 @@ subroutine SMAPL1BRESAMPLE_SUBSET(SMAPFILE,L1B_dir,Orbit,ARFS_TIME,rc) USE FUNCTIONS USE TOOLSUBS USE invdist_l1b2arfs + use LDT_constantsMod, only: LDT_CONST_PATH_LEN USE LDT_logMod USE LDT_smap_e_oplMod IMPLICIT NONE INTEGER :: i, j, nrow, mcol - CHARACTER (len=100) :: SMAPFILE - character (len=100) :: L1B_dir + CHARACTER (len=LDT_CONST_PATH_LEN) :: SMAPFILE + character (len=LDT_CONST_PATH_LEN) :: L1B_dir character (len=20) :: variable_name(13) - character (len=100) :: resample_filename(13) character (len=1) :: Orbit integer :: var_i integer :: L1B_dir_len,L1B_fname_len diff --git a/ldt/SMAP_E_OPL/TOOLSUBS.F90 b/ldt/SMAP_E_OPL/TOOLSUBS.F90 index 3bba00378..02c767fe6 100644 --- a/ldt/SMAP_E_OPL/TOOLSUBS.F90 +++ b/ldt/SMAP_E_OPL/TOOLSUBS.F90 @@ -49,7 +49,8 @@ END SUBROUTINE FindInVector ! SUBROUTINE AVHRR_NDVI(filename,lon_ind,lat_ind,avg_NDVI) SUBROUTINE AVHRR_NDVI(ssid,lon_ind,lat_ind,avg_NDVI) - CHARACTER (len=100) :: filename + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + !CHARACTER (len=LDT_CONST_PATH_LEN) :: filename INTEGER :: sd_id, ssid, DFACC, status, sfstart,sfselect,sfrdata, sfendacc, sfend, N_NDVI INTEGER :: start(2), edges(2), stride(2) INTEGER*2,DIMENSION(:,:),ALLOCATABLE :: data @@ -117,7 +118,9 @@ SUBROUTINE AVHRR_NDVI_MATRIX(ssid,lon_ind,lat_ind, NDVI_MAT) END SUBROUTINE AVHRR_NDVI_MATRIX SUBROUTINE GetSMAP(filename,dataset,smap_row,smap_col,lon_ind,lat_ind,sm_mat) - CHARACTER (len=100) :: filename, dataset + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + CHARACTER (len=LDT_CONST_PATH_LEN) :: filename + character(len=100) :: dataset #if (defined USE_HDF5) INTEGER(HID_T) :: file_id, dataset_id #endif @@ -147,7 +150,9 @@ SUBROUTINE GetSMAP(filename,dataset,smap_row,smap_col,lon_ind,lat_ind,sm_mat) END SUBROUTINE GetSMAP SUBROUTINE GetSMAP_L2(filename,dataset1,dataset2,dataset3,data_out,ind) - CHARACTER (len=100) :: filename, dataset1, dataset2, dataset3 + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + CHARACTER (len=LDT_CONST_PATH_LEN) :: filename + CHARACTER (len=100) :: dataset1, dataset2, dataset3 #if (defined USE_HDF5) INTEGER(HID_T) :: file_id, dataset_id1, dataset_id2, dataset_id3, dspace_id #endif @@ -190,9 +195,11 @@ END SUBROUTINE GetSMAP_L2 SUBROUTINE GetSMAP_L1B(filename, data1_out, data2_out, data3_out, data4_out, data5_out, data6_out, data7_out, data8_out, & data9_out, data10_out, data11_out, data12_out, data13_out, data14_out, data15_out, n, m) - use LDT_logMod, only: LDT_logunit ! EMK + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + use LDT_logMod, only: LDT_logunit ! EMK - CHARACTER (len=100) :: filename, dataset1, dataset2, dataset3, dataset4, dataset5, dataset6, dataset7 + CHARACTER (len=LDT_CONST_PATH_LEN) :: filename + character(len=100) :: dataset1, dataset2, dataset3, dataset4, dataset5, dataset6, dataset7 CHARACTER (len=100) :: dataset8, dataset9, dataset10, dataset11, dataset12, dataset13, dataset14, dataset15 #if (defined USE_HDF5) INTEGER(HID_T) :: file_id, dataset_id1, dataset_id2, dataset_id3, dataset_id4, dataset_id5, dataset_id6, dataset_id7, dspace_id diff --git a/ldt/SMAP_E_OPL/readLISTeff.F90 b/ldt/SMAP_E_OPL/readLISTeff.F90 index 362ad7c44..92f0b09d0 100644 --- a/ldt/SMAP_E_OPL/readLISTeff.F90 +++ b/ldt/SMAP_E_OPL/readLISTeff.F90 @@ -19,6 +19,7 @@ ! !INTERFACE: subroutine readLIS_Teff(n,yyyymmdd,hh,Orbit,teff) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_logMod use LDT_smap_e_oplMod @@ -34,7 +35,7 @@ subroutine readLIS_Teff(n,yyyymmdd,hh,Orbit,teff) !EOP integer :: c,r real :: tsoil(LDT_rc%lnc(n),LDT_rc%lnr(n),4) - character*100 :: fname + character(len=LDT_CONST_PATH_LEN) :: fname logical :: file_exists real :: kk, cc_6am, cc_6pm !parameters for calculating effective soil temperature !from soil layer temperature at 6 AM and 6 PM local time diff --git a/ldt/SMAP_E_OPL/readLISTeff_usaf.F90 b/ldt/SMAP_E_OPL/readLISTeff_usaf.F90 index 4dc4c391c..b426f0bdb 100644 --- a/ldt/SMAP_E_OPL/readLISTeff_usaf.F90 +++ b/ldt/SMAP_E_OPL/readLISTeff_usaf.F90 @@ -25,7 +25,8 @@ ! ! !INTERFACE: subroutine readLIS_Teff_usaf(n, yyyymmdd, hh, Orbit, teff, rc) -! !USES: + ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_domainMod use LDT_logMod @@ -43,7 +44,7 @@ subroutine readLIS_Teff_usaf(n, yyyymmdd, hh, Orbit, teff, rc) !EOP integer :: c,r real :: tsoil(LDT_rc%lnc(n),LDT_rc%lnr(n),4) - character(255) :: fname + character(len=LDT_CONST_PATH_LEN) :: fname logical :: file_exists integer :: rc1 integer :: gid diff --git a/ldt/SMAP_E_OPL/readLISsnow.F90 b/ldt/SMAP_E_OPL/readLISsnow.F90 index 3279073a1..18e831f8b 100644 --- a/ldt/SMAP_E_OPL/readLISsnow.F90 +++ b/ldt/SMAP_E_OPL/readLISsnow.F90 @@ -18,7 +18,8 @@ ! ! !INTERFACE: subroutine readLIS_snow(n,yyyymmdd,hh,SnowDepth) -! !USES: + ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_logMod use LDT_smap_e_oplMod @@ -32,7 +33,7 @@ subroutine readLIS_snow(n,yyyymmdd,hh,SnowDepth) !EOP integer :: c,r - character*100 :: fname + character(len=LDT_CONST_PATH_LEN) :: fname character*8 :: yyyymmdd_snow character*4 :: yyyy_snow character*2 :: mm_snow,dd_snow,hh_snow diff --git a/ldt/SMAP_E_OPL/readUSAFSI.F90 b/ldt/SMAP_E_OPL/readUSAFSI.F90 index a1034c34b..925dfdff2 100644 --- a/ldt/SMAP_E_OPL/readUSAFSI.F90 +++ b/ldt/SMAP_E_OPL/readUSAFSI.F90 @@ -22,6 +22,7 @@ subroutine readUSAFSI(n, yyyymmdd, hh, SnowDepth, rc) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_logMod use LDT_smap_e_oplMod @@ -36,7 +37,7 @@ subroutine readUSAFSI(n, yyyymmdd, hh, SnowDepth, rc) integer, intent(out) :: rc !EOP - character*255 :: fname + character(len=LDT_CONST_PATH_LEN) :: fname character*8 :: yyyymmdd_snow character*4 :: yyyy_snow character*2 :: mm_snow, dd_snow, hh_snow diff --git a/ldt/USAFSI/LDT_usafsiMod.F90 b/ldt/USAFSI/LDT_usafsiMod.F90 index 290628591..75da65091 100644 --- a/ldt/USAFSI/LDT_usafsiMod.F90 +++ b/ldt/USAFSI/LDT_usafsiMod.F90 @@ -12,6 +12,8 @@ module LDT_usafsiMod + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none private @@ -25,18 +27,18 @@ module LDT_usafsiMod type, public :: usafsi_t ! Former environment variables character*10 :: date10 - character*255 :: fracdir - character*255 :: modif + character(len=LDT_CONST_PATH_LEN) :: fracdir + character(len=LDT_CONST_PATH_LEN) :: modif integer :: sfcobsfmt ! EMK 20230727 - character*255 :: sfcobs - character*255 :: ssmis - character*255 :: gmi !kyh20201118 - character*255 :: amsr2 !kyh20201217 - character*255 :: stmpdir - character*255 :: sstdir ! EMK 20220113 - character*255 :: static - character*255 :: unmod - character*255 :: viirsdir + character(len=LDT_CONST_PATH_LEN) :: sfcobs + character(len=LDT_CONST_PATH_LEN) :: ssmis + character(len=LDT_CONST_PATH_LEN) :: gmi !kyh20201118 + character(len=LDT_CONST_PATH_LEN) :: amsr2 !kyh20201217 + character(len=LDT_CONST_PATH_LEN) :: stmpdir + character(len=LDT_CONST_PATH_LEN) :: sstdir ! EMK 20220113 + character(len=LDT_CONST_PATH_LEN) :: static + character(len=LDT_CONST_PATH_LEN) :: unmod + character(len=LDT_CONST_PATH_LEN) :: viirsdir ! Former namelist variables real :: clmadj @@ -62,11 +64,11 @@ module LDT_usafsiMod ! option for PMW snow depth retrieval algorithms integer :: ssmis_option - character*255 :: ssmis_raw_dir - character*255 :: gmi_raw_dir !kyh20201118 - character*255 :: amsr2_raw_dir !kyh20201217 - character*255 :: ff_file - character*255 :: fd_file !kyh20210113 + character(len=LDT_CONST_PATH_LEN) :: ssmis_raw_dir + character(len=LDT_CONST_PATH_LEN) :: gmi_raw_dir !kyh20201118 + character(len=LDT_CONST_PATH_LEN) :: amsr2_raw_dir !kyh20201217 + character(len=LDT_CONST_PATH_LEN) :: ff_file + character(len=LDT_CONST_PATH_LEN) :: fd_file !kyh20210113 ! Bratseth settings real :: ob_err_var @@ -78,18 +80,18 @@ module LDT_usafsiMod ! Other new settings real :: fill_climo - character*255 :: source_of_ocean_data ! EMK 20240718 - character*255 :: gofs_sst_dir - character*255 :: gofs_cice_dir - character*255 :: espcd_sst_dir ! EMK 20240718 - character*255 :: espcd_cice_dir ! EMK 20240718 - character*255 :: lis_grib2_dir + character(len=LDT_CONST_PATH_LEN) :: source_of_ocean_data ! EMK 20240718 + character(len=LDT_CONST_PATH_LEN) :: gofs_sst_dir + character(len=LDT_CONST_PATH_LEN) :: gofs_cice_dir + character(len=LDT_CONST_PATH_LEN) :: espcd_sst_dir ! EMK 20240718 + character(len=LDT_CONST_PATH_LEN) :: espcd_cice_dir ! EMK 20240718 + character(len=LDT_CONST_PATH_LEN) :: lis_grib2_dir character*20 :: security_class character*20 :: data_category character*20 :: data_res character*20 :: area_of_data - character*255 :: galwem_root_dir - character*255 :: galwem_sub_dir + character(len=LDT_CONST_PATH_LEN) :: galwem_root_dir + character(len=LDT_CONST_PATH_LEN) :: galwem_sub_dir integer :: use_timestamp integer :: galwem_res diff --git a/ldt/USAFSI/USAFSI_amsr2Mod.F90 b/ldt/USAFSI/USAFSI_amsr2Mod.F90 index 00d4cff09..e5efe92c0 100755 --- a/ldt/USAFSI/USAFSI_amsr2Mod.F90 +++ b/ldt/USAFSI/USAFSI_amsr2Mod.F90 @@ -39,21 +39,22 @@ module USAFSI_amsr2Mod subroutine USAFSI_proc_amsr2(date10, amsr2_in, amsr2, option) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun, LDT_verify use USAFSI_utilMod - + ! Defaults implicit none ! Arguments character(len=10), intent(in) :: date10 - character(len=255), intent(in) :: amsr2_in - character(len=255), intent(in) :: amsr2 + character(len=LDT_CONST_PATH_LEN), intent(in) :: amsr2_in + character(len=LDT_CONST_PATH_LEN), intent(in) :: amsr2 integer, intent(in) :: option ! Local variables integer :: eof, i, j, n, nArr, nFile, x, y - character(len=255) :: filename, nc_filename + character(len=LDT_CONST_PATH_LEN) :: filename, nc_filename !integer, dimension(:), allocatable :: surflag0, surflag character(len=10), dimension(:), allocatable :: date0, date10_arr real, dimension(:), allocatable :: lat0, lon0, tb10h0, tb10v0, tb19h0, tb19v0, & @@ -222,13 +223,14 @@ subroutine read_amsr2_attributes(filename, date10_arr, lat, lon, tb10h, tb10v, & #endif ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun, LDT_verify !Defaults implicit none !Arguments - character(len=255), intent(in) :: filename + character(len=LDT_CONST_PATH_LEN), intent(in) :: filename character(len=10), allocatable, intent(inout) :: date10_arr(:) real, allocatable, intent(inout) :: lat(:), lon(:) real, allocatable, intent(inout) :: tb10h(:), tb10v(:), tb19h(:), tb19v(:), & @@ -648,6 +650,7 @@ subroutine calculate_snowdepth(n, tb10h, tb10v, tb19h, tb19v, & ! option == 4; Kelly, 2009 ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_usafsiMod, only: usafsi_settings ! Defaults @@ -676,8 +679,8 @@ subroutine calculate_snowdepth(n, tb10h, tb10v, tb19h, tb19v, & ! Local variables integer :: i - character(len=255) :: ff_filename - character(len=255) :: fd_filename + character(len=LDT_CONST_PATH_LEN) :: ff_filename + character(len=LDT_CONST_PATH_LEN) :: fd_filename real :: pd19,pd37,pd89,tt,si89, & scat,sc37,sc89,scx logical :: flag @@ -1298,6 +1301,7 @@ end subroutine checkgrid subroutine read_forestfraction(ff_filename, ff) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_verify use netcdf @@ -1305,7 +1309,7 @@ subroutine read_forestfraction(ff_filename, ff) implicit none ! Arguments - character (len=255), intent(in) :: ff_filename + character (len=LDT_CONST_PATH_LEN), intent(in) :: ff_filename real, intent(out) :: ff(1440,720) ! fixed 1/4 deg ! Local variables @@ -1333,9 +1337,10 @@ end subroutine read_forestfraction #else ! Dummy version subroutine read_forestfraction(ff_filename, ff) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun implicit none - character (len=255), intent(in) :: ff_filename + character (len=LDT_CONST_PATH_LEN), intent(in) :: ff_filename real, intent(out) :: ff(1440,720) ! fixed 1/4 deg write(LDT_logunit,*) & "[ERR] Recompile LDT with netCDF4 support!" @@ -1347,6 +1352,7 @@ end subroutine read_forestfraction subroutine read_forestdensity(fd_filename, fd) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_verify use netcdf @@ -1354,7 +1360,7 @@ subroutine read_forestdensity(fd_filename, fd) implicit none ! Arguments - character (len=255), intent(in) :: fd_filename + character (len=LDT_CONST_PATH_LEN), intent(in) :: fd_filename real, intent(out) :: fd(1440,720) ! fixed 1/4 deg ! Local variables @@ -1382,6 +1388,7 @@ end subroutine read_forestdensity subroutine search_files(date10, amsr2_in) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use USAFSI_utilMod, only: date10_julhr, julhr_date10 ! Defaults @@ -1389,11 +1396,11 @@ subroutine search_files(date10, amsr2_in) ! Arguments character*10, intent(in) :: date10 - character*255, intent(in) :: amsr2_in + character(len=LDT_CONST_PATH_LEN), intent(in) :: amsr2_in ! Local variables integer :: eof, n, i, j, k - character(len=255) :: file_path, cmd + character(len=LDT_CONST_PATH_LEN) :: file_path, cmd character*10 :: date10_prev integer :: hr, st_hr, julhr character*2 :: st_hr_str, cnt diff --git a/ldt/USAFSI/USAFSI_analysisMod.F90 b/ldt/USAFSI/USAFSI_analysisMod.F90 index 199a592cd..5c2a9bf78 100644 --- a/ldt/USAFSI/USAFSI_analysisMod.F90 +++ b/ldt/USAFSI/USAFSI_analysisMod.F90 @@ -303,6 +303,7 @@ subroutine getfrac (date10, fracdir) !******************************************************************************* ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc, LDT_domain use LDT_logMod, only: LDT_logunit, LDT_endrun use LDT_usafsiMod, only: usafsi_settings @@ -316,7 +317,7 @@ subroutine getfrac (date10, fracdir) ! Arguments character*10, intent(in) :: date10 ! DATE-TIME GROUP OF USAFSI CYCLE - character*255, intent(in) :: fracdir ! FRACTIONAL SNOW DIRECTORY PATH + character(len=LDT_CONST_PATH_LEN), intent(in) :: fracdir ! FRACTIONAL SNOW DIRECTORY PATH ! Local constants character*8, parameter :: meshnp05 = '_0p05deg' ! MESH FOR 1/20 DEGREE FILE NAME @@ -329,9 +330,9 @@ subroutine getfrac (date10, fracdir) character*2 :: cyclhr ! CYCLE HOUR character*10 :: datefr ! DATE-TIME GROUP OF FRACTIONAL SNOW - character*255 :: file_path ! FULLY-QUALIFIED FILE NAME + character(len=LDT_CONST_PATH_LEN) :: file_path ! FULLY-QUALIFIED FILE NAME character*7 :: iofunc ! ACTION TO BE PERFORMED - character*90 :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE character*20 :: routine_name ! NAME OF THIS SUBROUTINE character*10 :: yyyymmddhh integer :: fracnt ! NUMBER OF FRACTIONAL POINTS @@ -531,6 +532,7 @@ subroutine getgeo (month, static, nc, nr, elevations) !******************************************************************************* ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_domain, LDT_rc use LDT_logMod, only: LDT_endrun, ldt_logunit use map_utils @@ -543,7 +545,7 @@ subroutine getgeo (month, static, nc, nr, elevations) ! Arguments integer, intent(in) :: month ! MONTH OF YEAR (1-12) - character*255, intent(in) :: static ! STATIC FILE DIRECTORY PATH + character(len=LDT_CONST_PATH_LEN), intent(in) :: static ! STATIC FILE DIRECTORY PATH integer, intent(in) :: nc integer, intent(in) :: nr real, intent(in) :: elevations(nc,nr) @@ -551,8 +553,8 @@ subroutine getgeo (month, static, nc, nr, elevations) ! Local variables character*4 :: cmonth (12) ! MONTH OF YEAR character*4 :: file_ext ! LAST PORTION OF FILE NAME - character*255 :: file_path ! FULLY-QUALIFIED FILE NAME - character*90 :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: file_path ! FULLY-QUALIFIED FILE NAME + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE character*20 :: routine_name ! NAME OF THIS SUBROUTINE real, allocatable :: climo_0p25deg(:,:) integer*1, allocatable :: snow_poss_0p25deg(:,:) @@ -759,6 +761,7 @@ subroutine getobs (date10, month, sfcobs, netid, staid, stacnt, & !******************************************************************************* ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit use LDT_usafsiMod, only: usafsi_settings use map_utils ! EMK @@ -771,7 +774,7 @@ subroutine getobs (date10, month, sfcobs, netid, staid, stacnt, & ! Arguments character*10, intent(in) :: date10 ! DATE-TIME GROUP OF CYCLE integer, intent(in) :: month ! CURRENT MONTH (1-12) - character*255, intent(in) :: sfcobs ! PATH TO DBPULL SNOW OBS DIRECTORY + character(len=LDT_CONST_PATH_LEN), intent(in) :: sfcobs ! PATH TO DBPULL SNOW OBS DIRECTORY character*5, intent(out) :: netid (:) ! NETWORK ID OF AN OBSERVATION character*32, intent(out) :: staid (:) ! STATION ID OF AN OBSERVATION @@ -791,8 +794,8 @@ subroutine getobs (date10, month, sfcobs, netid, staid, stacnt, & character*10 :: date10_prev ! DATE-TIME GROUP OF LAST HOUR READ character*6 :: interval ! TIME INTERVAL FOR FILENAME character*4 :: msgval ! ERROR MESSAGE VALUE - character*90 :: message (msglns) ! ERROR MESSAGE - character*255 :: obsfile ! NAME OF OBSERVATION TEXT FILE + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: obsfile ! NAME OF OBSERVATION TEXT FILE character*5 :: obsnet ! RETURNED OBS STATION NETWORK character*32 :: obssta ! RETURNED OBS STATION ID character*5, allocatable :: oldnet (:) ! ARRAY OF NETWORKS FOR OLDSTA @@ -1241,6 +1244,7 @@ subroutine getsfc ( date10, stmpdir, sfctmp_found, sfctmp_lis ) !***************************************************************************************** ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_domain, LDT_rc use LDT_logMod, only: LDT_logunit, LDT_endrun use map_utils @@ -1252,7 +1256,7 @@ subroutine getsfc ( date10, stmpdir, sfctmp_found, sfctmp_lis ) ! Arguments character*10, intent(in) :: date10 ! SNODEP DATE-TIME GROUP - character*255, intent(in) :: stmpdir ! SFC TEMP DIRECTORY PATH + character(len=LDT_CONST_PATH_LEN), intent(in) :: stmpdir ! SFC TEMP DIRECTORY PATH logical, intent(out) :: sfctmp_found ! FLAG FOR SFC TEMP FILE FOUND real, intent(out) :: sfctmp_lis ( : , : ) ! LIS SURFACE TEMPERATURE DATA @@ -1261,9 +1265,9 @@ subroutine getsfc ( date10, stmpdir, sfctmp_found, sfctmp_lis ) ! Local variables character*10 :: dtglis ! LIS DATE-TIME GROUP - character*255 :: file_stmp ! FULLY-QUALIFIED SFCTMP FILE NAME + character(len=LDT_CONST_PATH_LEN) :: file_stmp ! FULLY-QUALIFIED SFCTMP FILE NAME character*7 :: iofunc ! ACTION TO BE PERFORMED - character*90 :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE character*20 :: routine_name ! NAME OF THIS ROUTINE character*10 :: yyyymmddhh @@ -1448,6 +1452,7 @@ subroutine getsmi (date10, ssmis) !******************************************************************************* ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc, LDT_domain use LDT_logMod, only: LDT_logunit, LDT_endrun use map_utils ! EMK @@ -1460,7 +1465,7 @@ subroutine getsmi (date10, ssmis) ! Arguments character*10, intent(in) :: date10 ! DATE-TIME GROUP OF CYCLE - character*255, intent(in) :: ssmis ! SSMIS FILE DIRECTORY PATH + character(len=LDT_CONST_PATH_LEN), intent(in) :: ssmis ! SSMIS FILE DIRECTORY PATH ! Local variables character*7 :: access_type ! FILE ACCESS TYPE @@ -1468,9 +1473,9 @@ subroutine getsmi (date10, ssmis) character*2 :: chemifile ( 2) ! HEMISPHERE FOR FILENAME ('nh', 'sh') character*10 :: date10_hourly ! DATE-TIME GROUP OF HOURLY DATA character*10 :: date10_prev ! DATE-TIME GROUP OF LAST HOUR READ - character*255 :: file_path ! SSMIS SNOW OR ICE EDR TEXT FILE + character(len=LDT_CONST_PATH_LEN) :: file_path ! SSMIS SNOW OR ICE EDR TEXT FILE character*6 :: interval ! TIME INTERVAL FOR FILENAME - character*90 :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE character*4 :: msgval ! PLACEHOLDER FOR ERROR MESSAGE VALUES character*20 :: routine_name ! NAME OF THIS SUBROUTINE character*10 :: yyyymmddhh @@ -1806,6 +1811,7 @@ subroutine getsno (date10, modif, unmod, nc, nr, landice, julhr_beg, & !******************************************************************************* ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_domain, LDT_rc use LDT_logMod, only: LDT_logunit, LDT_endrun use map_utils @@ -1818,8 +1824,8 @@ subroutine getsno (date10, modif, unmod, nc, nr, landice, julhr_beg, & ! Arguments character*10, intent(in) :: date10 ! CURRENT CYCLE DATE-TIME GROUP - character*255, intent(in) :: modif ! PATH TO MODIFIED DATA DIRECTORY - character*255, intent(in) :: unmod ! PATH TO UNMODIFIED DATA DIRECTORY + character(len=LDT_CONST_PATH_LEN), intent(in) :: modif ! PATH TO MODIFIED DATA DIRECTORY + character(len=LDT_CONST_PATH_LEN), intent(in) :: unmod ! PATH TO UNMODIFIED DATA DIRECTORY integer, intent(in) :: nc integer, intent(in) :: nr real, intent(in) :: landice(nc,nr) @@ -1828,10 +1834,10 @@ subroutine getsno (date10, modif, unmod, nc, nr, landice, julhr_beg, & ! Local variables character*10 :: date10_prev ! PREVIOUS CYCLE DATE-TIME GROUP - character*255 :: file_path ! INPUT FILE PATH AND NAME - character*90 :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: file_path ! INPUT FILE PATH AND NAME + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE character*20 :: routine_name ! NAME OF THIS SUBROUTINE - character*255 :: prevdir ! PATH TO PREVIOUS CYCLE'S DATA + character(len=LDT_CONST_PATH_LEN) :: prevdir ! PATH TO PREVIOUS CYCLE'S DATA integer :: runcycle ! CYCLE HOUR integer :: julhr ! AFWA JULIAN HOUR integer :: limit ! LIMIT ON NUMBER OF CYCLES TO SEARCH @@ -2143,6 +2149,7 @@ end subroutine getsno subroutine getsno_nc(date10, julhr_beg, ierr) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun use USAFSI_netcdfMod, only: USAFSI_read_netcdf, & USAFSI_read_netcdf_12z @@ -2165,7 +2172,7 @@ subroutine getsno_nc(date10, julhr_beg, ierr) integer :: julhr character*20 :: routine_name character*10 :: date10_prev - character*90 :: message(msglns) + character(len=LDT_CONST_PATH_LEN) :: message(msglns) data routine_name / 'GETSNO_NC '/ @@ -2286,6 +2293,7 @@ subroutine getsst (date10, stmpdir, sstdir) !******************************************************************************* ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc, LDT_domain use LDT_logMod, only: LDT_logunit, LDT_endrun use map_utils @@ -2298,18 +2306,18 @@ subroutine getsst (date10, stmpdir, sstdir) ! Arguments character*10, intent(in) :: date10 ! SNODEP DATE-TIME GROUP - character*255, intent(in) :: stmpdir ! SFC TEMPERATURE DIRECTORY PATH - character*255, intent(in) :: sstdir + character(len=LDT_CONST_PATH_LEN), intent(in) :: stmpdir ! SFC TEMPERATURE DIRECTORY PATH + character(len=LDT_CONST_PATH_LEN), intent(in) :: sstdir ! Local constants integer, parameter :: sst_size = sst_igrid * sst_jgrid ! SST ARRAY SIZE ! Local variables character*10 :: date10_sst ! SST DATE-TIME GROUP - character*255 :: file_binary ! FULLY-QUALIFIED BINARY NAME + character(len=LDT_CONST_PATH_LEN) :: file_binary ! FULLY-QUALIFIED BINARY NAME character*7 :: iofunc ! ACTION TO BE PERFORMED !character*90 :: message (msglns) ! ERROR MESSAGE - character*255 :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE character*20 :: routine_name ! NAME OF THIS SUBROUTINE character*10 :: yyyymmddhh integer :: runcycle ! CYCLE TIME @@ -2326,7 +2334,7 @@ subroutine getsst (date10, stmpdir, sstdir) integer :: gindex,c,r real :: rlat,rlon,ri,rj integer :: nc,nr - character*255 :: file_grib + character(len=LDT_CONST_PATH_LEN) :: file_grib integer :: grstat data routine_name / 'GETSST '/ @@ -2559,6 +2567,7 @@ subroutine getviirs (date10, viirsdir) !******************************************************************************* ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc, LDT_domain use LDT_logMod, only: LDT_logunit, LDT_endrun use LDT_usafsiMod, only: usafsi_settings @@ -2572,16 +2581,16 @@ subroutine getviirs (date10, viirsdir) ! Argments character(10), intent(in) :: date10 ! DATE-TIME GROUP OF SNODEP CYCLE - character(255), intent(in) :: viirsdir ! FRACTIONAL SNOW DIRECTORY PATH + character(len=LDT_CONST_PATH_LEN), intent(in) :: viirsdir ! FRACTIONAL SNOW DIRECTORY PATH ! Local variables character(2) :: cyclhr ! CYCLE HOUR character(10) :: datefr ! DATE-TIME GROUP OF SNOW COVER - character(255) :: snomap_path ! FULLY-QUALIFIED SNOMAP FILE NAME - character(255) :: snoage_path ! FULLY-QUALIFIED SNOAGE FILE NAME + character(LDT_CONST_PATH_LEN) :: snomap_path ! FULLY-QUALIFIED SNOMAP FILE NAME + character(LDT_CONST_PATH_LEN) :: snoage_path ! FULLY-QUALIFIED SNOAGE FILE NAME character(7) :: iofunc ! ACTION TO BE PERFORMED - character(90) :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE character(20) :: routine_name ! NAME OF THIS SUBROUTINE character(10) :: yyyymmddhh integer :: i ! SNODEP I-COORDINATE @@ -3697,6 +3706,7 @@ end subroutine summer subroutine getclimo (month, static) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_verify, ldt_logunit use USAFSI_arraysMod, only: USAFSI_arrays use netcdf @@ -3706,11 +3716,11 @@ subroutine getclimo (month, static) ! Arguments integer, intent(in) :: month ! MONTH OF YEAR (1-12) - character*255, intent(in) :: static ! STATIC FILE DIRECTORY PATH + character(len=LDT_CONST_PATH_LEN), intent(in) :: static ! STATIC FILE DIRECTORY PATH ! Local variables character*4 :: cmonth (12) ! MONTH OF YEAR - character*255 :: file_path ! FULLY-QUALIFIED FILE NAME + character(len=LDT_CONST_PATH_LEN) :: file_path ! FULLY-QUALIFIED FILE NAME data cmonth / '_jan', '_feb', '_mar', '_apr', '_may', '_jun', & '_jul', '_aug', '_sep', '_oct', '_nov', '_dec' / diff --git a/ldt/USAFSI/USAFSI_binary.F90 b/ldt/USAFSI/USAFSI_binary.F90 index efee40177..b3fc6a465 100644 --- a/ldt/USAFSI/USAFSI_binary.F90 +++ b/ldt/USAFSI/USAFSI_binary.F90 @@ -14,6 +14,7 @@ subroutine USAFSI_binary() ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit use USAFSI_arraysMod, only: USAFSI_arrays @@ -24,7 +25,7 @@ subroutine USAFSI_binary() integer, parameter :: lunit = 100 ! Local variables - character*125 :: file_path + character(len=LDT_CONST_PATH_LEN) :: file_path integer :: istat ! Open file diff --git a/ldt/USAFSI/USAFSI_espcdMod.F90 b/ldt/USAFSI/USAFSI_espcdMod.F90 index ef7670acd..996bf966d 100644 --- a/ldt/USAFSI/USAFSI_espcdMod.F90 +++ b/ldt/USAFSI/USAFSI_espcdMod.F90 @@ -40,6 +40,7 @@ subroutine find_espcd_cice_file(rootdir, region, & ! Imports use netcdf + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun use LDT_timeMgrMod, only: LDT_get_julhr, LDT_julhr_date use USAFSI_paramsMod, only: program_name, msglns @@ -55,7 +56,7 @@ subroutine find_espcd_cice_file(rootdir, region, & integer, intent(in) :: mm integer, intent(in) :: dd integer, intent(in) :: hh - character*255, intent(out) :: filename + character(len=LDT_CONST_PATH_LEN), intent(out) :: filename real, allocatable, intent(inout) :: aice(:,:,:) integer, intent(out) :: nlon integer, intent(out) :: nlat @@ -65,7 +66,7 @@ subroutine find_espcd_cice_file(rootdir, region, & logical :: file_exists integer :: yyyy_local, mm_local, dd_local, hh_local integer :: fh_local - character*255 :: message (msglns) + character(len=LDT_CONST_PATH_LEN) :: message (msglns) character*20 :: routine_name character*10 :: yyyymmddhh integer, parameter :: nlat_arc = 2501 @@ -270,6 +271,7 @@ subroutine find_espcd_cice_file(rootdir, region, & aice, nlon, nlat) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun ! Defaults @@ -282,7 +284,7 @@ subroutine find_espcd_cice_file(rootdir, region, & integer, intent(in) :: mm integer, intent(in) :: dd integer, intent(in) :: hh - character*255, intent(out) :: filename + character(len=LDT_CONST_PATH_LEN), intent(out) :: filename real, allocatable, intent(inout) :: aice(:,:,:) integer, intent(out) :: nlon integer, intent(out) :: nlat @@ -299,6 +301,9 @@ end subroutine find_espcd_cice_file subroutine construct_espcd_cice_filename(rootdir, region, & yyyy, mm, dd, hh, fh, filename) + ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none @@ -310,7 +315,7 @@ subroutine construct_espcd_cice_filename(rootdir, region, & integer, intent(in) :: dd integer, intent(in) :: hh integer, intent(in) :: fh - character*255, intent(out) :: filename + character(len=LDT_CONST_PATH_LEN), intent(out) :: filename ! Local variables character*10 :: yyyymmddhh @@ -331,6 +336,7 @@ subroutine find_espcd_sst_file(rootdir, yyyy, mm, dd, hh, & ! Imports use netcdf + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun use LDT_timeMgrMod, only: LDT_get_julhr, LDT_julhr_date use USAFSI_paramsMod, only: program_name, msglns @@ -345,7 +351,7 @@ subroutine find_espcd_sst_file(rootdir, yyyy, mm, dd, hh, & integer, intent(in) :: mm integer, intent(in) :: dd integer, intent(in) :: hh - character*255, intent(inout) :: filename + character(len=LDT_CONST_PATH_LEN), intent(inout) :: filename real, allocatable, intent(inout) :: water_temp(:,:,:,:) integer, intent(out) :: nlat integer, intent(out) :: nlon @@ -354,7 +360,7 @@ subroutine find_espcd_sst_file(rootdir, yyyy, mm, dd, hh, & integer :: julhr, julhr_orig integer :: yyyy_local, mm_local, dd_local, hh_local, fh_local logical :: file_exists - character*255 :: message (msglns) + character(len=LDT_CONST_PATH_LEN) :: message (msglns) character*20 :: routine_name character*10 :: yyyymmddhh integer :: ncid, water_temp_varid @@ -547,6 +553,7 @@ subroutine find_espcd_sst_file(rootdir, yyyy, mm, dd, hh, & filename, water_temp, nlat, nlon) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun ! Defaults @@ -558,7 +565,7 @@ subroutine find_espcd_sst_file(rootdir, yyyy, mm, dd, hh, & integer, intent(in) :: mm integer, intent(in) :: dd integer, intent(in) :: hh - character*255, intent(inout) :: filename + character(len=LDT_CONST_PATH_LEN), intent(inout) :: filename real, allocatable, intent(inout) :: water_temp(:,:,:,:) integer, intent(out) :: nlat integer, intent(out) :: nlon @@ -575,6 +582,9 @@ end subroutine find_espcd_sst_file subroutine construct_espcd_sst_filename(rootdir, & yyyy, mm, dd, hh, fh, filename) + ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none @@ -585,7 +595,7 @@ subroutine construct_espcd_sst_filename(rootdir, & integer, intent(in) :: dd integer, intent(in) :: hh integer, intent(in) :: fh - character*255, intent(out) :: filename + character(len=LDT_CONST_PATH_LEN), intent(out) :: filename ! Locals character*10 :: yyyymmddhh @@ -606,6 +616,7 @@ subroutine process_espcd_sst(rootdir, nc, nr, landmask, sst, & yyyy, mm, dd, hh, ierr) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc, LDT_domain use LDT_logMod, only: LDT_verify, LDT_endrun use netcdf @@ -628,7 +639,7 @@ subroutine process_espcd_sst(rootdir, nc, nr, landmask, sst, & ! Locals integer :: nlat integer :: nlon - character*255 :: filename + character(LDT_CONST_PATH_LEN) :: filename real, allocatable :: water_temp(:,:,:,:) real, allocatable :: water_temp_1d(:) real, allocatable :: sst_1d(:) @@ -844,6 +855,7 @@ subroutine process_espcd_cice_region(region, rootdir, nc, nr, & landmask, yyyy, mm, dd, hh, icecon, ierr) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc use LDT_logMod, only: LDT_logunit, LDT_endrun, LDT_verify use netcdf @@ -865,7 +877,7 @@ subroutine process_espcd_cice_region(region, rootdir, nc, nr, & integer, parameter :: nlat_arc = 2501 integer, parameter :: nlat_ant = 1549 integer :: nlon = 9000 - character*255 :: filename + character(LDT_CONST_PATH_LEN) :: filename real, allocatable :: aice(:,:,:) real, allocatable :: aice_1d(:) real, allocatable :: icecon_1d(:) diff --git a/ldt/USAFSI/USAFSI_galwemMod.F90 b/ldt/USAFSI/USAFSI_galwemMod.F90 index fcf4bb1aa..67a3bcfee 100644 --- a/ldt/USAFSI/USAFSI_galwemMod.F90 +++ b/ldt/USAFSI/USAFSI_galwemMod.F90 @@ -36,6 +36,7 @@ subroutine USAFSI_get_galwem_t2m(n, julhr, nc, nr, t2m, rc) #if (defined USE_GRIBAPI) use grib_api #endif + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit use LDT_timeMgrMod, only: LDT_julhr_date use LDT_usafsiMod, only: usafsi_settings @@ -52,7 +53,7 @@ subroutine USAFSI_get_galwem_t2m(n, julhr, nc, nr, t2m, rc) integer, intent(inout) :: rc ! Local variables - character(255) :: gribfilename + character(LDT_CONST_PATH_LEN) :: gribfilename real :: gridDesci_glb(50) logical :: file_exists logical :: found diff --git a/ldt/USAFSI/USAFSI_gofsMod.F90 b/ldt/USAFSI/USAFSI_gofsMod.F90 index 8096e4977..704182735 100644 --- a/ldt/USAFSI/USAFSI_gofsMod.F90 +++ b/ldt/USAFSI/USAFSI_gofsMod.F90 @@ -40,9 +40,10 @@ subroutine find_gofs_cice_file(rootdir, region, yyyy, mm, dd, hh, fh, & filename) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit use LDT_timeMgrMod, only: LDT_get_julhr, LDT_julhr_date - + ! Defaults implicit none @@ -54,7 +55,7 @@ subroutine find_gofs_cice_file(rootdir, region, yyyy, mm, dd, hh, fh, & integer, intent(inout) :: dd integer, intent(inout) :: hh integer, intent(inout) :: fh - character*255, intent(out) :: filename + character(len=LDT_CONST_PATH_LEN), intent(out) :: filename ! Local variables integer :: julhr, julhr_orig @@ -116,6 +117,9 @@ end subroutine find_gofs_cice_file subroutine construct_gofs_cice_filename(rootdir, region, & yyyy, mm, dd, hh, fh, filename) + ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none @@ -127,7 +131,7 @@ subroutine construct_gofs_cice_filename(rootdir, region, & integer, intent(in) :: dd integer, intent(in) :: hh integer, intent(in) :: fh - character*255, intent(out) :: filename + character(len=LDT_CONST_PATH_LEN), intent(out) :: filename ! Local variables character*10 :: yyyymmddhh @@ -146,6 +150,7 @@ subroutine find_gofs_sst_file(rootdir, yyyy, mm, dd, hh, fh, & filename) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit use LDT_timeMgrMod, only: LDT_get_julhr, LDT_julhr_date @@ -159,7 +164,7 @@ subroutine find_gofs_sst_file(rootdir, yyyy, mm, dd, hh, fh, & integer, intent(inout) :: dd integer, intent(inout) :: hh integer, intent(inout) :: fh - character*255, intent(inout) :: filename + character(LDT_CONST_PATH_LEN), intent(inout) :: filename ! Local variables integer :: julhr, julhr_orig @@ -227,6 +232,9 @@ end subroutine find_gofs_sst_file subroutine construct_gofs_sst_filename(rootdir, & yyyy, mm, dd, hh, fh, filename) + ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none @@ -237,7 +245,7 @@ subroutine construct_gofs_sst_filename(rootdir, & integer, intent(in) :: dd integer, intent(in) :: hh integer, intent(in) :: fh - character*255, intent(out) :: filename + character(LDT_CONST_PATH_LEN), intent(out) :: filename ! Local variables character*10 :: yyyymmddhh @@ -259,6 +267,7 @@ subroutine process_gofs_sst(rootdir, nc, nr, landmask, sst, & ierr) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc, LDT_domain use LDT_logMod, only: LDT_verify, ldt_logunit use netcdf @@ -284,7 +293,7 @@ subroutine process_gofs_sst(rootdir, nc, nr, landmask, sst, & integer, parameter :: nlon = 4500 ! Local variables - character*255 :: filename + character(LDT_CONST_PATH_LEN) :: filename integer :: ncid, water_temp_varid real, allocatable :: water_temp(:,:,:,:) real, allocatable :: water_temp_1d(:) @@ -522,6 +531,7 @@ subroutine process_gofs_cice_region(region, rootdir, nc, nr, landmask, & yyyy, mm, dd, hh, fh, icecon, ierr) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc use LDT_logMod, only: LDT_logunit, LDT_endrun, LDT_verify use netcdf @@ -546,7 +556,7 @@ subroutine process_gofs_cice_region(region, rootdir, nc, nr, landmask, & integer, parameter :: nlon = 4500 ! Local variables - character*255 :: filename + character(LDT_CONST_PATH_LEN) :: filename integer :: ncid, aice_varid real, allocatable :: aice(:,:,:) real, allocatable :: aice_1d(:) diff --git a/ldt/USAFSI/USAFSI_lisMod.F90 b/ldt/USAFSI/USAFSI_lisMod.F90 index 139b0870d..837da86ed 100644 --- a/ldt/USAFSI/USAFSI_lisMod.F90 +++ b/ldt/USAFSI/USAFSI_lisMod.F90 @@ -38,6 +38,7 @@ subroutine read_gr2_t2(date10, nc, nr, sfctmp, ierr) ! Imports use grib_api + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc, LDT_domain use LDT_logMod, only: LDT_logunit, LDT_verify, LDT_endrun use USAFSI_paramsMod @@ -53,7 +54,7 @@ subroutine read_gr2_t2(date10, nc, nr, sfctmp, ierr) integer, intent(out) :: ierr ! Local variables - character*255 :: infilename + character(len=LDT_CONST_PATH_LEN) :: infilename logical :: file_exists character*12 :: routine_name integer :: ifile, igrib @@ -398,10 +399,11 @@ end subroutine read_gr2_t2 ! Builds path to LIS GRIB2 file subroutine construct_lis_grib2_filename(date10, filename) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_usafsiMod, only: usafsi_settings implicit none character*10, intent(in) :: date10 - character*255, intent(out) :: filename + character(len=LDT_CONST_PATH_LEN), intent(out) :: filename filename = trim(usafsi_settings%lis_grib2_dir) & // "/PS." & // "557WW_SC." & diff --git a/ldt/USAFSI/USAFSI_netcdfMod.F90 b/ldt/USAFSI/USAFSI_netcdfMod.F90 index fae7e42c4..981150ebe 100644 --- a/ldt/USAFSI/USAFSI_netcdfMod.F90 +++ b/ldt/USAFSI/USAFSI_netcdfMod.F90 @@ -42,6 +42,7 @@ module USAFSI_netcdfMod subroutine USAFSI_write_netcdf(date10) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc, LDT_masterproc use LDT_logMod, only: LDT_logunit, LDT_endrun, LDT_verify use LDT_usafsiMod, only: usafsi_settings @@ -58,7 +59,7 @@ subroutine USAFSI_write_netcdf(date10) character*10, intent(in) :: date10 ! Local variables - character*255 :: outfilename + character(len=LDT_CONST_PATH_LEN) :: outfilename integer :: iret integer :: ncid character*8 :: date @@ -470,6 +471,7 @@ end subroutine USAFSI_write_netcdf subroutine USAFSI_read_netcdf(date10,ierr) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc use LDT_logMod, only: LDT_logunit, LDT_endrun, LDT_verify #if(defined USE_NETCDF3 || defined USE_NETCDF4) @@ -486,7 +488,7 @@ subroutine USAFSI_read_netcdf(date10,ierr) integer, intent(out) :: ierr ! Local variables - character*255 :: infilename + character(len=LDT_CONST_PATH_LEN) :: infilename logical :: file_exists integer :: ncid, dim_ids(3) integer :: snoanl_varid, snoage_varid, icecon_varid, icemask_varid, & @@ -664,6 +666,7 @@ end subroutine USAFSI_read_netcdf subroutine USAFSI_read_netcdf_12z(date10,ierr) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc use LDT_logMod, only: LDT_logunit, LDT_endrun, LDT_verify use LDT_usafsiMod, only: usafsi_settings @@ -680,7 +683,7 @@ subroutine USAFSI_read_netcdf_12z(date10,ierr) integer, intent(out) :: ierr ! Local variables - character*255 :: infilename + character(len=LDT_CONST_PATH_LEN) :: infilename logical :: file_exists integer :: ncid, dim_ids(3) integer :: snoage_varid, iceage_varid diff --git a/ldt/USAFSI/USAFSI_run.F90 b/ldt/USAFSI/USAFSI_run.F90 index 36b85562a..9bb9fe5d2 100644 --- a/ldt/USAFSI/USAFSI_run.F90 +++ b/ldt/USAFSI/USAFSI_run.F90 @@ -80,6 +80,7 @@ subroutine USAFSI_run(n) ! Imports use LDT_bratsethMod + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_masterproc, LDT_rc use LDT_logMod, only: LDT_logunit, LDT_endrun use LDT_pluginIndices @@ -109,20 +110,20 @@ subroutine USAFSI_run(n) ! Local variables character*10 :: date10 ! DATE-TIME GROUP OF CYCLE - character*255 :: fracdir ! FRACTIONAL SNOW DIRECTORY PATH - character*90 :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: fracdir ! FRACTIONAL SNOW DIRECTORY PATH + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE character*5, allocatable :: netid (:) ! NETWORK ID OF AN OBSERVATION - character*255 :: modif ! PATH TO MODIFIED DATA DIRECTORY - character*255 :: sfcobs ! PATH TO DBPULL SNOW OBS DIRECTORY + character(len=LDT_CONST_PATH_LEN) :: modif ! PATH TO MODIFIED DATA DIRECTORY + character(len=LDT_CONST_PATH_LEN) :: sfcobs ! PATH TO DBPULL SNOW OBS DIRECTORY integer :: sfcobsfmt ! Format of sfcobs file - character*255 :: TB_product_path ! TB_based retrivals path !kyh20201118 + character(len=LDT_CONST_PATH_LEN) :: TB_product_path ! TB_based retrivals path !kyh20201118 !character*9, allocatable :: staid (:) ! STATION ID OF AN OBSERVATION character*32, allocatable :: staid (:) ! STATION ID OF AN OBSERVATION - character*255 :: static ! STATIC FILE DIRECTORY PATH - character*255 :: stmpdir ! SFC TEMP DIRECTORY PATH - character*255 :: sstdir ! EMK 20220113 - character*255 :: unmod ! PATH TO UNMODIFIED DATA DIRECTORY - character*255 :: viirsdir ! PATH TO VIIRS DATA DIRECTORY + character(len=LDT_CONST_PATH_LEN) :: static ! STATIC FILE DIRECTORY PATH + character(len=LDT_CONST_PATH_LEN) :: stmpdir ! SFC TEMP DIRECTORY PATH + character(len=LDT_CONST_PATH_LEN) :: sstdir ! EMK 20220113 + character(len=LDT_CONST_PATH_LEN) :: unmod ! PATH TO UNMODIFIED DATA DIRECTORY + character(len=LDT_CONST_PATH_LEN) :: viirsdir ! PATH TO VIIRS DATA DIRECTORY integer :: runcycle ! CYCLE HOUR integer :: hemi ! HEMISPHERE (1 = NH, 2 = SH, 3 = GLOBAL) integer :: julhr ! AFWA JULIAN HOUR BEING PROCESSED @@ -156,7 +157,7 @@ subroutine USAFSI_run(n) logical :: just_12z ! PMW snow depth retrievals, Yeosang Yoon - character*255 :: TB_raw_dir ! Brightness temperature raw file directory path !kyh20201118 + character(len=LDT_CONST_PATH_LEN) :: TB_raw_dir ! Brightness temperature raw file directory path !kyh20201118 maxsobs = usafsi_settings%maxsobs @@ -578,6 +579,7 @@ subroutine USAFSI_run(n) subroutine read_params(nc, nr, landmask, elevation, landice) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc use LDT_logMod, only: LDT_logunit, LDT_verify use LDT_paramDataMod, only: LDT_LSMparam_struc @@ -594,7 +596,7 @@ subroutine read_params(nc, nr, landmask, elevation, landice) real, allocatable, intent(out) :: landice(:,:) ! Local variables - character*255 :: filename + character(len=LDT_CONST_PATH_LEN) :: filename integer :: ncid integer :: dimids(3) integer :: landmask_varid, elevation_varid, surfacetype_varid diff --git a/ldt/USAFSI/USAFSI_ssmisMod.F90 b/ldt/USAFSI/USAFSI_ssmisMod.F90 index 08bc9a84d..0d982ca79 100644 --- a/ldt/USAFSI/USAFSI_ssmisMod.F90 +++ b/ldt/USAFSI/USAFSI_ssmisMod.F90 @@ -41,6 +41,7 @@ module USAFSI_ssmisMod subroutine USAFSI_proc_ssmis(date10, ssmis_in, ssmis, option) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun, LDT_verify use USAFSI_utilMod use USAFSI_paramsMod @@ -51,13 +52,13 @@ subroutine USAFSI_proc_ssmis(date10, ssmis_in, ssmis, option) ! Arguments character(len=10), intent(in) :: date10 - character(len=255), intent(in) :: ssmis_in - character(len=255), intent(in) :: ssmis + character(len=LDT_CONST_PATH_LEN), intent(in) :: ssmis_in + character(len=LDT_CONST_PATH_LEN), intent(in) :: ssmis integer, intent(in) :: option ! Local variables integer :: eof, i, j, n, nArr, nFile, x, y - character(len=255) :: filename, nc_filename + character(len=LDT_CONST_PATH_LEN) :: filename, nc_filename integer, dimension(:), allocatable :: surflag0, surflag, & satid0, satid character(len=10), dimension(:), allocatable :: date0, date10_arr @@ -237,13 +238,14 @@ subroutine read_bufr_attributes(filename, satid, date10_arr, lat, lon, & ! Imports use eccodes + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: ldt_logunit ! Defaults implicit none ! Arguments - character(len=255), intent(in) :: filename + character(len=LDT_CONST_PATH_LEN), intent(in) :: filename integer, allocatable, intent(inout) :: satid(:) character(len=10), allocatable, intent(inout) :: date10_arr(:) real(kind=8), allocatable, intent(inout) :: lat(:) @@ -399,9 +401,10 @@ end subroutine read_bufr_attributes ! Dummy version if no ECCODES support was compiled subroutine read_bufr_attributes(filename, satid, date10_arr, lat, lon, & surflag, tb19h, tb19v, tb37h, tb37v, tb22v, tb91v, tb91h) + use LDT_constantMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_endrun, LDT_logunit implicit none - character(len=255), intent(in) :: filename + character(len=LDT_CONST_PATH_LEN), intent(in) :: filename integer, allocatable, intent(inout) :: satid(:) character(len=10), allocatable, intent(inout) :: date10_arr(:) real(kind=8), allocatable, intent(inout) :: lat(:) @@ -430,6 +433,7 @@ subroutine calculate_snowdepth(n, surflag, tb19h, tb19v, tb37h, tb37v, & ! option == 3; Foster et al., 1997 ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: ldt_logunit use LDT_usafsiMod, only: usafsi_settings @@ -457,7 +461,7 @@ subroutine calculate_snowdepth(n, surflag, tb19h, tb19v, tb37h, tb37v, & ! Local variables integer :: i - character(len=255) :: ff_filename + character(len=LDT_CONST_PATH_LEN) :: ff_filename real(kind=8) :: pd19,pd91,tt,si91, & scat,sc37,sc91,scx logical :: flag @@ -960,6 +964,7 @@ end subroutine checkgrid subroutine read_forestfraction(ff_filename, ff) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_verify use netcdf @@ -967,7 +972,7 @@ subroutine read_forestfraction(ff_filename, ff) implicit none ! Arguments - character (len=255), intent(in) :: ff_filename + character (len=LDT_CONST_PATH_LEN), intent(in) :: ff_filename real, intent(out) :: ff(1440,720) ! fixed 1/4 deg ! Local variables @@ -995,9 +1000,10 @@ end subroutine read_forestfraction #else ! Dummy version subroutine read_forestfraction(ff_filename, ff) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun implicit none - character (len=255), intent(in) :: ff_filename + character (len=LDT_CONST_PATH_LEN), intent(in) :: ff_filename real, intent(out) :: ff(1440,720) ! fixed 1/4 deg write(LDT_logunit,*) & "[ERR] Recompile LDT with netCDF4 support!" @@ -1010,6 +1016,7 @@ end subroutine read_forestfraction subroutine search_files(date10, ssmis_in) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use USAFSI_utilMod, only: date10_julhr, julhr_date10 ! Defaults @@ -1017,11 +1024,11 @@ subroutine search_files(date10, ssmis_in) ! Arguments character*10, intent(in) :: date10 - character*255, intent(in) :: ssmis_in + character(len=LDT_CONST_PATH_LEN), intent(in) :: ssmis_in ! Local variables integer :: eof, n, i, j, k - character(len=255) :: file_path, cmd + character(len=LDT_CONST_PATH_LEN) :: file_path, cmd character*10 :: date10_prev integer :: hr, st_hr, julhr character*2 :: satid (3) diff --git a/ldt/USAFSI/USAFSI_utilMod.F90 b/ldt/USAFSI/USAFSI_utilMod.F90 index 54b28484e..565390e23 100644 --- a/ldt/USAFSI/USAFSI_utilMod.F90 +++ b/ldt/USAFSI/USAFSI_utilMod.F90 @@ -68,6 +68,7 @@ subroutine abort_message (program_name, routine_name, message) !************************************************************************* !************************************************************************* ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun ! Defaults @@ -83,8 +84,8 @@ subroutine abort_message (program_name, routine_name, message) ! Local variables character*7 :: access_type ! FILE ACCESS TYPE - character*255 :: errmsg (msglns) ! ERROR MESSAGE TO OUTPUT - character*255 :: message_file ! MESSAGE FILE NAME + character(len=LDT_CONST_PATH_LEN) :: errmsg (msglns) ! ERROR MESSAGE TO OUTPUT + character(len=LDT_CONST_PATH_LEN) :: message_file ! MESSAGE FILE NAME integer :: i ! DO LOOP COUNTER integer :: istat ! I/O STATUS integer :: nlines ! NUMBER OF LINES IN MESSAGE @@ -206,6 +207,8 @@ subroutine date10_julhr(date10, julhr, program_name, routine_name) !----------------------------------------------------------------------- !----------------------------------------------------------------------- + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none @@ -216,7 +219,7 @@ subroutine date10_julhr(date10, julhr, program_name, routine_name) character*20, intent(in) :: routine_name ! NAME OF CALLING ROUTINE ! Local variables - character*90 :: message (20) ! ERROR MESSAGE ! EMK + character(len=LDT_CONST_PATH_LEN) :: message (20) ! ERROR MESSAGE ! EMK character*12 :: librtne_name ! NAME OF THIS ROUTINE integer :: days ! TOTAL DAYS integer :: dd ! DAY OF THE MONTH @@ -378,6 +381,7 @@ subroutine error_message (program_name, routine_name, yyyymmddhh, & !************************************************************************* !************************************************************************* ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun ! Defaults @@ -395,9 +399,8 @@ subroutine error_message (program_name, routine_name, yyyymmddhh, & ! Local variables character*7 :: access_type ! FILE ACCESS TYPE character*2 :: calert_number ! ALERT NUMBER FOR FILE NAME - !character*100 :: errmsg (msglns) ! ERROR MESSAGE TO OUTPUT - character*255 :: errmsg (msglns) ! ERROR MESSAGE TO OUTPUT - character*255 :: message_file ! MESSAGE FILE NAME + character(len=LDT_CONST_PATH_LEN) :: errmsg (msglns) ! ERROR MESSAGE TO OUTPUT + character(len=LDT_CONST_PATH_LEN) :: message_file ! MESSAGE FILE NAME integer :: alert_number ! ALERT NUMBER integer :: i ! DO LOOP COUNTER integer :: istat ! I/O STATUS @@ -532,6 +535,8 @@ subroutine julhr_date10( julhr, date10, program_name, routine_call ) !----------------------------------------------------------------------- !----------------------------------------------------------------------- + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none @@ -542,7 +547,7 @@ subroutine julhr_date10( julhr, date10, program_name, routine_call ) character*20, intent(in) :: routine_call ! NAME OF CALLING ROUTINE ! Local variables - character*90 :: message (20) ! ERROR MESSAGE ! EMK + character(len=LDT_CONST_PATH_LEN) :: message (20) ! ERROR MESSAGE ! EMK integer :: dd ! DAY OF THE MONTH integer :: hh ! HOUR OF THE DAY integer :: j ! DO LOOP COUNTER @@ -657,6 +662,8 @@ subroutine putget_int1 ( buffer, iofunc, file_name, program_name, & !******************************************************************************* !******************************************************************************* + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none @@ -666,7 +673,7 @@ subroutine putget_int1 ( buffer, iofunc, file_name, program_name, & ! Arguments integer*1, intent(inout) :: buffer (igrid, jgrid) ! DATA TO BE READ/WRITTEN character*1, intent(in) :: iofunc ! I/O FUNCTION ('r', 'w') - character*255, intent(in) :: file_name ! FILE PATH AND NAME + character(len=LDT_CONST_PATH_LEN), intent(in) :: file_name ! FILE PATH AND NAME character*12, intent(in) :: program_name ! NAME OF CALLING PROGRAM character*20, intent(in) :: routine_name ! NAME OF CALLING ROUTINE integer, intent(in) :: igrid ! SIZE OF GRID IN I-DIRECTION @@ -675,7 +682,7 @@ subroutine putget_int1 ( buffer, iofunc, file_name, program_name, & ! Local variables character*7 :: access_type ! FILE ACCESS TYPE character*4 :: cstat ! I/O STATUS FOR MESSAGE - character*90 :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE integer :: istat ! I/O STATUS integer :: istat1 ! CONVERSION STATUS integer :: reclen ! FILE RECORD LENGTH @@ -766,6 +773,8 @@ subroutine putget_int ( buffer, iofunc, file_name, program_name, & !******************************************************************************* !******************************************************************************* + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none @@ -775,7 +784,7 @@ subroutine putget_int ( buffer, iofunc, file_name, program_name, & ! Arguments integer, intent(inout) :: buffer (igrid, jgrid) ! DATA TO BE READ/WRITTEN character*1, intent(in) :: iofunc ! I/O FUNCTION ('r', 'w') - character*255, intent(in) :: file_name ! FILE PATH AND NAME + character(len=LDT_CONST_PATH_LEN), intent(in) :: file_name ! FILE PATH AND NAME character*12, intent(in) :: program_name ! NAME OF CALLING PROGRAM character*20, intent(in) :: routine_name ! NAME OF CALLING ROUTINE integer, intent(in) :: igrid ! SIZE OF GRID IN I-DIRECTION @@ -784,7 +793,7 @@ subroutine putget_int ( buffer, iofunc, file_name, program_name, & ! Local variables character*7 :: access_type ! FILE ACCESS TYPE character*4 :: cstat ! I/O STATUS FOR MESSAGE - character*90 :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE integer :: istat ! I/O STATUS integer :: istat1 ! CONVERSION STATUS integer :: reclen ! FILE RECORD LENGTH @@ -875,6 +884,8 @@ subroutine putget_real ( buffer, iofunc, file_name, program_name, & !******************************************************************************* !******************************************************************************* + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none @@ -893,7 +904,7 @@ subroutine putget_real ( buffer, iofunc, file_name, program_name, & ! Local variables character*7 :: access_type ! FILE ACCESS TYPE character*4 :: cstat ! I/O STATUS FOR MESSAGE - character*90 :: message (msglns) ! ERROR MESSAGE + character(len=LDT_CONST_PATH_LEN) :: message (msglns) ! ERROR MESSAGE integer :: istat ! I/O STATUS integer :: istat1 ! CONVERSION STATUS integer :: reclen ! FILE RECORD LENGTH diff --git a/ldt/USAFSI/USAFSI_xcalgmiMod.F90 b/ldt/USAFSI/USAFSI_xcalgmiMod.F90 index fcd4aac6e..0d88b247a 100755 --- a/ldt/USAFSI/USAFSI_xcalgmiMod.F90 +++ b/ldt/USAFSI/USAFSI_xcalgmiMod.F90 @@ -39,6 +39,7 @@ module USAFSI_xcalgmiMod subroutine USAFSI_proc_xcalgmi(date10, gmi_in, gmi, option) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun, LDT_verify use USAFSI_utilMod @@ -47,13 +48,13 @@ subroutine USAFSI_proc_xcalgmi(date10, gmi_in, gmi, option) ! Arguments character(len=10), intent(in) :: date10 - character(len=255), intent(in) :: gmi_in - character(len=255), intent(in) :: gmi + character(len=LDT_CONST_PATH_LEN), intent(in) :: gmi_in + character(len=LDT_CONST_PATH_LEN), intent(in) :: gmi integer, intent(in) :: option ! Local variables integer :: eof, i, j, n, nArr, nFile, x, y - character(len=255) :: filename, nc_filename + character(len=LDT_CONST_PATH_LEN) :: filename, nc_filename !integer, dimension(:), allocatable :: surflag0, surflag !YY character(len=10), dimension(:), allocatable :: date0, date10_arr real, dimension(:), allocatable :: lat0, lon0, tb10h0, tb10v0, tb19h0, tb19v0, & @@ -224,13 +225,14 @@ subroutine read_xcalgmi_attributes(filename, date10_arr, lat, lon, tb10h, tb10v, #endif ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun, LDT_verify !Defaults implicit none !Arguments - character(len=255), intent(in) :: filename + character(len=LDT_CONST_PATH_LEN), intent(in) :: filename character(len=10), allocatable, intent(inout) :: date10_arr(:) real, allocatable, intent(inout) :: lat(:), lon(:) real, allocatable :: lat_raw(:,:), lon_raw(:,:) @@ -526,6 +528,7 @@ subroutine calculate_snowdepth(n, tb10h, tb10v, tb19h, tb19v, & ! option == 4; Kelly, 2009 ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_usafsiMod, only: usafsi_settings ! Defaults @@ -554,8 +557,8 @@ subroutine calculate_snowdepth(n, tb10h, tb10v, tb19h, tb19v, & ! Local variables integer :: i - character(len=255) :: ff_filename - character(len=255) :: fd_filename + character(len=LDT_CONST_PATH_LEN) :: ff_filename + character(len=LDT_CONST_PATH_LEN) :: fd_filename real :: pd19,pd37,pd89,tt,si89, & scat,sc37,sc89,scx logical :: flag @@ -1188,6 +1191,7 @@ end subroutine checkgrid subroutine read_forestfraction(ff_filename, ff) ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_verify use netcdf @@ -1195,7 +1199,7 @@ subroutine read_forestfraction(ff_filename, ff) implicit none ! Arguments - character (len=255), intent(in) :: ff_filename + character (len=LDT_CONST_PATH_LEN), intent(in) :: ff_filename real, intent(out) :: ff(1440,720) ! fixed 1/4 deg ! Local variables @@ -1223,9 +1227,10 @@ end subroutine read_forestfraction #else ! Dummy version subroutine read_forestfraction(ff_filename, ff) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_logunit, LDT_endrun implicit none - character (len=255), intent(in) :: ff_filename + character (len=LDT_CONST_PATH_LEN), intent(in) :: ff_filename real, intent(out) :: ff(1440,720) ! fixed 1/4 deg write(LDT_logunit,*) & "[ERR] Recompile LDT with netCDF4 support!" @@ -1236,7 +1241,9 @@ end subroutine read_forestfraction #endif subroutine read_forestdensity(fd_filename, fd) + ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only: LDT_verify use netcdf @@ -1244,7 +1251,7 @@ subroutine read_forestdensity(fd_filename, fd) implicit none ! Arguments - character (len=255), intent(in) :: fd_filename + character (len=LDT_CONST_PATH_LEN), intent(in) :: fd_filename real, intent(out) :: fd(1440,720) ! fixed 1/4 deg ! Local variables @@ -1271,7 +1278,9 @@ end subroutine read_forestdensity subroutine search_files(date10, gmi_in) + ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use USAFSI_utilMod, only: date10_julhr, julhr_date10 ! Defaults @@ -1279,11 +1288,11 @@ subroutine search_files(date10, gmi_in) ! Arguments character*10, intent(in) :: date10 - character*255, intent(in) :: gmi_in + character(len=LDT_CONST_PATH_LEN), intent(in) :: gmi_in ! Local variables integer :: eof, n, i, j, k - character(len=255) :: file_path, cmd + character(len=LDT_CONST_PATH_LEN) :: file_path, cmd character*10 :: date10_prev integer :: hr, st_hr, julhr character*2 :: st_hr_str, cnt diff --git a/ldt/core/LDT_ANNMod.F90 b/ldt/core/LDT_ANNMod.F90 index bf5eef3b2..749a56984 100644 --- a/ldt/core/LDT_ANNMod.F90 +++ b/ldt/core/LDT_ANNMod.F90 @@ -672,7 +672,7 @@ subroutine predictANN(n) integer :: system #endif integer, external :: LDT_create_subdirs - character(len=201) :: c_string + character(len=LDT_CONST_PATH_LEN) :: c_string character(len=LDT_CONST_PATH_LEN) :: filename integer :: c,r,gid,dimID(2),tdimID integer :: latId, lonId, varId,xtimeID diff --git a/ldt/core/LDT_PRIV_rcMod.F90 b/ldt/core/LDT_PRIV_rcMod.F90 index 6d0befdad..4cda89ee9 100644 --- a/ldt/core/LDT_PRIV_rcMod.F90 +++ b/ldt/core/LDT_PRIV_rcMod.F90 @@ -356,8 +356,8 @@ module LDT_PRIV_rcMod integer :: cdf_nbins integer :: cdf_ntimes integer :: group_cdfs - character*50 :: group_cdfs_attrib_file - character*50 :: group_cdfs_strat_file + character(len=LDT_CONST_PATH_LEN) :: group_cdfs_attrib_file + character(len=LDT_CONST_PATH_LEN) :: group_cdfs_strat_file real :: group_cdfs_min real :: group_cdfs_max integer :: group_cdfs_nbins @@ -366,7 +366,7 @@ module LDT_PRIV_rcMod integer :: strat_cdfs integer :: write_strat_cdfs character*50 :: strat_src - character*50 :: strat_file + character(len=LDT_CONST_PATH_LEN) :: strat_file !character*50 :: strat_cdfs_attrib_file integer :: strat_cdfs_nbins integer :: stratified_cdfs_nbins @@ -406,8 +406,8 @@ module LDT_PRIV_rcMod character*100 :: rstsource character*50 :: ensrstmode character*50 :: ensrstsampling - character*140 :: inputrst - character*140 :: outputrst + character(len=LDT_CONST_PATH_LEN) :: inputrst + character(len=LDT_CONST_PATH_LEN) :: outputrst integer :: nens_in integer :: nens_out diff --git a/ldt/core/LDT_fileIOMod.F90 b/ldt/core/LDT_fileIOMod.F90 index 246c51294..fcf90185b 100644 --- a/ldt/core/LDT_fileIOMod.F90 +++ b/ldt/core/LDT_fileIOMod.F90 @@ -105,7 +105,8 @@ module LDT_fileIOMod ! ! !INTERFACE: subroutine LDT_create_output_directory(mname,dir_name) -! !USES: + ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_log_msg implicit none @@ -145,7 +146,7 @@ subroutine LDT_create_output_directory(mname,dir_name) !EOP character(len=4) :: cdate character(len=8) :: cdate1 - character(len=200) :: out_dname + character(len=LDT_CONST_PATH_LEN) :: out_dname integer :: try,ios #if (!defined AIX ) integer :: system @@ -156,7 +157,7 @@ subroutine LDT_create_output_directory(mname,dir_name) ! standard POSIX function. This requires defining the C wrapper function, ! and specifying new variables to pass to said C function. integer, external :: LDT_create_subdirs - character(len=201) :: c_string + character(len=LDT_CONST_PATH_LEN) :: c_string if(LDT_rc%wstyle.eq."4 level hierarchy") then @@ -544,6 +545,7 @@ end subroutine LDT_create_output_filename subroutine LDT_create_stats_filename(n, fname, mname, style) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc implicit none @@ -571,7 +573,7 @@ subroutine LDT_create_stats_filename(n, fname, mname, style) ! ! !EOP - character(len=200) :: out_fname + character(len=LDT_CONST_PATH_LEN) :: out_fname character*100 :: cdate integer :: style_temp @@ -606,6 +608,7 @@ end subroutine LDT_create_stats_filename ! !INTERFACE: subroutine LDT_create_daobs_filename(n, fname) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc implicit none @@ -631,7 +634,7 @@ subroutine LDT_create_daobs_filename(n, fname) ! ! !EOP - character(len=200) :: out_fname + character(len=LDT_CONST_PATH_LEN) :: out_fname character*100 :: cdate integer :: style_temp @@ -1659,6 +1662,7 @@ end subroutine LDT_checkDomainExtents subroutine create_restart_filename_withtime(n, rootdir,dir_name,model_name,& yr,mo,da,hr,mn,ss, wstyle, wformat,fname) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN implicit none ! !ARGUMENTS: @@ -1695,8 +1699,8 @@ subroutine create_restart_filename_withtime(n, rootdir,dir_name,model_name,& !EOP character(len=10) :: cdate character(len=12) :: cdate1 - character(len=100) :: dname - character(len=200) :: out_fname + character(len=LDT_CONST_PATH_LEN) :: dname + character(len=LDT_CONST_PATH_LEN) :: out_fname if(wstyle.eq."4 level hierarchy") then diff --git a/ldt/core/LDT_gfracMod.F90 b/ldt/core/LDT_gfracMod.F90 index 78ee092a6..2557e6080 100644 --- a/ldt/core/LDT_gfracMod.F90 +++ b/ldt/core/LDT_gfracMod.F90 @@ -194,7 +194,8 @@ end subroutine gfrac_readParamSpecs_LISHydro ! ! !INTERFACE: subroutine LDT_greenness_init -! !USES: + ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_fileIOMod, only : LDT_readDomainConfigSpecs use LDT_logMod, only : LDT_verify use LDT_paramOptCheckMod, only: LDT_gfracOptChecks, & @@ -232,8 +233,8 @@ subroutine LDT_greenness_init real, allocatable :: gfrac_gridDesc(:,:) character*50 :: gfrac_proj character*50, allocatable :: gfrac_gridtransform(:) - character*100, allocatable :: gfracdir(:) - character*140, allocatable :: gfracfile(:) + character(len=LDT_CONST_PATH_LEN), allocatable :: gfracdir(:) + character(len=LDT_CONST_PATH_LEN), allocatable :: gfracfile(:) character*20, allocatable :: gfracInterval(:) ! _____________________________________________________________ diff --git a/ldt/core/LDT_laisaiMod.F90 b/ldt/core/LDT_laisaiMod.F90 index 11a61e1bf..40e70e958 100644 --- a/ldt/core/LDT_laisaiMod.F90 +++ b/ldt/core/LDT_laisaiMod.F90 @@ -132,7 +132,8 @@ end subroutine LDT_laisai_readParamSpecs ! !INTERFACE: subroutine LDT_laisai_init -! !USES: + ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_fileIOMod, only : LDT_readDomainConfigSpecs use LDT_logMod, only : LDT_verify use LDT_paramOptCheckMod, only: LDT_laisaiOptChecks, & @@ -166,10 +167,10 @@ subroutine LDT_laisai_init real, allocatable :: laisai_gridDesc(:,:) character*50 :: laisai_proj character*50, allocatable :: laisai_gridtransform(:) - character*100, allocatable :: laidir(:) - character*140, allocatable :: laifile(:) - character*100, allocatable :: saidir(:) - character*140, allocatable :: saifile(:) + character(len=LDT_CONST_PATH_LEN), allocatable :: laidir(:) + character(len=LDT_CONST_PATH_LEN), allocatable :: laifile(:) + character(len=LDT_CONST_PATH_LEN), allocatable :: saidir(:) + character(len=LDT_CONST_PATH_LEN), allocatable :: saifile(:) character*20, allocatable :: laisaiInterval(:) ! ___________________________________________________________________ diff --git a/ldt/core/LDT_logMod.F90 b/ldt/core/LDT_logMod.F90 index 0901750b1..3fa59488b 100644 --- a/ldt/core/LDT_logMod.F90 +++ b/ldt/core/LDT_logMod.F90 @@ -133,10 +133,10 @@ end subroutine LDT_log_msg ! ! !INTERFACE: subroutine LDT_abort( abort_message ) - + use LDT_constantsMod, only: LDT_CONST_PATH_LEN implicit none - character*100 :: abort_message(20) + character(len=LDT_CONST_PATH_LEN) :: abort_message(20) ! !DESCRIPTION: ! @@ -159,7 +159,7 @@ subroutine LDT_abort( abort_message ) ! !EOP character*7 :: iofunc - character*13 :: message_file + character(len=LDT_CONST_PATH_LEN) :: message_file integer :: i integer :: ftn integer :: istat @@ -227,7 +227,8 @@ end subroutine LDT_abort ! ! !INTERFACE: subroutine LDT_alert( program_name, alert_number, message ) -!EOP + !EOP + use LDT_constantsMod, only: LDT_CONST_PATH_LEN implicit none character(len=*), intent(in) :: program_name @@ -258,7 +259,7 @@ subroutine LDT_alert( program_name, alert_number, message ) !EOP character*3 :: calert_number character*7 :: iofunc - character*37 :: message_file + character(len=LDT_CONST_PATH_LEN) :: message_file integer :: i integer :: istat integer :: ftn diff --git a/ldt/core/LDT_metforcingMod.F90 b/ldt/core/LDT_metforcingMod.F90 index d8be4abad..26b45fd2b 100644 --- a/ldt/core/LDT_metforcingMod.F90 +++ b/ldt/core/LDT_metforcingMod.F90 @@ -1034,150 +1034,6 @@ subroutine LDT_perturb_forcing(n) ! routine to map a forcing fields to the LDT history writer ! \end{description} !EOP - integer :: k - real :: curr_time - integer :: status - integer :: i, j,t,m,t_unpert - integer :: objcount - integer :: fobjcount - integer :: offset1 - character(len=LDT_CONST_PATH_LEN) :: fname - real, pointer :: forcvar(:) - real, pointer :: pertdata(:) - character*100, allocatable :: forcobjs(:) - character*100, allocatable :: stateobjs(:) - type(ESMF_Field), allocatable :: forcField(:) - type(ESMF_Field), allocatable :: stateField(:) - integer :: perttype - real :: maxval - real :: minval - real :: delta - -#if 0 - k = 1 - if(LDT_rc%perturb_forcing.ne."none") then - curr_time = float(LDT_rc%hr)*3600+60*float(LDT_rc%mn)+float(LDT_rc%ss) - if(mod(curr_time,real(LDT_rc%pertforcinterval)).eq.0)then - - call perturbmethod(trim(LDT_rc%perturb_forcing)//char(0),1,n,k, & - LDT_FORC_State(n), LDT_FORC_Pert_State(n)) - - call ESMF_StateGet(LDT_FORC_Pert_State(n),itemCount=objcount,rc=status) - call LDT_verify(status, & - 'error in ESMF_StateGet in LDT_perturb_forcing') - - call ESMF_StateGet(LDT_FORC_State(n),itemCount=fobjcount,rc=status) - call LDT_verify(status,& - 'error in ESMF_StateGet in LDT_perturb_forcing') - - allocate(stateobjs(objcount)) - allocate(stateField(objcount)) - allocate(forcobjs(fobjcount)) - allocate(forcField(objcount)) - - call ESMF_StateGet(LDT_FORC_Pert_State(n),itemNameList=stateobjs,rc=status) - call LDT_verify(status,& - 'error in ESMF_StateGet in LDT_perturb_forcing') - - call ESMF_StateGet(LDT_FORC_State(n),itemNameList=forcobjs,rc=status) - call LDT_verify(status,& - 'error in ESMF_StateGet in LDT_perturb_forcing') - - do i=1,objcount - call ESMF_StateGet(LDT_FORC_Pert_State(n),stateobjs(i),stateField(i),& - rc=status) - call ESMF_FieldGet(stateField(i),localDE=0,farrayPtr= pertdata, rc=status) - call LDT_verify(status,& - 'error in ESMF_FieldGet in LDT_perturb_forcing') - - call ESMF_AttributeGet(stateField(i),"Perturbation Type",& - perttype,rc=status) - call LDT_verify(status,& - 'error in ESMF_AttributeGet in LDT_perturb_forcing') - - fname = stateobjs(i) - - call ESMF_StateGet(LDT_FORC_State(n),trim(fname),forcField(i),rc=status) - if(status.eq.0) then - - call ESMF_FieldGet(forcField(i),localDE=0,farrayPtr= forcvar,rc=status) - call LDT_verify(status,& - 'error in ESMF_FieldGet in LDT_perturb_forcing') - call ESMF_AttributeGet(forcField(i), "Max Value",maxval,rc=status) - call LDT_verify(status,& - 'error in ESMF_AttributeGet in LDT_perturb_forcing') - - call ESMF_AttributeGet(forcField(i), "Min Value",minval,rc=status) - call LDT_verify(status,& - 'error in ESMF_AttributeGet in LDT_perturb_forcing') - -#if 0 - do t=1,LDT_rc%ntiles(n) - if(perttype.eq.0) then - forcvar(t) = forcvar(t)+ pertdata(t) - elseif(perttype.eq.1) then - forcvar(t) = forcvar(t)*pertdata(t) - endif - if(forcvar(t).lt.minval) forcvar(t) = minval - if(forcvar(t).gt.maxval) forcvar(t) = maxval - enddo -#endif - do j=1,LDT_rc%ntiles(n)/LDT_rc%nensem(n) - do m=1,LDT_rc%nensem(n) - t = (j-1)*LDT_rc%nensem(n)+m - if(perttype.eq.0) then - if(LDT_rc%pert_bias_corr.eq.1) then - if(m.ne.LDT_rc%nensem(n)) then - forcvar(t) = forcvar(t)+ pertdata(t) - endif - else - forcvar(t) = forcvar(t)+ pertdata(t) - endif - elseif(perttype.eq.1) then - if(LDT_rc%pert_bias_corr.eq.1) then - if(m.ne.LDT_rc%nensem(n)) then - forcvar(t) = forcvar(t)*pertdata(t) - endif - else - forcvar(t) = forcvar(t)*pertdata(t) - endif - endif - enddo - enddo - if(LDT_rc%pert_bias_corr.eq.1) then - do j=1,LDT_rc%ntiles(n)/LDT_rc%nensem(n) - t_unpert = j*LDT_rc%nensem(n) - delta = 0.0 - do m=1,LDT_rc%nensem(n)-1 - t = (j-1)*LDT_rc%nensem(n)+m - if(m.ne.LDT_rc%nensem(n)) then - delta = delta + (forcvar(t)-forcvar(t_unpert)) - endif - enddo - - delta = delta/(LDT_rc%nensem(n)-1) - do m=1,LDT_rc%nensem(n)-1 - t = (j-1)*LDT_rc%nensem(n)+m - forcvar(t) = forcvar(t) - delta - enddo - enddo - endif - do t=1,LDT_rc%ntiles(n) - if(forcvar(t).lt.minval) forcvar(t) = minval - if(forcvar(t).gt.maxval) forcvar(t) = maxval - enddo - - endif - enddo - - deallocate(forcField) - deallocate(forcobjs) - deallocate(stateobjs) - deallocate(stateField) - endif - endif - -#endif !- Diagnose calls to map the forcing variables to the ! history output writer: diff --git a/ldt/core/LDT_paramDataMod.F90 b/ldt/core/LDT_paramDataMod.F90 index 00bcb0a49..a08c158ee 100644 --- a/ldt/core/LDT_paramDataMod.F90 +++ b/ldt/core/LDT_paramDataMod.F90 @@ -19,7 +19,8 @@ module LDT_paramDataMod ! !REVISION HISTORY: ! 02 Apr 2012: Sujay Kumar; Initial Specification ! - + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + implicit none PRIVATE @@ -56,7 +57,7 @@ module LDT_paramDataMod !- LSM-specific parameters: type, public :: lsmparam_type_dec - character*100 :: param_filename + character(len=LDT_CONST_PATH_LEN) :: param_filename integer :: param_file_ftn integer :: xlatid, xlonid, xtimeID integer :: xlatbid, xlonbid diff --git a/ldt/core/LDT_readConfig.F90 b/ldt/core/LDT_readConfig.F90 index 9303d707b..215beba95 100644 --- a/ldt/core/LDT_readConfig.F90 +++ b/ldt/core/LDT_readConfig.F90 @@ -20,7 +20,8 @@ subroutine LDT_readConfig(configfile) ! !USES: - use ESMF + use ESMF + use LDT_constantsMod, only : LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc, LDT_config, LDT_localPet, LDT_npes use LDT_DAobsDataMod use LDT_DAmetricsDataMod,only : LDT_DAmetricsPtr @@ -49,8 +50,8 @@ subroutine LDT_readConfig(configfile) integer :: ios integer :: final_dirpos - character(100) :: diag_fname - character(100) :: diag_dir + character(len=LDT_CONST_PATH_LEN) :: diag_fname + character(len=LDT_CONST_PATH_LEN) :: diag_dir integer, external :: LDT_create_subdirs !____________________________________________________________ diff --git a/ldt/core/LDT_timeMgrMod.F90 b/ldt/core/LDT_timeMgrMod.F90 index 20ac021fb..5515d2a17 100644 --- a/ldt/core/LDT_timeMgrMod.F90 +++ b/ldt/core/LDT_timeMgrMod.F90 @@ -2639,7 +2639,8 @@ end subroutine LDT_tick ! ! !INTERFACE: subroutine LDT_julhr_date( julhr, yyyy,mm,dd,hh) -! !USES: + ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_logMod, only : ldt_abort implicit none @@ -2686,7 +2687,7 @@ subroutine LDT_julhr_date( julhr, yyyy,mm,dd,hh) ! \end{description} ! !EOP - character*100 :: message ( 20 ) + character(len=LDT_CONST_PATH_LEN) :: message ( 20 ) ! ------------------------------------------------------------------ ! executable code begins here... use LDT_tmjul4 to convert julhr to diff --git a/ldt/interp/breakpt_module.F90 b/ldt/interp/breakpt_module.F90 index 699db0a57..3bd9535ca 100644 --- a/ldt/interp/breakpt_module.F90 +++ b/ldt/interp/breakpt_module.F90 @@ -173,7 +173,7 @@ integer function filedate(log1,filename) ! ! local variables integer, dimension(12) :: fileinfo - character*80 :: wrtline + character(len=LDT_CONST_PATH_LEN) :: wrtline character*3 :: errnum integer :: istat ! @@ -196,10 +196,11 @@ end function filedate ! ! logical function checkintfile(log1,dataf1,dataf2) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN ! ! argument variables integer, intent(INOUT) :: log1 - character*80, intent(INOUT) :: dataf1,dataf2 + character(len=LDT_CONST_PATH_LEN), intent(INOUT) :: dataf1,dataf2 ! ! local variables logical :: fileexists = .FALSE. @@ -358,16 +359,17 @@ end function datestr ! Duplicate declaration... check if this is needed #if 0 subroutine readcard(brkfile,datebeg,dateend,ng,intmins,outfmt,error) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN ! ! argument variables - character(80), intent(OUT) :: brkfile + character(len=LDT_CONST_PATH_LEN), intent(OUT) :: brkfile character(10), intent(OUT) :: datebeg,dateend integer, intent(OUT) :: ng,intmins,outfmt logical, intent(OUT) :: error ! ! local variables logical :: fileexists - character(11) :: cardfile + character(len=LDT_CONST_PATH_LEN) :: cardfile integer :: funit = 10 ! cardfile = 'Breakpt.crd' @@ -393,6 +395,7 @@ end subroutine readcard ! ! subroutine brkprecip(brkfile,datebeg,dateend,ngauges,intmins,outfmt) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN ! ! argument variables character(len=*), intent(INOUT) :: brkfile @@ -401,7 +404,7 @@ subroutine brkprecip(brkfile,datebeg,dateend,ngauges,intmins,outfmt) ! ! local variables logical :: brkexists,ppdexists,idxexists,intfiles - character*80 :: wrtline + character(len=LDT_CONST_PATH_LEN) :: wrtline character(len=LDT_CONST_PATH_LEN) :: logfile,ppdfile,idxfile,outfile integer :: brkfunit = 50 integer :: log1 = 60 @@ -559,18 +562,19 @@ end subroutine intindex ! ! subroutine readheader(log1,funit,datafile,intf,gidxs,hlines) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,funit - character*80, intent(IN) :: datafile + character(len=LDT_CONST_PATH_LEN), intent(IN) :: datafile logical, intent(IN) :: intf integer, intent (INOUT) :: gidxs(:,:) integer, intent(OUT) :: hlines ! ! local variables - character*80 :: wrtline - character*120 :: hline - character*80 :: dataf2,dataf3 + character(len=LDT_CONST_PATH_LEN) :: wrtline + character(len=LDT_CONST_PATH_LEN) :: hline + character(len=LDT_CONST_PATH_LEN) :: dataf2,dataf3 integer :: ng integer :: ppdfunit,idxfunit integer :: i,j,k,m,n @@ -663,16 +667,17 @@ end subroutine readheader ! ! subroutine procstndata(log1,datafile,hlines,ng,gidxs) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,hlines,ng - character*80, intent(IN) :: datafile + character(len=LDT_CONST_PATH_LEN), intent(IN) :: datafile integer, intent(INOUT) :: gidxs(:,:) ! ! local variables - character*80 :: dataf2,dataf3 - character*80 :: wrtline - character*80 :: hline + character(len=LDT_CONST_PATH_LEN) :: dataf2,dataf3 + character(len=LDT_CONST_PATH_LEN) :: wrtline + character(len=LDT_CONST_PATH_LEN) :: hline character*40 :: tprec,next_tprec character*7 :: nrecs integer :: fileend = 0 @@ -813,10 +818,11 @@ end subroutine procstndata ! ! subroutine breakagg(log1,funit,datafile,hlines,ng,nint,intmins,dates,gidxs,precip,accy) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,funit - character*80, intent(IN) :: datafile + character(len=LDT_CONST_PATH_LEN), intent(IN) :: datafile integer, intent(IN) :: hlines,ng,nint integer, intent(INOUT) :: intmins integer, intent(INOUT) :: dates(:,:) @@ -825,9 +831,9 @@ subroutine breakagg(log1,funit,datafile,hlines,ng,nint,intmins,dates,gidxs,preci integer, intent(OUT) :: accy(:,:) ! ! local variables - character*80 :: wrtline - character*80 :: hline - character*80 :: idxdataf + character(len=LDT_CONST_PATH_LEN) :: wrtline + character(len=LDT_CONST_PATH_LEN) :: hline + character(len=LDT_CONST_PATH_LEN) :: idxdataf character*3 :: gage character*6 :: brecs,events integer, dimension(2,5) :: tdata = 0 @@ -1056,16 +1062,17 @@ end subroutine metric ! ! subroutine writestnrec(log1,ng,nint,intmins,outfmt,dates,gidxs,precip,outfile) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,ng,nint,intmins,outfmt - character*80, intent(INOUT) :: outfile + character(len=LDT_CONST_PATH_LEN), intent(INOUT) :: outfile integer, intent(INOUT) :: dates(:,:) integer, intent(IN) :: gidxs(:,:) real, intent(IN) :: precip(:,:) ! ! local variables - character*80 :: wrtline,datafile + character(len=LDT_CONST_PATH_LEN) :: wrtline,datafile character*16 :: datetime ! MM/DD/YYYY hh:mm character*3 :: gnum integer :: funit = 10 diff --git a/ldt/interp/stninterp_module.F90 b/ldt/interp/stninterp_module.F90 index acadaeed2..5008088a8 100644 --- a/ldt/interp/stninterp_module.F90 +++ b/ldt/interp/stninterp_module.F90 @@ -53,10 +53,11 @@ module stninterp_module subroutine calcgrids(dirname,stnfile,stns,nnn,method,order,cols,rows,& llx,lly,urx,ury,incr,npts,locarr) ! + use LDT_constantsMod, only: LDT_CONST_PATH_LEN implicit none ! ! argument variables - character*40, intent(IN) :: dirname,stnfile + character(len=LDT_CONST_PATH_LEN), intent(IN) :: dirname,stnfile integer, intent(INOUT) :: stns,nnn,method,order integer, intent(INOUT) :: cols,rows real*4, intent(INOUT) :: llx,lly,urx,ury,incr diff --git a/ldt/metforcing/3B42RTV7/read_TRMM3B42RTV7.F90 b/ldt/metforcing/3B42RTV7/read_TRMM3B42RTV7.F90 index 0c3b42227..a160aac62 100644 --- a/ldt/metforcing/3B42RTV7/read_TRMM3B42RTV7.F90 +++ b/ldt/metforcing/3B42RTV7/read_TRMM3B42RTV7.F90 @@ -227,9 +227,10 @@ end subroutine read_3B42RTV7_bin subroutine read_3B42RTV7_gzip(zipfile, output, xd, yd) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc - character*200, intent(in) :: zipfile + character(len=LDT_CONST_PATH_LEN), intent(in) :: zipfile integer, intent(in) :: xd, yd real, intent(inout) :: output(xd, yd) diff --git a/ldt/metforcing/RFE2Daily/readprecip_RFE2Daily.F90 b/ldt/metforcing/RFE2Daily/readprecip_RFE2Daily.F90 index fb2c99110..fe449e2dd 100644 --- a/ldt/metforcing/RFE2Daily/readprecip_RFE2Daily.F90 +++ b/ldt/metforcing/RFE2Daily/readprecip_RFE2Daily.F90 @@ -64,7 +64,6 @@ subroutine readprecip_RFE2Daily( n, fname, findex, order, ferror_RFE2Daily ) real, allocatable :: rain1d(:) REAL, ALLOCATABLE :: rain2d(:,:) integer :: ftn, ios, ftn2, ftn3 - character(len=124) :: fnametemp LOGICAL :: file_exists real, dimension(LDT_rc%lnc(n), LDT_rc%lnr(n)) :: varfield ! reprojected arrray !=== End Variable Definition ======================= diff --git a/ldt/metforcing/RFE2gdas/readprecip_RFE2gdas.F90 b/ldt/metforcing/RFE2gdas/readprecip_RFE2gdas.F90 index 912c7d265..7885390eb 100644 --- a/ldt/metforcing/RFE2gdas/readprecip_RFE2gdas.F90 +++ b/ldt/metforcing/RFE2gdas/readprecip_RFE2gdas.F90 @@ -68,7 +68,6 @@ subroutine readprecip_RFE2gdas( n, fname, month, findex, order, ferror_RFE2gdas, REAL, ALLOCATABLE :: rain2d(:,:) real, dimension(LDT_rc%lnc(n), LDT_rc%lnr(n)) :: varfield ! reprojected arrray integer :: ftn, ios, ftn2, ftn3 - character(len=84) :: fnametemp !=== End Variable Definition ======================= varfield = LDT_rc%udef diff --git a/ldt/metforcing/chirps2/get_chirps2.F90 b/ldt/metforcing/chirps2/get_chirps2.F90 index b5a474c42..e3ac1105a 100644 --- a/ldt/metforcing/chirps2/get_chirps2.F90 +++ b/ldt/metforcing/chirps2/get_chirps2.F90 @@ -19,6 +19,7 @@ ! !INTERFACE: subroutine get_chirps2(n,findex) ! !USES: + use LDT_constantsMod, only : LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_metforcingMod, only : LDT_forc use LDT_timeMgrMod, only : LDT_get_nstep, LDT_tick @@ -61,7 +62,7 @@ subroutine get_chirps2(n,findex) real*8 :: time1,time2 real :: gmt1,gmt2,ts1,ts2 - character*120 :: chirps2_filename + character(len=LDT_CONST_PATH_LEN) :: chirps2_filename logical :: file_exists ! ___________________________________________________________________ diff --git a/ldt/metforcing/cmorph/get_cmorph.F90 b/ldt/metforcing/cmorph/get_cmorph.F90 index dd68721fa..2d2e4b969 100644 --- a/ldt/metforcing/cmorph/get_cmorph.F90 +++ b/ldt/metforcing/cmorph/get_cmorph.F90 @@ -154,6 +154,8 @@ end subroutine get_cmorph ! !INTERFACE: subroutine cmorphfile( filename, cmorphdir, yr, mo, da, hr) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + implicit none ! !ARGUMENTS: character(len=*) :: filename @@ -185,12 +187,11 @@ subroutine cmorphfile( filename, cmorphdir, yr, mo, da, hr) !1212292800 integer, parameter :: T2008060100 = 1212292800 - character(len=120) :: temp integer :: i, c integer :: uyr, umo, uda, uhr, umn, uss, ts1 integer tout(9), fmktime, it, ih, irec - character*100 :: fbase, ftimedir, fstem + character(len=LDT_CONST_PATH_LEN) :: fstem character*4 :: cyr character*2 :: cmo, cda, chr diff --git a/ldt/metforcing/ecmwf/get_ecmwf.F90 b/ldt/metforcing/ecmwf/get_ecmwf.F90 index af5465afd..351b4d901 100644 --- a/ldt/metforcing/ecmwf/get_ecmwf.F90 +++ b/ldt/metforcing/ecmwf/get_ecmwf.F90 @@ -260,6 +260,7 @@ end subroutine get_ecmwf subroutine create_ecmwf_filename(dir,avgfilename1, avgfilename2, instfilename,& yr,mo,da,hr) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_timeMgrMod, only : LDT_tick implicit none @@ -281,7 +282,7 @@ subroutine create_ecmwf_filename(dir,avgfilename1, avgfilename2, instfilename,& real*8 :: itime real :: igmt integer :: iyr,imo,ida,ihr,imn,iss,ts,idoy - character(200) :: filename, file1, file2 + character(len=LDT_CONST_PATH_LEN) :: filename, file1, file2 !instantaneous files diff --git a/ldt/metforcing/ecmwf/read_ecmwf_elev.F90 b/ldt/metforcing/ecmwf/read_ecmwf_elev.F90 index fa3edf926..d0e29c6ff 100644 --- a/ldt/metforcing/ecmwf/read_ecmwf_elev.F90 +++ b/ldt/metforcing/ecmwf/read_ecmwf_elev.F90 @@ -21,6 +21,7 @@ subroutine read_ecmwf_elev(n, findex, ecmwfelev, elevdiff) ! !USES: + use LDT_constantsMod, only : LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc, LDT_domain use LDT_metforcingMod, only : LDT_forc use LDT_logMod, only : LDT_logunit, LDT_verify, LDT_endrun @@ -63,7 +64,7 @@ subroutine read_ecmwf_elev(n, findex, ecmwfelev, elevdiff) logical*1 :: lb_regrid(LDT_rc%lnc(n)*LDT_rc%lnr(n)) logical :: file_exists ! Check file status - character(100) :: ecmwf_filename + character(len=LDT_CONST_PATH_LEN) :: ecmwf_filename ! ________________________________________________________________ diff --git a/ldt/metforcing/ecmwf/read_ecmwfelev_ldtproc.F90 b/ldt/metforcing/ecmwf/read_ecmwfelev_ldtproc.F90 index f06827ff6..4db2414f2 100644 --- a/ldt/metforcing/ecmwf/read_ecmwfelev_ldtproc.F90 +++ b/ldt/metforcing/ecmwf/read_ecmwfelev_ldtproc.F90 @@ -18,6 +18,7 @@ ! !INTERFACE: subroutine read_ecmwfelev_ldtproc(n, findex, change) ! !USES: + use LDT_constantsMod, only : LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc, LDT_domain use LDT_metforcingMod, only : LDT_forc use LDT_fileIOMod, only : LDT_read_param @@ -45,7 +46,7 @@ subroutine read_ecmwfelev_ldtproc(n, findex, change) integer :: c,r,line1,line2,nc_dom,line integer :: glnc, glnr real :: go(LDT_rc%lnc(n),LDT_rc%lnr(n)) - character(80) :: filename + character(len=LDT_CONST_PATH_LEN) :: filename if ( trim(LDT_rc%met_ecor(findex)) .ne."none" ) then write(LDT_logunit,*) " Reading the ECMWF elevation: ",trim(filename) diff --git a/ldt/metforcing/era5/get_era5.F90 b/ldt/metforcing/era5/get_era5.F90 index ef125d43c..d9e4448b2 100644 --- a/ldt/metforcing/era5/get_era5.F90 +++ b/ldt/metforcing/era5/get_era5.F90 @@ -270,7 +270,6 @@ subroutine era5files(n, kk, findex, era5dir, yr, mo, da, fname) character*4 :: cyear character*2 :: cmonth character*8 :: cdate - character*20 :: dir integer :: hr, mn, ss real*8 :: time integer :: doy diff --git a/ldt/metforcing/gdas/create_gdasfilename.F90 b/ldt/metforcing/gdas/create_gdasfilename.F90 index d7f2ab7e2..ad0e2f2b8 100644 --- a/ldt/metforcing/gdas/create_gdasfilename.F90 +++ b/ldt/metforcing/gdas/create_gdasfilename.F90 @@ -126,7 +126,6 @@ subroutine create_gdasfilename(option, name00, name03, name06, & logical :: is_analysis_hr character(len=2) :: analysis_hour_inst, analysis_hour_avg, & fcstcode0, fcstcode1, fcstcode2 - character(len=80) :: fbase character(len=8) :: fdir character(len=10) :: ftime character(len=21) :: fsubs diff --git a/ldt/metforcing/merra2/merra2_forcingMod.F90 b/ldt/metforcing/merra2/merra2_forcingMod.F90 index 36e5ebcc1..92f3c4014 100644 --- a/ldt/metforcing/merra2/merra2_forcingMod.F90 +++ b/ldt/metforcing/merra2/merra2_forcingMod.F90 @@ -106,7 +106,7 @@ module merra2_forcingMod integer :: uselml integer :: usecorr - character*140 :: merra2hgt_file + character(len=LDT_CONST_PATH_LEN) :: merra2hgt_file end type merra2_type_dec diff --git a/ldt/metforcing/nam242/create_nam242f9_filename.F90 b/ldt/metforcing/nam242/create_nam242f9_filename.F90 index 72039198f..8d1ed6ebe 100644 --- a/ldt/metforcing/nam242/create_nam242f9_filename.F90 +++ b/ldt/metforcing/nam242/create_nam242f9_filename.F90 @@ -16,6 +16,7 @@ subroutine create_nam242f9_filename(option, name00, name03, & namdir, yr, mo, da, hr,status ) ! !USES: ! Dagang add begin + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_timeMgrMod, only : LDT_tick, LDT_date2time use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit @@ -61,7 +62,7 @@ subroutine create_nam242f9_filename(option, name00, name03, & integer :: remainder character(len=2) :: initcode0, initcode1, fcstcode0, fcstcode1, fcstcode2 character*1 :: fbase(80), fdir(13), ftime(10), fsubs(26) - character(LEN=100) :: temp1,temp2 + character(LEN=LDT_CONST_PATH_LEN) :: temp1,temp2 real*8 :: time1,dumbtime integer :: doy1,doy real :: gmt1,gmt diff --git a/ldt/metforcing/nam242/create_nam242filename.F90 b/ldt/metforcing/nam242/create_nam242filename.F90 index 9cf8119f6..2063a6d40 100644 --- a/ldt/metforcing/nam242/create_nam242filename.F90 +++ b/ldt/metforcing/nam242/create_nam242filename.F90 @@ -16,6 +16,7 @@ subroutine create_nam242filename(option, name00, name03, name06, & F06flag, namdir, yr, mo, da, hr ) ! !USES: ! Dagang add begin + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_timeMgrMod, only : LDT_tick, LDT_date2time use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit @@ -65,7 +66,7 @@ subroutine create_nam242filename(option, name00, name03, name06, & integer :: remainder character(len=2) :: initcode0, initcode1, fcstcode0, fcstcode1, fcstcode2 character*1 :: fbase(80), fdir(13), ftime(10), fsubs(26) - character(LEN=100) :: temp1,temp2 + character(LEN=LDT_CONST_PATH_LEN) :: temp1,temp2 real*8 :: time1,dumbtime integer :: doy1,doy real :: gmt1,gmt diff --git a/ldt/metforcing/stg4/get_stg4.F90 b/ldt/metforcing/stg4/get_stg4.F90 index 31c81292c..04c898d6a 100644 --- a/ldt/metforcing/stg4/get_stg4.F90 +++ b/ldt/metforcing/stg4/get_stg4.F90 @@ -18,7 +18,8 @@ ! !INTERFACE: subroutine get_stg4(n, findex) -! !USES: + ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc, LDT_domain use LDT_logMod, only : LDT_logunit, LDT_endrun use LDT_timeMgrMod, only : LDT_tick, LDT_get_nstep, LDT_date2time @@ -68,7 +69,7 @@ subroutine get_stg4(n, findex) integer :: ferror_stg4 ! Error flags for precip data sources integer :: order real*8 :: stg4_file_time ! Current end boundary time for STAGEIV file - character(80) :: file_name ! Filename variables for precip data sources + character(len=LDT_CONST_PATH_LEN) :: file_name ! Filename variables for precip data sources integer :: doy1, yr1, mo1, da1, hr1, mn1, ss1 integer :: doy2, yr2, mo2, da2, hr2, mn2, ss2 diff --git a/ldt/metforcing/stg4/read_stg4.F90 b/ldt/metforcing/stg4/read_stg4.F90 index b17d3456c..496eebbee 100644 --- a/ldt/metforcing/stg4/read_stg4.F90 +++ b/ldt/metforcing/stg4/read_stg4.F90 @@ -21,6 +21,7 @@ subroutine read_stg4( n, fname,findex,order, ferror_stg4 ) ! !USES: + use LDT_constantsMod, only : LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc, LDT_domain use LDT_logMod, only : LDT_verify, LDT_logunit, LDT_endrun use LDT_metforcingMod, only : LDT_forc @@ -33,7 +34,7 @@ subroutine read_stg4( n, fname,findex,order, ferror_stg4 ) implicit none ! !ARGUMENTS: integer, intent(in) :: n - character(len=80) :: fname + character(len=LDT_CONST_PATH_LEN) :: fname integer, intent(in) :: findex integer, intent(in) :: order integer :: ferror_stg4 diff --git a/ldt/metforcing/stg4/stg4_forcingMod.F90 b/ldt/metforcing/stg4/stg4_forcingMod.F90 index 69321a7c3..6152804c8 100644 --- a/ldt/metforcing/stg4/stg4_forcingMod.F90 +++ b/ldt/metforcing/stg4/stg4_forcingMod.F90 @@ -52,6 +52,9 @@ module stg4_forcingMod ! \end{description} ! ! !USES: + + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + implicit none PRIVATE @@ -70,7 +73,7 @@ module stg4_forcingMod real :: ts integer :: ncol ! Number of cols integer :: nrow ! Number of rows - character*40 :: stg4dir ! STAGE IV Directory + character(len=LDT_CONST_PATH_LEN) :: stg4dir ! STAGE IV Directory real*8 :: stg4time ! Nearest hourly instance of incoming file real*8 :: griduptime1 ! Designated time of STAGEIV grid change logical :: gridchange1 ! Flag for when grid change occurs diff --git a/ldt/metforcing/stg4/stg4file.F90 b/ldt/metforcing/stg4/stg4file.F90 index 32b1ca4ab..70649e765 100644 --- a/ldt/metforcing/stg4/stg4file.F90 +++ b/ldt/metforcing/stg4/stg4file.F90 @@ -15,6 +15,8 @@ ! !INTERFACE: subroutine stg4file( name, stg4dir, yr, mo, da, hr) + use LDT_constantsMod, only : LDT_CONST_PATH_LEN + implicit none ! !DESCRIPTION: @@ -42,8 +44,8 @@ subroutine stg4file( name, stg4dir, yr, mo, da, hr) ! !ARGUMENTS: integer :: yr, mo, da, hr - character(80) :: name - character(40) :: stg4dir + character(len=LDT_CONST_PATH_LEN) :: name + character(len=LDT_CONST_PATH_LEN) :: stg4dir character(4) :: cyear character(2) :: cmon, cday, chour diff --git a/ldt/params/GeoWRSI/GeoWRSI_parmsMod.F90 b/ldt/params/GeoWRSI/GeoWRSI_parmsMod.F90 index fc9403878..e68e082c2 100644 --- a/ldt/params/GeoWRSI/GeoWRSI_parmsMod.F90 +++ b/ldt/params/GeoWRSI/GeoWRSI_parmsMod.F90 @@ -27,6 +27,7 @@ module GeoWRSI_parmsMod ! 20 Oct 2013: K. Arsenault: Updated for WRSI LSM parameters. ! use ESMF + use LDT_constantsMod use LDT_coreMod use LDT_historyMod use LDT_gfracMod @@ -55,13 +56,13 @@ module GeoWRSI_parmsMod character*50 :: wrsiparms_gridtransform ! - WRSI model parameters: - character*140 :: wrsimask_file ! WRSI regional mask file - character*140 :: lgp_file ! Length of growing period file - character*140 :: whc_file ! Water holding capacity file - character*140 :: sosclim_file ! SOS climatology file - character*140 :: wrsiclim_file ! WRSI climatology file - character*140 :: sos_file ! Start-of-season (SOS) file - character*140 :: sosanom_file ! SOS anomaly file + character(len=LDT_CONST_PATH_LEN) :: wrsimask_file ! WRSI regional mask file + character(len=LDT_CONST_PATH_LEN) :: lgp_file ! Length of growing period file + character(len=LDT_CONST_PATH_LEN) :: whc_file ! Water holding capacity file + character(len=LDT_CONST_PATH_LEN) :: sosclim_file ! SOS climatology file + character(len=LDT_CONST_PATH_LEN) :: wrsiclim_file ! WRSI climatology file + character(len=LDT_CONST_PATH_LEN) :: sos_file ! Start-of-season (SOS) file + character(len=LDT_CONST_PATH_LEN) :: sosanom_file ! SOS anomaly file ! - WRSI model-specifc: diff --git a/ldt/params/JULES/JULES50_parmsMod.F90 b/ldt/params/JULES/JULES50_parmsMod.F90 index 6e9c9d245..252829f15 100644 --- a/ldt/params/JULES/JULES50_parmsMod.F90 +++ b/ldt/params/JULES/JULES50_parmsMod.F90 @@ -29,6 +29,7 @@ module JULES50_parmsMod #endif use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_historyMod use LDT_paramDataMod @@ -73,10 +74,10 @@ module JULES50_parmsMod type(LDT_paramEntry) :: top_fexp real, allocatable :: soil_type(:,:) - character(len=128) :: nc_cap_param ! NetCDF file of CAP soil texture fraction file - character(len=128) :: nc_whs_param ! NetCDF file of WHS soil albedo input file + character(len=LDT_CONST_PATH_LEN) :: nc_cap_param ! NetCDF file of CAP soil texture fraction file + character(len=LDT_CONST_PATH_LEN) :: nc_whs_param ! NetCDF file of WHS soil albedo input file !character(len=32) :: soil_param_mode - character(len=128) :: nc_um_ancillary + character(len=LDT_CONST_PATH_LEN) :: nc_um_ancillary end type jules_type_dec type(jules_type_dec), allocatable :: JULES50_struc(:) diff --git a/ldt/params/JULES/create_soil_albedo_from_whs.F90 b/ldt/params/JULES/create_soil_albedo_from_whs.F90 index ff4199daf..608a207b6 100755 --- a/ldt/params/JULES/create_soil_albedo_from_whs.F90 +++ b/ldt/params/JULES/create_soil_albedo_from_whs.F90 @@ -23,6 +23,7 @@ subroutine create_soil_albedo_from_whs( n, nc_whs_param, soil_albedo) ! !USES: !use LDT_paramDataMod ! check mask + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_endrun use LDT_gridmappingMod @@ -31,7 +32,7 @@ subroutine create_soil_albedo_from_whs( n, nc_whs_param, soil_albedo) implicit none ! !ARGUMENTS: integer,intent(in) :: n - character(len=128) :: nc_whs_param ! NetCDF file of CAP soil texture fraction file + character(len=LDT_CONST_PATH_LEN) :: nc_whs_param ! NetCDF file of CAP soil texture fraction file real, intent(inout) :: soil_albedo(LDT_rc%lnc(n),LDT_rc%lnr(n)) ! ! !DESCRIPTION: diff --git a/ldt/params/JULES/create_soil_params_from_cap.F90 b/ldt/params/JULES/create_soil_params_from_cap.F90 index 5d611b69b..0543884ec 100755 --- a/ldt/params/JULES/create_soil_params_from_cap.F90 +++ b/ldt/params/JULES/create_soil_params_from_cap.F90 @@ -22,6 +22,7 @@ subroutine create_soil_params_from_cap( n, nc_cap_param, soil_type) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_endrun use LDT_gridmappingMod @@ -31,7 +32,7 @@ subroutine create_soil_params_from_cap( n, nc_cap_param, soil_type) implicit none ! !ARGUMENTS: integer,intent(in) :: n - character(len=128) :: nc_cap_param ! NetCDF file of CAP soil texture fraction file + character(len=LDT_CONST_PATH_LEN) :: nc_cap_param ! NetCDF file of CAP soil texture fraction file real, intent(inout) :: soil_type(LDT_rc%lnc(n),LDT_rc%lnr(n)) ! ! !DESCRIPTION: diff --git a/ldt/params/Noah/module_MMF_groundwater.F90 b/ldt/params/Noah/module_MMF_groundwater.F90 index af5194212..0899330f9 100644 --- a/ldt/params/Noah/module_MMF_groundwater.F90 +++ b/ldt/params/Noah/module_MMF_groundwater.F90 @@ -188,14 +188,16 @@ END SUBROUTINE mmf_init ! ---------------------------------------------------------------- SUBROUTINE mmf_data_reader (MBR, nest, datadir, lisout, mmf_transform, short_name) - + + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + implicit none class (MMF_BCsReader), intent(inout) :: MBR character(*), intent (in) :: datadir, mmf_transform, short_name real, dimension (:,:,:), intent (inout) :: lisout integer, intent (in) :: nest - character(len=1024):: geogridFile + character(len=LDT_CONST_PATH_LEN):: geogridFile character(len=80) :: tileName integer :: num_tile_lon,num_tile_lat integer :: rc,status,tx,ty,txs,txe,tys,tye diff --git a/ldt/params/RDHM/RDHM_parmsMod.F90 b/ldt/params/RDHM/RDHM_parmsMod.F90 index 18f08e15d..74bcaf9e1 100644 --- a/ldt/params/RDHM/RDHM_parmsMod.F90 +++ b/ldt/params/RDHM/RDHM_parmsMod.F90 @@ -29,6 +29,7 @@ module RDHM_parmsMod #endif use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_historyMod use LDT_paramDataMod @@ -56,7 +57,7 @@ module RDHM_parmsMod type, public :: rdhm_type_dec ! - RDHM 3.5.6 - character*140 :: rdhmconsts_table + character(len=LDT_CONST_PATH_LEN) :: rdhmconsts_table real :: rdhm_undef ! - RDHM-specific: diff --git a/ldt/params/SACHTET/SACHTET_parmsMod.F90 b/ldt/params/SACHTET/SACHTET_parmsMod.F90 index c600f5ea8..74f081044 100644 --- a/ldt/params/SACHTET/SACHTET_parmsMod.F90 +++ b/ldt/params/SACHTET/SACHTET_parmsMod.F90 @@ -72,41 +72,41 @@ module SACHTET_parmsMod character*50 :: tbot_topocorr ! - RDHM 3.5.6 - character*140 :: rdhmconsts_table + character(len=LDT_CONST_PATH_LEN) :: rdhmconsts_table real :: rdhm_undef ! - SAC-HTET parameters: character*140 :: csoilparm_method ! character*140 :: cosbysoils_table - character*140 :: sacsoilparms_table - character*140 :: sacvegparms_table - character*140 :: lzfpm_file ! Lower zone - character*140 :: lzfsm_file ! - character*140 :: lzpk_file ! - character*140 :: lzsk_file ! - character*140 :: lztwm_file ! - character*140 :: uzfwm_file ! - character*140 :: uztwm_file ! - character*140 :: uzk_file ! - character*140 :: pfree_file ! - character*140 :: rexp_file ! - character*140 :: zperc_file ! - - character*140 :: sacmask_file ! SAC HTET mask file - character*140 :: pctim_file ! - character*140 :: efc_file ! Forest fraction cover - character*140 :: soilalb_file ! - character*140 :: timeOffset_file ! - - character*140 :: stxt_file ! - character*140 :: tbot_file ! - character*140 :: zbot_file ! - character*140 :: adimp_file ! - character*140 :: side_file ! - character*140 :: riva_file ! - character*140 :: rserv_file ! - character*140 :: rsmax_file ! - character*140 :: cksl_file ! + character(len=LDT_CONST_PATH_LEN) :: sacsoilparms_table + character(len=LDT_CONST_PATH_LEN) :: sacvegparms_table + character(len=LDT_CONST_PATH_LEN) :: lzfpm_file ! Lower zone + character(len=LDT_CONST_PATH_LEN) :: lzfsm_file ! + character(len=LDT_CONST_PATH_LEN) :: lzpk_file ! + character(len=LDT_CONST_PATH_LEN) :: lzsk_file ! + character(len=LDT_CONST_PATH_LEN) :: lztwm_file ! + character(len=LDT_CONST_PATH_LEN) :: uzfwm_file ! + character(len=LDT_CONST_PATH_LEN) :: uztwm_file ! + character(len=LDT_CONST_PATH_LEN) :: uzk_file ! + character(len=LDT_CONST_PATH_LEN) :: pfree_file ! + character(len=LDT_CONST_PATH_LEN) :: rexp_file ! + character(len=LDT_CONST_PATH_LEN) :: zperc_file ! + + character(len=LDT_CONST_PATH_LEN) :: sacmask_file ! SAC HTET mask file + character(len=LDT_CONST_PATH_LEN) :: pctim_file ! + character(len=LDT_CONST_PATH_LEN) :: efc_file ! Forest fraction cover + character(len=LDT_CONST_PATH_LEN) :: soilalb_file ! + character(len=LDT_CONST_PATH_LEN) :: timeOffset_file ! + + character(len=LDT_CONST_PATH_LEN) :: stxt_file ! + character(len=LDT_CONST_PATH_LEN) :: tbot_file ! + character(len=LDT_CONST_PATH_LEN) :: zbot_file ! + character(len=LDT_CONST_PATH_LEN) :: adimp_file ! + character(len=LDT_CONST_PATH_LEN) :: side_file ! + character(len=LDT_CONST_PATH_LEN) :: riva_file ! + character(len=LDT_CONST_PATH_LEN) :: rserv_file ! + character(len=LDT_CONST_PATH_LEN) :: rsmax_file ! + character(len=LDT_CONST_PATH_LEN) :: cksl_file ! ! - SAC-HTET model-specific: type(LDT_paramEntry) :: sachtet356 ! SAC-HTET v.3.5.6 model version parameters (collective) @@ -251,7 +251,7 @@ subroutine SACHTETparms_init(flag) 'SEP','OCT','NOV','DEC'/ ! character*50 :: sacsoilparms_option - character*140 :: cosbysoils_table + character(len=LDT_CONST_PATH_LEN) :: cosbysoils_table character*50 :: sachtetparms_proj integer :: type_value character(20) :: type_name diff --git a/ldt/params/SACHTET/create_SACsoilparms_Korenv1.F90 b/ldt/params/SACHTET/create_SACsoilparms_Korenv1.F90 index a47b87db3..eb0711ee4 100644 --- a/ldt/params/SACHTET/create_SACsoilparms_Korenv1.F90 +++ b/ldt/params/SACHTET/create_SACsoilparms_Korenv1.F90 @@ -24,6 +24,7 @@ subroutine create_SACsoilparms_Korenv1( n, & ! !USES: use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc, LDT_domain use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_endrun @@ -35,7 +36,7 @@ subroutine create_SACsoilparms_Korenv1( n, & ! !ARGUMENTS: ! Inputs: integer, intent(in) :: n - character(140), intent(in) :: cosbysoils_table + character(len=LDT_CONST_PATH_LEN), intent(in) :: cosbysoils_table type(LDT_paramEntry), intent(in) :: soiltext type(LDT_paramEntry), intent(in) :: hsg ! Outputs: diff --git a/ldt/params/SiB2/SiB2_parmsMod.F90 b/ldt/params/SiB2/SiB2_parmsMod.F90 index 877fd99f4..506d4298d 100644 --- a/ldt/params/SiB2/SiB2_parmsMod.F90 +++ b/ldt/params/SiB2/SiB2_parmsMod.F90 @@ -28,6 +28,7 @@ module SiB2_parmsMod ! 04 Nov 2013: K. Arsenault: Added layers for SiB2 model ! use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_historyMod use LDT_paramDataMod @@ -51,7 +52,7 @@ module SiB2_parmsMod type, public :: noah_type_dec ! - SiB2 parameters: - character*100 :: sib2parmsdir + character(len=LDT_CONST_PATH_LEN) :: sib2parmsdir ! - SiB2 LSM-specific: ! - SiB2 model-specific: diff --git a/ldt/params/SiB2/read_SiB2_parms.F90 b/ldt/params/SiB2/read_SiB2_parms.F90 index 77253ec99..97c0cec2a 100644 --- a/ldt/params/SiB2/read_SiB2_parms.F90 +++ b/ldt/params/SiB2/read_SiB2_parms.F90 @@ -59,6 +59,7 @@ subroutine read_SiB2_parms(n, nvegtypes, & ! !USES: use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc, LDT_domain use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_endrun @@ -126,7 +127,7 @@ subroutine read_SiB2_parms(n, nvegtypes, & integer :: nc, nr integer :: ftn logical :: file_exists - character(140) :: vegfile + character(len=LDT_CONST_PATH_LEN) :: vegfile character(2) :: numvegchar integer :: ip,nperiod,nfiles,i,j,nf real :: vegtyp(LDT_rc%lnr(n),LDT_rc%lnc(n),nvegtypes) diff --git a/ldt/params/Snow17/Snow17_parmsMod.F90 b/ldt/params/Snow17/Snow17_parmsMod.F90 index 774054a36..478d65492 100644 --- a/ldt/params/Snow17/Snow17_parmsMod.F90 +++ b/ldt/params/Snow17/Snow17_parmsMod.F90 @@ -25,6 +25,7 @@ module Snow17_parmsMod ! 04 Nov 2013: K. Arsenault: Added layers for SNOW-17 model ! use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_historyMod use LDT_paramDataMod @@ -48,29 +49,29 @@ module Snow17_parmsMod type, public :: snow17_type_dec - character*140 :: rdhmconsts_table + character(len=LDT_CONST_PATH_LEN) :: rdhmconsts_table real :: rdhm_undef real :: snow17parms_gridDesc(20) character*50 :: snow17parms_proj character*50 :: snow17parms_gridtransform - character*140 :: mfmax_file ! - character*140 :: mfmin_file ! - character*140 :: uadj_file ! - character*140 :: alat_file ! - character*140 :: elev_file ! - character*140 :: scf_file ! - character*140 :: nmf_file ! - character*140 :: si_file ! - character*140 :: mbase_file ! - character*140 :: pxtemp_file ! - character*140 :: plwhc_file ! - character*140 :: tipm_file ! - character*140 :: pgm_file ! - character*140 :: laec_file ! - character*140 :: adc_dir ! - character*140 :: adc_file ! + character(len=LDT_CONST_PATH_LEN) :: mfmax_file ! + character(len=LDT_CONST_PATH_LEN) :: mfmin_file ! + character(len=LDT_CONST_PATH_LEN) :: uadj_file ! + character(len=LDT_CONST_PATH_LEN) :: alat_file ! + character(len=LDT_CONST_PATH_LEN) :: elev_file ! + character(len=LDT_CONST_PATH_LEN) :: scf_file ! + character(len=LDT_CONST_PATH_LEN) :: nmf_file ! + character(len=LDT_CONST_PATH_LEN) :: si_file ! + character(len=LDT_CONST_PATH_LEN) :: mbase_file ! + character(len=LDT_CONST_PATH_LEN) :: pxtemp_file ! + character(len=LDT_CONST_PATH_LEN) :: plwhc_file ! + character(len=LDT_CONST_PATH_LEN) :: tipm_file ! + character(len=LDT_CONST_PATH_LEN) :: pgm_file ! + character(len=LDT_CONST_PATH_LEN) :: laec_file ! + character(len=LDT_CONST_PATH_LEN) :: adc_dir ! + character(len=LDT_CONST_PATH_LEN) :: adc_file ! ! - Snow-17 model-specific: type(LDT_paramEntry) :: snow17 ! SNOW-17 model parameters (collective) diff --git a/ldt/params/SnowModel/SnowModel_parmsMod.F90 b/ldt/params/SnowModel/SnowModel_parmsMod.F90 index 3f229b57b..559a93526 100644 --- a/ldt/params/SnowModel/SnowModel_parmsMod.F90 +++ b/ldt/params/SnowModel/SnowModel_parmsMod.F90 @@ -29,6 +29,7 @@ module SnowModel_parmsMod #endif use ESMF + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod use LDT_historyMod use LDT_paramDataMod @@ -56,7 +57,7 @@ module SnowModel_parmsMod integer :: Nveg real :: topoveg_gridDesc(20) - character(140) :: topoveg_file + character(LDT_CONST_PATH_LEN) :: topoveg_file character(50) :: topoveg_gridtransform character(50) :: topoveg_proj diff --git a/ldt/params/climateparms/LDT_NAFPA_back_climpptMod.F90 b/ldt/params/climateparms/LDT_NAFPA_back_climpptMod.F90 index 374952fc1..5c4326dab 100644 --- a/ldt/params/climateparms/LDT_NAFPA_back_climpptMod.F90 +++ b/ldt/params/climateparms/LDT_NAFPA_back_climpptMod.F90 @@ -20,6 +20,8 @@ module LDT_NAFPA_back_climpptMod ! REVISION HISTORY: ! 13 May 2022: Eric Kemp/SSAI: First version. + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none private @@ -28,7 +30,7 @@ module LDT_NAFPA_back_climpptMod ! interpolating to LIS grid, summing, and averaging each month type, public :: LDT_NAFPA_back_climppt_t private - character(255) :: topdir_input + character(len=LDT_CONST_PATH_LEN) :: topdir_input integer :: nlat_input integer :: nlon_input real :: gridDesc_input(20) @@ -206,6 +208,7 @@ subroutine LDT_NAFPA_back_climppt_process(this, nest, imonth, & ! Imports use ESMF use LDT_climateParmsMod, only: LDT_climate_struc + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only: LDT_rc, LDT_domain use LDT_logMod, only: LDT_logunit, LDT_endrun use netcdf @@ -225,7 +228,7 @@ subroutine LDT_NAFPA_back_climppt_process(this, nest, imonth, & ! Locals integer :: ipass integer :: iyear, iyear_start, iyear_end - character(255) :: filename + character(len=LDT_CONST_PATH_LEN) :: filename logical :: found_inq integer :: iret integer :: ftn, varid @@ -467,6 +470,9 @@ end subroutine LDT_NAFPA_back_climppt_process subroutine create_filename(this, imonth, iyear, filename) + ! Imports + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + ! Defaults implicit none @@ -474,7 +480,7 @@ subroutine create_filename(this, imonth, iyear, filename) class(LDT_NAFPA_back_climppt_t), intent(in) :: this integer, intent(in) :: imonth integer, intent(in) :: iyear - character(255), intent(out) :: filename + character(len=LDT_CONST_PATH_LEN), intent(out) :: filename ! Locals integer :: imonth_file, iyear_file diff --git a/ldt/params/climateparms/read_WorldClim_climppt.F90 b/ldt/params/climateparms/read_WorldClim_climppt.F90 index 696c5232d..fc56ca4f7 100644 --- a/ldt/params/climateparms/read_WorldClim_climppt.F90 +++ b/ldt/params/climateparms/read_WorldClim_climppt.F90 @@ -22,6 +22,7 @@ subroutine read_WorldClim_climppt(n, out_ncols, out_nrows, & ! !USES: use ESMF + use LDT_constantsMod, only : LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc, LDT_domain use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_endrun @@ -73,7 +74,7 @@ subroutine read_WorldClim_climppt(n, out_ncols, out_nrows, & type(File_bil_header), target :: hdrInfW real*4, pointer, dimension(:),save :: real4ptr1dL ! 4-byte real array - character(len=200) :: last_file_read = "none" + character(len=LDT_CONST_PATH_LEN) :: last_file_read = "none" ! __________________________________________________________________________________________ diff --git a/ldt/params/crop_parms/Monfredaetal08_crops_module.F90 b/ldt/params/crop_parms/Monfredaetal08_crops_module.F90 index 09a745691..176d58d42 100755 --- a/ldt/params/crop_parms/Monfredaetal08_crops_module.F90 +++ b/ldt/params/crop_parms/Monfredaetal08_crops_module.F90 @@ -51,6 +51,7 @@ module Monfredaetal08_crops_module subroutine read_Monfredaetal08_croptype(n, num_types, fgrd) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_verify, LDT_endrun @@ -92,7 +93,7 @@ subroutine read_Monfredaetal08_croptype(n, num_types, fgrd) real, parameter :: IN_yres = 1.0/12.0 ! or 180deg/2160 row points ! Other - character(140) :: tempfile + character(len=LDT_CONST_PATH_LEN) :: tempfile logical :: file_exists integer :: i, i2, j, t, c, r integer :: glpnc, glpnr ! Parameter (global) total columns and rows @@ -259,8 +260,10 @@ end subroutine read_Monfredaetal08_croptype subroutine readMonfredaCropfiles( n, tempfile, subpnc, subpnr, subparam_gridDesc, & lat_line, lon_line, croptype_frac ) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + integer, intent(in) :: n - character(140),intent(in) :: tempfile + character(len=LDT_CONST_PATH_LEN),intent(in) :: tempfile integer, intent(in) :: subpnc, subpnr real, intent(in) :: subparam_gridDesc(20) integer, intent(in) :: lat_line(subpnc,subpnr), lon_line(subpnc,subpnr) diff --git a/ldt/params/crop_parms/assigncroptype.F90 b/ldt/params/crop_parms/assigncroptype.F90 index ff47c9784..8f6f0131b 100644 --- a/ldt/params/crop_parms/assigncroptype.F90 +++ b/ldt/params/crop_parms/assigncroptype.F90 @@ -21,6 +21,7 @@ subroutine assigncroptype( nest, crop_classification, & num_types, croptype, crop_index) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_verify, LDT_endrun @@ -55,7 +56,7 @@ subroutine assigncroptype( nest, crop_classification, & !- Local: integer :: ftn, ios1 integer :: i, k - character(100) :: cropinv_file + character(len=LDT_CONST_PATH_LEN) :: cropinv_file character(100) :: header1 character(20) :: read_cropname character(40) :: read_fullname diff --git a/ldt/params/crop_parms/readcropinventory.F90 b/ldt/params/crop_parms/readcropinventory.F90 index ab8984d0a..68a7038d1 100644 --- a/ldt/params/crop_parms/readcropinventory.F90 +++ b/ldt/params/crop_parms/readcropinventory.F90 @@ -21,6 +21,7 @@ subroutine readcropinventory( nest, crop_classification, & num_types, crop_array ) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_verify, LDT_endrun @@ -52,7 +53,7 @@ subroutine readcropinventory( nest, crop_classification, & !- Local: integer :: ftn, ios1 integer :: i, k - character(100) :: cropinv_file + character(len=LDT_CONST_PATH_LEN) :: cropinv_file character(100) :: header1 character(20) :: read_cropname character(40) :: read_fullname diff --git a/ldt/params/topo/read_GTOPO30Native_elev.F90 b/ldt/params/topo/read_GTOPO30Native_elev.F90 index bbb5ba95d..2f027ecb3 100644 --- a/ldt/params/topo/read_GTOPO30Native_elev.F90 +++ b/ldt/params/topo/read_GTOPO30Native_elev.F90 @@ -22,6 +22,7 @@ subroutine read_GTOPO30Native_elev( n, num_bins, fgrd, elevave ) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_endrun @@ -101,7 +102,7 @@ subroutine read_GTOPO30Native_elev( n, num_bins, fgrd, elevave ) real, allocatable :: yrev_elev(:,:) ! Y-reversed mosaicked-tile elevation real, allocatable :: subset_elev(:,:) ! Read input parameter - character(140) :: tempfile + character(len=LDT_CONST_PATH_LEN) :: tempfile !________________________________________________________________________ fgrd = 0. diff --git a/ldt/params/topo/read_MERIT1K_aspect.F90 b/ldt/params/topo/read_MERIT1K_aspect.F90 index 0c2b64e2b..eda129530 100755 --- a/ldt/params/topo/read_MERIT1K_aspect.F90 +++ b/ldt/params/topo/read_MERIT1K_aspect.F90 @@ -23,6 +23,7 @@ subroutine read_MERIT1K_aspect( n, num_bins, fgrd, aspectave ) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_endrun @@ -109,7 +110,7 @@ subroutine read_MERIT1K_aspect( n, num_bins, fgrd, aspectave ) real, allocatable :: subset_elev(:,:) ! Read input parameter real, allocatable :: subset_aspect(:,:) ! Derived from input parameter - character(140) :: tempfile + character(len=LDT_CONST_PATH_LEN) :: tempfile !________________________________________________________________________ fgrd = 0. diff --git a/ldt/params/topo/read_MERIT1K_elev.F90 b/ldt/params/topo/read_MERIT1K_elev.F90 index 3ce0d8902..a5790e1af 100755 --- a/ldt/params/topo/read_MERIT1K_elev.F90 +++ b/ldt/params/topo/read_MERIT1K_elev.F90 @@ -23,6 +23,7 @@ subroutine read_MERIT1K_elev( n, num_bins, fgrd, elevave ) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_endrun @@ -107,7 +108,7 @@ subroutine read_MERIT1K_elev( n, num_bins, fgrd, elevave ) real, allocatable :: yrev_elev(:,:) ! Y-reversed mosaicked-tile elevation real, allocatable :: subset_elev(:,:) ! Read input parameter - character(140) :: tempfile + character(len=LDT_CONST_PATH_LEN) :: tempfile !________________________________________________________________________ fgrd = 0. diff --git a/ldt/params/topo/read_MERIT1K_slope.F90 b/ldt/params/topo/read_MERIT1K_slope.F90 index 8aae117c0..716f078fe 100755 --- a/ldt/params/topo/read_MERIT1K_slope.F90 +++ b/ldt/params/topo/read_MERIT1K_slope.F90 @@ -24,6 +24,7 @@ subroutine read_MERIT1K_slope( n, num_bins, fgrd, slopeave ) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_endrun @@ -110,7 +111,7 @@ subroutine read_MERIT1K_slope( n, num_bins, fgrd, slopeave ) real, allocatable :: subset_elev(:,:) ! Read input parameter real, allocatable :: subset_slope(:,:) ! Derived from input parameter - character(140) :: tempfile + character(len=LDT_CONST_PATH_LEN) :: tempfile !________________________________________________________________________ fgrd = 0. diff --git a/ldt/params/topo/read_SRTM_Native_aspect.F90 b/ldt/params/topo/read_SRTM_Native_aspect.F90 index 465c7057b..1b738efb1 100644 --- a/ldt/params/topo/read_SRTM_Native_aspect.F90 +++ b/ldt/params/topo/read_SRTM_Native_aspect.F90 @@ -22,6 +22,7 @@ subroutine read_SRTM_Native_aspect( n, num_bins, fgrd, aspectave ) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_endrun @@ -103,7 +104,7 @@ subroutine read_SRTM_Native_aspect( n, num_bins, fgrd, aspectave ) real, allocatable :: subset_elev(:,:) ! Read input parameter real, allocatable :: subset_aspect(:,:) ! Derived from input parameter - character(140) :: tempfile + character(len=LDT_CONST_PATH_LEN) :: tempfile !________________________________________________________________________ fgrd = 0. diff --git a/ldt/params/topo/read_SRTM_Native_elev.F90 b/ldt/params/topo/read_SRTM_Native_elev.F90 index 4d2c4649e..6ea027c54 100644 --- a/ldt/params/topo/read_SRTM_Native_elev.F90 +++ b/ldt/params/topo/read_SRTM_Native_elev.F90 @@ -22,6 +22,7 @@ subroutine read_SRTM_Native_elev( n, num_bins, fgrd, elevave ) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_endrun @@ -101,7 +102,7 @@ subroutine read_SRTM_Native_elev( n, num_bins, fgrd, elevave ) real, allocatable :: yrev_elev(:,:) ! Y-reversed mosaicked-tile elevation real, allocatable :: subset_elev(:,:) ! Read input parameter - character(140) :: tempfile + character(len=LDT_CONST_PATH_LEN) :: tempfile !________________________________________________________________________ fgrd = 0. diff --git a/ldt/params/topo/read_SRTM_Native_slope.F90 b/ldt/params/topo/read_SRTM_Native_slope.F90 index 53a5df248..12a6e1700 100644 --- a/ldt/params/topo/read_SRTM_Native_slope.F90 +++ b/ldt/params/topo/read_SRTM_Native_slope.F90 @@ -22,6 +22,7 @@ subroutine read_SRTM_Native_slope( n, num_bins, fgrd, slopeave ) ! !USES: + use LDT_constantsMod, only: LDT_CONST_PATH_LEN use LDT_coreMod, only : LDT_rc use LDT_logMod, only : LDT_logunit, LDT_getNextUnitNumber, & LDT_releaseUnitNumber, LDT_endrun @@ -103,7 +104,7 @@ subroutine read_SRTM_Native_slope( n, num_bins, fgrd, slopeave ) real, allocatable :: subset_elev(:,:) ! Read input parameter real, allocatable :: subset_slope(:,:) ! Derived from input parameter - character(140) :: tempfile + character(len=LDT_CONST_PATH_LEN) :: tempfile !________________________________________________________________________ fgrd = 0. diff --git a/ldt/statDscale/Climo/forcingClimoMod.F90 b/ldt/statDscale/Climo/forcingClimoMod.F90 index 2d474f0b7..d6836ff44 100644 --- a/ldt/statDscale/Climo/forcingClimoMod.F90 +++ b/ldt/statDscale/Climo/forcingClimoMod.F90 @@ -230,6 +230,8 @@ end subroutine forcingClimo_compute subroutine forcingClimo_output(pass) + use LDT_constantsMod, only: LDT_CONST_PATH_LEN + integer :: n integer :: pass @@ -237,7 +239,7 @@ subroutine forcingClimo_output(pass) character*3 :: cdoy integer :: ftn integer :: iret - character*100 :: outfile + character(len=LDT_CONST_PATH_LEN) :: outfile n = 1 if(LDT_masterproc) then diff --git a/lis/apps/landslide/GLS/GLSMod.F90 b/lis/apps/landslide/GLS/GLSMod.F90 index 18c63c260..05d147207 100644 --- a/lis/apps/landslide/GLS/GLSMod.F90 +++ b/lis/apps/landslide/GLS/GLSMod.F90 @@ -96,7 +96,8 @@ module GLSMod ! ! !INTERFACE: subroutine GLS_init() -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_config, LIS_domain use LIS_timeMgrMod, only : LIS_clock, LIS_calendar, LIS_seconds2time use LIS_fileIOMod, only : LIS_readDomainConfigSpecs, LIS_readData @@ -105,7 +106,7 @@ subroutine GLS_init() ! ! !DESCRIPTION: !EOP - character*100 :: suscep_map + character(len=LIS_CONST_PATH_LEN) :: suscep_map real :: gls_gridDesc(1,6) integer :: n,c,r,t integer :: rc, status @@ -627,7 +628,8 @@ end subroutine GLS_run ! ! !INTERFACE: subroutine GLS_output(n) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_masterproc use LIS_logMod, only : LIS_getNextUnitNumber, LIS_releaseUnitNumber use LIS_fileIOMod, only : LIS_create_output_directory @@ -641,7 +643,7 @@ subroutine GLS_output(n) integer :: ftn character(len=12) :: cdate1 logical :: alarmCheck - character*100 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename integer :: c,r integer :: iret diff --git a/lis/apps/landslide/TRIGRS/TRIGRSMod.F90 b/lis/apps/landslide/TRIGRS/TRIGRSMod.F90 index f2b45fe98..60580e11e 100644 --- a/lis/apps/landslide/TRIGRS/TRIGRSMod.F90 +++ b/lis/apps/landslide/TRIGRS/TRIGRSMod.F90 @@ -46,7 +46,7 @@ subroutine TRIGRS_init() use LIS_coreMod, only : LIS_rc, LIS_config use LIS_logMod, only : LIS_endrun, LIS_logunit, & LIS_getNextUnitNumber, LIS_releaseUnitNumber, LIS_verify - use LIS_constantsMod, only : LIS_CONST_PI + use LIS_constantsMod, only : LIS_CONST_PI, LIS_CONST_PATH_LEN use LIS_timeMgrMod, only : LIS_parseTimeString, & LIS_update_timestep, LIS_registerAlarm ! SY @@ -62,7 +62,7 @@ subroutine TRIGRS_init() implicit none - character*100 :: trigrs_initfile + character(len=LIS_CONST_PATH_LEN) :: trigrs_initfile integer :: rc integer :: n @@ -71,7 +71,7 @@ subroutine TRIGRS_init() integer:: maxzo ! SY real::mnzmx,mndep ! SY character (len=1):: tb - character (len=255):: outfil,infil + character (len=LIS_CONST_PATH_LEN):: outfil,infil character (len=8):: date character (len=10):: time character (len=7):: vrsn @@ -412,6 +412,7 @@ end subroutine TRIGRS_init ! !INTERFACE: subroutine TRIGRS_run(n) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain use LIS_logMod, only : LIS_endrun, LIS_verify, LIS_logunit, & LIS_getNextUnitNumber, LIS_releaseUnitNumber, LIS_verify ! SY @@ -444,7 +445,7 @@ subroutine TRIGRS_run(n) !real::x1,mnzmx,mndep ! SY real::x1 !,mnzmx,mndep ! SY !character (len=1):: tb ! SY - character (len=255):: outfil,infil + character (len=LIS_CONST_PATH_LEN):: outfil character (len=14):: fminfil='TRfs_min_' character (len=14):: zfminfil='TRz_at_fs_min_' character (len=14):: pminfil='TRp_at_fs_min_' @@ -1467,6 +1468,7 @@ end subroutine trini subroutine srdgrd(grd,pth,ncol,nrow,celsiz,nodat, & pf,pf1,ctr,imax,temp,infil,param,header) ! SY !pf,pf1,ctr,imax,temp,u,infil,param,header,u1) ! SY + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_endrun, LIS_logunit, & LIS_getNextUnitNumber, LIS_releaseUnitNumber, LIS_verify implicit none @@ -1475,7 +1477,7 @@ subroutine srdgrd(grd,pth,ncol,nrow,celsiz,nodat, & double precision east,west,north,south real pf(imax),pf1(grd),temp(pth),nodats character*14 header(6) - character*255 infil + character(len=LIS_CONST_PATH_LEN) :: infil integer ftn ! SY ! ftn = LIS_getNextUnitNumber() ! SY @@ -1586,6 +1588,7 @@ end subroutine srdgrd ! SY subroutine irdgrd(grd,pth,ncol,nrow,celsiz,inodat,mnd, &! SY y,y1,ctr,imax,itemp,infil,param,header) ! SY !y,y1,ctr,imax,itemp,u,infil,param,header,u1) ! SY + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_endrun, LIS_logunit, & LIS_getNextUnitNumber, LIS_releaseUnitNumber, LIS_verify implicit none @@ -1595,7 +1598,7 @@ subroutine irdgrd(grd,pth,ncol,nrow,celsiz,inodat,mnd, &! SY double precision param(6),celsiz,cns,cew,nodat double precision east,west,north,south character*14 header(6) - character*255 infil + character(len=LIS_CONST_PATH_LEN) :: infil integer ftn ! SY ! infil=adjustl(infil) @@ -1764,6 +1767,7 @@ subroutine rnoff(grd,sumex,imx1,celsiz,param,parami,nodat,& ! Runoff routing for TRIGRS ! By Rex L. Baum, 1 April 2004, latest revision 1 Jul 2011 + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_endrun, LIS_logunit, LIS_getNextUnitNumber, & LIS_releaseUnitNumber, LIS_verify @@ -1778,7 +1782,7 @@ subroutine rnoff(grd,sumex,imx1,celsiz,param,parami,nodat,& integer:: grd!,unum ! SY integer:: ncol,nrow!,u(unum) ! SY logical:: logi(5) - character (len=255):: infil,outfil + character (len=LIS_CONST_PATH_LEN):: infil,outfil character (len=31):: rofil, scratch,irfil character (len=14):: header(6) real:: rnof,inflx,test1 @@ -2155,6 +2159,7 @@ end subroutine srdswm subroutine ssvgrd(z3,grd,z2,nrow,ncol,nodata,param, & outfil,ti,header) ! SY ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_endrun, LIS_logunit, & LIS_getNextUnitNumber, LIS_releaseUnitNumber, LIS_verify @@ -2169,7 +2174,7 @@ subroutine ssvgrd(z3,grd,z2,nrow,ncol,nodata,param, & double precision test, param(6),ti,a character*14 header(6) character*1 sp - character*255 outfil + character(len=LIS_CONST_PATH_LEN) :: outfil character*31 scratch integer ftn ! SY sp=char(32) @@ -4380,6 +4385,7 @@ end subroutine svgstp ! by W.Z. Savage, spring 2001, with modifications by R.L. Baum !subroutine iverson(imx1,u1,profil,ulog) ! SY subroutine iverson(imx1,u1,profil) ! SY + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_endrun, LIS_logunit, & LIS_getNextUnitNumber, LIS_releaseUnitNumber, LIS_verify ! SY use grids @@ -4394,7 +4400,7 @@ subroutine iverson(imx1,u1,profil) ! SY real (double) :: rf1,rf2,rf3,rf4,rfa,rfb,rf real (double) :: fs,rslo,rphi,fmn,ptest,pmn,dhat ! pmn added 4/15/2010, dhat added 8 Jan 2013 real (double) :: newdep,captstar1,captstar2,tdif1,tdif2 - character (len=255) profil + character (len=LIS_CONST_PATH_LEN) profil write(LIS_logunit,*) 'Starting saturated-zone' ! SY write(LIS_logunit,*) 'computations for infinite-depth' ! SY write(*,*) 'Starting saturated-zone' @@ -4582,6 +4588,7 @@ end subroutine iverson ! (both) USGS !subroutine savage(imx1,u1,profil,ulog,nccs) ! SY subroutine savage(imx1,u1,profil,nccs) ! SY + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_endrun, LIS_logunit, & LIS_getNextUnitNumber, LIS_releaseUnitNumber, LIS_verify ! SY use grids @@ -4598,7 +4605,7 @@ subroutine savage(imx1,u1,profil,nccs) ! SY real (double):: tol,delt1,delt2,t1old,t2old real (double):: ddg2rad,dlz logical :: lcv - character (len=255):: profil + character (len=LIS_CONST_PATH_LEN):: profil write(LIS_logunit,*) 'Starting saturated-zone' ! SY write(LIS_logunit,*) 'computations for finite-depth' ! SY write(*,*) 'Starting saturated-zone' @@ -4981,6 +4988,7 @@ end subroutine satinf subroutine isvgrd(z3,grd,z2,nrow,ncol,nodat,nodata, & mnd,param,outfil,ti,header) ! SY ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_endrun, LIS_logunit, & LIS_getNextUnitNumber, LIS_releaseUnitNumber, LIS_verify @@ -4996,7 +5004,7 @@ subroutine isvgrd(z3,grd,z2,nrow,ncol,nodat,nodata, & double precision nodat,nodata,param(6),ti,a character*14 header(6) character*1 sp - character*255 outfil + character(len=LIS_CONST_PATH_LEN) :: outfil character*31 scratch integer ftn ! SY sp=char(32) @@ -5075,6 +5083,7 @@ end subroutine isvgrd ! SY ! Rex L. Baum, 21 Apr 2010, latest revision 07 Feb 2012 subroutine prpijz(u1,profil,ncol,nrow,header,vrsn) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_endrun, LIS_logunit, & LIS_getNextUnitNumber, LIS_releaseUnitNumber, LIS_verify @@ -5089,7 +5098,7 @@ subroutine prpijz(u1,profil,ncol,nrow,header,vrsn) integer::i,j,jj,ctr,ncol,nrow,u1,ctr1,swt,m,nvar,outrow,zval ! SY real (double):: test0 real (double):: xmin,xmax,ymin,ymax,zlo,zhi,plo,pmax,chimin,chimax - character (len=255)::outfil + character (len=LIS_CONST_PATH_LEN)::outfil character (len=18):: profil character (len=14):: header(6) character (len=8)::fini(2) @@ -5241,6 +5250,7 @@ end subroutine prpijz !subroutine ssizgrd(row,col,celsiz,nodat,ctr,u,infil,header,ulog) ! SY subroutine ssizgrd(row,col,celsiz,nodat,ctr,infil,header) ! SY ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_endrun, LIS_logunit, & LIS_getNextUnitNumber, LIS_releaseUnitNumber, LIS_verify implicit none @@ -5252,7 +5262,7 @@ subroutine ssizgrd(row,col,celsiz,nodat,ctr,infil,header) ! SY real:: nodats real, allocatable:: temp(:) character (len=14):: header(6) - character (len=255):: infil + character (len=LIS_CONST_PATH_LEN):: infil integer:: ftn ! SY ! infil=adjustl(infil) ! adjustl statements added to improve compatibility with other compilers 14 Feb 2013 RLB diff --git a/lis/apps/landslide/TRIGRS/input_file_defs.F90 b/lis/apps/landslide/TRIGRS/input_file_defs.F90 index e0f56d231..0fefd58c2 100755 --- a/lis/apps/landslide/TRIGRS/input_file_defs.F90 +++ b/lis/apps/landslide/TRIGRS/input_file_defs.F90 @@ -9,13 +9,14 @@ !-------------------------END NOTICE -- DO NOT EDIT----------------------- module input_file_defs - character (len=255):: heading,slofil,zonfil,zfil - character (len=255):: depfil - character (len=255):: rizerofil,nxtfil,ndxfil - character (len=255):: wffil,dscfil,init,title - character (len=255):: elevfil ! added 4/21/2010 - character (len=255), allocatable:: rifil(:) - character (len=224):: folder,elfoldr + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + character (len=LIS_CONST_PATH_LEN):: heading,slofil,zonfil,zfil + character (len=LIS_CONST_PATH_LEN):: depfil + character (len=LIS_CONST_PATH_LEN):: rizerofil,nxtfil,ndxfil + character (len=LIS_CONST_PATH_LEN):: wffil,dscfil,init,title + character (len=LIS_CONST_PATH_LEN):: elevfil ! added 4/21/2010 + character (len=LIS_CONST_PATH_LEN), allocatable:: rifil(:) + character (len=LIS_CONST_PATH_LEN):: folder,elfoldr character (len=8):: suffix integer:: RainReadSource ! SY: 1 for forcings coming through LIS interface, 2 for forcing files that native TRIGRS inputs (for testing purposes primarily) diff --git a/lis/core/LIS_PE_HandlerMod.F90 b/lis/core/LIS_PE_HandlerMod.F90 index bcc83346f..ac8f92201 100644 --- a/lis/core/LIS_PE_HandlerMod.F90 +++ b/lis/core/LIS_PE_HandlerMod.F90 @@ -117,7 +117,6 @@ subroutine LIS_PE_init integer :: status character*1 :: nestid(2) character*1 :: caseid(3) - character*100 :: temp integer :: max_index integer :: i, k integer, allocatable :: insts(:) diff --git a/lis/core/LIS_PRIV_rcMod.F90 b/lis/core/LIS_PRIV_rcMod.F90 index f9c5f464c..ea577b276 100644 --- a/lis/core/LIS_PRIV_rcMod.F90 +++ b/lis/core/LIS_PRIV_rcMod.F90 @@ -841,7 +841,6 @@ module LIS_PRIV_rcMod character*50 :: startcode integer :: plevel character(len=LIS_CONST_PATH_LEN) :: odir -! character*100 :: dfile character(len=LIS_CONST_PATH_LEN) :: dfile integer :: sdoy integer :: sss @@ -893,7 +892,7 @@ module LIS_PRIV_rcMod character*50, allocatable :: daalg(:) integer, allocatable :: useANNinDA(:) - character*100, allocatable :: ANNdaFile(:) + character(len=LIS_CONST_PATH_LEN), allocatable :: ANNdaFile(:) character*50, allocatable :: biasalg(:) character*50, allocatable :: biasrst(:) diff --git a/lis/core/LIS_RTMMod.F90 b/lis/core/LIS_RTMMod.F90 index aed335a96..e253518e6 100644 --- a/lis/core/LIS_RTMMod.F90 +++ b/lis/core/LIS_RTMMod.F90 @@ -58,7 +58,7 @@ module LIS_RTMMod type, private :: rtm_type_dec character(len=LIS_CONST_PATH_LEN) :: outputdirname character(len=LIS_CONST_PATH_LEN) :: outputfilename - character*100 :: fstatsname + character(len=LIS_CONST_PATH_LEN) :: fstatsname logical :: rtmAlarmCheck real :: rtmoutInterval real :: rtmInterval @@ -94,7 +94,6 @@ subroutine LIS_RTM_init character*10 :: time character*100 :: temp integer :: status - character(len=LIS_CONST_PATH_LEN) :: statsfilename TRACE_ENTER("rtm_init") allocate(LIS_rtm_struc(LIS_rc%nnest)) @@ -168,16 +167,6 @@ subroutine LIS_RTM_init call rtminitialize(trim(LIS_rc%rtm)//char(0)) endif -#if 0 -!!!!!!!!!!!!!TESTING OUTPUT FILE INITIALIZATION STEP (BEGIN) - write(unit=outputdirname,FMT='(I2.2)') trim(LIS_rc%rtm) - outputdirname='RTM_'//trim(outputdirname) - write(unit=outputfilename,FMT='(I2.2)') trim(LIS_rc%rtm) - outputfilename='RTM_'//trim(outputfilename) - write(unit=statsfilename,FMT='(I2.2)') trim(LIS_rc%rtm) - statsfilename='RTMStats_'//trim(statsfilename) - call LIS_create_stats_filename(n, fstatsname,statsfilename) -#endif TRACE_EXIT("rtm_init") end subroutine LIS_RTM_init diff --git a/lis/core/LIS_fileIOMod.F90 b/lis/core/LIS_fileIOMod.F90 index 6ea72f840..b3c6a7fee 100644 --- a/lis/core/LIS_fileIOMod.F90 +++ b/lis/core/LIS_fileIOMod.F90 @@ -2926,7 +2926,8 @@ end subroutine LIS_create_obs_filename ! !Private name: call using putget() subroutine putget_int ( buffer, iofunc, file_name, & routine_name, imax, jmax ) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_abort, LIS_endrun, & LIS_getNextUnitNumber, LIS_releaseUnitNumber @@ -2966,7 +2967,7 @@ subroutine putget_int ( buffer, iofunc, file_name, & !EOP character*9 :: cstat - character*255 :: message (20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: rec_length integer :: istat integer :: istat1 @@ -3068,7 +3069,8 @@ end subroutine putget_int ! !Private name: call using putget() subroutine putget_real ( buffer, iofunc, file_name, & routine_name, imax, jmax ) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_abort, & LIS_getNextUnitNumber, LIS_releaseUnitNumber implicit none @@ -3108,7 +3110,7 @@ subroutine putget_real ( buffer, iofunc, file_name, & ! \end{description} !EOP - character*255 :: message (20) + character(len=LIS_CONST_PATH_LEN) :: message (20) integer :: rec_length character*9 :: cstat integer :: istat diff --git a/lis/core/LIS_forecastMod.F90 b/lis/core/LIS_forecastMod.F90 index 081f54c2d..153acb65d 100644 --- a/lis/core/LIS_forecastMod.F90 +++ b/lis/core/LIS_forecastMod.F90 @@ -151,7 +151,7 @@ subroutine LIS_forecast_writerestart character(len=LIS_CONST_PATH_LEN) :: rst_fname character*4 :: fiter integer, external :: LIS_create_subdirs - character(len=201) :: c_string + character(len=LIS_CONST_PATH_LEN) :: c_string n = 1 @@ -189,7 +189,6 @@ subroutine LIS_forecast_readrestart integer :: n integer :: ftn integer :: iterid - character(len=LIS_CONST_PATH_LEN) :: out_dname character(len=LIS_CONST_PATH_LEN) :: rst_fname n = 1 diff --git a/lis/core/LIS_glacierModelMod.F90 b/lis/core/LIS_glacierModelMod.F90 index 057e8f128..0cf7f2a45 100644 --- a/lis/core/LIS_glacierModelMod.F90 +++ b/lis/core/LIS_glacierModelMod.F90 @@ -82,7 +82,6 @@ subroutine LIS_glaciermodel_init() integer :: status character*1 :: nestid(2) character*1 :: caseid(3) - character*100 :: temp integer :: ftn integer :: i,j,k diff --git a/lis/core/LIS_historyMod.F90 b/lis/core/LIS_historyMod.F90 index aa394e38d..44ea22584 100644 --- a/lis/core/LIS_historyMod.F90 +++ b/lis/core/LIS_historyMod.F90 @@ -7397,6 +7397,7 @@ subroutine writevar_grib1_withstats_real(ftn, ftn_stats, n, & ! !USES: use map_utils + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_pluginIndices implicit none @@ -7468,7 +7469,7 @@ subroutine writevar_grib1_withstats_real(ftn, ftn_stats, n, & ! call to compute diagnostic statistics of a variable ! \end{description} !EOP - character*255 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: igrib character*8 :: date integer :: idate,idate1 @@ -7751,6 +7752,7 @@ subroutine writevar_grib2_withstats_real(ftn, ftn_stats, n, & ! !USES: use map_utils + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_pluginIndices implicit none @@ -7823,7 +7825,7 @@ subroutine writevar_grib2_withstats_real(ftn, ftn_stats, n, & ! call to compute diagnostic statistics of a variable ! \end{description} !EOP - character*255 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: igrib character*8 :: date integer :: idate,idate1 diff --git a/lis/core/LIS_lakemodelMod.F90 b/lis/core/LIS_lakemodelMod.F90 index 0c8effb04..56090914f 100644 --- a/lis/core/LIS_lakemodelMod.F90 +++ b/lis/core/LIS_lakemodelMod.F90 @@ -82,7 +82,6 @@ subroutine LIS_lakemodel_init() integer :: status character*1 :: nestid(2) character*1 :: caseid(3) - character*100 :: temp integer :: ftn integer :: i,j,k diff --git a/lis/core/LIS_logMod.F90 b/lis/core/LIS_logMod.F90 index f6988dde7..e4f46e339 100644 --- a/lis/core/LIS_logMod.F90 +++ b/lis/core/LIS_logMod.F90 @@ -141,9 +141,11 @@ end subroutine LIS_log_msg ! !INTERFACE: subroutine LIS_abort( abort_message ) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + implicit none - character*255 :: abort_message(20) + character(len=LIS_CONST_PATH_LEN) :: abort_message(20) ! !DESCRIPTION: ! @@ -166,7 +168,7 @@ subroutine LIS_abort( abort_message ) ! !EOP character*7 :: iofunc - character*13 :: message_file + character(len=LIS_CONST_PATH_LEN) :: message_file integer :: i integer :: ftn @@ -240,6 +242,9 @@ end subroutine LIS_abort ! !INTERFACE: subroutine LIS_alert( program_name, alert_number, message ) !EOP + + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + implicit none character(len=*), intent(in) :: program_name @@ -270,7 +275,7 @@ subroutine LIS_alert( program_name, alert_number, message ) !EOP character*3 :: calert_number character*7 :: iofunc - character*255 :: message_file + character(len=LIS_CONST_PATH_LEN) :: message_file integer :: i integer :: istat integer :: ftn diff --git a/lis/core/LIS_metforcingMod.F90 b/lis/core/LIS_metforcingMod.F90 index 5e4e8cf0f..c6243d501 100644 --- a/lis/core/LIS_metforcingMod.F90 +++ b/lis/core/LIS_metforcingMod.F90 @@ -1330,6 +1330,7 @@ end subroutine ensembleForcings ! !INTERFACE: subroutine LIS_perturb_forcing(n) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! !ARGUMENTS: integer, intent(IN) :: n @@ -1351,11 +1352,11 @@ subroutine LIS_perturb_forcing(n) integer :: objcount integer :: fobjcount integer :: offset1 - character*100 :: fname - character*100, allocatable :: forcobjs(:) - real, pointer :: forcvar(:) + character*100 :: fname + character*100, allocatable :: forcobjs(:) + real, pointer :: forcvar(:) type(ESMF_Field), allocatable :: forcField(:) - character*100, allocatable :: stateobjs(:) + character*100, allocatable :: stateobjs(:) type(ESMF_Field), allocatable :: stateField(:) real, pointer :: pertdata(:) integer :: perttype diff --git a/lis/core/LIS_readPEDecSpaceAttributes.F90 b/lis/core/LIS_readPEDecSpaceAttributes.F90 index 67c83b1c1..9eb1c1c31 100644 --- a/lis/core/LIS_readPEDecSpaceAttributes.F90 +++ b/lis/core/LIS_readPEDecSpaceAttributes.F90 @@ -49,7 +49,6 @@ subroutine LIS_readPEDecSpaceAttributes(decattribfile, & !EOP integer :: ftn integer :: i, count - character*100 :: temp write(LIS_logunit,*) 'Opening attributes for observations ',& trim(decattribfile) diff --git a/lis/core/LIS_timeMgrMod.F90 b/lis/core/LIS_timeMgrMod.F90 index b11bb6e9f..a707056c1 100644 --- a/lis/core/LIS_timeMgrMod.F90 +++ b/lis/core/LIS_timeMgrMod.F90 @@ -2692,7 +2692,8 @@ end subroutine LIS_tick ! ! !INTERFACE: subroutine LIS_julhr_date( julhr, yyyy,mm,dd,hh) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_logMod, only : lis_abort implicit none @@ -2739,7 +2740,7 @@ subroutine LIS_julhr_date( julhr, yyyy,mm,dd,hh) ! \end{description} ! !EOP - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) ! ------------------------------------------------------------------ ! executable code begins here... use LIS_tmjul4 to convert julhr to diff --git a/lis/core/fbil_module.F90 b/lis/core/fbil_module.F90 index 21d4e3dae..a59201296 100644 --- a/lis/core/fbil_module.F90 +++ b/lis/core/fbil_module.F90 @@ -104,7 +104,8 @@ module fbil_module !#define BRAVE_ ! ________________________________________________________________________ -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_logunit, LIS_endrun implicit none @@ -112,7 +113,7 @@ module fbil_module type charN ! This struct is used so that we can easily change ! the # characters allocated per str - character*300, pointer :: str + character(len=LIS_CONST_PATH_LEN), pointer :: str end type charN ! FORTRAN_INTRINSIC_SUCCESS_VALUES_ diff --git a/lis/dataassim/algorithm/ekf/ekf_Mod.F90 b/lis/dataassim/algorithm/ekf/ekf_Mod.F90 index c73e28a53..1a6a253f3 100644 --- a/lis/dataassim/algorithm/ekf/ekf_Mod.F90 +++ b/lis/dataassim/algorithm/ekf/ekf_Mod.F90 @@ -92,7 +92,7 @@ module ekf_Mod character(len=LIS_CONST_PATH_LEN) :: path ! path to measurements file character(80) :: name ! name identifier for measurements character(len=LIS_CONST_PATH_LEN) :: scalepath ! path to file with scaling parameters - character(80) :: scalename ! filename for scaling parameters + character(len=LIS_CONST_PATH_LEN) :: scalename ! filename for scaling parameters real :: std ! default obs error std real :: std_normal_max ! see pert_param_type diff --git a/lis/dataassim/algorithm/enkf/enkf_Mod.F90 b/lis/dataassim/algorithm/enkf/enkf_Mod.F90 index afd733b42..59f989837 100644 --- a/lis/dataassim/algorithm/enkf/enkf_Mod.F90 +++ b/lis/dataassim/algorithm/enkf/enkf_Mod.F90 @@ -682,7 +682,7 @@ subroutine writeInnovationOutput(n,k) ! !EOP integer :: ftn - character(len=LIS_CONST_PATH_LEN) :: innovfile, gainfile, incrfile + character(len=LIS_CONST_PATH_LEN) :: innovfile integer :: shuffle, deflate, deflate_level integer :: dimID(3), ares_Id, ninnov_Id, innov_id integer :: forecast_sigma_id, aincr_Id diff --git a/lis/dataassim/algorithm/enksgrace/enksgrace_Mod.F90 b/lis/dataassim/algorithm/enksgrace/enksgrace_Mod.F90 index 48db84d36..a5ea49383 100644 --- a/lis/dataassim/algorithm/enksgrace/enksgrace_Mod.F90 +++ b/lis/dataassim/algorithm/enksgrace/enksgrace_Mod.F90 @@ -518,9 +518,7 @@ subroutine enksgrace_update(n,k) !BZ type(ESMF_Logical) :: fresh_incr ! BZ add following type(ESMF_State) :: OBS_State(LIS_rc%nnest) - character(len=LIS_CONST_PATH_LEN) :: GRACEobsdir logical :: file_exists - character(len=LIS_CONST_PATH_LEN) :: name character (len=4) :: fyr character (len=2) :: fmo @@ -684,7 +682,7 @@ subroutine writeInnovationOutput(n,k) ! !EOP integer :: ftn - character(len=LIS_CONST_PATH_LEN) :: innovfile, gainfile, incrfile + character(len=LIS_CONST_PATH_LEN) :: innovfile integer :: shuffle, deflate, deflate_level integer :: dimID(3), ares_Id, ninnov_Id, innov_id character*100 :: varname, vardimname, standard_name diff --git a/lis/dataassim/algorithm/ensrf/ensrf_Mod.F90 b/lis/dataassim/algorithm/ensrf/ensrf_Mod.F90 index 68e6cae2d..60083c628 100644 --- a/lis/dataassim/algorithm/ensrf/ensrf_Mod.F90 +++ b/lis/dataassim/algorithm/ensrf/ensrf_Mod.F90 @@ -788,7 +788,7 @@ subroutine writeInnovationOutput(n,k) ! !EOP integer :: ftn - character(len=LIS_CONST_PATH_LEN) :: innovfile, gainfile, incrfile + character(len=LIS_CONST_PATH_LEN) :: innovfile integer :: shuffle, deflate, deflate_level integer :: dimID(3), ares_Id, ninnov_Id, innov_id integer :: forecast_sigma_id, aincr_Id @@ -964,75 +964,6 @@ subroutine writeInnovationOutput(n,k) ! ! 1. Kalman gain !-------------------------------------------------------------------------- - -#if 0 - if(LIS_masterproc) then - call LIS_create_gain_filename(n,gainfile,& - 'Ensrf') - -#if (defined USE_NETCDF4) - status = nf90_create(path=gainfile,cmode=nf90_hdf5,& - ncid = ftn) - call LIS_verify(status,& - 'creating netcdf file '//trim(gainfile)//& - ' failed in ensrf_Mod') -#endif -#if (defined USE_NETCDF3) - status = nf90_create(path=gainfile,cmode=nf90_clobber,& - ncid = ftn) - call LIS_verify(status,& - 'creating netcdf file '//trim(gainfile)//& - ' failed in ensrf_Mod') -#endif - - call LIS_verify(nf90_def_dim(ftn,'ntiles',& - LIS_rc%glbnpatch(n,LIS_rc%lsm_index),& - dimID(1)),& - 'nf90_def_dim for ntiles failed in ensrf_mod') - call LIS_verify(nf90_put_att(ftn,& - NF90_GLOBAL,"missing_value", LIS_rc%udef),& - 'nf90_put_att for missing_value failed in ensrf_mod') - -!-------------------------------------------------------------------------- -! Kalman gain -meta data -!-------------------------------------------------------------------------- - write(unit=finst, fmt='(i2.2)') k - varname = "kgain_"//trim(finst) - vardimname = "kgain_"//trim(finst)//"_levels" - standard_name = "Kalman_gain_for_DA_instance_"//& - trim(finst) - - call LIS_verify(nf90_def_dim(ftn,& - vardimname,LIS_rc%nstvars(k),dimId(2)),& - 'nf90_def_dim failed for kgain_'//trim(finst)) - - call LIS_verify(nf90_def_var(ftn,varname,& - nf90_float,& - dimids = dimID(1:2), varID=kgain_Id),& - 'nf90_def_var for kgain failed in ensrf_mod') - -#if(defined USE_NETCDF4) - call LIS_verify(nf90_def_var_deflate(ftn,& - kgain_Id,& - shuffle, deflate, deflate_level),& - 'nf90_def_var_deflate for kgain failed in ensrf_mod') -#endif - call LIS_verify(nf90_put_att(ftn,kgain_Id,& - "standard_name",standard_name),& - 'nf90_put_att for kgain failed in ensrf_mod') - call LIS_verify(nf90_enddef(ftn),& - 'nf90_enddef failed in ensrf_mod') - endif - do v=1,LIS_rc%nstvars(k) - call LIS_writevar_restart(ftn,n,LIS_rc%lsm_index,& - ensrf_struc(n,k)%k_gain(:,v),kgain_id, & - dim=v,wformat="netcdf") - enddo - if(LIS_masterproc) then - call LIS_verify(nf90_close(ftn),& - 'nf90_close failed in ensrf_mod') - endif -#endif endif end subroutine writeInnovationOutput diff --git a/lis/dataassim/algorithm/pf/pf_Mod.F90 b/lis/dataassim/algorithm/pf/pf_Mod.F90 index d668e604e..20a6884b5 100644 --- a/lis/dataassim/algorithm/pf/pf_Mod.F90 +++ b/lis/dataassim/algorithm/pf/pf_Mod.F90 @@ -659,7 +659,7 @@ subroutine writeInnovationOutput(n,k) ! !EOP integer :: ftn - character(len=LIS_CONST_PATH_LEN) :: innovfile, gainfile, incrfile + character(len=LIS_CONST_PATH_LEN) :: innovfile integer :: shuffle, deflate, deflate_level integer :: dimID(3), ares_Id, ninnov_Id, innov_id integer :: forecast_sigma_id, aincr_Id diff --git a/lis/dataassim/algorithm/pf/pf_types.F90 b/lis/dataassim/algorithm/pf/pf_types.F90 index 02005c8fc..aeaf7b7e9 100644 --- a/lis/dataassim/algorithm/pf/pf_types.F90 +++ b/lis/dataassim/algorithm/pf/pf_types.F90 @@ -65,7 +65,7 @@ module pf_types character(len=LIS_CONST_PATH_LEN) :: path ! path to measurements file character(80) :: name ! name identifier for measurements character(len=LIS_CONST_PATH_LEN) :: scalepath ! path to file with scaling parameters - character(80) :: scalename ! filename for scaling parameters + character(len=LIS_CONST_PATH_LEN) :: scalename ! filename for scaling parameters real :: std ! default obs error std real :: std_normal_max ! see pert_param_type diff --git a/lis/dataassim/obs/CDFS_GVF/CDFSgvf_Mod.F90 b/lis/dataassim/obs/CDFS_GVF/CDFSgvf_Mod.F90 index 2150d1b59..fb9892daf 100644 --- a/lis/dataassim/obs/CDFS_GVF/CDFSgvf_Mod.F90 +++ b/lis/dataassim/obs/CDFS_GVF/CDFSgvf_Mod.F90 @@ -22,6 +22,7 @@ module CDFSgvf_Mod ! !USES: use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use map_utils implicit none @@ -76,8 +77,8 @@ module CDFSgvf_Mod !e.g., 4/29 13:00:00) integer :: cdf_read_opt ! 0: read all months at one time ! 1: read only the current monTh - character*100 :: modelcdffile - character*100 :: obscdffile + character(len=LIS_CONST_PATH_LEN) :: modelcdffile + character(len=LIS_CONST_PATH_LEN) :: obscdffile end type CDFSgvf_dec @@ -92,7 +93,8 @@ module CDFSgvf_Mod ! ! !INTERFACE: subroutine CDFSgvf_setup(k, OBS_State, OBS_Pert_State) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_timeMgrMod use LIS_historyMod @@ -130,7 +132,7 @@ subroutine CDFSgvf_setup(k, OBS_State, OBS_Pert_State) type(ESMF_ArraySpec) :: intarrspec, realarrspec type(ESMF_Field) :: pertField(LIS_rc%nnest) type(ESMF_ArraySpec) :: pertArrSpec - character*100 :: gvfobsdir + character(len=LIS_CONST_PATH_LEN) :: gvfobsdir character*100 :: temp character*1 :: vid(2) character*40, allocatable :: vname(:) diff --git a/lis/dataassim/obs/CDFS_GVF/read_CDFSgvf.F90 b/lis/dataassim/obs/CDFS_GVF/read_CDFSgvf.F90 index 1423f6f46..8f9ba1ea7 100644 --- a/lis/dataassim/obs/CDFS_GVF/read_CDFSgvf.F90 +++ b/lis/dataassim/obs/CDFS_GVF/read_CDFSgvf.F90 @@ -20,6 +20,7 @@ subroutine read_CDFSgvf(n, k, OBS_State, OBS_Pert_State) ! !USES: use ESMF use LIS_mpiMod + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_logMod use LIS_timeMgrMod @@ -55,8 +56,8 @@ subroutine read_CDFSgvf(n, k, OBS_State, OBS_Pert_State) real, parameter :: MAX_LAI_VALUE=10.0, MIN_LAI_VALUE=0.0001 integer :: status integer :: grid_index - character*100 :: gvfobsdir - character*100 :: fname + character(len=LIS_CONST_PATH_LEN) :: gvfobsdir + character(len=LIS_CONST_PATH_LEN) :: fname logical :: alarmCheck, file_exists integer :: t,c,r,i,j,p,jj real, pointer :: obsl(:) diff --git a/lis/dataassim/obs/CDFS_GVF/write_CDFSgvfobs.F90 b/lis/dataassim/obs/CDFS_GVF/write_CDFSgvfobs.F90 index f8891bfda..b329c8ba6 100644 --- a/lis/dataassim/obs/CDFS_GVF/write_CDFSgvfobs.F90 +++ b/lis/dataassim/obs/CDFS_GVF/write_CDFSgvfobs.F90 @@ -19,6 +19,7 @@ subroutine write_CDFSgvfobs(n, k, OBS_State) ! !USES: use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_logMod use LIS_fileIOMod @@ -43,7 +44,7 @@ subroutine write_CDFSgvfobs(n, k, OBS_State) logical :: data_update real, pointer :: smobs(:) real :: smobs_unsc(LIS_rc%obs_ngrid(k)) - character*100 :: obsname + character(len=LIS_CONST_PATH_LEN) :: obsname integer :: ftn integer :: status diff --git a/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/cdfTransfer_NASASMAPsm_Mod.F90 b/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/cdfTransfer_NASASMAPsm_Mod.F90 index 2f0641188..c99c03b35 100644 --- a/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/cdfTransfer_NASASMAPsm_Mod.F90 +++ b/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/cdfTransfer_NASASMAPsm_Mod.F90 @@ -21,6 +21,7 @@ module cdfTransfer_NASASMAPsm_Mod ! !USES: use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use map_utils implicit none @@ -68,12 +69,12 @@ module cdfTransfer_NASASMAPsm_Mod !e.g., 4/29 13:00:00) integer :: cdf_read_opt ! 0: read all months at one time ! 1: read only the current month - character*100 :: modelcdffile - character*100 :: obscdffile + character(len=LIS_CONST_PATH_LEN) :: modelcdffile + character(len=LIS_CONST_PATH_LEN) :: obscdffile integer :: n_strat_bins integer :: useCDFtransfer - character*100 :: ref_p_climo_file - character*100 :: target_p_climo_file + character(len=LIS_CONST_PATH_LEN) :: ref_p_climo_file + character(len=LIS_CONST_PATH_LEN) :: target_p_climo_file real, allocatable :: ref_p_climo_maxval(:) real, allocatable :: target_p_climo(:,:,:) @@ -91,6 +92,7 @@ module cdfTransfer_NASASMAPsm_Mod ! !INTERFACE: subroutine cdfTransfer_NASASMAPsm_setup(k, OBS_State, OBS_Pert_State) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_timeMgrMod use LIS_historyMod @@ -126,7 +128,7 @@ subroutine cdfTransfer_NASASMAPsm_setup(k, OBS_State, OBS_Pert_State) type(ESMF_ArraySpec) :: intarrspec, realarrspec type(ESMF_Field) :: pertField(LIS_rc%nnest) type(ESMF_ArraySpec) :: pertArrSpec - character*100 :: rtsmopssmobsdir + character(len=LIS_CONST_PATH_LEN) :: rtsmopssmobsdir character*100 :: temp real, allocatable :: obsstd(:) character*1 :: vid(2) diff --git a/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/read_cdfTransfer_NASASMAPsm.F90 b/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/read_cdfTransfer_NASASMAPsm.F90 index 0a8c597b8..bf89d79a9 100644 --- a/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/read_cdfTransfer_NASASMAPsm.F90 +++ b/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/read_cdfTransfer_NASASMAPsm.F90 @@ -20,6 +20,7 @@ subroutine read_cdfTransfer_NASASMAPsm(n, k, OBS_State, OBS_Pert_State) ! !USES: use ESMF use LIS_mpiMod + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_logMod use LIS_timeMgrMod @@ -28,7 +29,6 @@ subroutine read_cdfTransfer_NASASMAPsm(n, k, OBS_State, OBS_Pert_State) use map_utils use LIS_pluginIndices use cdfTransfer_NASASMAPsm_Mod, only: cdfT_SMAPsm_struc - !use cdfTransfer_NASASMAPsm_Mod, only: cdfT_SMAPsm_struc implicit none ! !ARGUMENTS: @@ -57,8 +57,8 @@ subroutine read_cdfTransfer_NASASMAPsm(n, k, OBS_State, OBS_Pert_State) real, parameter :: MAX_SM_VALUE = 0.45, MIN_SM_VALUE = 0.0001 integer :: status integer :: grid_index - character*100 :: smobsdir - character*100 :: fname + character(len=LIS_CONST_PATH_LEN) :: smobsdir + character(len=LIS_CONST_PATH_LEN) :: fname logical :: alarmCheck, file_exists integer :: t, c, r, jj real, pointer :: obsl(:) @@ -89,7 +89,7 @@ subroutine read_cdfTransfer_NASASMAPsm(n, k, OBS_State, OBS_Pert_State) integer :: nyr, nmo, nda, nhr, nmn, nss real*8 :: timenow, time1,time2,time3 integer :: doy - character*200 :: list_files + character(len=LIS_CONST_PATH_LEN) :: list_files integer :: mn_ind integer :: ftn, ierr integer :: rc diff --git a/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/write_cdfTransfer_NASASMAPsmobs.F90 b/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/write_cdfTransfer_NASASMAPsmobs.F90 index e67e55e48..0daad47b6 100644 --- a/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/write_cdfTransfer_NASASMAPsmobs.F90 +++ b/lis/dataassim/obs/CDF_Transfer_NASA_SMAPsm/write_cdfTransfer_NASASMAPsmobs.F90 @@ -20,6 +20,7 @@ subroutine write_cdfTransfer_NASASMAPsmobs(n, k, OBS_State) ! !USES: use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_logMod use LIS_fileIOMod @@ -44,7 +45,7 @@ subroutine write_cdfTransfer_NASASMAPsmobs(n, k, OBS_State) logical :: data_update real, pointer :: smobs(:) real :: smobs_unsc(LIS_rc%obs_ngrid(k)) - character*100 :: obsname + character(len=LIS_CONST_PATH_LEN) :: obsname integer :: ftn integer :: status diff --git a/lis/dataassim/obs/GCOMW_AMSR2L3SND/GCOMW_AMSR2L3SND_Mod.F90 b/lis/dataassim/obs/GCOMW_AMSR2L3SND/GCOMW_AMSR2L3SND_Mod.F90 index e2ca6ecf9..26f6e331b 100644 --- a/lis/dataassim/obs/GCOMW_AMSR2L3SND/GCOMW_AMSR2L3SND_Mod.F90 +++ b/lis/dataassim/obs/GCOMW_AMSR2L3SND/GCOMW_AMSR2L3SND_Mod.F90 @@ -157,8 +157,6 @@ subroutine GCOMW_AMSR2L3SND_setup(k, OBS_State, OBS_Pert_State) type(pert_dec_type) :: obs_pert real, pointer :: obs_temp(:,:) real :: gridDesci(50) - character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) - character(len=LIS_CONST_PATH_LEN) :: obscdffile(LIS_rc%nnest) real, allocatable :: ssdev(:) integer :: jj real :: cornerlat1, cornerlat2 diff --git a/lis/dataassim/obs/NASA_SMAPvod/read_NASASMAPvod.F90 b/lis/dataassim/obs/NASA_SMAPvod/read_NASASMAPvod.F90 index 68efa597f..946954282 100644 --- a/lis/dataassim/obs/NASA_SMAPvod/read_NASASMAPvod.F90 +++ b/lis/dataassim/obs/NASA_SMAPvod/read_NASASMAPvod.F90 @@ -87,7 +87,7 @@ subroutine read_NASASMAPvod(n, k, OBS_State, OBS_Pert_State) integer :: doy real :: gmt character(len=4) :: istring - character(len=200) :: cmd + character(len=LIS_CONST_PATH_LEN) :: cmd integer :: ftn integer :: ierr character*100 :: temp1 diff --git a/lis/dataassim/obs/SMAP_NRTsm/read_SMAPNRTsm.F90 b/lis/dataassim/obs/SMAP_NRTsm/read_SMAPNRTsm.F90 index 07c15ac0c..59089f122 100755 --- a/lis/dataassim/obs/SMAP_NRTsm/read_SMAPNRTsm.F90 +++ b/lis/dataassim/obs/SMAP_NRTsm/read_SMAPNRTsm.F90 @@ -104,7 +104,7 @@ subroutine read_SMAPNRTsm(n, k, OBS_State, OBS_Pert_State) integer :: ftn,ierr character(len=LIS_CONST_PATH_LEN) :: smap_filename(10),tstring(10) character(len=4) :: istring - character(len=200) :: cmd + character(len=LIS_CONST_PATH_LEN) :: cmd integer :: rc integer, external :: create_filelist ! C function @@ -498,6 +498,7 @@ subroutine read_SMAPNRT_data(n, k, fname, smobs_inp, time) ! ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_masterproc use LIS_logMod, only: LIS_logunit, LIS_alert use LIS_pluginIndices, only: LIS_agrmetrunId @@ -567,7 +568,7 @@ subroutine read_SMAPNRT_data(n, k, fname, smobs_inp, time) real :: smobs_ip(LIS_rc%obs_lnc(k)*LIS_rc%obs_lnr(k)) integer :: status,ios - character(len=512) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer, save :: alert_number = 0 diff --git a/lis/dataassim/obs/SMOPS_ASCATsm/read_SMOPS_ASCATsm.F90 b/lis/dataassim/obs/SMOPS_ASCATsm/read_SMOPS_ASCATsm.F90 index ee7423edb..93644541d 100755 --- a/lis/dataassim/obs/SMOPS_ASCATsm/read_SMOPS_ASCATsm.F90 +++ b/lis/dataassim/obs/SMOPS_ASCATsm/read_SMOPS_ASCATsm.F90 @@ -409,6 +409,7 @@ subroutine read_SMOPS_ASCAT_data(n, k, fname, smobs_ip, smtime_ip) #if(defined USE_GRIBAPI) use grib_api #endif + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_masterproc use LIS_logMod use LIS_pluginIndices, only: LIS_agrmetrunId @@ -514,7 +515,7 @@ subroutine read_SMOPS_ASCAT_data(n, k, fname, smobs_ip, smtime_ip) real :: upgmt real*8 :: file_time integer :: imsg - character(len=512) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer, save :: alert_number = 0 logical :: a_exist,b_exist,c_exist diff --git a/lis/dataassim/obs/SNODEP/read_SNODEPobs.F90 b/lis/dataassim/obs/SNODEP/read_SNODEPobs.F90 index 3841eb93c..7081e7718 100644 --- a/lis/dataassim/obs/SNODEP/read_SNODEPobs.F90 +++ b/lis/dataassim/obs/SNODEP/read_SNODEPobs.F90 @@ -289,7 +289,7 @@ subroutine SNODEP_filename(name, mesh, hemi, ndir, yr, mo, da, hr, mn, conv) implicit none - character*100 :: name + character(len=*) :: name integer :: hemi integer :: mesh integer :: yr, mo, da, hr,mn diff --git a/lis/dataassim/obs/USAFSI/USAFSIobs_Mod.F90 b/lis/dataassim/obs/USAFSI/USAFSIobs_Mod.F90 index 1f90e4101..79b7a6dd0 100644 --- a/lis/dataassim/obs/USAFSI/USAFSIobs_Mod.F90 +++ b/lis/dataassim/obs/USAFSI/USAFSIobs_Mod.F90 @@ -55,6 +55,7 @@ subroutine USAFSIobs_setup(k, OBS_State, OBS_Pert_State) ! Imports use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_rc, LIS_config use LIS_DAobservationsMod, only: LIS_obsVecGrid, LIS_obsEnsOnGrid use LIS_logMod, only: LIS_verify, LIS_logunit, LIS_getNextUnitNumber, & @@ -74,7 +75,7 @@ subroutine USAFSIobs_setup(k, OBS_State, OBS_Pert_State) integer :: ftn integer :: i type(ESMF_ArraySpec) :: intarrspec - character(100) :: USAFSIobsdir + character(len=LIS_CONST_PATH_LEN) :: USAFSIobsdir character(40) :: USAFSI_infile_name integer :: n type(pert_dec_type) :: obs_pert diff --git a/lis/dataassim/obs/USAFSI/read_USAFSIobs.F90 b/lis/dataassim/obs/USAFSI/read_USAFSIobs.F90 index 58f6a6982..797d79244 100644 --- a/lis/dataassim/obs/USAFSI/read_USAFSIobs.F90 +++ b/lis/dataassim/obs/USAFSI/read_USAFSIobs.F90 @@ -19,6 +19,7 @@ subroutine read_USAFSIobs(n, k, OBS_State, OBS_Pert_State) ! Imports use ESMF use USAFSIobs_Mod, only: USAFSI_obs + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_rc use LIS_DAobservationsMod, only: LIS_obs_domain use LIS_logMod, only: LIS_verify, LIS_logunit @@ -42,14 +43,14 @@ subroutine read_USAFSIobs(n, k, OBS_State, OBS_Pert_State) integer :: dd type(ESMF_TimeInterval) :: deltaT logical :: file_exists - character(255) :: filename + character(len=LIS_CONST_PATH_LEN) :: filename integer, allocatable :: gid(:) integer :: hh integer :: ierr integer :: mm integer :: nc integer :: nr - character(100) :: obsdir + character(len=LIS_CONST_PATH_LEN) :: obsdir character(40) :: prefix real, pointer :: obsl(:) integer :: r @@ -168,9 +169,9 @@ subroutine read_USAFSIobs(n, k, OBS_State, OBS_Pert_State) ! Constructs USAFSI filename subroutine USAFSI_filename(filename, dir, prefix, yyyy, mm, dd, hh) implicit none - character(255), intent(inout) :: filename - character(100), intent(in) :: dir - character(40), intent(in) :: prefix + character(len=*), intent(inout) :: filename + character(len=*), intent(in) :: dir + character(len=*), intent(in) :: prefix integer, intent(in) :: yyyy integer, intent(in) :: mm integer, intent(in) :: dd @@ -202,7 +203,7 @@ subroutine USAFSI_reader(filename, n, k, snoanl, ierr) implicit none ! Arguments - character(255), intent(in) :: filename + character(len=*), intent(in) :: filename integer, intent(in) :: n integer, intent(in) :: k real, allocatable, intent(out) :: snoanl(:,:) @@ -415,7 +416,7 @@ end subroutine USAFSI_reader subroutine USAFSI_reader(filename, n, k, snoanl, ierr) use LIS_logMod, only: LIS_logunit, LIS_endrun implicit none - character(255), intent(in) :: filename + character(len=*), intent(in) :: filename integer, intent(in) :: n integer, intent(in) :: k real, allocatable, intent(out) :: snoanl(:,:) diff --git a/lis/dataassim/obs/USAFSI/write_USAFSIobs.F90 b/lis/dataassim/obs/USAFSI/write_USAFSIobs.F90 index 838e25755..35ffdcf3e 100644 --- a/lis/dataassim/obs/USAFSI/write_USAFSIobs.F90 +++ b/lis/dataassim/obs/USAFSI/write_USAFSIobs.F90 @@ -16,6 +16,7 @@ subroutine write_USAFSIobs(n, k, OBS_State) ! Imports use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc use LIS_DAobservationsMod, only: LIS_writevar_gridded_obs use LIS_fileIOMod, only: LIS_create_output_directory @@ -36,7 +37,7 @@ subroutine write_USAFSIobs(n, k, OBS_State) ! Local variables logical :: data_update integer :: ftn - character(100) :: obsname + character(len=LIS_CONST_PATH_LEN) :: obsname type(ESMF_Field) :: snowField real, pointer :: snowobs(:) integer :: status diff --git a/lis/dataassim/obs/VIIRS_GVF/VIIRSgvf_Mod.F90 b/lis/dataassim/obs/VIIRS_GVF/VIIRSgvf_Mod.F90 index 0c1744825..dc9501c8e 100644 --- a/lis/dataassim/obs/VIIRS_GVF/VIIRSgvf_Mod.F90 +++ b/lis/dataassim/obs/VIIRS_GVF/VIIRSgvf_Mod.F90 @@ -22,6 +22,7 @@ module VIIRSgvf_Mod ! !USES: use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use map_utils implicit none @@ -76,8 +77,8 @@ module VIIRSgvf_Mod !e.g., 4/29 13:00:00) integer :: cdf_read_opt ! 0: read all months at one time ! 1: read only the current monTh - character*100 :: modelcdffile - character*100 :: obscdffile + character(len=LIS_CONST_PATH_LEN) :: modelcdffile + character(len=LIS_CONST_PATH_LEN) :: obscdffile end type VIIRSgvf_dec @@ -93,6 +94,7 @@ module VIIRSgvf_Mod ! !INTERFACE: subroutine VIIRSgvf_setup(k, OBS_State, OBS_Pert_State) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_timeMgrMod use LIS_historyMod @@ -130,7 +132,7 @@ subroutine VIIRSgvf_setup(k, OBS_State, OBS_Pert_State) type(ESMF_ArraySpec) :: intarrspec, realarrspec type(ESMF_Field) :: pertField(LIS_rc%nnest) type(ESMF_ArraySpec) :: pertArrSpec - character*100 :: gvfobsdir + character(len=LIS_CONST_PATH_LEN) :: gvfobsdir character*100 :: temp character*1 :: vid(2) character*40, allocatable :: vname(:) diff --git a/lis/dataassim/obs/VIIRS_GVF/read_VIIRSgvf.F90 b/lis/dataassim/obs/VIIRS_GVF/read_VIIRSgvf.F90 index 962dd08b7..693930fed 100644 --- a/lis/dataassim/obs/VIIRS_GVF/read_VIIRSgvf.F90 +++ b/lis/dataassim/obs/VIIRS_GVF/read_VIIRSgvf.F90 @@ -20,6 +20,7 @@ subroutine read_VIIRSgvf(n, k, OBS_State, OBS_Pert_State) ! !USES: use ESMF use LIS_mpiMod + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_logMod use LIS_timeMgrMod @@ -55,8 +56,8 @@ subroutine read_VIIRSgvf(n, k, OBS_State, OBS_Pert_State) real, parameter :: MAX_LAI_VALUE=10.0, MIN_LAI_VALUE=0.0001 integer :: status integer :: grid_index - character*100 :: gvfobsdir - character*100 :: fname + character(len=LIS_CONST_PATH_LEN) :: gvfobsdir + character(len=LIS_CONST_PATH_LEN) :: fname integer :: vtype logical :: alarmCheck, file_exists integer :: t,c,r,i,j,p,jj diff --git a/lis/dataassim/obs/VIIRS_GVF/write_VIIRSgvfobs.F90 b/lis/dataassim/obs/VIIRS_GVF/write_VIIRSgvfobs.F90 index 0396170b4..9bb597151 100644 --- a/lis/dataassim/obs/VIIRS_GVF/write_VIIRSgvfobs.F90 +++ b/lis/dataassim/obs/VIIRS_GVF/write_VIIRSgvfobs.F90 @@ -19,6 +19,7 @@ subroutine write_VIIRSgvfobs(n, k, OBS_State) ! !USES: use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_logMod use LIS_fileIOMod @@ -43,7 +44,7 @@ subroutine write_VIIRSgvfobs(n, k, OBS_State) logical :: data_update real, pointer :: smobs(:) real :: smobs_unsc(LIS_rc%obs_ngrid(k)) - character*100 :: obsname + character(len=LIS_CONST_PATH_LEN) :: obsname integer :: ftn integer :: status diff --git a/lis/dataassim/obs/hydrowebWL/hydrowebWLobs_module.F90 b/lis/dataassim/obs/hydrowebWL/hydrowebWLobs_module.F90 index c4eaa03b2..b01f48dc0 100755 --- a/lis/dataassim/obs/hydrowebWL/hydrowebWLobs_module.F90 +++ b/lis/dataassim/obs/hydrowebWL/hydrowebWLobs_module.F90 @@ -98,7 +98,7 @@ subroutine hydrowebWLobs_setup(k, OBS_State, OBS_Pert_State) type(ESMF_Field) :: pertField(LIS_rc%nnest) type(ESMF_ArraySpec) :: pertArrSpec character(len=LIS_CONST_PATH_LEN) :: synwlobsdir - character*100 :: wldistancemap + character(len=LIS_CONST_PATH_LEN) :: wldistancemap character*100 :: temp character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) character(len=LIS_CONST_PATH_LEN) :: obscdffile(LIS_rc%nnest) diff --git a/lis/dataassim/perturb/gmaopert/random_fields.F90 b/lis/dataassim/perturb/gmaopert/random_fields.F90 index b04dd928d..d52e2fc16 100644 --- a/lis/dataassim/perturb/gmaopert/random_fields.F90 +++ b/lis/dataassim/perturb/gmaopert/random_fields.F90 @@ -524,7 +524,8 @@ program test_rfg2d ! use random_fields ! use nr_ran2_gasdev - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + implicit none integer :: N_x, N_y, i, j, n_e @@ -533,7 +534,7 @@ program test_rfg2d real, allocatable, dimension(:,:) :: field1, field2 - character(300) :: file_name + character(len=LIS_CONST_PATH_LEN) :: file_name character(10) :: n_e_string character(100) :: output_format character(10) :: tmp_string diff --git a/lis/interp/breakpt_module.F90 b/lis/interp/breakpt_module.F90 index d34f10322..89f86eb3a 100644 --- a/lis/interp/breakpt_module.F90 +++ b/lis/interp/breakpt_module.F90 @@ -165,14 +165,15 @@ integer function filedate(log1,filename) ! ! dependencies use dfport + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! ! argument variables integer, intent(INOUT) :: log1 - character*80 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename ! ! local variables integer, dimension(12) :: fileinfo - character*80 :: wrtline + character(len=LIS_CONST_PATH_LEN) :: wrtline character*3 :: errnum integer :: istat ! @@ -195,10 +196,12 @@ end function filedate ! ! logical function checkintfile(log1,dataf1,dataf2) + + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! ! argument variables integer, intent(INOUT) :: log1 - character*80, intent(INOUT) :: dataf1,dataf2 + character(len=LIS_CONST_PATH_LEN), intent(INOUT) :: dataf1,dataf2 ! ! local variables logical :: fileexists = .FALSE. @@ -357,16 +360,17 @@ end function datestr ! Duplicate declaration... check if this is needed #if 0 subroutine readcard(brkfile,datebeg,dateend,ng,intmins,outfmt,error) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! ! argument variables - character(80), intent(OUT) :: brkfile + character(len=LIS_CONST_PATH_LEN), intent(OUT) :: brkfile character(10), intent(OUT) :: datebeg,dateend integer, intent(OUT) :: ng,intmins,outfmt logical, intent(OUT) :: error ! ! local variables logical :: fileexists - character(11) :: cardfile + character(len=LIS_CONST_PATH_LEN) :: cardfile integer :: funit = 10 ! cardfile = 'Breakpt.crd' @@ -392,16 +396,17 @@ end subroutine readcard ! ! subroutine brkprecip(brkfile,datebeg,dateend,ngauges,intmins,outfmt) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! ! argument variables - character*80, intent(INOUT) :: brkfile + character(len=LIS_CONST_PATH_LEN), intent(INOUT) :: brkfile character*10, intent(INOUT) :: datebeg,dateend integer, intent(INOUT) :: ngauges,intmins,outfmt ! ! local variables logical :: brkexists,ppdexists,idxexists,intfiles - character*80 :: wrtline - character*80 :: logfile,ppdfile,idxfile,outfile + character(len=LIS_CONST_PATH_LEN) :: wrtline + character(len=LIS_CONST_PATH_LEN) :: logfile,ppdfile,idxfile,outfile integer :: brkfunit = 50 integer :: log1 = 60 integer :: ppdfunit,idxfunit @@ -558,18 +563,20 @@ end subroutine intindex ! ! subroutine readheader(log1,funit,datafile,intf,gidxs,hlines) + + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,funit - character*80, intent(IN) :: datafile + character(len=LIS_CONST_PATH_LEN), intent(IN) :: datafile logical, intent(IN) :: intf integer, intent (INOUT) :: gidxs(:,:) integer, intent(OUT) :: hlines ! ! local variables - character*80 :: wrtline + character(len=LIS_CONST_PATH_LEN) :: wrtline character*120 :: hline - character*80 :: dataf2,dataf3 + character(len=LIS_CONST_PATH_LEN) :: dataf2,dataf3 integer :: ng integer :: ppdfunit,idxfunit integer :: i,j,k,m,n @@ -662,14 +669,15 @@ end subroutine readheader ! ! subroutine procstndata(log1,datafile,hlines,ng,gidxs) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,hlines,ng - character*80, intent(IN) :: datafile + character(len=LIS_CONST_PATH_LEN), intent(IN) :: datafile integer, intent(INOUT) :: gidxs(:,:) ! ! local variables - character*80 :: dataf2,dataf3 + character(len=LIS_CONST_PATH_LEN) :: dataf2,dataf3 character*80 :: wrtline character*80 :: hline character*40 :: tprec,next_tprec @@ -812,10 +820,11 @@ end subroutine procstndata ! ! subroutine breakagg(log1,funit,datafile,hlines,ng,nint,intmins,dates,gidxs,precip,accy) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,funit - character*80, intent(IN) :: datafile + character(len=LIS_CONST_PATH_LEN), intent(IN) :: datafile integer, intent(IN) :: hlines,ng,nint integer, intent(INOUT) :: intmins integer, intent(INOUT) :: dates(:,:) @@ -826,7 +835,7 @@ subroutine breakagg(log1,funit,datafile,hlines,ng,nint,intmins,dates,gidxs,preci ! local variables character*80 :: wrtline character*80 :: hline - character*80 :: idxdataf + character(len=LIS_CONST_PATH_LEN) :: idxdataf character*3 :: gage character*6 :: brecs,events integer, dimension(2,5) :: tdata = 0 @@ -1055,16 +1064,17 @@ end subroutine metric ! ! subroutine writestnrec(log1,ng,nint,intmins,outfmt,dates,gidxs,precip,outfile) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,ng,nint,intmins,outfmt - character*80, intent(INOUT) :: outfile + character(len=LIS_CONST_PATH_LEN), intent(INOUT) :: outfile integer, intent(INOUT) :: dates(:,:) integer, intent(IN) :: gidxs(:,:) real, intent(IN) :: precip(:,:) ! ! local variables - character*80 :: wrtline,datafile + character(len=LIS_CONST_PATH_LEN) :: wrtline,datafile character*16 :: datetime ! MM/DD/YYYY hh:mm character*3 :: gnum integer :: funit = 10 diff --git a/lis/interp/stninterp_module.F90 b/lis/interp/stninterp_module.F90 index d7809af9e..07544584e 100644 --- a/lis/interp/stninterp_module.F90 +++ b/lis/interp/stninterp_module.F90 @@ -51,11 +51,12 @@ module stninterp_module ! subroutine calcgrids(dirname,stnfile,stns,nnn,method,order,cols,rows,& llx,lly,urx,ury,incr,npts,locarr) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! implicit none ! ! argument variables - character*40, intent(IN) :: dirname,stnfile + character(len=*), intent(IN) :: dirname,stnfile integer, intent(INOUT) :: stns,nnn,method,order integer, intent(INOUT) :: cols,rows real*4, intent(INOUT) :: llx,lly,urx,ury,incr @@ -65,8 +66,8 @@ subroutine calcgrids(dirname,stnfile,stns,nnn,method,order,cols,rows,& ! local variables integer :: s logical :: lerr = .FALSE. - character*80 :: infile - character*80 :: outfile + character(len=LIS_CONST_PATH_LEN) :: infile + character(len=LIS_CONST_PATH_LEN) :: outfile integer :: funit = 10 real(4), allocatable :: stndata(:,:) integer(4), allocatable :: W1grid(:,:,:) ! station numbers for each grid cell diff --git a/lis/metforcing/Loobos/code/Loobos_forcingMod.F90 b/lis/metforcing/Loobos/code/Loobos_forcingMod.F90 index 7aa7054fb..150e36cd8 100755 --- a/lis/metforcing/Loobos/code/Loobos_forcingMod.F90 +++ b/lis/metforcing/Loobos/code/Loobos_forcingMod.F90 @@ -25,6 +25,8 @@ module Bondville_forcingMod ! !REVISION HISTORY: ! 05 Oct 2010: David Mocko, Updated for Bondville test case ! + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + implicit none PRIVATE !----------------------------------------------------------------------------- @@ -40,7 +42,7 @@ module Bondville_forcingMod type, public :: Bondville_type_dec real :: ts - character*80 :: Bondvillefile + character(len=LIS_CONST_PATH_LEN) :: Bondvillefile real :: undef real*8 :: starttime,Bondvilletime1,Bondvilletime2 integer :: findtime1,findtime2,nstns diff --git a/lis/metforcing/Loobos/code/read_Loobos.F90 b/lis/metforcing/Loobos/code/read_Loobos.F90 index c42847486..f0508d691 100755 --- a/lis/metforcing/Loobos/code/read_Loobos.F90 +++ b/lis/metforcing/Loobos/code/read_Loobos.F90 @@ -19,6 +19,7 @@ subroutine read_Bondville(n,ftn,findex,order,itime) ! !USES: use LIS_logMod, only : LIS_logunit,LIS_endrun + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc,LIS_domain use LIS_metforcingMod, only : LIS_forc use LIS_timeMgrMod, only : LIS_date2time,LIS_tick @@ -74,7 +75,7 @@ subroutine read_Bondville(n,ftn,findex,order,itime) integer :: bonyr,bonmon,bonday,bonhr,bonmin,bonsec real :: bontick logical :: file_exists - character*80 :: Bondville_filename + character(len=LIS_CONST_PATH_LEN) :: Bondville_filename character(len=500) :: line ! write(LIS_logunit,*) 'starting read_Bondville' diff --git a/lis/metforcing/cmap/get_cmap.F90 b/lis/metforcing/cmap/get_cmap.F90 index 23f3416b6..0f22aa7ae 100644 --- a/lis/metforcing/cmap/get_cmap.F90 +++ b/lis/metforcing/cmap/get_cmap.F90 @@ -358,13 +358,14 @@ end subroutine cmapfile ! !INTERFACE: subroutine cmapfile_old( filename, cmapdir, yr, mo, da, hr ) !EOP + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none !==== Local Variables======================= character(len=*) :: filename character(len=*) :: cmapdir - character(len=100) :: temp + character(len=LIS_CONST_PATH_LEN) :: temp integer :: yr, mo, da, hr integer :: i, c integer :: uyr, umo, uda, uhr, umn, uss, ts1 diff --git a/lis/metforcing/ecmwf/get_ecmwf.F90 b/lis/metforcing/ecmwf/get_ecmwf.F90 index 26051188e..47a9096f3 100644 --- a/lis/metforcing/ecmwf/get_ecmwf.F90 +++ b/lis/metforcing/ecmwf/get_ecmwf.F90 @@ -282,7 +282,7 @@ subroutine create_ecmwf_filename(dir,avgfilename1, avgfilename2, instfilename,& real :: igmt integer :: iyr,imo,ida,ihr,imn,iss,ts,idoy character(len=LIS_CONST_PATH_LEN) :: filename - character(200) :: file1, file2 + character(len=LIS_CONST_PATH_LEN) :: file1, file2 !instantaneous files diff --git a/lis/metforcing/galwem/get_galwem.F90 b/lis/metforcing/galwem/get_galwem.F90 index 0567ab58b..6dfc58653 100644 --- a/lis/metforcing/galwem/get_galwem.F90 +++ b/lis/metforcing/galwem/get_galwem.F90 @@ -47,7 +47,6 @@ subroutine get_galwem(n, findex) !EOP integer :: order,ferror - character(len=LIS_CONST_PATH_LEN) :: fname integer :: yr1, mo1, da1, hr1, mn1, ss1, doy1 integer :: yr2, mo2, da2, hr2, mn2, ss2, doy2 real*8 :: time1, time2 @@ -65,7 +64,7 @@ subroutine get_galwem(n, findex) integer :: first_fcsthr, next_fcsthr integer :: ierr logical :: lrc - character(255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) ! GALWEM cycles every 6 hours; each cycle provide up to 168 hours (7 days) forecast for GALWEM-17km; ! each cycle provide up to 240 hours (10 days) forecast for GALWEM-25deg; diff --git a/lis/metforcing/galwem/read_galwem.F90 b/lis/metforcing/galwem/read_galwem.F90 index 2e924b434..4ffa4cbfa 100644 --- a/lis/metforcing/galwem/read_galwem.F90 +++ b/lis/metforcing/galwem/read_galwem.F90 @@ -20,7 +20,8 @@ ! !INTERFACE: subroutine read_galwem(n, findex, order, gribfile, rc) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod use galwem_forcingMod, only : galwem_struc @@ -45,7 +46,6 @@ subroutine read_galwem(n, findex, order, gribfile, rc) character*100 :: gtype integer :: file_julhr integer :: yr1, mo1, da1, hr1 - character*255 :: message ( 20 ) integer :: iginfo ( 40 ) real :: gridres_dlat, gridres_dlon integer :: ifguess, jfguess @@ -220,7 +220,8 @@ subroutine fldbld_read_galwem(n, findex, order, gribfile, ifguess, jfguess,& tair, qair, swdown, lwdown, & uwind, vwind, ps, prectot, rc) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, LIS_verify @@ -252,7 +253,7 @@ subroutine fldbld_read_galwem(n, findex, order, gribfile, ifguess, jfguess,& ! !EOP character*9 :: cstat - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) character(len=7) :: grib_msg character(len=7) :: check_galwem_message integer :: count_tair, count_qair diff --git a/lis/metforcing/galwem_ge/read_galwemge.F90 b/lis/metforcing/galwem_ge/read_galwemge.F90 index ce43a1f21..360ab6204 100644 --- a/lis/metforcing/galwem_ge/read_galwemge.F90 +++ b/lis/metforcing/galwem_ge/read_galwemge.F90 @@ -20,6 +20,7 @@ subroutine read_galwemge(n, m, findex, order, gribfile, rc) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod use galwemge_forcingMod, only : galwemge_struc @@ -69,7 +70,6 @@ subroutine read_galwemge(n, m, findex, order, gribfile, rc) character*100 :: gtype integer :: file_julhr integer :: yr1, mo1, da1, hr1 - character*255 :: message ( 20 ) integer :: iginfo ( 40 ) real :: gridres_dlat, gridres_dlon integer :: ifguess, jfguess @@ -250,7 +250,8 @@ subroutine fldbld_read_galwemge(n, findex, order, gribfile, ifguess, jfguess, tair, qair, swdown, lwdown, & uwind, vwind, ps, prectot, rc) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, LIS_verify @@ -282,7 +283,7 @@ subroutine fldbld_read_galwemge(n, findex, order, gribfile, ifguess, jfguess, ! !EOP character*9 :: cstat - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) character(len=7) :: grib_msg character(len=7) :: check_galwemge_message integer :: count_tair, count_qair diff --git a/lis/metforcing/gdas/create_gdasfilename.F90 b/lis/metforcing/gdas/create_gdasfilename.F90 index f07ab5598..c7b490338 100644 --- a/lis/metforcing/gdas/create_gdasfilename.F90 +++ b/lis/metforcing/gdas/create_gdasfilename.F90 @@ -126,7 +126,6 @@ subroutine create_gdasfilename(option, name00, name03, name06, & logical :: is_analysis_hr character(len=2) :: analysis_hour_inst, analysis_hour_avg, & fcstcode0, fcstcode1, fcstcode2 - character(len=80) :: fbase character(len=8) :: fdir character(len=10) :: ftime character(len=21) :: fsubs diff --git a/lis/metforcing/gefs/read_gefs_operational.F90 b/lis/metforcing/gefs/read_gefs_operational.F90 index 42c9e8fd2..284c94c60 100644 --- a/lis/metforcing/gefs/read_gefs_operational.F90 +++ b/lis/metforcing/gefs/read_gefs_operational.F90 @@ -33,7 +33,7 @@ subroutine read_gefs_operational(n, m, findex, order, filename, ferror) integer, intent(in) :: n integer, intent(in) :: m integer, intent(in) :: order - character*140, intent(in) :: filename + character(len=*), intent(in) :: filename integer, intent(out) :: ferror ! ! !DESCRIPTION: diff --git a/lis/metforcing/mogreps_g/read_mogrepsg.F90 b/lis/metforcing/mogreps_g/read_mogrepsg.F90 index d32709d3b..00c5a1e41 100644 --- a/lis/metforcing/mogreps_g/read_mogrepsg.F90 +++ b/lis/metforcing/mogreps_g/read_mogrepsg.F90 @@ -213,7 +213,8 @@ end subroutine read_mogrepsg subroutine fldbld_read_mogrepsg(n, findex, gribfile, ifguess, jfguess, & tair, qair, swdown, lwdown, uwind, vwind, ps, prectot, rc) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, LIS_verify @@ -245,7 +246,7 @@ subroutine fldbld_read_mogrepsg(n, findex, gribfile, ifguess, jfguess, & ! !EOP character*9 :: cstat - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) character(len=7) :: grib_msg character(len=7) :: check_mogrepsg_message integer :: count_tair, count_qair diff --git a/lis/metforcing/princeton/princeton_forcingMod.F90 b/lis/metforcing/princeton/princeton_forcingMod.F90 index 817b61d48..6268ab7f1 100644 --- a/lis/metforcing/princeton/princeton_forcingMod.F90 +++ b/lis/metforcing/princeton/princeton_forcingMod.F90 @@ -79,7 +79,7 @@ module princeton_forcingMod real :: ts integer :: ncold, nrold character(len=LIS_CONST_PATH_LEN) :: princetondir - character*100 :: elevfile + character(len=LIS_CONST_PATH_LEN) :: elevfile character*100 :: version integer :: mi real*8 :: princetontime1,princetontime2 diff --git a/lis/metforcing/usaf/AGRMET_cdfs2_est.F90 b/lis/metforcing/usaf/AGRMET_cdfs2_est.F90 index d8f82d477..07347924c 100644 --- a/lis/metforcing/usaf/AGRMET_cdfs2_est.F90 +++ b/lis/metforcing/usaf/AGRMET_cdfs2_est.F90 @@ -63,6 +63,7 @@ subroutine AGRMET_cdfs2_est( n,k, cliprc, clippd,& ! !USES: use AGRMET_forcingMod, only : agrmet_struc use LIS_LMLCMod, only : LIS_LMLC + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_julhr_date use LIS_logMod, only : LIS_alert, LIS_abort, LIS_logunit, LIS_endrun @@ -203,8 +204,8 @@ subroutine AGRMET_cdfs2_est( n,k, cliprc, clippd,& ! \end{description} !EOP character*10 :: date10 - character*120 :: ifil - character*255 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: ifil + character(len=LIS_CONST_PATH_LEN) :: message(20) integer, allocatable :: times ( :, : , : ) integer*1, allocatable :: totalc ( :, : , : ) real :: cldtim(LIS_rc%lnc(n), LIS_rc%lnr(n)) diff --git a/lis/metforcing/usaf/AGRMET_cmorph.F90 b/lis/metforcing/usaf/AGRMET_cmorph.F90 index 1c0b5c9eb..d7fe55470 100644 --- a/lis/metforcing/usaf/AGRMET_cmorph.F90 +++ b/lis/metforcing/usaf/AGRMET_cmorph.F90 @@ -16,7 +16,8 @@ ! ! !INTERFACE: subroutine AGRMET_cmorph (n, name_cmor, cmorphdata, quad9r ) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain use LIS_logMod, only : LIS_logunit, LIS_getNextUnitNumber, & LIS_releaseUnitNumber @@ -58,7 +59,7 @@ subroutine AGRMET_cmorph (n, name_cmor, cmorphdata, quad9r ) real testout1(xd,yd) ! Reconfigured original precip array real :: testout(xd,yd) real, allocatable :: precip_regrid(:,:) ! Interpolated precip array - character(len=120) :: fname, name_cmor ! Filename variables + character(len=LIS_CONST_PATH_LEN) :: fname, name_cmor ! Filename variables integer :: ftn !=== End Variable Definition ======================= diff --git a/lis/metforcing/usaf/AGRMET_fillgaps.F90 b/lis/metforcing/usaf/AGRMET_fillgaps.F90 index 445149612..b66592494 100644 --- a/lis/metforcing/usaf/AGRMET_fillgaps.F90 +++ b/lis/metforcing/usaf/AGRMET_fillgaps.F90 @@ -14,6 +14,7 @@ ! !INTERFACE: subroutine AGRMET_fillgaps(n,ip,varfield) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain use LIS_logMod, only : LIS_logunit, LIS_endrun, LIS_abort use AGRMET_forcingMod, only : agrmet_struc @@ -43,7 +44,7 @@ subroutine AGRMET_fillgaps(n,ip,varfield) logical :: foundPt integer :: i,j,str,enr,stc,enc,kk integer :: try - character*255 :: message (20) + character(len=LIS_CONST_PATH_LEN) :: message(20) try = 0 diff --git a/lis/metforcing/usaf/AGRMET_fldbld.F90 b/lis/metforcing/usaf/AGRMET_fldbld.F90 index 9829e97cb..3f2bc4df8 100644 --- a/lis/metforcing/usaf/AGRMET_fldbld.F90 +++ b/lis/metforcing/usaf/AGRMET_fldbld.F90 @@ -23,6 +23,7 @@ subroutine AGRMET_fldbld(n,order,julhr) ! !USES: use AGRMET_forcingMod, only : agrmet_struc + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_endrun, LIS_abort,& LIS_alert @@ -64,7 +65,7 @@ subroutine AGRMET_fldbld(n,order,julhr) !EOP integer :: rc - character(len=255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) character(len=10) :: yyyymmddhh integer :: ierr diff --git a/lis/metforcing/usaf/AGRMET_fldbld_galwem.F90 b/lis/metforcing/usaf/AGRMET_fldbld_galwem.F90 index a25bb6b41..291f20bd1 100644 --- a/lis/metforcing/usaf/AGRMET_fldbld_galwem.F90 +++ b/lis/metforcing/usaf/AGRMET_fldbld_galwem.F90 @@ -24,7 +24,8 @@ ! 21 Feb 2020 Added support for 10-km GALWEM.............Eric Kemp/GSFC ! !INTERFACE: subroutine AGRMET_fldbld_galwem(n,order,julhr,rc) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_verify use LIS_timeMgrMod, only : LIS_julhr_date @@ -49,9 +50,8 @@ subroutine AGRMET_fldbld_galwem(n,order,julhr,rc) ! !EOP integer :: ftn, igrib - character*120 :: gribfile + character(len=LIS_CONST_PATH_LEN) :: gribfile integer :: yr1, mo1, da1, hr1 - character*255 :: message ( 20 ) integer :: iginfo ( 40 ) real :: gridres_dlat, gridres_dlon integer :: ifguess, jfguess @@ -358,7 +358,6 @@ subroutine AGRMET_getGALWEMfilename(filename,rootdir,dir,use_timestamp, & character(3) :: fchr character(len=54) :: fname1 - character(len=20) :: fname2 write (UNIT=fhr, FMT='(i2.2)') hr write (UNIT=fchr, FMT='(i3.3)') fc_hr @@ -414,7 +413,8 @@ subroutine AGRMET_fldbld_read_galwem(n, fg_filename, ifguess, jfguess, & agr_tmp_sfc, agr_hgt_sfc, agr_rh_sfc, & agr_wspd_sfc, & agr_pres_sfc,rc) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, LIS_verify @@ -448,7 +448,7 @@ subroutine AGRMET_fldbld_read_galwem(n, fg_filename, ifguess, jfguess, & ! !EOP character*9 :: cstat - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) character(len=4) :: grib_msg character(len=4) :: AGRMET_check_galwem_message integer :: count_hgt diff --git a/lis/metforcing/usaf/AGRMET_fldbld_gfs.F90 b/lis/metforcing/usaf/AGRMET_fldbld_gfs.F90 index 87d5c665b..0a22a2c64 100644 --- a/lis/metforcing/usaf/AGRMET_fldbld_gfs.F90 +++ b/lis/metforcing/usaf/AGRMET_fldbld_gfs.F90 @@ -40,7 +40,8 @@ ! ................................Eric Kemp/GSFC ! !INTERFACE: subroutine AGRMET_fldbld_gfs(n,order,julhr,rc) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_verify use LIS_timeMgrMod, only : LIS_julhr_date @@ -132,13 +133,11 @@ subroutine AGRMET_fldbld_gfs(n,order,julhr,rc) ! \end{description} !EOP integer :: ftn, igrib - !character*120 :: avnfile - character*255 :: avnfile ! EMK + character(len=LIS_CONST_PATH_LEN) :: avnfile ! EMK integer :: yr1, mo1, da1, hr1 integer :: nunit integer :: ksec2 ( 10 ) - character*255 :: message ( 20 ) integer :: iginfo ( 40 ) real :: ginfo ( 40 ) real :: gridres @@ -446,7 +445,8 @@ subroutine getAVNfilename(filename, rootdir, dir, & use_timestamp, gfs_timestamp, gfs_filename_version, & yr, mo, da, hr, fc_hr) - use LIS_logMod, only: LIS_logunit, LIS_endrun + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + use LIS_logMod, only: LIS_logunit, LIS_endrun implicit none ! !ARGUMENTS: @@ -490,7 +490,7 @@ subroutine getAVNfilename(filename, rootdir, dir, & character(10) :: ftime1 character( 2) :: fhr character( 4) :: fchr - character(255) :: basename + character(len=LIS_CONST_PATH_LEN) :: basename character(8) :: cyyyymmdd character(3) :: chhh @@ -607,7 +607,8 @@ subroutine AGRMET_fldbld_read_gfs( fg_filename, ifguess, jfguess,& wndwgt, minwnd, fg_hgt, fg_rh,& fg_tmp, fg_hgt_sfc, fg_rh_sfc, fg_tmp_sfc, fg_wspd, fg_pres, & kprs, prslvls, alert_number, rc ) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, LIS_verify @@ -741,7 +742,6 @@ subroutine AGRMET_fldbld_read_gfs( fg_filename, ifguess, jfguess,& ! \end{description} !EOP character*9 :: cstat - character*255 :: message ( 20 ) integer :: count_dpd integer :: count_hgt integer :: count_rh @@ -1780,6 +1780,7 @@ end function check_gfs_grib2_message integer function set_plevel(editionNumber,pds9,level) ! Imports + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc use LIS_logmod, only: LIS_logunit,LIS_abort, & LIS_alert,LIS_endrun @@ -1796,7 +1797,7 @@ integer function set_plevel(editionNumber,pds9,level) ! Locals integer :: plevel integer :: ierr - character(len=255) :: messages(20) + character(len=LIS_CONST_PATH_LEN) :: messages(20) if (editionNumber == 1) then plevel = pds9 diff --git a/lis/metforcing/usaf/AGRMET_fldbld_precip_galwem.F90 b/lis/metforcing/usaf/AGRMET_fldbld_precip_galwem.F90 index 308a343d8..108d492cf 100644 --- a/lis/metforcing/usaf/AGRMET_fldbld_precip_galwem.F90 +++ b/lis/metforcing/usaf/AGRMET_fldbld_precip_galwem.F90 @@ -20,6 +20,7 @@ ! !INTERFACE: subroutine AGRMET_fldbld_precip_galwem(n,julhr,fc_hr,fg_data) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, & LIS_verify, LIS_endrun @@ -120,10 +121,10 @@ subroutine AGRMET_fldbld_precip_galwem(n,julhr,fc_hr,fg_data) ! \end{description} !EOP integer :: ftn, igrib - character*120 :: avnfile, avnfile2 + character(len=LIS_CONST_PATH_LEN) :: avnfile, avnfile2 integer :: yr1, mo1, da1, hr1 integer :: julhr - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) integer :: iginfo ( 2 ) real :: gridres integer :: alert_number @@ -445,7 +446,8 @@ end subroutine AGRMET_fldbld_precip_galwem ! !INTERFACE: subroutine AGRMET_fldbld_read_precip_galwem(fg_filename, ifguess, jfguess,& fg_prec, alert_number ) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, LIS_verify @@ -508,7 +510,7 @@ subroutine AGRMET_fldbld_read_precip_galwem(fg_filename, ifguess, jfguess,& ! !EOP character*9 :: cstat - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) integer :: count_prec integer :: i integer :: ierr diff --git a/lis/metforcing/usaf/AGRMET_fldbld_precip_gfs.F90 b/lis/metforcing/usaf/AGRMET_fldbld_precip_gfs.F90 index 4653d43b6..bff799f62 100644 --- a/lis/metforcing/usaf/AGRMET_fldbld_precip_gfs.F90 +++ b/lis/metforcing/usaf/AGRMET_fldbld_precip_gfs.F90 @@ -24,6 +24,7 @@ ! !INTERFACE: subroutine AGRMET_fldbld_precip_gfs(n,findex,julhr,fc_hr,gfsdata) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, & LIS_verify, LIS_endrun @@ -131,13 +132,12 @@ subroutine AGRMET_fldbld_precip_gfs(n,findex,julhr,fc_hr,gfsdata) ! \end{description} !EOP integer :: ftn, igrib - !character*120 :: avnfile, avnfile2 - character*255 :: avnfile, avnfile2 + character(len=LIS_CONST_PATH_LEN) :: avnfile, avnfile2 integer :: yr1, mo1, da1, hr1 integer :: julhr integer :: nunit, nunit2 integer :: ksec2 ( 10 ) - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) integer :: iginfo ( 40 ) real :: ginfo ( 40 ) real :: gridres @@ -517,7 +517,8 @@ end subroutine AGRMET_fldbld_precip_gfs subroutine AGRMET_fldbld_read_precip_gfs( fg_filename, ifguess, jfguess,& fg_prec,& alert_number ) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, LIS_verify @@ -587,7 +588,7 @@ subroutine AGRMET_fldbld_read_precip_gfs( fg_filename, ifguess, jfguess,& ! !EOP character*9 :: cstat - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) integer :: count_prec integer :: file_age integer :: i diff --git a/lis/metforcing/usaf/AGRMET_forcingMod.F90 b/lis/metforcing/usaf/AGRMET_forcingMod.F90 index 1fd535629..c012ceed2 100644 --- a/lis/metforcing/usaf/AGRMET_forcingMod.F90 +++ b/lis/metforcing/usaf/AGRMET_forcingMod.F90 @@ -331,25 +331,25 @@ module AGRMET_forcingMod real*8 :: pcpclimoAlarmTime real*8 :: albAlarmTime real*8 :: gfracAlarmTime - character*100 :: agrmetdir - character*100 :: climodir - character*100 :: maskfile,maskfile2,maskfile8,maskfile16,maskfile64,maskfilell - character*100 :: terrainfile,terrainfile8,terrainfile16,terrainfile64,terrainfilll - character*100 :: sfcntmfile - character*100 :: sfcalcdir - character*100 :: mrgpcpdir - character*100 :: clouddir - character*100 :: ssmidir - character*100 :: geodir - character*100 :: gfsdir - character*100 :: galwemdir + character(len=LIS_CONST_PATH_LEN) :: agrmetdir + character(len=LIS_CONST_PATH_LEN) :: climodir + character(len=LIS_CONST_PATH_LEN) :: maskfile,maskfile2,maskfile8,maskfile16,maskfile64,maskfilell + character(len=LIS_CONST_PATH_LEN) :: terrainfile,terrainfile8,terrainfile16,terrainfile64,terrainfilll + character(len=LIS_CONST_PATH_LEN) :: sfcntmfile + character(len=LIS_CONST_PATH_LEN) :: sfcalcdir + character(len=LIS_CONST_PATH_LEN) :: mrgpcpdir + character(len=LIS_CONST_PATH_LEN) :: clouddir + character(len=LIS_CONST_PATH_LEN) :: ssmidir + character(len=LIS_CONST_PATH_LEN) :: geodir + character(len=LIS_CONST_PATH_LEN) :: gfsdir + character(len=LIS_CONST_PATH_LEN) :: galwemdir ! TEMP -- KRA - character*180 :: galwemraddir + character(len=LIS_CONST_PATH_LEN) :: galwemraddir ! TEMP -- KRA - character*100 :: cdmsdir - character*100 :: cmordir - character*100 :: analysisdir - character*100 :: retroFileRoot + character(len=LIS_CONST_PATH_LEN) :: cdmsdir + character(len=LIS_CONST_PATH_LEN) :: cmordir + character(len=LIS_CONST_PATH_LEN) :: analysisdir + character(len=LIS_CONST_PATH_LEN) :: retroFileRoot character*20 :: first_guess_source integer :: use_timestamp integer :: gfs_timestamp @@ -612,7 +612,7 @@ module AGRMET_forcingMod real, allocatable :: metdata2(:,:) ! EMK...IMERG settings - character*100 :: imerg_dir + character(len=LIS_CONST_PATH_LEN) :: imerg_dir character*10 :: imerg_product character*10 :: imerg_version integer*2 :: imerg_plp_thresh @@ -801,7 +801,8 @@ module AGRMET_forcingMod ! !INTERFACE: subroutine init_AGRMET(findex) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_timeMgrMod, only : LIS_update_timestep use LIS_logMod, only : LIS_logunit, LIS_endrun @@ -875,8 +876,8 @@ subroutine init_AGRMET(findex) integer :: kprs byte, allocatable :: buffer(:,:,:) character*9 :: cstat - character*100 :: file_name,file_nam - character*255 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: file_name,file_nam + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: rec_length integer :: istat integer :: istat1 diff --git a/lis/metforcing/usaf/AGRMET_geoest.F90 b/lis/metforcing/usaf/AGRMET_geoest.F90 index 0f30988f1..c976a1897 100644 --- a/lis/metforcing/usaf/AGRMET_geoest.F90 +++ b/lis/metforcing/usaf/AGRMET_geoest.F90 @@ -50,6 +50,7 @@ subroutine AGRMET_geoest( n, j3hr, land ,gest, grnk, quad9r, & !use 16th mask for now ! !USES: use agrmet_forcingMod, only : agrmet_struc + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_fileIOMod, only : LIS_putget use LIS_timeMgrMod, only : LIS_julhr_date @@ -144,8 +145,8 @@ subroutine AGRMET_geoest( n, j3hr, land ,gest, grnk, quad9r, & ! Michael Shaw - temp grnk and gest for flipping arrays real :: grnk_tmp(2,imax,jmax),grnk_temp(1,imax,jmax) real :: gest_tmp(2,imax,jmax),gest_temp(1,imax,jmax) - character*100 :: ifil - character*100 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: ifil + character(len=LIS_CONST_PATH_LEN) :: message(20) character*30 :: routine_name logical :: exists logical :: gdgeornk diff --git a/lis/metforcing/usaf/AGRMET_getcli.F90 b/lis/metforcing/usaf/AGRMET_getcli.F90 index 69db2e4d0..6b4f4b7f5 100644 --- a/lis/metforcing/usaf/AGRMET_getcli.F90 +++ b/lis/metforcing/usaf/AGRMET_getcli.F90 @@ -29,6 +29,7 @@ ! !INTERFACE: subroutine AGRMET_getcli(n, filename,rtn,clidat) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_ews_halo_ind, LIS_ewe_halo_ind,& LIS_nss_halo_ind, LIS_nse_halo_ind, LIS_localPet use LIS_logMod, only : LIS_logunit, LIS_getNextUnitNumber, & @@ -37,7 +38,7 @@ subroutine AGRMET_getcli(n, filename,rtn,clidat) implicit none ! !ARGUMENTS: integer, intent(in) :: n - character*100 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename real, intent(out) :: clidat(LIS_rc%lnc(n),LIS_rc%lnr(n)) integer :: rtn ! diff --git a/lis/metforcing/usaf/AGRMET_getcmorph.F90 b/lis/metforcing/usaf/AGRMET_getcmorph.F90 index 6d113e9f3..c32087b23 100644 --- a/lis/metforcing/usaf/AGRMET_getcmorph.F90 +++ b/lis/metforcing/usaf/AGRMET_getcmorph.F90 @@ -24,6 +24,7 @@ ! !INTERFACE: subroutine AGRMET_getcmorph(n, cmorphdata, j3hr, quad9r) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_julhr_date use agrmet_forcingMod, only :agrmet_struc @@ -64,7 +65,7 @@ subroutine AGRMET_getcmorph(n, cmorphdata, j3hr, quad9r) real*8 :: ctime,ftime_cmor ! Current LDAS time and end boundary times for precip data sources real*8 :: datatime, gap, breaktime, fnametime ! Times used in HUFFMAN to determine data and filename boundaries (see below) real :: gmt1,gmt4 - character(len=120) :: name ! Filename variables for precip data sources + character(len=LIS_CONST_PATH_LEN) :: name ! Filename variables for precip data sources !=== End Variable Definition ======================= @@ -99,7 +100,7 @@ end subroutine AGRMET_getcmorph ! ! !INTERFACE: subroutine cmorfile_agrmet( name, agrmetdir, cmordir, use_timestamp, yr, mo, da, hr) - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none ! !ARGUMENTS: character(len=*) :: name @@ -131,7 +132,7 @@ subroutine cmorfile_agrmet( name, agrmetdir, cmordir, use_timestamp, yr, mo, da, ! !EOP - character(len=120) :: temp + character(len=LIS_CONST_PATH_LEN) :: temp integer :: i, c, d integer :: uyr, umo, uda, uhr, umn, uss, ts1 character*1 :: fdir(99), fbase(99), fdir2(8),ftime(10), ftimedir(10) diff --git a/lis/metforcing/usaf/AGRMET_getpcpobs.F90 b/lis/metforcing/usaf/AGRMET_getpcpobs.F90 index 7d93588a0..cae524da5 100644 --- a/lis/metforcing/usaf/AGRMET_getpcpobs.F90 +++ b/lis/metforcing/usaf/AGRMET_getpcpobs.F90 @@ -40,6 +40,7 @@ subroutine AGRMET_getpcpobs(n, j6hr, month, prcpwe, & use_twelve, p6, p12, alert_number, precip6, precip12,pcp_src) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_tick, LIS_julhr_date use LIS_logMod, only : LIS_logunit, LIS_alert @@ -154,8 +155,8 @@ subroutine AGRMET_getpcpobs(n, j6hr, month, prcpwe, & integer :: cdms_count integer :: hemi integer :: i - character*100 :: filename - real, parameter :: quad9r = -9999.0 + character(len=LIS_CONST_PATH_LEN) :: filename + real, parameter :: quad9r = -9999.0 integer :: j1hr integer :: j3hr integer :: startjul @@ -179,7 +180,7 @@ subroutine AGRMET_getpcpobs(n, j6hr, month, prcpwe, & integer :: ierr1, ierr2, ierr3 integer :: k logical :: cdms_flag - character(255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) type rain_obs sequence diff --git a/lis/metforcing/usaf/AGRMET_getsfc.F90 b/lis/metforcing/usaf/AGRMET_getsfc.F90 index 1178de7df..c11143f55 100644 --- a/lis/metforcing/usaf/AGRMET_getsfc.F90 +++ b/lis/metforcing/usaf/AGRMET_getsfc.F90 @@ -51,6 +51,7 @@ subroutine AGRMET_getsfc( n, julhr, t2mObs, rh2mObs, spd10mObs, & ! !USES: use ESMF ! EMK Patch for DTG check use AGRMET_forcingMod, only : agrmet_struc + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_domain, LIS_masterproc use LIS_timeMgrMod, only : LIS_julhr_date use LIS_logMod, only : LIS_logunit, LIS_alert, & @@ -203,7 +204,7 @@ subroutine AGRMET_getsfc( n, julhr, t2mObs, rh2mObs, spd10mObs, & ! \end{description} !EOP - character*100 :: sfcobsfile + character(len=LIS_CONST_PATH_LEN) :: sfcobsfile integer :: hemi integer, allocatable :: idpt ( : ) integer :: ierr1 @@ -224,7 +225,7 @@ subroutine AGRMET_getsfc( n, julhr, t2mObs, rh2mObs, spd10mObs, & character*6 :: cjulhr character*10 :: date10 ! EMK replace cjulhr in log character*14, allocatable :: dtg ( : ) - character*100 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) !character*8, allocatable :: netyp ( : ) character*9, allocatable :: netyp ( : ) character*8 :: norsou ( 2 ) diff --git a/lis/metforcing/usaf/AGRMET_julhr_date10.F90 b/lis/metforcing/usaf/AGRMET_julhr_date10.F90 index 036e8729e..a750c629b 100644 --- a/lis/metforcing/usaf/AGRMET_julhr_date10.F90 +++ b/lis/metforcing/usaf/AGRMET_julhr_date10.F90 @@ -22,7 +22,8 @@ ! ! !INTERFACE: subroutine AGRMET_julhr_date10( julhr, date10) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_timeMgrMod, only : LIS_tmjul4 use LIS_logMod, only : LIS_abort, LIS_endrun @@ -62,7 +63,7 @@ subroutine AGRMET_julhr_date10( julhr, date10) ! convert julian hour to hour,day,month and year ! \end{description} !EOP - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) integer :: dd integer :: hh integer :: j diff --git a/lis/metforcing/usaf/AGRMET_makest.F90 b/lis/metforcing/usaf/AGRMET_makest.F90 index e1608c827..33d81608d 100644 --- a/lis/metforcing/usaf/AGRMET_makest.F90 +++ b/lis/metforcing/usaf/AGRMET_makest.F90 @@ -136,8 +136,6 @@ subroutine AGRMET_makest(n,findex,j6hr,estpcp,source,cdfs2est,prcpwe, use_twelve logical, intent(out) :: cmorphpixel(LIS_rc%lnc(n), LIS_rc%lnr(n),4) ! declarations for readmask in geoprecip latlon character*9 :: cstat - character*100 :: file_name,file_nam - character*255 :: message(20) integer :: rec_length integer :: istat integer :: istat1 diff --git a/lis/metforcing/usaf/AGRMET_phsrel12.F90 b/lis/metforcing/usaf/AGRMET_phsrel12.F90 index c7eff096f..d76cd36c5 100644 --- a/lis/metforcing/usaf/AGRMET_phsrel12.F90 +++ b/lis/metforcing/usaf/AGRMET_phsrel12.F90 @@ -93,8 +93,6 @@ subroutine AGRMET_phsrel12( n, p12, j6hr, & integer :: k real :: e(LIS_rc%lnc(n),LIS_rc%lnr(n),4) real :: p3(LIS_rc%lnc(n),LIS_rc%lnr(n),4) - character*100 :: ofil - character*100 :: ifil character*10 :: date10_03 logical :: exists integer :: j3hr diff --git a/lis/metforcing/usaf/AGRMET_phsrel6.F90 b/lis/metforcing/usaf/AGRMET_phsrel6.F90 index 9901d7d24..bf5329a2a 100644 --- a/lis/metforcing/usaf/AGRMET_phsrel6.F90 +++ b/lis/metforcing/usaf/AGRMET_phsrel6.F90 @@ -86,7 +86,6 @@ subroutine AGRMET_phsrel6 ( n, estpcp, j6hr, p6,& ! \item[AGRMET\_parse6] (\ref{AGRMET_parse6}) \newline ! \end{description} !EOP - character*100 :: ofil character*10 :: date10_03 integer :: yr1,mo1,da1,hr1 character*4 :: fyr diff --git a/lis/metforcing/usaf/AGRMET_processobs.F90 b/lis/metforcing/usaf/AGRMET_processobs.F90 index f7ce78318..aeaa9b6c8 100644 --- a/lis/metforcing/usaf/AGRMET_processobs.F90 +++ b/lis/metforcing/usaf/AGRMET_processobs.F90 @@ -44,6 +44,7 @@ subroutine AGRMET_processobs(n, obs, isize, stncnt, hemi, julhr, & ! !USES: use AGRMET_forcingMod, only: agrmet_struc + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_masterproc, LIS_domain use LIS_logMod, only : LIS_alert, LIS_logunit use LIS_mpiMod @@ -216,11 +217,11 @@ subroutine AGRMET_processobs(n, obs, isize, stncnt, hemi, julhr, & character*10 :: date10 character*10 :: date10_min6 character*10 :: date10_min12 - character*120 :: filename - character*120 :: filename_min6 - character*120 :: filename_min12 + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: filename_min6 + character(len=LIS_CONST_PATH_LEN) :: filename_min12 character*5 :: iofunc - character*100 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: count integer :: count6 integer :: count6obs diff --git a/lis/metforcing/usaf/AGRMET_read_pcpclimodata.F90 b/lis/metforcing/usaf/AGRMET_read_pcpclimodata.F90 index c9cb1107d..53469b335 100644 --- a/lis/metforcing/usaf/AGRMET_read_pcpclimodata.F90 +++ b/lis/metforcing/usaf/AGRMET_read_pcpclimodata.F90 @@ -29,6 +29,7 @@ ! !INTERFACE: subroutine AGRMET_read_pcpclimodata(n) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_LMLCMod, only : LIS_LMLC use LIS_timeMgrMod, only : LIS_isAlarmRinging @@ -95,7 +96,7 @@ subroutine AGRMET_read_pcpclimodata(n) !EOP logical :: midmonth logical :: pcpclimoAlarmCheck - character*100 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename integer :: days(12) integer :: i,j integer :: newday diff --git a/lis/metforcing/usaf/AGRMET_read_sfcalccntm.F90 b/lis/metforcing/usaf/AGRMET_read_sfcalccntm.F90 index b82c004e2..9c7f47fb4 100644 --- a/lis/metforcing/usaf/AGRMET_read_sfcalccntm.F90 +++ b/lis/metforcing/usaf/AGRMET_read_sfcalccntm.F90 @@ -18,7 +18,8 @@ ! ! !INTERFACE: subroutine AGRMET_read_sfcalccntm(n) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_ews_halo_ind, LIS_ewe_halo_ind,& LIS_nss_halo_ind, LIS_nse_halo_ind, LIS_localPet use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_endrun, & @@ -49,7 +50,7 @@ subroutine AGRMET_read_sfcalccntm(n) !EOP logical :: exists - character*255 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: ftn real :: data_in(LIS_rc%gnc(n), LIS_rc%gnr(n)) integer :: istat diff --git a/lis/metforcing/usaf/AGRMET_readmask.F90 b/lis/metforcing/usaf/AGRMET_readmask.F90 index 86e528550..f1179d9f1 100644 --- a/lis/metforcing/usaf/AGRMET_readmask.F90 +++ b/lis/metforcing/usaf/AGRMET_readmask.F90 @@ -18,7 +18,8 @@ ! ! !INTERFACE: subroutine AGRMET_readmask(n) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_fileIOMod, only : LIS_putget use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_endrun @@ -52,8 +53,8 @@ subroutine AGRMET_readmask(n) !EOP integer :: hemi, start, end logical :: exists - character*100 :: name - character*255 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: name + character(len=LIS_CONST_PATH_LEN) :: message(20) character*30 :: routine_name data routine_name / 'AGRMET_readmask' / @@ -112,12 +113,12 @@ end subroutine AGRMET_readmask ! ! !INTERFACE: subroutine get_agrmetmask_filename(name, dir,hemi) - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none ! !ARGUMENTS: integer, intent(in) :: hemi - character*100 :: name - character*100 :: dir + character(len=LIS_CONST_PATH_LEN) :: name + character(len=LIS_CONST_PATH_LEN) :: dir ! ! !DESCRIPTION: ! This routines generates the name of the AGRMET landmask file, by @@ -136,7 +137,7 @@ subroutine get_agrmetmask_filename(name, dir,hemi) ! created filename ! \end{description} !EOP - character*100 :: temp + character(len=LIS_CONST_PATH_LEN) :: temp character*1 :: fbase(100),fhemi(3) integer :: c,i write(UNIT=temp, fmt='(a100)') dir diff --git a/lis/metforcing/usaf/AGRMET_readpcpcntm.F90 b/lis/metforcing/usaf/AGRMET_readpcpcntm.F90 index 4806bc956..3ac870c20 100644 --- a/lis/metforcing/usaf/AGRMET_readpcpcntm.F90 +++ b/lis/metforcing/usaf/AGRMET_readpcpcntm.F90 @@ -21,6 +21,7 @@ ! !INTERFACE: subroutine AGRMET_readpcpcntm(n) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_ews_halo_ind, LIS_ewe_halo_ind,& LIS_nss_halo_ind, LIS_nse_halo_ind, LIS_localPet use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_endrun, & @@ -51,8 +52,8 @@ subroutine AGRMET_readpcpcntm(n) !EOP logical :: exists - character*100 :: name - character*255 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: name + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: ftn real :: data_in(LIS_rc%gnc(n), LIS_rc%gnr(n)) integer :: istat diff --git a/lis/metforcing/usaf/AGRMET_readterrain.F90 b/lis/metforcing/usaf/AGRMET_readterrain.F90 index 3c682caad..38d594df4 100644 --- a/lis/metforcing/usaf/AGRMET_readterrain.F90 +++ b/lis/metforcing/usaf/AGRMET_readterrain.F90 @@ -18,6 +18,7 @@ ! !INTERFACE: subroutine AGRMET_readterrain(n) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_fileIOMod, only : LIS_putget use LIS_logMod, only : LIS_logunit,LIS_abort, LIS_endrun @@ -51,8 +52,8 @@ subroutine AGRMET_readterrain(n) !EOP integer :: hemi logical :: exists - character*100 :: name - character*255 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: name + character(len=LIS_CONST_PATH_LEN) :: message(20) character*30 :: routine_name data routine_name / 'AGRMET_readterrain' / @@ -94,12 +95,12 @@ end subroutine AGRMET_readterrain ! ! !INTERFACE: subroutine get_agrmetterrain_filename(name, dir,hemi) - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none ! !ARGUMENTS: integer, intent(in) :: hemi - character*100 :: name - character*100 :: dir + character(len=LIS_CONST_PATH_LEN) :: name + character(len=LIS_CONST_PATH_LEN) :: dir ! ! !DESCRIPTION: ! This routines generates the name of the AGRMET terrain file, by @@ -118,7 +119,7 @@ subroutine get_agrmetterrain_filename(name, dir,hemi) ! created filename ! \end{description} !EOP - character*100 :: temp + character(len=LIS_CONST_PATH_LEN) :: temp character*1 :: fbase(100),fhemi(3) integer :: c,i write(UNIT=temp, fmt='(a100)') dir diff --git a/lis/metforcing/usaf/AGRMET_sfcalc.F90 b/lis/metforcing/usaf/AGRMET_sfcalc.F90 index 0f8f8780b..ed8506e60 100644 --- a/lis/metforcing/usaf/AGRMET_sfcalc.F90 +++ b/lis/metforcing/usaf/AGRMET_sfcalc.F90 @@ -18,6 +18,7 @@ ! !INTERFACE: subroutine AGRMET_sfcalc(n) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc, LIS_localPet, & LIS_domain, LIS_gdeltas, LIS_goffsets, LIS_npes, & LIS_ews_halo_ind, LIS_ewe_halo_ind, & @@ -169,8 +170,8 @@ subroutine AGRMET_sfcalc(n) #endif ! type(OBA) :: t2mOBA, rh2mOBA, spd10mOBA - character(len=50) :: t2mPathOBA,rh2mPathOBA,spd10mPathOBA - character(len=120) :: obaFilename + character(len=LIS_CONST_PATH_LEN) :: t2mPathOBA,rh2mPathOBA,spd10mPathOBA + character(len=LIS_CONST_PATH_LEN) :: obaFilename character(len=10) :: yyyymmddhh integer :: ierr integer :: r,c, L diff --git a/lis/metforcing/usaf/AGRMET_smiest.F90 b/lis/metforcing/usaf/AGRMET_smiest.F90 index 819ee15e0..a10b3e828 100644 --- a/lis/metforcing/usaf/AGRMET_smiest.F90 +++ b/lis/metforcing/usaf/AGRMET_smiest.F90 @@ -35,6 +35,7 @@ subroutine AGRMET_smiest( n,j3hr, quad9r, ra, razero,alert_number,imax,jmax) ! in previous versions ! !USES: use AGRMET_forcingMod, only : agrmet_struc + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_fileIOMod, only : LIS_putget use LIS_timeMgrMod, only : LIS_julhr_date @@ -91,8 +92,8 @@ subroutine AGRMET_smiest( n,j3hr, quad9r, ra, razero,alert_number,imax,jmax) ! \end{description} !EOP real :: ra_tmp(2,imax,jmax) - character*100 :: ifil - character*100 :: message(20) + character(len=LIS_CONST_PATH_LEN) :: ifil + character(len=LIS_CONST_PATH_LEN) :: message(20) character*30 :: routine_name logical :: exists logical :: use_zeros diff --git a/lis/metforcing/usaf/AGRMET_storeobs.F90 b/lis/metforcing/usaf/AGRMET_storeobs.F90 index b20c23bc6..afcdcbfd2 100644 --- a/lis/metforcing/usaf/AGRMET_storeobs.F90 +++ b/lis/metforcing/usaf/AGRMET_storeobs.F90 @@ -31,6 +31,7 @@ subroutine AGRMET_storeobs(n, nsize, nsize3, isize, obs, obs3, ilat, ilon, & duration, julhr, stncnt, alert_number, filename) ! Imports + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc ! EMK 20240523 use LIS_logMod, only: LIS_logunit, LIS_alert ! EMK 20240523 use USAF_bratsethMod, only: USAF_is_gauge ! EMK 20240523 @@ -178,7 +179,7 @@ subroutine AGRMET_storeobs(n, nsize, nsize3, isize, obs, obs3, ilat, ilon, & type(rain_obs), intent(in) :: obs3(isize) ! EMK 20240523 - character(255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer, parameter :: MAX_NEW_NETWORKS = 20 character(10), save :: new_networks(MAX_NEW_NETWORKS) = & (/"NULL ", & diff --git a/lis/metforcing/usaf/AGRMET_storeobs_offhour.F90 b/lis/metforcing/usaf/AGRMET_storeobs_offhour.F90 index 096a45724..892710c6c 100644 --- a/lis/metforcing/usaf/AGRMET_storeobs_offhour.F90 +++ b/lis/metforcing/usaf/AGRMET_storeobs_offhour.F90 @@ -25,6 +25,7 @@ subroutine AGRMET_storeobs_offhour(n, nsize, isize, obs, ilat, ilon, & duration, stncnt, alert_number, filename) ! Imports + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc ! EMK 20240523 use LIS_logMod, only: LIS_logunit, LIS_alert ! EMK 20240523 use USAF_bratsethMod, only: USAF_is_gauge ! EMK 20240523 @@ -142,7 +143,7 @@ subroutine AGRMET_storeobs_offhour(n, nsize, isize, obs, ilat, ilon, & type(rain_obs), intent(inout) :: obs(isize) ! EMK 20240523 - character(255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer, parameter :: MAX_NEW_NETWORKS = 20 character(10), save :: new_networks(MAX_NEW_NETWORKS) = & (/"NULL ", & diff --git a/lis/metforcing/usaf/AGRMET_valid.F90 b/lis/metforcing/usaf/AGRMET_valid.F90 index aa562ae1b..265ed23a3 100644 --- a/lis/metforcing/usaf/AGRMET_valid.F90 +++ b/lis/metforcing/usaf/AGRMET_valid.F90 @@ -101,7 +101,6 @@ subroutine AGRMET_valid( n, pcap, mrg, est, est6, src,& ! \end{description} !EOP - character*100 :: ifil integer :: i integer :: j character*10 :: date10_03 diff --git a/lis/metforcing/usaf/USAF_GagesMod.F90 b/lis/metforcing/usaf/USAF_GagesMod.F90 index ea5e79691..8108b0d40 100644 --- a/lis/metforcing/usaf/USAF_GagesMod.F90 +++ b/lis/metforcing/usaf/USAF_GagesMod.F90 @@ -1761,6 +1761,7 @@ end subroutine USAF_gages_write_data subroutine USAF_gages_read_data(this, filename, date10, alert_number) ! Imports + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc use LIS_logMod, only: LIS_getNextUnitNumber, LIS_releaseUnitNumber, & LIS_alert, LIS_logunit @@ -1803,7 +1804,7 @@ subroutine USAF_gages_read_data(this, filename, date10, alert_number) logical :: found integer :: i integer :: iunit - character(255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) message = '' call this%delete() ! Make sure structure is empty diff --git a/lis/metforcing/usaf/USAF_ImergHHMod.F90 b/lis/metforcing/usaf/USAF_ImergHHMod.F90 index d3acd53c5..a09acd1a6 100644 --- a/lis/metforcing/usaf/USAF_ImergHHMod.F90 +++ b/lis/metforcing/usaf/USAF_ImergHHMod.F90 @@ -150,6 +150,7 @@ subroutine update30minImergHHPrecip(this, itime, filename, & #if (defined USE_HDF5) use HDF5 #endif + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc use LIS_logMod, only: LIS_logunit, LIS_abort, LIS_endrun, & LIS_alert @@ -177,7 +178,7 @@ subroutine update30minImergHHPrecip(this, itime, filename, & integer*2, allocatable :: tmp_prob_liq_precip(:,:,:) integer*2, allocatable :: tmp_ir_kalman_weights(:,:,:) integer :: icount - character(len=255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: ierr logical :: saved_good logical :: version_good @@ -1221,6 +1222,7 @@ subroutine create_Imerg_HH_filename(dir, product, version,& yr, mo, da, hr, mn, filename) ! Imports + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc use LIS_logMod, only: LIS_logunit, LIS_abort, LIS_endrun, & LIS_alert @@ -1241,7 +1243,7 @@ subroutine create_Imerg_HH_filename(dir, product, version,& integer, intent(in) :: da integer, intent(in) :: hr integer, intent(in) :: mn - character(len=255), intent(out) :: filename + character(len=LIS_CONST_PATH_LEN), intent(out) :: filename ! Local variables integer :: tmp_yr, tmp_mo, tmp_da, tmp_hr, tmp_mn, tmp_ss @@ -1251,7 +1253,7 @@ subroutine create_Imerg_HH_filename(dir, product, version,& type(ESMF_TIME) :: start_time, end_time, start_of_day type(ESMF_TIMEINTERVAL) :: half_hour type(ESMF_TIMEINTERVAL) :: time_diff - character(len=255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: ierr integer, save :: alert_number = 1 logical :: file_exists @@ -1368,6 +1370,7 @@ subroutine fetch3hrImergHH(j3hr, datadir, product, version, & precipObsData) ! Modules + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc use LIS_logMod, only: LIS_logunit, LIS_alert use LIS_timeMgrMod, only: LIS_julhr_date, LIS_calendar @@ -1396,8 +1399,8 @@ subroutine fetch3hrImergHH(j3hr, datadir, product, version, & type(ImergHHPrecip) :: imerg integer :: yr, mo, da, hr, mn integer :: itime - character(len=255) :: filename - character(255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: message(20) integer, save :: alert_number = 1 logical :: file_exists integer :: icount diff --git a/lis/metforcing/usaf/USAF_OBAMod.F90 b/lis/metforcing/usaf/USAF_OBAMod.F90 index cc38bc448..eb9fcf885 100644 --- a/lis/metforcing/usaf/USAF_OBAMod.F90 +++ b/lis/metforcing/usaf/USAF_OBAMod.F90 @@ -252,6 +252,9 @@ end subroutine writeToFile ! Creates filename for OBA statistics subroutine makeFilename(pathOBA,yyyymmddhh,accum,filename) + ! Imports + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + ! Defaults implicit none @@ -259,7 +262,7 @@ subroutine makeFilename(pathOBA,yyyymmddhh,accum,filename) character(len=*), intent(in) :: pathOBA character(len=10), intent(in) :: yyyymmddhh integer, intent(in) :: accum - character(len=120), intent(out) :: filename + character(len=LIS_CONST_PATH_LEN), intent(out) :: filename write(filename,1000) trim(pathOBA),'/oba_',yyyymmddhh,'_',accum,'.txt' 1000 format(A,A,A,A,I2.2,A) diff --git a/lis/metforcing/usaf/USAF_PreobsReaderMod.F90 b/lis/metforcing/usaf/USAF_PreobsReaderMod.F90 index 8a1f5eb02..ca205d3e2 100644 --- a/lis/metforcing/usaf/USAF_PreobsReaderMod.F90 +++ b/lis/metforcing/usaf/USAF_PreobsReaderMod.F90 @@ -39,6 +39,7 @@ subroutine USAF_read_preobs(n, preobsdir, presavdir, & ! Imports use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc use LIS_logMod, only: LIS_logunit, LIS_alert, LIS_getNextUnitNumber, & LIS_releaseUnitNumber @@ -62,7 +63,7 @@ subroutine USAF_read_preobs(n, preobsdir, presavdir, & integer, intent(inout) :: alert_number ! Locals - character(255) :: filename + character(len=LIS_CONST_PATH_LEN) :: filename integer, allocatable :: twfprc(:) integer, allocatable :: duration(:) integer, allocatable :: sixprc(:) @@ -113,7 +114,7 @@ subroutine USAF_read_preobs(n, preobsdir, presavdir, & integer, allocatable :: amts00(:) type(USAF_Gages_t) :: obscur, obsprev integer :: rc - character(255) :: presav_filename + character(LIS_CONST_PATH_LEN) :: presav_filename integer :: ipass, j logical :: exchanges type(ESMF_Time) :: curtime, prevtime, reporttime @@ -125,7 +126,7 @@ subroutine USAF_read_preobs(n, preobsdir, presavdir, & integer :: yyyy, mm, dd, h, m, s character(255) :: timestring integer :: iunit - character(255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer, parameter :: MAX_NEW_NETWORKS = 20 character(10), save :: new_networks(MAX_NEW_NETWORKS) = & (/"NULL ", & diff --git a/lis/metforcing/usaf/USAF_WWMCA_grib1Mod.F90 b/lis/metforcing/usaf/USAF_WWMCA_grib1Mod.F90 index 87c6fdcb2..f69a4e8e3 100644 --- a/lis/metforcing/usaf/USAF_WWMCA_grib1Mod.F90 +++ b/lis/metforcing/usaf/USAF_WWMCA_grib1Mod.F90 @@ -24,6 +24,9 @@ module USAF_WWMCA_grib1Mod + ! Imports + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + ! Defaults implicit none private @@ -31,7 +34,7 @@ module USAF_WWMCA_grib1Mod ! Create structure to share internal routines type :: wwmca_grib1_t private - character(len=255) :: full_grib_path + character(len=LIS_CONST_PATH_LEN) :: full_grib_path integer :: nx integer :: ny integer :: nk diff --git a/lis/metforcing/usaf/USAF_bratsethMod.F90 b/lis/metforcing/usaf/USAF_bratsethMod.F90 index 2420fb215..9128e3644 100644 --- a/lis/metforcing/usaf/USAF_bratsethMod.F90 +++ b/lis/metforcing/usaf/USAF_bratsethMod.F90 @@ -791,6 +791,7 @@ subroutine USAF_getBackNWP(nest,back4,pcp_src, use_twelve, j6hr, findex) ! Imports use AGRMET_forcingMod, only: agrmet_struc + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_rc, LIS_masterproc use LIS_logMod, only: LIS_abort, LIS_endrun, LIS_getNextUnitNumber, & LIS_releaseUnitNumber, LIS_logunit, LIS_alert @@ -814,7 +815,7 @@ subroutine USAF_getBackNWP(nest,back4,pcp_src, use_twelve, j6hr, findex) integer :: j3hr integer :: fc_hr character(len=6) :: src - character(len=255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: rc,ierr character(len=10) :: yyyymmddhh integer :: c, r @@ -990,6 +991,7 @@ subroutine USAF_getSSMIObsData(nest,j6hr,use_twelve,precip3,precip6, & ! Imports use AGRMET_forcingMod, only : agrmet_struc + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc use LIS_fileIOMod, only: LIS_putget use LIS_logMod, only: LIS_logunit, LIS_alert @@ -1016,9 +1018,9 @@ subroutine USAF_getSSMIObsData(nest,j6hr,use_twelve,precip3,precip6, & integer :: alert_number integer :: first,last,hemi integer :: yr,mo,da,hr - character(len=100) :: ifil + character(len=LIS_CONST_PATH_LEN) :: ifil logical :: exists - character(len=255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) character(len=30) :: routine_name logical :: use_zeros integer :: local_global_or_hemi @@ -1173,6 +1175,7 @@ subroutine USAF_getGeoPrecipObsData(nest,j6hr,use_twelve,precip3,precip6,& ! Imports use AGRMET_forcingMod, only : agrmet_struc + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_masterproc use LIS_fileIOMod, only: LIS_putget use LIS_logMod, only: LIS_logunit, LIS_endrun, LIS_alert @@ -1202,10 +1205,10 @@ subroutine USAF_getGeoPrecipObsData(nest,j6hr,use_twelve,precip3,precip6,& integer :: first, last, hemi logical :: gdgeornk, exists integer :: yr,mo,da,hr - character(len=100) :: ifil + character(len=LIS_CONST_PATH_LEN) :: ifil integer :: k integer :: alert_number - character(len=255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) character(len=30) :: routine_name real, allocatable :: xpts(:), ypts(:), rlat(:), rlon(:) real :: sigmaOSqr, ob, xi1, xj1, oErrScaleLength, & @@ -2975,6 +2978,7 @@ subroutine fldbld_precip_nwp(nest,findex,julhr,src,fc_hr, & #else use LIS_coreMod, only : LIS_masterproc #endif + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, & LIS_verify, LIS_endrun @@ -2999,8 +3003,7 @@ subroutine fldbld_precip_nwp(nest,findex,julhr,src,fc_hr, & integer :: file_julhr integer :: getsixhr integer :: yr_2d - !character(len=120) :: gribfile, gribfile2 - character(len=255) :: gribfile, gribfile2 + character(len=LIS_CONST_PATH_LEN) :: gribfile, gribfile2 integer :: center real :: gridres integer :: Ni, Nj, ifguess, jfguess @@ -3224,6 +3227,7 @@ subroutine check_grib_file(gribfile,yr1,mo1,da1,hr1,found, & #if (defined USE_GRIBAPI) use grib_api #endif + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, & LIS_verify, LIS_endrun @@ -3233,8 +3237,7 @@ subroutine check_grib_file(gribfile,yr1,mo1,da1,hr1,found, & implicit none ! Arguments - !character(len=120), intent(in) :: gribfile - character(len=255), intent(in) :: gribfile + character(len=LIS_CONST_PATH_LEN), intent(in) :: gribfile integer, intent(in) :: yr1, mo1, da1, hr1 logical, intent(out) :: found integer, intent(out) :: center @@ -3247,7 +3250,7 @@ subroutine check_grib_file(gribfile,yr1,mo1,da1,hr1,found, & character(len=100) :: gtype logical :: found_inq #if (!defined USE_GRIBAPI) - character(len=255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) #endif found = .false. ! Dummy values, replaced by GRIB data contents below @@ -6096,6 +6099,7 @@ subroutine USAF_getCMORPHObsData(nest,j6hr,use_twelve, & ! Imports use AGRMET_forcingMod, only : agrmet_struc + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_logunit, LIS_getNextUnitNumber, & LIS_releaseUnitNumber use LIS_timeMgrMod, only : LIS_julhr_date @@ -6121,7 +6125,7 @@ subroutine USAF_getCMORPHObsData(nest,j6hr,use_twelve, & character(len=32) :: net, platform real :: sigmaOSqr, oErrScaleLength, oErrInvScaleLength integer :: count_good_obs - character(len=120) :: fname + character(len=LIS_CONST_PATH_LEN) :: fname real :: ob real :: rlat, rlon integer :: yr, mo, da, hr diff --git a/lis/metforcing/usaf/USAF_fldbld_radflux.F90 b/lis/metforcing/usaf/USAF_fldbld_radflux.F90 index f1b921ad4..fb5ad2525 100644 --- a/lis/metforcing/usaf/USAF_fldbld_radflux.F90 +++ b/lis/metforcing/usaf/USAF_fldbld_radflux.F90 @@ -24,8 +24,9 @@ ! !INTERFACE: subroutine USAF_fldbld_radflux(n,swdown,longwv) -! !USES: +! !USES: use AGRMET_forcingMod, only : agrmet_struc + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_endrun, LIS_abort,& LIS_alert @@ -62,7 +63,7 @@ subroutine USAF_fldbld_radflux(n,swdown,longwv) !EOP integer :: rc - character(len=255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) character(len=10) :: yyyymmddhh integer :: julhr integer :: istart diff --git a/lis/metforcing/usaf/USAF_fldbld_radflux_galwem.F90 b/lis/metforcing/usaf/USAF_fldbld_radflux_galwem.F90 index 1da1b50ce..62da46972 100644 --- a/lis/metforcing/usaf/USAF_fldbld_radflux_galwem.F90 +++ b/lis/metforcing/usaf/USAF_fldbld_radflux_galwem.F90 @@ -24,6 +24,7 @@ subroutine USAF_fldbld_radflux_galwem(n,julhr,fg_swdata,fg_lwdata,rc) ! !USES: use AGRMET_forcingMod, only : agrmet_struc + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, & LIS_verify, LIS_endrun @@ -127,9 +128,9 @@ subroutine USAF_fldbld_radflux_galwem(n,julhr,fg_swdata,fg_lwdata,rc) ! abort in case of error ! \end{description} !EOP - character(255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: ftn, igrib - character*250 :: avnfile + character(len=LIS_CONST_PATH_LEN) :: avnfile integer :: yr1, mo1, da1, hr1 integer :: fc_hr integer :: iginfo ( 2 ) @@ -155,7 +156,7 @@ subroutine USAF_fldbld_radflux_galwem(n,julhr,fg_swdata,fg_lwdata,rc) ! --------------------------------------------------- - ! Initialize return code to "no error". We will change it below if + ! Initialize return code to "no error". We will change it below if ! necessary. rc = 0 @@ -513,6 +514,7 @@ subroutine USAF_fldbld_read_radflux_galwem(fg_filename, & ifguess, jfguess, fg_swdown, fg_lwdown, rc ) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, LIS_verify @@ -581,7 +583,7 @@ subroutine USAF_fldbld_read_radflux_galwem(fg_filename, & ! \end{description} ! !EOP - character(255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer, save :: alert_number = 1 integer :: count_swdown integer :: count_lwdown diff --git a/lis/metforcing/usaf/USAF_fldbld_radflux_gfs.F90 b/lis/metforcing/usaf/USAF_fldbld_radflux_gfs.F90 index 920b5242f..f9609842e 100644 --- a/lis/metforcing/usaf/USAF_fldbld_radflux_gfs.F90 +++ b/lis/metforcing/usaf/USAF_fldbld_radflux_gfs.F90 @@ -14,6 +14,7 @@ subroutine USAF_fldbld_radflux_gfs(n, julhr, fg_swdata, & ! Imports use AGRMET_forcingMod, only : agrmet_struc + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, & LIS_verify, LIS_endrun @@ -35,10 +36,10 @@ subroutine USAF_fldbld_radflux_gfs(n, julhr, fg_swdata, & ! Locals integer :: ftn, ftn2 integer :: igrib, igrib2 - character*250 :: avnfile, avnfile2 + character(len=LIS_CONST_PATH_LEN) :: avnfile, avnfile2 integer :: yr1, mo1, da1, hr1 integer :: fc_hr - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) integer :: iginfo(2), iginfo2(2) real :: gridres, gridres2 integer :: alert_number @@ -500,6 +501,7 @@ subroutine USAF_fldbld_read_radflux_gfs(fg_filename, ifguess, jfguess, & fg_swdown, fg_lwdown, alert_number ) ! Imports + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, LIS_verify #if (defined USE_GRIBAPI) use grib_api @@ -517,7 +519,7 @@ subroutine USAF_fldbld_read_radflux_gfs(fg_filename, ifguess, jfguess, & integer, intent(inout) :: alert_number ! Locals - character*255 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) integer :: count_swdown integer :: count_lwdown integer :: ierr diff --git a/lis/metforcing/usaf/USAF_getpcpobs.F90 b/lis/metforcing/usaf/USAF_getpcpobs.F90 index b62785950..a47a6bf36 100644 --- a/lis/metforcing/usaf/USAF_getpcpobs.F90 +++ b/lis/metforcing/usaf/USAF_getpcpobs.F90 @@ -25,6 +25,7 @@ subroutine USAF_getpcpobs(n, j6hr, month, use_twelve, pcp_src, & ! Imports use AGRMET_forcingMod, only: agrmet_struc use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_rc use LIS_logMod, only: LIS_logunit use LIS_timeMgrMod, only: LIS_tick, LIS_julhr_date @@ -50,10 +51,10 @@ subroutine USAF_getpcpobs(n, j6hr, month, use_twelve, pcp_src, & integer :: j3hr integer :: k integer :: yr, mo, da, hr - character*255 :: preobsdir + character(len=LIS_CONST_PATH_LEN) :: preobsdir character*8 :: yyyymmdd character*10 :: yyyymmddhh - character*255 :: presav_filename + character(len=LIS_CONST_PATH_LEN) :: presav_filename logical :: file_exists type(USAF_Gages_t) :: obscur diff --git a/lis/metforcing/usaf/compute_cod_based_clouds.F90 b/lis/metforcing/usaf/compute_cod_based_clouds.F90 index fd8158db5..a2fda8d4b 100644 --- a/lis/metforcing/usaf/compute_cod_based_clouds.F90 +++ b/lis/metforcing/usaf/compute_cod_based_clouds.F90 @@ -18,6 +18,7 @@ ! !INTERFACE: subroutine compute_cod_based_clouds(n, cod, cloud_pcts) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit use LIS_timeMgrMod, only : LIS_get_julhr,LIS_tick,LIS_time2date @@ -31,7 +32,7 @@ subroutine compute_cod_based_clouds(n, cod, cloud_pcts) integer :: hemi integer :: yr1,mo1,da1,hr1,mn1,ss1,julhr,doy1 - character*200 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename logical :: file_exists integer :: ip real :: udef diff --git a/lis/metforcing/usaf/compute_type_based_clouds.F90 b/lis/metforcing/usaf/compute_type_based_clouds.F90 index f3805a862..d04afd11f 100644 --- a/lis/metforcing/usaf/compute_type_based_clouds.F90 +++ b/lis/metforcing/usaf/compute_type_based_clouds.F90 @@ -20,6 +20,7 @@ subroutine compute_type_based_clouds(n, cldamt_nh, cldamt_sh, cldamt, & cldtyp_nh, cldtyp_sh, fog_nh, fog_sh) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_localPet use LIS_logMod, only : LIS_logunit use LIS_timeMgrMod, only : LIS_get_julhr,LIS_tick,LIS_time2date @@ -45,7 +46,7 @@ subroutine compute_type_based_clouds(n, cldamt_nh, cldamt_sh, cldamt, & integer*4,allocatable :: times (:,:) integer :: doy1,yr1,mo1,da1,hr1,mn1,ss1,try integer :: mn1_tmp - character*200 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename logical :: file_exists integer :: istat real*8 :: backtime1 diff --git a/lis/metforcing/usaf/get_agrmet.F90 b/lis/metforcing/usaf/get_agrmet.F90 index 1978d4755..416785e1f 100644 --- a/lis/metforcing/usaf/get_agrmet.F90 +++ b/lis/metforcing/usaf/get_agrmet.F90 @@ -21,7 +21,8 @@ ! ! !INTERFACE: subroutine get_agrmet(n, findex) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_endofrun use LIS_timeMgrMod, only : LIS_get_nstep, & LIS_computeTimeBookEnds, & @@ -86,7 +87,7 @@ subroutine get_agrmet(n, findex) integer :: yr1,mo1,da1,hr1,mn1,ss1,doy1,ts1 integer :: yr2,mo2,da2,hr2,mn2,ss2,doy2,ts2 real :: gmt1,gmt2 - character*400 :: name + character(len=LIS_CONST_PATH_LEN) :: name agrmet_struc(n)%findtime1 = 0 agrmet_struc(n)%findtime2 = 0 diff --git a/lis/metforcing/usaf/readagrmetforcing.F90 b/lis/metforcing/usaf/readagrmetforcing.F90 index 33b226395..fc6262612 100644 --- a/lis/metforcing/usaf/readagrmetforcing.F90 +++ b/lis/metforcing/usaf/readagrmetforcing.F90 @@ -181,7 +181,6 @@ subroutine readagrmetforcing(n,findex, order) ! computes the downward shortwave radiation value ! \end{description} !EOP - character*200 :: filename integer :: hemi integer :: c,r,t,gid,sftype integer :: istat @@ -197,7 +196,6 @@ subroutine readagrmetforcing(n,findex, order) real,allocatable :: rlh(:,:) integer :: ip integer :: julhr - character(len=255) :: message(20) real,allocatable :: cldamt(:,:,:) integer,allocatable :: cldamt_nh( :,:,:) diff --git a/lis/metforcing/usaf/readagrmetforcinganalysis.F90 b/lis/metforcing/usaf/readagrmetforcinganalysis.F90 index 36a69a52e..a0ec0140b 100644 --- a/lis/metforcing/usaf/readagrmetforcinganalysis.F90 +++ b/lis/metforcing/usaf/readagrmetforcinganalysis.F90 @@ -23,7 +23,8 @@ ! ! !INTERFACE: subroutine readagrmetforcinganalysis(n,findex, order, agrfile, month) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_masterproc use LIS_timeMgrMod,only : LIS_get_julhr,LIS_tick,LIS_time2date use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_warning,& @@ -82,8 +83,7 @@ subroutine readagrmetforcinganalysis(n,findex, order, agrfile, month) integer :: rc,status,iret integer, save :: step_count=1 character(len=10) :: str_count - character(len=128) :: dump_name - character(len=255) :: message(20) + character(len=LIS_CONST_PATH_LEN) :: message(20) integer :: mo #if(defined USE_GRIBAPI) !-------------------------------------------------------------------------- diff --git a/lis/metforcing/usaf/readagrmetpcpforcing.F90 b/lis/metforcing/usaf/readagrmetpcpforcing.F90 index 2ebc523a8..b62b4f0d2 100644 --- a/lis/metforcing/usaf/readagrmetpcpforcing.F90 +++ b/lis/metforcing/usaf/readagrmetpcpforcing.F90 @@ -50,6 +50,7 @@ subroutine readagrmetpcpforcing(n,findex, order) #ifdef ESMF_TRACE use ESMF, only: ESMF_TraceRegionEnter, ESMF_TraceRegionExit #endif + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_masterproc use LIS_logMod, only : LIS_logunit use LIS_mpiMod, only : LIS_mpi_comm @@ -222,12 +223,10 @@ subroutine readagrmetpcpforcing(n,findex, order) integer :: c,r integer :: yr1,mo1,da1,hr1 integer :: alert_number - character*100 :: pathpcp + character(len=LIS_CONST_PATH_LEN) :: pathpcp character*10 :: date10_03 character*4 :: fyr character*2 :: fmo,fda - character*100 :: ofil - character*100 :: ifil logical :: exists integer :: ftn real :: gridDesc(6) @@ -271,12 +270,12 @@ subroutine readagrmetpcpforcing(n,findex, order) integer :: k1,k2,k3,k4 character(len=32) :: type character(len=10) :: yyyymmddhh - character(len=50) :: pathOBA + character(len=LIS_CONST_PATH_LEN) :: pathOBA logical :: found_inq - character(len=120) :: obaFilename + character(len=LIS_CONST_PATH_LEN) :: obaFilename type(OBA) :: precipOBA ! EMK character(len=6) :: pcp_src(4) - character(len=255) :: imerg_datadir + character(len=LIS_CONST_PATH_LEN) :: imerg_datadir character(len=20) :: imerg_product character(len=20) :: imerg_version integer*2 :: imerg_plp_thresh diff --git a/lis/metforcing/usaf/readagrmetpcpforcinganalysis.F90 b/lis/metforcing/usaf/readagrmetpcpforcinganalysis.F90 index cbaa27a81..81e204a48 100644 --- a/lis/metforcing/usaf/readagrmetpcpforcinganalysis.F90 +++ b/lis/metforcing/usaf/readagrmetpcpforcinganalysis.F90 @@ -18,6 +18,7 @@ ! !INTERFACE: subroutine readagrmetpcpforcinganalysis(n,findex, order) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc,LIS_domain, LIS_masterproc use LIS_timeMgrMod, only : LIS_julhr_date, LIS_get_julhr use LIS_logMod, only : LIS_logunit, LIS_endrun @@ -93,7 +94,7 @@ subroutine readagrmetpcpforcinganalysis(n,findex, order) character*4 :: fyr character*2 :: fmo,fda character*3 :: chemi(2) - character*100 :: ifil + character(len=LIS_CONST_PATH_LEN) :: ifil character*30 :: routine_name real :: udef integer :: c,r diff --git a/lis/metforcing/usaf/readcrd_agrmet.F90 b/lis/metforcing/usaf/readcrd_agrmet.F90 index 0f093399f..f342d3a4d 100644 --- a/lis/metforcing/usaf/readcrd_agrmet.F90 +++ b/lis/metforcing/usaf/readcrd_agrmet.F90 @@ -37,6 +37,7 @@ subroutine readcrd_agrmet() ! !USES: use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_config, LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_verify, LIS_abort, & LIS_endrun @@ -56,9 +57,9 @@ subroutine readcrd_agrmet() !EOP integer:: n,rc,j character(len=10) :: cdate - character(len=255) :: message(20) ! EMK + character(len=LIS_CONST_PATH_LEN) :: message(20) ! EMK real :: tmp_max_dist ! EMK - character(len=201) :: c_string ! EMK + character(len=LIS_CONST_PATH_LEN) :: c_string ! EMK integer :: ios ! EMK integer, external :: LIS_create_subdirs integer :: tmp_imerg_plp_thresh diff --git a/lis/metforcing/usaf/retrieve_agrmetvar.F90 b/lis/metforcing/usaf/retrieve_agrmetvar.F90 index 9bcf34ba7..fa5be405c 100644 --- a/lis/metforcing/usaf/retrieve_agrmetvar.F90 +++ b/lis/metforcing/usaf/retrieve_agrmetvar.F90 @@ -18,11 +18,12 @@ ! !INTERFACE: subroutine retrieve_agrmetvar(name,nc,nr,varfield) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_logunit, LIS_endrun implicit none ! !ARGUMENTS: - character*100 :: name + character(len=LIS_CONST_PATH_LEN) :: name integer :: nc,nr real, intent(inout) :: varfield(nc,nr) ! diff --git a/lis/optUE/algorithm/DEMCz/DEMCzAlgorithm.F90 b/lis/optUE/algorithm/DEMCz/DEMCzAlgorithm.F90 index be6a6b4b9..83d9e7deb 100644 --- a/lis/optUE/algorithm/DEMCz/DEMCzAlgorithm.F90 +++ b/lis/optUE/algorithm/DEMCz/DEMCzAlgorithm.F90 @@ -619,7 +619,8 @@ end subroutine DEMCz_acceptReject ! ! !INTERFACE: subroutine writeDEMCzrestart -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_fileIOMod, only : LIS_create_output_directory use LIS_historyMod, only : LIS_writevar_restart ! @@ -632,7 +633,7 @@ subroutine writeDEMCzrestart integer :: n integer :: i,m,t integer :: status - character*100 :: filen + character(len=LIS_CONST_PATH_LEN) :: filen character (len=4) :: fgen character*100 :: vnames(demcz_ctl%nparam) real, allocatable :: vardata(:) diff --git a/lis/optUE/algorithm/RWMCMC/RWMCMCAlgorithm.F90 b/lis/optUE/algorithm/RWMCMC/RWMCMCAlgorithm.F90 index 2356e9082..b137cc1d1 100644 --- a/lis/optUE/algorithm/RWMCMC/RWMCMCAlgorithm.F90 +++ b/lis/optUE/algorithm/RWMCMC/RWMCMCAlgorithm.F90 @@ -452,7 +452,8 @@ end subroutine writeRWMCMCdata ! ! !INTERFACE: subroutine writeRWMCMCrestart -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_fileIOMod, only : LIS_create_output_directory use LIS_historyMod, only : LIS_writevar_restart ! @@ -465,7 +466,7 @@ subroutine writeRWMCMCrestart integer :: n integer :: i,m,t integer :: status - character*100 :: filen + character(len=LIS_CONST_PATH_LEN) :: filen character (len=4) :: fgen character*100 :: vnames(mcmc_ctl%nparam) real, allocatable :: vardata(:) diff --git a/lis/optUE/type/paramestim/obs/AMSRE_SR/AMSRE_SR_em_obsMod.F90 b/lis/optUE/type/paramestim/obs/AMSRE_SR/AMSRE_SR_em_obsMod.F90 index dce5b0e13..0841764f0 100755 --- a/lis/optUE/type/paramestim/obs/AMSRE_SR/AMSRE_SR_em_obsMod.F90 +++ b/lis/optUE/type/paramestim/obs/AMSRE_SR/AMSRE_SR_em_obsMod.F90 @@ -95,7 +95,6 @@ subroutine AMSRE_SR_em_obs_setup(Obs_State) type(ESMF_ArraySpec) :: realarrspec type(ESMF_Field) :: obsField character(len=LIS_CONST_PATH_LEN) :: emissivityobsdir - character(len=LIS_CONST_PATH_LEN) :: emissivityobsmaskdir character*100 :: vname character(len=LIS_CONST_PATH_LEN) :: obsAttribFile(LIS_rc%nnest) integer :: ftn diff --git a/lis/optUE/type/paramestim/obs/ARM/ARMdata_module.F90 b/lis/optUE/type/paramestim/obs/ARM/ARMdata_module.F90 index 1cca1beb5..32545be77 100644 --- a/lis/optUE/type/paramestim/obs/ARM/ARMdata_module.F90 +++ b/lis/optUE/type/paramestim/obs/ARM/ARMdata_module.F90 @@ -116,9 +116,7 @@ subroutine ARMdata_setup(Obj_space) integer :: i type(ESMF_ArraySpec) :: realarrspec type(ESMF_Field),allocatable :: obsField(:) - character(len=LIS_CONST_PATH_LEN) :: smobsdir character*100, allocatable :: vname(:) - character(len=LIS_CONST_PATH_LEN) :: obsAttribFile(LIS_rc%nnest) integer :: ftn integer :: k, iloc character*100 :: currentLine diff --git a/lis/optUE/type/paramestim/obs/ARM/read_ARMdata.F90 b/lis/optUE/type/paramestim/obs/ARM/read_ARMdata.F90 index 8f83812d7..8ec76ffc0 100644 --- a/lis/optUE/type/paramestim/obs/ARM/read_ARMdata.F90 +++ b/lis/optUE/type/paramestim/obs/ARM/read_ARMdata.F90 @@ -24,7 +24,6 @@ subroutine read_ARMdata(Obj_Space) LIS_getNextUnitNumber, LIS_releaseUnitNumber use LIS_fileIOMod, only : LIS_readData use LIS_timeMgrMod, only : LIS_calendar, LIS_tick - use LIS_constantsMod, only : LIS_CONST_PATH_LEN use map_utils use ARMdata_module, only : ARMdata_struc @@ -47,7 +46,6 @@ subroutine read_ARMdata(Obj_Space) integer :: yr, mo, da, hr, mn, ss,doy real*8 :: lis_prevtime integer :: status - character(len=LIS_CONST_PATH_LEN) :: filename real :: time, gmt integer :: i,t,gid,c,r,st,et type(ESMF_TimeInterval) :: dayInterval @@ -1733,7 +1731,8 @@ end subroutine read_baebbr_flux_file ! !INTERFACE: subroutine create_arm_ecor_flux_filename(odir, site_id, stnid, & yr, mo, da, filename, rc) - + + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_localPet implicit none @@ -1773,7 +1772,7 @@ subroutine create_arm_ecor_flux_filename(odir, site_id, stnid, & character*4 :: fproc integer :: fsize - character*100 :: ls_comm, cmd2 + character(len=LIS_CONST_PATH_LEN) :: ls_comm, cmd2 rc = 1 !fail to find the file @@ -1815,7 +1814,8 @@ end subroutine create_arm_ecor_flux_filename ! !INTERFACE: subroutine create_arm_baebbr_flux_filename(odir, site_id, stnid, & yr, mo, da, filename, rc) - + + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_localPet implicit none @@ -1856,7 +1856,7 @@ subroutine create_arm_baebbr_flux_filename(odir, site_id, stnid, & character*4 :: fproc integer :: fsize - character*100 :: ls_comm, cmd2 + character(len=LIS_CONST_PATH_LEN) :: ls_comm, cmd2 rc = 1 !fail to find the file @@ -1898,7 +1898,8 @@ end subroutine create_arm_baebbr_flux_filename ! !INTERFACE: subroutine create_arm_ebbr_filename(odir, site_id, stnid, & yr, mo, da, filename, rc) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_localPet implicit none @@ -1937,7 +1938,7 @@ subroutine create_arm_ebbr_filename(odir, site_id, stnid, & character*4 :: fproc integer :: fsize - character*100 :: ls_comm, cmd2 + character(len=LIS_CONST_PATH_LEN) :: ls_comm, cmd2 rc = 1 !fail to find the file diff --git a/lis/optUE/type/paramestim/obs/Ameriflux/read_AmerifluxObs.F90 b/lis/optUE/type/paramestim/obs/Ameriflux/read_AmerifluxObs.F90 index d86a4ad69..d85116eb5 100755 --- a/lis/optUE/type/paramestim/obs/Ameriflux/read_AmerifluxObs.F90 +++ b/lis/optUE/type/paramestim/obs/Ameriflux/read_AmerifluxObs.F90 @@ -58,7 +58,7 @@ subroutine read_AmerifluxObs(Obj_Space) type(ESMF_Field) :: qgField type(ESMF_Field) :: sfstField type(ESMF_Field) :: sfsmField - character(len=LIS_CONST_PATH_LEN) :: obsdir, name + character(len=LIS_CONST_PATH_LEN) :: obsdir logical :: data_update logical :: file_exists logical :: readflag diff --git a/lis/optUE/type/paramestim/obs/Ameriflux/write_AmerifluxObs.F90 b/lis/optUE/type/paramestim/obs/Ameriflux/write_AmerifluxObs.F90 index f78bac400..3b6ef27d9 100755 --- a/lis/optUE/type/paramestim/obs/Ameriflux/write_AmerifluxObs.F90 +++ b/lis/optUE/type/paramestim/obs/Ameriflux/write_AmerifluxObs.F90 @@ -18,12 +18,6 @@ subroutine write_AmerifluxObs(Obj_Space) ! !USES: use ESMF - use LIS_coreMod, only : LIS_rc, LIS_masterproc - use LIS_logMod, only : LIS_logunit, LIS_verify, & - LIS_getNextUnitNumber, LIS_releaseUnitNumber - use LIS_fileIOMod, only : LIS_create_output_directory - use LIS_historyMod, only : LIS_writevar_gridded - use LIS_constantsMod, only : LIS_CONST_PATH_LEN implicit none ! !ARGUMENTS: @@ -41,46 +35,7 @@ subroutine write_AmerifluxObs(Obj_Space) ! \end{description} ! !EOP - real, allocatable :: obsl(:) - type(ESMF_Field) :: smField - type(ESMF_Logical) :: data_update - character(len=LIS_CONST_PATH_LEN) :: obsname - integer :: status - integer :: ftn - integer :: n -#if 0 - n = 1 - - call ESMF_AttributeGet(Obj_Space,"Data Update Status",& - data_update, rc=status) - call LIS_verify(status) - - if(data_update.eq..true.) then - - call ESMF_StateGet(Obj_Space,"PBMR soil moisture",smField,& - rc=status) - call LIS_verify(status) - - call ESMF_FieldGet(smField, localDE=0,farrayPtr=obsl,rc=status) - call LIS_verify(status) - - if(LIS_masterproc) then - ftn = LIS_getNextUnitNumber() - call Amerifluxobs_filename(obsname) - - call LIS_create_output_directory('PEOBS') - open(ftn,file=trim(obsname), form='unformatted') - endif - - call LIS_writevar_gridded(ftn, n, obsl) - - if(LIS_masterproc) then - call LIS_releaseUnitNumber(ftn) - endif - - endif -#endif end subroutine write_AmerifluxObs !BOP diff --git a/lis/optUE/type/paramestim/obs/CNRS/read_CNRSdata_MPDI.F90 b/lis/optUE/type/paramestim/obs/CNRS/read_CNRSdata_MPDI.F90 index 3e6903ae6..3a5baa855 100644 --- a/lis/optUE/type/paramestim/obs/CNRS/read_CNRSdata_MPDI.F90 +++ b/lis/optUE/type/paramestim/obs/CNRS/read_CNRSdata_MPDI.F90 @@ -25,7 +25,7 @@ subroutine read_CNRS_mpdi_em_obsdata(Obj_Space) use LIS_logMod, only : LIS_logunit, LIS_verify, & LIS_getNextUnitNumber, LIS_releaseUnitNumber use LIS_fileIOMod, only : LIS_readData - use LIS_constantsMod, only : LIS_CONST_PATH_LEN + !use LIS_constantsMod, only : LIS_CONST_PATH_LEN use CNRS_em_obsMod, only : CNRS_em_obs_struc use map_utils @@ -47,7 +47,6 @@ subroutine read_CNRS_mpdi_em_obsdata(Obj_Space) real, pointer :: obse(:) integer, parameter :: numchannels=7 type(ESMF_Field) :: emField - character(len=LIS_CONST_PATH_LEN) :: emobsdir logical :: data_update integer :: status logical :: found @@ -57,7 +56,6 @@ subroutine read_CNRS_mpdi_em_obsdata(Obj_Space) type(ESMF_Time) :: lis_time1 integer :: t integer :: n -! logical :: is_ascend_pass_hr logical :: ob_in_curr_hr integer :: day_index logical :: is_overpass_hr @@ -122,16 +120,6 @@ subroutine read_CNRS_mpdi_em_obsdata(Obj_Space) endif if (is_overpass_hr.and.(.not.maskout)) then -! call ESMF_AttributeGet(Obj_Space,"Data Directory",& -! emobsdir, rc=status) -! call LIS_verify(status) -! call ESMF_AttributeGet(Obj_Space,"Data Update Status",& -! data_update, rc=status) -! call LIS_verify(status) - - ! allocate(emobs(LIS_rc%lnc(n),LIS_rc%lnr(n),numchannels)) - ! allocate(obse(LIS_rc%ngrid(n),numchannels)) - ! allocate(obse(LIS_rc%ngrid(n))) call ESMF_TimeSet(lis_time1, yy=LIS_rc%yr, mm=LIS_rc%mo, & dd=LIS_rc%da,h=LIS_rc%hr,& diff --git a/lis/optUE/type/paramestim/obs/Global_LS_data/read_GlobalLSObsdata.F90 b/lis/optUE/type/paramestim/obs/Global_LS_data/read_GlobalLSObsdata.F90 index 137c125a7..c30b9496f 100755 --- a/lis/optUE/type/paramestim/obs/Global_LS_data/read_GlobalLSObsdata.F90 +++ b/lis/optUE/type/paramestim/obs/Global_LS_data/read_GlobalLSObsdata.F90 @@ -46,7 +46,7 @@ subroutine read_GlobalLSObsdata(Obj_Space) real, allocatable :: lsobs(:,:) real, pointer :: obsl(:) type(ESMF_Field) :: lsField - character(len=LIS_CONST_PATH_LEN) :: lsobsdir, name + character(len=LIS_CONST_PATH_LEN) :: lsobsdir logical :: data_update logical :: file_exists logical :: readflag diff --git a/lis/optUE/type/paramestim/obs/ISCCP_Tskin/ISCCP_Tskinobs_module.F90 b/lis/optUE/type/paramestim/obs/ISCCP_Tskin/ISCCP_Tskinobs_module.F90 index 67fd2a6aa..529263eed 100755 --- a/lis/optUE/type/paramestim/obs/ISCCP_Tskin/ISCCP_Tskinobs_module.F90 +++ b/lis/optUE/type/paramestim/obs/ISCCP_Tskin/ISCCP_Tskinobs_module.F90 @@ -80,7 +80,7 @@ subroutine ISCCP_Tskinobs_setup(Obj_Space) type(ESMF_Field), allocatable :: obsField(:) character(len=LIS_CONST_PATH_LEN) :: synsmobsdir character*100, allocatable :: vname(:) - character*100 :: objspaceAttribFile(LIS_rc%nnest) + character(len=LIS_CONST_PATH_LEN) :: objspaceAttribFile(LIS_rc%nnest) integer :: ftn real :: gridDesci(LIS_rc%nnest,50) diff --git a/lis/optUE/type/paramestim/obs/ISMNsm/read_ISMNsmobs.F90 b/lis/optUE/type/paramestim/obs/ISMNsm/read_ISMNsmobs.F90 index e3488ee53..6bcb33991 100755 --- a/lis/optUE/type/paramestim/obs/ISMNsm/read_ISMNsmobs.F90 +++ b/lis/optUE/type/paramestim/obs/ISMNsm/read_ISMNsmobs.F90 @@ -52,7 +52,6 @@ subroutine read_ISMNsmobs(Obj_Space) character(len=LIS_CONST_PATH_LEN) :: obsdir logical :: data_update integer :: i - character(len=LIS_CONST_PATH_LEN) :: filename integer :: ios integer :: yr,doy,mo,da,hr,mn,ss logical :: file_exists @@ -418,7 +417,7 @@ subroutine getNumberOfISMNfiles(odir, yr, num_files) !EOP character*100 :: temp1 character(len=LIS_CONST_PATH_LEN) :: ls_comm - character*500 :: cmd2 + character(len=LIS_CONST_PATH_LEN) :: cmd2 character*4 :: fyr integer :: ftn character*1 :: fproc(4) diff --git a/lis/optUE/type/paramestim/obs/SMAPsm/SMAPsm_obsMod.F90 b/lis/optUE/type/paramestim/obs/SMAPsm/SMAPsm_obsMod.F90 index 774c4947e..87839ec21 100644 --- a/lis/optUE/type/paramestim/obs/SMAPsm/SMAPsm_obsMod.F90 +++ b/lis/optUE/type/paramestim/obs/SMAPsm/SMAPsm_obsMod.F90 @@ -81,7 +81,6 @@ subroutine SMAPsm_obs_setup(Obs_State) type(ESMF_Field) :: obsField character(len=LIS_CONST_PATH_LEN) :: obsdir character*100 :: vname - character(len=LIS_CONST_PATH_LEN) :: obsAttribFile(LIS_rc%nnest) integer :: k integer :: ftn integer :: status diff --git a/lis/optUE/type/paramestim/obs/UAsnow/UAsnow_obsMod.F90 b/lis/optUE/type/paramestim/obs/UAsnow/UAsnow_obsMod.F90 index f8b1284bc..de5d33816 100644 --- a/lis/optUE/type/paramestim/obs/UAsnow/UAsnow_obsMod.F90 +++ b/lis/optUE/type/paramestim/obs/UAsnow/UAsnow_obsMod.F90 @@ -99,7 +99,6 @@ subroutine UAsnow_obs_setup(Obs_State) type(ESMF_Field) :: obsField1,obsField2 character(len=LIS_CONST_PATH_LEN) :: obsdir character*100 :: vname - character(len=LIS_CONST_PATH_LEN) :: obsAttribFile(LIS_rc%nnest) integer :: k integer :: ftn integer :: status diff --git a/lis/optUE/type/paramestim/obs/USDA_ARSsm/USDA_ARSsm_obsMod.F90 b/lis/optUE/type/paramestim/obs/USDA_ARSsm/USDA_ARSsm_obsMod.F90 index d0eee6c89..dc3c7b1b6 100755 --- a/lis/optUE/type/paramestim/obs/USDA_ARSsm/USDA_ARSsm_obsMod.F90 +++ b/lis/optUE/type/paramestim/obs/USDA_ARSsm/USDA_ARSsm_obsMod.F90 @@ -77,7 +77,6 @@ subroutine USDA_ARSsm_obs_setup(Obs_State) type(ESMF_ArraySpec) :: realarrspec type(ESMF_Field) :: obsField character(len=LIS_CONST_PATH_LEN) :: soilmoistureobsdir - character(len=LIS_CONST_PATH_LEN) :: soilmoistureobsmaskdir character*100 :: vname character(len=LIS_CONST_PATH_LEN) :: obsAttribFile(LIS_rc%nnest) integer :: ftn diff --git a/lis/routing/HYMAP2_router/HYMAP2_routingMod.F90 b/lis/routing/HYMAP2_router/HYMAP2_routingMod.F90 index c75b75b57..7fba8be0d 100644 --- a/lis/routing/HYMAP2_router/HYMAP2_routingMod.F90 +++ b/lis/routing/HYMAP2_router/HYMAP2_routingMod.F90 @@ -172,7 +172,7 @@ module HYMAP2_routingMod integer :: resopflag integer :: resoptype character(len=LIS_CONST_PATH_LEN) :: resopdir - character*100 :: resopheader + character(len=LIS_CONST_PATH_LEN) :: resopheader !ag (29Jun2016) integer :: floodflag character(len=LIS_CONST_PATH_LEN) :: HYMAP_dfile @@ -216,7 +216,7 @@ module HYMAP2_routingMod integer :: ntinsert !time series length (number of time steps in the input files) integer :: insertflag character(len=LIS_CONST_PATH_LEN) :: insertdir - character*100 :: insertheader + character(len=LIS_CONST_PATH_LEN) :: insertheader !ag(30Mar2021) ! === ocean tides variables/parameters === @@ -227,7 +227,7 @@ module HYMAP2_routingMod integer :: nttides !time series length (number of time steps in the input files) integer :: tidesflag character(len=LIS_CONST_PATH_LEN) :: tidesdir - character*100 :: tidesheader + character(len=LIS_CONST_PATH_LEN) :: tidesheader end type HYMAP2_routing_dec @@ -286,13 +286,10 @@ subroutine HYMAP2_routingInit real, allocatable :: elevtn(:,:),uparea(:,:),basin(:,:) !ag (11Mar2016) - character*100 :: temp1 integer :: rc character*1 :: fproc(4) integer :: ios integer :: final_dirpos - character(len=LIS_CONST_PATH_LEN) :: diag_fname - character(len=LIS_CONST_PATH_LEN) :: diag_dir integer, external :: LIS_create_subdirs !ag (03Apr2017) @@ -2122,7 +2119,6 @@ subroutine HYMAP2_read_param_real(ctitle,n,z,array) integer :: status integer :: l integer :: varid - character*100 :: cfile ! real :: array1(LIS_rc%gnc(n),LIS_rc%gnr(n),z) #if (defined USE_NETCDF3 || defined USE_NETCDF4) @@ -2185,7 +2181,6 @@ subroutine HYMAP2_read_param_real_2d(ctitle,n,array) logical :: file_exists integer :: status integer :: varid - character*100 :: cfile #if (defined USE_NETCDF3 || defined USE_NETCDF4) @@ -2240,7 +2235,6 @@ subroutine HYMAP2_read_param_int(ctitle,z,n,array) logical :: file_exists integer :: status integer :: c,r,l - character*100 :: cfile integer :: varid #if (defined USE_NETCDF3 || defined USE_NETCDF4) @@ -2295,7 +2289,6 @@ subroutine HYMAP2_read_param_int_2d(ctitle,n,array) logical :: file_exists integer :: status integer :: c,r - character*100 :: cfile integer :: varid #if (defined USE_NETCDF3 || defined USE_NETCDF4) @@ -2351,7 +2344,6 @@ subroutine HYMAP2_read_param_int_2d_global(ctitle,n,array) logical :: file_exists integer :: status integer :: c,r - character*100 :: cfile integer :: varid #if (defined USE_NETCDF3 || defined USE_NETCDF4) diff --git a/lis/routing/HYMAP2_router/HYMAP2_routing_output.F90 b/lis/routing/HYMAP2_router/HYMAP2_routing_output.F90 index 89e41d046..df20202fa 100755 --- a/lis/routing/HYMAP2_router/HYMAP2_routing_output.F90 +++ b/lis/routing/HYMAP2_router/HYMAP2_routing_output.F90 @@ -29,7 +29,7 @@ subroutine HYMAP2_routing_output(n) character(len=12) :: cdate1 integer :: iret character(len=LIS_CONST_PATH_LEN) :: filename - character*100 :: name + character(len=LIS_CONST_PATH_LEN) :: name integer :: ftn integer :: mo, da logical :: open_stats diff --git a/lis/routing/HYMAP2_router/da_WL/HYMAP2_daWL_Mod.F90 b/lis/routing/HYMAP2_router/da_WL/HYMAP2_daWL_Mod.F90 index 096959051..db09e2f21 100644 --- a/lis/routing/HYMAP2_router/da_WL/HYMAP2_daWL_Mod.F90 +++ b/lis/routing/HYMAP2_router/da_WL/HYMAP2_daWL_Mod.F90 @@ -64,6 +64,7 @@ subroutine HYMAP2_daWL_init(k) ! !USES: use HYMAP2_routingMod use HYMAP2_initMod + use LIS_constantsMod, only: LIS_CONST_PATH_LEN #if (defined USE_NETCDF3 || defined USE_NETCDF4) use netcdf #endif @@ -84,7 +85,7 @@ subroutine HYMAP2_daWL_init(k) integer :: ncId, nrId, siteId integer :: nc,nr,drainid,sid logical :: local_upd_flag - character*100 :: localWeightMap + character(len=LIS_CONST_PATH_LEN) :: localWeightMap logical :: file_exists if(.not.allocated(HYMAP2_daWL_struc)) then diff --git a/lis/routing/HYMAP2_router/runoffdata/LISoutput/readLISrunoffdata.F90 b/lis/routing/HYMAP2_router/runoffdata/LISoutput/readLISrunoffdata.F90 index c31863dce..e9740f630 100755 --- a/lis/routing/HYMAP2_router/runoffdata/LISoutput/readLISrunoffdata.F90 +++ b/lis/routing/HYMAP2_router/runoffdata/LISoutput/readLISrunoffdata.F90 @@ -18,6 +18,7 @@ ! ! !USES: subroutine readLISrunoffdata(n,surface_runoff, baseflow) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_logMod use LISrunoffdataMod @@ -59,7 +60,7 @@ subroutine readLISrunoffdata(n,surface_runoff, baseflow) logical*1 :: lo(LIS_rc%lnc(n)*LIS_rc%lnr(n)) real :: var_out(LIS_rc%lnc(n)*LIS_rc%lnr(n)) integer :: ios, nid,qsid,qsbid,evapid - character*100 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename logical :: file_exists logical :: check_Flag !create LIS filename diff --git a/lis/routing/HYMAP_router/HYMAP_routingMod.F90 b/lis/routing/HYMAP_router/HYMAP_routingMod.F90 index 92dfb4e45..94f8f56f6 100755 --- a/lis/routing/HYMAP_router/HYMAP_routingMod.F90 +++ b/lis/routing/HYMAP_router/HYMAP_routingMod.F90 @@ -642,7 +642,6 @@ subroutine read_param_real(ctitle,z,n,array) logical :: file_exists integer :: status integer :: varid - character*100 :: cfile #if (defined USE_NETCDF3 || defined USE_NETCDF4) @@ -688,7 +687,6 @@ subroutine read_param_int(ctitle,z,n,array) logical :: file_exists integer :: status integer :: c,r,l - character*100 :: cfile integer :: varid real :: array1(LIS_rc%gnc(n),LIS_rc%gnr(n),z) diff --git a/lis/routing/HYMAP_router/HYMAP_routing_output.F90 b/lis/routing/HYMAP_router/HYMAP_routing_output.F90 index fde1fe2b4..f53c82d9e 100755 --- a/lis/routing/HYMAP_router/HYMAP_routing_output.F90 +++ b/lis/routing/HYMAP_router/HYMAP_routing_output.F90 @@ -28,7 +28,7 @@ subroutine HYMAP_routing_output(n) character(len=12) :: cdate1 integer :: iret character(len=LIS_CONST_PATH_LEN) :: filename - character*100 :: name + character(len=LIS_CONST_PATH_LEN) :: name integer :: ftn integer :: mo, da logical :: open_stats diff --git a/lis/routing/NLDAS_router/NLDAS_routingMod.F90 b/lis/routing/NLDAS_router/NLDAS_routingMod.F90 index 11e4c24ea..c089f76ec 100644 --- a/lis/routing/NLDAS_router/NLDAS_routingMod.F90 +++ b/lis/routing/NLDAS_router/NLDAS_routingMod.F90 @@ -60,8 +60,8 @@ module NLDAS_routingMod real, allocatable :: streamflow(:,:) - character*100 :: initial_1 - character*100 :: initial_2 + character(len=LIS_CONST_PATH_LEN) :: initial_1 + character(len=LIS_CONST_PATH_LEN) :: initial_2 character(len=LIS_CONST_PATH_LEN) :: rstfile real, allocatable :: area(:,:) @@ -96,7 +96,7 @@ subroutine NLDAS_routingInit integer :: n integer :: ftn integer :: status - character*100 :: uh_file_1, uh_file_2 + character(len=LIS_CONST_PATH_LEN) :: uh_file_1, uh_file_2 character(len=LIS_CONST_PATH_LEN) :: order_file integer :: i,j,k integer :: yr, mo, da, hr, mn, ss diff --git a/lis/routing/NLDAS_router/NLDAS_routing_output.F90 b/lis/routing/NLDAS_router/NLDAS_routing_output.F90 index e11412fdf..03199e182 100644 --- a/lis/routing/NLDAS_router/NLDAS_routing_output.F90 +++ b/lis/routing/NLDAS_router/NLDAS_routing_output.F90 @@ -28,7 +28,7 @@ subroutine NLDAS_routing_output(n) character(len=12) :: cdate1 integer :: iret character(len=LIS_CONST_PATH_LEN) :: filename - character*100 :: name + character(len=LIS_CONST_PATH_LEN) :: name integer :: ftn integer :: mo, da logical :: open_stats diff --git a/lis/routing/RAPID_router/RAPID_model_main.F90 b/lis/routing/RAPID_router/RAPID_model_main.F90 index d41262136..80babe512 100644 --- a/lis/routing/RAPID_router/RAPID_model_main.F90 +++ b/lis/routing/RAPID_router/RAPID_model_main.F90 @@ -75,6 +75,7 @@ subroutine RAPID_model_main (n,bQinit,bQfinal,bV,bhum,bfor, & vecscat,ZV_SeqZero,ZV_pointer,IV_riv_loc1,IV_riv_index, & ZV_riv_tot_lat,ZV_riv_tot_lon +use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only: LIS_rc use LIS_logMod use LIS_timeMgrMod @@ -99,18 +100,18 @@ subroutine RAPID_model_main (n,bQinit,bQfinal,bV,bhum,bfor, & integer, intent(in) :: run_opt ! run option integer, intent(in) :: routing_opt ! routing option integer, intent(in) :: phi_opt ! phi option -character*200, intent(in) :: connectfile ! river connectivity file +character(len=LIS_CONST_PATH_LEN), intent(in) :: connectfile ! river connectivity file integer, intent(in) :: n_riv_tot ! number of river connectivity integer, intent(in) :: max_reach ! max number of upstream reaches -character*200, intent(in) :: weightfile ! river weight table +character(len=LIS_CONST_PATH_LEN), intent(in) :: weightfile ! river weight table integer, intent(in) :: n_wei_table ! number of reach in weight table file -character*200, intent(in) :: basinIDfile ! river basin ID file +character(len=LIS_CONST_PATH_LEN), intent(in) :: basinIDfile ! river basin ID file integer, intent(in) :: n_riv_bas ! number of river basins -character*200, intent(in) :: kfile ! Muskingum parameter k file -character*200, intent(in) :: xfile ! Muskingum parameter x file +character(len=LIS_CONST_PATH_LEN), intent(in) :: kfile ! Muskingum parameter k file +character(len=LIS_CONST_PATH_LEN), intent(in) :: xfile ! Muskingum parameter x file -character*200, intent(in) :: nmlfile -character*200, intent(in) :: qfile +character(len=LIS_CONST_PATH_LEN), intent(in) :: nmlfile +character(len=LIS_CONST_PATH_LEN), intent(in) :: qfile !Runoff data are in kg/m2 accumulated over a time step integer, intent(in) :: nc, nr diff --git a/lis/routing/RAPID_router/RAPID_routingMod.F90 b/lis/routing/RAPID_router/RAPID_routingMod.F90 index 171e9d25b..ade9fdd11 100644 --- a/lis/routing/RAPID_router/RAPID_routingMod.F90 +++ b/lis/routing/RAPID_router/RAPID_routingMod.F90 @@ -28,7 +28,7 @@ module RAPID_routingMod ! ! !USES: use ESMF - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none PRIVATE @@ -47,7 +47,7 @@ module RAPID_routingMod real :: dt integer :: imis !! real undefined value - character*100 :: rstfile + character(len=LIS_CONST_PATH_LEN) :: rstfile integer :: numout integer :: fileopen real :: outInterval @@ -67,14 +67,14 @@ module RAPID_routingMod integer :: run_opt ! run option integer :: routing_opt ! routing option integer :: phi_opt ! phi option - character*200 :: connectfile ! river connectivity file + character(len=LIS_CONST_PATH_LEN) :: connectfile ! river connectivity file integer :: max_reach ! max number of upstream reaches - character*200 :: weightfile ! river weight table - character*200 :: basinIDfile ! river basin ID file - character*200 :: kfile ! Muskingum parameter k file - character*200 :: xfile ! Muskingum parameter x file + character(len=LIS_CONST_PATH_LEN) :: weightfile ! river weight table + character(len=LIS_CONST_PATH_LEN) :: basinIDfile ! river basin ID file + character(len=LIS_CONST_PATH_LEN) :: kfile ! Muskingum parameter k file + character(len=LIS_CONST_PATH_LEN) :: xfile ! Muskingum parameter x file - character*200 :: nmlfile + character(len=LIS_CONST_PATH_LEN) :: nmlfile integer :: n_riv_tot ! number of river connectivity integer :: n_riv_bas ! number of river basins diff --git a/lis/routing/RAPID_router/RAPID_routing_output.F90 b/lis/routing/RAPID_router/RAPID_routing_output.F90 index d97fdfb2a..d6cf5e63e 100644 --- a/lis/routing/RAPID_router/RAPID_routing_output.F90 +++ b/lis/routing/RAPID_router/RAPID_routing_output.F90 @@ -39,7 +39,6 @@ subroutine RAPID_routing_output(n) integer, intent(in) :: n - !character*100 :: filename character(len=LIS_CONST_PATH_LEN) :: filename ! EMK integer :: ftn integer :: status diff --git a/lis/routing/RAPID_router/RAPID_routing_readrst.F90 b/lis/routing/RAPID_router/RAPID_routing_readrst.F90 index 86253fa24..81c36cde0 100644 --- a/lis/routing/RAPID_router/RAPID_routing_readrst.F90 +++ b/lis/routing/RAPID_router/RAPID_routing_readrst.F90 @@ -29,7 +29,6 @@ subroutine RAPID_routing_readrst integer :: n integer :: ftn integer :: status - character*100 :: filename logical :: read_restart integer :: varid_Qout diff --git a/lis/routing/RAPID_router/RAPID_routing_run.F90 b/lis/routing/RAPID_router/RAPID_routing_run.F90 index 65fc7686f..15eb54939 100644 --- a/lis/routing/RAPID_router/RAPID_routing_run.F90 +++ b/lis/routing/RAPID_router/RAPID_routing_run.F90 @@ -49,7 +49,6 @@ subroutine RAPID_routing_run(n) integer :: status logical :: alarmCheck - !character*200 :: qout_filename character(len=LIS_CONST_PATH_LEN) :: qout_filename ! EMK ! for mpi real, allocatable :: runoff1_t(:) diff --git a/lis/routing/RAPID_router/RAPID_routing_writerst.F90 b/lis/routing/RAPID_router/RAPID_routing_writerst.F90 index 925a3aced..de7b3426c 100644 --- a/lis/routing/RAPID_router/RAPID_routing_writerst.F90 +++ b/lis/routing/RAPID_router/RAPID_routing_writerst.F90 @@ -27,6 +27,7 @@ subroutine RAPID_routing_writerst(n) ! use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_logMod use LIS_fileIOMod @@ -40,7 +41,7 @@ subroutine RAPID_routing_writerst(n) integer, intent(in) :: n - character*100 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename integer :: ftn integer :: status logical :: alarmCheck diff --git a/lis/routing/RAPID_router/src/rapid_var.F90 b/lis/routing/RAPID_router/src/rapid_var.F90 index 31236d38d..aa56d7339 100755 --- a/lis/routing/RAPID_router/src/rapid_var.F90 +++ b/lis/routing/RAPID_router/src/rapid_var.F90 @@ -19,6 +19,9 @@ module rapid_var !******************************************************************************* #include use petsctao + +use LIS_constantsMod, only: LIS_CONST_PATH_LEN + implicit none @@ -53,73 +56,73 @@ module rapid_var !******************************************************************************* !Declaration of variables - input and output files !******************************************************************************* -character(len=200) :: rapid_connect_file +character(len=LIS_CONST_PATH_LEN) :: rapid_connect_file !unit 10 - file with connectivity information using RAPID connectivity format -character(len=200) :: riv_bas_id_file +character(len=LIS_CONST_PATH_LEN) :: riv_bas_id_file !unit 11 - file with all the IDs of the reaches in _riv considered -character(len=200) :: obs_tot_id_file +character(len=LIS_CONST_PATH_LEN) :: obs_tot_id_file !unit 12 - file with all the IDs of the all reaches with gage measurements -character(len=200) :: obs_use_id_file +character(len=LIS_CONST_PATH_LEN) :: obs_use_id_file !unit 13 - file with all the IDs of the reaches used -character(len=200) :: hum_tot_id_file +character(len=LIS_CONST_PATH_LEN) :: hum_tot_id_file !unit 14 - file with all the IDs of the reaches with human-induced flow added -character(len=200) :: hum_use_id_file +character(len=LIS_CONST_PATH_LEN) :: hum_use_id_file !unit 15 - file with all the IDs of the reaches used -character(len=200) :: for_tot_id_file +character(len=LIS_CONST_PATH_LEN) :: for_tot_id_file !unit 16 - file with all the IDs where flows can be used as forcing to their !corresponding downstream reach -character(len=200) :: for_use_id_file +character(len=LIS_CONST_PATH_LEN) :: for_use_id_file !unit 17 - file with all the IDs of the reaches used -character(len=200) :: dam_tot_id_file +character(len=LIS_CONST_PATH_LEN) :: dam_tot_id_file !unit 18 - file with all the IDs of the reaches where the dam model runs and !flows to their corresponding downstream reach -character(len=200) :: dam_use_id_file +character(len=LIS_CONST_PATH_LEN) :: dam_use_id_file !unit 19 - file with all the IDs of the reaches used -character(len=200) :: k_file +character(len=LIS_CONST_PATH_LEN) :: k_file !unit 20 - file with values for k (possibly from previous param. estim.) -character(len=200) :: x_file +character(len=LIS_CONST_PATH_LEN) :: x_file !unit 21 - file with values for x (possibly from previous param. estim.) -character(len=200) :: kfac_file +character(len=LIS_CONST_PATH_LEN) :: kfac_file !unit 22 - file with kfac for all reaches of the domain -character(len=200) :: xfac_file +character(len=LIS_CONST_PATH_LEN) :: xfac_file !unit 23 - file with xfac for all reaches of the domain -character(len=200) :: dam_file +character(len=LIS_CONST_PATH_LEN) :: dam_file !unit 24 - file with dam information for all dams of the domain -character(len=200) :: Qinit_file +character(len=LIS_CONST_PATH_LEN) :: Qinit_file !unit 30 - file where initial flowrates can be stored to run the model with them -character(len=200) :: Qfinal_file +character(len=LIS_CONST_PATH_LEN) :: Qfinal_file !unit 31 - file where final flowrates can be stored at the end of model run -character(len=200) :: Vlat_file +character(len=LIS_CONST_PATH_LEN) :: Vlat_file -character(len=200) :: Qobs_file +character(len=LIS_CONST_PATH_LEN) :: Qobs_file !unit 33 - file where the flowrates observations are given -character(len=200) :: Qfor_file +character(len=LIS_CONST_PATH_LEN) :: Qfor_file !unit 34 - file where forcing flowrates are stored. Forcing is taken as the !flow coming from upstream reach. -character(len=200) :: Qobsbarrec_file +character(len=LIS_CONST_PATH_LEN) :: Qobsbarrec_file !unit 35 - file where the reciprocal (1/xi) of the average obs are stored. -character(len=200) :: Qhum_file +character(len=LIS_CONST_PATH_LEN) :: Qhum_file !unit 36 - file where human-induced flowrates are stored. These flows are added !upstream. -character(len=200) :: babsmax_file +character(len=LIS_CONST_PATH_LEN) :: babsmax_file !unit 42 - file where the maximum of the absolute values of the right-hand-side !are stored -character(len=200) :: QoutRabsmin_file +character(len=LIS_CONST_PATH_LEN) :: QoutRabsmin_file !unit 43 - file where the minimum of the absolute values of the instantaneous !flows are stored -character(len=200) :: QoutRabsmax_file +character(len=LIS_CONST_PATH_LEN) :: QoutRabsmax_file !unit 44 - file where the maximum of the absolute values of the instantaneous !flows are stored -character(len=200) :: Qout_file +character(len=LIS_CONST_PATH_LEN) :: Qout_file ! - file where the flow of water at the outlet of each reach are stored -character(len=200) :: V_file +character(len=LIS_CONST_PATH_LEN) :: V_file ! - file where the volume of water in each reach are stored !Yeosang Yoon -character(len=200) :: weight_table_file ! weight factors for calculating boundary inflows +character(len=LIS_CONST_PATH_LEN) :: weight_table_file ! weight factors for calculating boundary inflows integer :: n_weight_table ! weight table size !******************************************************************************* @@ -663,7 +666,7 @@ module rapid_var ZS_dtF,ZS_dtH, & ZS_phifac,IS_strt_opt -character(len=200) :: namelist_file +character(len=LIS_CONST_PATH_LEN) :: namelist_file !unit 88 - Namelist diff --git a/lis/rtms/CRTM/CRTM_handlerMod.F90 b/lis/rtms/CRTM/CRTM_handlerMod.F90 index c9e84d89a..033590250 100644 --- a/lis/rtms/CRTM/CRTM_handlerMod.F90 +++ b/lis/rtms/CRTM/CRTM_handlerMod.F90 @@ -29,6 +29,7 @@ module CRTM_handlerMod USE CRTM_Module use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none @@ -55,7 +56,7 @@ module CRTM_handlerMod integer :: nclouds integer :: naerosols character*256 :: sensor_id - character*100 :: coeff_data + character(len=LIS_CONST_PATH_LEN) :: coeff_data real :: zenith_angle type(CRTM_ChannelInfo_type), allocatable :: ChannelInfo(:) type(CRTM_GeometryInfo_type), allocatable :: GeometryInfo(:) diff --git a/lis/rtms/CRTM2/CRTM2_handlerMod.F90 b/lis/rtms/CRTM2/CRTM2_handlerMod.F90 index 330eb7459..d3fbb2423 100644 --- a/lis/rtms/CRTM2/CRTM2_handlerMod.F90 +++ b/lis/rtms/CRTM2/CRTM2_handlerMod.F90 @@ -28,6 +28,7 @@ module CRTM2_handlerMod USE CRTM_Module use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none @@ -54,7 +55,7 @@ module CRTM2_handlerMod integer :: nclouds integer :: naerosols character*256 :: sensor_id - character*100 :: coeff_data + character(len=LIS_CONST_PATH_LEN) :: coeff_data real :: zenith_angle type(CRTM_ChannelInfo_type), allocatable :: ChannelInfo(:) type(CRTM_Geometry_type), allocatable :: Geometry(:) diff --git a/lis/rtms/CRTM2EM/CRTM2_EMMod.F90 b/lis/rtms/CRTM2EM/CRTM2_EMMod.F90 index d9749dec3..c96063048 100644 --- a/lis/rtms/CRTM2EM/CRTM2_EMMod.F90 +++ b/lis/rtms/CRTM2EM/CRTM2_EMMod.F90 @@ -58,7 +58,7 @@ module CRTM2_EMMod integer :: nclouds integer :: naerosols character*256 :: sensor_id - character*100 :: coeff_data + character(len=LIS_CONST_PATH_LEN) :: coeff_data real :: zenith_angle integer :: SensorIndex integer :: ChannelIndex diff --git a/lis/rtms/CRTM2EM/pe/CRTM2EM_peMod.F90 b/lis/rtms/CRTM2EM/pe/CRTM2EM_peMod.F90 index c92750d2f..f528f0b28 100644 --- a/lis/rtms/CRTM2EM/pe/CRTM2EM_peMod.F90 +++ b/lis/rtms/CRTM2EM/pe/CRTM2EM_peMod.F90 @@ -60,14 +60,15 @@ module crtm2em_peMod ! !INTERFACE: subroutine crtm2em_setup_pedecvars(DEC_State, Feas_State) ! !USES: +#if (defined RTMS) use LIS_coreMod, only : LIS_rc, LIS_config,LIS_vecPatch, LIS_surface, LIS_localPET use LIS_logMod, only : LIS_logunit, LIS_verify -#if (defined RTMS) + use CRTM2_EMMod, only : crtm_struc + use LIS_constantsMod, only : LIS_CONST_PATH_LEN #endif implicit none ! !ARGUMENTS: - character*100 :: decSpaceAttribsFile type(ESMF_State) :: DEC_State type(ESMF_State) :: Feas_State @@ -78,6 +79,8 @@ subroutine crtm2em_setup_pedecvars(DEC_State, Feas_State) ! estimation, initializes them, and updates the LIS decision space. ! !EOP +#if (defined RTMS) + character(len=LIS_CONST_PATH_LEN) :: decSpaceAttribsFile integer :: n type(ESMF_ArraySpec) :: arrspec1 @@ -95,7 +98,6 @@ subroutine crtm2em_setup_pedecvars(DEC_State, Feas_State) integer :: count integer :: gid -#if (defined RTMS) call ESMF_StateGet(Feas_State, "Feasibility Flag", feasField, rc=status) call LIS_verify(status) call ESMF_FieldGet(feasField,localDE=0,farrayPtr=mod_flag,rc=status) diff --git a/lis/rtms/LIS-CMEM3/CMEM3_Mod.F90 b/lis/rtms/LIS-CMEM3/CMEM3_Mod.F90 index 1db477379..6fe4e100b 100644 --- a/lis/rtms/LIS-CMEM3/CMEM3_Mod.F90 +++ b/lis/rtms/LIS-CMEM3/CMEM3_Mod.F90 @@ -150,7 +150,6 @@ subroutine CMEM3_initialize() integer :: j integer :: n_Sensors, n_Channels, n_tiles, n_fs, nc, np, rc, ftn integer :: status - character*100 :: temp, fieldname real, allocatable :: tmp_gridDesc(:, :) allocate(tmp_gridDesc(LIS_rc%nnest, 8)) diff --git a/lis/rtms/LIS-CMEM3/pe/CMEM3_peMod.F90 b/lis/rtms/LIS-CMEM3/pe/CMEM3_peMod.F90 index 377bb1199..ec55060c8 100644 --- a/lis/rtms/LIS-CMEM3/pe/CMEM3_peMod.F90 +++ b/lis/rtms/LIS-CMEM3/pe/CMEM3_peMod.F90 @@ -60,6 +60,7 @@ module cmem3_peMod ! !INTERFACE: subroutine cmem3_setup_pedecvars(DEC_State, Feas_State) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_config,LIS_vecPatch, LIS_surface, LIS_localPET use LIS_logMod, only : LIS_logunit, LIS_verify #if (defined RTMS) @@ -67,7 +68,6 @@ subroutine cmem3_setup_pedecvars(DEC_State, Feas_State) #endif implicit none ! !ARGUMENTS: - character*100 :: decSpaceAttribsFile type(ESMF_State) :: DEC_State type(ESMF_State) :: Feas_State @@ -78,7 +78,9 @@ subroutine cmem3_setup_pedecvars(DEC_State, Feas_State) ! estimation, initializes them, and updates the LIS decision space. ! !EOP - +#if (defined RTMS) + character(len=LIS_CONST_PATH_LEN) :: decSpaceAttribsFile +#endif integer :: n type(ESMF_ArraySpec) :: arrspec1 type(ESMF_Field) :: varField diff --git a/lis/rtms/LIS-CMEM3/readCMEM3crd.F90 b/lis/rtms/LIS-CMEM3/readCMEM3crd.F90 index 5310fbeb8..69e45049b 100644 --- a/lis/rtms/LIS-CMEM3/readCMEM3crd.F90 +++ b/lis/rtms/LIS-CMEM3/readCMEM3crd.F90 @@ -40,7 +40,7 @@ subroutine readCMEM3crd() integer :: ftn integer :: n, j real :: freqs(100), theta(100) - character(len=LIS_CONST_PATH_LEN) :: fname(100) + character*50 :: fname(100) call ESMF_ConfigFindLabel(LIS_config,"CMEM3 sensor id:",rc=rc) do n=1,LIS_rc%nnest diff --git a/lis/runmodes/nuopc_cpl_mode/LIS_ESMF_Extensions.F90 b/lis/runmodes/nuopc_cpl_mode/LIS_ESMF_Extensions.F90 index 1fe8d4f56..fdba453ee 100644 --- a/lis/runmodes/nuopc_cpl_mode/LIS_ESMF_Extensions.F90 +++ b/lis/runmodes/nuopc_cpl_mode/LIS_ESMF_Extensions.F90 @@ -382,7 +382,8 @@ subroutine LIS_ESMF_GridWrite_preset(grid, nclScript, mapPreset, & ! call using generic interface: LIS_ESMF_GridWrite subroutine LIS_ESMF_GridWrite_default(grid, fileName, overwrite, status, & timeslice, iofmt, relaxedflag, nclScript, map, rc) -! ! ARGUMENTS + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + ! ! ARGUMENTS type(ESMF_Grid), intent(in) :: grid character(len=*), intent(in), optional :: fileName logical, intent(in), optional :: overwrite @@ -451,7 +452,7 @@ subroutine LIS_ESMF_GridWrite_default(grid, fileName, overwrite, status, & ! local variables logical :: ioCapable logical :: doItFlag - character(len=64) :: lfileName + character(len=LIS_CONST_PATH_LEN) :: lfileName character(len=64) :: gridName type(ESMF_Array) :: array type(ESMF_ArrayBundle) :: arraybundle @@ -615,7 +616,8 @@ subroutine LIS_ESMF_GridWrite_default(grid, fileName, overwrite, status, & ! !INTERFACE: ! call using generic interface: LIS_ESMF_DecompWrite subroutine LIS_ESMF_DecompWrite(grid, fileName, overwrite, status, & - iofmt, relaxedflag, rc) + iofmt, relaxedflag, rc) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! ! ARGUMENTS type(ESMF_Grid), intent(in) :: grid character(len=*), intent(in), optional :: fileName @@ -677,7 +679,7 @@ subroutine LIS_ESMF_DecompWrite(grid, fileName, overwrite, status, & ! local variables logical :: ioCapable logical :: doItFlag - character(len=64) :: lfileName + character(len=LIS_CONST_PATH_LEN) :: lfileName character(len=64) :: gridName integer :: rank type(ESMF_VM) :: vm diff --git a/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_Cap.F90 b/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_Cap.F90 index 171ec96a9..c0fe8e52b 100644 --- a/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_Cap.F90 +++ b/lis/runmodes/nuopc_cpl_mode/LIS_NUOPC_Cap.F90 @@ -243,6 +243,7 @@ module LIS_NUOPC model_label_CheckImport => label_CheckImport, & model_label_Advance => label_Advance, & model_label_Finalize => label_Finalize + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_NUOPC_Gluecode use LIS_ESMF_Extensions @@ -256,12 +257,12 @@ module LIS_NUOPC INTEGER, PARAMETER :: MAXNEST = 999999999 type type_InternalStateStruct - character(len=64) :: configFile = 'lis.config' + character(len=LIS_CONST_PATH_LEN) :: configFile = 'lis.config' logical :: realizeAllExport = .FALSE. logical :: nestToNest = .FALSE. logical :: cplEns = .FALSE. logical :: importDependency = .FALSE. - character(len=40) :: dirOutput = "." + character(len=LIS_CONST_PATH_LEN) :: dirOutput = "." integer :: nnests = 0 integer :: nfields = size(LIS_FieldList) integer,allocatable :: ensMemberCnt(:) diff --git a/lis/surfacemodels/glacier/noahmp.3.9.1.1/noahmpglacier3911_Mod.F90 b/lis/surfacemodels/glacier/noahmp.3.9.1.1/noahmpglacier3911_Mod.F90 index 1d510dc13..404ea272b 100644 --- a/lis/surfacemodels/glacier/noahmp.3.9.1.1/noahmpglacier3911_Mod.F90 +++ b/lis/surfacemodels/glacier/noahmp.3.9.1.1/noahmpglacier3911_Mod.F90 @@ -199,10 +199,10 @@ module noahmpglacier3911_Mod !------------------------------------------------------------------------- ! Constant Parameter !------------------------------------------------------------------------- - character(len=256) :: landuse_tbl_name - character(len=256) :: soil_tbl_name - character(len=256) :: gen_tbl_name - character(len=256) :: noahmp_tbl_name + character(len=LIS_CONST_PATH_LEN) :: landuse_tbl_name + character(len=LIS_CONST_PATH_LEN) :: soil_tbl_name + character(len=LIS_CONST_PATH_LEN) :: gen_tbl_name + character(len=LIS_CONST_PATH_LEN) :: noahmp_tbl_name character(len=256) :: landuse_scheme_name character(len=256) :: soil_scheme_name integer :: alb_opt diff --git a/lis/surfacemodels/land/clm2/biogeochem/DustEmissionMod.F90 b/lis/surfacemodels/land/clm2/biogeochem/DustEmissionMod.F90 index 4d735a34b..c9bf4a379 100644 --- a/lis/surfacemodels/land/clm2/biogeochem/DustEmissionMod.F90 +++ b/lis/surfacemodels/land/clm2/biogeochem/DustEmissionMod.F90 @@ -316,6 +316,7 @@ subroutine Dustini ! $Id: DustEmissionMod.F90,v 1.6 2004/11/24 22:56:13 jim Exp $ !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use clm2_lsmMod use clm_varmap, only : begpatch, endpatch #if (defined MAKE_DUST_BASIN) @@ -325,7 +326,7 @@ subroutine Dustini include 'netcdf.inc' ! ------------------------ local variables --------------------------- - character(len=80) felev !elevation file + character(len=LIS_CONST_PATH_LEN) felev !elevation file ! NETCDF related diff --git a/lis/surfacemodels/land/clm2/camclm_share/fileutils.F90 b/lis/surfacemodels/land/clm2/camclm_share/fileutils.F90 index de620862c..8cc75f540 100644 --- a/lis/surfacemodels/land/clm2/camclm_share/fileutils.F90 +++ b/lis/surfacemodels/land/clm2/camclm_share/fileutils.F90 @@ -10,6 +10,7 @@ #include module fileutils + use LIS_constantsMod, only: LIS_CONST_PATH_LEN !public methods public :: get_filename @@ -27,7 +28,7 @@ module fileutils CONTAINS !======================================================================= - character(len=256) function get_filename (fulpath) + character(len=LIE_CONST_PATH_LEN) function get_filename (fulpath) !----------------------------------------------------------------------- ! @@ -61,7 +62,7 @@ end function get_filename !======================================================================= - character(len=256) function set_filename (rem_dir, loc_fn) + character(len=LIS_CONST_PATH_LEN) function set_filename (rem_dir, loc_fn) !----------------------------------------------------------------------- ! @@ -95,6 +96,7 @@ end function set_filename !======================================================================= subroutine getfil (fulpath, locfn, iflag) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_logunit !----------------------------------------------------------------------- ! @@ -121,7 +123,7 @@ subroutine getfil (fulpath, locfn, iflag) integer klen !length of fulpath character string integer ierr !error status logical lexist !true if local file exists - character(len=256) text !mswrite command + character(len=LIS_CONST_PATH_LEN) text !mswrite command ! -------------------------------------------------------------------- @@ -180,6 +182,7 @@ end subroutine getfil !======================================================================= subroutine putfil(locfn, mssfpn, pass, irt, lremov) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_logunit !----------------------------------------------------------------------- ! @@ -205,8 +208,8 @@ subroutine putfil(locfn, mssfpn, pass, irt, lremov) !----------------------------------------------------------------------- !---------------------------Local workspace----------------------------- - character(len=256) cmd ! Command string - character(len=256) cmdtem ! Temporary for command string + character(len=LIS_CONST_PATH_LEN) cmd ! Command string + character(len=LIS_CONST_PATH_LEN) cmdtem ! Temporary for command string character(len= 4) crt ! Retention time as characters character(len= 16) wpass ! Write password integer ier ! error number diff --git a/lis/surfacemodels/land/clm2/camclm_share/ioFileMod.F90 b/lis/surfacemodels/land/clm2/camclm_share/ioFileMod.F90 index 3185d7bd1..fb4712b83 100644 --- a/lis/surfacemodels/land/clm2/camclm_share/ioFileMod.F90 +++ b/lis/surfacemodels/land/clm2/camclm_share/ioFileMod.F90 @@ -28,7 +28,8 @@ module ioFileMod !======================================================================= subroutine getfil (fulpath, locfn, iflag) - + + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! -------------------------------------------------------------------- ! obtain local copy of file ! o first check current working directory @@ -47,7 +48,7 @@ subroutine getfil (fulpath, locfn, iflag) integer klen !length of fulpath character string integer ierr !error status logical lexist !true if local file exists - character(len=256) text !mswrite command + character(len=LIS_CONST_PATH_LEN) text !mswrite command ! -------------------------------------------------------------------- @@ -111,7 +112,8 @@ subroutine putfil(locfn ,mssfpn ,pass ,mvn , & !----------------------------------------------------------------------- ! Dispose model output file to Mass Store !----------------------------------------------------------------------- - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + !------------------------------Arguments-------------------------------- integer, intent(in) :: irt ! Mass Store retention time character(len=*), intent(in) :: locfn ! Local filename @@ -123,8 +125,8 @@ subroutine putfil(locfn ,mssfpn ,pass ,mvn , & !----------------------------------------------------------------------- !---------------------------Local workspace----------------------------- - character(len=256) cmd ! Command string - character(len=256) cmdtem ! Temporary for command string + character(len=LIS_CONST_PATH_LEN) cmd ! Command string + character(len=LIS_CONST_PATH_LEN) cmdtem ! Temporary for command string character(len= 4) crt ! Retention time as characters character(len= 16) wpass ! Write password integer ier ! error number diff --git a/lis/surfacemodels/land/clm2/csm_share/clm2_shr_file_mod.F90 b/lis/surfacemodels/land/clm2/csm_share/clm2_shr_file_mod.F90 index 4e28eda73..e7df0d4fa 100644 --- a/lis/surfacemodels/land/clm2/csm_share/clm2_shr_file_mod.F90 +++ b/lis/surfacemodels/land/clm2/csm_share/clm2_shr_file_mod.F90 @@ -15,6 +15,7 @@ MODULE clm2_shr_file_mod use clm2_shr_kind_mod, only: CLM2_SHR_KIND_IN use clm2_shr_sys_mod, only: clm2_shr_sys_system ! System calls + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_logMod, only : LIS_logunit IMPLICIT none @@ -37,12 +38,12 @@ SUBROUTINE clm2_shr_file_put(rcode,loc_fn,rem_fn,passwd,rtpd,async,remove) logical ,optional :: async ! true <=> asynchronous put !----- local ----- - character(len=256) :: passwd2 ! password + character(len=LIS_CONST_PATH_LEN) :: passwd2 ! password integer(CLM2_SHR_KIND_IN) :: rtpd2 ! MSS retention period logical :: remove2 ! true <=> rm after put logical :: async2 ! true <=> asynchronous put - character(len=256) :: rfn ! rem_fn without the destination prefix - character(len=256) :: cmd ! command sent to system call + character(len=LIS_CONST_PATH_LEN) :: rfn ! rem_fn without the destination prefix + character(len=LIS_CONST_PATH_LEN) :: cmd ! command sent to system call !----- formats ----- character(len=*),parameter :: F00 = "('(clm2_shr_file_put) ',4a)" @@ -129,11 +130,11 @@ SUBROUTINE clm2_shr_file_get(rcode,loc_fn,rem_fn,passwd,async,clobber) logical ,optional :: clobber ! true <=> clobber existing file !----- local ----- - character(len=256) :: passwd2 ! password + character(len=LIS_CONST_PATH_LEN) :: passwd2 ! password logical :: async2 ! true <=> asynchronous get logical :: clobber2 ! true <=> clobber existing file - character(len=256) :: rfn ! rem_fn without the destination prefix - character(len=256) :: cmd ! command sent to system call + character(len=LIS_CONST_PATH_LEN) :: rfn ! rem_fn without the destination prefix + character(len=LIS_CONST_PATH_LEN) :: cmd ! command sent to system call logical :: exists ! true <=> local file aready exists !----- formats ----- diff --git a/lis/surfacemodels/land/clm2/csm_share/clm2_shr_msg_mod.F90 b/lis/surfacemodels/land/clm2/csm_share/clm2_shr_msg_mod.F90 index 7893b2d63..7e7bb8858 100644 --- a/lis/surfacemodels/land/clm2/csm_share/clm2_shr_msg_mod.F90 +++ b/lis/surfacemodels/land/clm2/csm_share/clm2_shr_msg_mod.F90 @@ -166,6 +166,8 @@ MODULE clm2_shr_msg_mod SUBROUTINE clm2_shr_msg_stdio(model) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + !--- arguments --- character(len=*),intent(in) :: model ! used to construct env varible name @@ -173,9 +175,9 @@ SUBROUTINE clm2_shr_msg_stdio(model) character(len= 8) :: var_dir ! env variable name wrt cwd character(len= 8) :: var_in ! env variable name wrt stdin character(len= 8) :: var_out ! env variable name wrt stdout - character(len=256) :: str_dir ! env variable value for cwd - character(len=256) :: str_in ! env variable value for stdin file - character(len=256) :: str_out ! env variable value for stdout file + character(len=LIS_CONST_PATH_LEN) :: str_dir ! env variable value for cwd + character(len=LIS_CONST_PATH_LEN) :: str_in ! env variable value for stdin file + character(len=LIS_CONST_PATH_LEN) :: str_out ! env variable value for stdout file integer(SHR_KIND_IN) :: rcode_dir ! 0 => no error on cwd system call integer(SHR_KIND_IN) :: rcode_in ! 0 => no error on stdin system call integer(SHR_KIND_IN) :: rcode_out ! 0 => no error on stdout system call diff --git a/lis/surfacemodels/land/clm2/main/surfFileMod.F90 b/lis/surfacemodels/land/clm2/main/surfFileMod.F90 index 0898cc863..bbedc8a2a 100644 --- a/lis/surfacemodels/land/clm2/main/surfFileMod.F90 +++ b/lis/surfacemodels/land/clm2/main/surfFileMod.F90 @@ -88,6 +88,7 @@ subroutine surfrd(veg, wt, & ! $Id: surfFileMod.F90,v 1.6 2004/11/24 22:57:22 jim Exp $ !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_precisionMod use clm2_varpar !parameters use clm_varctl !control variables @@ -110,7 +111,7 @@ subroutine surfrd(veg, wt, & ! ---------------------------------------------------------------------- ! ------------------------ local variables ----------------------------- - character(len=256) :: locfn !local file name + character(len=LIS_CONST_PATH_LEN) :: locfn !local file name integer :: i,j,k,m !indices integer :: ier !error status ! integer :: pft(lsmlon,lsmlat,maxpatch_pft) !PFT diff --git a/lis/surfacemodels/land/clm2/mksrfdata/mkglacier.F90 b/lis/surfacemodels/land/clm2/mksrfdata/mkglacier.F90 index 5c3948514..c1b3486cd 100644 --- a/lis/surfacemodels/land/clm2/mksrfdata/mkglacier.F90 +++ b/lis/surfacemodels/land/clm2/mksrfdata/mkglacier.F90 @@ -25,6 +25,7 @@ subroutine mkglacier (fgla, ndiag, gla_o) ! $Id: mkglacier.F90,v 1.5 2004/05/07 22:18:36 jim Exp $ !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_precisionMod use clm2_varpar !parameters ! use clm2_varsur !surface variables @@ -40,7 +41,7 @@ subroutine mkglacier (fgla, ndiag, gla_o) ! ----------------------------------------------------------------- ! ------------------------ local variables ------------------------ - character(len=256) :: locfn !local dataset file name + character(len=LIS_CONST_PATH_LEN) :: locfn !local dataset file name integer :: nlon_i !input grid : longitude points (read in) integer :: nlat_i !input grid : latitude points (read in) diff --git a/lis/surfacemodels/land/clm2/mksrfdata/mkgridMod.F90 b/lis/surfacemodels/land/clm2/mksrfdata/mkgridMod.F90 index 38d482353..45af8fc67 100644 --- a/lis/surfacemodels/land/clm2/mksrfdata/mkgridMod.F90 +++ b/lis/surfacemodels/land/clm2/mksrfdata/mkgridMod.F90 @@ -93,6 +93,7 @@ subroutine read_grid_offline ! Author: Mariana Vertenstein ! !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN include 'netcdf.inc' @@ -107,7 +108,7 @@ subroutine read_grid_offline real(r8) :: lon(lsmlon) !input longitude array (full grid) real(r8) :: lat(lsmlat) !input latitude array (full grid) real(r8) :: oro(lsmlon,lsmlat) !input oro field - character(len=256) :: locfn !local file name + character(len=LIS_CONST_PATH_LEN) :: locfn !local file name !----------------------------------------------------------------------- write (6,*) 'Attempting to read land grid data .....' @@ -237,9 +238,10 @@ subroutine create_grid_offline ! Author: Mariana Vertenstein ! !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! ------------------------ local variables ------------------------ - character(len=256) :: locfn !local file name + character(len=LIS_CONST_PATH_LEN) :: locfn !local file name integer :: i,j,k,n !indices integer :: ii,ji,io,jo !indices diff --git a/lis/surfacemodels/land/clm2/mksrfdata/mklai.F90 b/lis/surfacemodels/land/clm2/mksrfdata/mklai.F90 index 08c045904..6de400b02 100644 --- a/lis/surfacemodels/land/clm2/mksrfdata/mklai.F90 +++ b/lis/surfacemodels/land/clm2/mksrfdata/mklai.F90 @@ -27,6 +27,7 @@ subroutine mklai (flai, ndiag, pft, mlai, msai, mhgtt, mhgtb) ! $Id: mklai.F90,v 1.5 2004/05/07 22:18:36 jim Exp $ !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_precisionMod use clm2_varpar !lsm parameters ! use clm2_varsur !lsm surface variables @@ -46,7 +47,7 @@ subroutine mklai (flai, ndiag, pft, mlai, msai, mhgtt, mhgtb) ! ----------------------------------------------------------------- ! ------------------------ local variables ------------------------ - character(len=256) :: locfn !local dataset file name + character(len=LIS_CONST_PATH_LEN) :: locfn !local dataset file name integer :: nlon_i !input grid : longitude points (read in) integer :: nlat_i !input grid : latitude points (read in) diff --git a/lis/surfacemodels/land/clm2/mksrfdata/mklanwat.F90 b/lis/surfacemodels/land/clm2/mksrfdata/mklanwat.F90 index afae2cd72..5b0225d6f 100644 --- a/lis/surfacemodels/land/clm2/mksrfdata/mklanwat.F90 +++ b/lis/surfacemodels/land/clm2/mksrfdata/mklanwat.F90 @@ -25,6 +25,7 @@ subroutine mklanwat (flanwat, ndiag, lake_o, swmp_o) ! $Id: mklanwat.F90,v 1.5 2004/05/07 22:18:36 jim Exp $ !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_precisionMod use clm2_varpar !parameters ! use clm2_varsur !surface variables @@ -41,7 +42,7 @@ subroutine mklanwat (flanwat, ndiag, lake_o, swmp_o) ! ----------------------------------------------------------------- ! ------------------------ local variables ------------------------ - character(len=256) :: locfn !local dataset file name + character(len=LIS_CONST_PATH_LEN) :: locfn !local dataset file name integer :: nlon_i !input grid : longitude points (read in) integer :: nlat_i !input grid : latitude points (read in) diff --git a/lis/surfacemodels/land/clm2/mksrfdata/mkpft.F90 b/lis/surfacemodels/land/clm2/mksrfdata/mkpft.F90 index a96f44468..df1234ff7 100644 --- a/lis/surfacemodels/land/clm2/mksrfdata/mkpft.F90 +++ b/lis/surfacemodels/land/clm2/mksrfdata/mkpft.F90 @@ -31,6 +31,7 @@ subroutine mkpft (fpft, ndiag, noveg, pctlnd_o, pft, pctpft) ! $Id: mkpft.F90,v 1.5 2004/05/07 22:18:36 jim Exp $ !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_precisionMod use clm2_varpar !lsm parameters use clm2_varsur !lsm surface variables @@ -49,7 +50,7 @@ subroutine mkpft (fpft, ndiag, noveg, pctlnd_o, pft, pctpft) ! ----------------------------------------------------------------- ! ------------------------ local variables ------------------------ - character(len=256) locfn !local dataset file name + character(len=LIS_CONST_PATH_LEN) locfn !local dataset file name integer :: nlon_i !input grid : longitude points (read in) integer :: nlat_i !input grid : latitude points (read in) diff --git a/lis/surfacemodels/land/clm2/mksrfdata/mksoicol.F90 b/lis/surfacemodels/land/clm2/mksrfdata/mksoicol.F90 index 6778d1ac5..13bac857c 100644 --- a/lis/surfacemodels/land/clm2/mksrfdata/mksoicol.F90 +++ b/lis/surfacemodels/land/clm2/mksrfdata/mksoicol.F90 @@ -25,6 +25,7 @@ subroutine mksoicol (fsoicol, ndiag, pctgla_o, soil_color_o) ! $Id: mksoicol.F90,v 1.5 2004/05/07 22:18:36 jim Exp $ !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_precisionMod use clm2_varpar !lsm parameters use clm2_varsur !lsm surface variables @@ -41,7 +42,7 @@ subroutine mksoicol (fsoicol, ndiag, pctgla_o, soil_color_o) ! ----------------------------------------------------------------- ! ------------------------ local variables ------------------------ - character(len=256) locfn !local dataset file name + character(len=LIS_CONST_PATH_LEN) locfn !local dataset file name integer :: nlon_i !input grid : longitude points (read in) integer :: nlat_i !input grid : latitude points (read in) diff --git a/lis/surfacemodels/land/clm2/mksrfdata/mksoitex.F90 b/lis/surfacemodels/land/clm2/mksrfdata/mksoitex.F90 index f1b602931..b33664a84 100644 --- a/lis/surfacemodels/land/clm2/mksrfdata/mksoitex.F90 +++ b/lis/surfacemodels/land/clm2/mksrfdata/mksoitex.F90 @@ -26,6 +26,7 @@ subroutine mksoitex (fsoitex, ndiag, pctgla_o, sand_o, clay_o) ! $Id: mksoitex.F90,v 1.5 2004/05/07 22:18:37 jim Exp $ !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_precisionMod use clm2_varpar !parameters use clm2_varsur !surface variables @@ -43,7 +44,7 @@ subroutine mksoitex (fsoitex, ndiag, pctgla_o, sand_o, clay_o) ! ----------------------------------------------------------------- ! ------------------------ local variables ------------------------ - character(len=256) :: locfn !local dataset file name + character(len=LIS_CONST_PATH_LEN) :: locfn !local dataset file name integer :: nlon_i !input grid: longitude points integer :: nlat_i !input grid: latitude points diff --git a/lis/surfacemodels/land/clm2/mksrfdata/mksrfdatMod.F90 b/lis/surfacemodels/land/clm2/mksrfdata/mksrfdatMod.F90 index 3fe91a25c..40b5b1155 100644 --- a/lis/surfacemodels/land/clm2/mksrfdata/mksrfdatMod.F90 +++ b/lis/surfacemodels/land/clm2/mksrfdata/mksrfdatMod.F90 @@ -31,6 +31,7 @@ subroutine mksrfdat(cam_longxy, cam_latixy, cam_numlon, cam_landfrac, cam_landma ! $Id: mksrfdatMod.F90,v 1.5 2004/05/07 22:18:37 jim Exp $ !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_precisionMod use infnan use clm2_varpar !parameters @@ -58,9 +59,9 @@ subroutine mksrfdat(cam_longxy, cam_latixy, cam_numlon, cam_landfrac, cam_landma integer :: i,j,k,m !indices integer :: ier !error status integer :: ndiag !unit number for surface data summary - character(len=256) :: loc_fn !local file name - character(len=256) :: rem_dir !mass store file name - character(len=256) :: rem_fn !mass store full path name + character(len=LIS_CONST_PATH_LEN) :: loc_fn !local file name + character(len=LIS_CONST_PATH_LEN) :: rem_dir !mass store file name + character(len=LIS_CONST_PATH_LEN) :: rem_fn !mass store full path name character(len= 7) :: resol !resolution for file name real(r8) :: sum !sum for error check real(r8) :: rmax !maximum patch cover diff --git a/lis/surfacemodels/land/clm2/mksrfdata/mkurban.F90 b/lis/surfacemodels/land/clm2/mksrfdata/mkurban.F90 index 5f5222fe8..c7c2da060 100644 --- a/lis/surfacemodels/land/clm2/mksrfdata/mkurban.F90 +++ b/lis/surfacemodels/land/clm2/mksrfdata/mkurban.F90 @@ -25,6 +25,7 @@ subroutine mkurban (furb, ndiag, urb_o) ! $Id: mkurban.F90,v 1.5 2004/05/07 22:18:37 jim Exp $ !----------------------------------------------------------------------- + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_precisionMod use clm2_varpar !lsm parameters use clm2_varsur !lsm surface variables @@ -40,7 +41,7 @@ subroutine mkurban (furb, ndiag, urb_o) ! ----------------------------------------------------------------- ! ------------------------ local variables ------------------------ - character(len=256) locfn !local dataset file name + character(len=LIS_CONST_PATH_LEN) locfn !local dataset file name integer :: nlon_i !input grid : longitude points (read in) integer :: nlat_i !input grid : latitude points (read in) diff --git a/lis/surfacemodels/land/clsm.f2.5/clsmf25_compute_land_parameters.F90 b/lis/surfacemodels/land/clsm.f2.5/clsmf25_compute_land_parameters.F90 index 3002a1ae3..3ffaee2ef 100644 --- a/lis/surfacemodels/land/clsm.f2.5/clsmf25_compute_land_parameters.F90 +++ b/lis/surfacemodels/land/clsm.f2.5/clsmf25_compute_land_parameters.F90 @@ -50,7 +50,6 @@ subroutine clsmf25_compute_land_parameters(nest) integer :: d2g integer :: dummy_int, k, month, m real :: z_in_m, term1, term2 - character(300) :: filename write(LIS_logunit,*)"[INFO] Computing derived CLSM land surface parameters ..." write(LIS_logunit,*) diff --git a/lis/surfacemodels/land/geowrsi.2/geowrsi2_readSOS_Bilfile.F90 b/lis/surfacemodels/land/geowrsi.2/geowrsi2_readSOS_Bilfile.F90 index 85b6e1900..c84d1991e 100644 --- a/lis/surfacemodels/land/geowrsi.2/geowrsi2_readSOS_Bilfile.F90 +++ b/lis/surfacemodels/land/geowrsi.2/geowrsi2_readSOS_Bilfile.F90 @@ -20,6 +20,7 @@ subroutine geowrsi2_readSOS_Bilfile( n, numpts, year, SOS, SOSa, SOS_offset ) ! !USES: use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain, & LIS_masterproc, LIS_npes use LIS_logMod, only : LIS_logunit, LIS_endrun @@ -56,7 +57,7 @@ subroutine geowrsi2_readSOS_Bilfile( n, numpts, year, SOS, SOSa, SOS_offset ) character(len=4) :: cyr4 type(charN) :: sos_filename type(charN) :: sosa_filename - character(300),target :: temp_filename + character(len=LIS_CONST_PATH_LEN),target :: temp_filename ! BIL parameters/variables: logical :: fileread_ok diff --git a/lis/surfacemodels/land/jules.5.0/da_soilm/jules50_dasoilm_Mod.F90 b/lis/surfacemodels/land/jules.5.0/da_soilm/jules50_dasoilm_Mod.F90 index 12be1645a..d8306fdc7 100644 --- a/lis/surfacemodels/land/jules.5.0/da_soilm/jules50_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/jules.5.0/da_soilm/jules50_dasoilm_Mod.F90 @@ -65,11 +65,9 @@ subroutine jules50_dasoilm_init(k) ! !EOP - implicit none integer :: k integer :: n - character*100 :: modelcdffile(LIS_rc%nnest) integer :: status integer :: ngrid diff --git a/lis/surfacemodels/land/jules.5.0/jules50_lsmMod.F90 b/lis/surfacemodels/land/jules.5.0/jules50_lsmMod.F90 index f70c450de..d72dfb89b 100644 --- a/lis/surfacemodels/land/jules.5.0/jules50_lsmMod.F90 +++ b/lis/surfacemodels/land/jules.5.0/jules50_lsmMod.F90 @@ -34,7 +34,7 @@ module jules50_lsmMod ! 01 Feb 2018; Shugong Wang; updated for JULES 5.0 ! ! !USES: - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use jules50_module implicit none @@ -72,8 +72,8 @@ module jules50_lsmMod integer :: count real :: rstInterval integer :: outInterval - character(len=256) :: namelist_dir - character(len=256) :: rfile + character(len=LIS_CONST_PATH_LEN) :: namelist_dir + character(len=LIS_CONST_PATH_LEN) :: rfile character(len=32) :: rformat type(jules50dec), allocatable :: jules50(:) end type jules50_type_dec diff --git a/lis/surfacemodels/land/jules.5.0/jules50_writerst.F90 b/lis/surfacemodels/land/jules.5.0/jules50_writerst.F90 index bdc9327ae..c96065532 100644 --- a/lis/surfacemodels/land/jules.5.0/jules50_writerst.F90 +++ b/lis/surfacemodels/land/jules.5.0/jules50_writerst.F90 @@ -20,7 +20,8 @@ ! ! !INTERFACE: subroutine jules50_writerst(n) -! !USES: + ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_isAlarmRinging use LIS_logMod, only : LIS_logunit, LIS_getNextUnitNumber, & @@ -52,7 +53,7 @@ subroutine jules50_writerst(n) ! \end{description} !EOP - character*100 :: filen + character(len=LIS_CONST_PATH_LEN) :: filen character*20 :: wformat logical :: alarmCheck integer :: ftn, k, l, t, c diff --git a/lis/surfacemodels/land/jules.5.1/jules51_lsmMod.F90 b/lis/surfacemodels/land/jules.5.1/jules51_lsmMod.F90 index c6e822669..1b19c6c58 100644 --- a/lis/surfacemodels/land/jules.5.1/jules51_lsmMod.F90 +++ b/lis/surfacemodels/land/jules.5.1/jules51_lsmMod.F90 @@ -36,6 +36,7 @@ module jules51_lsmMod ! !USES: use jules51_module + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none @@ -72,8 +73,8 @@ module jules51_lsmMod integer :: count real :: rstInterval integer :: outInterval - character(len=256) :: namelist_dir - character(len=256) :: rfile + character(len=LIS_CONST_PATH_LEN) :: namelist_dir + character(len=LIS_CONST_PATH_LEN) :: rfile character(len=32) :: rformat type(jules51dec), allocatable :: jules51(:) end type jules51_type_dec diff --git a/lis/surfacemodels/land/jules.5.1/jules51_writerst.F90 b/lis/surfacemodels/land/jules.5.1/jules51_writerst.F90 index 05d98b28f..56c8d43fe 100644 --- a/lis/surfacemodels/land/jules.5.1/jules51_writerst.F90 +++ b/lis/surfacemodels/land/jules.5.1/jules51_writerst.F90 @@ -21,6 +21,7 @@ ! !INTERFACE: subroutine jules51_writerst(n) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_isAlarmRinging use LIS_logMod, only : LIS_logunit, LIS_getNextUnitNumber, & @@ -52,7 +53,7 @@ subroutine jules51_writerst(n) ! \end{description} !EOP - character*100 :: filen + character(len=LIS_CONST_PATH_LEN) :: filen character*20 :: wformat logical :: alarmCheck integer :: ftn, k, l, t, c diff --git a/lis/surfacemodels/land/jules.5.2/da_soilm/jules52_dasoilm_Mod.F90 b/lis/surfacemodels/land/jules.5.2/da_soilm/jules52_dasoilm_Mod.F90 index 4d7050385..991dc585c 100644 --- a/lis/surfacemodels/land/jules.5.2/da_soilm/jules52_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/jules.5.2/da_soilm/jules52_dasoilm_Mod.F90 @@ -65,11 +65,11 @@ subroutine jules52_dasoilm_init(k) ! !EOP - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer :: k integer :: n - character*100 :: modelcdffile(LIS_rc%nnest) + character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) integer :: status integer :: ngrid diff --git a/lis/surfacemodels/land/jules.5.2/jules52_lsmMod.F90 b/lis/surfacemodels/land/jules.5.2/jules52_lsmMod.F90 index 1119d8c8b..374dd609e 100644 --- a/lis/surfacemodels/land/jules.5.2/jules52_lsmMod.F90 +++ b/lis/surfacemodels/land/jules.5.2/jules52_lsmMod.F90 @@ -36,6 +36,7 @@ module jules52_lsmMod ! !USES: use jules52_module + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none @@ -72,8 +73,8 @@ module jules52_lsmMod integer :: count real :: rstInterval integer :: outInterval - character(len=256) :: namelist_dir - character(len=256) :: rfile + character(len=LIS_CONST_PATH_LEN) :: namelist_dir + character(len=LIS_CONST_PATH_LEN) :: rfile character(len=32) :: rformat type(jules52dec), allocatable :: jules52(:) end type jules52_type_dec diff --git a/lis/surfacemodels/land/jules.5.2/jules52_writerst.F90 b/lis/surfacemodels/land/jules.5.2/jules52_writerst.F90 index de55ec0f2..0392b1b2d 100644 --- a/lis/surfacemodels/land/jules.5.2/jules52_writerst.F90 +++ b/lis/surfacemodels/land/jules.5.2/jules52_writerst.F90 @@ -20,6 +20,7 @@ ! !INTERFACE: subroutine jules52_writerst(n) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_isAlarmRinging use LIS_logMod, only : LIS_logunit, LIS_getNextUnitNumber, & @@ -51,7 +52,7 @@ subroutine jules52_writerst(n) ! \end{description} !EOP - character*100 :: filen + character(len=LIS_CONST_PATH_LEN) :: filen character*20 :: wformat logical :: alarmCheck integer :: ftn, k, l, t, c diff --git a/lis/surfacemodels/land/jules.5.3/da_soilm/jules53_dasoilm_Mod.F90 b/lis/surfacemodels/land/jules.5.3/da_soilm/jules53_dasoilm_Mod.F90 index 4a34d350f..ff7479bb2 100644 --- a/lis/surfacemodels/land/jules.5.3/da_soilm/jules53_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/jules.5.3/da_soilm/jules53_dasoilm_Mod.F90 @@ -65,11 +65,11 @@ subroutine jules53_dasoilm_init(k) ! !EOP - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer :: k integer :: n - character*100 :: modelcdffile(LIS_rc%nnest) + character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) integer :: status integer :: ngrid diff --git a/lis/surfacemodels/land/jules.5.3/jules53_lsmMod.F90 b/lis/surfacemodels/land/jules.5.3/jules53_lsmMod.F90 index 8319a3d63..bcd5683df 100644 --- a/lis/surfacemodels/land/jules.5.3/jules53_lsmMod.F90 +++ b/lis/surfacemodels/land/jules.5.3/jules53_lsmMod.F90 @@ -38,6 +38,7 @@ module jules53_lsmMod ! !USES: use jules53_module + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none @@ -74,8 +75,8 @@ module jules53_lsmMod integer :: count real :: rstInterval integer :: outInterval - character(len=256) :: namelist_dir - character(len=256) :: rfile + character(len=LIS_CONST_PATH_LEN) :: namelist_dir + character(len=LIS_CONST_PATH_LEN) :: rfile character(len=32) :: rformat type(jules53dec), allocatable :: jules53(:) end type jules53_type_dec diff --git a/lis/surfacemodels/land/jules.5.3/jules53_writerst.F90 b/lis/surfacemodels/land/jules.5.3/jules53_writerst.F90 index d4c2d7b9c..5a9bfd4fd 100644 --- a/lis/surfacemodels/land/jules.5.3/jules53_writerst.F90 +++ b/lis/surfacemodels/land/jules.5.3/jules53_writerst.F90 @@ -21,6 +21,7 @@ ! !INTERFACE: subroutine jules53_writerst(n) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_isAlarmRinging use LIS_logMod, only : LIS_logunit, LIS_getNextUnitNumber, & @@ -52,7 +53,7 @@ subroutine jules53_writerst(n) ! \end{description} !EOP - character*100 :: filen + character(len=LIS_CONST_PATH_LEN) :: filen character*20 :: wformat logical :: alarmCheck integer :: ftn, k, l, t, c diff --git a/lis/surfacemodels/land/jules.5.4/jules54_lsmMod.F90 b/lis/surfacemodels/land/jules.5.4/jules54_lsmMod.F90 index d0d260c73..3f92f3029 100644 --- a/lis/surfacemodels/land/jules.5.4/jules54_lsmMod.F90 +++ b/lis/surfacemodels/land/jules.5.4/jules54_lsmMod.F90 @@ -38,6 +38,7 @@ module jules54_lsmMod ! !USES: use jules54_module + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none @@ -74,8 +75,8 @@ module jules54_lsmMod integer :: count real :: rstInterval integer :: outInterval - character(len=256) :: namelist_dir - character(len=256) :: rfile + character(len=LIS_CONST_PATH_LEN) :: namelist_dir + character(len=LIS_CONST_PATH_LEN) :: rfile character(len=32) :: rformat type(jules54dec), allocatable :: jules54(:) end type jules54_type_dec diff --git a/lis/surfacemodels/land/jules.5.4/jules54_writerst.F90 b/lis/surfacemodels/land/jules.5.4/jules54_writerst.F90 index ac2fe631c..e38b0c474 100644 --- a/lis/surfacemodels/land/jules.5.4/jules54_writerst.F90 +++ b/lis/surfacemodels/land/jules.5.4/jules54_writerst.F90 @@ -21,6 +21,7 @@ ! !INTERFACE: subroutine jules54_writerst(n) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_isAlarmRinging use LIS_logMod, only : LIS_logunit, LIS_getNextUnitNumber, & @@ -52,7 +53,7 @@ subroutine jules54_writerst(n) ! \end{description} !EOP - character*100 :: filen + character(len=LIS_CONST_PATH_LEN) :: filen character*20 :: wformat logical :: alarmCheck integer :: ftn, k, l, t, c diff --git a/lis/surfacemodels/land/jules.5.x/da_soilm/jules5x_dasoilm_Mod.F90 b/lis/surfacemodels/land/jules.5.x/da_soilm/jules5x_dasoilm_Mod.F90 index ba9c1ed26..ff35cb7f4 100755 --- a/lis/surfacemodels/land/jules.5.x/da_soilm/jules5x_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/jules.5.x/da_soilm/jules5x_dasoilm_Mod.F90 @@ -66,11 +66,11 @@ subroutine jules5x_dasoilm_init(k) ! !EOP - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer :: k integer :: n - character*100 :: modelcdffile(LIS_rc%nnest) + character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) integer :: status integer :: ngrid diff --git a/lis/surfacemodels/land/jules.5.x/jules5x_lsmMod.F90 b/lis/surfacemodels/land/jules.5.x/jules5x_lsmMod.F90 index 307c49aba..c542c451e 100755 --- a/lis/surfacemodels/land/jules.5.x/jules5x_lsmMod.F90 +++ b/lis/surfacemodels/land/jules.5.x/jules5x_lsmMod.F90 @@ -39,6 +39,7 @@ module jules5x_lsmMod ! !USES: use jules5x_module + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none @@ -75,8 +76,8 @@ module jules5x_lsmMod integer :: count real :: rstInterval integer :: outInterval - character(len=256) :: namelist_dir - character(len=256) :: rfile + character(len=LIS_CONST_PATH_LEN) :: namelist_dir + character(len=LIS_CONST_PATH_LEN) :: rfile character(len=32) :: rformat type(jules5xdec), allocatable :: jules5x(:) end type jules5x_type_dec diff --git a/lis/surfacemodels/land/jules.5.x/jules5x_writerst.F90 b/lis/surfacemodels/land/jules.5.x/jules5x_writerst.F90 index 13e26e832..00f2e90f5 100755 --- a/lis/surfacemodels/land/jules.5.x/jules5x_writerst.F90 +++ b/lis/surfacemodels/land/jules.5.x/jules5x_writerst.F90 @@ -22,6 +22,7 @@ ! !INTERFACE: subroutine jules5x_writerst(n) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_timeMgrMod, only : LIS_isAlarmRinging use LIS_logMod, only : LIS_logunit, LIS_getNextUnitNumber, & @@ -53,7 +54,7 @@ subroutine jules5x_writerst(n) ! \end{description} !EOP - character*100 :: filen + character(len=LIS_CONST_PATH_LEN) :: filen character*20 :: wformat logical :: alarmCheck integer :: ftn, k, l, t, c diff --git a/lis/surfacemodels/land/noah.3.3/da_soilm/noah33_dasoilm_Mod.F90 b/lis/surfacemodels/land/noah.3.3/da_soilm/noah33_dasoilm_Mod.F90 index 937c68beb..65c36ca16 100644 --- a/lis/surfacemodels/land/noah.3.3/da_soilm/noah33_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/noah.3.3/da_soilm/noah33_dasoilm_Mod.F90 @@ -66,51 +66,10 @@ subroutine noah33_dasoilm_init(k) implicit none integer :: k - integer :: n - character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) - integer :: status - integer :: ngrid - if(.not.allocated(noah33_dasm_struc)) then allocate(noah33_dasm_struc(LIS_rc%nnest)) endif -!TBD: SVK -#if 0 - if(LIS_rc%dascaloption(k).eq."Linear scaling") then - call ESMF_ConfigFindLabel(LIS_config,"Noah.3.3 soil moisture CDF file:",& - rc=status) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config,modelcdffile(n),rc=status) - call LIS_verify(status, 'Noah.3.3 soil moisture CDF file: not defined') - enddo - - do n=1,LIS_rc%nnest - -!Hardcoded for now. - noah33_dasm_struc(n)%nbins = 100 - - call LIS_getCDFattributes(modelcdffile(n),& - noah33_dasm_struc(n)%ntimes, ngrid) - - allocate(noah33_dasm_struc(n)%model_xrange(& - LIS_rc%ngrid(n), noah33_dasm_struc(n)%ntimes, & - noah33_dasm_struc(n)%nbins)) - allocate(noah33_dasm_struc(n)%model_cdf(& - LIS_rc%ngrid(n), noah33_dasm_struc(n)%ntimes, & - noah33_dasm_struc(n)%nbins)) - - call LIS_readCDFdata(n,& - noah33_dasm_struc(n)%nbins, & - noah33_dasm_struc(n)%ntimes, & - ngrid, & - modelcdffile(n), & - "SoilMoist",& - noah33_dasm_struc(n)%model_xrange,& - noah33_dasm_struc(n)%model_cdf) - enddo - endif -#endif end subroutine noah33_dasoilm_init end module noah33_dasoilm_Mod diff --git a/lis/surfacemodels/land/noah.3.6/da_soilm/noah36_dasoilm_Mod.F90 b/lis/surfacemodels/land/noah.3.6/da_soilm/noah36_dasoilm_Mod.F90 index 5ac9d330d..9af420e76 100644 --- a/lis/surfacemodels/land/noah.3.6/da_soilm/noah36_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/noah.3.6/da_soilm/noah36_dasoilm_Mod.F90 @@ -68,51 +68,11 @@ subroutine noah36_dasoilm_init(k) implicit none integer :: k - integer :: n - character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) - integer :: status - integer :: ngrid if(.not.allocated(noah36_dasm_struc)) then allocate(noah36_dasm_struc(LIS_rc%nnest)) endif -!TBD: SVK -#if 0 - if(LIS_rc%dascaloption(k).eq."Linear scaling") then - call ESMF_ConfigFindLabel(LIS_config,"Noah.3.3 soil moisture CDF file:",& - rc=status) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config,modelcdffile(n),rc=status) - call LIS_verify(status, 'Noah.3.3 soil moisture CDF file: not defined') - enddo - - do n=1,LIS_rc%nnest - -!Hardcoded for now. - noah36_dasm_struc(n)%nbins = 100 - - call LIS_getCDFattributes(modelcdffile(n),& - noah36_dasm_struc(n)%ntimes, ngrid) - - allocate(noah36_dasm_struc(n)%model_xrange(& - LIS_rc%ngrid(n), noah36_dasm_struc(n)%ntimes, & - noah36_dasm_struc(n)%nbins)) - allocate(noah36_dasm_struc(n)%model_cdf(& - LIS_rc%ngrid(n), noah36_dasm_struc(n)%ntimes, & - noah36_dasm_struc(n)%nbins)) - - call LIS_readCDFdata(n,& - noah36_dasm_struc(n)%nbins, & - noah36_dasm_struc(n)%ntimes, & - ngrid, & - modelcdffile(n), & - "SoilMoist",& - noah36_dasm_struc(n)%model_xrange,& - noah36_dasm_struc(n)%model_cdf) - enddo - endif -#endif end subroutine noah36_dasoilm_init end module noah36_dasoilm_Mod diff --git a/lis/surfacemodels/land/noah.3.9/da_soilm/noah39_dasoilm_Mod.F90 b/lis/surfacemodels/land/noah.3.9/da_soilm/noah39_dasoilm_Mod.F90 index 41b105b2b..e30604278 100644 --- a/lis/surfacemodels/land/noah.3.9/da_soilm/noah39_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/noah.3.9/da_soilm/noah39_dasoilm_Mod.F90 @@ -67,51 +67,10 @@ subroutine noah39_dasoilm_init(k) implicit none integer :: k - integer :: n - character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) - integer :: status - integer :: ngrid if(.not.allocated(noah39_dasm_struc)) then allocate(noah39_dasm_struc(LIS_rc%nnest)) endif - -!TBD: SVK -#if 0 - if(LIS_rc%dascaloption(k).eq."Linear scaling") then - call ESMF_ConfigFindLabel(LIS_config,"Noah.3.9 soil moisture CDF file:",& - rc=status) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config,modelcdffile(n),rc=status) - call LIS_verify(status, 'Noah.3.9 soil moisture CDF file: not defined') - enddo - - do n=1,LIS_rc%nnest - -!Hardcoded for now. - noah39_dasm_struc(n)%nbins = 100 - - call LIS_getCDFattributes(modelcdffile(n),& - noah39_dasm_struc(n)%ntimes, ngrid) - - allocate(noah39_dasm_struc(n)%model_xrange(& - LIS_rc%ngrid(n), noah39_dasm_struc(n)%ntimes, & - noah39_dasm_struc(n)%nbins)) - allocate(noah39_dasm_struc(n)%model_cdf(& - LIS_rc%ngrid(n), noah39_dasm_struc(n)%ntimes, & - noah39_dasm_struc(n)%nbins)) - - call LIS_readCDFdata(n,& - noah39_dasm_struc(n)%nbins, & - noah39_dasm_struc(n)%ntimes, & - ngrid, & - modelcdffile(n), & - "SoilMoist",& - noah39_dasm_struc(n)%model_xrange,& - noah39_dasm_struc(n)%model_cdf) - enddo - endif -#endif end subroutine noah39_dasoilm_init end module noah39_dasoilm_Mod diff --git a/lis/surfacemodels/land/noahmp.3.6/NoahMP36_lsmMod.F90 b/lis/surfacemodels/land/noahmp.3.6/NoahMP36_lsmMod.F90 index 689946cce..d284119fd 100644 --- a/lis/surfacemodels/land/noahmp.3.6/NoahMP36_lsmMod.F90 +++ b/lis/surfacemodels/land/noahmp.3.6/NoahMP36_lsmMod.F90 @@ -199,10 +199,10 @@ module NoahMP36_lsmMod !------------------------------------------------------------------------- ! Constant Parameter !------------------------------------------------------------------------- - character(len=256) :: landuse_tbl_name - character(len=256) :: soil_tbl_name - character(len=256) :: gen_tbl_name - character(len=256) :: noahmp_tbl_name + character(len=LIS_CONST_PATH_LEN) :: landuse_tbl_name + character(len=LIS_CONST_PATH_LEN) :: soil_tbl_name + character(len=LIS_CONST_PATH_LEN) :: gen_tbl_name + character(len=LIS_CONST_PATH_LEN) :: noahmp_tbl_name character(len=256) :: landuse_scheme_name character(len=256) :: soil_scheme_name integer :: dveg_opt diff --git a/lis/surfacemodels/land/noahmp.3.6/NoahMP36_main.F90 b/lis/surfacemodels/land/noahmp.3.6/NoahMP36_main.F90 index 0a16cfc84..b94c47bba 100644 --- a/lis/surfacemodels/land/noahmp.3.6/NoahMP36_main.F90 +++ b/lis/surfacemodels/land/noahmp.3.6/NoahMP36_main.F90 @@ -24,6 +24,7 @@ ! !INTERFACE: subroutine NoahMP36_main(n) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_histDataMod use LIS_timeMgrMod, only : LIS_isAlarmRinging @@ -60,10 +61,10 @@ subroutine NoahMP36_main(n) !EOP ! define variables for NoahMP36 - character(len=256) :: tmp_landuse_tbl_name ! Noah model landuse parameter table [-] - character(len=256) :: tmp_soil_tbl_name ! Noah model soil parameter table [-] - character(len=256) :: tmp_gen_tbl_name ! Noah model general parameter table [-] - character(len=256) :: tmp_noahmp_tbl_name ! NoahMP parameter table [-] + character(len=LIS_CONST_PATH_LEN) :: tmp_landuse_tbl_name ! Noah model landuse parameter table [-] + character(len=LIS_CONST_PATH_LEN) :: tmp_soil_tbl_name ! Noah model soil parameter table [-] + character(len=LIS_CONST_PATH_LEN) :: tmp_gen_tbl_name ! Noah model general parameter table [-] + character(len=LIS_CONST_PATH_LEN) :: tmp_noahmp_tbl_name ! NoahMP parameter table [-] character(len=256) :: tmp_landuse_scheme_name ! landuse classification scheme [-] character(len=256) :: tmp_soil_scheme_name ! soil classification scheme [-] integer :: tmp_dveg_opt ! vegetation model [-] diff --git a/lis/surfacemodels/land/noahmp.3.6/da_soilm/noahmp36_dasoilm_Mod.F90 b/lis/surfacemodels/land/noahmp.3.6/da_soilm/noahmp36_dasoilm_Mod.F90 index 2eb261054..540ab7deb 100644 --- a/lis/surfacemodels/land/noahmp.3.6/da_soilm/noahmp36_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.3.6/da_soilm/noahmp36_dasoilm_Mod.F90 @@ -69,51 +69,11 @@ subroutine noahmp36_dasoilm_init(k) implicit none integer :: k - integer :: n - character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) - integer :: status - integer :: ngrid if(.not.allocated(noahmp36_dasm_struc)) then allocate(noahmp36_dasm_struc(LIS_rc%nnest)) endif -!TBD: SVK -#if 0 - if(LIS_rc%dascaloption(k).eq."Linear scaling") then - call ESMF_ConfigFindLabel(LIS_config,"Noah-MP.3.6 soil moisture CDF file:",& - rc=status) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config,modelcdffile(n),rc=status) - call LIS_verify(status, 'Noah-MP.3.6 soil moisture CDF file: not defined') - enddo - - do n=1,LIS_rc%nnest - -!Hardcoded for now. - noahmp36_dasm_struc(n)%nbins = 100 - - call LIS_getCDFattributes(modelcdffile(n),& - noahmp36_dasm_struc(n)%ntimes, ngrid) - - allocate(noahmp36_dasm_struc(n)%model_xrange(& - LIS_rc%ngrid(n), noahmp36_dasm_struc(n)%ntimes, & - noahmp36_dasm_struc(n)%nbins)) - allocate(noahmp36_dasm_struc(n)%model_cdf(& - LIS_rc%ngrid(n), noahmp36_dasm_struc(n)%ntimes, & - noahmp36_dasm_struc(n)%nbins)) - - call LIS_readCDFdata(n,& - noahmp36_dasm_struc(n)%nbins, & - noahmp36_dasm_struc(n)%ntimes, & - ngrid, & - modelcdffile(n), & - "SoilMoist",& - noahmp36_dasm_struc(n)%model_xrange,& - noahmp36_dasm_struc(n)%model_cdf) - enddo - endif -#endif end subroutine noahmp36_dasoilm_init end module noahmp36_dasoilm_Mod diff --git a/lis/surfacemodels/land/noahmp.3.6/da_tws/noahmp36_datws_Mod.F90 b/lis/surfacemodels/land/noahmp.3.6/da_tws/noahmp36_datws_Mod.F90 index d9a262851..5ba6455e0 100644 --- a/lis/surfacemodels/land/noahmp.3.6/da_tws/noahmp36_datws_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.3.6/da_tws/noahmp36_datws_Mod.F90 @@ -68,51 +68,11 @@ subroutine noahmp36_datws_init(k) implicit none integer :: k - integer :: n - character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) - integer :: status - integer :: ngrid if(.not.allocated(noahmp36_dasm_struc)) then allocate(noahmp36_dasm_struc(LIS_rc%nnest)) endif -!TBD: SVK -#if 0 - if(LIS_rc%dascaloption(k).eq."Linear scaling") then - call ESMF_ConfigFindLabel(LIS_config,"Noah-MP.3.6 soil moisture CDF file:",& - rc=status) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config,modelcdffile(n),rc=status) - call LIS_verify(status, 'Noah-MP.3.6 soil moisture CDF file: not defined') - enddo - - do n=1,LIS_rc%nnest - -!Hardcoded for now. - noahmp36_dasm_struc(n)%nbins = 100 - - call LIS_getCDFattributes(modelcdffile(n),& - noahmp36_dasm_struc(n)%ntimes, ngrid) - - allocate(noahmp36_dasm_struc(n)%model_xrange(& - LIS_rc%ngrid(n), noahmp36_dasm_struc(n)%ntimes, & - noahmp36_dasm_struc(n)%nbins)) - allocate(noahmp36_dasm_struc(n)%model_cdf(& - LIS_rc%ngrid(n), noahmp36_dasm_struc(n)%ntimes, & - noahmp36_dasm_struc(n)%nbins)) - - call LIS_readCDFdata(n,& - noahmp36_dasm_struc(n)%nbins, & - noahmp36_dasm_struc(n)%ntimes, & - ngrid, & - modelcdffile(n), & - "SoilMoist",& - noahmp36_dasm_struc(n)%model_xrange,& - noahmp36_dasm_struc(n)%model_cdf) - enddo - endif -#endif end subroutine noahmp36_datws_init end module noahmp36_datws_Mod diff --git a/lis/surfacemodels/land/noahmp.3.6/noahmp_driver_36.F90 b/lis/surfacemodels/land/noahmp.3.6/noahmp_driver_36.F90 index a0e1a8acc..8f7dcd2eb 100644 --- a/lis/surfacemodels/land/noahmp.3.6/noahmp_driver_36.F90 +++ b/lis/surfacemodels/land/noahmp.3.6/noahmp_driver_36.F90 @@ -61,6 +61,7 @@ subroutine noahmp_driver_36(iloc, jloc, & sfcheadrt) ! out ! use LIS_FORC_AttributesMod + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use module_sf_noahlsm_36, only: slcats, lucats, slpcats use noahmp_globals_36, only: dveg, opt_crs , opt_btr , opt_run , & opt_sfc , opt_frz, opt_inf , opt_rad , & @@ -76,10 +77,10 @@ subroutine noahmp_driver_36(iloc, jloc, & FOLNMX, WDPOOL, WRRAT, MRP ! SY use noahmp_routines_36, only: noahmp_sflx_36, redprm implicit none - character(len=256), intent(in) :: landuse_tbl_name ! Noah model landuse parameter table - character(len=256), intent(in) :: soil_tbl_name ! Noah model soil parameter table - character(len=256), intent(in) :: gen_tbl_name ! Noah model general parameter table - character(len=256), intent(in) :: noahmp_tbl_name ! NoahMP parameter table + character(len=LIS_CONST_PATH_LEN), intent(in) :: landuse_tbl_name ! Noah model landuse parameter table + character(len=LIS_CONST_PATH_LEN), intent(in) :: soil_tbl_name ! Noah model soil parameter table + character(len=LIS_CONST_PATH_LEN), intent(in) :: gen_tbl_name ! Noah model general parameter table + character(len=LIS_CONST_PATH_LEN), intent(in) :: noahmp_tbl_name ! NoahMP parameter table character(len=256), intent(in) :: landuse_scheme_name ! Landuse classficiation scheme character(len=256), intent(in) :: soil_scheme_name ! Soil classification scheme integer, intent(in) :: dveg_opt ! vegetation model ( 1->prescribed [table LAI, shdfac=FVEG]; 2->dynamic; 3->table LAI, calculate FVEG 4->table LAI, shdfac=maximum) diff --git a/lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_lsmMod.F90 b/lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_lsmMod.F90 index d38c5c959..04ea386e8 100644 --- a/lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_lsmMod.F90 +++ b/lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_lsmMod.F90 @@ -187,9 +187,9 @@ module NoahMP401_lsmMod real, pointer :: sldpth(:) integer :: nsoil integer :: nsnow - character(len=256) :: soil_tbl_name - character(len=256) :: gen_tbl_name - character(len=256) :: noahmp_tbl_name + character(len=LIS_CONST_PATH_LEN) :: soil_tbl_name + character(len=LIS_CONST_PATH_LEN) :: gen_tbl_name + character(len=LIS_CONST_PATH_LEN) :: noahmp_tbl_name character(len=256) :: landuse_scheme_name integer :: dveg_opt integer :: crs_opt diff --git a/lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_main.F90 b/lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_main.F90 index b87ee3c0b..882d14964 100644 --- a/lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_main.F90 +++ b/lis/surfacemodels/land/noahmp.4.0.1/NoahMP401_main.F90 @@ -27,7 +27,7 @@ ! ! !INTERFACE: subroutine NoahMP401_main(n) -! !USES: + ! !USES: use LIS_coreMod use LIS_histDataMod use LIS_timeMgrMod, only : LIS_isAlarmRinging diff --git a/lis/surfacemodels/land/noahmp.4.0.1/da_soilm/noahmp401_dasoilm_Mod.F90 b/lis/surfacemodels/land/noahmp.4.0.1/da_soilm/noahmp401_dasoilm_Mod.F90 index cb7dddc5d..ecb541012 100644 --- a/lis/surfacemodels/land/noahmp.4.0.1/da_soilm/noahmp401_dasoilm_Mod.F90 +++ b/lis/surfacemodels/land/noahmp.4.0.1/da_soilm/noahmp401_dasoilm_Mod.F90 @@ -68,51 +68,11 @@ subroutine NoahMP401_dasoilm_init(k) implicit none integer :: k - integer :: n - character(len=LIS_CONST_PATH_LEN) :: modelcdffile(LIS_rc%nnest) - integer :: status - integer :: ngrid if(.not.allocated(noahmp401_dasm_struc)) then allocate(noahmp401_dasm_struc(LIS_rc%nnest)) endif -!TBD: SVK -#if 0 - if(LIS_rc%dascaloption(k).eq."Linear scaling") then - call ESMF_ConfigFindLabel(LIS_config,"Noah-MP.3.6 soil moisture CDF file:",& - rc=status) - do n=1,LIS_rc%nnest - call ESMF_ConfigGetAttribute(LIS_config,modelcdffile(n),rc=status) - call LIS_verify(status, 'Noah-MP.3.6 soil moisture CDF file: not defined') - enddo - - do n=1,LIS_rc%nnest - -!Hardcoded for now. - noahmp401_dasm_struc(n)%nbins = 100 - - call LIS_getCDFattributes(modelcdffile(n),& - noahmp401_dasm_struc(n)%ntimes, ngrid) - - allocate(noahmp401_dasm_struc(n)%model_xrange(& - LIS_rc%ngrid(n), noahmp401_dasm_struc(n)%ntimes, & - noahmp401_dasm_struc(n)%nbins)) - allocate(noahmp401_dasm_struc(n)%model_cdf(& - LIS_rc%ngrid(n), noahmp401_dasm_struc(n)%ntimes, & - noahmp401_dasm_struc(n)%nbins)) - - call LIS_readCDFdata(n,& - noahmp401_dasm_struc(n)%nbins, & - noahmp401_dasm_struc(n)%ntimes, & - ngrid, & - modelcdffile(n), & - "SoilMoist",& - noahmp401_dasm_struc(n)%model_xrange,& - noahmp401_dasm_struc(n)%model_cdf) - enddo - endif -#endif end subroutine NoahMP401_dasoilm_init end module NoahMP401_dasoilm_Mod diff --git a/lis/surfacemodels/land/ruc.3.7/RUC37_lsmMod.F90 b/lis/surfacemodels/land/ruc.3.7/RUC37_lsmMod.F90 index 498fd2575..18a5d70af 100644 --- a/lis/surfacemodels/land/ruc.3.7/RUC37_lsmMod.F90 +++ b/lis/surfacemodels/land/ruc.3.7/RUC37_lsmMod.F90 @@ -160,9 +160,9 @@ module RUC37_lsmMod logical :: use_monthly_albedo_map integer :: option_iz0tlnd integer :: option_sfcdif - character(len=256) :: landuse_tbl_name - character(len=256) :: soil_tbl_name - character(len=256) :: gen_tbl_name + character(len=LIS_CONST_PATH_LEN) :: landuse_tbl_name + character(len=LIS_CONST_PATH_LEN) :: soil_tbl_name + character(len=LIS_CONST_PATH_LEN) :: gen_tbl_name character(len=256) :: landuse_scheme_name character(len=256) :: soil_scheme_name integer :: nsoil diff --git a/lis/surfacemodels/land/ruc.3.7/RUC37_main.F90 b/lis/surfacemodels/land/ruc.3.7/RUC37_main.F90 index 0f3632ea4..e11bdce81 100644 --- a/lis/surfacemodels/land/ruc.3.7/RUC37_main.F90 +++ b/lis/surfacemodels/land/ruc.3.7/RUC37_main.F90 @@ -22,7 +22,8 @@ ! ! !INTERFACE: subroutine RUC37_main(n) -! !USES: + ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod use LIS_histDataMod use LIS_timeMgrMod, only : LIS_isAlarmRinging @@ -82,9 +83,9 @@ subroutine RUC37_main(n) logical :: tmp_use_monthly_albedo_map ! if usemonalb == .true., then the alb value passed to lsmruc will be used as the background snow-free albedo term. if usemonalb == .false., then alb will be computed within lsmruc from minimum and maximum values in vegparm.tbl, and the current green vegetation fraction. [-] integer :: tmp_option_iz0tlnd ! option to turn on (iz0tlnd=1) or off (iz0tlnd=0) the vegetation-category-dependent calculation of the zilitinkivich coefficient czil in the sfcdif subroutines. [-] integer :: tmp_option_sfcdif ! option to use previous (sfcdif_option=0) or updated (sfcdif_option=1) version of sfcdif subroutine. [-] - character(len=256) :: tmp_landuse_tbl_name ! noah model landuse parameter table [-] - character(len=256) :: tmp_soil_tbl_name ! noah model soil parameter table [-] - character(len=256) :: tmp_gen_tbl_name ! noah model soil parameter table [-] + character(len=LIS_CONST_PATH_LEN) :: tmp_landuse_tbl_name ! noah model landuse parameter table [-] + character(len=LIS_CONST_PATH_LEN) :: tmp_soil_tbl_name ! noah model soil parameter table [-] + character(len=LIS_CONST_PATH_LEN) :: tmp_gen_tbl_name ! noah model soil parameter table [-] character(len=256) :: tmp_landuse_scheme_name ! landuse classification scheme [-] character(len=256) :: tmp_soil_scheme_name ! soil classification scheme [-] integer :: tmp_nsoil ! number of soil levels. [-] diff --git a/lis/surfacemodels/land/ruc.3.7/ruc_driver_37.F90 b/lis/surfacemodels/land/ruc.3.7/ruc_driver_37.F90 index 7f1658bdc..b6e34ba05 100644 --- a/lis/surfacemodels/land/ruc.3.7/ruc_driver_37.F90 +++ b/lis/surfacemodels/land/ruc.3.7/ruc_driver_37.F90 @@ -22,6 +22,8 @@ subroutine ruc_driver_37( & ! caltmp and calhum. ! + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + use module_Noahlsm_utility_ruc37 ! ! module_sf_ruclsm contains the ruc lsm physics code. this driver program @@ -72,9 +74,9 @@ subroutine ruc_driver_37( & integer,intent(in) :: iz0tlnd ! option to turn on (iz0tlnd=1) or off (iz0tlnd=0) the vegetation-category-dependent calculation of the zilitinkivich coefficient czil in the sfcdif subroutines. integer, intent(in) :: sfcdif_option ! option to use previous (sfcdif_option=0) or updated (sfcdif_option=1) version of sfcdif subroutine. - character(len=256), intent(in) :: landuse_tbl_name ! noah model landuse parameter table - character(len=256), intent(in) :: soil_tbl_name ! noah model soil parameter table - character(len=256), intent(in) :: gen_tbl_name ! noah model general parameter table + character(len=LIS_CONST_PATH_LEN), intent(in) :: landuse_tbl_name ! noah model landuse parameter table + character(len=LIS_CONST_PATH_LEN), intent(in) :: soil_tbl_name ! noah model soil parameter table + character(len=LIS_CONST_PATH_LEN), intent(in) :: gen_tbl_name ! noah model general parameter table character(len=256), intent(in) :: landuse_scheme_name ! landuse classficiation scheme character(len=256), intent(in) :: soil_scheme_name ! soil classification scheme integer, intent(in) :: nsoil ! number of soil levels. diff --git a/lis/surfacemodels/land/subLSM/crocus.8.1/phys/modd_surfex_mpi.F90 b/lis/surfacemodels/land/subLSM/crocus.8.1/phys/modd_surfex_mpi.F90 index 297ac766d..a16eaab24 100755 --- a/lis/surfacemodels/land/subLSM/crocus.8.1/phys/modd_surfex_mpi.F90 +++ b/lis/surfacemodels/land/subLSM/crocus.8.1/phys/modd_surfex_mpi.F90 @@ -150,8 +150,9 @@ SUBROUTINE WLOG_MPI(HLOG,PLOG,KLOG,KLOG2,OLOG) END SUBROUTINE WLOG_MPI ! SUBROUTINE PREP_LOG_MPI -! -CHARACTER(LEN=100) :: YNAME + ! +use LIS_constantsMod, only: LIS_CONST_PATH_LEN +CHARACTER(LEN=LIS_CONST_PATH_LEN) :: YNAME CHARACTER(LEN=10) :: YRANK INTEGER :: IUNIT ! diff --git a/lis/surfacemodels/land/subLSM/crocus.8.1/phys/modn_io_offline.F90 b/lis/surfacemodels/land/subLSM/crocus.8.1/phys/modn_io_offline.F90 index 7d63097e1..1860caf34 100755 --- a/lis/surfacemodels/land/subLSM/crocus.8.1/phys/modn_io_offline.F90 +++ b/lis/surfacemodels/land/subLSM/crocus.8.1/phys/modn_io_offline.F90 @@ -41,6 +41,7 @@ MODULE MODN_IO_OFFLINE !* 0. DECLARATIONS ! ------------ ! +use LIS_constantsMod, only: LIS_CONST_PATH_LEN IMPLICIT NONE ! !* Types of files @@ -60,10 +61,10 @@ MODULE MODN_IO_OFFLINE !* Names of files ! -------------- ! - CHARACTER(LEN=28):: CPGDFILE ='PGD' ! name of the PGD file - CHARACTER(LEN=28):: CPREPFILE ='PREP' ! name of the INITIAL file - CHARACTER(LEN=28):: CSURFFILE ='SURFOUT' ! name of the final output CSURFEX file - CHARACTER(LEN=28):: CNAMELIST ='OPTIONS.nam' ! name of namelist file + CHARACTER(LEN=LIS_CONST_PATH_LEN):: CPGDFILE ='PGD' ! name of the PGD file + CHARACTER(LEN=LIS_CONST_PATH_LEN):: CPREPFILE ='PREP' ! name of the INITIAL file + CHARACTER(LEN=LIS_CONST_PATH_LEN):: CSURFFILE ='SURFOUT' ! name of the final output CSURFEX file + CHARACTER(LEN=LIS_CONST_PATH_LEN):: CNAMELIST ='OPTIONS.nam' ! name of namelist file ! ! !* General flags defining output options diff --git a/lis/surfacemodels/land/subLSM/snowmodel/physics/dataassim_user.f90 b/lis/surfacemodels/land/subLSM/snowmodel/physics/dataassim_user.f90 index d5e20a102..d45a1432a 100755 --- a/lis/surfacemodels/land/subLSM/snowmodel/physics/dataassim_user.f90 +++ b/lis/surfacemodels/land/subLSM/snowmodel/physics/dataassim_user.f90 @@ -56,7 +56,7 @@ subroutine DATAASSIM_USER(nx,ny,icorr_factor_index,& ! obs 1, t=2 is for obs 2, t=3 is for the time between the last ! obs time and the end of year 1, t=4 is for the obs 1 in year ! 2, etc.). - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -73,11 +73,12 @@ subroutine DATAASSIM_USER(nx,ny,icorr_factor_index,& integer nobs_dates,nx,ny,max_iter,local_assim_flag,iday_init,& & imonth_init,iyear_init,nyear,nyears,nobs_total,nobs_total_cfi - character*89 fname_swed,fname_sspr,fname_ssmt - character*80 fname_sweobs - character*80 fname_sweobs_barnes_mask + character(len=LIS_CONST_PATH_LEN) :: fname_swed,fname_sspr,& + & fname_ssmt + character(len=LIS_CONST_PATH_LEN) :: fname_sweobs + character(len=LIS_CONST_PATH_LEN) :: fname_sweobs_barnes_mask - character*80 output_path_wo_assim + character(len=LIS_CONST_PATH_LEN) :: output_path_wo_assim integer trailing_blanks,i_len_wo integer i,j @@ -195,7 +196,9 @@ subroutine DATAASSIM_USER(nx,ny,icorr_factor_index,& ! fname_swed = 'outputs/wo_assim/swed.gdat' ! fname_sspr = 'outputs/wo_assim/sspr.gdat' ! fname_ssmt = 'outputs/wo_assim/ssmt.gdat' - i_len_wo = 80 - trailing_blanks(output_path_wo_assim) + !i_len_wo = 80 - trailing_blanks(output_path_wo_assim) + i_len_wo = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_wo_assim) fname_swed = output_path_wo_assim(1:i_len_wo)//'swed.gdat' fname_sspr = output_path_wo_assim(1:i_len_wo)//'sspr.gdat' fname_ssmt = output_path_wo_assim(1:i_len_wo)//'ssmt.gdat' @@ -313,6 +316,7 @@ subroutine data_assimilation(nx,ny,deltax,deltay,beta,& & imonth_init,iyear_init,nyear,nobs_total,print_inc,& & nyears,dt,max_iter,xhour_init) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -341,9 +345,10 @@ subroutine data_assimilation(nx,ny,deltax,deltay,beta,& & iidy,iobs_rec_tmp,iday_init,imonth_init,iyear_init,nyear,& & krec,nobs_total,nyears,max_iter - character*89 fname_swed,fname_sspr,fname_ssmt - character*80 fname_sweobs - character*80 fname_sweobs_barnes_mask + character(len=LIS_CONST_PATH_LEN) :: fname_swed,fname_sspr,& + & fname_ssmt + character(len=LIS_CONST_PATH_LEN) :: fname_sweobs + character(len=LIS_CONST_PATH_LEN) :: fname_sweobs_barnes_mask ! Perform some initialization steps. if (nyear.eq.1) then @@ -935,6 +940,7 @@ subroutine mk_local_cfs(nx,ny,undef,xmn,ymn,deltax,deltay,& & fname_sweobs,fname_sweobs_barnes_mask,nobs_dates,& & corr_factor_tmp,beta,iobsint,ifill,grid) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -952,8 +958,8 @@ subroutine mk_local_cfs(nx,ny,undef,xmn,ymn,deltax,deltay,& double precision yg(nx_max,ny_max),xg(nx_max,ny_max) double precision xstn(nstns_max),ystn(nstns_max) - character*80 fname_sweobs - character*80 fname_sweobs_barnes_mask + character(len=LIS_CONST_PATH_LEN) :: fname_sweobs + character(len=LIS_CONST_PATH_LEN) :: fname_sweobs_barnes_mask print * print *,'You are doing local assimilation, this requires' @@ -1124,6 +1130,8 @@ subroutine mk_cf_prec_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& & iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & nobs_total,nyears) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + implicit none integer nx,ny,iyear_init,imonth_init,iday_init,max_iter,& @@ -1133,8 +1141,9 @@ subroutine mk_cf_prec_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& integer len_desc,trailing_blanks - character*95 output_fname - character*80 filename,description + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character*80 description character*3 cmo(12) character*2 cdt diff --git a/lis/surfacemodels/land/subLSM/snowmodel/physics/outputs_user.f90 b/lis/surfacemodels/land/subLSM/snowmodel/physics/outputs_user.f90 index 33f59ecef..8fd2eed0e 100755 --- a/lis/surfacemodels/land/subLSM/snowmodel/physics/outputs_user.f90 +++ b/lis/surfacemodels/land/subLSM/snowmodel/physics/outputs_user.f90 @@ -23,7 +23,7 @@ subroutine OUTPUTS_USER(nx,ny,iter,Tair_grid,rh_grid,& ! These might be special-case situations, like just writing out ! data at the end of every day, writing out a few grid cells, ! saving each data arrays to individual files, etc. - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -70,7 +70,8 @@ subroutine OUTPUTS_USER(nx,ny,iter,Tair_grid,rh_grid,& ! real vars(nx_max,ny_max,n_print_vars) real vars(nx,ny,n_print_vars) ! KRA - character*80 output_path_wo_assim,output_path_wi_assim + character(len=LIS_CONST_PATH_LEN) :: output_path_wo_assim,& + & output_path_wi_assim character*1 print_var(n_print_vars) character*4 print_outvars(n_print_vars) @@ -89,8 +90,13 @@ subroutine OUTPUTS_USER(nx,ny,iter,Tair_grid,rh_grid,& integer i_trailing_blanks,trailing_blanks,i_len_wo,i_len_wi ! Calculate how long the paths are. - i_len_wo = 80 - trailing_blanks(output_path_wo_assim) - i_len_wi = 80 - trailing_blanks(output_path_wi_assim) + !i_len_wo = 80 - trailing_blanks(output_path_wo_assim) + !i_len_wi = 80 - trailing_blanks(output_path_wi_assim) + i_len_wo = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_wo_assim) + i_len_wi = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_wi_assim) + ! print *, i_len_wo,i_len_wi ! print *, output_path_wo_assim(1:i_len_wo) ! print *, output_path_wi_assim(1:i_len_wi) diff --git a/lis/surfacemodels/land/subLSM/snowmodel/physics/preprocess_code.f90 b/lis/surfacemodels/land/subLSM/snowmodel/physics/preprocess_code.f90 index 56355b2ec..56b1f542a 100755 --- a/lis/surfacemodels/land/subLSM/snowmodel/physics/preprocess_code.f90 +++ b/lis/surfacemodels/land/subLSM/snowmodel/physics/preprocess_code.f90 @@ -37,6 +37,7 @@ SUBROUTINE PREPROCESS_CODE(topoveg_fname,const_veg_flag,& & output_path_wo_assim,output_path_wi_assim,nrecs_max,& & tabler_sfc_path_name,print_outvars,diam_layer) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -110,14 +111,17 @@ SUBROUTINE PREPROCESS_CODE(topoveg_fname,const_veg_flag,& real run_micromet,run_enbal,run_snowpack,run_snowtran real print_micromet,print_enbal,print_snowpack,print_snowtran - character*80 topoveg_fname,met_input_fname,topo_ascii_fname,& + character(len=LIS_CONST_PATH_LEN) :: topoveg_fname,& + & met_input_fname,topo_ascii_fname,& & veg_ascii_fname - character*80 snowtran_output_fname,micromet_output_fname,& + character(len=LIS_CONST_PATH_LEN) :: snowtran_output_fname,& + & micromet_output_fname,& & enbal_output_fname,snowpack_output_fname,& & multilayer_output_fname - character*80 tabler_sfc_path_name - character*80 output_path_wo_assim,output_path_wi_assim + character(len=LIS_CONST_PATH_LEN) :: tabler_sfc_path_name + character(len=LIS_CONST_PATH_LEN) :: output_path_wo_assim,& + & output_path_wi_assim character*1 print_var(n_print_vars) character*4 print_outvars(n_print_vars) @@ -136,7 +140,7 @@ SUBROUTINE PREPROCESS_CODE(topoveg_fname,const_veg_flag,& real cf_precip_flag,cf_precip_scalar integer ipath_length,i_len_wo,i_len_wi,trailing_blanks - character*80 vege_ht_fname + character(len=LIS_CONST_PATH_LEN) :: vege_ht_fname integer nyears,nyear,nobs_total,nobs_dates,nstns,krec @@ -865,7 +869,10 @@ SUBROUTINE PREPROCESS_CODE(topoveg_fname,const_veg_flag,& if (icorr_factor_loop.eq.1) then - i_len_wo = 80 - trailing_blanks(output_path_wo_assim) + !i_len_wo = 80 - trailing_blanks(output_path_wo_assim) + i_len_wo = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_wo_assim) + open (401,& & file=output_path_wo_assim(1:i_len_wo)//'multilayer_2Dxy.gdat',& & form='unformatted',access='direct',& @@ -910,7 +917,10 @@ SUBROUTINE PREPROCESS_CODE(topoveg_fname,const_veg_flag,& close (407) close (408) - i_len_wi = 80 - trailing_blanks(output_path_wi_assim) + !i_len_wi = 80 - trailing_blanks(output_path_wi_assim) + i_len_wi = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_wi_assim) + open (401,& & file=output_path_wi_assim(1:i_len_wi)//'multilayer_2Dxy.gdat',& & form='unformatted',access='direct',& @@ -1677,6 +1687,7 @@ subroutine HRESTART_READ(nx,ny,snow_d,snow_depth,& & canopy_int_old,topo,sum_sprec,ihrestart_flag,& & i_dataassim_loop) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -1700,7 +1711,7 @@ subroutine HRESTART_READ(nx,ny,snow_d,snow_depth,& character*5 name3 character*5 niter character*1 iloop - character*30 fname + character(len=LIS_CONST_PATH_LEN) :: fname ! Build the file name so it includes the interation number. name1 = 'hrestart/hrestart_' @@ -1791,6 +1802,7 @@ subroutine mk_ctl_files(nx,ny,deltax,deltay,xmn,ymn,dt,& & print_var,print_outvars,print_multilayer,& & multilayer_output_fname) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -1805,14 +1817,15 @@ subroutine mk_ctl_files(nx,ny,deltax,deltay,xmn,ymn,dt,& character*1 print_var(n_print_vars) - character*80 micromet_output_fname - character*80 enbal_output_fname - character*80 snowpack_output_fname - character*80 snowtran_output_fname - character*80 multilayer_output_fname - character*80 tabler_sfc_path_name - character*80 output_path - character*80 output_path_wo_assim,output_path_wi_assim + character(len=LIS_CONST_PATH_LEN) :: micromet_output_fname + character(len=LIS_CONST_PATH_LEN) :: enbal_output_fname + character(len=LIS_CONST_PATH_LEN) :: snowpack_output_fname + character(len=LIS_CONST_PATH_LEN) :: snowtran_output_fname + character(len=LIS_CONST_PATH_LEN) :: multilayer_output_fname + character(len=LIS_CONST_PATH_LEN) :: tabler_sfc_path_name + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_wo_assim,& + & output_path_wi_assim character*4 print_outvars(n_print_vars) character*80 description(n_print_vars) @@ -2019,6 +2032,7 @@ subroutine mk_ctl_files(nx,ny,deltax,deltay,xmn,ymn,dt,& subroutine mk_density_assim_sfc_ctl(nx,ny,deltax,deltay,xmn,ymn,& & undef,den_outvars,den_description) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer nx,ny,igrads_dt @@ -2027,8 +2041,9 @@ subroutine mk_density_assim_sfc_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,len_path,len_desc,trailing_blanks - character*80 output_fname,filename,den_description - character*80 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname,filename + character*80 den_description + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*14 den_outvars character*3 cmo character*2 cdt @@ -2047,9 +2062,15 @@ subroutine mk_density_assim_sfc_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = '^' - len_path = 80 - trailing_blanks(output_path_tmp) + !len_path = 80 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) + output_fname = output_path_tmp(1:len_path)//den_outvars//'.gdat' - len_name = 80 - trailing_blanks(output_fname) + !len_name = 80 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) + len_desc = 80 - trailing_blanks(den_description) open (71,file=filename) @@ -2121,6 +2142,7 @@ subroutine mk_density_assim_ctl(nx,ny,deltax,deltay,xmn,ymn,& & undef,output_path,print_inc,den_outvars,& & den_description) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer nx,ny,iyear_init,imonth_init,iday_init,max_iter,& @@ -2131,10 +2153,11 @@ subroutine mk_density_assim_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,len_path,len_desc,trailing_blanks - character*105 output_fname - character*80 filename,den_description - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character*80 den_description + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*14 den_outvars character*3 cmo(12) character*2 cdt @@ -2173,9 +2196,13 @@ subroutine mk_density_assim_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//den_outvars//'.gdat' - len_name = 105 - trailing_blanks(output_fname) + !len_name = 105 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) len_desc = 80 - trailing_blanks(den_description) open (71,file=filename) @@ -2248,6 +2275,7 @@ subroutine mk_4char_vars_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& & undef,output_path,k,print_outvars,description,& & print_inc) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer nx,ny,iyear_init,imonth_init,iday_init,max_iter,& @@ -2258,10 +2286,11 @@ subroutine mk_4char_vars_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& integer len_name,len_path,len_desc,trailing_blanks - character*95 output_fname - character*80 filename,description - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character*80 description + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*4 print_outvars character*3 cmo(12) character*2 cdt @@ -2304,9 +2333,13 @@ subroutine mk_4char_vars_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//print_outvars//'.gdat' - len_name = 95 - trailing_blanks(output_fname) + !len_name = 95 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) len_desc = 80 - trailing_blanks(description) open (71,file=filename) @@ -2378,6 +2411,7 @@ subroutine mk_micromet_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& & iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_fname) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer nx,ny,iyear_init,imonth_init,iday_init,max_iter,& @@ -2387,8 +2421,8 @@ subroutine mk_micromet_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& integer len_name,trailing_blanks - character*80 output_fname,filename - character*83 output_fname_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname,filename + character(len=LIS_CONST_PATH_LEN) :: output_fname_tmp character*3 cmo(12) character*2 cdt @@ -2424,7 +2458,9 @@ subroutine mk_micromet_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& output_fname_tmp = output_fname//' ' endif - len_name = 83 - trailing_blanks(output_fname_tmp) + !len_name = 83 - trailing_blanks(output_fname_tmp) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname_tmp) open (71,file=filename) @@ -2511,6 +2547,7 @@ subroutine mk_enbal_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& & iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_fname) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer nx,ny,iyear_init,imonth_init,iday_init,max_iter,& @@ -2520,8 +2557,8 @@ subroutine mk_enbal_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& integer len_name,trailing_blanks - character*80 output_fname,filename - character*83 output_fname_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname,filename + character(len=LIS_CONST_PATH_LEN) :: output_fname_tmp character*3 cmo(12) character*2 cdt @@ -2557,7 +2594,9 @@ subroutine mk_enbal_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& output_fname_tmp = output_fname//' ' endif - len_name = 83 - trailing_blanks(output_fname_tmp) + !len_name = 83 - trailing_blanks(output_fname_tmp) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname_tmp) open (71,file=filename) @@ -2648,6 +2687,7 @@ subroutine mk_snowpack_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& & iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_fname) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer nx,ny,iyear_init,imonth_init,iday_init,max_iter,& @@ -2657,8 +2697,8 @@ subroutine mk_snowpack_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& integer len_name,trailing_blanks - character*80 output_fname,filename - character*83 output_fname_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname,filename + character(len=LIS_CONST_PATH_LEN) :: output_fname_tmp character*3 cmo(12) character*2 cdt @@ -2694,7 +2734,9 @@ subroutine mk_snowpack_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& output_fname_tmp = output_fname//' ' endif - len_name = 83 - trailing_blanks(output_fname_tmp) + !len_name = 83 - trailing_blanks(output_fname_tmp) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname_tmp) open (71,file=filename) @@ -2795,6 +2837,7 @@ subroutine mk_snowtran_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& & iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_fname) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer nx,ny,iyear_init,imonth_init,iday_init,max_iter,& @@ -2804,8 +2847,8 @@ subroutine mk_snowtran_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& integer len_name,trailing_blanks - character*80 output_fname,filename - character*83 output_fname_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname,filename + character(len=LIS_CONST_PATH_LEN) :: output_fname_tmp character*3 cmo(12) character*2 cdt @@ -2841,7 +2884,9 @@ subroutine mk_snowtran_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& output_fname_tmp = output_fname//' ' endif - len_name = 83 - trailing_blanks(output_fname_tmp) + !len_name = 83 - trailing_blanks(output_fname_tmp) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname_tmp) open (71,file=filename) @@ -2923,6 +2968,7 @@ subroutine mk_snowtran_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& subroutine mk_tabler_1_ctl(nx,ny,deltax,deltay,xmn,ymn,& & undef,output_path) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer nx,ny,igrads_dt @@ -2931,10 +2977,10 @@ subroutine mk_tabler_1_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,len_path,trailing_blanks - character*99 output_fname - character*80 filename - character*80 output_path - character*83 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*3 cmo character*2 cdt @@ -2957,9 +3003,13 @@ subroutine mk_tabler_1_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = output_path//' ' endif - len_path = 83 - trailing_blanks(output_path_tmp) + !len_path = 83 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//'tabler_sfcs.gdat' - len_name = 99 - trailing_blanks(output_fname) + !len_name = 99 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) open (71,file=filename) @@ -3045,6 +3095,7 @@ subroutine mk_tabler_2_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& & iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_path,k,print_inc) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer nx,ny,iyear_init,imonth_init,iday_init,max_iter,& @@ -3055,10 +3106,10 @@ subroutine mk_tabler_2_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& integer len_name,len_path,trailing_blanks - character*97 output_fname - character*80 filename - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*3 cmo(12) character*2 cdt @@ -3100,9 +3151,13 @@ subroutine mk_tabler_2_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname=output_path_tmp(1:len_path)//'tabler_sfcs_iter.gdat' - len_name = 97 - trailing_blanks(output_fname) + !len_name = 97 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) open (71,file=filename) @@ -3174,6 +3229,7 @@ subroutine mk_multilayer_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& & iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_fname) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -3184,8 +3240,8 @@ subroutine mk_multilayer_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& integer len_name,trailing_blanks - character*80 output_fname,filename - character*83 output_fname_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname,filename + character(len=LIS_CONST_PATH_LEN) :: output_fname_tmp character*3 cmo(12) character*2 cdt @@ -3221,7 +3277,9 @@ subroutine mk_multilayer_ctl(nx,ny,deltax,deltay,xmn,ymn,dt,& output_fname_tmp = output_fname//' ' endif - len_name = 83 - trailing_blanks(output_fname_tmp) + !len_name = 83 - trailing_blanks(output_fname_tmp) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname_tmp) open (71,file=filename) @@ -3306,6 +3364,7 @@ subroutine mk_multilayer_2Dxy_ctl(nx,ny,deltax,deltay,xmn,ymn,& & dt,iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_path,k) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -3316,10 +3375,10 @@ subroutine mk_multilayer_2Dxy_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,trailing_blanks - character*106 output_fname - character*80 filename - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*3 cmo(12) character*2 cdt @@ -3360,9 +3419,13 @@ subroutine mk_multilayer_2Dxy_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//'multilayer_2Dxy.gdat' - len_name = 106 - trailing_blanks(output_fname) + !len_name = 106 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) open (71,file=filename) @@ -3439,6 +3502,7 @@ subroutine mk_multilayer_snod_ctl(nx,ny,deltax,deltay,xmn,ymn,& & dt,iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_path,k) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -3449,10 +3513,10 @@ subroutine mk_multilayer_snod_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,trailing_blanks - character*106 output_fname - character*80 filename - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*3 cmo(12) character*2 cdt @@ -3493,9 +3557,13 @@ subroutine mk_multilayer_snod_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//'multilayer_snod.gdat' - len_name = 106 - trailing_blanks(output_fname) + !len_name = 106 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) open (71,file=filename) @@ -3566,6 +3634,7 @@ subroutine mk_multilayer_sden_ctl(nx,ny,deltax,deltay,xmn,ymn,& & dt,iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_path,k) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -3576,10 +3645,10 @@ subroutine mk_multilayer_sden_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,trailing_blanks - character*106 output_fname - character*80 filename - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*3 cmo(12) character*2 cdt @@ -3620,9 +3689,13 @@ subroutine mk_multilayer_sden_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//'multilayer_sden.gdat' - len_name = 106 - trailing_blanks(output_fname) + !len_name = 106 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) open (71,file=filename) @@ -3693,6 +3766,7 @@ subroutine mk_multilayer_swed_ctl(nx,ny,deltax,deltay,xmn,ymn,& & dt,iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_path,k) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -3703,10 +3777,10 @@ subroutine mk_multilayer_swed_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,trailing_blanks - character*106 output_fname - character*80 filename - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*3 cmo(12) character*2 cdt @@ -3747,9 +3821,13 @@ subroutine mk_multilayer_swed_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//'multilayer_swed.gdat' - len_name = 106 - trailing_blanks(output_fname) + !len_name = 106 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) open (71,file=filename) @@ -3820,6 +3898,7 @@ subroutine mk_multilayer_diam_ctl(nx,ny,deltax,deltay,xmn,ymn,& & dt,iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_path,k) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -3830,10 +3909,10 @@ subroutine mk_multilayer_diam_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,trailing_blanks - character*106 output_fname - character*80 filename - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*3 cmo(12) character*2 cdt @@ -3874,9 +3953,13 @@ subroutine mk_multilayer_diam_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//'multilayer_diam.gdat' - len_name = 106 - trailing_blanks(output_fname) + !len_name = 106 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) open (71,file=filename) @@ -3947,6 +4030,7 @@ subroutine mk_multilayer_flux_ctl(nx,ny,deltax,deltay,xmn,ymn,& & dt,iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_path,k) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -3957,10 +4041,10 @@ subroutine mk_multilayer_flux_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,trailing_blanks - character*106 output_fname - character*80 filename - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*3 cmo(12) character*2 cdt @@ -4001,9 +4085,13 @@ subroutine mk_multilayer_flux_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//'multilayer_flux.gdat' - len_name = 106 - trailing_blanks(output_fname) + !len_name = 106 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) open (71,file=filename) @@ -4074,6 +4162,7 @@ subroutine mk_multilayer_temp_ctl(nx,ny,deltax,deltay,xmn,ymn,& & dt,iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_path,k) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -4084,10 +4173,10 @@ subroutine mk_multilayer_temp_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,trailing_blanks - character*106 output_fname - character*80 filename - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*3 cmo(12) character*2 cdt @@ -4128,9 +4217,13 @@ subroutine mk_multilayer_temp_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//'multilayer_temp.gdat' - len_name = 106 - trailing_blanks(output_fname) + !len_name = 106 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) open (71,file=filename) @@ -4201,6 +4294,7 @@ subroutine mk_multilayer_cond_ctl(nx,ny,deltax,deltay,xmn,ymn,& & dt,iyear_init,imonth_init,iday_init,xhour_init,max_iter,& & undef,output_path,k) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -4211,10 +4305,10 @@ subroutine mk_multilayer_cond_ctl(nx,ny,deltax,deltay,xmn,ymn,& integer len_name,trailing_blanks - character*106 output_fname - character*80 filename - character*80 output_path - character*86 output_path_tmp + character(len=LIS_CONST_PATH_LEN) :: output_fname + character(len=LIS_CONST_PATH_LEN) :: filename + character(len=LIS_CONST_PATH_LEN) :: output_path + character(len=LIS_CONST_PATH_LEN) :: output_path_tmp character*3 cmo(12) character*2 cdt @@ -4255,9 +4349,13 @@ subroutine mk_multilayer_cond_ctl(nx,ny,deltax,deltay,xmn,ymn,& output_path_tmp = output_path//' ' endif - len_path = 86 - trailing_blanks(output_path_tmp) + !len_path = 86 - trailing_blanks(output_path_tmp) + len_path = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_path_tmp) output_fname = output_path_tmp(1:len_path)//'multilayer_cond.gdat' - len_name = 106 - trailing_blanks(output_fname) + !len_name = 106 - trailing_blanks(output_fname) + len_name = LIS_CONST_PATH_LEN - & + & trailing_blanks(output_fname) open (71,file=filename) diff --git a/lis/surfacemodels/land/subLSM/snowmodel/physics/readparam_code.f90 b/lis/surfacemodels/land/subLSM/snowmodel/physics/readparam_code.f90 index 816fef876..06a17365f 100755 --- a/lis/surfacemodels/land/subLSM/snowmodel/physics/readparam_code.f90 +++ b/lis/surfacemodels/land/subLSM/snowmodel/physics/readparam_code.f90 @@ -51,6 +51,7 @@ subroutine READPARAM_CODE(dt,deltax,deltay,Utau_t_flag,& ! It is set up to deal with integer, real, and string (character) ! input values. + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_vars, only: allocate_arrays use snowmodel_inc implicit none @@ -87,13 +88,16 @@ subroutine READPARAM_CODE(dt,deltax,deltay,Utau_t_flag,& integer nx,ny,max_iter,icond_flag,irun_data_assim - character*80 topoveg_fname,met_input_fname,topo_ascii_fname,& + character(len=LIS_CONST_PATH_LEN) :: topoveg_fname,& + & met_input_fname,topo_ascii_fname,& & veg_ascii_fname - character*80 snowtran_output_fname,micromet_output_fname,& + character(len=LIS_CONST_PATH_LEN) :: snowtran_output_fname,& + & micromet_output_fname,& & enbal_output_fname,snowpack_output_fname,multilayer_output_fname - character*80 output_path_wo_assim,output_path_wi_assim,& + character(len=LIS_CONST_PATH_LEN) :: output_path_wo_assim,& + & output_path_wi_assim,& & tabler_sfc_path_name integer iyear_init,imonth_init,iday_init,& @@ -111,7 +115,7 @@ subroutine READPARAM_CODE(dt,deltax,deltay,Utau_t_flag,& integer iobsint ! flag (=1) use dn value from .par file real xlat ! approx. latitude of domain center, decimal deg - character*100 snowmodel_dot_par_fname + character(len=LIS_CONST_PATH_LEN) :: snowmodel_dot_par_fname ! Working parameters. character*120 input_string @@ -2016,11 +2020,11 @@ subroutine GET_DOT_PAR_PATH_LOCATION(snowmodel_dot_par_fname) ! snowmodel parpath/parname.par ! and it will look for the .par file in the different location ! and/or the different name. - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer nargs,iargc - character*100 snowmodel_dot_par_fname + character(len=LIS_CONST_PATH_LEN) :: snowmodel_dot_par_fname snowmodel_dot_par_fname = "snowmodel.par" diff --git a/lis/surfacemodels/land/subLSM/snowmodel/physics/snowmodel_vars.f90 b/lis/surfacemodels/land/subLSM/snowmodel/physics/snowmodel_vars.f90 index 8474d6897..2282bbd63 100755 --- a/lis/surfacemodels/land/subLSM/snowmodel/physics/snowmodel_vars.f90 +++ b/lis/surfacemodels/land/subLSM/snowmodel/physics/snowmodel_vars.f90 @@ -1,10 +1,11 @@ module snowmodel_vars + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none ! Misc variables. - character*100 snowmodel_dot_par_fname + character(len=LIS_CONST_PATH_LEN) :: snowmodel_dot_par_fname ! SnowTran-3D variables. integer max_iter @@ -92,13 +93,14 @@ module snowmodel_vars real run_micromet,run_enbal,run_snowpack,run_snowtran - character*80 topoveg_fname,met_input_fname,topo_ascii_fname,& + character(len=LIS_CONST_PATH_LEN) :: topoveg_fname,& + & met_input_fname,topo_ascii_fname,& & veg_ascii_fname real curve_lg_scale_flag real, allocatable :: curve_wt_lg(:,:) - character*80 tabler_sfc_path_name + character(len=LIS_CONST_PATH_LEN) :: tabler_sfc_path_name real Tabler_1_flag,Tabler_2_flag ! End SnowTran-3D variables. @@ -221,12 +223,13 @@ module snowmodel_vars real print_user,print_inc double precision nrecs_max - character*80 micromet_output_fname - character*80 enbal_output_fname - character*80 snowtran_output_fname - character*80 snowpack_output_fname - character*80 multilayer_output_fname - character*80 output_path_wo_assim,output_path_wi_assim + character(len=LIS_CONST_PATH_LEN) :: micromet_output_fname + character(len=LIS_CONST_PATH_LEN) :: enbal_output_fname + character(len=LIS_CONST_PATH_LEN) :: snowtran_output_fname + character(len=LIS_CONST_PATH_LEN) :: snowpack_output_fname + character(len=LIS_CONST_PATH_LEN) :: multilayer_output_fname + character(len=LIS_CONST_PATH_LEN) :: output_path_wo_assim, & + & output_path_wi_assim character*1 print_var(n_print_vars) character*4 print_outvars(n_print_vars) diff --git a/lis/surfacemodels/land/subLSM/snowmodel/physics/snowpack_code.f90 b/lis/surfacemodels/land/subLSM/snowmodel/physics/snowpack_code.f90 index a39707228..3ff3c559e 100755 --- a/lis/surfacemodels/land/subLSM/snowmodel/physics/snowpack_code.f90 +++ b/lis/surfacemodels/land/subLSM/snowmodel/physics/snowpack_code.f90 @@ -2497,7 +2497,7 @@ SUBROUTINE ZERO_SNOW_SEAICE_4(nx,ny,snow_depth,ro_snow_grid,& ! simulations. If you are doing something else, you will have to ! make numerous changes to this code and the subroutines that are ! called from it. - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -2527,7 +2527,7 @@ SUBROUTINE ZERO_SNOW_SEAICE_4(nx,ny,snow_depth,ro_snow_grid,& real swed_init(icount) real sden_init(icount) - character*80 output_path_wo_assim + character(len=LIS_CONST_PATH_LEN) :: output_path_wo_assim print *,'TRANSFERRING THE SNOW DATA TO THE NEXT YEAR' print *,'TRANSFERRING THE SNOW DATA TO THE NEXT YEAR' @@ -2739,7 +2739,7 @@ SUBROUTINE SUPERIMPOSED_ICE(iyear,output_path_wo_assim,& ! Here I am going to sweep through June and July and determine ! whether the snowpack ever became isothermal during this ! period. - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer k,iend_year,iyear,i,j,ii,jj @@ -2749,7 +2749,7 @@ SUBROUTINE SUPERIMPOSED_ICE(iyear,output_path_wo_assim,& integer, parameter :: nnx=361,nny=361 - character*80 output_path_wo_assim + character(len=LIS_CONST_PATH_LEN) :: output_path_wo_assim ! Parcels. real roff_col(icount) diff --git a/lis/surfacemodels/land/subLSM/snowmodel/physics/snowtran_code.f90 b/lis/surfacemodels/land/subLSM/snowmodel/physics/snowtran_code.f90 index a55884d64..e3704f967 100755 --- a/lis/surfacemodels/land/subLSM/snowmodel/physics/snowtran_code.f90 +++ b/lis/surfacemodels/land/subLSM/snowmodel/physics/snowtran_code.f90 @@ -63,6 +63,7 @@ subroutine SNOWTRAN_CODE(bc_flag,bs_flag,C_z,& & output_path_wi_assim,icorr_factor_loop,windspd_2m_grid,& & Qsubl_depth) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use snowmodel_inc implicit none @@ -182,7 +183,8 @@ subroutine SNOWTRAN_CODE(bc_flag,bs_flag,C_z,& real seaice_conc(nx,ny) real Tabler_1_flag,Tabler_2_flag - character*80 output_path_wo_assim,output_path_wi_assim,& + character(len=LIS_CONST_PATH_LEN) :: output_path_wo_assim,& + & output_path_wi_assim,& & tabler_sfc_path_name integer i_len_tabler,trailing_blanks,icorr_factor_loop,& & i_len_wo,i_len_wi diff --git a/lis/surfacemodels/land/summa.1.0/dshare/data_types.f90 b/lis/surfacemodels/land/summa.1.0/dshare/data_types.f90 index c35aa1757..df6c22ac1 100644 --- a/lis/surfacemodels/land/summa.1.0/dshare/data_types.f90 +++ b/lis/surfacemodels/land/summa.1.0/dshare/data_types.f90 @@ -20,6 +20,7 @@ MODULE data_types ! used to define model data structures + use LIS_constantsMod, only: LIS_CONST_PATH_LEN USE nrtype, integerMissing=>nr_integerMissing USE var_lookup,only:maxvarStat implicit none @@ -41,7 +42,7 @@ MODULE data_types ! *********************************************************************************************************** ! define a derived type for the data in the file type,public :: file_info - character(len=256) :: filenmData='notPopulatedYet' ! name of data file + character(len=LIS_CONST_PATH_LEN) :: filenmData='notPopulatedYet' ! name of data file integer(i4b) :: nVars ! number of variables in the file integer(i4b) :: nTimeSteps ! number of variables in the file integer(i4b),allocatable :: data_id(:) ! netcdf variable id for each forcing data variable diff --git a/lis/surfacemodels/land/summa.1.0/dshare/popMetadat_module.f90 b/lis/surfacemodels/land/summa.1.0/dshare/popMetadat_module.f90 index 1647bffba..a114e470c 100644 --- a/lis/surfacemodels/land/summa.1.0/dshare/popMetadat_module.f90 +++ b/lis/surfacemodels/land/summa.1.0/dshare/popMetadat_module.f90 @@ -661,6 +661,7 @@ end subroutine popMetadat ! subroutine to populate write commands from file input ! ------------------------------------------------ subroutine read_output_file(err,message) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN USE get_ixName_module,only:get_ixUnknown ! some dimensional parameters @@ -701,7 +702,7 @@ subroutine read_output_file(err,message) ! local variables character(LEN=256) :: cmessage ! error message of downwind routine - character(LEN=256) :: outfile ! full path of model output file + character(LEN=LIS_CONST_PATH_LEN) :: outfile ! full path of model output file integer(i4b) :: unt ! file unit character(LEN=512),allocatable :: charlines(:) ! vector of character strings character(LEN=64),allocatable :: lineWords(:) ! vector to parse textline diff --git a/lis/surfacemodels/land/summa.1.0/engine/ffile_info_module.f90 b/lis/surfacemodels/land/summa.1.0/engine/ffile_info_module.f90 index 0dfd3ca7f..fea736499 100644 --- a/lis/surfacemodels/land/summa.1.0/engine/ffile_info_module.f90 +++ b/lis/surfacemodels/land/summa.1.0/engine/ffile_info_module.f90 @@ -32,7 +32,8 @@ module ffile_info_module ! public subroutine ffile_info: read information on model forcing files ! ************************************************************************************************ subroutine ffile_info(nGRU,err,message) - ! used to read metadata on the forcing data file + ! used to read metadata on the forcing data file + use LIS_constantsMod, only: LIS_CONST_PATH_LEN USE ascii_util_module,only:file_open USE netcdf_util_module,only:nc_file_open ! open netCDF file USE netcdf_util_module,only:netcdf_err ! netcdf error handling function @@ -62,9 +63,9 @@ subroutine ffile_info(nGRU,err,message) ! the rest character(LEN=1024),allocatable :: dataLines(:) ! vector of lines of information (non-comment lines) character(len=256) :: cmessage ! error message for downwind routine - character(LEN=256) :: infile ! input filename + character(LEN=LIS_CONST_PATH_LEN) :: infile ! input filename integer(i4b) :: unt ! file unit (free unit output from file_open) - character(LEN=256) :: filenameData ! name of forcing datafile + character(LEN=LIS_CONST_PATH_LEN) :: filenameData ! name of forcing datafile integer(i4b) :: ivar ! index of model variable integer(i4b) :: iFile ! counter for forcing files integer(i4b) :: nFile ! number of forcing files in forcing file list diff --git a/lis/surfacemodels/land/summa.1.0/engine/read_force_module.f90 b/lis/surfacemodels/land/summa.1.0/engine/read_force_module.f90 index c896338f9..60586b900 100644 --- a/lis/surfacemodels/land/summa.1.0/engine/read_force_module.f90 +++ b/lis/surfacemodels/land/summa.1.0/engine/read_force_module.f90 @@ -30,6 +30,7 @@ module read_force_module ! ************************************************************************************************ subroutine read_force(istep,iHRU_global,iFile,iRead,ncid,time_data,forc_data,err,message) ! provide access to subroutines + use LIS_constantsMod, only: LIS_CONST_PATH_LEN USE nrtype ! variable types, etc. USE netcdf ! netcdf capability USE netcdf_util_module,only:nc_file_open ! open netcdf file @@ -73,7 +74,7 @@ subroutine read_force(istep,iHRU_global,iFile,iRead,ncid,time_data,forc_data,err ! rest real(dp),parameter :: amiss= -1.d+30 ! missing real real(dp),parameter :: verySmall=1e-3 ! tiny number - character(len=256) :: infile ! filename + character(len=LIS_CONST_PATH_LEN) :: infile ! filename character(len=256) :: cmessage ! error message for downwind routine character(len=256) :: refTimeString ! reference time string integer(i4b) :: iline ! loop through lines in the file diff --git a/lis/surfacemodels/land/summa.1.0/engine/read_param_module.f90 b/lis/surfacemodels/land/summa.1.0/engine/read_param_module.f90 index 8419f8daf..37226b230 100644 --- a/lis/surfacemodels/land/summa.1.0/engine/read_param_module.f90 +++ b/lis/surfacemodels/land/summa.1.0/engine/read_param_module.f90 @@ -48,7 +48,8 @@ module read_param_module ! ************************************************************************************************ ! public subroutine read_param: read trial model parameter values ! ************************************************************************************************ - subroutine read_param(iRunMode,checkHRU,startGRU,nHRU,nGRU,typeStruct,mparStruct,bparStruct,err,message) + subroutine read_param(iRunMode,checkHRU,startGRU,nHRU,nGRU,typeStruct,mparStruct,bparStruct,err,message) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! used to read model initial conditions USE summaFileManager,only:SETNGS_PATH ! path for metadata files USE summaFileManager,only:PARAMETER_TRIAL ! file with parameter trial values @@ -70,7 +71,7 @@ subroutine read_param(iRunMode,checkHRU,startGRU,nHRU,nGRU,typeStruct,mparStruct character(*), intent(out) :: message ! error message ! define local variables character(len=1024) :: cmessage ! error message for downwind routine - character(LEN=1024) :: infile ! input filename + character(LEN=LIS_CONST_PATH_LEN) :: infile ! input filename integer(i4b) :: iHRU ! index of HRU within data vector integer(i4b) :: localHRU,iGRU ! index of HRU and GRU within data structure integer(i4b) :: ixParam ! index of the model parameter in the data structure diff --git a/lis/surfacemodels/land/summa.1.0/engine/read_pinit_module.f90 b/lis/surfacemodels/land/summa.1.0/engine/read_pinit_module.f90 index 6c658a236..189f6dc3f 100644 --- a/lis/surfacemodels/land/summa.1.0/engine/read_pinit_module.f90 +++ b/lis/surfacemodels/land/summa.1.0/engine/read_pinit_module.f90 @@ -35,7 +35,8 @@ module read_pinit_module ! public subroutine read_pinit: read default model parameter values and constraints ! ************************************************************************************************ subroutine read_pinit(filenm,isLocal,mpar_meta,parFallback,err,message) - ! used to read metadata on the forcing data file + ! used to read metadata on the forcing data file + use LIS_constantsMod, only: LIS_CONST_PATH_LEN USE summaFileManager,only:SETNGS_PATH ! path for metadata files USE ascii_util_module,only:file_open ! open ascii file USE ascii_util_module,only:split_line ! extract the list of variable names from the character string @@ -55,7 +56,7 @@ subroutine read_pinit(filenm,isLocal,mpar_meta,parFallback,err,message) ! define general variables logical(lgt),parameter :: backwardsCompatible=.false. ! .true. if skip check that all parameters are populated character(len=256) :: cmessage ! error message for downwind routine - character(LEN=256) :: infile ! input filename + character(LEN=LIS_CONST_PATH_LEN) :: infile ! input filename integer(i4b) :: unt ! file unit (free unit output from file_open) integer(i4b) :: iline ! loop through lines in the file integer(i4b),parameter :: maxLines=1000 ! maximum lines in the file diff --git a/lis/surfacemodels/land/summa.1.0/hookup/summaFileManager.f90 b/lis/surfacemodels/land/summa.1.0/hookup/summaFileManager.f90 index cd410b98f..58e2251ed 100644 --- a/lis/surfacemodels/land/summa.1.0/hookup/summaFileManager.f90 +++ b/lis/surfacemodels/land/summa.1.0/hookup/summaFileManager.f90 @@ -22,11 +22,14 @@ ! (C) Copyright 2009-2010 --- Dmitri Kavetski and Martyn Clark --- All rights reserved !****************************************************************** MODULE summafilemanager +use LIS_constantsMod, only: LIS_CONST_PATH_LEN use nrtype implicit none public ! summa-wide pathlength -integer(i4b),parameter::summaPathLen=256 +!integer(i4b),parameter::summaPathLen=256 +integer(i4b),parameter::summaPathLen=LIS_CONST_PATH_LEN + ! defines the path for data files (and default values) CHARACTER(LEN=summaPathLen) :: SETNGS_PATH='settings/' ! SETNGS_PATH CHARACTER(LEN=summaPathLen) :: INPUT_PATH ='input/default/' ! INPUT_PATH diff --git a/lis/surfacemodels/land/summa.1.0/netcdf/def_output_module.f90 b/lis/surfacemodels/land/summa.1.0/netcdf/def_output_module.f90 index 0054f9632..3f3824559 100644 --- a/lis/surfacemodels/land/summa.1.0/netcdf/def_output_module.f90 +++ b/lis/surfacemodels/land/summa.1.0/netcdf/def_output_module.f90 @@ -64,7 +64,8 @@ module def_output_module ! ********************************************************************************************************** ! public subroutine def_output: define model output file ! ********************************************************************************************************** - subroutine def_output(nHRU,nSoil,infile,err,message) +subroutine def_output(nHRU,nSoil,infile,err,message) + use LIS_constantsMod, only: LIS_CONST_PATH_LEN USE globalData,only:structInfo ! information on the data structures USE globalData,only:forc_meta,attr_meta,type_meta ! metaData structures USE globalData,only:prog_meta,diag_meta,flux_meta,deriv_meta ! metaData structures @@ -83,7 +84,7 @@ subroutine def_output(nHRU,nSoil,infile,err,message) integer(i4b) :: iStruct ! loop through structure types integer(i4b),parameter :: modelTime=1 ! model timestep output frequency character(len=5) :: fstring ! string to hold model output freuqnecy - character(len=1000) :: fname ! temporary filename + character(len=LIS_CONST_PATH_LEN) :: fname ! temporary filename character(len=256) :: cmessage ! temporary error message ! initialize errors diff --git a/lis/surfacemodels/land/summa.1.0/netcdf/modelwrite_module.f90 b/lis/surfacemodels/land/summa.1.0/netcdf/modelwrite_module.f90 index ca481cfe4..c305c9367 100644 --- a/lis/surfacemodels/land/summa.1.0/netcdf/modelwrite_module.f90 +++ b/lis/surfacemodels/land/summa.1.0/netcdf/modelwrite_module.f90 @@ -368,10 +368,11 @@ subroutine writeRestart(filename, & ! intent(in): name of restart file ! external routines USE netcdf_util_module,only:nc_file_close ! close netcdf file USE netcdf_util_module,only:nc_file_open ! open netcdf file + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none ! -------------------------------------------------------------------------------------------------------- ! input - character(len=256),intent(in) :: filename ! name of the restart file + character(len=LIS_CONST_PATH_LEN),intent(in) :: filename ! name of the restart file integer(i4b),intent(in) :: nGRU ! number of GRUs integer(i4b),intent(in) :: nHRU ! number of HRUs type(var_info),intent(in) :: prog_meta(:) ! metadata diff --git a/lis/surfacemodels/land/summa.1.0/summa1_lsmMod.F90 b/lis/surfacemodels/land/summa.1.0/summa1_lsmMod.F90 index 20c3ec0e9..3a2493973 100644 --- a/lis/surfacemodels/land/summa.1.0/summa1_lsmMod.F90 +++ b/lis/surfacemodels/land/summa.1.0/summa1_lsmMod.F90 @@ -37,6 +37,8 @@ module summa1_lsmMod use summa1_module use globalData + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + implicit none PRIVATE @@ -87,7 +89,7 @@ module summa1_lsmMod integer(i4b) :: nHRU ! number of global hydrologic response units integer(i4b) :: hruCount ! number of local hydrologic response units real(dp),dimension(12) :: greenVegFrac_monthly ! fraction of green vegetation in each month (0-1) - character(len=256) :: summaFileManagerFile ! path/name of file defining directories and files + character(len=LIS_CONST_PATH_LEN) :: summaFileManagerFile ! path/name of file defining directories and files type(summa1dec), allocatable :: summa1(:) end type summa1_type_dec @@ -134,7 +136,9 @@ subroutine summa1_lsm_ini() USE modelwrite_module USE def_output_module USE check_icond_module -! !DESCRIPTION: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN + + ! !DESCRIPTION: ! !EOP implicit none @@ -157,10 +161,12 @@ subroutine summa1_lsm_ini() integer(i4b) :: fileUnit ! file unit (output from file_open; a unit not currently used) character(LEN=256),allocatable :: dataLines(:) ! vector of character strings from non-comment lines character(LEN=256),allocatable :: chardata(:) ! vector of character data - character(len=256) :: fileout='' ! output filename +#if 0 + character(len=LIS_CONST_PATH_LEN):: fileout='' ! output filename +#endif character(len=64) :: output_fileSuffix='' ! suffix for the output file - character(len=256) :: attrFile ! attributes file name - character(len=256) :: restartFile ! restart file name + character(len=LIS_CONST_PATH_LEN):: attrFile ! attributes file name + character(len=LIS_CONST_PATH_LEN):: restartFile ! restart file name integer(i4b) :: iRunMode ! define the current running mode integer(i4b) :: fileGRU ! number of GRUs in the input file integer(i4b) :: fileHRU ! number of HRUs in the input file diff --git a/lis/testcases/metforcing/afwa-cod/compute_cod_based_clouds.F90 b/lis/testcases/metforcing/afwa-cod/compute_cod_based_clouds.F90 index a59bfaa51..0e7b29d25 100644 --- a/lis/testcases/metforcing/afwa-cod/compute_cod_based_clouds.F90 +++ b/lis/testcases/metforcing/afwa-cod/compute_cod_based_clouds.F90 @@ -18,6 +18,7 @@ ! !INTERFACE: subroutine compute_cod_based_clouds(n, cod, cloud_pcts) ! !USES: + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod!, only : LIS_rc use LIS_logMod, only : LIS_logunit use LIS_timeMgrMod, only : LIS_get_julhr,LIS_tick,LIS_time2date @@ -35,7 +36,7 @@ subroutine compute_cod_based_clouds(n, cod, cloud_pcts) integer :: hemi integer :: yr1,mo1,da1,hr1,mn1,ss1,julhr,doy1 - character*200 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename logical :: file_exists integer :: ip real :: udef @@ -44,7 +45,7 @@ subroutine compute_cod_based_clouds(n, cod, cloud_pcts) real :: ts1,gmt1 ! integer :: istat -character*200 :: cfilename +character(len=LIS_CONST_PATH_LEN) :: cfilename real, allocatable, dimension(:,:) :: temp_cod ! diff --git a/lis/testcases/metforcing/afwa-cod/compute_type_based_clouds.F90 b/lis/testcases/metforcing/afwa-cod/compute_type_based_clouds.F90 index 6fc7d0217..27d68adf5 100644 --- a/lis/testcases/metforcing/afwa-cod/compute_type_based_clouds.F90 +++ b/lis/testcases/metforcing/afwa-cod/compute_type_based_clouds.F90 @@ -19,6 +19,7 @@ subroutine compute_type_based_clouds(n, cldamt_nh, cldamt_sh, cldamt, & cldtyp_nh, cldtyp_sh, fog_nh, fog_sh) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_localPet use LIS_logMod, only : LIS_logunit use LIS_timeMgrMod, only : LIS_get_julhr,LIS_tick,LIS_time2date @@ -46,7 +47,7 @@ subroutine compute_type_based_clouds(n, cldamt_nh, cldamt_sh, cldamt, & integer*2,allocatable :: tops (:,:,:) integer*4,allocatable :: times (:,:) integer :: doy1,yr1,mo1,da1,hr1,mn1,ss1,try - character*200 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename logical :: file_exists integer :: istat real*8 :: backtime1 diff --git a/lis/testcases/metforcing/afwa-cod/readagrmetforcing.F90 b/lis/testcases/metforcing/afwa-cod/readagrmetforcing.F90 index 14dbc295d..fe061dd82 100644 --- a/lis/testcases/metforcing/afwa-cod/readagrmetforcing.F90 +++ b/lis/testcases/metforcing/afwa-cod/readagrmetforcing.F90 @@ -24,6 +24,7 @@ ! !INTERFACE: subroutine readagrmetforcing(n,findex, order) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_domain, LIS_localPet use LIS_metforcingMod, only : LIS_forc use LIS_timeMgrMod,only : LIS_get_julhr,LIS_tick,LIS_time2date @@ -171,7 +172,7 @@ subroutine readagrmetforcing(n,findex, order) ! computes the downward shortwave radiation value ! \end{description} !EOP - character*200 :: filename + character(len=LIS_CONST_PATH_LEN) :: filename integer :: hemi integer :: c,r,t,gid,sftype integer :: istat diff --git a/lis/testcases/metforcing/afwa-galwem/AGRMET_fldbld_galwem.F90 b/lis/testcases/metforcing/afwa-galwem/AGRMET_fldbld_galwem.F90 index 81c14471d..d3d7fee6b 100644 --- a/lis/testcases/metforcing/afwa-galwem/AGRMET_fldbld_galwem.F90 +++ b/lis/testcases/metforcing/afwa-galwem/AGRMET_fldbld_galwem.F90 @@ -20,6 +20,7 @@ ! !INTERFACE: subroutine AGRMET_fldbld_galwem(n,order,julhr) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_verify use LIS_timeMgrMod, only : LIS_julhr_date @@ -96,10 +97,10 @@ subroutine AGRMET_fldbld_galwem(n,order,julhr) ! \end{description} !EOP integer :: ftn, igrib - character*120 :: avnfile + character(len=LIS_CONST_PATH_LEN) :: avnfile integer :: yr1, mo1, da1, hr1 integer :: julhr - character*100 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) integer :: iginfo ( 40 ) real :: gridres integer :: alert_number @@ -363,6 +364,7 @@ subroutine AGRMET_fldbld_read_galwem(n, fg_filename, ifguess, jfguess, & agr_pres) ! !USES: ! + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_mpiMod use LIS_historyMod @@ -488,7 +490,7 @@ subroutine AGRMET_fldbld_read_galwem(n, fg_filename, ifguess, jfguess, & ! \end{description} !EOP character*9 :: cstat - character*100 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) character(len=4) :: grib_msg character(len=4) :: AGRMET_check_galwem_message integer :: count_hgt @@ -515,7 +517,7 @@ subroutine AGRMET_fldbld_read_galwem(n, fg_filename, ifguess, jfguess, & real, allocatable :: fg_uwnd ( : , : ) real, allocatable :: fg_vwnd ( : , : ) ! - character(len=100) :: jim_name + character(len=LIS_CONST_PATH_LEN) :: jim_name ! diff --git a/lis/testcases/metforcing/afwa-galwem/AGRMET_fldbld_precip_galwem.F90 b/lis/testcases/metforcing/afwa-galwem/AGRMET_fldbld_precip_galwem.F90 index d256fd0b6..4d09e6846 100644 --- a/lis/testcases/metforcing/afwa-galwem/AGRMET_fldbld_precip_galwem.F90 +++ b/lis/testcases/metforcing/afwa-galwem/AGRMET_fldbld_precip_galwem.F90 @@ -20,6 +20,7 @@ ! !INTERFACE: subroutine AGRMET_fldbld_precip_galwem(n,julhr,fc_hr,fg_data) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_rc, LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, & LIS_verify, LIS_endrun @@ -123,10 +124,10 @@ subroutine AGRMET_fldbld_precip_galwem(n,julhr,fc_hr,fg_data) ! \end{description} !EOP integer :: ftn, igrib - character*120 :: avnfile, avnfile2 + character(len=LIS_CONST_PATH_LEN) :: avnfile, avnfile2 integer :: yr1, mo1, da1, hr1 integer :: julhr - character*100 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) integer :: iginfo ( 2 ) real :: gridres integer :: alert_number @@ -427,6 +428,7 @@ end subroutine AGRMET_fldbld_precip_galwem subroutine AGRMET_fldbld_read_precip_galwem(fg_filename, ifguess, jfguess,& fg_prec, alert_number ) ! !USES: + use LIS_constantsMod, only : LIS_CONST_PATH_LEN use LIS_coreMod, only : LIS_masterproc use LIS_logMod, only : LIS_logunit, LIS_abort, LIS_alert, LIS_verify @@ -489,7 +491,7 @@ subroutine AGRMET_fldbld_read_precip_galwem(fg_filename, ifguess, jfguess,& ! !EOP character*9 :: cstat - character*100 :: message ( 20 ) + character(len=LIS_CONST_PATH_LEN) :: message ( 20 ) integer :: count_prec integer :: i integer :: ierr @@ -501,7 +503,7 @@ subroutine AGRMET_fldbld_read_precip_galwem(fg_filename, ifguess, jfguess,& param_num_val, forecasttime_val real, allocatable :: dum1d ( : ) ! -character(len=40) :: jim_name +character(len=LIS_CONST_PATH_LEN) :: jim_name ! diff --git a/lis/utils/ensemble_downscale/restartFromEnsemble.F90 b/lis/utils/ensemble_downscale/restartFromEnsemble.F90 index 1d9f46762..8fcbf683f 100644 --- a/lis/utils/ensemble_downscale/restartFromEnsemble.F90 +++ b/lis/utils/ensemble_downscale/restartFromEnsemble.F90 @@ -29,10 +29,11 @@ ! !ROUINE: program restartFromEnsemble + use LIS_constantsMod, only: LIS_CONST_PATH_LEN ! need : filename, number of fields, integer :: i , j, k, m - character*80 :: inputf, outputf + character(len=LIS_CONST_PATH_LEN) :: inputf, outputf integer :: nens, nfields, ntiles integer :: lsm character*80 :: ctmp diff --git a/lis/utils/ensemble_upscale/restartForEnsemble.F90 b/lis/utils/ensemble_upscale/restartForEnsemble.F90 index b3e09aa5b..6afa1d772 100644 --- a/lis/utils/ensemble_upscale/restartForEnsemble.F90 +++ b/lis/utils/ensemble_upscale/restartForEnsemble.F90 @@ -30,9 +30,9 @@ program restartForEnsemble ! need : filename, number of fields, - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN integer :: i , j, k, m - character*80 :: inputf, outputf + character(len=LIS_CONST_PATH_LEN) :: inputf, outputf integer :: nens, nfields, ntiles integer :: lsm character*80 :: ctmp diff --git a/lis/utils/grads/generateGrADsControlFile.F90 b/lis/utils/grads/generateGrADsControlFile.F90 index 1900adcbc..64fed59f0 100644 --- a/lis/utils/grads/generateGrADsControlFile.F90 +++ b/lis/utils/grads/generateGrADsControlFile.F90 @@ -34,6 +34,7 @@ program generateGrADsControlFile use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN #if ( defined AIX ) use xlfutility, only : iargc #endif @@ -41,8 +42,8 @@ program generateGrADsControlFile implicit none integer :: nsm_levs, nst_levs - character*80 :: gradsfile,lisdir,modelname,configfile, listfile - character*80 :: statsfile + character(len=LIS_CONST_PATH_LEN) :: gradsfile,lisdir,modelname,configfile, listfile + character(len=LIS_CONST_PATH_LEN) :: statsfile character*40 :: lsm character*20 :: wform character*100, allocatable :: varname(:) diff --git a/lis/utils/restartConverter/restartConverter.F90 b/lis/utils/restartConverter/restartConverter.F90 index 8a5709255..472e403e3 100644 --- a/lis/utils/restartConverter/restartConverter.F90 +++ b/lis/utils/restartConverter/restartConverter.F90 @@ -27,6 +27,7 @@ program restartConverter use ESMF + use LIS_constantsMod, only: LIS_CONST_PATH_LEN use map_utils implicit none @@ -40,8 +41,8 @@ program restartConverter integer :: nc,nr,ntiles type(proj_info) :: cproj, fproj - character*100 :: clcfile, flcfile, clmfile, flmfile - character*100 :: input_rstfile, output_rstfile + character(len=LIS_CONST_PATH_LEN) :: clcfile, flcfile, clmfile, flmfile + character(len=LIS_CONST_PATH_LEN) :: input_rstfile, output_rstfile integer :: nt, nfields,cnens, fnens, waterclass integer :: j,c,r,t,m,ios integer :: cntiles, fntiles diff --git a/lis/utils/restartGenAFWA/createLISrestart.F90 b/lis/utils/restartGenAFWA/createLISrestart.F90 index 9351da778..108275206 100644 --- a/lis/utils/restartGenAFWA/createLISrestart.F90 +++ b/lis/utils/restartGenAFWA/createLISrestart.F90 @@ -11,14 +11,14 @@ ! AGRMET outputx program createLISrestart - + use LIS_constantsMod, only: LIS_CONST_PATH_LEN implicit none integer, parameter :: imax=512, jmax=512 integer, parameter :: nc = 720, nr=300 real, parameter :: xmeshl = 47.625 real, parameter :: xpnmcaf = 257 real, parameter :: ypnmcaf = 257 - character*100 :: filename1 + character(len=LIS_CONST_PATH_LEN) :: filename1 integer :: ip real :: udef1 real :: gi(2,imax,jmax) diff --git a/lis/utils/ueinit_generator/generateUEinitFile.F90 b/lis/utils/ueinit_generator/generateUEinitFile.F90 index d74b29995..62fa738af 100644 --- a/lis/utils/ueinit_generator/generateUEinitFile.F90 +++ b/lis/utils/ueinit_generator/generateUEinitFile.F90 @@ -26,8 +26,9 @@ ! !ROUINE: program generateUEinitFile + use LIS_constantsMod, only: LIS_CONST_PATH_LEN integer :: i,k,m,c,r - character*80 :: opt_outfile, ue_initfile + character(len=LIS_CONST_PATH_LEN) :: opt_outfile, ue_initfile integer :: nens_ue, glbngrid, gnc, gnr, nparam integer :: opt, iterno, count, obj_func character*80 :: ctmp diff --git a/lis/utils/usaf/retune_bratseth/src/future/USAF_readFilesMod.F90 b/lis/utils/usaf/retune_bratseth/src/future/USAF_readFilesMod.F90 index e62c3f5df..505ebadac 100644 --- a/lis/utils/usaf/retune_bratseth/src/future/USAF_readFilesMod.F90 +++ b/lis/utils/usaf/retune_bratseth/src/future/USAF_readFilesMod.F90 @@ -45,7 +45,7 @@ subroutine readfiles(myid,numprocs, starttime, endtime, deltatime, & type(esmf_time), intent(in) :: starttime type(esmf_time), intent(in) :: endtime type(esmf_timeinterval), intent(in) :: deltatime - character(len=255), intent(in) :: datadir + character(len=ESMF_MAXPATHLEN), intent(in) :: datadir integer, intent(in) :: max_stations integer, intent(in) :: max_sat_reports integer, intent(in) :: max_vario_bins @@ -69,8 +69,8 @@ subroutine readfiles(myid,numprocs, starttime, endtime, deltatime, & type(esmf_time) :: curtime integer :: yyyy, mm, dd, hh integer :: rc - character(len=44) :: infile - character(len=123) :: fullpath + character(len=ESMF_MAXPATHLEN) :: infile + character(len=ESMF_MAXPATHLEN) :: fullpath integer :: istat integer :: ierr integer :: count_skips diff --git a/lis/utils/usaf/retune_bratseth/src/procOBA_NWP.F90 b/lis/utils/usaf/retune_bratseth/src/procOBA_NWP.F90 index ad430148f..bd032cab4 100644 --- a/lis/utils/usaf/retune_bratseth/src/procOBA_NWP.F90 +++ b/lis/utils/usaf/retune_bratseth/src/procOBA_NWP.F90 @@ -31,7 +31,7 @@ program main implicit none ! Local variables - character(len=255) :: outfile + character(len=ESMF_MAXPATHLEN) :: outfile integer :: iunit_input, istat, iunit_out_vario integer :: j, i integer*8, allocatable :: icounts_vario(:) @@ -43,7 +43,7 @@ program main integer :: max_num_files integer :: max_vario_bins integer :: vario_bin_dist - character(len=255) :: datadir + character(len=ESMF_MAXPATHLEN) :: datadir integer :: startyear integer :: startmonth integer :: startday @@ -71,10 +71,10 @@ program main logical :: is_precip integer :: num_args logical :: use_blacklist - character(len=255) :: blacklist_file + character(len=ESMF_MAXPATHLEN) :: blacklist_file character(len=9), allocatable :: blacklist_stns(:) integer :: nstns - character(len=255) :: logname + character(len=ESMF_MAXPATHLEN) :: logname ! TODO: Add other ob types. character(len=maxlen_obtype), parameter :: T2M = "T2M" @@ -707,6 +707,7 @@ subroutine readfiles(myid, numprocs, starttime, endtime, deltatime, & use_blacklist, nstns, blacklist_stns) ! Imports + use esmf use USAF_ReportsMod, only: Reports, newReports, getNobs, getReport, & destroyReports, appendToReports, bcast_reports use USAF_StationsMod, only: great_circle_distance @@ -720,7 +721,7 @@ subroutine readfiles(myid, numprocs, starttime, endtime, deltatime, & type(esmf_time), intent(in) :: starttime type(esmf_time), intent(in) :: endtime type(esmf_timeinterval), intent(in) :: deltatime - character(len=255), intent(in) :: datadir + character(len=ESMF_MAXPATHLEN), intent(in) :: datadir integer, intent(in) :: max_stations integer, intent(in) :: max_vario_bins integer, intent(in) :: vario_bin_dist @@ -737,8 +738,8 @@ subroutine readfiles(myid, numprocs, starttime, endtime, deltatime, & integer :: yyyy, mm, dd, hh character(len=10) :: yyyymmddhh integer :: rc - character(len=44) :: infile - character(len=123) :: fullpath + character(len=ESMF_MAXPATHLEN) :: infile + character(len=ESMF_MAXPATHLEN) :: fullpath integer :: istat integer :: iunit_input type(Reports) :: R_obs diff --git a/lis/utils/usaf/retune_bratseth/src/procOBA_Sat.F90 b/lis/utils/usaf/retune_bratseth/src/procOBA_Sat.F90 index d081420fa..df2be864b 100644 --- a/lis/utils/usaf/retune_bratseth/src/procOBA_Sat.F90 +++ b/lis/utils/usaf/retune_bratseth/src/procOBA_Sat.F90 @@ -30,7 +30,7 @@ program main implicit none ! Local variables - character(len=255) :: outfile + character(len=ESMF_MAXPATHLEN) :: outfile integer :: iunit_input, istat, iunit_out_vario integer :: j, i integer*8, allocatable :: icounts_vario(:) @@ -43,7 +43,7 @@ program main integer :: max_num_files integer :: max_vario_bins integer :: vario_bin_dist - character(len=255) :: datadir + character(len=ESMF_MAXPATHLEN) :: datadir integer :: startyear integer :: startmonth integer :: startday @@ -74,10 +74,10 @@ program main real :: dlat real :: dist_thresh logical :: use_blacklist - character(len=255) :: blacklist_file + character(len=ESMF_MAXPATHLEN) :: blacklist_file character(len=9), allocatable :: blacklist_stns(:) integer :: nstns - character(len=255) :: logname + character(len=ESMF_MAXPATHLEN) :: logname character(len=maxlen_sattype), parameter :: SSMI = "SSMI" character(len=maxlen_sattype), parameter :: CMORPH = "CMORPH" @@ -877,6 +877,7 @@ subroutine readfiles(myid,numprocs, starttime, endtime, deltatime, & use_blacklist, nstns, blacklist_stns) ! Imports + use esmf use USAF_GridHashMod, only: GridHash, newGridHash, destroyGridHash, & insertIntoGridHash, getObindexVectorFromGridHash, & createIJForGridHash @@ -893,7 +894,7 @@ subroutine readfiles(myid,numprocs, starttime, endtime, deltatime, & type(esmf_time), intent(in) :: starttime type(esmf_time), intent(in) :: endtime type(esmf_timeinterval), intent(in) :: deltatime - character(len=255), intent(in) :: datadir + character(len=ESMF_MAXPATHLEN), intent(in) :: datadir integer, intent(in) :: max_stations integer, intent(in) :: max_sat_reports integer, intent(in) :: max_vario_bins @@ -915,8 +916,8 @@ subroutine readfiles(myid,numprocs, starttime, endtime, deltatime, & integer :: yyyy, mm, dd, hh character(len=10) :: yyyymmddhh, yyyymmddhh_k, yyyymmddhh_kk integer :: rc - character(len=44) :: infile - character(len=123) :: fullpath + character(len=ESMF_MAXPATHLEN) :: infile + character(len=ESMF_MAXPATHLEN) :: fullpath integer :: istat integer :: iunit_input type(Reports) :: R_gages_sat, R_matches diff --git a/lvt/core/LVT_DAMod.F90 b/lvt/core/LVT_DAMod.F90 index af4d94736..7920db9c6 100644 --- a/lvt/core/LVT_DAMod.F90 +++ b/lvt/core/LVT_DAMod.F90 @@ -183,7 +183,7 @@ end subroutine LVT_DAInit subroutine LVT_readLISDAdata(pass) ! ! !USES: - + implicit none ! ! !INPUT PARAMETERS: @@ -199,104 +199,7 @@ subroutine LVT_readLISDAdata(pass) ! !REVISION HISTORY: ! !EOP -#if 0 - character*100 :: innovfile, gainfile, spreadfile - logical :: file_exists - integer :: ftn - integer :: t - integer :: ninnovid, innovid, fsigmaid - real :: norm_innov(LVT_LIS_rc(1)%lnc, LVT_LIS_rc(1)%lnr) - real :: fvar(LVT_LIS_rc(1)%lnc, LVT_LIS_rc(1)%lnr) - real :: innov(LVT_LIS_rc(1)%lnc, LVT_LIS_rc(1)%lnr) - real :: gain(LVT_LIS_rc(1)%ntiles,LVT_rc%nstvars) - real :: spread(LVT_LIS_rc(1)%lnc, LVT_LIS_rc(1)%lnr),& - LVT_rc%nstvars) - - if(LVT_rc%computeInnovDist.eq.1) then - call create_dainnov_filename(innovfile) - inquire(file=innovfile, exist=file_exists) - - if(file_exists) then - write(LVT_logunit,*) '[INFO] Reading Innovation file ',innovfile -#if (defined USE_NETCDF3 || defined USE_NETCDF4) - call LVT_verify(nf90_open(path=trim(innovfile),& - mode=NF90_NOWRITE, ncid=ftn),& - 'failed to open innovfile '//trim(innovfile)) - - call LVT_verify(nf90_inq_varid(ftn,"ninnov_01",ninnovid),& - 'nf90_inq_varid failed for ninnov_01') - call LVT_verify(nf90_inq_varid(ftn,"innov_01",innovid),& - 'nf90_inq_varid failed for innov_01') - call LVT_verify(nf90_inq_varid(ftn,"forecast_sigma_01",fsigmaid),& - 'nf90_inq_varid failed for forecast_sigma') - - - call LVT_verify(nf90_get_var(ftn,ninnovid,norm_innov),& - 'nf90_get_var failed for ninnov') - call LVT_verify(nf90_get_var(ftn,innovid,innov),& - 'nf90_get_var failed for innov') - call LVT_verify(nf90_get_var(ftn,fsigmaid,fvar),& - 'nf90_get_var failed for forecast sigma') - - call LVT_verify(nf90_close(ftn),'failed to close '//& - trim(innovfile)) - -#endif -!binary old output -#if 0 - ftn = LVT_getNextUnitNumber() - open(ftn,file=innovfile, form='unformatted') - - read(ftn) norm_innov - read(ftn) innov - read(ftn) fvar - call LVT_releaseUnitNumber(ftn) -#endif - - call logNormInnovationEntry(pass, norm_innov) -! call logInnovationEntry(pass, innov) -! call logFvarEntry(pass, fvar) - endif - endif - - if(LVT_rc%computeGain.eq.1) then - - call create_dagain_filename(gainfile) - inquire(file=gainfile, exist=file_exists) - if(file_exists) then - ftn = LVT_getNextUnitNumber() - write(LVT_logunit,*) '[INFO] Reading Gain file ',gainfile - open(ftn,file=gainfile, form='unformatted') - - do t=1,LVT_rc%nstvars - read(ftn) gain(:,t) - enddo - call LVT_releaseUnitNumber(ftn) - - call logGainEntry(pass, gain) - endif - endif - - if(LVT_rc%computeSpread.eq.1) then - - call create_daspread_filename(spreadfile) - inquire(file=spreadfile, exist=file_exists) - - if(file_exists) then - ftn = LVT_getNextUnitNumber() - write(LVT_logunit,*) '[INFO] Reading Spread file ',spreadfile - open(ftn,file=spreadfile, form='unformatted') - - do t=1,LVT_rc%nstvars - read(ftn) spread(:,:,t) - enddo - call LVT_releaseUnitNumber(ftn) - - call logSpreadEntry(pass, spread) - endif - endif -#endif end subroutine LVT_readLISDAdata #if 0 @@ -580,7 +483,6 @@ end subroutine logSpreadEntry subroutine LVT_computeDAstats(pass) ! ! !USES: - implicit none ! ! !INPUT PARAMETERS: @@ -598,237 +500,7 @@ subroutine LVT_computeDAstats(pass) ! !EOP - integer :: c,r,v,t - character(len=12) :: cdate - character(len=4) :: cdate1 - character*100 :: fname1, fname2 - integer :: ftn -#if 0 - integer :: dimID(2), nobsId, ninnov_meanId, ninnov_varId - - real :: mean_gain(LVT_LIS_rc(1)%lnc,LVT_LIS_rc(1)%lnr,& - LVT_rc%nstvars) - real :: count_mean_gain(LVT_LIS_rc(1)%lnc,LVT_LIS_rc(1)%lnr,& - LVT_rc%nstvars) - integer :: shuffle, deflate, deflate_level - - shuffle = 1 - deflate = 1 - deflate_level =9 - - if(LVT_rc%endtime.eq.1.and.LVT_rc%computeInnovDist.eq.1) then - if(pass.eq.1) then - do r=1,LVT_LIS_rc(1)%lnr - do c=1,LVT_LIS_rc(1)%lnc - if(LVT_DAstats%count_norm_innov(c,r)& - .gt.LVT_rc%obsCountThreshold) then - - LVT_DAstats%mean_norm_innov(c,r) = & - LVT_DAstats%sx_norm_innov(c,r)/& - LVT_DAstats%count_norm_innov(c,r) - - LVT_DAstats%var_norm_innov(c,r) = & - LVT_DAstats%sxx_norm_innov(c,r)/& - LVT_DAstats%count_norm_innov(c,r) - & - LVT_DAstats%mean_norm_innov(c,r)**2 - - else - LVT_DAstats%mean_norm_innov(c,r) = LVT_rc%udef - LVT_DAstats%var_norm_innov(c,r) = LVT_rc%udef - endif - enddo - enddo - - do r=1,LVT_LIS_rc(1)%lnr - do c=1,LVT_LIS_rc(1)%lnc - if(LVT_DAstats%count_mean_innov(c,r).gt.& - LVT_rc%obsCountThreshold) then - LVT_DAstats%mean_innov(c,r) = LVT_DAstats%mean_innov(c,r)/& - LVT_DAstats%count_mean_innov(c,r) - else - LVT_DAstats%mean_innov(c,r) = LVT_rc%udef - LVT_DAstats%count_mean_innov(c,r) = LVT_rc%udef - endif - enddo - enddo - - do r=1,LVT_LIS_rc(1)%lnr - do c=1,LVT_LIS_rc(1)%lnc - if(LVT_DAstats%count_mean_fvar(c,r).gt.& - LVT_rc%obsCountThreshold) then - LVT_DAstats%mean_fvar(c,r) = LVT_DAstats%mean_fvar(c,r)/& - LVT_DAstats%count_mean_fvar(c,r) - else - LVT_DAstats%mean_fvar(c,r) = LVT_rc%udef - LVT_DAstats%count_mean_fvar(c,r) = LVT_rc%udef - endif - enddo - enddo - call system('mkdir -p '//(LVT_rc%statsodir)) - write(unit=cdate,fmt='(i4.4,i2.2,i2.2,i2.2,i2.2)') & - LVT_rc%yr, LVT_rc%mo, & - LVT_rc%da, LVT_rc%hr, LVT_rc%mn - - write(unit=cdate1,fmt='(a2,i2.2)') '.d',LVT_rc%nnest - - fname1 = trim(LVT_rc%statsodir)//'/DA_diagnostics_'//cdate//cdate1//'.nc' -#if (defined USE_NETCDF3 || defined USE_NETCDF4) -#if (defined USE_NETCDF4) - call LVT_verify(nf90_create(path=fname1,cmode=nf90_hdf5,& - ncid = ftn),& - 'creating netcdf file failed in LVT_DAMod') -#endif -#if (defined USE_NETCDF3) - call LVT_verify(nf90_create(path=fname1,cmode=nf90_clobber,& - ncid = ftn),& - 'creating netcdf file failed in LIS_historyMod') -#endif - call LVT_verify(nf90_def_dim(ftn,& - 'east_west',LVT_rc%lnc,dimID(1)),& - 'nf90_def_dim failed in LVT_DAMod') - call LVT_verify(nf90_def_dim(ftn,& - 'north_south',LVT_rc%lnr,dimID(2)),& - 'nf90_def_dim failed in LVT_DAMod') - - call LVT_verify(nf90_def_var(ftn,"Mean",& - nf90_float, dimids =dimID,varID=ninnov_meanId),& - 'nf90_def_var failed for Mean in LVT_DAMod') - -#if(defined USE_NETCDF4) - call LVT_verify(nf90_def_var_deflate(ftn,ninnov_meanId,& - shuffle, deflate, deflate_level), & - 'nf90_def_var_deflate failed in LVT_DAMod') -#endif - - call LVT_verify(nf90_def_var(ftn,"Variance",& - nf90_float, dimids =dimID,varID=ninnov_varId),& - 'nf90_def_var failed for Mean in LVT_DAMod') - -#if(defined USE_NETCDF4) - call LVT_verify(nf90_def_var_deflate(ftn,ninnov_varId,& - shuffle, deflate, deflate_level), & - 'nf90_def_var_deflate failed in LVT_DAMod') -#endif - - call LVT_verify(nf90_def_var(ftn,"Nobs",& - nf90_float, dimids =dimID,varID=nobsId),& - 'nf90_def_var failed for Nobs in LVT_DAMod') - -#if(defined USE_NETCDF4) - call LVT_verify(nf90_def_var_deflate(ftn,nobsId,& - shuffle, deflate, deflate_level), & - 'nf90_def_var_deflate failed in LVT_DAMod') -#endif - call LVT_verify(nf90_enddef(ftn)) - - call LVT_verify(nf90_put_var(ftn,ninnov_meanId,& - LVT_DAstats%mean_norm_innov,(/1,1/),& - (/LVT_rc%lnc,LVT_rc%lnr/)), & - 'nf90_put_var failed for ninnov_mean') - - call LVT_verify(nf90_put_var(ftn,ninnov_varId,& - LVT_DAstats%var_norm_innov,(/1,1/),& - (/LVT_rc%lnc,LVT_rc%lnr/)), & - 'nf90_put_var failed for ninnov_variance') - - call LVT_verify(nf90_put_var(ftn,nobsId,& - real(LVT_DAstats%count_norm_innov),(/1,1/),& - (/LVT_rc%lnc,LVT_rc%lnr/)), & - 'nf90_put_var failed for nobs') - - call LVT_verify(nf90_close(ftn)) -#endif -!binary output -#if 0 - fname1 = trim(LVT_rc%statsodir)//'/Norm_innov_mean_'//cdate//cdate1//'.gs4r' - ftn = LVT_getNextUnitNumber() - open(ftn,file=fname1,form='unformatted') - write(ftn) LVT_DAstats%mean_norm_innov - write(ftn) float(LVT_DAstats%count_mean_norm_innov) - call LVT_releaseUnitNumber(ftn) - - fname1 = trim(LVT_rc%statsodir)//'/Innov_mean_'//cdate//cdate1//'.gs4r' - ftn = LVT_getNextUnitNumber() - open(ftn,file=fname1,form='unformatted') - write(ftn) LVT_DAstats%mean_innov - write(ftn) float(LVT_DAstats%count_mean_innov) - call LVT_releaseUnitNumber(ftn) - - fname1 = trim(LVT_rc%statsodir)//'/Forecast_var_'//cdate//cdate1//'.gs4r' - ftn = LVT_getNextUnitNumber() - open(ftn,file=fname1,form='unformatted') - write(ftn) LVT_DAstats%mean_fvar - write(ftn) float(LVT_DAstats%count_mean_fvar) - call LVT_releaseUnitNumber(ftn) - - fname2 = trim(LVT_rc%statsodir)//'/Norm_innov_var_'//cdate//cdate1//'.gs4r' - ftn = LVT_getNextUnitNumber() - open(ftn,file=fname2,form='unformatted') - write(ftn) LVT_DAstats%var_norm_innov - write(ftn) float(LVT_DAstats%count_var_norm_innov) - call LVT_releaseUnitNumber(ftn) - -#endif - endif - endif - - if(LVT_rc%endtime.eq.1.and.LVT_rc%computeGain.eq.1) then - - if(pass.eq.1) then - do v=1, LVT_rc%nstvars - do t=1,LVT_LIS_rc(1)%ntiles - if(LVT_DAstats%count_mean_gain(t,v)& - .gt.LVT_rc%obsCountThreshold) then - LVT_DAstats%mean_gain(t,v) = LVT_DAstats%mean_gain(t,v)/& - LVT_DAstats%count_mean_gain(t,v) - else - LVT_DAstats%mean_gain(t,v) = LVT_rc%udef - LVT_DAstats%count_mean_gain(t,v) = LVT_rc%udef - endif - enddo - enddo - - mean_gain = 0.0 - count_mean_gain = 0 - do v=1, LVT_rc%nstvars - do t=1,LVT_LIS_rc(1)%ntiles - c = LVT_LIS_domain(1)%tile(t)%col - r = LVT_LIS_domain(1)%tile(t)%row - if(LVT_DAstats%mean_gain(t,v).ne.LVT_rc%udef) then - mean_gain(c,r,v) = mean_gain(c,r,v) + & - LVT_DAstats%mean_gain(t,v) - count_mean_gain(c,r,v) = count_mean_gain(c,r,v) + 1 - endif - enddo - - do r=1,LVT_LIS_rc(1)%lnr - do c=1,LVT_LIS_rc(1)%lnc - if(count_mean_gain(c,r,v).ne.0.0) then - mean_gain(c,r,v) = mean_gain(c,r,v)/count_mean_gain(c,r,v) - else - mean_gain(c,r,v) = LVT_rc%udef - endif - enddo - enddo - enddo - call system('mkdir -p '//(LVT_rc%statsodir)) - write(unit=cdate,fmt='(i4.4,i2.2,i2.2,i2.2,i2.2)') & - LVT_rc%yr, LVT_rc%mo, & - LVT_rc%da, LVT_rc%hr, LVT_rc%mn - - write(unit=cdate1,fmt='(a2,i2.2)') '.d',LVT_rc%nnest - - fname1 = trim(LVT_rc%statsodir)//'/Gain_mean_'//cdate//cdate1//'.gs4r' - ftn = LVT_getNextUnitNumber() - do v=1,LVT_rc%nstvars - open(ftn,file=fname1,form='unformatted') - write(ftn) mean_gain(:,:,v) - enddo - call LVT_releaseUnitNumber(ftn) - endif - endif -#endif end subroutine LVT_computeDAstats !BOP diff --git a/lvt/core/LVT_DataStreamsMod.F90 b/lvt/core/LVT_DataStreamsMod.F90 index 511434a37..ce30aeeb0 100644 --- a/lvt/core/LVT_DataStreamsMod.F90 +++ b/lvt/core/LVT_DataStreamsMod.F90 @@ -359,7 +359,8 @@ end subroutine LVT_readDataStreams ! !INTERFACE: subroutine LVT_writeDataStreams ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_logMod use LVT_coreMod, only: LVT_LIS_rc ! EMK use LVT_557post_ps41_snowMod ! EMK @@ -377,7 +378,7 @@ subroutine LVT_writeDataStreams integer, parameter :: nsoillayers = 4 - character*200 :: fname_mean,fname_ssdev + character(len=LVT_CONST_PATH_LEN) :: fname_mean,fname_ssdev character(len=8) :: cdate2 character(len=4) :: cdate3 integer :: ftn_mean,ftn_ssdev @@ -2186,6 +2187,9 @@ end function alarm_is_on subroutine LVT_append_navgem_sst_field(ftn_mean, time_unit, time_past, & time_curr, timeRange, toplev, botlev) + ! Imports + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! Defaults implicit none @@ -2199,7 +2203,7 @@ subroutine LVT_append_navgem_sst_field(ftn_mean, time_unit, time_past, & real, intent(in) :: botlev(1) ! Locals - character(250) :: navgem_sst_fname + character(len=LVT_CONST_PATH_LEN) :: navgem_sst_fname real :: gridDesci(50) ! Full NAVGEM grid character(10) :: cdate logical :: file_exists @@ -2363,6 +2367,7 @@ subroutine LVT_append_HYCOM_fields(ftn_mean, time_unit, time_past, & #if (defined USE_NETCDF3 || defined USE_NETCDF4) use netcdf #endif + use LVT_constantsMod, only: LVT_CONST_PATH_LEN integer :: ftn_mean integer :: time_unit @@ -2374,7 +2379,7 @@ subroutine LVT_append_HYCOM_fields(ftn_mean, time_unit, time_past, & real, intent(in) :: lat(LVT_rc%lnc,LVT_rc%lnr) real, intent(in) :: lon(LVT_rc%lnc,LVT_rc%lnr) - character*100 :: hycom_fname + character(len=LVT_CONST_PATH_LEN) :: hycom_fname character*10 :: cdate logical :: file_exists integer :: nid,ios @@ -3179,6 +3184,7 @@ subroutine writeSingleGrib1Var(ftn, gtmp, gribId, gribSF, gribSfc, gribLvl, & ! This subroutine writes a single variable to a grib file ! !EOP + use LVT_constantsMod, only: LVT_CONST_PATH_LEN integer :: ftn real :: gtmp(LVT_rc%lnc*LVT_rc%lnr) @@ -3203,7 +3209,7 @@ subroutine writeSingleGrib1Var(ftn, gtmp, gribId, gribSF, gribSfc, gribLvl, & real :: lat_ll, lon_ll integer :: igrib,iret integer :: decimalPrecision,gribSFtemp - character*100 :: message(20) + character(len=LVT_CONST_PATH_LEN) :: message(20) ! Note passing string of defined points only to output ! because bitmap in GRIB-1 file will fill in the rest @@ -3411,6 +3417,7 @@ subroutine writeSingleGrib2Var(ftn, gtmp, gribId, gribSF, gribSfc, gribLvl,& ! ! !EOP + use LVT_constantsMod, only: LVT_CONST_PATH_LEN integer :: ftn real :: gtmp(LVT_rc%lnc*LVT_rc%lnr) @@ -3447,7 +3454,7 @@ subroutine writeSingleGrib2Var(ftn, gtmp, gribId, gribSF, gribSfc, gribLvl,& real :: lat_ll, lon_ll integer :: igrib,iret integer :: decimalPrecision,gribSFtemp - character*100 :: message(20) + character(len=LVT_CONST_PATH_LEN) :: message(20) logical :: ensembleSpread_local integer :: typeOfGeneratingProcess_local integer :: typeOfProcessedData_local @@ -4653,10 +4660,12 @@ end subroutine resetSingleDataStream subroutine get_hycom_sst_filename(sst_filename, sst_year, sst_month, & sst_day, sst_hour, sst_fcst_hr) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none ! Arguments - character(len=100), intent(inout) :: sst_filename + character(len=LVT_CONST_PATH_LEN), intent(inout) :: sst_filename integer, intent(out) :: sst_year integer, intent(out) :: sst_month integer, intent(out) :: sst_day @@ -4762,11 +4771,12 @@ end subroutine construct_hycom_sst_filename subroutine get_hycom_cice_filename(region, cice_filename, & cice_year, cice_month, cice_day, cice_hour, cice_fcst_hr) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! Arguments character(len=3), intent(in) :: region - character(len=100), intent(inout) :: cice_filename + character(len=LVT_CONST_PATH_LEN), intent(inout) :: cice_filename integer, intent(out) :: cice_year integer, intent(out) :: cice_month integer, intent(out) :: cice_day diff --git a/lvt/core/LVT_LISoutputHandlerMod.F90 b/lvt/core/LVT_LISoutputHandlerMod.F90 index d454f0c09..ee6b50e16 100644 --- a/lvt/core/LVT_LISoutputHandlerMod.F90 +++ b/lvt/core/LVT_LISoutputHandlerMod.F90 @@ -603,7 +603,7 @@ module LVT_LISoutputHandlerMod subroutine LVT_LISoutputInit() ! ! !USES: - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_timeMgrMod, only: LVT_parseTimeString implicit none @@ -645,9 +645,9 @@ subroutine LVT_LISoutputInit() logical :: var_found logical :: vic_flag(2) - character*100 :: vic_d1file(2) - character*100 :: vic_d2file(2) - character*100 :: vic_d3file(2) + character(len=LVT_CONST_PATH_LEN) :: vic_d1file(2) + character(len=LVT_CONST_PATH_LEN) :: vic_d2file(2) + character(len=LVT_CONST_PATH_LEN) :: vic_d3file(2) real, allocatable :: vic_depth(:,:) integer :: j,lis_gid diff --git a/lvt/core/LVT_LISpostMod.F90 b/lvt/core/LVT_LISpostMod.F90 index 42563c37d..a56117357 100644 --- a/lvt/core/LVT_LISpostMod.F90 +++ b/lvt/core/LVT_LISpostMod.F90 @@ -141,6 +141,7 @@ end subroutine LVT_initialize_LISpost ! !INTERFACE: subroutine LVT_process_LISoutput + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! !DESCRIPTION: ! This routine reads the distributed binary LIS outputs and quilts @@ -151,9 +152,9 @@ subroutine LVT_process_LISoutput integer :: ftn(LVT_LISpost%npes),ftn_nc integer :: lnc(LVT_LISpost%npes),lnr(LVT_LISpost%npes) logical :: file_exists - character*200 :: froot,temp1,fname_out + character(len=LVT_CONST_PATH_LEN) :: froot,temp1,fname_out character*100 :: vname,units - character*200 :: fname(LVT_LISpost%npes) + character(len=LVT_CONST_PATH_LEN) :: fname(LVT_LISpost%npes) real, allocatable :: var(:,:,:,:) real :: gvar(LVT_rc%gnc,LVT_rc%gnr,& LVT_LIS_rc(1)%nensem,LVT_LISpost%nlevels) diff --git a/lvt/core/LVT_PRIV_rcMod.F90 b/lvt/core/LVT_PRIV_rcMod.F90 index 46aa432ee..87276e0e2 100644 --- a/lvt/core/LVT_PRIV_rcMod.F90 +++ b/lvt/core/LVT_PRIV_rcMod.F90 @@ -16,7 +16,8 @@ module LVT_PRIV_rcMod ! ! !USES: -! + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! ! !INPUT PARAMETERS: ! ! !OUTPUT PARAMETERS: @@ -58,7 +59,7 @@ module LVT_PRIV_rcMod implicit none type lvtrcdec - character*500 :: configfile + character(len=LVT_CONST_PATH_LEN) :: configfile integer :: max_model_types character*500 :: runmode @@ -108,9 +109,9 @@ module LVT_PRIV_rcMod character*500 :: lvt_out_format character*500 :: lvt_wopt character*500 :: startmode - character*500 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir ! character*500 :: model_name - character*500 :: diagfile + character(len=LVT_CONST_PATH_LEN) :: diagfile integer :: npesx integer :: npesy @@ -119,7 +120,7 @@ module LVT_PRIV_rcMod integer :: vegsrc - character*500 :: paramfile + character(len=LVT_CONST_PATH_LEN) :: paramfile character*500 :: spTransformAnlysDomain integer :: vfile_form @@ -217,7 +218,7 @@ module LVT_PRIV_rcMod integer :: daycount_sout integer :: monthCount integer :: monthCount_sout - character*500 :: rstfile + character(len=LVT_CONST_PATH_LEN) :: rstfile integer :: ts character*500 :: tsconv @@ -230,9 +231,9 @@ module LVT_PRIV_rcMod integer, allocatable :: tlag(:) integer :: wrst - character*500 :: outputSpecFile - character*500 :: statsSpecFile - character*500 :: statsodir + character(len=LVT_CONST_PATH_LEN) :: outputSpecFile + character(len=LVT_CONST_PATH_LEN) :: statsSpecFile + character(len=LVT_CONST_PATH_LEN) :: statsodir integer :: statswriteint integer :: restartInterval logical, allocatable :: resetFlag(:) @@ -257,7 +258,7 @@ module LVT_PRIV_rcMod integer :: dataMask integer :: maskflag - character*500 :: maskdir + character(len=LVT_CONST_PATH_LEN) :: maskdir integer :: monthly_mask(12) integer :: ftn_summ_file integer :: obsCountThreshold @@ -284,9 +285,9 @@ module LVT_PRIV_rcMod real :: strat_var_threshold integer :: strat_nlevels - character*500 :: data_strat_attrib_file + character(len=LVT_CONST_PATH_LEN) :: data_strat_attrib_file integer :: data_based_strat - character*100, allocatable :: data_based_strat_file(:) + character(len=LVT_CONST_PATH_LEN), allocatable :: data_based_strat_file(:) character*100, allocatable :: data_based_strat_var(:) integer :: data_based_nstrats real, allocatable :: data_based_strat_max(:) @@ -296,15 +297,15 @@ module LVT_PRIV_rcMod real, allocatable :: strat_data(:,:) integer :: ntslocs - character*500 :: tsspecfile + character(len=LVT_CONST_PATH_LEN) :: tsspecfile integer :: tsspecstyle integer :: n_sc_locs - character*500 :: sc_specfile + character(len=LVT_CONST_PATH_LEN) :: sc_specfile integer :: sc_specstyle integer :: n_adc_locs - character*500 :: adc_specfile + character(len=LVT_CONST_PATH_LEN) :: adc_specfile integer :: adc_specstyle real :: udef @@ -319,7 +320,7 @@ module LVT_PRIV_rcMod integer :: anomalyTlength character*500 :: sp_avg_mode - character*500 :: reg_maskfile + character(len=LVT_CONST_PATH_LEN) :: reg_maskfile real, allocatable :: regmask(:,:) real :: regmask_max ! The following lines are added by Shugong Wang for backward support of LIS 6 @@ -372,7 +373,7 @@ module LVT_PRIV_rcMod real, allocatable :: HYCOM_hi_arc_n11(:) real, allocatable :: HYCOM_hi_ant_n11(:) integer :: processHYCOM - character*100 :: HYCOMdir + character(len=LVT_CONST_PATH_LEN) :: HYCOMdir integer :: applyNoiseReductionFilter character*100 :: smoothingFilterType @@ -384,9 +385,9 @@ module LVT_PRIV_rcMod logical :: output_sh_ps16 logical :: output_nh_ps16_snodep logical :: output_sh_ps16_snodep - character(len=255) :: input_dir - character(len=255) :: input_prefix - character(len=255) :: output_dir + character(len=LVT_CONST_PATH_LEN) :: input_dir + character(len=LVT_CONST_PATH_LEN) :: input_prefix + character(len=LVT_CONST_PATH_LEN) :: output_dir end type lvtrcdec type lisrcdec @@ -399,9 +400,9 @@ module LVT_PRIV_rcMod character*500, allocatable :: sf_model_type_name_select(:) integer :: nsurfacetypes - character*500 :: domfile + character(len=LVT_CONST_PATH_LEN) :: domfile character*500 :: map_proj - character*500 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nest character*500 :: style character*500 :: format @@ -456,7 +457,7 @@ module LVT_PRIV_rcMod real :: slope_minp integer :: aspect_maxt real :: aspect_minp - character*500 :: outputSpecFile + character(len=LVT_CONST_PATH_LEN) :: outputSpecFile real, allocatable :: rlat_dn(:) real, allocatable :: rlon_dn(:) diff --git a/lvt/core/LVT_TSMod.F90 b/lvt/core/LVT_TSMod.F90 index 3dc3d3f21..810b9c0c0 100644 --- a/lvt/core/LVT_TSMod.F90 +++ b/lvt/core/LVT_TSMod.F90 @@ -19,6 +19,7 @@ module LVT_TSMod ! !USES: use ESMF use LVT_logMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_statsDataMod use LVT_histDataMod @@ -64,7 +65,7 @@ module LVT_TSMod type, public :: ts_struc - character*500 :: tslocfile + character(len=LVT_CONST_PATH_LEN) :: tslocfile character*500 :: tslocname real :: tslat1 real :: tslon1 @@ -1499,7 +1500,7 @@ subroutine writeDataBasedStrat1(model,obs,stats,metric,nsize, & metric_total) ! ! !USES: - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! !INPUT PARAMETERS: ! @@ -1528,7 +1529,7 @@ subroutine writeDataBasedStrat1(model,obs,stats,metric,nsize, & real, allocatable :: bin(:) integer :: ftn,i,t,k,kk,binval - character*500 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename if(LVT_rc%data_based_strat.eq.1) then if(stats%selectOpt.eq.1.and.obs%selectNlevs.ge.1) then @@ -1594,7 +1595,7 @@ subroutine writeDataBasedStrat2(model,obs,stats,metric, & nsize_m,metric_total,nsize_o,obs_total) ! ! !USES: - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! !INPUT PARAMETERS: ! @@ -1628,7 +1629,7 @@ subroutine writeDataBasedStrat2(model,obs,stats,metric, & real, allocatable :: obin(:) integer :: ftn,i,t,k,kk,binval - character*500 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename if(LVT_rc%data_based_strat.eq.1) then if(stats%selectOpt.eq.1.and.obs%selectNlevs.ge.1) then @@ -1719,7 +1720,7 @@ subroutine writeSeasonalCycleInfo1(model,obs,stats,metric,nsize,& count_metric_asc) ! ! !USES: - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! !INPUT PARAMETERS: ! @@ -1748,7 +1749,7 @@ subroutine writeSeasonalCycleInfo1(model,obs,stats,metric,nsize,& real :: wsum_v_sc(LVT_rc%nasc) integer :: wnsum_v_sc(LVT_rc%nasc) integer :: tid,k,l,i,kk,ftn - character*500 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename if(metric%computeSC.eq.1.and.metric%timeOpt.eq.1) then if(stats%selectOpt.eq.1.and.model%selectNlevs.ge.1) then @@ -1816,7 +1817,7 @@ subroutine writeSeasonalCycleInfo2(model,obs,stats,metric,nsize_m,& count_metric_asc,nsize_o,obs_asc,count_obs_asc) ! ! !USES: - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! !INPUT PARAMETERS: ! @@ -1852,7 +1853,7 @@ subroutine writeSeasonalCycleInfo2(model,obs,stats,metric,nsize_m,& real :: wsum_v_sc(LVT_rc%nasc) integer :: wnsum_v_sc(LVT_rc%nasc) integer :: tid,k,l,i,kk,ftn - character*500 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename if(metric%computeSC.eq.1.and.metric%timeOpt.eq.1) then if(stats%selectOpt.eq.1.and.obs%selectNlevs.ge.1) then @@ -1941,7 +1942,7 @@ subroutine writeAvgDiurnalCycleInfo1(model,obs,stats,metric,& nsize,metric_adc,count_metric_adc) ! ! !USES: - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! !INPUT PARAMETERS: ! @@ -1970,7 +1971,7 @@ subroutine writeAvgDiurnalCycleInfo1(model,obs,stats,metric,& real :: wsum_v_adc(LVT_rc%nadc) integer :: wnsum_v_adc(LVT_rc%nadc) integer :: tid,k,l,i,kk,ftn - character*500 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename if(metric%computeADC.eq.1.and.metric%timeOpt.eq.1) then if(stats%selectOpt.eq.1.and.obs%selectNlevs.ge.1) then @@ -2038,7 +2039,7 @@ subroutine writeAvgDiurnalCycleInfo2(model,obs,stats,metric,& nsize_m,metric_adc,count_metric_adc,nsize_o,obs_adc,count_obs_adc) ! ! !USES: - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! !INPUT PARAMETERS: ! @@ -2074,7 +2075,7 @@ subroutine writeAvgDiurnalCycleInfo2(model,obs,stats,metric,& real :: wsum_v_adc(LVT_rc%nadc) integer :: wnsum_v_adc(LVT_rc%nadc) integer :: tid,k,l,i,kk,ftn - character*500 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename if(metric%computeADC.eq.1.and.metric%timeOpt.eq.1) then if(stats%selectOpt.eq.1.and.obs%selectNlevs.ge.1) then diff --git a/lvt/core/LVT_constantsMod.F90 b/lvt/core/LVT_constantsMod.F90 index 0ed99fcb9..bcd4a03ab 100644 --- a/lvt/core/LVT_constantsMod.F90 +++ b/lvt/core/LVT_constantsMod.F90 @@ -24,7 +24,12 @@ module LVT_constantsMod !---------------------------------------------------------------------------- ! physical constants (all data public) !---------------------------------------------------------------------------- + use ESMF, only: ESMF_MAXPATHLEN public + + ! Software contraints + integer, parameter :: LVT_CONST_PATH_LEN = ESMF_MAXPATHLEN + ! real,parameter :: CONST_PI = 3.14159265358979323846 ! pi real,parameter :: LVT_CONST_PI = 3.14159265 ! pi real,parameter :: LVT_CONST_CDAY = 86400.0 ! sec in calendar day ~ sec diff --git a/lvt/core/LVT_domainMod.F90 b/lvt/core/LVT_domainMod.F90 index cb22789f2..fe81627a8 100644 --- a/lvt/core/LVT_domainMod.F90 +++ b/lvt/core/LVT_domainMod.F90 @@ -3274,6 +3274,7 @@ end subroutine get_aspect_value subroutine LVT_readDataMask ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! @@ -3282,7 +3283,7 @@ subroutine LVT_readDataMask ! screen grid points, both spatially and temporally. !EOP - character*100 :: maskfile + character(len=LVT_CONST_PATH_LEN) :: maskfile logical :: file_exists real :: datamask(LVT_rc%lnc, LVT_rc%lnr) integer :: ftn diff --git a/lvt/core/LVT_fileIOMod.F90 b/lvt/core/LVT_fileIOMod.F90 index 57ec665c0..745f5f911 100644 --- a/lvt/core/LVT_fileIOMod.F90 +++ b/lvt/core/LVT_fileIOMod.F90 @@ -93,7 +93,8 @@ module LVT_fileIOMod ! !INTERFACE: subroutine LVT_create_output_directory(mname,dir_name,style) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_log_msg, LVT_endrun implicit none @@ -140,7 +141,7 @@ subroutine LVT_create_output_directory(mname,dir_name,style) !EOP character(len=4) :: cdate character(len=8) :: cdate1 - character(len=200) :: out_dname + character(len=LVT_CONST_PATH_LEN) :: out_dname character(len=50) :: style_temp if(PRESENT(style)) then @@ -217,6 +218,7 @@ subroutine create_output_filename(n, source, fname, model_name, writeint, & wout, style,odir) ! ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_LIS_rc use LVT_logMod, only : LVT_log_msg, LVT_endrun @@ -289,10 +291,10 @@ subroutine create_output_filename(n, source, fname, model_name, writeint, & character*1 :: fres1(10) character(len=1) :: fproj integer :: curr_mo = 0 - character(len=200) :: dname - character(len=200), save :: out_fname + character(len=LVT_CONST_PATH_LEN) :: dname + character(len=LVT_CONST_PATH_LEN), save :: out_fname character(len=50) :: style_temp - character(len=100) :: odir_temp + character(len=LVT_CONST_PATH_LEN) :: odir_temp integer :: i, c if(.not.PRESENT(odir)) then @@ -628,7 +630,8 @@ subroutine create_output_filename_with_timestamp(& model_name, writeint, & wout, style,odir) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_LIS_rc use LVT_logMod, only : LVT_log_msg, LVT_endrun @@ -703,10 +706,10 @@ subroutine create_output_filename_with_timestamp(& character*1 :: fres1(10) character(len=1) :: fproj integer :: curr_mo = 0 - character(len=200) :: dname - character(len=200), save :: out_fname + character(len=LVT_CONST_PATH_LEN) :: dname + character(len=LVT_CONST_PATH_LEN), save :: out_fname character(len=50) :: style_temp - character(len=100) :: odir_temp + character(len=LVT_CONST_PATH_LEN) :: odir_temp integer :: i, c if(.not.PRESENT(odir)) then @@ -1024,7 +1027,8 @@ end subroutine Create_output_filename_with_timestamp ! !INTERFACE: subroutine LVT_create_daobs_filename(n, fname) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc implicit none @@ -1057,7 +1061,7 @@ subroutine LVT_create_daobs_filename(n, fname) ! !EOP - character(len=200) :: out_fname + character(len=LVT_CONST_PATH_LEN) :: out_fname character*100 :: cdate, cdate1 diff --git a/lvt/core/LVT_histDataMod.F90 b/lvt/core/LVT_histDataMod.F90 index ca20525b2..4ea25f02a 100644 --- a/lvt/core/LVT_histDataMod.F90 +++ b/lvt/core/LVT_histDataMod.F90 @@ -6065,7 +6065,7 @@ subroutine LVT_logSingleDataStreamVar(index, source, value_inp,vlevel,units,& ens_index,dir,stdev) ! ! !USES: - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! !ARGUMENTS: integer :: index(3) @@ -6115,7 +6115,7 @@ subroutine LVT_logSingleDataStreamVar(index, source, value_inp,vlevel,units,& integer :: ensem logical :: stdev_flag logical :: dir_flag - character*20 :: dir_tmp + character(len=LVT_CONST_PATH_LEN) :: dir_tmp real :: stdev_tmp(LVT_rc%lnc,LVT_rc%lnr) ! If index is less than zero, the variable was not present in the diff --git a/lvt/core/LVT_logMod.F90 b/lvt/core/LVT_logMod.F90 index 01cdc2cfd..7164532cf 100644 --- a/lvt/core/LVT_logMod.F90 +++ b/lvt/core/LVT_logMod.F90 @@ -183,7 +183,8 @@ end subroutine LVT_log_msg ! !INTERFACE: subroutine LVT_abort( abort_message ) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -220,12 +221,12 @@ subroutine LVT_abort( abort_message ) ! !EOP !BOP - character*100 :: abort_message(20) + character(len=*) :: abort_message(20) ! !EOP character*7 :: iofunc - character*13 :: message_file + character(len=LVT_CONST_PATH_LEN) :: message_file integer :: i integer :: ftn @@ -292,7 +293,8 @@ end subroutine LVT_abort ! !INTERFACE: subroutine LVT_alert( program_name, alert_number, message ) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -335,7 +337,7 @@ subroutine LVT_alert( program_name, alert_number, message ) character*3 :: calert_number character*7 :: iofunc - character*37 :: message_file + character(len=LVT_CONST_PATH_LEN) :: message_file integer :: i integer :: istat integer :: ftn diff --git a/lvt/core/LVT_navgemMod.F90 b/lvt/core/LVT_navgemMod.F90 index bfc052939..cbead933a 100644 --- a/lvt/core/LVT_navgemMod.F90 +++ b/lvt/core/LVT_navgemMod.F90 @@ -485,6 +485,7 @@ end subroutine LVT_get_navgem_sst_bin_filename subroutine putget_real(buffer, iofunc, file_name, igrid, jgrid) ! Modules + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_logMod, only: LVT_logunit ! Defaults @@ -501,7 +502,7 @@ subroutine putget_real(buffer, iofunc, file_name, igrid, jgrid) integer, parameter :: msglns = 20 character*14 :: access_type character*4 :: cstat - character*90 :: message(msglns) + character(len=LVT_CONST_PATH_LEN) :: message(msglns) integer :: istat integer :: istat1 integer :: reclen diff --git a/lvt/core/LVT_optUEMod.F90 b/lvt/core/LVT_optUEMod.F90 index 91f104365..3f70bc6f0 100644 --- a/lvt/core/LVT_optUEMod.F90 +++ b/lvt/core/LVT_optUEMod.F90 @@ -15,7 +15,8 @@ ! !INTERFACE: module LVT_optUEMod ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -36,6 +37,7 @@ module LVT_optUEMod ! !EOP !BOP + PRIVATE !----------------------------------------------------------------------------- ! !PUBLIC MEMBER FUNCTIONS: @@ -49,14 +51,14 @@ module LVT_optUEMod type, public :: optuectl integer :: optueAlg character*10 :: algname - character*100 :: decspaceAttribsFile + character(len=LVT_CONST_PATH_LEN) :: decspaceAttribsFile integer :: maxIter integer :: nparam integer :: nparam_total integer :: computeTS integer :: ntslocs integer :: tsspecstyle - character*100 :: tsspecfile + character(len=LVT_CONST_PATH_LEN) :: tsspecfile character*40, allocatable :: vname(:) real, allocatable :: fitness(:,:) real, allocatable :: avgfitness(:,:) @@ -77,9 +79,9 @@ module LVT_optUEMod integer :: ts_tindex integer, allocatable :: ftn_ts_loc(:) character*40 :: tslocname - character*100, allocatable :: tslocfile(:) + character(len=LVT_CONST_PATH_LEN), allocatable :: tslocfile(:) integer :: ftn_ts_fitloc - character*100 :: tsloc_fitfile + character(len=LVT_CONST_PATH_LEN) :: tsloc_fitfile end type optue_ts_struc type(optuectl) :: LVT_optuectl @@ -339,7 +341,8 @@ end subroutine LVT_optUEInit ! !INTERFACE: subroutine LVT_readoptUEdata(iterNo) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod @@ -370,7 +373,7 @@ subroutine LVT_readoptUEdata(iterNo) !EOP integer :: ftn integer :: t, iter_f - character*100 :: filen + character(len=LVT_CONST_PATH_LEN) :: filen real :: dummy(LVT_LIS_rc(1)%lnc, LVT_LIS_rc(1)%lnr) diff --git a/lvt/core/LVT_readConfig.F90 b/lvt/core/LVT_readConfig.F90 index 49a1d4465..107503df9 100644 --- a/lvt/core/LVT_readConfig.F90 +++ b/lvt/core/LVT_readConfig.F90 @@ -16,7 +16,8 @@ subroutine LVT_readConfig(configfile) ! ! !USES: - use ESMF + use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_statsDataMod @@ -52,8 +53,8 @@ subroutine LVT_readConfig(configfile) character*30 :: scInterval character*10 :: time integer :: ios,final_dirpos - character(100) :: diag_fname - character(100) :: diag_dir + character(len=LVT_CONST_PATH_LEN) :: diag_fname + character(len=LVT_CONST_PATH_LEN) :: diag_dir integer, external :: LVT_create_subdirs inquire(file=(configfile), exist=exists) diff --git a/lvt/core/LVT_readMetricsAttributes.F90 b/lvt/core/LVT_readMetricsAttributes.F90 index 0ceb5b094..a8821b7dc 100644 --- a/lvt/core/LVT_readMetricsAttributes.F90 +++ b/lvt/core/LVT_readMetricsAttributes.F90 @@ -39,9 +39,6 @@ subroutine LVT_readMetricsAttributes(attribFile) type(ESMF_Config) :: attribConfig integer :: rc - character*100 :: messages ( 20 ) - - messages(:) = '' attribConfig = ESMF_ConfigCreate(rc=rc) call ESMF_ConfigLoadFile(attribConfig,trim(attribFile),rc=rc) diff --git a/lvt/core/LVT_statsMod.F90 b/lvt/core/LVT_statsMod.F90 index 7b21e433b..fd728cc2f 100644 --- a/lvt/core/LVT_statsMod.F90 +++ b/lvt/core/LVT_statsMod.F90 @@ -74,6 +74,7 @@ subroutine LVT_statsInit ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_timeMgrMod, only : LVT_clock, LVT_calendar, LVT_seconds2time use LVT_InformationContentMod, only : LVT_initInformationContent use LVT_StratStatsMod, only : LVT_initStratStats @@ -127,7 +128,7 @@ subroutine LVT_statsInit real(ESMF_KIND_R8) :: nts integer :: i,m,k,rc real :: nc,nr - character*500 :: metricsAttribFile + character(len=LVT_CONST_PATH_LEN) :: metricsAttribFile integer :: exp_v1, exp_v2 character*50 :: anomalyTwindow type(ESMF_Time) :: startTime, stopTime @@ -490,7 +491,7 @@ subroutine initMetricFiles(metric) ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -519,9 +520,9 @@ subroutine initMetricFiles(metric) integer :: ios type(ESMF_Time) :: ftime,currTime character*4 :: fens - character*500 :: filename - character*500 :: meta_output_file - character*500 :: summ_output_file + character(len=LVT_CONST_PATH_LEN) :: filename + character(len=LVT_CONST_PATH_LEN) :: meta_output_file + character(len=LVT_CONST_PATH_LEN) :: summ_output_file integer :: yr,mo,da,hr,mn character*5000 :: c_line integer :: status @@ -910,6 +911,7 @@ subroutine LVT_computeStats(pass) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_timeMgrMod, only : LVT_calendar use LVT_DataStreamsMod @@ -950,10 +952,10 @@ subroutine LVT_computeStats(pass) type(ESMF_Time) :: currTime type(ESMF_TimeInterval) :: ts integer :: ftn - character*500 :: rstfile + character(len=LVT_CONST_PATH_LEN) :: rstfile character(len=12) :: cdate character(len=4) :: cdate1 - character*500 :: dir_string + character(len=LVT_CONST_PATH_LEN) :: dir_string integer :: status logical :: alarmCheck_total @@ -1622,7 +1624,8 @@ end subroutine LVT_writeSummaryStats2 subroutine createOutputFile(metric,pass) ! ! !USES: -! + ! + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! !INPUT PARAMETERS: ! ! !OUTPUT PARAMETERS: @@ -1641,7 +1644,7 @@ subroutine createOutputFile(metric,pass) character(len=12) :: cdate character(len=4) :: cdate1 integer :: iret - character*500 :: fname_total + character(len=LVT_CONST_PATH_LEN) :: fname_total if(pass.eq.metric%npass.and.metric%selectOpt.eq.1) then call system("mkdir -p "//trim(LVT_rc%statsodir)) @@ -1690,6 +1693,7 @@ subroutine createTSfiles(pass, metric) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_timeMgrMod, only : LVT_tick ! @@ -1708,7 +1712,7 @@ subroutine createTSfiles(pass, metric) integer :: pass type(LVT_metricEntry) :: metric - character*500 :: fname_ts + character(len=LVT_CONST_PATH_LEN) :: fname_ts character(len=12) :: cdate character(len=4) :: cdate1 integer :: status,iret diff --git a/lvt/core/LVT_timeMgrMod.F90 b/lvt/core/LVT_timeMgrMod.F90 index dc1c8dbc6..b2cca614c 100644 --- a/lvt/core/LVT_timeMgrMod.F90 +++ b/lvt/core/LVT_timeMgrMod.F90 @@ -2668,6 +2668,7 @@ end subroutine LVT_tick subroutine LVT_julhr_date( julhr, yyyy,mm,dd,hh) ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! !ARGUMENTS: @@ -2713,7 +2714,7 @@ subroutine LVT_julhr_date( julhr, yyyy,mm,dd,hh) ! \end{description} ! !EOP - character*100 :: message ( 20 ) + character(len=LVT_CONST_PATH_LEN) :: message ( 20 ) ! ------------------------------------------------------------------ ! executable code begins here... use LVT_tmjul4 to convert julhr to diff --git a/lvt/core/LVT_trainingMod.F90 b/lvt/core/LVT_trainingMod.F90 index 6b634dd71..03d687a81 100644 --- a/lvt/core/LVT_trainingMod.F90 +++ b/lvt/core/LVT_trainingMod.F90 @@ -144,7 +144,8 @@ end subroutine LVT_runTraining ! !INTERFACE: subroutine LVT_writeTrainingOutput(pass) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod @@ -175,7 +176,7 @@ subroutine LVT_writeTrainingOutput(pass) ! !ARGUMENTS: !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character(len=14) :: cdate integer :: ftn integer :: varId diff --git a/lvt/core/bak/LVT_DataStream1Mod.F90 b/lvt/core/bak/LVT_DataStream1Mod.F90 index eef3006b7..4de71713e 100644 --- a/lvt/core/bak/LVT_DataStream1Mod.F90 +++ b/lvt/core/bak/LVT_DataStream1Mod.F90 @@ -130,7 +130,8 @@ end subroutine LVT_DataStream1Init ! !INTERFACE: subroutine LVT_readDataStream1 ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_fileIOMod, only : LVT_create_output_filename use LVT_logMod, only : LVT_logunit @@ -153,7 +154,7 @@ subroutine LVT_readDataStream1 ! !EOP - character*200 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists !hardcoded for now @@ -208,6 +209,7 @@ end subroutine LVT_readDataStream1 subroutine LVT_readDAobsData ! ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_logunit use LVT_fileIOMod, only : LVT_create_daobs_filename @@ -229,7 +231,7 @@ subroutine LVT_readDAobsData ! !EOP - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists call LVT_create_daobs_filename(LVT_rc%nnest, fname) diff --git a/lvt/core/bak/LVT_DataStream2Mod.F90 b/lvt/core/bak/LVT_DataStream2Mod.F90 index 0fc690257..82160a77c 100644 --- a/lvt/core/bak/LVT_DataStream2Mod.F90 +++ b/lvt/core/bak/LVT_DataStream2Mod.F90 @@ -118,6 +118,7 @@ end subroutine LVT_readObsData subroutine LVT_writeObsData ! ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_fileIOMod, only : LVT_create_output_directory, & LVT_create_output_filename @@ -138,7 +139,7 @@ subroutine LVT_writeObsData integer :: n,i integer :: ftn - character*100 :: lisfile + character(len=LVT_CONST_PATH_LEN) :: lisfile type(LVT_metadataEntry), pointer :: obs n = 1 diff --git a/lvt/datastreams/3B42V7/TRMM3B42V7_dataMod.F90 b/lvt/datastreams/3B42V7/TRMM3B42V7_dataMod.F90 index b7096810c..f7ba3bc4c 100644 --- a/lvt/datastreams/3B42V7/TRMM3B42V7_dataMod.F90 +++ b/lvt/datastreams/3B42V7/TRMM3B42V7_dataMod.F90 @@ -17,6 +17,7 @@ module TRMM3B42V7_dataMod ! Imports use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! Defaults implicit none @@ -29,7 +30,7 @@ module TRMM3B42V7_dataMod public :: TRMM3B42V7data type, public :: trmm3b42v7datadec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real, allocatable :: rlat(:) real, allocatable :: rlon(:) integer, allocatable :: n11(:) diff --git a/lvt/datastreams/3B42V7/readTRMM3B42V7data.F90 b/lvt/datastreams/3B42V7/readTRMM3B42V7data.F90 index 89757947e..d624df9b5 100644 --- a/lvt/datastreams/3B42V7/readTRMM3B42V7data.F90 +++ b/lvt/datastreams/3B42V7/readTRMM3B42V7data.F90 @@ -17,6 +17,7 @@ subroutine readTRMM3B42V7data(source) ! Imports use ESMF use TRMM3B42V7_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -30,7 +31,7 @@ subroutine readTRMM3B42V7data(source) ! Local variables integer, parameter :: nc = 1440, nr=400 - character*200 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: nunit,ufn,iret,ierr integer :: c,r diff --git a/lvt/datastreams/AGRMET/AGRMET_dataMod.F90 b/lvt/datastreams/AGRMET/AGRMET_dataMod.F90 index 6f194afde..f1b1daa68 100644 --- a/lvt/datastreams/AGRMET/AGRMET_dataMod.F90 +++ b/lvt/datastreams/AGRMET/AGRMET_dataMod.F90 @@ -37,7 +37,8 @@ module AGRMET_dataMod ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none PRIVATE @@ -51,7 +52,7 @@ module AGRMET_dataMod PUBLIC :: AGRMETdata !EOP type, public :: agrmetdatadec - character*255 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real*8 :: changetime1,changetime2 real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/AGRMET/readAGRMETdata.F90 b/lvt/datastreams/AGRMET/readAGRMETdata.F90 index 98b157b4a..c95496b36 100644 --- a/lvt/datastreams/AGRMET/readAGRMETdata.F90 +++ b/lvt/datastreams/AGRMET/readAGRMETdata.F90 @@ -19,6 +19,7 @@ subroutine readAGRMETdata(source) ! !USES: use grib_api use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_timeMgrMod @@ -68,7 +69,7 @@ subroutine readAGRMETdata(source) !integer, parameter :: nc = 1440, nr=600 integer :: nc,nr - character*200 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: nunit,ufn,iret,ierr integer :: c,r diff --git a/lvt/datastreams/ALEXI/ALEXI_obsMod.F90 b/lvt/datastreams/ALEXI/ALEXI_obsMod.F90 index bf858a738..968f0be2a 100644 --- a/lvt/datastreams/ALEXI/ALEXI_obsMod.F90 +++ b/lvt/datastreams/ALEXI/ALEXI_obsMod.F90 @@ -17,7 +17,8 @@ module ALEXI_obsMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none PRIVATE @@ -47,7 +48,7 @@ module ALEXI_obsMod !EOP type, public :: alexidec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*50 :: extent integer :: nc,nr integer :: res diff --git a/lvt/datastreams/ALEXI/readALEXIObs.F90 b/lvt/datastreams/ALEXI/readALEXIObs.F90 index 40a207c76..005f3e56a 100644 --- a/lvt/datastreams/ALEXI/readALEXIObs.F90 +++ b/lvt/datastreams/ALEXI/readALEXIObs.F90 @@ -18,6 +18,7 @@ subroutine readALEXIObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_timeMgrMod use LVT_logMod @@ -48,7 +49,7 @@ subroutine readALEXIObs(source) real :: currTime logical :: alarmCheck logical :: file_exists - character*100 :: lh_filename, sh_filename, gh_filename + character(len=LVT_CONST_PATH_LEN) :: lh_filename, sh_filename, gh_filename integer :: c,r,ios,ftn logical*1 :: li(ALEXIobs(source)%nc*ALEXIobs(source)%nr) logical*1 :: lo(LVT_rc%lnc*LVT_rc%lnr) diff --git a/lvt/datastreams/ALEXIesi/ALEXIesi_obsMod.F90 b/lvt/datastreams/ALEXIesi/ALEXIesi_obsMod.F90 index 974d61068..330f2e881 100644 --- a/lvt/datastreams/ALEXIesi/ALEXIesi_obsMod.F90 +++ b/lvt/datastreams/ALEXIesi/ALEXIesi_obsMod.F90 @@ -17,7 +17,7 @@ module ALEXIesi_obsMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -53,7 +53,7 @@ module ALEXIesi_obsMod !EOP type, public :: alexidec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*50 :: extent integer :: nc,nr integer :: res diff --git a/lvt/datastreams/ALEXIesi/readALEXIesiObs.F90 b/lvt/datastreams/ALEXIesi/readALEXIesiObs.F90 index ec6e1e112..123326f48 100644 --- a/lvt/datastreams/ALEXIesi/readALEXIesiObs.F90 +++ b/lvt/datastreams/ALEXIesi/readALEXIesiObs.F90 @@ -18,6 +18,7 @@ subroutine readALEXIesiObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_timeMgrMod use LVT_logMod @@ -51,7 +52,7 @@ subroutine readALEXIesiObs(source) real :: currTime logical :: alarmCheck logical :: file_exists - character*100 :: esi_filename + character(len=LVT_CONST_PATH_LEN) :: esi_filename integer :: c,r,ios,ftn logical*1 :: li(ALEXIesiobs(source)%nc*ALEXIesiobs(source)%nr) logical*1 :: lo(LVT_rc%lnc*LVT_rc%lnr) diff --git a/lvt/datastreams/ANSA_SNWD/ANSASNWD_obsMod.F90 b/lvt/datastreams/ANSA_SNWD/ANSASNWD_obsMod.F90 index 4bb3553c5..ce0b55db5 100644 --- a/lvt/datastreams/ANSA_SNWD/ANSASNWD_obsMod.F90 +++ b/lvt/datastreams/ANSA_SNWD/ANSASNWD_obsMod.F90 @@ -17,6 +17,7 @@ module ANSASNWD_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! @@ -51,7 +52,7 @@ module ANSASNWD_obsMod !EOP type, public :: ansasnwdobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real :: gridDesc(6) integer :: mi integer :: nc, nr diff --git a/lvt/datastreams/ANSA_SNWD/readANSASNWDobs.F90 b/lvt/datastreams/ANSA_SNWD/readANSASNWDobs.F90 index 928e2deaf..ab2ffe771 100644 --- a/lvt/datastreams/ANSA_SNWD/readANSASNWDobs.F90 +++ b/lvt/datastreams/ANSA_SNWD/readANSASNWDobs.F90 @@ -39,6 +39,7 @@ subroutine readANSASNWDobs(source) use hdf5 #endif use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -58,7 +59,7 @@ subroutine readANSASNWDobs(source) #if (defined USE_HDF5) character*100, parameter :: snwd_field_name = "ansa_swe_depth_cyl_GB" character*100, parameter :: snwd_field_name1 = "ansa_swe_depth_cyl_NH" - character*100 :: ansa_filename + character(len=LVT_CONST_PATH_LEN) :: ansa_filename integer(hsize_t), allocatable :: dims(:) integer(hid_t) :: dataspace integer(hid_t) :: memspace diff --git a/lvt/datastreams/ANSA_SWE/ANSASWE_obsMod.F90 b/lvt/datastreams/ANSA_SWE/ANSASWE_obsMod.F90 index 95827ecfe..16344fcb8 100644 --- a/lvt/datastreams/ANSA_SWE/ANSASWE_obsMod.F90 +++ b/lvt/datastreams/ANSA_SWE/ANSASWE_obsMod.F90 @@ -37,6 +37,7 @@ module ANSASWE_obsMod ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -52,7 +53,7 @@ module ANSASWE_obsMod !EOP type, public :: ansasweobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real :: gridDesc(6) integer :: mi integer :: nc, nr diff --git a/lvt/datastreams/ANSA_SWE/readANSASWEobs.F90 b/lvt/datastreams/ANSA_SWE/readANSASWEobs.F90 index 4de7ea1cf..171bc9c05 100644 --- a/lvt/datastreams/ANSA_SWE/readANSASWEobs.F90 +++ b/lvt/datastreams/ANSA_SWE/readANSASWEobs.F90 @@ -42,6 +42,7 @@ subroutine readANSASWEobs(source) use hdf5 #endif use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -56,7 +57,7 @@ subroutine readANSASWEobs(source) !EOP #if (defined USE_HDF5) character*100, parameter :: swe_field_name = "ansa_swe_cyl_GB" - character*100 :: ansa_filename + character(len=LVT_CONST_PATH_LEN) :: ansa_filename integer(hsize_t), allocatable :: dims(:) integer(hid_t) :: dataspace integer(hid_t) :: memspace @@ -220,7 +221,9 @@ end subroutine readANSASWEobs ! ! !INTERFACE: subroutine ANSAswe_filename(name, ndir, yr, mo,da) - + + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none ! ! !USES: @@ -250,7 +253,7 @@ subroutine ANSAswe_filename(name, ndir, yr, mo,da) ! ! ! !ARGUMENTS: - character*80 :: name + character(len=LVT_CONST_PATH_LEN) :: name integer :: yr, mo, da character (len=*) :: ndir ! diff --git a/lvt/datastreams/APHRO_PRCP/APHROPRCP_obsMod.F90 b/lvt/datastreams/APHRO_PRCP/APHROPRCP_obsMod.F90 index fec87d3ac..fdc9d9308 100644 --- a/lvt/datastreams/APHRO_PRCP/APHROPRCP_obsMod.F90 +++ b/lvt/datastreams/APHRO_PRCP/APHROPRCP_obsMod.F90 @@ -17,6 +17,7 @@ module APHROPRCP_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -47,7 +48,7 @@ module APHROPRCP_obsMod PUBLIC :: APHROPRCPobs type, public :: aphroprcpobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*100 :: loc integer :: nc, nr integer :: yr diff --git a/lvt/datastreams/APHRO_PRCP/readAPHROPRCPObs.F90 b/lvt/datastreams/APHRO_PRCP/readAPHROPRCPObs.F90 index de09b015d..7dae9c75d 100644 --- a/lvt/datastreams/APHRO_PRCP/readAPHROPRCPObs.F90 +++ b/lvt/datastreams/APHRO_PRCP/readAPHROPRCPObs.F90 @@ -18,6 +18,7 @@ subroutine readAPHROPRCPobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -51,7 +52,7 @@ subroutine readAPHROPRCPobs(source) !EOP integer :: ftn - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character*4 :: fyr logical :: file_exists real, allocatable :: rainf(:,:,:) diff --git a/lvt/datastreams/ARM/ARM_obsMod.F90 b/lvt/datastreams/ARM/ARM_obsMod.F90 index 868b6eeb0..d5471c0a1 100644 --- a/lvt/datastreams/ARM/ARM_obsMod.F90 +++ b/lvt/datastreams/ARM/ARM_obsMod.F90 @@ -17,6 +17,7 @@ module ARM_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! @@ -89,7 +90,7 @@ module ARM_obsMod PUBLIC :: ARMobs !EOP type, public :: armobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: n_stns character*30 :: site_id integer :: baebbr_select @@ -158,7 +159,8 @@ module ARM_obsMod ! !INTERFACE: subroutine ARM_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -185,7 +187,7 @@ subroutine ARM_obsinit(i) !!EOP integer :: status integer :: ftn - character*100 :: stnlist_file + character(len=LVT_CONST_PATH_LEN) :: stnlist_file character*100 :: currentLine integer :: k, iloc diff --git a/lvt/datastreams/ARM/readARMObs.F90 b/lvt/datastreams/ARM/readARMObs.F90 index 93b8b5a6c..8f7e997c6 100644 --- a/lvt/datastreams/ARM/readARMObs.F90 +++ b/lvt/datastreams/ARM/readARMObs.F90 @@ -214,7 +214,8 @@ end subroutine readArmobs ! !INTERFACE: subroutine process_baebbr_flux_data(source,yr,mo,da) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_logunit use ARM_obsMod, only : armobs @@ -252,7 +253,7 @@ subroutine process_baebbr_flux_data(source,yr,mo,da) ! !EOP integer :: i - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: status if(armobs(source)%baebbr_select.eq.1) then @@ -285,7 +286,8 @@ end subroutine process_baebbr_flux_data ! !INTERFACE: subroutine process_ecor_flux_data(source,yr,mo,da) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_logunit use ARM_obsMod, only : armobs @@ -320,7 +322,7 @@ subroutine process_ecor_flux_data(source,yr,mo,da) integer :: da !EOP integer :: i - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: status if(armobs(source)%ecor_select.eq.1) then @@ -352,7 +354,8 @@ end subroutine process_ecor_flux_data ! !INTERFACE: subroutine process_swats_sm_data(source,yr,mo,da) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use ARM_obsMod, only : armobs use LVT_logMod, only : LVT_logunit @@ -389,7 +392,7 @@ subroutine process_swats_sm_data(source,yr,mo,da) ! !EOP integer :: i - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: status if(armobs(source)%swats_select.eq.1) then @@ -420,7 +423,8 @@ end subroutine process_swats_sm_data ! !INTERFACE: subroutine process_smos_data(source,yr,mo,da) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_logunit use ARM_obsMod, only : armobs @@ -455,7 +459,7 @@ subroutine process_smos_data(source,yr,mo,da) integer :: da !EOP integer :: i - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: status if(armobs(source)%smos_select.eq.1) then @@ -491,7 +495,8 @@ end subroutine process_smos_data ! !INTERFACE: subroutine process_ebbr_data(source,yr,mo,da) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_logunit use ARM_obsMod, only : armobs @@ -528,7 +533,7 @@ subroutine process_ebbr_data(source,yr,mo,da) integer :: da !EOP integer :: i - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: status if(armobs(source)%ebbr_select.eq.1) then @@ -2396,7 +2401,8 @@ end subroutine read_smos_file subroutine create_arm_swats_filename(odir, site_id, stnid, & yr, mo, da, filename, rc) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -2444,7 +2450,7 @@ subroutine create_arm_swats_filename(odir, site_id, stnid, & character*2 :: fda integer :: fsize - character*100 :: ls_comm, cmd2 + character(len=LVT_CONST_PATH_LEN) :: ls_comm, cmd2 rc = 1 !fail to find the file @@ -2485,7 +2491,8 @@ end subroutine create_arm_swats_filename subroutine create_arm_ecor_flux_filename(odir, site_id, stnid, & yr, mo, da, filename, rc) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -2534,7 +2541,7 @@ subroutine create_arm_ecor_flux_filename(odir, site_id, stnid, & character*2 :: fda integer :: fsize - character*100 :: ls_comm, cmd2 + character(len=LVT_CONST_PATH_LEN) :: ls_comm, cmd2 rc = 1 !fail to find the file @@ -2576,7 +2583,8 @@ end subroutine create_arm_ecor_flux_filename subroutine create_arm_baebbr_flux_filename(odir, site_id, stnid, & yr, mo, da, filename, rc) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -2624,7 +2632,7 @@ subroutine create_arm_baebbr_flux_filename(odir, site_id, stnid, & character*2 :: fda integer :: fsize - character*100 :: ls_comm, cmd2 + character(len=LVT_CONST_PATH_LEN) :: ls_comm, cmd2 rc = 1 !fail to find the file @@ -2666,7 +2674,8 @@ end subroutine create_arm_baebbr_flux_filename subroutine create_arm_smos_filename(odir, site_id, stnid, & yr, mo, da, filename, rc) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -2713,7 +2722,7 @@ subroutine create_arm_smos_filename(odir, site_id, stnid, & character*2 :: fda integer :: fsize - character*100 :: ls_comm, cmd2 + character(len=LVT_CONST_PATH_LEN) :: ls_comm, cmd2 rc = 1 !fail to find the file @@ -2755,7 +2764,8 @@ end subroutine create_arm_smos_filename subroutine create_arm_ebbr_filename(odir, site_id, stnid, & yr, mo, da, filename, rc) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -2801,7 +2811,7 @@ subroutine create_arm_ebbr_filename(odir, site_id, stnid, & character*2 :: fda integer :: fsize - character*100 :: ls_comm, cmd2 + character(len=LVT_CONST_PATH_LEN) :: ls_comm, cmd2 rc = 1 !fail to find the file diff --git a/lvt/datastreams/ARSsm/ARSsm_obsMod.F90 b/lvt/datastreams/ARSsm/ARSsm_obsMod.F90 index 2d1194f3d..b863b0393 100644 --- a/lvt/datastreams/ARSsm/ARSsm_obsMod.F90 +++ b/lvt/datastreams/ARSsm/ARSsm_obsMod.F90 @@ -17,7 +17,7 @@ module ARSsm_obsMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -41,7 +41,7 @@ module ARSsm_obsMod type, public :: ismnobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: yr integer :: n_stns character*50, allocatable :: stn_name(:) @@ -69,7 +69,8 @@ module ARSsm_obsMod ! !INTERFACE: subroutine ARSsm_obsInit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -96,7 +97,7 @@ subroutine ARSsm_obsInit(i) integer :: ftn integer :: status real :: col,row - character*100 :: stnlist_file + character(len=LVT_CONST_PATH_LEN) :: stnlist_file type(LVT_metadataEntry), pointer :: sm if(.not.allocated(ARSsmobs)) then diff --git a/lvt/datastreams/ARSsm/readARSsmobs.F90 b/lvt/datastreams/ARSsm/readARSsmobs.F90 index 02bd003a1..6f85cac9f 100644 --- a/lvt/datastreams/ARSsm/readARSsmobs.F90 +++ b/lvt/datastreams/ARSsm/readARSsmobs.F90 @@ -17,6 +17,7 @@ subroutine readARSsmObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_timeMgrMod, only : LVT_tick, LVT_date2time, LVT_calendar, & @@ -41,13 +42,12 @@ subroutine readARSsmObs(source) ! !EOP - character*200 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: ios integer :: yr,doy,mo,da,hr,mn,ss real :: gmt integer :: st,et logical :: file_exists - character*20 :: name1, name2 integer :: stnid character*1 :: st_f, sm_f integer :: stn_col, stn_row diff --git a/lvt/datastreams/ASO_SWE/ASOSWE_obsMod.F90 b/lvt/datastreams/ASO_SWE/ASOSWE_obsMod.F90 index 8feae093d..96ef9cc1b 100755 --- a/lvt/datastreams/ASO_SWE/ASOSWE_obsMod.F90 +++ b/lvt/datastreams/ASO_SWE/ASOSWE_obsMod.F90 @@ -17,6 +17,7 @@ module ASOSWE_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -49,7 +50,7 @@ module ASOSWE_obsMod PUBLIC :: ASOSWEobs !Object to hold ASOSWE observation attributes !EOP type, public :: asosweobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir end type asosweobsdec type(asosweobsdec), allocatable :: asosweobs(:) @@ -64,7 +65,8 @@ module ASOSWE_obsMod ! !INTERFACE: subroutine ASOSWE_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -95,8 +97,6 @@ subroutine ASOSWE_obsinit(i) integer :: syr, smo, sda, shr, smn, sss integer :: eyr, emo, eda, ehr, emn, ess integer :: ts - character*100 :: coordfile - character*100 :: mdata real :: xi1,xj1,xmesh,orient,alat1,alon1 integer :: t real :: gridDesci(50) diff --git a/lvt/datastreams/ASO_SWE/readASOSWEobs.F90 b/lvt/datastreams/ASO_SWE/readASOSWEobs.F90 index 56e280271..c0e0267e7 100755 --- a/lvt/datastreams/ASO_SWE/readASOSWEobs.F90 +++ b/lvt/datastreams/ASO_SWE/readASOSWEobs.F90 @@ -18,6 +18,7 @@ subroutine readASOSWEObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -57,7 +58,7 @@ subroutine readASOSWEObs(source) integer :: i,j,t,c,r integer :: stn_col, stn_row real :: col,row - character*100 :: asoswe_filename + character(len=LVT_CONST_PATH_LEN) :: asoswe_filename logical :: file_exists integer :: ftn, ios integer :: status diff --git a/lvt/datastreams/Ameriflux/Ameriflux_obsMod.F90 b/lvt/datastreams/Ameriflux/Ameriflux_obsMod.F90 index 544e75cf2..61a4d6c81 100644 --- a/lvt/datastreams/Ameriflux/Ameriflux_obsMod.F90 +++ b/lvt/datastreams/Ameriflux/Ameriflux_obsMod.F90 @@ -46,7 +46,8 @@ module Ameriflux_obsMod use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none PRIVATE @@ -55,7 +56,7 @@ module Ameriflux_obsMod PUBLIC :: Amerifluxobs type, public :: Amerifluxobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*50 :: version integer :: n_stns character*100, allocatable :: site_name(:) @@ -98,7 +99,8 @@ module Ameriflux_obsMod ! !INTERFACE: subroutine Ameriflux_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -127,7 +129,7 @@ subroutine Ameriflux_obsinit(i) ! ! !EOP - character*100 :: stnlist_file + character(len=LVT_CONST_PATH_LEN) :: stnlist_file integer :: ftn integer :: k,iloc integer :: arrayLen diff --git a/lvt/datastreams/Ameriflux/readAmerifluxObs.F90 b/lvt/datastreams/Ameriflux/readAmerifluxObs.F90 index 720308d4c..d79757375 100644 --- a/lvt/datastreams/Ameriflux/readAmerifluxObs.F90 +++ b/lvt/datastreams/Ameriflux/readAmerifluxObs.F90 @@ -176,6 +176,7 @@ subroutine read_ameriflux_station(source, stn_index) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_timeMgrMod @@ -238,7 +239,7 @@ subroutine read_ameriflux_station(source, stn_index) !This initializes the current line, first line, and filename variables. Character (len = 300) :: currentLine - Character (len = 200) :: filename + Character (len = LVT_CONST_PATH_LEN) :: filename character*4 :: fyr logical :: file_exists diff --git a/lvt/datastreams/CEOP/CEOP_obsMod.F90 b/lvt/datastreams/CEOP/CEOP_obsMod.F90 index 92603ac94..58d19e792 100644 --- a/lvt/datastreams/CEOP/CEOP_obsMod.F90 +++ b/lvt/datastreams/CEOP/CEOP_obsMod.F90 @@ -25,6 +25,7 @@ module CEOP_obsMod use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -40,7 +41,7 @@ module CEOP_obsMod end type ceopstn type, public :: ceopobsdec - character*50 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nstns integer :: readsfc integer :: readflx @@ -80,6 +81,7 @@ module CEOP_obsMod !EOP subroutine CEOP_obsInit(i) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_config use LVT_histDataMod use LVT_timeMgrMod @@ -90,7 +92,7 @@ subroutine CEOP_obsInit(i) integer, intent(IN) :: i ! index of the observation type integer :: rc,status - character*100 :: stnlist + character(len=LVT_CONST_PATH_LEN) :: stnlist type(ESMF_Time) :: startTime, stopTime integer :: ftn integer :: nts diff --git a/lvt/datastreams/CEOP/readCEOP.F90 b/lvt/datastreams/CEOP/readCEOP.F90 index ec9e9e64b..4219bbdd9 100644 --- a/lvt/datastreams/CEOP/readCEOP.F90 +++ b/lvt/datastreams/CEOP/readCEOP.F90 @@ -18,6 +18,7 @@ subroutine readCEOP(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_timeMgrMod @@ -85,7 +86,7 @@ subroutine readCEOP(source) real, allocatable :: time(:) integer :: t,k,st,et,c,r logical :: file_exists - character*100 :: sfcfile + character(len=LVT_CONST_PATH_LEN) :: sfcfile real :: tskin(LVT_rc%lnc,LVT_rc%lnr) integer :: ntskin(LVT_rc%lnc,LVT_rc%lnr) diff --git a/lvt/datastreams/CHIRPSv2/CHIRPSv2_dataMod.F90 b/lvt/datastreams/CHIRPSv2/CHIRPSv2_dataMod.F90 index b10990e76..fbe946dcb 100644 --- a/lvt/datastreams/CHIRPSv2/CHIRPSv2_dataMod.F90 +++ b/lvt/datastreams/CHIRPSv2/CHIRPSv2_dataMod.F90 @@ -11,6 +11,8 @@ ! NOTE: Currently only 0.05 deg daily CHIRPSv2 data are supported module CHIRPSv2_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! Defaults implicit none private @@ -22,7 +24,7 @@ module CHIRPSv2_dataMod public :: CHIRPSv2data type, public :: chirpsv2datadec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real :: datares real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/CHIRPSv2/readCHIRPSv2data.F90 b/lvt/datastreams/CHIRPSv2/readCHIRPSv2data.F90 index 660843a2b..06bc75f36 100644 --- a/lvt/datastreams/CHIRPSv2/readCHIRPSv2data.F90 +++ b/lvt/datastreams/CHIRPSv2/readCHIRPSv2data.F90 @@ -18,6 +18,7 @@ subroutine readCHIRPSv2data(source) ! Imports use ESMF use CHIRPSv2_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -35,7 +36,7 @@ subroutine readCHIRPSv2data(source) ! Local variables integer :: ftn - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists real :: prcp_in(chirpsv2data(source)%nc,chirpsv2data(source)%nr) real :: prcp_in1(chirpsv2data(source)%nc*chirpsv2data(source)%nr) diff --git a/lvt/datastreams/CMC_SNWD/CMCSNWD_obsMod.F90 b/lvt/datastreams/CMC_SNWD/CMCSNWD_obsMod.F90 index f16c731db..91191bc8e 100644 --- a/lvt/datastreams/CMC_SNWD/CMCSNWD_obsMod.F90 +++ b/lvt/datastreams/CMC_SNWD/CMCSNWD_obsMod.F90 @@ -17,6 +17,7 @@ module CMCSNWD_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! @@ -67,7 +68,7 @@ module CMCSNWD_obsMod PUBLIC :: CMCSNWDobs !Object to hold CMCSNWD observation attributes !EOP type, public :: cmcsnwdobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc integer :: nr real :: udef @@ -94,7 +95,8 @@ module CMCSNWD_obsMod ! !INTERFACE: subroutine CMCSNWD_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -122,8 +124,6 @@ subroutine CMCSNWD_obsinit(i) real*8 :: tdur integer :: syr, smo, sda, shr, smn, sss integer :: ts - character*100 :: coordfile - character*100 :: mdata real :: xi1,xj1,xmesh,orient,alat1,alon1 integer :: t real :: gridDesci(50) diff --git a/lvt/datastreams/CMC_SNWD/readCMC_SNWDObs.F90 b/lvt/datastreams/CMC_SNWD/readCMC_SNWDObs.F90 index bc4ae5a29..f853d6b6f 100644 --- a/lvt/datastreams/CMC_SNWD/readCMC_SNWDObs.F90 +++ b/lvt/datastreams/CMC_SNWD/readCMC_SNWDObs.F90 @@ -38,6 +38,7 @@ subroutine readCMC_SNWDObs(source) ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -66,7 +67,7 @@ subroutine readCMC_SNWDObs(source) integer :: i,j,t,c,r integer :: stn_col, stn_row real :: col,row - character*100 :: cmcsnwdfilename + character(len=LVT_CONST_PATH_LEN) :: cmcsnwdfilename logical :: file_exists logical :: readflag integer :: ftn, ios diff --git a/lvt/datastreams/CMORPH/CMORPH_dataMod.F90 b/lvt/datastreams/CMORPH/CMORPH_dataMod.F90 index 55b253622..37fb58875 100644 --- a/lvt/datastreams/CMORPH/CMORPH_dataMod.F90 +++ b/lvt/datastreams/CMORPH/CMORPH_dataMod.F90 @@ -17,6 +17,7 @@ module CMORPH_dataMod ! Imports use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! Defaults implicit none @@ -29,7 +30,7 @@ module CMORPH_dataMod public :: CMORPHdata type, public :: cmorphdatadec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real*8 :: changetime1 real*8 :: changetime2 real, allocatable :: rlat(:) diff --git a/lvt/datastreams/CMORPH/readCMORPHdata.F90 b/lvt/datastreams/CMORPH/readCMORPHdata.F90 index df1334862..0770ee91e 100644 --- a/lvt/datastreams/CMORPH/readCMORPHdata.F90 +++ b/lvt/datastreams/CMORPH/readCMORPHdata.F90 @@ -17,6 +17,7 @@ subroutine readCMORPHdata(source) ! Imports use ESMF use CMORPH_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -30,7 +31,7 @@ subroutine readCMORPHdata(source) ! Local variables integer, parameter :: nc = 1440, nr=480 - character*200 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: nunit,ufn,iret,ierr integer :: c,r diff --git a/lvt/datastreams/COAMPSout/COAMPSout_dataMod.F90 b/lvt/datastreams/COAMPSout/COAMPSout_dataMod.F90 index ce5253775..8def72738 100644 --- a/lvt/datastreams/COAMPSout/COAMPSout_dataMod.F90 +++ b/lvt/datastreams/COAMPSout/COAMPSout_dataMod.F90 @@ -17,6 +17,7 @@ module COAMPSout_dataMod ! Imports use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! Defaults implicit none @@ -32,7 +33,7 @@ module COAMPSout_dataMod public :: COAMPSoutdata type, public :: COAMPSoutdatadec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: COAMPSnest_id real*8 :: changetime1 real*8 :: changetime2 diff --git a/lvt/datastreams/COAMPSout/readCOAMPSoutdata.F90 b/lvt/datastreams/COAMPSout/readCOAMPSoutdata.F90 index dc800575b..526cb339d 100644 --- a/lvt/datastreams/COAMPSout/readCOAMPSoutdata.F90 +++ b/lvt/datastreams/COAMPSout/readCOAMPSoutdata.F90 @@ -19,6 +19,7 @@ subroutine readCOAMPSoutdata(source) ! Imports use ESMF use COAMPSout_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -40,7 +41,7 @@ subroutine readCOAMPSoutdata(source) !EOP ! Local variables - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname integer :: fcsthr, yr, mo, da, hr, mn, ss integer :: c,r,gindex integer :: ftn, ios diff --git a/lvt/datastreams/CPC_PRCP/CPCPRCP_obsMod.F90 b/lvt/datastreams/CPC_PRCP/CPCPRCP_obsMod.F90 index f05b58180..7ac2cb95b 100644 --- a/lvt/datastreams/CPC_PRCP/CPCPRCP_obsMod.F90 +++ b/lvt/datastreams/CPC_PRCP/CPCPRCP_obsMod.F90 @@ -17,7 +17,8 @@ module CPCPRCP_obsMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none PRIVATE ! @@ -45,7 +46,7 @@ module CPCPRCP_obsMod PUBLIC :: CPCPRCPobs type, public :: cpcprcpobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: userealtime character*30 :: domainType integer :: nc, nr diff --git a/lvt/datastreams/CPC_PRCP/readCPCPRCPObs.F90 b/lvt/datastreams/CPC_PRCP/readCPCPRCPObs.F90 index 03b2698d9..5400203ce 100644 --- a/lvt/datastreams/CPC_PRCP/readCPCPRCPObs.F90 +++ b/lvt/datastreams/CPC_PRCP/readCPCPRCPObs.F90 @@ -17,6 +17,7 @@ subroutine readCPCPRCPobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -47,7 +48,7 @@ subroutine readCPCPRCPobs(source) !EOP integer :: ftn - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists real :: prcp_in(cpcprcpobs(source)%nc*cpcprcpobs(source)%nr) real :: prcp_in1(cpcprcpobs(source)%nc*cpcprcpobs(source)%nr) diff --git a/lvt/datastreams/Daymet/Daymet_obsMod.F90 b/lvt/datastreams/Daymet/Daymet_obsMod.F90 index 0c8486ef2..295fa529c 100644 --- a/lvt/datastreams/Daymet/Daymet_obsMod.F90 +++ b/lvt/datastreams/Daymet/Daymet_obsMod.F90 @@ -17,6 +17,7 @@ module Daymet_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! @@ -62,7 +63,7 @@ module Daymet_obsMod PUBLIC :: Daymetobs !Object to hold Daymet observation attributes !EOP type, public :: daymetobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc integer :: nr real :: udef diff --git a/lvt/datastreams/Daymet/readDaymetObs.F90 b/lvt/datastreams/Daymet/readDaymetObs.F90 index c270973e2..f3d7153f0 100644 --- a/lvt/datastreams/Daymet/readDaymetObs.F90 +++ b/lvt/datastreams/Daymet/readDaymetObs.F90 @@ -39,6 +39,7 @@ subroutine readDaymetObs(source) ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -69,7 +70,7 @@ subroutine readDaymetObs(source) integer :: i,j,t,c,r integer :: stn_col, stn_row real :: col,row - character*100 :: daymetfilename + character(len=LVT_CONST_PATH_LEN) :: daymetfilename logical :: file_exists logical :: readflag integer :: ftn, sweid, ios diff --git a/lvt/datastreams/ECMWFforc/ECMWFforc_dataMod.F90 b/lvt/datastreams/ECMWFforc/ECMWFforc_dataMod.F90 index 9a33c06f1..0c4aa38c6 100755 --- a/lvt/datastreams/ECMWFforc/ECMWFforc_dataMod.F90 +++ b/lvt/datastreams/ECMWFforc/ECMWFforc_dataMod.F90 @@ -15,6 +15,8 @@ ! !INTERFACE: module ECMWFforc_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! Defaults implicit none private @@ -26,7 +28,7 @@ module ECMWFforc_dataMod public :: ECMWFforcdata type, public :: ecmwfforcdatadec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real :: datares real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/ECMWFforc/readECMWFforcdata.F90 b/lvt/datastreams/ECMWFforc/readECMWFforcdata.F90 index 41a368715..ddcec1562 100755 --- a/lvt/datastreams/ECMWFforc/readECMWFforcdata.F90 +++ b/lvt/datastreams/ECMWFforc/readECMWFforcdata.F90 @@ -20,6 +20,7 @@ subroutine readECMWFforcdata(source) ! Imports use ESMF use ECMWFforc_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -37,7 +38,7 @@ subroutine readECMWFforcdata(source) ! Local variables integer :: ftn - character*100 :: avgfile1,avgfile2, instfile + character(len=LVT_CONST_PATH_LEN) :: avgfile1,avgfile2, instfile logical :: file_exists1,file_exists2 real :: prcp_in(ecmwfforcdata(source)%nc,ecmwfforcdata(source)%nr) real :: prcp_in1(ecmwfforcdata(source)%nc*ecmwfforcdata(source)%nr) @@ -174,6 +175,7 @@ end subroutine readECMWFforcdata subroutine create_ECMWFforc_filename(dir,yr,mo,da,hr,& avgfilename1,avgfilename2,instfilename) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_timeMgrMod, only : LVT_tick ! Defaults implicit none @@ -190,7 +192,7 @@ subroutine create_ECMWFforc_filename(dir,yr,mo,da,hr,& real*8 :: itime real :: igmt integer :: iyr,imo,ida,ihr,imn,iss,ts,idoy - character(200) :: filename, file1, file2 + character(len=LVT_CONST_PATH_LEN) :: filename, file1, file2 !instantaneous files diff --git a/lvt/datastreams/ERA5/ERA5obsMod.F90 b/lvt/datastreams/ERA5/ERA5obsMod.F90 index dda3718c9..0aaadfd37 100644 --- a/lvt/datastreams/ERA5/ERA5obsMod.F90 +++ b/lvt/datastreams/ERA5/ERA5obsMod.F90 @@ -18,6 +18,7 @@ module ERA5obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -46,8 +47,8 @@ module ERA5obsMod !EOP type, public :: era5dec - character*100 :: odir - character*100 :: mapfile + character(len=LVT_CONST_PATH_LEN) :: odir + character(len=LVT_CONST_PATH_LEN) :: mapfile integer :: nc, nr,npts,ntimes real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/ERA5/readERA5obs.F90 b/lvt/datastreams/ERA5/readERA5obs.F90 index 52f487f7e..a01b1e60b 100644 --- a/lvt/datastreams/ERA5/readERA5obs.F90 +++ b/lvt/datastreams/ERA5/readERA5obs.F90 @@ -133,7 +133,8 @@ end subroutine readERA5Obs ! ! !INTERFACE: subroutine process_ERA5data(source, yr, mo, da) -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use ERA5obsMod @@ -156,7 +157,7 @@ subroutine process_ERA5data(source, yr, mo, da) integer :: da integer :: ftn, ftn_flx - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists integer :: prcpid, tairid real, allocatable :: prcp(:,:) diff --git a/lvt/datastreams/ERAinterimLand/ERAinterimLandobsMod.F90 b/lvt/datastreams/ERAinterimLand/ERAinterimLandobsMod.F90 index f84f8ff39..750ff67c2 100644 --- a/lvt/datastreams/ERAinterimLand/ERAinterimLandobsMod.F90 +++ b/lvt/datastreams/ERAinterimLand/ERAinterimLandobsMod.F90 @@ -17,6 +17,7 @@ module ERAinterimLandobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -45,7 +46,7 @@ module ERAinterimLandobsMod !EOP type, public :: erainterimlanddec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/ERAinterimLand/readERAinterimLandobs.F90 b/lvt/datastreams/ERAinterimLand/readERAinterimLandobs.F90 index 557b3e5d6..3aee9adbb 100644 --- a/lvt/datastreams/ERAinterimLand/readERAinterimLandobs.F90 +++ b/lvt/datastreams/ERAinterimLand/readERAinterimLandobs.F90 @@ -18,6 +18,7 @@ subroutine readERAinterimLandObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -55,7 +56,7 @@ subroutine readERAinterimLandObs(source) real*8 :: lis_prevtime type(ESMF_Time) :: merra2time1, merra2time2, initTime type(ESMF_TimeInterval) :: dayInterval - character(len=100) :: fcst1_filename, fcst2_filename, anlys_filename + character(len=LVT_CONST_PATH_LEN) :: fcst1_filename, fcst2_filename, anlys_filename real :: sm1(LVT_rc%lnc, LVT_rc%lnr) real :: sm2(LVT_rc%lnc, LVT_rc%lnr) @@ -302,6 +303,7 @@ subroutine process_ERAIlandANLYSdata(source, anlysfile, & sm1, sm2, sm3, sm4, st1, st2, st3, st4, sd, swe, skt) use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_timeMgrMod @@ -339,7 +341,6 @@ subroutine process_ERAIlandANLYSdata(source, anlysfile, & real :: rsn(LVT_rc%lnc, LVT_rc%lnr) integer :: ftn - character*100 :: fname logical :: file_exists integer :: timeid integer :: swvl1id,swvl2id,swvl3id,swvl4id @@ -618,7 +619,6 @@ subroutine process_ERAIland_runoff_data(source, fcstfile, & real :: baseflow(LVT_rc%lnc, LVT_rc%lnr) integer :: ftn - character*100 :: fname logical :: file_exists integer :: timeid integer :: sroid, ssroid @@ -786,7 +786,6 @@ subroutine process_ERAIland_fcst1_data(source, fcstfile, & real :: evap_out(LVT_rc%lnc, LVT_rc%lnr) integer :: ftn - character*100 :: fname logical :: file_exists integer :: timeid integer :: qleid, qhid, tpid, qsmid,ssrid, strid, evapid diff --git a/lvt/datastreams/ESACCI_sm/ESACCIsm_obsMod.F90 b/lvt/datastreams/ESACCI_sm/ESACCIsm_obsMod.F90 index 2e965e923..5fd30265b 100644 --- a/lvt/datastreams/ESACCI_sm/ESACCIsm_obsMod.F90 +++ b/lvt/datastreams/ESACCI_sm/ESACCIsm_obsMod.F90 @@ -17,6 +17,7 @@ module ESACCIsm_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -48,7 +49,7 @@ module ESACCIsm_obsMod PUBLIC :: ESACCIsmobs !EOP type, public :: esaccismobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: version real :: gridDesci(50) integer :: esaccinc, esaccinr diff --git a/lvt/datastreams/ESACCI_sm/readESACCIsmObs.F90 b/lvt/datastreams/ESACCI_sm/readESACCIsmObs.F90 index 6cd03d1ef..67ced4026 100644 --- a/lvt/datastreams/ESACCI_sm/readESACCIsmObs.F90 +++ b/lvt/datastreams/ESACCI_sm/readESACCIsmObs.F90 @@ -18,6 +18,7 @@ subroutine readESACCIsmObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -52,7 +53,7 @@ subroutine readESACCIsmObs(source) logical :: alarmCheck logical :: file_exists integer :: c,r,i,j - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname real :: smobs(LVT_rc%lnc*LVT_rc%lnr) real :: lat,lon integer :: version diff --git a/lvt/datastreams/FLUXCOM/FLUXCOM_obsMod.F90 b/lvt/datastreams/FLUXCOM/FLUXCOM_obsMod.F90 index 8ea39f761..58def172e 100755 --- a/lvt/datastreams/FLUXCOM/FLUXCOM_obsMod.F90 +++ b/lvt/datastreams/FLUXCOM/FLUXCOM_obsMod.F90 @@ -17,6 +17,7 @@ module FLUXCOM_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -47,7 +48,7 @@ module FLUXCOM_obsMod !EOP type, public :: fluxcomdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*10 :: method real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/FLUXCOM/readFLUXCOMobs.F90 b/lvt/datastreams/FLUXCOM/readFLUXCOMobs.F90 index 3c720de58..5bb41c948 100755 --- a/lvt/datastreams/FLUXCOM/readFLUXCOMobs.F90 +++ b/lvt/datastreams/FLUXCOM/readFLUXCOMobs.F90 @@ -18,6 +18,7 @@ subroutine readFLUXCOMObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_timeMgrMod, only : LVT_calendar use LVT_logMod, only : LVT_logunit, LVT_verify @@ -47,7 +48,7 @@ subroutine readFLUXCOMObs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: nid, ios integer :: gppid, rowId, colId diff --git a/lvt/datastreams/FLUXNET2015/FLUXNET2015_obsMod.F90 b/lvt/datastreams/FLUXNET2015/FLUXNET2015_obsMod.F90 index f15d0b1bb..1c38e3a15 100644 --- a/lvt/datastreams/FLUXNET2015/FLUXNET2015_obsMod.F90 +++ b/lvt/datastreams/FLUXNET2015/FLUXNET2015_obsMod.F90 @@ -41,6 +41,7 @@ module FLUXNET2015_obsMod use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -50,7 +51,7 @@ module FLUXNET2015_obsMod PUBLIC :: FLUXNET2015obs type, public :: FLUXNET2015obsdec - character*500 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: n_stns character*100, allocatable :: stn_name(:) real, allocatable :: stnlat(:) @@ -81,7 +82,8 @@ module FLUXNET2015_obsMod ! !INTERFACE: subroutine FLUXNET2015_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -110,7 +112,7 @@ subroutine FLUXNET2015_obsinit(i) ! ! !EOP - character*100 :: stnlist_file + character(len=LVT_CONST_PATH_LEN) :: stnlist_file integer :: ftn integer :: k,iloc integer :: arrayLen diff --git a/lvt/datastreams/FLUXNET2015/readFLUXNET2015Obs.F90 b/lvt/datastreams/FLUXNET2015/readFLUXNET2015Obs.F90 index 989c0d3a9..94d0b7dc3 100644 --- a/lvt/datastreams/FLUXNET2015/readFLUXNET2015Obs.F90 +++ b/lvt/datastreams/FLUXNET2015/readFLUXNET2015Obs.F90 @@ -129,6 +129,7 @@ subroutine read_fluxnet_station(source, stn_index) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_timeMgrMod @@ -263,7 +264,7 @@ subroutine read_fluxnet_station(source, stn_index) !This initializes the current line, first line, and filename variables. Character (len = 2000) :: currentLine - Character (len = 500) :: filename + Character (len=LVT_CONST_PATH_LEN) :: filename character*4 :: fyr logical :: file_exists diff --git a/lvt/datastreams/FLUXNET2015_NC/FLUXNET2015NC_obsMod.F90 b/lvt/datastreams/FLUXNET2015_NC/FLUXNET2015NC_obsMod.F90 index cef5784bb..3055b5a27 100644 --- a/lvt/datastreams/FLUXNET2015_NC/FLUXNET2015NC_obsMod.F90 +++ b/lvt/datastreams/FLUXNET2015_NC/FLUXNET2015NC_obsMod.F90 @@ -41,6 +41,7 @@ module FLUXNET2015NC_obsMod use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -50,7 +51,7 @@ module FLUXNET2015NC_obsMod PUBLIC :: FLUXNET2015NCobs type, public :: FLUXNET2015NCobsdec - character*500 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: n_stns character*100, allocatable :: stn_name(:) real, allocatable :: stnlat(:) @@ -82,7 +83,8 @@ module FLUXNET2015NC_obsMod ! !INTERFACE: subroutine FLUXNET2015NC_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -111,7 +113,7 @@ subroutine FLUXNET2015NC_obsinit(i) ! ! !EOP - character*100 :: stnlist_file + character(len=LVT_CONST_PATH_LEN) :: stnlist_file integer :: ftn integer :: k,iloc integer :: arrayLen diff --git a/lvt/datastreams/FLUXNET2015_NC/readFLUXNET2015NCObs.F90 b/lvt/datastreams/FLUXNET2015_NC/readFLUXNET2015NCObs.F90 index 43d639e42..c60ae6d67 100644 --- a/lvt/datastreams/FLUXNET2015_NC/readFLUXNET2015NCObs.F90 +++ b/lvt/datastreams/FLUXNET2015_NC/readFLUXNET2015NCObs.F90 @@ -152,6 +152,7 @@ subroutine read_fluxnet_station_nc(source, stn_index) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_timeMgrMod @@ -289,8 +290,7 @@ subroutine read_fluxnet_station_nc(source, stn_index) integer :: status !This initializes the current line, first line, and filename variables. - Character (len = 2000) :: currentLine - Character (len = 500) :: filename + Character (len = LVT_CONST_PATH_LEN) :: filename character*4 :: fyr logical :: file_exists diff --git a/lvt/datastreams/FLUXNETmte/FLUXNETmte_obsMod.F90 b/lvt/datastreams/FLUXNETmte/FLUXNETmte_obsMod.F90 index 5a7af3cce..b8da41306 100644 --- a/lvt/datastreams/FLUXNETmte/FLUXNETmte_obsMod.F90 +++ b/lvt/datastreams/FLUXNETmte/FLUXNETmte_obsMod.F90 @@ -17,6 +17,7 @@ module FLUXNETmte_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -47,7 +48,7 @@ module FLUXNETmte_obsMod !EOP type, public :: fluxnetdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real, allocatable :: rlat(:) real, allocatable :: rlon(:) integer, allocatable :: n11(:) diff --git a/lvt/datastreams/FLUXNETmte/readFLUXNETmteObs.F90 b/lvt/datastreams/FLUXNETmte/readFLUXNETmteObs.F90 index 6c52184ba..6bb91faf2 100644 --- a/lvt/datastreams/FLUXNETmte/readFLUXNETmteObs.F90 +++ b/lvt/datastreams/FLUXNETmte/readFLUXNETmteObs.F90 @@ -18,6 +18,7 @@ subroutine readFLUXNETmteObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_timeMgrMod, only : LVT_calendar use LVT_logMod, only : LVT_logunit, LVT_verify @@ -49,7 +50,7 @@ subroutine readFLUXNETmteObs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: nid, ios integer :: qleid, qhid,rowId, colId diff --git a/lvt/datastreams/FMI_SWE/FMISWE_obsMod.F90 b/lvt/datastreams/FMI_SWE/FMISWE_obsMod.F90 index dfdb8b1e3..f0e3ef9ca 100644 --- a/lvt/datastreams/FMI_SWE/FMISWE_obsMod.F90 +++ b/lvt/datastreams/FMI_SWE/FMISWE_obsMod.F90 @@ -17,6 +17,7 @@ module FMISWE_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -50,7 +51,7 @@ module FMISWE_obsMod PUBLIC :: FMISWEobs !Object to hold FMISWE observation attributes !EOP type, public :: fmisweobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real :: udef logical :: startflag integer :: yr diff --git a/lvt/datastreams/FMI_SWE/readFMISWEobs.F90 b/lvt/datastreams/FMI_SWE/readFMISWEobs.F90 index f6b8e1581..a9659f870 100644 --- a/lvt/datastreams/FMI_SWE/readFMISWEobs.F90 +++ b/lvt/datastreams/FMI_SWE/readFMISWEobs.F90 @@ -17,6 +17,7 @@ subroutine readFMISWEobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_timeMgrMod, only : LVT_tick @@ -48,7 +49,7 @@ subroutine readFMISWEobs(source) ! !EOP integer :: ftn - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname integer :: doy real :: gmt integer :: hr, mn, ss,ts diff --git a/lvt/datastreams/FluxSat_GPP/FluxSat_obsMod.F90 b/lvt/datastreams/FluxSat_GPP/FluxSat_obsMod.F90 index b6af291c2..e557f2c91 100755 --- a/lvt/datastreams/FluxSat_GPP/FluxSat_obsMod.F90 +++ b/lvt/datastreams/FluxSat_GPP/FluxSat_obsMod.F90 @@ -17,6 +17,7 @@ module FluxSat_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -47,7 +48,7 @@ module FluxSat_obsMod !EOP type, public :: fluxcomdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real, allocatable :: rlat(:) real, allocatable :: rlon(:) integer, allocatable :: n11(:) diff --git a/lvt/datastreams/FluxSat_GPP/readFluxSatobs.F90 b/lvt/datastreams/FluxSat_GPP/readFluxSatobs.F90 index ba689dbd2..a5fae791e 100755 --- a/lvt/datastreams/FluxSat_GPP/readFluxSatobs.F90 +++ b/lvt/datastreams/FluxSat_GPP/readFluxSatobs.F90 @@ -18,6 +18,7 @@ subroutine readFluxSatObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_timeMgrMod, only : LVT_calendar use LVT_logMod, only : LVT_logunit, LVT_verify @@ -47,7 +48,7 @@ subroutine readFluxSatObs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: nid, ios integer :: gppid, rowId, colId diff --git a/lvt/datastreams/GCOMW_AMSR2L3sm/GCOMW_AMSR2L3sm_obsMod.F90 b/lvt/datastreams/GCOMW_AMSR2L3sm/GCOMW_AMSR2L3sm_obsMod.F90 index f84f4ddf1..c32d970b3 100644 --- a/lvt/datastreams/GCOMW_AMSR2L3sm/GCOMW_AMSR2L3sm_obsMod.F90 +++ b/lvt/datastreams/GCOMW_AMSR2L3sm/GCOMW_AMSR2L3sm_obsMod.F90 @@ -17,6 +17,7 @@ module GCOMW_AMSR2L3sm_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -49,7 +50,7 @@ module GCOMW_AMSR2L3sm_obsMod !EOP type, public :: amsr2smobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: mo logical :: startmode integer :: amsr2nc, amsr2nr diff --git a/lvt/datastreams/GCOMW_AMSR2L3sm/readGCOMW_AMSR2L3smObs.F90 b/lvt/datastreams/GCOMW_AMSR2L3sm/readGCOMW_AMSR2L3smObs.F90 index c4088247b..6ed01fd97 100644 --- a/lvt/datastreams/GCOMW_AMSR2L3sm/readGCOMW_AMSR2L3smObs.F90 +++ b/lvt/datastreams/GCOMW_AMSR2L3sm/readGCOMW_AMSR2L3smObs.F90 @@ -18,6 +18,7 @@ subroutine readGCOMW_AMSR2L3smObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -42,7 +43,7 @@ subroutine readGCOMW_AMSR2L3smObs(source) logical :: alarmCheck logical :: file_exists integer :: c,r,i,j,status - character*100 :: fname_A, fname_D + character(len=LVT_CONST_PATH_LEN) :: fname_A, fname_D integer :: yr, mo, da, hr, mn, ss real :: smobs(LVT_rc%lnc, LVT_rc%lnr) real :: smobs_t(LVT_rc%lnc*LVT_rc%lnr) diff --git a/lvt/datastreams/GCOMW_AMSR2L3snd/GCOMW_AMSR2L3snd_obsMod.F90 b/lvt/datastreams/GCOMW_AMSR2L3snd/GCOMW_AMSR2L3snd_obsMod.F90 index 0bf43d9e1..503482a50 100644 --- a/lvt/datastreams/GCOMW_AMSR2L3snd/GCOMW_AMSR2L3snd_obsMod.F90 +++ b/lvt/datastreams/GCOMW_AMSR2L3snd/GCOMW_AMSR2L3snd_obsMod.F90 @@ -17,6 +17,7 @@ module GCOMW_AMSR2L3snd_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -49,7 +50,7 @@ module GCOMW_AMSR2L3snd_obsMod !EOP type, public :: amsr2smobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: mo logical :: startmode integer :: amsr2nc, amsr2nr diff --git a/lvt/datastreams/GCOMW_AMSR2L3snd/readGCOMW_AMSR2L3sndObs.F90 b/lvt/datastreams/GCOMW_AMSR2L3snd/readGCOMW_AMSR2L3sndObs.F90 index 12e84c79c..cd6415855 100644 --- a/lvt/datastreams/GCOMW_AMSR2L3snd/readGCOMW_AMSR2L3sndObs.F90 +++ b/lvt/datastreams/GCOMW_AMSR2L3snd/readGCOMW_AMSR2L3sndObs.F90 @@ -18,6 +18,7 @@ subroutine readGCOMW_AMSR2L3sndObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -42,7 +43,7 @@ subroutine readGCOMW_AMSR2L3sndObs(source) logical :: alarmCheck logical :: file_exists integer :: c,r,i,j,status - character*100 :: fname_A, fname_D + character(len=LVT_CONST_PATH_LEN) :: fname_A, fname_D integer :: yr, mo, da, hr, mn, ss real :: sndobs(LVT_rc%lnc, LVT_rc%lnr) real :: sndobs_t(LVT_rc%lnc*LVT_rc%lnr) diff --git a/lvt/datastreams/GDASforc/GDASforc_dataMod.F90 b/lvt/datastreams/GDASforc/GDASforc_dataMod.F90 index 678acbf66..529c605bf 100755 --- a/lvt/datastreams/GDASforc/GDASforc_dataMod.F90 +++ b/lvt/datastreams/GDASforc/GDASforc_dataMod.F90 @@ -15,6 +15,8 @@ ! !INTERFACE: module GDASforc_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! Defaults implicit none private @@ -26,7 +28,7 @@ module GDASforc_dataMod public :: GDASforcdata type, public :: gdasforcdatadec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real :: datares real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/GDASforc/readGDASforcdata.F90 b/lvt/datastreams/GDASforc/readGDASforcdata.F90 index 47aee19b3..47bf5be03 100755 --- a/lvt/datastreams/GDASforc/readGDASforcdata.F90 +++ b/lvt/datastreams/GDASforc/readGDASforcdata.F90 @@ -22,6 +22,7 @@ subroutine readGDASforcdata(source) ! Imports use ESMF use GDASforc_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -39,7 +40,7 @@ subroutine readGDASforcdata(source) ! Local variables integer :: ftn - character*100 :: name00, name03, name06 + character(len=LVT_CONST_PATH_LEN) :: name00, name03, name06 logical :: F06flag logical :: file_exists1,file_exists2,file_exists3 logical*1 :: lb(gdasforcdata(source)%ncold*gdasforcdata(source)%nrold) @@ -937,7 +938,6 @@ subroutine create_GDASforc_filename(gdasdir,yr,mo,da,hr,name00, name03, name06,& logical :: is_analysis_hr character(len=2) :: analysis_hour_inst, analysis_hour_avg, & fcstcode0, fcstcode1, fcstcode2 - character(len=80) :: fbase character(len=8) :: fdir character(len=10) :: ftime character(len=21) :: fsubs diff --git a/lvt/datastreams/GHCN/GHCN_obsMod.F90 b/lvt/datastreams/GHCN/GHCN_obsMod.F90 index 95286bae2..abf911b68 100644 --- a/lvt/datastreams/GHCN/GHCN_obsMod.F90 +++ b/lvt/datastreams/GHCN/GHCN_obsMod.F90 @@ -17,6 +17,7 @@ module GHCN_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -48,7 +49,7 @@ module GHCN_obsMod PUBLIC :: GHCNobs !Object to hold GHCN observation attributes !EOP type, public :: ghcnobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nstns real :: udef integer :: nts @@ -78,7 +79,8 @@ module GHCN_obsMod ! !INTERFACE: subroutine GHCN_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -109,7 +111,7 @@ subroutine GHCN_obsinit(i) integer :: ts character*50 :: stnid real :: stnlat, stnlon,stnelev - character*100 :: stationfile + character(len=LVT_CONST_PATH_LEN) :: stationfile integer :: c,r real :: col,row diff --git a/lvt/datastreams/GHCN/readGHCNObs.F90 b/lvt/datastreams/GHCN/readGHCNObs.F90 index ff21561b3..85ec2fee4 100644 --- a/lvt/datastreams/GHCN/readGHCNObs.F90 +++ b/lvt/datastreams/GHCN/readGHCNObs.F90 @@ -17,6 +17,7 @@ subroutine readGHCNObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -55,7 +56,7 @@ subroutine readGHCNObs(source) integer :: stn_col, stn_row real :: col, row real :: offset - character*100 :: ghcnname + character(len=LVT_CONST_PATH_LEN) :: ghcnname type(ESMF_TimeInterval) :: dayInterval type(ESMF_Time) :: startTime, initTime type(ESMF_Time) :: ghcntime1, ghcntime2 diff --git a/lvt/datastreams/GIMMS_AVHRR_NDVI/GIMMSAVHRR_NDVIobsMod.F90 b/lvt/datastreams/GIMMS_AVHRR_NDVI/GIMMSAVHRR_NDVIobsMod.F90 index 1c997acb2..772522916 100644 --- a/lvt/datastreams/GIMMS_AVHRR_NDVI/GIMMSAVHRR_NDVIobsMod.F90 +++ b/lvt/datastreams/GIMMS_AVHRR_NDVI/GIMMSAVHRR_NDVIobsMod.F90 @@ -17,7 +17,8 @@ module GIMMSAVHRR_NDVIobsMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none PRIVATE @@ -45,7 +46,7 @@ module GIMMSAVHRR_NDVIobsMod !EOP type, public :: gimmsavhrrndvidec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/GIMMS_AVHRR_NDVI/readGIMMSAVHRR_NDVIObs.F90 b/lvt/datastreams/GIMMS_AVHRR_NDVI/readGIMMSAVHRR_NDVIObs.F90 index 1afc3a595..3363a08e0 100644 --- a/lvt/datastreams/GIMMS_AVHRR_NDVI/readGIMMSAVHRR_NDVIObs.F90 +++ b/lvt/datastreams/GIMMS_AVHRR_NDVI/readGIMMSAVHRR_NDVIObs.F90 @@ -18,6 +18,7 @@ subroutine readGIMMSAVHRR_NDVIObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -44,7 +45,7 @@ subroutine readGIMMSAVHRR_NDVIObs(source) integer :: c,r, tindex integer :: flag integer :: ftn - character*100 :: fname_a, fname_b + character(len=LVT_CONST_PATH_LEN) :: fname_a, fname_b logical*1 :: output_bitmap(LVT_rc%lnc*LVT_rc%lnr) real :: ndvi_out_a(LVT_rc%lnc*LVT_rc%lnr) real :: ndvi_out_b(LVT_rc%lnc*LVT_rc%lnr) diff --git a/lvt/datastreams/GIMMS_MODIS_NDVI/GIMMSMODIS_NDVIobsMod.F90 b/lvt/datastreams/GIMMS_MODIS_NDVI/GIMMSMODIS_NDVIobsMod.F90 index 0c6159efd..552395f5f 100644 --- a/lvt/datastreams/GIMMS_MODIS_NDVI/GIMMSMODIS_NDVIobsMod.F90 +++ b/lvt/datastreams/GIMMS_MODIS_NDVI/GIMMSMODIS_NDVIobsMod.F90 @@ -17,6 +17,7 @@ module GIMMSMODIS_NDVIobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -46,7 +47,7 @@ module GIMMSMODIS_NDVIobsMod !EOP type, public :: gimmsmodisndvidec - character*200 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/GIMMS_MODIS_NDVI/readGIMMSMODIS_NDVIObs.F90 b/lvt/datastreams/GIMMS_MODIS_NDVI/readGIMMSMODIS_NDVIObs.F90 index 861f08900..1ef19360b 100644 --- a/lvt/datastreams/GIMMS_MODIS_NDVI/readGIMMSMODIS_NDVIObs.F90 +++ b/lvt/datastreams/GIMMS_MODIS_NDVI/readGIMMSMODIS_NDVIObs.F90 @@ -18,6 +18,7 @@ subroutine readGIMMSMODIS_NDVIObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -121,7 +122,7 @@ subroutine readGIMMSMODIS_NDVIObs(source) integer :: c,r, tindex integer :: flag integer :: ftn - character*200 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical*1 :: output_bitmap(LVT_rc%lnc*LVT_rc%lnr) real :: ndvi_out(LVT_rc%lnc*LVT_rc%lnr) logical*1, allocatable :: input_bitmap(:) diff --git a/lvt/datastreams/GLASSalbedo/GLASSalbedo_Mod.F90 b/lvt/datastreams/GLASSalbedo/GLASSalbedo_Mod.F90 index feccd0d47..2f83f2712 100755 --- a/lvt/datastreams/GLASSalbedo/GLASSalbedo_Mod.F90 +++ b/lvt/datastreams/GLASSalbedo/GLASSalbedo_Mod.F90 @@ -17,6 +17,7 @@ module GLASSalbedoobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -46,7 +47,7 @@ module GLASSalbedoobsMod !EOP type, public :: glassalbedodec - character*200 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*200 :: source integer :: nc, nr real :: gridDesc(50) diff --git a/lvt/datastreams/GLASSalbedo/readGLASSalbedoObs.F90 b/lvt/datastreams/GLASSalbedo/readGLASSalbedoObs.F90 index 8569fa273..e940b4160 100755 --- a/lvt/datastreams/GLASSalbedo/readGLASSalbedoObs.F90 +++ b/lvt/datastreams/GLASSalbedo/readGLASSalbedoObs.F90 @@ -18,6 +18,7 @@ subroutine readGLASSalbedoObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -45,7 +46,7 @@ subroutine readGLASSalbedoObs(source) integer :: c,r, tindex integer :: flag integer :: ftn - character*200 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname character*50 :: grid_name logical :: file_exists integer :: iret diff --git a/lvt/datastreams/GLASSlai/GLASSlai_obsMod.F90 b/lvt/datastreams/GLASSlai/GLASSlai_obsMod.F90 index d36b86034..549aeb1ee 100644 --- a/lvt/datastreams/GLASSlai/GLASSlai_obsMod.F90 +++ b/lvt/datastreams/GLASSlai/GLASSlai_obsMod.F90 @@ -17,7 +17,7 @@ module GLASSlaiobsMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -45,7 +45,7 @@ module GLASSlaiobsMod !EOP type, public :: glasslaidec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*100 :: source integer :: nc, nr real :: gridDesc(50) diff --git a/lvt/datastreams/GLASSlai/readGLASSlaiObs.F90 b/lvt/datastreams/GLASSlai/readGLASSlaiObs.F90 index fb86ded6b..b1b833caa 100644 --- a/lvt/datastreams/GLASSlai/readGLASSlaiObs.F90 +++ b/lvt/datastreams/GLASSlai/readGLASSlaiObs.F90 @@ -18,6 +18,7 @@ subroutine readGLASSlaiObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -44,7 +45,7 @@ subroutine readGLASSlaiObs(source) integer :: c,r, tindex integer :: flag integer :: ftn - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists integer :: iret integer :: nc, nr diff --git a/lvt/datastreams/GLDAS1/GLDAS1obsMod.F90 b/lvt/datastreams/GLDAS1/GLDAS1obsMod.F90 index 0e9ab163e..b07c7c7fe 100644 --- a/lvt/datastreams/GLDAS1/GLDAS1obsMod.F90 +++ b/lvt/datastreams/GLDAS1/GLDAS1obsMod.F90 @@ -17,6 +17,7 @@ module GLDAS1obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -45,7 +46,7 @@ module GLDAS1obsMod !EOP type, public :: gldas1dec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*20 :: model_name integer :: nc, nr real, allocatable :: rlat(:) diff --git a/lvt/datastreams/GLDAS1/readGLDAS1obs.F90 b/lvt/datastreams/GLDAS1/readGLDAS1obs.F90 index bb5899c50..ec16b88ad 100644 --- a/lvt/datastreams/GLDAS1/readGLDAS1obs.F90 +++ b/lvt/datastreams/GLDAS1/readGLDAS1obs.F90 @@ -18,6 +18,7 @@ subroutine readGLDAS1Obs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -48,7 +49,7 @@ subroutine readGLDAS1Obs(source) !EOP integer :: nc integer :: nr - character*120 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists logical :: qle_flag, qh_flag, qg_flag logical :: precip_flag, tskin_flag @@ -1236,7 +1237,8 @@ end subroutine interp_gldas1var subroutine create_GLDAS1_filename(odir, model_name, datares, & yr,mo,doy, hr, filename) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_logMod implicit none @@ -1274,7 +1276,7 @@ subroutine create_GLDAS1_filename(odir, model_name, datares, & character*2 :: fmo character*2 :: fhr - character*100 :: list_name + character(len=LVT_CONST_PATH_LEN) :: list_name write(unit=fyr, fmt='(i4.4)') yr write(unit=fdoy, fmt='(i3.3)') doy diff --git a/lvt/datastreams/GLDAS2/GLDAS2obsMod.F90 b/lvt/datastreams/GLDAS2/GLDAS2obsMod.F90 index 24902b149..33ba67a36 100644 --- a/lvt/datastreams/GLDAS2/GLDAS2obsMod.F90 +++ b/lvt/datastreams/GLDAS2/GLDAS2obsMod.F90 @@ -17,6 +17,7 @@ module GLDAS2obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -45,7 +46,7 @@ module GLDAS2obsMod !EOP type, public :: gldas2dec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*20 :: model_name integer :: nc, nr real, allocatable :: rlat(:) diff --git a/lvt/datastreams/GLDAS2/readGLDAS2obs.F90 b/lvt/datastreams/GLDAS2/readGLDAS2obs.F90 index 4a704aae6..191862564 100644 --- a/lvt/datastreams/GLDAS2/readGLDAS2obs.F90 +++ b/lvt/datastreams/GLDAS2/readGLDAS2obs.F90 @@ -18,6 +18,7 @@ subroutine readGLDAS2Obs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -56,7 +57,7 @@ subroutine readGLDAS2Obs(source) character(len=10) :: var_suffix integer :: flag integer :: ftn - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists integer :: qsid, qsbid, canopintid, lwdownid, swdownid integer :: rainfid, snowfid, qgid, avgsurftid, qhid, qleid diff --git a/lvt/datastreams/GLEAM/GLEAM_obsMod.F90 b/lvt/datastreams/GLEAM/GLEAM_obsMod.F90 index 52442910a..6c476e1f5 100644 --- a/lvt/datastreams/GLEAM/GLEAM_obsMod.F90 +++ b/lvt/datastreams/GLEAM/GLEAM_obsMod.F90 @@ -17,6 +17,7 @@ module GLEAM_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_logMod implicit none @@ -48,7 +49,7 @@ module GLEAM_obsMod !EOP type, public :: gleamdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*10 :: version integer :: nc,nr logical :: startFlag diff --git a/lvt/datastreams/GLEAM/readGLEAMObs.F90 b/lvt/datastreams/GLEAM/readGLEAMObs.F90 index b7c83daa1..9a367d245 100644 --- a/lvt/datastreams/GLEAM/readGLEAMObs.F90 +++ b/lvt/datastreams/GLEAM/readGLEAMObs.F90 @@ -18,6 +18,7 @@ subroutine readGLEAMObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_timeMgrMod use LVT_logMod @@ -54,7 +55,7 @@ subroutine readGLEAMObs(source) real :: currTime logical :: alarmCheck logical :: file_exists - character*100 :: lh_filename + character(len=LVT_CONST_PATH_LEN) :: lh_filename integer :: c,r,ios,ftn, lhid logical*1 :: li(GLEAMobs(source)%nc*GLEAMobs(source)%nr) logical*1 :: lo(LVT_rc%lnc*LVT_rc%lnr) diff --git a/lvt/datastreams/GLERL_HydroData/GLERL_dataMod.F90 b/lvt/datastreams/GLERL_HydroData/GLERL_dataMod.F90 index 6677a57f9..982e27ffa 100644 --- a/lvt/datastreams/GLERL_HydroData/GLERL_dataMod.F90 +++ b/lvt/datastreams/GLERL_HydroData/GLERL_dataMod.F90 @@ -17,7 +17,8 @@ module GLERL_dataMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none PRIVATE @@ -47,7 +48,7 @@ module GLERL_dataMod !EOP type, public :: glerldec - character*100 :: odir, locfile + character(len=LVT_CONST_PATH_LEN) :: odir, locfile integer :: nlocs character*50, allocatable :: lake_locname(:) real, allocatable :: lake_lat(:) diff --git a/lvt/datastreams/GLERL_HydroData/readGLERLobs.F90 b/lvt/datastreams/GLERL_HydroData/readGLERLobs.F90 index 2e835f5ab..d54614312 100644 --- a/lvt/datastreams/GLERL_HydroData/readGLERLobs.F90 +++ b/lvt/datastreams/GLERL_HydroData/readGLERLobs.F90 @@ -18,6 +18,7 @@ subroutine readGLERLObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_timeMgrMod, only : LVT_calendar use LVT_logMod @@ -46,7 +47,7 @@ subroutine readGLERLObs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: nid, ios integer :: stn_row, stn_col diff --git a/lvt/datastreams/GOES_LST/GOES_LSTobsMod.F90 b/lvt/datastreams/GOES_LST/GOES_LSTobsMod.F90 index 5268a4385..500b02249 100644 --- a/lvt/datastreams/GOES_LST/GOES_LSTobsMod.F90 +++ b/lvt/datastreams/GOES_LST/GOES_LSTobsMod.F90 @@ -17,6 +17,7 @@ module GOES_LSTobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -45,7 +46,7 @@ module GOES_LSTobsMod !EOP type, public :: goeslstdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr integer, allocatable :: n11(:) real, allocatable :: lst(:) diff --git a/lvt/datastreams/GOES_LST/readGOES_LSTObs.F90 b/lvt/datastreams/GOES_LST/readGOES_LSTObs.F90 index a84de441f..3b50caf58 100644 --- a/lvt/datastreams/GOES_LST/readGOES_LSTObs.F90 +++ b/lvt/datastreams/GOES_LST/readGOES_LSTObs.F90 @@ -18,6 +18,7 @@ subroutine readGOES_LSTObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -67,7 +68,7 @@ subroutine readGOES_LSTObs(source) ! !EOP - character*100 :: GEfile, GWfile + character(len=LVT_CONST_PATH_LEN) :: GEfile, GWfile integer :: ftn logical :: file_exists integer :: ios, iret,ivar1, ivar2, ivar3 @@ -374,7 +375,8 @@ end subroutine readGOES_LSTObs ! !INTERFACE: subroutine create_GWDISK_filename(odir,yr,mo,da, doy,hr,filename) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_logMod implicit none @@ -411,7 +413,7 @@ subroutine create_GWDISK_filename(odir,yr,mo,da, doy,hr,filename) ! !EOP - character*200 :: list_file + character(len=LVT_CONST_PATH_LEN) :: list_file character*4 :: fyr character*2 :: fmo character*3 :: fdoy @@ -448,7 +450,8 @@ end subroutine create_GWDISK_filename ! !INTERFACE: subroutine create_GEDISK_filename(odir,yr,mo,da,doy,hr,filename) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_logMod use LVT_timeMgrMod @@ -486,7 +489,7 @@ subroutine create_GEDISK_filename(odir,yr,mo,da,doy,hr,filename) ! !EOP - character*200 :: list_file + character(len=LVT_CONST_PATH_LEN) :: list_file character*4 :: fyr character*2 :: fmo character*3 :: fdoy diff --git a/lvt/datastreams/GOME2_SIF/GOME2_SIFobsMod.F90 b/lvt/datastreams/GOME2_SIF/GOME2_SIFobsMod.F90 index bf8972728..ab34b9a34 100644 --- a/lvt/datastreams/GOME2_SIF/GOME2_SIFobsMod.F90 +++ b/lvt/datastreams/GOME2_SIF/GOME2_SIFobsMod.F90 @@ -17,6 +17,7 @@ module GOME2_SIFobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -47,7 +48,7 @@ module GOME2_SIFobsMod !EOP type, public :: gome2sifdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*20 :: version integer :: nc, nr real, allocatable :: rlat(:) diff --git a/lvt/datastreams/GOME2_SIF/readGOME2_SIFObs.F90 b/lvt/datastreams/GOME2_SIF/readGOME2_SIFObs.F90 index e6bd1eb28..acd10263c 100644 --- a/lvt/datastreams/GOME2_SIF/readGOME2_SIFObs.F90 +++ b/lvt/datastreams/GOME2_SIF/readGOME2_SIFObs.F90 @@ -18,6 +18,7 @@ subroutine readGOME2_SIFObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -47,7 +48,7 @@ subroutine readGOME2_SIFObs(source) integer :: c,r, tindex integer :: flag integer :: ftn - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical*1 :: output_bitmap(LVT_rc%lnc*LVT_rc%lnr) logical*1 :: input_bitmap(& GOME2sifobs(source)%nc*GOME2sifobs(source)%nr) diff --git a/lvt/datastreams/GRACE/GRACE_obsMod.F90 b/lvt/datastreams/GRACE/GRACE_obsMod.F90 index aee5663c6..3f33c920c 100644 --- a/lvt/datastreams/GRACE/GRACE_obsMod.F90 +++ b/lvt/datastreams/GRACE/GRACE_obsMod.F90 @@ -16,8 +16,9 @@ ! !INTERFACE: module GRACE_obsMod ! -! !USES: + ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -61,8 +62,8 @@ module GRACE_obsMod real, allocatable :: scalefactor(:,:) !BZ integer :: reftime integer :: tdims - character*120 :: filename - character*150 :: gracescalefile + character(len=LVT_CONST_PATH_LEN) :: filename + character(len=LVT_CONST_PATH_LEN) :: gracescalefile character*100 :: datasource character*20 :: gridtransformopt @@ -94,7 +95,8 @@ module GRACE_obsMod ! !INTERFACE: subroutine GRACE_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_Config use LVT_histDataMod use LVT_logMod @@ -127,7 +129,6 @@ subroutine GRACE_obsinit(i) integer :: i integer :: status real :: gridDesci(50) - character*100 :: domFile character*100 :: map_proj logical :: file_exists diff --git a/lvt/datastreams/GRDC/GRDC_obsMod.F90 b/lvt/datastreams/GRDC/GRDC_obsMod.F90 index 583a09250..82df0a79d 100644 --- a/lvt/datastreams/GRDC/GRDC_obsMod.F90 +++ b/lvt/datastreams/GRDC/GRDC_obsMod.F90 @@ -17,6 +17,7 @@ module GRDC_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -54,7 +55,7 @@ module GRDC_obsMod !EOP integer :: version - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: use_daily integer :: n_stns integer :: nts @@ -80,7 +81,8 @@ module GRDC_obsMod ! !INTERFACE: subroutine GRDC_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -101,7 +103,7 @@ subroutine GRDC_obsinit(i) ! !EOP - character*100 :: stnlist_file + character(len=LVT_CONST_PATH_LEN) :: stnlist_file character*200 :: currentLine character*20 :: data_freq integer :: iloc diff --git a/lvt/datastreams/GRDC/readGRDCobs.F90 b/lvt/datastreams/GRDC/readGRDCobs.F90 index 92ef9e220..3ef5ffdd9 100644 --- a/lvt/datastreams/GRDC/readGRDCobs.F90 +++ b/lvt/datastreams/GRDC/readGRDCobs.F90 @@ -17,6 +17,7 @@ subroutine readGRDCObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_timeMgrMod, only : LVT_calendar, LVT_tick @@ -58,7 +59,7 @@ subroutine readGRDCObs(source) - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character*20 :: datestring, qstring integer :: stn_col, stn_row, c,r real :: col,row diff --git a/lvt/datastreams/GRUNrunoff/GRUNrunoff_obsMod.F90 b/lvt/datastreams/GRUNrunoff/GRUNrunoff_obsMod.F90 index 12e3387a9..e0553000e 100644 --- a/lvt/datastreams/GRUNrunoff/GRUNrunoff_obsMod.F90 +++ b/lvt/datastreams/GRUNrunoff/GRUNrunoff_obsMod.F90 @@ -18,6 +18,7 @@ module GRUNrunoff_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -50,8 +51,8 @@ module GRUNrunoff_obsMod !EOP type, public :: grundec - character*100 :: odir - character*100 :: mapfile + character(len=LVT_CONST_PATH_LEN) :: odir + character(len=LVT_CONST_PATH_LEN) :: mapfile integer :: nc, nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/GRUNrunoff/readGRUNrunoffobs.F90 b/lvt/datastreams/GRUNrunoff/readGRUNrunoffobs.F90 index 75cbb04ff..70778dc37 100644 --- a/lvt/datastreams/GRUNrunoff/readGRUNrunoffobs.F90 +++ b/lvt/datastreams/GRUNrunoff/readGRUNrunoffobs.F90 @@ -18,6 +18,7 @@ subroutine readGRUNrunoffobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -58,7 +59,7 @@ subroutine readGRUNrunoffobs(source) type(ESMF_Time) :: gruntime type(ESMF_TimeInterval) :: offset integer :: off_month - character(len=100) :: var_name,fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists real*8 :: lis_prevtime real :: runoff(LVT_rc%lnc,LVT_rc%lnr) diff --git a/lvt/datastreams/GlobSnow/GlobSnow_obsMod.F90 b/lvt/datastreams/GlobSnow/GlobSnow_obsMod.F90 index 969762d92..346b14d7c 100644 --- a/lvt/datastreams/GlobSnow/GlobSnow_obsMod.F90 +++ b/lvt/datastreams/GlobSnow/GlobSnow_obsMod.F90 @@ -17,6 +17,7 @@ module GlobSnow_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -61,7 +62,7 @@ module GlobSnow_obsMod !EOP type, public :: globsnowdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real, allocatable :: rlat(:) real, allocatable :: rlon(:) integer, allocatable :: n11(:) diff --git a/lvt/datastreams/GlobSnow/readGlobSnowObs.F90 b/lvt/datastreams/GlobSnow/readGlobSnowObs.F90 index 7dc10c50a..d85a54648 100644 --- a/lvt/datastreams/GlobSnow/readGlobSnowObs.F90 +++ b/lvt/datastreams/GlobSnow/readGlobSnowObs.F90 @@ -18,6 +18,7 @@ subroutine readGlobSnowObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_logunit, LVT_verify use LVT_histDataMod @@ -53,7 +54,7 @@ subroutine readGlobSnowObs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: nid, ios integer :: sweid, rowId, colId diff --git a/lvt/datastreams/HAR/HAR_dataMod.F90 b/lvt/datastreams/HAR/HAR_dataMod.F90 index 51967756e..3a3e6914c 100755 --- a/lvt/datastreams/HAR/HAR_dataMod.F90 +++ b/lvt/datastreams/HAR/HAR_dataMod.F90 @@ -15,8 +15,11 @@ ! ! !INTERFACE: module HAR_dataMod - implicit none - private + + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + + implicit none + private ! ! !INPUT PARAMETERS: @@ -44,7 +47,7 @@ module HAR_dataMod !EOP type, public :: hardatadec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real :: datares real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/HAR/readHARdata.F90 b/lvt/datastreams/HAR/readHARdata.F90 index 1711bfbb8..447970d29 100755 --- a/lvt/datastreams/HAR/readHARdata.F90 +++ b/lvt/datastreams/HAR/readHARdata.F90 @@ -18,6 +18,7 @@ subroutine readHARdata(source) ! !USES: use ESMF use HAR_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -45,7 +46,7 @@ subroutine readHARdata(source) ! Local variables integer :: ftn - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists real :: prcp_in(hardata(source)%nc,hardata(source)%nr) real :: prcp_in1(hardata(source)%nc*hardata(source)%nr) diff --git a/lvt/datastreams/IMD_PRCP/IMDPRCP_obsMod.F90 b/lvt/datastreams/IMD_PRCP/IMDPRCP_obsMod.F90 index d5c9ef3ce..234053ced 100644 --- a/lvt/datastreams/IMD_PRCP/IMDPRCP_obsMod.F90 +++ b/lvt/datastreams/IMD_PRCP/IMDPRCP_obsMod.F90 @@ -17,6 +17,7 @@ module IMDPRCP_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -46,7 +47,7 @@ module IMDPRCP_obsMod PUBLIC :: IMDPRCPobs type, public :: imdprcpobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr integer :: yr type(ESMF_Time) :: startTime diff --git a/lvt/datastreams/IMD_PRCP/readIMDPRCPObs.F90 b/lvt/datastreams/IMD_PRCP/readIMDPRCPObs.F90 index 203abbef2..d95e20855 100644 --- a/lvt/datastreams/IMD_PRCP/readIMDPRCPObs.F90 +++ b/lvt/datastreams/IMD_PRCP/readIMDPRCPObs.F90 @@ -18,6 +18,7 @@ subroutine readIMDPRCPobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -50,7 +51,7 @@ subroutine readIMDPRCPobs(source) !EOP integer :: ftn - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character*4 :: fyr logical :: file_exists real, allocatable :: rainf(:,:,:) diff --git a/lvt/datastreams/IMERG/IMERG_dataMod.F90 b/lvt/datastreams/IMERG/IMERG_dataMod.F90 index 4af34c156..812c6cc0c 100644 --- a/lvt/datastreams/IMERG/IMERG_dataMod.F90 +++ b/lvt/datastreams/IMERG/IMERG_dataMod.F90 @@ -11,6 +11,8 @@ ! NOTE: Currently only V05B IMERG data are supported module IMERG_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! Defaults implicit none private @@ -22,7 +24,7 @@ module IMERG_dataMod public :: IMERGdata type, public :: imergdatadec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*10 :: imergver, imergprd real :: datares real, allocatable :: rlat(:) diff --git a/lvt/datastreams/IMERG/readIMERGdata.F90 b/lvt/datastreams/IMERG/readIMERGdata.F90 index 127a9c96b..9d48904ae 100644 --- a/lvt/datastreams/IMERG/readIMERGdata.F90 +++ b/lvt/datastreams/IMERG/readIMERGdata.F90 @@ -15,6 +15,7 @@ subroutine readIMERGdata(source) ! Imports use ESMF use IMERG_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -32,7 +33,7 @@ subroutine readIMERGdata(source) ! Local variables integer :: ftn - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists real :: prcp_in(imergdata(source)%nc,imergdata(source)%nr) real :: prcp_in1(imergdata(source)%nc*imergdata(source)%nr) @@ -311,7 +312,7 @@ subroutine create_IMERG_filename(odir, & integer :: uyr, umo, uda, uhr, umn, umnadd, umnday, uss character*4 :: cyr, cmnday character*2 :: cmo, cda, chr, cmn, cmnadd - character*100 :: fbase, ftimedir, fstem, fext + character*100 :: fstem, fext uyr = yr umo = mo diff --git a/lvt/datastreams/IMERG_monthly/IMERG_monthly_dataMod.F90 b/lvt/datastreams/IMERG_monthly/IMERG_monthly_dataMod.F90 index e4d007120..975f74b9f 100644 --- a/lvt/datastreams/IMERG_monthly/IMERG_monthly_dataMod.F90 +++ b/lvt/datastreams/IMERG_monthly/IMERG_monthly_dataMod.F90 @@ -11,6 +11,8 @@ ! NOTE: Currently only V07A IMERG Final Run data are supported module IMERG_monthly_dataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! Defaults implicit none private @@ -22,7 +24,7 @@ module IMERG_monthly_dataMod public :: imergmonthlydata type, public :: imergmonthlydatadec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*10 :: imergver, imergprd real :: datares real, allocatable :: rlat(:) diff --git a/lvt/datastreams/IMERG_monthly/readIMERGmonthlydata.F90 b/lvt/datastreams/IMERG_monthly/readIMERGmonthlydata.F90 index e1d04e85f..41c969800 100644 --- a/lvt/datastreams/IMERG_monthly/readIMERGmonthlydata.F90 +++ b/lvt/datastreams/IMERG_monthly/readIMERGmonthlydata.F90 @@ -16,6 +16,7 @@ subroutine readIMERGmonthlydata(source) ! Imports use ESMF use IMERG_monthly_dataMod, only: imergmonthlydata + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only: LVT_rc, LVT_isAtAFinerResolution use LVT_histDataMod, only: LVT_logSingleDataStreamVar, & LVT_MOC_totalprecip @@ -29,7 +30,7 @@ subroutine readIMERGmonthlydata(source) integer, intent(in) :: source ! Local variables - character*255 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists real :: prcp_in(imergmonthlydata(source)%nc, & imergmonthlydata(source)%nr) @@ -294,6 +295,7 @@ subroutine create_IMERG_monthly_filename(source, yr, mo, filename) ! Imports use IMERG_monthly_dataMod, only: imergmonthlydata + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_logMod, only: LVT_logunit, LVT_endrun ! Defaults @@ -307,7 +309,7 @@ subroutine create_IMERG_monthly_filename(source, yr, mo, filename) character*4 :: cyr character*2 :: cmo character*100 :: fstem, fext - character*255 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*4 :: imVer write(cyr, '(I4.4)') yr diff --git a/lvt/datastreams/ISCCP_Tskin/ISCCP_TskinobsMod.F90 b/lvt/datastreams/ISCCP_Tskin/ISCCP_TskinobsMod.F90 index 3e7b362bb..2118fb59f 100644 --- a/lvt/datastreams/ISCCP_Tskin/ISCCP_TskinobsMod.F90 +++ b/lvt/datastreams/ISCCP_Tskin/ISCCP_TskinobsMod.F90 @@ -16,7 +16,9 @@ module ISCCP_TskinobsMod ! ! !USES: -! + ! + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! !INPUT PARAMETERS: ! ! !OUTPUT PARAMETERS: @@ -36,7 +38,7 @@ module ISCCP_TskinobsMod PUBLIC :: ISCCP_Tskin_obs type, public :: isccptskinobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: mi real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/ISCCP_Tskin/readISCCP_TskinObs.F90 b/lvt/datastreams/ISCCP_Tskin/readISCCP_TskinObs.F90 index 98ce3aef9..298e8d24f 100644 --- a/lvt/datastreams/ISCCP_Tskin/readISCCP_TskinObs.F90 +++ b/lvt/datastreams/ISCCP_Tskin/readISCCP_TskinObs.F90 @@ -14,7 +14,8 @@ ! ! !INTERFACE: subroutine readISCCP_Tskinobs(source) -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_historyMod use LVT_logMod @@ -54,7 +55,7 @@ subroutine readISCCP_Tskinobs(source) integer :: land_i_gswp2, land_j_gswp2 real :: tsclr ! real, dimension(N_gswp2_compressed) :: tmp_obs, tmp_lat, tmp_lon - character*100 :: name + character(len=LVT_CONST_PATH_LEN) :: name real, dimension(N_gswp2) :: tmp_obs integer :: c,r,j,i,istat real :: tskin(LVT_rc%lnc, LVT_rc%lnr) @@ -139,7 +140,9 @@ end subroutine readISCCP_Tskinobs subroutine ISCCP_Tskin_filename(name, ndir, yr, mo,da,hr) ! ! !USES: -! + ! + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! !INPUT PARAMETERS: ! ! !OUTPUT PARAMETERS: @@ -153,7 +156,7 @@ subroutine ISCCP_Tskin_filename(name, ndir, yr, mo,da,hr) !EOP implicit none - character*80 :: name + character(len=LVT_CONST_PATH_LEN) :: name integer :: yr, mo, da, hr character (len=*) :: ndir character (len=4) :: fyr diff --git a/lvt/datastreams/ISMN/ISMN_obsMod.F90 b/lvt/datastreams/ISMN/ISMN_obsMod.F90 index de468e1fc..6c9386013 100644 --- a/lvt/datastreams/ISMN/ISMN_obsMod.F90 +++ b/lvt/datastreams/ISMN/ISMN_obsMod.F90 @@ -17,6 +17,7 @@ module ISMN_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -42,7 +43,7 @@ module ISMN_obsMod type, public :: ismnstn integer :: vlevels real :: lat,lon - character*500, allocatable :: fname(:) + character(len=LVT_CONST_PATH_LEN), allocatable :: fname(:) real, allocatable :: sm(:,:) real, allocatable :: sfsm(:) real, allocatable :: rzsm(:) @@ -51,7 +52,7 @@ module ISMN_obsMod type, public :: ismnobsdec - character*500 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: yr integer :: n_stns integer :: nts @@ -73,7 +74,8 @@ module ISMN_obsMod ! !INTERFACE: subroutine ISMN_obsInit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_config use LVT_histDataMod use LVT_timeMgrMod @@ -97,7 +99,6 @@ subroutine ISMN_obsInit(i) integer :: k integer :: ftn integer :: status - character*500 :: stnlist_file if(.not.allocated(ISMNobs)) then allocate(ISMNobs(LVT_rc%nDataStreams)) diff --git a/lvt/datastreams/ISMN/readISMNObs.F90 b/lvt/datastreams/ISMN/readISMNObs.F90 index f1a073b20..c77fbe6c4 100644 --- a/lvt/datastreams/ISMN/readISMNObs.F90 +++ b/lvt/datastreams/ISMN/readISMNObs.F90 @@ -48,7 +48,6 @@ subroutine readISMNObs(source) integer :: ftn integer :: ios integer :: yr,mo,da,hr,mn,ss - character*500 :: name1, name2 real :: lat, lon, elev real :: depthfrom, depthto real :: sm_value @@ -285,6 +284,7 @@ end subroutine readISMNObs subroutine getNumberOfISMNfiles(odir, yr, num_files) ! ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_logMod implicit none @@ -303,8 +303,8 @@ subroutine getNumberOfISMNfiles(odir, yr, num_files) ! !REVISION HISTORY: ! !EOP - character*500 :: ls_comm - character*500 :: cmd2 + character(len=LVT_CONST_PATH_LEN) :: ls_comm + character(len=LVT_CONST_PATH_LEN) :: cmd2 character*4 :: fyr integer :: ftn @@ -325,6 +325,7 @@ end subroutine getNumberOfISMNfiles subroutine generateISMNstationInfo(source, odir, yr, num_files) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use ISMN_obsMod @@ -340,17 +341,17 @@ subroutine generateISMNstationInfo(source, odir, yr, num_files) real :: depthfrom real :: depthto - character*500, allocatable :: filenames(:) - character*500 :: filename2 - character*500 :: name1, name2, name3 - character*500 :: stnname - character*500 :: checkString + character(len=LVT_CONST_PATH_LEN), allocatable :: filenames(:) + character(len=LVT_CONST_PATH_LEN) :: filename2 + character(len=LVT_CONST_PATH_LEN) :: name1, name2, name3 + character(len=LVT_CONST_PATH_LEN) :: stnname + character(len=LVT_CONST_PATH_LEN) :: checkString integer :: iloc integer :: n_stns - character*500 :: ls_comm - character*500 :: cmd2 + character(len=LVT_CONST_PATH_LEN) :: ls_comm + character(len=LVT_CONST_PATH_LEN) :: cmd2 character*4 :: fyr integer :: k integer :: ftn diff --git a/lvt/datastreams/JULES2Ddata/JULES2D_obsMod.F90 b/lvt/datastreams/JULES2Ddata/JULES2D_obsMod.F90 index 5ddec6720..fa7098ee9 100755 --- a/lvt/datastreams/JULES2Ddata/JULES2D_obsMod.F90 +++ b/lvt/datastreams/JULES2Ddata/JULES2D_obsMod.F90 @@ -17,6 +17,7 @@ module JULES2D_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -48,7 +49,7 @@ module JULES2D_obsMod !EOP type, public :: jules2Ddec - character*500 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir type(ESMF_Time) :: refTime integer :: ntimes logical :: startMode diff --git a/lvt/datastreams/JULES2Ddata/readJULES2Dobs.F90 b/lvt/datastreams/JULES2Ddata/readJULES2Dobs.F90 index 3e04c85f3..797fab665 100755 --- a/lvt/datastreams/JULES2Ddata/readJULES2Dobs.F90 +++ b/lvt/datastreams/JULES2Ddata/readJULES2Dobs.F90 @@ -18,6 +18,7 @@ subroutine readJULES2DObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_timeMgrMod use LVT_logMod @@ -58,7 +59,7 @@ subroutine readJULES2DObs(source) ! !EOP - character*500 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: k,nid, ios,l,iret integer :: timeid, tId, xId, yId, soilId diff --git a/lvt/datastreams/JULESdata/JULES_obsMod.F90 b/lvt/datastreams/JULESdata/JULES_obsMod.F90 index c19983762..b8b006146 100644 --- a/lvt/datastreams/JULESdata/JULES_obsMod.F90 +++ b/lvt/datastreams/JULESdata/JULES_obsMod.F90 @@ -17,6 +17,7 @@ module JULES_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -47,7 +48,7 @@ module JULES_obsMod !EOP type, public :: julesdec - character*500 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir type(ESMF_Time) :: refTime integer :: ntimes logical :: startMode diff --git a/lvt/datastreams/JULESdata/readJULESobs.F90 b/lvt/datastreams/JULESdata/readJULESobs.F90 index ff6898783..4d16059db 100644 --- a/lvt/datastreams/JULESdata/readJULESobs.F90 +++ b/lvt/datastreams/JULESdata/readJULESobs.F90 @@ -18,6 +18,7 @@ subroutine readJULESObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_timeMgrMod use LVT_logMod @@ -55,7 +56,7 @@ subroutine readJULESObs(source) ! !EOP - character*500 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: k,nid, ios integer :: timeid, tId, xId, yId, soilId diff --git a/lvt/datastreams/LIS6out/LIS6outputMod.F90 b/lvt/datastreams/LIS6out/LIS6outputMod.F90 index 3df6a379c..ac58f4ce3 100644 --- a/lvt/datastreams/LIS6out/LIS6outputMod.F90 +++ b/lvt/datastreams/LIS6out/LIS6outputMod.F90 @@ -16,6 +16,8 @@ module LIS6outputMod ! ! !USES: + + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! !INPUT PARAMETERS: ! @@ -46,7 +48,7 @@ module LIS6outputMod !EOP type, public :: lis6obsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir end type lis6obsdec type(lis6obsdec), allocatable :: lis6output(:) diff --git a/lvt/datastreams/LIS6out/readLIS6output.F90 b/lvt/datastreams/LIS6out/readLIS6output.F90 index b1bd39fdd..dfebe91c1 100644 --- a/lvt/datastreams/LIS6out/readLIS6output.F90 +++ b/lvt/datastreams/LIS6out/readLIS6output.F90 @@ -19,6 +19,7 @@ subroutine readLIS6output(source) #if (defined USE_NETCDF3 || defined USE_NETCDF4) use netcdf #endif + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_logMod @@ -42,7 +43,7 @@ subroutine readLIS6output(source) ! !EOP - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists real :: sca(LVT_rc%lnc, LVT_rc%lnr) real :: snd(LVT_rc%lnc, LVT_rc%lnr) diff --git a/lvt/datastreams/LISDAdiag/LISDAdiagOutputMod.F90 b/lvt/datastreams/LISDAdiag/LISDAdiagOutputMod.F90 index d5728ac07..c95019ae9 100644 --- a/lvt/datastreams/LISDAdiag/LISDAdiagOutputMod.F90 +++ b/lvt/datastreams/LISDAdiag/LISDAdiagOutputMod.F90 @@ -16,6 +16,8 @@ module LISDAdiagOutputMod ! ! !USES: + + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! !INPUT PARAMETERS: ! @@ -46,7 +48,7 @@ module LISDAdiagOutputMod !EOP type, public :: lisdadiagobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: computeInnovDist integer :: computeGain integer :: computeSpread diff --git a/lvt/datastreams/LISDAdiag/readLISDAdiagOutput.F90 b/lvt/datastreams/LISDAdiag/readLISDAdiagOutput.F90 index 3d6eee860..6953087da 100644 --- a/lvt/datastreams/LISDAdiag/readLISDAdiagOutput.F90 +++ b/lvt/datastreams/LISDAdiag/readLISDAdiagOutput.F90 @@ -19,6 +19,7 @@ subroutine readLISDAdiagOutput(source) #if (defined USE_NETCDF3 || defined USE_NETCDF4) use netcdf #endif + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_logMod @@ -42,8 +43,7 @@ subroutine readLISDAdiagOutput(source) ! !EOP -! character*100 :: fname - character*140 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists real :: spread_var(lisdadiagoutput(source)%nstvars,& LVT_rc%lnc,LVT_rc%lnr) diff --git a/lvt/datastreams/LISDAobs/LISda_obsMod.F90 b/lvt/datastreams/LISDAobs/LISda_obsMod.F90 index fc5992227..b0a5ba19d 100644 --- a/lvt/datastreams/LISDAobs/LISda_obsMod.F90 +++ b/lvt/datastreams/LISDAobs/LISda_obsMod.F90 @@ -17,7 +17,9 @@ module LISda_obsMod ! ! !USES: -! + ! + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! !INPUT PARAMETERS: ! ! !OUTPUT PARAMETERS: @@ -48,7 +50,7 @@ module LISda_obsMod !EOP type, public :: daobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: scal integer :: obstype integer :: obsinstance @@ -105,7 +107,7 @@ subroutine LISda_obsInit(i) integer :: ncId, nrId type(ESMF_Config) :: modelSpecConfig character*20 :: domain - character*100 :: domFile + character(len=LVT_CONST_PATH_LEN) :: domFile character*100 :: map_proj character*10 :: time character*20 :: obstype diff --git a/lvt/datastreams/LISDAobs/readLISdaAsObs.F90 b/lvt/datastreams/LISDAobs/readLISdaAsObs.F90 index dd78e1e9e..d48eb2488 100644 --- a/lvt/datastreams/LISDAobs/readLISdaAsObs.F90 +++ b/lvt/datastreams/LISDAobs/readLISdaAsObs.F90 @@ -19,6 +19,7 @@ subroutine readLISdaAsObs(source) #if (defined USE_NETCDF3 || defined USE_NETCDF4) use netcdf #endif + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_logMod @@ -39,7 +40,7 @@ subroutine readLISdaAsObs(source) ! !EOP - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists real :: obsData_inp(lisdaobs(source)%nc,lisdaobs(source)%nr) real :: obsData_inp_1d(lisdaobs(source)%nc*lisdaobs(source)%nr) diff --git a/lvt/datastreams/LISout/readLISoutput.F90 b/lvt/datastreams/LISout/readLISoutput.F90 index 4a9a2b4e4..898a34a84 100644 --- a/lvt/datastreams/LISout/readLISoutput.F90 +++ b/lvt/datastreams/LISout/readLISoutput.F90 @@ -42,8 +42,8 @@ subroutine readLISoutput(source) ! !EOP - character*500 :: fname1 - character*500, allocatable :: fname(:) + character(len=LVT_CONST_PATH_LEN) :: fname1 + character(len=LVT_CONST_PATH_LEN), allocatable :: fname(:) logical :: file_exists real :: obsData(LVT_rc%lnc, LVT_rc%lnr) diff --git a/lvt/datastreams/LPRM_AMSRE_sm/LPRM_AMSREsm_obsMod.F90 b/lvt/datastreams/LPRM_AMSRE_sm/LPRM_AMSREsm_obsMod.F90 index bdaa9eb86..b23c27b3c 100644 --- a/lvt/datastreams/LPRM_AMSRE_sm/LPRM_AMSREsm_obsMod.F90 +++ b/lvt/datastreams/LPRM_AMSRE_sm/LPRM_AMSREsm_obsMod.F90 @@ -17,6 +17,7 @@ module LPRM_AMSREsm_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -49,7 +50,7 @@ module LPRM_AMSREsm_obsMod !EOP type, public :: lprmamsresmobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: rawdata character*10 :: version character*10 :: channel diff --git a/lvt/datastreams/LPRM_AMSRE_sm/readLPRM_AMSREsmObs.F90 b/lvt/datastreams/LPRM_AMSRE_sm/readLPRM_AMSREsmObs.F90 index abca44501..ca414cacf 100644 --- a/lvt/datastreams/LPRM_AMSRE_sm/readLPRM_AMSREsmObs.F90 +++ b/lvt/datastreams/LPRM_AMSRE_sm/readLPRM_AMSREsmObs.F90 @@ -18,6 +18,7 @@ subroutine readLPRM_AMSREsmObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -54,7 +55,7 @@ subroutine readLPRM_AMSREsmObs(source) logical :: alarmCheck logical :: file_exists integer :: c,r,i,j - character*100 :: fname_A, fname_D,fname + character(len=LVT_CONST_PATH_LEN) :: fname_A, fname_D,fname real :: smobs_A(LVT_rc%lnc*LVT_rc%lnr) real :: smobs_D(LVT_rc%lnc*LVT_rc%lnr) real :: smobs(LVT_rc%lnc*LVT_rc%lnr) diff --git a/lvt/datastreams/LPRMvod/LPRM_vodobsMod.F90 b/lvt/datastreams/LPRMvod/LPRM_vodobsMod.F90 index 31a4afe02..8ba85f464 100644 --- a/lvt/datastreams/LPRMvod/LPRM_vodobsMod.F90 +++ b/lvt/datastreams/LPRMvod/LPRM_vodobsMod.F90 @@ -17,6 +17,7 @@ module LPRM_vodobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -50,7 +51,7 @@ module LPRM_vodobsMod !EOP type, public :: lprmobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*20 :: data_designation integer :: nc diff --git a/lvt/datastreams/LPRMvod/readLPRMvodobs.F90 b/lvt/datastreams/LPRMvod/readLPRMvodobs.F90 index 6e69a2696..869760fa2 100644 --- a/lvt/datastreams/LPRMvod/readLPRMvodobs.F90 +++ b/lvt/datastreams/LPRMvod/readLPRMvodobs.F90 @@ -18,6 +18,7 @@ subroutine readLPRMvodobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -49,7 +50,6 @@ subroutine readLPRMvodobs(source) logical :: alarmcheck, file_exists, readflag integer :: iret - character*200 :: name real :: vod_file(LPRM_vodobs(source)%nc,LPRM_vodobs(source)%nr) real :: vod_inp(LPRM_vodobs(source)%nc*LPRM_vodobs(source)%nr) logical*1 :: vod_b_inp(LPRM_vodobs(source)%nc*LPRM_vodobs(source)%nr) @@ -61,7 +61,7 @@ subroutine readLPRMvodobs(source) integer :: fnd integer :: ftn,ios integer :: vodid,flagid,latid,lonid - character*100 :: lprm_filename + character(len=LVT_CONST_PATH_LEN) :: lprm_filename integer :: yr, mo, da, hr, mn, ss real :: gmt integer :: c,r,c1,r1 diff --git a/lvt/datastreams/LSWG_Tb/LSWG_Tb_obsMod.F90 b/lvt/datastreams/LSWG_Tb/LSWG_Tb_obsMod.F90 index a07bad8ef..6584d0c51 100755 --- a/lvt/datastreams/LSWG_Tb/LSWG_Tb_obsMod.F90 +++ b/lvt/datastreams/LSWG_Tb/LSWG_Tb_obsMod.F90 @@ -17,6 +17,7 @@ module LSWG_Tb_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -43,7 +44,7 @@ module LSWG_Tb_obsMod PUBLIC :: LSWG_Tbobs type, public :: lswgtbobsdec - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character*100 :: sname integer :: nstns integer :: nstates @@ -55,7 +56,7 @@ module LSWG_Tb_obsMod type(ESMF_Time) :: startTime, stopTime type(ESMF_TimeInterval) :: timestep logical :: start - character*100 :: maskfile + character(len=LVT_CONST_PATH_LEN) :: maskfile integer :: maskcol integer :: mask_option real :: cloud_pct @@ -77,7 +78,8 @@ module LSWG_Tb_obsMod subroutine LSWG_Tb_obsinit(i) ! ! !USES: -#if 0 +#if 0 + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_config use LVT_RTMobsDataMod, only : LVT_RTMobsData, LVT_initializeRTMObsEntry use LVT_RTMhistDataMod, only : LVT_RTMhistData @@ -109,8 +111,9 @@ subroutine LSWG_Tb_obsinit(i) integer :: eyr, emo, eda, ehr, emn, ess integer :: ts integer :: siteid - character*100 :: coordfile - character*100 :: mdata +#if 0 + character(len=LVT_CONST_PATH_LEN) :: mdata +#endif #if 0 call ESMF_ConfigGetAttribute(LVT_config, lswg_Tbobs%filename, & diff --git a/lvt/datastreams/LSWG_Tb/read_LSWG_Tb_Obs.F90 b/lvt/datastreams/LSWG_Tb/read_LSWG_Tb_Obs.F90 index 7ab8e33fe..e1041d022 100755 --- a/lvt/datastreams/LSWG_Tb/read_LSWG_Tb_Obs.F90 +++ b/lvt/datastreams/LSWG_Tb/read_LSWG_Tb_Obs.F90 @@ -17,8 +17,8 @@ subroutine read_LSWG_Tb_Obs(k) ! ! !USES: use ESMF - -#if 0 + use LVT_constantsMod, only: LVT_CONST_PATH_LEN +#if 0 use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_RTMhistDataMod, only : LVT_logRTMSingleVar use LVT_RTMhistDatamod, only : LVT_RTMhistData @@ -71,7 +71,6 @@ subroutine read_LSWG_Tb_Obs(k) !gridded Tb in RTM channel space to which to apply cloud mask real, allocatable :: Tb2(:,:,:,:) - character*100 :: maskfile character*10 :: ftime type(ESMF_Time) :: Tbtime, masktime, masktime_prev, temptime type(ESMF_TimeInterval) :: timestep, mask_timestep,doy diff --git a/lvt/datastreams/LVTbenchmarkOUT/LVTbenchmarkOUT_obsMod.F90 b/lvt/datastreams/LVTbenchmarkOUT/LVTbenchmarkOUT_obsMod.F90 index f5e2ca562..dd5a759ba 100644 --- a/lvt/datastreams/LVTbenchmarkOUT/LVTbenchmarkOUT_obsMod.F90 +++ b/lvt/datastreams/LVTbenchmarkOUT/LVTbenchmarkOUT_obsMod.F90 @@ -16,7 +16,9 @@ module LVTbenchmarkOUT_obsMod ! ! !USES: -! + ! + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! !INPUT PARAMETERS: ! ! !OUTPUT PARAMETERS: @@ -46,7 +48,7 @@ module LVTbenchmarkOUT_obsMod !EOP type, public :: daobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*50 :: vname end type daobsdec diff --git a/lvt/datastreams/LVTbenchmarkOUT/readLVTbenchmarkOUTobs.F90 b/lvt/datastreams/LVTbenchmarkOUT/readLVTbenchmarkOUTobs.F90 index b3873daa8..6f23379c4 100644 --- a/lvt/datastreams/LVTbenchmarkOUT/readLVTbenchmarkOUTobs.F90 +++ b/lvt/datastreams/LVTbenchmarkOUT/readLVTbenchmarkOUTobs.F90 @@ -19,6 +19,7 @@ subroutine readLVTbenchmarkOUTobs(source) #if (defined USE_NETCDF3 || defined USE_NETCDF4) use netcdf #endif + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_logMod @@ -39,7 +40,7 @@ subroutine readLVTbenchmarkOUTobs(source) ! !EOP - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists real :: obsData(LVT_rc%lnc, LVT_rc%lnr) diff --git a/lvt/datastreams/LVTpercentile/LVTpercentile_obsMod.F90 b/lvt/datastreams/LVTpercentile/LVTpercentile_obsMod.F90 index 5f5c49f55..c5bc48f75 100644 --- a/lvt/datastreams/LVTpercentile/LVTpercentile_obsMod.F90 +++ b/lvt/datastreams/LVTpercentile/LVTpercentile_obsMod.F90 @@ -17,7 +17,9 @@ module LVTpercentile_obsMod ! ! !USES: -! + ! + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! !INPUT PARAMETERS: ! ! !OUTPUT PARAMETERS: @@ -47,7 +49,7 @@ module LVTpercentile_obsMod !EOP type, public :: lvtpercobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc,nr character*100 :: var_name real, allocatable :: rlat(:) @@ -70,6 +72,7 @@ subroutine LVTpercentile_obsInit(i) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -102,7 +105,7 @@ subroutine LVTpercentile_obsInit(i) integer :: ncId, nrId type(ESMF_Config) :: modelSpecConfig character*20 :: domain - character*100 :: domFile + character(len=LVT_CONST_PATH_LEN) :: domFile character*100 :: map_proj character*10 :: time character*20 :: obstype diff --git a/lvt/datastreams/LVTpercentile/readLVTpercentileAsObs.F90 b/lvt/datastreams/LVTpercentile/readLVTpercentileAsObs.F90 index 42f28addb..c0d978d45 100644 --- a/lvt/datastreams/LVTpercentile/readLVTpercentileAsObs.F90 +++ b/lvt/datastreams/LVTpercentile/readLVTpercentileAsObs.F90 @@ -20,6 +20,7 @@ subroutine readLVTpercentileAsObs(source) #if (defined USE_NETCDF3 || defined USE_NETCDF4) use netcdf #endif + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_logMod @@ -40,7 +41,7 @@ subroutine readLVTpercentileAsObs(source) ! !EOP - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists real :: obsData_inp(lvtpercobs(source)%nc,lvtpercobs(source)%nr) real :: obsData_inp_1d(lvtpercobs(source)%nc*lvtpercobs(source)%nr) diff --git a/lvt/datastreams/MCD15A2H/MCD15A2H_obsMod.F90 b/lvt/datastreams/MCD15A2H/MCD15A2H_obsMod.F90 index 2ad2977ed..2bf107b3f 100755 --- a/lvt/datastreams/MCD15A2H/MCD15A2H_obsMod.F90 +++ b/lvt/datastreams/MCD15A2H/MCD15A2H_obsMod.F90 @@ -17,6 +17,7 @@ module MCD15A2H_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -49,7 +50,7 @@ module MCD15A2H_obsMod PUBLIC :: Mcd15a2hobs !EOP type, public :: mcd15a2hobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/MCD15A2H/readMCD15A2Hobs.F90 b/lvt/datastreams/MCD15A2H/readMCD15A2Hobs.F90 index ebf8eba9a..9b7e45efe 100755 --- a/lvt/datastreams/MCD15A2H/readMCD15A2Hobs.F90 +++ b/lvt/datastreams/MCD15A2H/readMCD15A2Hobs.F90 @@ -16,7 +16,8 @@ ! !INTERFACE: subroutine readMCD15A2Hobs(source) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod use LVT_histDataMod @@ -48,7 +49,7 @@ subroutine readMCD15A2Hobs(source) integer, parameter :: nc = 36000, nr=15000 integer :: lat_off, lon_off - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename real*8 :: cornerlat(2), cornerlon(2) logical :: file_exists logical*1, allocatable :: lb(:) diff --git a/lvt/datastreams/MERRA-Land/MERRAlandObsMod.F90 b/lvt/datastreams/MERRA-Land/MERRAlandObsMod.F90 index 6a3f1c3ca..bed89c111 100644 --- a/lvt/datastreams/MERRA-Land/MERRAlandObsMod.F90 +++ b/lvt/datastreams/MERRA-Land/MERRAlandObsMod.F90 @@ -17,6 +17,7 @@ module MERRAlandobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -45,7 +46,7 @@ module MERRAlandobsMod !EOP type, public :: merralanddec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/MERRA-Land/readMERRAlandObs.F90 b/lvt/datastreams/MERRA-Land/readMERRAlandObs.F90 index e6f794e42..b25d6b6df 100644 --- a/lvt/datastreams/MERRA-Land/readMERRAlandObs.F90 +++ b/lvt/datastreams/MERRA-Land/readMERRAlandObs.F90 @@ -200,6 +200,7 @@ end subroutine readMERRAlandObs subroutine process_MERRAlanddata(source, yr, mo, da) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use MERRAlandobsMod @@ -217,7 +218,7 @@ subroutine process_MERRAlanddata(source, yr, mo, da) integer :: da integer :: ftn - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists integer :: qsid,qsbid, swnetid, qleid, qhid, frsnoid, snodid integer :: sweid, qgid, sfsmid, rzsmid, prcpid, tskinid diff --git a/lvt/datastreams/MERRA2/MERRA2obsMod.F90 b/lvt/datastreams/MERRA2/MERRA2obsMod.F90 index a335a0fb5..decae7fef 100644 --- a/lvt/datastreams/MERRA2/MERRA2obsMod.F90 +++ b/lvt/datastreams/MERRA2/MERRA2obsMod.F90 @@ -18,6 +18,7 @@ module MERRA2obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -46,7 +47,7 @@ module MERRA2obsMod !EOP type, public :: merra2dec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) @@ -74,7 +75,7 @@ module MERRA2obsMod integer :: usecorr !Yeosang Yoon integer :: usescalef - character*100 :: scaleffile + character(len=LVT_CONST_PATH_LEN) :: scaleffile real, allocatable :: refxrange(:,:,:,:) real, allocatable :: refcdf(:,:,:,:) real, allocatable :: merraxrange(:,:,:,:) diff --git a/lvt/datastreams/MERRA2/readMERRA2obs.F90 b/lvt/datastreams/MERRA2/readMERRA2obs.F90 index 1cad8ce73..9092234e4 100644 --- a/lvt/datastreams/MERRA2/readMERRA2obs.F90 +++ b/lvt/datastreams/MERRA2/readMERRA2obs.F90 @@ -241,6 +241,7 @@ end subroutine readMERRA2Obs subroutine process_MERRA2data(source, yr, mo, da) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use MERRA2obsMod @@ -258,7 +259,7 @@ subroutine process_MERRA2data(source, yr, mo, da) integer :: da integer :: ftn, ftn_flx - character*100 :: fname, flxname + character(len=LVT_CONST_PATH_LEN) :: fname, flxname logical :: file_exists integer :: qsid,qsbid, swnetid, qleid, qhid, frsnoid, snodid integer :: sweid, qgid, sfsmid, rzsmid, prcpid, tairid, tskinid diff --git a/lvt/datastreams/MERRA2asm/MERRA2asmobsMod.F90 b/lvt/datastreams/MERRA2asm/MERRA2asmobsMod.F90 index 26c67618f..c570c9aa2 100644 --- a/lvt/datastreams/MERRA2asm/MERRA2asmobsMod.F90 +++ b/lvt/datastreams/MERRA2asm/MERRA2asmobsMod.F90 @@ -17,6 +17,7 @@ module MERRA2asmobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -45,7 +46,7 @@ module MERRA2asmobsMod !EOP type, public :: merra2asmdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/MERRA2asm/readMERRA2asmobs.F90 b/lvt/datastreams/MERRA2asm/readMERRA2asmobs.F90 index 54b2eec95..8c5f4cda3 100644 --- a/lvt/datastreams/MERRA2asm/readMERRA2asmobs.F90 +++ b/lvt/datastreams/MERRA2asm/readMERRA2asmobs.F90 @@ -154,6 +154,7 @@ end subroutine readMERRA2asmObs subroutine process_MERRA2asmdata(source, yr, mo, da) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use MERRA2asmobsMod @@ -171,7 +172,7 @@ subroutine process_MERRA2asmdata(source, yr, mo, da) integer :: da integer :: ftn - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists integer :: t2mid,qv2mid,u10mid,v10mid real :: t2m(merra2asmobs(source)%nc, merra2asmobs(source)%nr,24) diff --git a/lvt/datastreams/MOD10A1/MOD10A1_obsMod.F90 b/lvt/datastreams/MOD10A1/MOD10A1_obsMod.F90 index e67eef6f5..05ed851f1 100644 --- a/lvt/datastreams/MOD10A1/MOD10A1_obsMod.F90 +++ b/lvt/datastreams/MOD10A1/MOD10A1_obsMod.F90 @@ -17,6 +17,7 @@ module MOD10A1_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -50,7 +51,7 @@ module MOD10A1_obsMod PUBLIC :: Mod10a1obs !EOP type, public :: mod10a1obsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: modis_nc, modis_nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/MOD10A1/readMOD10A1obs.F90 b/lvt/datastreams/MOD10A1/readMOD10A1obs.F90 index f345439c7..d59860957 100644 --- a/lvt/datastreams/MOD10A1/readMOD10A1obs.F90 +++ b/lvt/datastreams/MOD10A1/readMOD10A1obs.F90 @@ -16,7 +16,8 @@ ! !INTERFACE: subroutine readMOD10A1obs(source) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_logMod use LVT_timeMgrMod, only : LVT_tick @@ -52,7 +53,7 @@ subroutine readMOD10A1obs(source) !EOP integer, parameter :: nc = 36000, nr=15000 - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists logical*1, allocatable :: lb(:) real, allocatable :: snfrac1(:,:) diff --git a/lvt/datastreams/MOD10A1V6/MOD10A1V6_obsMod.F90 b/lvt/datastreams/MOD10A1V6/MOD10A1V6_obsMod.F90 index 1144b82f5..d57b961fd 100644 --- a/lvt/datastreams/MOD10A1V6/MOD10A1V6_obsMod.F90 +++ b/lvt/datastreams/MOD10A1V6/MOD10A1V6_obsMod.F90 @@ -17,6 +17,7 @@ module MOD10A1V6_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -50,7 +51,7 @@ module MOD10A1V6_obsMod PUBLIC :: Mod10a1v6obs !EOP type, public :: mod10a1v6obsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: modis_nc, modis_nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/MOD10A1V6/readMOD10A1V6obs.F90 b/lvt/datastreams/MOD10A1V6/readMOD10A1V6obs.F90 index 3cf69059f..7f65efd92 100644 --- a/lvt/datastreams/MOD10A1V6/readMOD10A1V6obs.F90 +++ b/lvt/datastreams/MOD10A1V6/readMOD10A1V6obs.F90 @@ -16,7 +16,8 @@ ! !INTERFACE: subroutine readMOD10A1V6obs(source) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_logMod use LVT_timeMgrMod, only : LVT_tick @@ -52,7 +53,7 @@ subroutine readMOD10A1V6obs(source) !EOP integer, parameter :: nc = 36000, nr=15000 - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists logical*1, allocatable :: lb(:) real, allocatable :: snfrac1(:,:) diff --git a/lvt/datastreams/MOD16A2/MOD16A2_obsMod.F90 b/lvt/datastreams/MOD16A2/MOD16A2_obsMod.F90 index 0d0bb726d..3f2f590e1 100644 --- a/lvt/datastreams/MOD16A2/MOD16A2_obsMod.F90 +++ b/lvt/datastreams/MOD16A2/MOD16A2_obsMod.F90 @@ -17,6 +17,7 @@ module MOD16A2_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -45,7 +46,7 @@ module MOD16A2_obsMod !EOP type, public :: mod16a2dec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr integer, allocatable :: n11(:) real, allocatable :: qle(:) diff --git a/lvt/datastreams/MOD16A2/readMOD16A2Obs.F90 b/lvt/datastreams/MOD16A2/readMOD16A2Obs.F90 index 8bf51db08..c2bef8b81 100644 --- a/lvt/datastreams/MOD16A2/readMOD16A2Obs.F90 +++ b/lvt/datastreams/MOD16A2/readMOD16A2Obs.F90 @@ -18,6 +18,7 @@ subroutine readMOD16A2Obs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_logunit, LVT_verify, & LVT_getNextUnitNumber, LVT_releaseUnitNumber @@ -45,7 +46,7 @@ subroutine readMOD16A2Obs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: ftn logical :: file_exists integer :: nid, ios diff --git a/lvt/datastreams/MODIS_LST/MODIS_LSTobsMod.F90 b/lvt/datastreams/MODIS_LST/MODIS_LSTobsMod.F90 index 46c0e1547..c670403a1 100644 --- a/lvt/datastreams/MODIS_LST/MODIS_LSTobsMod.F90 +++ b/lvt/datastreams/MODIS_LST/MODIS_LSTobsMod.F90 @@ -17,6 +17,7 @@ module MODIS_LSTobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -45,7 +46,7 @@ module MODIS_LSTobsMod !EOP type, public :: modislstdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr integer, allocatable :: n11(:) real, allocatable :: lst(:) diff --git a/lvt/datastreams/MODIS_LST/readMODIS_LSTObs.F90 b/lvt/datastreams/MODIS_LST/readMODIS_LSTObs.F90 index c00ddac2f..00128e0f3 100644 --- a/lvt/datastreams/MODIS_LST/readMODIS_LSTObs.F90 +++ b/lvt/datastreams/MODIS_LST/readMODIS_LSTObs.F90 @@ -19,6 +19,7 @@ subroutine readMODIS_LSTObs(source) ! !USES: use ESMF use LVT_coreMod, only : LVT_rc + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_logMod, only : LVT_logunit, LVT_verify, & LVT_getNextUnitNumber, LVT_releaseUnitNumber use LVT_histDataMod @@ -67,7 +68,7 @@ subroutine readMODIS_LSTObs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: ftn logical :: file_exists integer :: nid, ios, ier, ivar1, ivar2, ivar3 diff --git a/lvt/datastreams/MODISsportLAI/MODISsportLAIobsMod.F90 b/lvt/datastreams/MODISsportLAI/MODISsportLAIobsMod.F90 index 7a51e6df6..7c9714a91 100755 --- a/lvt/datastreams/MODISsportLAI/MODISsportLAIobsMod.F90 +++ b/lvt/datastreams/MODISsportLAI/MODISsportLAIobsMod.F90 @@ -17,6 +17,7 @@ module MODISsportLAIobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -45,7 +46,7 @@ module MODISsportLAIobsMod !EOP type, public :: MODISsportLAIdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr real :: gridDesc(50) logical :: startFlag diff --git a/lvt/datastreams/MODISsportLAI/readMODISsportLAIObs.F90 b/lvt/datastreams/MODISsportLAI/readMODISsportLAIObs.F90 index f49addb17..b3fecff43 100755 --- a/lvt/datastreams/MODISsportLAI/readMODISsportLAIObs.F90 +++ b/lvt/datastreams/MODISsportLAI/readMODISsportLAIObs.F90 @@ -18,6 +18,7 @@ subroutine readMODISsportLAIObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -44,7 +45,7 @@ subroutine readMODISsportLAIObs(source) integer :: c,r, tindex integer :: flag integer :: ftn - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname logical :: file_exists integer :: iret integer :: nc, nr diff --git a/lvt/datastreams/MODSCAG/MODSCAG_obsMod.F90 b/lvt/datastreams/MODSCAG/MODSCAG_obsMod.F90 index 7331ad449..47f93ea0e 100755 --- a/lvt/datastreams/MODSCAG/MODSCAG_obsMod.F90 +++ b/lvt/datastreams/MODSCAG/MODSCAG_obsMod.F90 @@ -17,6 +17,7 @@ module MODSCAG_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -50,7 +51,7 @@ module MODSCAG_obsMod PUBLIC :: Modscagobs !EOP type, public :: modscagobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: modis_nc, modis_nr real, allocatable :: rlat(:) real, allocatable :: rlon(:) diff --git a/lvt/datastreams/MODSCAG/readMODSCAGobs.F90 b/lvt/datastreams/MODSCAG/readMODSCAGobs.F90 index 11882d35c..1792fb9ea 100755 --- a/lvt/datastreams/MODSCAG/readMODSCAGobs.F90 +++ b/lvt/datastreams/MODSCAG/readMODSCAGobs.F90 @@ -16,7 +16,8 @@ ! !INTERFACE: subroutine readMODSCAGobs(source) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_logMod use LVT_timeMgrMod, only : LVT_tick @@ -52,7 +53,7 @@ subroutine readMODSCAGobs(source) !EOP integer, parameter :: nc = 36000, nr=18000 - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists logical*1, allocatable :: lb(:) real, allocatable :: snfrac1(:,:) diff --git a/lvt/datastreams/NASA_AMSRE_sm/NASA_AMSREsm_obsMod.F90 b/lvt/datastreams/NASA_AMSRE_sm/NASA_AMSREsm_obsMod.F90 index 6299b7953..4767b7711 100644 --- a/lvt/datastreams/NASA_AMSRE_sm/NASA_AMSREsm_obsMod.F90 +++ b/lvt/datastreams/NASA_AMSRE_sm/NASA_AMSREsm_obsMod.F90 @@ -17,6 +17,7 @@ module NASA_AMSREsm_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -48,7 +49,7 @@ module NASA_AMSREsm_obsMod !EOP type, public :: nasaamsresmobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: mo integer,allocatable :: n112(:) diff --git a/lvt/datastreams/NASA_AMSRE_sm/readNASA_AMSREsmObs.F90 b/lvt/datastreams/NASA_AMSRE_sm/readNASA_AMSREsmObs.F90 index f7681b55b..07d345ed9 100644 --- a/lvt/datastreams/NASA_AMSRE_sm/readNASA_AMSREsmObs.F90 +++ b/lvt/datastreams/NASA_AMSRE_sm/readNASA_AMSREsmObs.F90 @@ -18,6 +18,7 @@ subroutine readNASA_AMSREsmObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_logMod, only : LVT_logunit @@ -44,7 +45,7 @@ subroutine readNASA_AMSREsmObs(source) logical :: alarmcheck, file_exists, readflag integer :: iret - character*200 :: name + character(len=LVT_CONST_PATH_LEN) :: name real :: smc(LVT_rc%lnc, LVT_rc%lnr) integer :: fnd real :: timenow @@ -422,7 +423,8 @@ end subroutine maskObs_basedonTime ! !INTERFACE: subroutine NASA_AMSREsm_filename(source, name, ndir, yr, mo,da) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod,only : LVT_rc use LVT_logMod, only : LVT_logunit @@ -430,7 +432,7 @@ subroutine NASA_AMSREsm_filename(source, name, ndir, yr, mo,da) ! ! !ARGUMENTS: integer :: source - character*200 :: name + character(len=LVT_CONST_PATH_LEN) :: name integer :: yr, mo, da, hr,mn character (len=*) :: ndir ! diff --git a/lvt/datastreams/NASMD/NASMD_obsMod.F90 b/lvt/datastreams/NASMD/NASMD_obsMod.F90 index 3c5610d0f..1e5b42c6a 100644 --- a/lvt/datastreams/NASMD/NASMD_obsMod.F90 +++ b/lvt/datastreams/NASMD/NASMD_obsMod.F90 @@ -17,6 +17,7 @@ module NASMD_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -69,7 +70,7 @@ module NASMD_obsMod PUBLIC :: NASMDobs !EOP type, public :: nasmdobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nstns character*10, allocatable :: stnid(:) real, allocatable :: stnlat(:) @@ -118,7 +119,8 @@ module NASMD_obsMod ! ! !INTERFACE: subroutine NASMD_obsinit(i) -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -140,7 +142,7 @@ subroutine NASMD_obsinit(i) integer :: eyr, emo, eda, ehr, emn, ess integer :: ts character*2 :: cdum - character*100 :: coordfile + character(len=LVT_CONST_PATH_LEN) :: coordfile if(.not.allocated(nasmdobs)) then allocate(nasmdobs(LVT_rc%nDataStreams)) diff --git a/lvt/datastreams/NASMD/readNASMDObs.F90 b/lvt/datastreams/NASMD/readNASMDObs.F90 index 0f5bf09a0..b770f3557 100644 --- a/lvt/datastreams/NASMD/readNASMDObs.F90 +++ b/lvt/datastreams/NASMD/readNASMDObs.F90 @@ -17,6 +17,7 @@ subroutine readNASMDObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_timeMgrMod, only : LVT_calendar, LVT_tick @@ -57,7 +58,7 @@ subroutine readNASMDObs(source) character*10 :: id integer :: i,t,k,kk,st,et,ios logical :: readflag,file_exists - character*100 :: nasmdfilename + character(len=LVT_CONST_PATH_LEN) :: nasmdfilename real :: sf_wtsum, rz_wtsum integer :: yr,mo,da,hr,mn,ss,doy real :: gmt diff --git a/lvt/datastreams/NLDAS2/NLDAS2_dataMod.F90 b/lvt/datastreams/NLDAS2/NLDAS2_dataMod.F90 index 2474ba850..c6a88636c 100644 --- a/lvt/datastreams/NLDAS2/NLDAS2_dataMod.F90 +++ b/lvt/datastreams/NLDAS2/NLDAS2_dataMod.F90 @@ -34,7 +34,8 @@ module NLDAS2_dataMod ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none PRIVATE @@ -48,7 +49,7 @@ module NLDAS2_dataMod PUBLIC :: NLDAS2data !EOP type, public :: nldas2datadec - character*120 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*120 :: interval real, allocatable :: rlat(:) real, allocatable :: rlon(:) @@ -82,7 +83,8 @@ module NLDAS2_dataMod ! !INTERFACE: subroutine NLDAS2_datainit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -113,7 +115,7 @@ subroutine NLDAS2_datainit(i) integer :: updoy, yr1,mo1,da1,hr1,mn1,ss1 real :: upgmt integer :: ftn - character*50 :: vic_d1file,vic_d2file,vic_d3file + character(len=LVT_CONST_PATH_LEN) :: vic_d1file,vic_d2file,vic_d3file if(.not.allocated(nldas2data)) then allocate(nldas2data(LVT_rc%nDataStreams)) diff --git a/lvt/datastreams/NLDAS2/readNLDAS2data.F90 b/lvt/datastreams/NLDAS2/readNLDAS2data.F90 index 9f4002cb2..38bc2c695 100644 --- a/lvt/datastreams/NLDAS2/readNLDAS2data.F90 +++ b/lvt/datastreams/NLDAS2/readNLDAS2data.F90 @@ -19,6 +19,7 @@ subroutine readNLDAS2data(source) ! !USES: use grib_api use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_logunit, LVT_endrun, LVT_verify, & LVT_getNextUnitNumber, & @@ -56,7 +57,7 @@ subroutine readNLDAS2data(source) !EOP integer, parameter :: nc = 464 integer, parameter :: nr = 224 - character*120 :: filename,sacsmname,streamflowname + character(len=LVT_CONST_PATH_LEN) :: filename,sacsmname,streamflowname logical :: file_exists integer :: ftn,sacsmftn,streamflowftn,iret integer :: c,r,t diff --git a/lvt/datastreams/Natural_streamflow/NatSF_obsMod.F90 b/lvt/datastreams/Natural_streamflow/NatSF_obsMod.F90 index d5a86da33..71f392c9d 100644 --- a/lvt/datastreams/Natural_streamflow/NatSF_obsMod.F90 +++ b/lvt/datastreams/Natural_streamflow/NatSF_obsMod.F90 @@ -17,6 +17,7 @@ module NatSF_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -40,7 +41,7 @@ module NatSF_obsMod ! !EOP - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: n_stns character*100, allocatable :: stn_name(:) real, allocatable :: stnlat(:) @@ -62,7 +63,8 @@ module NatSF_obsMod ! !INTERFACE: subroutine NatSF_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -83,7 +85,7 @@ subroutine NatSF_obsinit(i) ! !EOP - character*100 :: stnlist_file + character(len=LVT_CONST_PATH_LEN) :: stnlist_file integer :: ftn, k, status if(.not.allocated(NatSFobs)) then diff --git a/lvt/datastreams/Natural_streamflow/readNatSFObs.F90 b/lvt/datastreams/Natural_streamflow/readNatSFObs.F90 index 3d1842156..a37e8420c 100644 --- a/lvt/datastreams/Natural_streamflow/readNatSFObs.F90 +++ b/lvt/datastreams/Natural_streamflow/readNatSFObs.F90 @@ -17,6 +17,7 @@ subroutine readNatSFObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_timeMgrMod, only : LVT_calendar, LVT_tick @@ -44,7 +45,7 @@ subroutine readNatSFObs(source) !EOP !-------------------------------------------------------------------------- - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character*20 :: datestring, qstring integer :: stn_col, stn_row, c,r real :: col,row @@ -58,7 +59,6 @@ subroutine readNatSFObs(source) integer :: iloc integer :: ios,ios1,ios2,status integer :: yr, mo, da - character*100 :: line logical :: file_exists type(ESMF_Time) :: obsTime,obsTime1 real :: q(LVT_rc%lnc,LVT_rc%lnr) diff --git a/lvt/datastreams/OCO2_SIF/OCO2_SIFobsMod.F90 b/lvt/datastreams/OCO2_SIF/OCO2_SIFobsMod.F90 index a0ea8e959..071e840a5 100755 --- a/lvt/datastreams/OCO2_SIF/OCO2_SIFobsMod.F90 +++ b/lvt/datastreams/OCO2_SIF/OCO2_SIFobsMod.F90 @@ -17,6 +17,7 @@ module OCO2_SIFobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -47,7 +48,7 @@ module OCO2_SIFobsMod !EOP type, public :: oco2sifdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*20 :: channel logical :: startFlag end type oco2sifdec diff --git a/lvt/datastreams/OCO2_SIF/readOCO2_SIFObs.F90 b/lvt/datastreams/OCO2_SIF/readOCO2_SIFObs.F90 index 19036722b..422f99d1d 100755 --- a/lvt/datastreams/OCO2_SIF/readOCO2_SIFObs.F90 +++ b/lvt/datastreams/OCO2_SIF/readOCO2_SIFObs.F90 @@ -18,6 +18,7 @@ subroutine readOCO2_SIFObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_logMod use LVT_histDataMod @@ -53,7 +54,7 @@ subroutine readOCO2_SIFObs(source) real :: lat_min,lat_max,lon_min,lon_max integer :: flag integer :: ftn - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname real, allocatable :: sif_temp(:),lat(:), lon(:),flat(:,:),flon(:,:) real :: sif_ip(LVT_rc%lnc,LVT_rc%lnr) integer :: nsif_ip(LVT_rc%lnc,LVT_rc%lnr) diff --git a/lvt/datastreams/OzFlux/OzFlux_obsMod.F90 b/lvt/datastreams/OzFlux/OzFlux_obsMod.F90 index 9bcb6133f..a7dd5a906 100644 --- a/lvt/datastreams/OzFlux/OzFlux_obsMod.F90 +++ b/lvt/datastreams/OzFlux/OzFlux_obsMod.F90 @@ -17,6 +17,7 @@ module OzFlux_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! @@ -50,7 +51,7 @@ module OzFlux_obsMod PUBLIC :: OzFluxobs !EOP type, public :: ozfluxobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: n_stns real, allocatable :: stnlat(:) @@ -86,7 +87,8 @@ module OzFlux_obsMod ! !INTERFACE: subroutine OzFlux_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -114,7 +116,7 @@ subroutine OzFlux_obsinit(i) !!EOP integer :: status integer :: ftn - character*100 :: stnlist_file + character(len=LVT_CONST_PATH_LEN) :: stnlist_file character*100 :: currentLine integer :: k, iloc real :: col,row diff --git a/lvt/datastreams/OzFlux/readOzFluxObs.F90 b/lvt/datastreams/OzFlux/readOzFluxObs.F90 index cf26cb542..5eafe33cb 100644 --- a/lvt/datastreams/OzFlux/readOzFluxObs.F90 +++ b/lvt/datastreams/OzFlux/readOzFluxObs.F90 @@ -126,7 +126,8 @@ end subroutine readOzfluxobs ! !INTERFACE: subroutine process_ozflux_data(source,yr,mo,da) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_logunit use OzFlux_obsMod, only : ozfluxobs @@ -164,7 +165,7 @@ subroutine process_ozflux_data(source,yr,mo,da) ! !EOP integer :: i - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: status logical :: file_exists diff --git a/lvt/datastreams/PBOH2O/PBOH2O_obsMod.F90 b/lvt/datastreams/PBOH2O/PBOH2O_obsMod.F90 index 2d1860a25..9f95a997a 100644 --- a/lvt/datastreams/PBOH2O/PBOH2O_obsMod.F90 +++ b/lvt/datastreams/PBOH2O/PBOH2O_obsMod.F90 @@ -17,6 +17,7 @@ module PBOH2O_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! @@ -52,7 +53,7 @@ module PBOH2O_obsMod PUBLIC :: PBOH2Oobs !EOP type, public :: pboh2oobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: n_stns integer :: yr character*30 :: site_id @@ -82,7 +83,8 @@ module PBOH2O_obsMod ! !INTERFACE: subroutine PBOH2O_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -110,8 +112,7 @@ subroutine PBOH2O_obsinit(i) !!EOP integer :: status integer :: ftn - character*100 :: stnlist_file - character*100 :: currentLine + character(len=LVT_CONST_PATH_LEN) :: stnlist_file integer :: k, iloc if(.not.allocated(pboh2oobs)) then diff --git a/lvt/datastreams/PBOH2O/readPBOH2Oobs.F90 b/lvt/datastreams/PBOH2O/readPBOH2Oobs.F90 index 6ec710f4d..2491bdc48 100644 --- a/lvt/datastreams/PBOH2O/readPBOH2Oobs.F90 +++ b/lvt/datastreams/PBOH2O/readPBOH2Oobs.F90 @@ -18,6 +18,7 @@ subroutine readPBOH2OObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_logMod use LVT_histDataMod @@ -50,7 +51,7 @@ subroutine readPBOH2OObs(source) type(ESMF_Time) :: pboh2otime1, pboh2otime2 integer :: k,t integer :: ftn - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename real :: gmt real :: time logical :: file_exists diff --git a/lvt/datastreams/SCAN/SCAN_obsMod.F90 b/lvt/datastreams/SCAN/SCAN_obsMod.F90 index dc9a8fa07..a6fa77b33 100644 --- a/lvt/datastreams/SCAN/SCAN_obsMod.F90 +++ b/lvt/datastreams/SCAN/SCAN_obsMod.F90 @@ -17,6 +17,7 @@ module SCAN_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -58,7 +59,7 @@ module SCAN_obsMod PUBLIC :: SCANobs !EOP type, public :: scanobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nstns integer, allocatable :: stnid(:) real, allocatable :: stnlat(:) @@ -111,7 +112,8 @@ module SCAN_obsMod ! ! !INTERFACE: subroutine SCAN_obsinit(i) -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -132,7 +134,7 @@ subroutine SCAN_obsinit(i) integer :: syr, smo, sda, shr, smn, sss integer :: eyr, emo, eda, ehr, emn, ess integer :: ts - character*100 :: coordfile + character(len=LVT_CONST_PATH_LEN) :: coordfile if(.not.allocated(scanobs)) then allocate(scanobs(LVT_rc%nDataStreams)) diff --git a/lvt/datastreams/SCAN/readSCANObs.F90 b/lvt/datastreams/SCAN/readSCANObs.F90 index 70691de66..6f820cfa7 100644 --- a/lvt/datastreams/SCAN/readSCANObs.F90 +++ b/lvt/datastreams/SCAN/readSCANObs.F90 @@ -17,6 +17,7 @@ subroutine readSCANObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_timeMgrMod, only : LVT_calendar, LVT_tick @@ -63,7 +64,7 @@ subroutine readSCANObs(source) integer :: c,t, st, et, r,kk integer :: status logical :: readflag, file_exists - character*100 :: scanfilename + character(len=LVT_CONST_PATH_LEN) :: scanfilename real :: gmt real*8 :: lis_prevtime type(ESMF_Time) :: scantime, scantime1, scantime2, starttime diff --git a/lvt/datastreams/SCANGMAO/SCANGMAO_obsMod.F90 b/lvt/datastreams/SCANGMAO/SCANGMAO_obsMod.F90 index 68c73d060..2c0e092a7 100644 --- a/lvt/datastreams/SCANGMAO/SCANGMAO_obsMod.F90 +++ b/lvt/datastreams/SCANGMAO/SCANGMAO_obsMod.F90 @@ -17,6 +17,7 @@ module SCANGMAO_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -59,7 +60,7 @@ module SCANGMAO_obsMod PUBLIC :: SCANGMAOobs !EOP type, public :: scangmaoobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nstns integer, allocatable :: stnid(:) real, allocatable :: stnlat(:) @@ -134,7 +135,7 @@ subroutine SCANGMAO_obsinit(i) integer :: eyr, emo, eda, ehr, emn, ess integer :: ts character*2 :: cdum - character*100 :: coordfile + character(len=LVT_CONST_PATH_LEN) :: coordfile if(.not.allocated(scangmaoobs)) then allocate(scangmaoobs(LVT_rc%nDataStreams)) diff --git a/lvt/datastreams/SCANGMAO/readSCANGMAOObs.F90 b/lvt/datastreams/SCANGMAO/readSCANGMAOObs.F90 index 8b031df3e..cabb67e91 100644 --- a/lvt/datastreams/SCANGMAO/readSCANGMAOObs.F90 +++ b/lvt/datastreams/SCANGMAO/readSCANGMAOObs.F90 @@ -17,6 +17,7 @@ subroutine readSCANGMAOObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_timeMgrMod, only : LVT_calendar, LVT_tick @@ -63,7 +64,7 @@ subroutine readSCANGMAOObs(source) integer :: c,t, st, et, r,kk integer :: status logical :: readflag, file_exists - character*100 :: scanfilename + character(len=LVT_CONST_PATH_LEN) :: scanfilename real :: gmt real*8 :: lis_prevtime type(ESMF_Time) :: scantime, scantime1, scantime2, starttime diff --git a/lvt/datastreams/SMAPTB/SMAP_TBobsMod.F90 b/lvt/datastreams/SMAPTB/SMAP_TBobsMod.F90 index d38434a87..efb76dc91 100644 --- a/lvt/datastreams/SMAPTB/SMAP_TBobsMod.F90 +++ b/lvt/datastreams/SMAPTB/SMAP_TBobsMod.F90 @@ -17,7 +17,8 @@ module SMAP_TBobsMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none PRIVATE @@ -48,7 +49,7 @@ module SMAP_TBobsMod !EOP type, public :: smapobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*20 :: data_designation integer :: nc diff --git a/lvt/datastreams/SMAPTB/readSMAPTBobs.F90 b/lvt/datastreams/SMAPTB/readSMAPTBobs.F90 index 34a7c7cd0..45da03d24 100644 --- a/lvt/datastreams/SMAPTB/readSMAPTBobs.F90 +++ b/lvt/datastreams/SMAPTB/readSMAPTBobs.F90 @@ -18,6 +18,7 @@ subroutine readSMAPTBobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_logMod, only : LVT_logunit @@ -44,7 +45,7 @@ subroutine readSMAPTBobs(source) logical :: alarmcheck, file_exists, readflag integer :: iret - character*200 :: ls_comm, cmd2, filename + character(len=LVT_CONST_PATH_LEN) :: ls_comm, cmd2, filename character*4 :: fyr character*2 :: fmo, fda real :: smc(LVT_rc%lnc, LVT_rc%lnr,2) diff --git a/lvt/datastreams/SMAP_E_OPL/SMAPEOPL_SM_obsMod.F90 b/lvt/datastreams/SMAP_E_OPL/SMAPEOPL_SM_obsMod.F90 index bdf04c1ff..c7fe42280 100644 --- a/lvt/datastreams/SMAP_E_OPL/SMAPEOPL_SM_obsMod.F90 +++ b/lvt/datastreams/SMAP_E_OPL/SMAPEOPL_SM_obsMod.F90 @@ -19,6 +19,7 @@ module SMAPEOPLSMobsMod ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -35,7 +36,7 @@ module SMAPEOPLSMobsMod !EOP type, public :: smapeoplsmdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr real :: gridDesci(50) real, allocatable :: smobs(:,:) diff --git a/lvt/datastreams/SMAP_E_OPL/readSMAPEOPL_SMObs.F90 b/lvt/datastreams/SMAP_E_OPL/readSMAPEOPL_SMObs.F90 index 201af9d40..66fd5bad2 100644 --- a/lvt/datastreams/SMAP_E_OPL/readSMAPEOPL_SMObs.F90 +++ b/lvt/datastreams/SMAP_E_OPL/readSMAPEOPL_SMObs.F90 @@ -20,6 +20,7 @@ subroutine readSMAPEOPL_SMObs(n) ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod @@ -43,14 +44,14 @@ subroutine readSMAPEOPL_SMObs(n) real*8 :: timenow logical :: alarmCheck real :: smobs(LVT_rc%lnc,LVT_rc%lnr) - character*200 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname integer :: mn_ind integer :: mn, ss integer :: doy character*8 :: yyyymmdd character*2 :: hh - character*200 :: list_files - character*200 :: smap_filename(10) + character(len=LVT_CONST_PATH_LEN) :: list_files + character(len=LVT_CONST_PATH_LEN) :: smap_filename(10) integer :: i integer :: ftn, ierr real :: gmt diff --git a/lvt/datastreams/SMAP_L3TB/SMAP_L3TBMod.F90 b/lvt/datastreams/SMAP_L3TB/SMAP_L3TBMod.F90 index 069f9025a..2f1e96dd8 100755 --- a/lvt/datastreams/SMAP_L3TB/SMAP_L3TBMod.F90 +++ b/lvt/datastreams/SMAP_L3TB/SMAP_L3TBMod.F90 @@ -17,7 +17,7 @@ module SMAP_L3TBMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -51,7 +51,7 @@ module SMAP_L3TBMod !EOP type, public :: smapobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*20 :: data_designation character*3 :: release_number integer :: nc diff --git a/lvt/datastreams/SMAP_L3TB/readSMAP_L3TB.F90 b/lvt/datastreams/SMAP_L3TB/readSMAP_L3TB.F90 index 7f24835ae..0794c4695 100755 --- a/lvt/datastreams/SMAP_L3TB/readSMAP_L3TB.F90 +++ b/lvt/datastreams/SMAP_L3TB/readSMAP_L3TB.F90 @@ -18,6 +18,7 @@ subroutine readSMAP_L3TB(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only: LVT_rc use LVT_histDataMod use LVT_logMod !, only : LVT_logunit @@ -49,7 +50,7 @@ subroutine readSMAP_L3TB(source) logical :: alarmcheck, file_exists, readflag integer :: iret - character*200 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname real :: Tb(LVT_rc%lnc, LVT_rc%lnr, 4) integer :: fnd real :: timenow @@ -57,7 +58,7 @@ subroutine readSMAP_L3TB(source) character*2 :: mm, dd, hh integer :: yr, mo, da, hr, mn, ss integer :: doy - character*200 :: list_files + character(len=LVT_CONST_PATH_LEN) :: list_files integer :: ftn, ierr character(len=3) :: CRID diff --git a/lvt/datastreams/SMAPsm/SMAP_smobsMod.F90 b/lvt/datastreams/SMAPsm/SMAP_smobsMod.F90 index 7c86f12db..0e43a8ecb 100644 --- a/lvt/datastreams/SMAPsm/SMAP_smobsMod.F90 +++ b/lvt/datastreams/SMAPsm/SMAP_smobsMod.F90 @@ -17,6 +17,7 @@ module SMAP_smobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -51,7 +52,7 @@ module SMAP_smobsMod !EOP type, public :: smapobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*20 :: data_designation character*3 :: release_number integer :: nc diff --git a/lvt/datastreams/SMAPsm/readSMAPsmobs.F90 b/lvt/datastreams/SMAPsm/readSMAPsmobs.F90 index 8d3c7573f..f1d738333 100644 --- a/lvt/datastreams/SMAPsm/readSMAPsmobs.F90 +++ b/lvt/datastreams/SMAPsm/readSMAPsmobs.F90 @@ -18,6 +18,7 @@ subroutine readSMAPsmobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -50,15 +51,14 @@ subroutine readSMAPsmobs(source) logical :: alarmcheck, file_exists, readflag integer :: iret - character*200 :: name real :: smc(LVT_rc%lnc, LVT_rc%lnr) integer :: fnd character*8 :: yyyymmdd character*4 :: yyyy character*2 :: mm,dd,hh - character*200 :: list_files + character(len=LVT_CONST_PATH_LEN) :: list_files integer :: ftn,ierr - character*200 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname integer :: mn_ind integer :: yr, mo, da, hr, mn, ss real :: gmt diff --git a/lvt/datastreams/SMAPvod/SMAP_vodobsMod.F90 b/lvt/datastreams/SMAPvod/SMAP_vodobsMod.F90 index c328a991a..ccba9419d 100644 --- a/lvt/datastreams/SMAPvod/SMAP_vodobsMod.F90 +++ b/lvt/datastreams/SMAPvod/SMAP_vodobsMod.F90 @@ -17,6 +17,7 @@ module SMAP_vodobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -50,7 +51,7 @@ module SMAP_vodobsMod !EOP type, public :: smapobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*20 :: data_designation integer :: nc diff --git a/lvt/datastreams/SMAPvod/readSMAPvodobs.F90 b/lvt/datastreams/SMAPvod/readSMAPvodobs.F90 index 968195969..a39d4a8a6 100644 --- a/lvt/datastreams/SMAPvod/readSMAPvodobs.F90 +++ b/lvt/datastreams/SMAPvod/readSMAPvodobs.F90 @@ -18,6 +18,7 @@ subroutine readSMAPvodobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -46,16 +47,16 @@ subroutine readSMAPvodobs(source) logical :: alarmcheck, file_exists, readflag integer :: iret - character*200 :: name + character(len=LVT_CONST_PATH_LEN) :: name real :: vod(LVT_rc%lnc, LVT_rc%lnr) integer :: fnd character*8 :: yyyymmdd character*4 :: yyyy character*2 :: mm,dd,hh - character*200 :: list_files + character(len=LVT_CONST_PATH_LEN) :: list_files integer :: i,ftn,ierr - character*200 :: smap_filename(10) - character*200 :: fname + character(len=LVT_CONST_PATH_LEN) :: smap_filename(10) + character(len=LVT_CONST_PATH_LEN) :: fname integer :: mn_ind integer :: yr, mo, da, hr, mn, ss real :: gmt diff --git a/lvt/datastreams/SMAPvwc/SMAP_vwcobsMod.F90 b/lvt/datastreams/SMAPvwc/SMAP_vwcobsMod.F90 index 39fcbef6e..99249db0b 100644 --- a/lvt/datastreams/SMAPvwc/SMAP_vwcobsMod.F90 +++ b/lvt/datastreams/SMAPvwc/SMAP_vwcobsMod.F90 @@ -17,6 +17,7 @@ module SMAP_vwcobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -51,9 +52,9 @@ module SMAP_vwcobsMod !EOP type, public :: smapobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*20 :: data_designation - character*3 :: release_number + character*3 :: release_number integer :: nc integer :: nr integer :: mo diff --git a/lvt/datastreams/SMAPvwc/readSMAPvwcobs.F90 b/lvt/datastreams/SMAPvwc/readSMAPvwcobs.F90 index f4a8f5894..ac0598f21 100644 --- a/lvt/datastreams/SMAPvwc/readSMAPvwcobs.F90 +++ b/lvt/datastreams/SMAPvwc/readSMAPvwcobs.F90 @@ -18,6 +18,7 @@ subroutine readSMAPvwcobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only: LVT_rc use LVT_histDataMod use LVT_logMod !, only : LVT_logunit @@ -50,7 +51,7 @@ subroutine readSMAPvwcobs(source) logical :: alarmcheck, file_exists, readflag integer :: iret - character*200 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname real :: vwc(LVT_rc%lnc, LVT_rc%lnr) integer :: fnd real :: timenow @@ -58,7 +59,7 @@ subroutine readSMAPvwcobs(source) character*2 :: mm, dd, hh integer :: yr, mo, da, hr, mn, ss integer :: doy - character*200 :: list_files + character(len=LVT_CONST_PATH_LEN) :: list_files integer :: ftn, ierr character(len=3) :: CRID diff --git a/lvt/datastreams/SMOPS/SMOPSsm_obsMod.F90 b/lvt/datastreams/SMOPS/SMOPSsm_obsMod.F90 index a9de6ebe2..b06ff5a34 100644 --- a/lvt/datastreams/SMOPS/SMOPSsm_obsMod.F90 +++ b/lvt/datastreams/SMOPS/SMOPSsm_obsMod.F90 @@ -122,6 +122,7 @@ module SMOPSsm_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -158,7 +159,7 @@ module SMOPSsm_obsMod !EOP type, public :: smopssmobsdec ! rtsmopsl2smobsdec integer :: useRealtime - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: useASCAT ! integer :: useWindSat integer :: useSMOS diff --git a/lvt/datastreams/SMOPS/readSMOPSsmObs.F90 b/lvt/datastreams/SMOPS/readSMOPSsmObs.F90 index 987fd6131..1cbee858e 100755 --- a/lvt/datastreams/SMOPS/readSMOPSsmObs.F90 +++ b/lvt/datastreams/SMOPS/readSMOPSsmObs.F90 @@ -18,6 +18,7 @@ subroutine readSMOPSsmObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -48,7 +49,7 @@ subroutine readSMOPSsmObs(source) logical :: file_exists integer :: c,r,i,j, status integer :: yr, mo, da, hr, mn, ss - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname real :: smobs(LVT_rc%lnc*LVT_rc%lnr) real :: smobs_2d(LVT_rc%lnc,LVT_rc%lnr) real :: relsmc(LVT_rc%lnc,LVT_rc%lnr) diff --git a/lvt/datastreams/SMOSREX/SMOSREX_obsMod.F90 b/lvt/datastreams/SMOSREX/SMOSREX_obsMod.F90 index ba7dade4c..f9a3bff1e 100644 --- a/lvt/datastreams/SMOSREX/SMOSREX_obsMod.F90 +++ b/lvt/datastreams/SMOSREX/SMOSREX_obsMod.F90 @@ -17,7 +17,7 @@ module SMOSREX_obsMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -44,7 +44,7 @@ module SMOSREX_obsMod PUBLIC :: SMOSREXobs !EOP type, public :: smosrexobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nstns integer, allocatable :: stnid(:) real, allocatable :: stnlat(:) diff --git a/lvt/datastreams/SMOS_CATDS_L3sm/SMOSCATDS_smobsMod.F90 b/lvt/datastreams/SMOS_CATDS_L3sm/SMOSCATDS_smobsMod.F90 index 52ad1e584..8e4a6a124 100644 --- a/lvt/datastreams/SMOS_CATDS_L3sm/SMOSCATDS_smobsMod.F90 +++ b/lvt/datastreams/SMOS_CATDS_L3sm/SMOSCATDS_smobsMod.F90 @@ -17,6 +17,7 @@ module SMOSCATDS_smobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -53,7 +54,7 @@ module SMOSCATDS_smobsMod !EOP type, public :: smoscatdsobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc integer :: nr diff --git a/lvt/datastreams/SMOS_CATDS_L3sm/readSMOSCATDSsmobs.F90 b/lvt/datastreams/SMOS_CATDS_L3sm/readSMOSCATDSsmobs.F90 index 3c5b06903..3c1334736 100644 --- a/lvt/datastreams/SMOS_CATDS_L3sm/readSMOSCATDSsmobs.F90 +++ b/lvt/datastreams/SMOS_CATDS_L3sm/readSMOSCATDSsmobs.F90 @@ -18,6 +18,7 @@ subroutine readSMOSCATDSsmobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_logMod, only : LVT_logunit @@ -45,7 +46,7 @@ subroutine readSMOSCATDSsmobs(source) logical :: alarmcheck, file_exists, readflag integer :: iret - character*200 :: name + character(len=LVT_CONST_PATH_LEN) :: name real :: smc(LVT_rc%lnc, LVT_rc%lnr) real :: smc_A(LVT_rc%lnc, LVT_rc%lnr) real :: smc_D(LVT_rc%lnc, LVT_rc%lnr) diff --git a/lvt/datastreams/SMOS_L1TB/SMOSL1TB_obsMod.F90 b/lvt/datastreams/SMOS_L1TB/SMOSL1TB_obsMod.F90 index fc739de09..26e4c5bb6 100644 --- a/lvt/datastreams/SMOS_L1TB/SMOSL1TB_obsMod.F90 +++ b/lvt/datastreams/SMOS_L1TB/SMOSL1TB_obsMod.F90 @@ -17,6 +17,7 @@ module SMOSL1TB_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -48,7 +49,7 @@ module SMOSL1TB_obsMod !EOP type, public :: smosl2smobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir logical :: startmode end type smosl2smobsdec diff --git a/lvt/datastreams/SMOS_L1TB/readSMOSL1TBObs.F90 b/lvt/datastreams/SMOS_L1TB/readSMOSL1TBObs.F90 index 7afb970ce..0d6fb11c1 100644 --- a/lvt/datastreams/SMOS_L1TB/readSMOSL1TBObs.F90 +++ b/lvt/datastreams/SMOS_L1TB/readSMOSL1TBObs.F90 @@ -18,6 +18,7 @@ subroutine readSMOSL1TBObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -42,10 +43,9 @@ subroutine readSMOSL1TBObs(source) logical :: alarmCheck logical :: file_exists integer :: c,r,i,j - character*100 :: fname - character*100 :: smos_filename + character(len=LVT_CONST_PATH_LEN) :: smos_filename character*8 :: yyyymmdd - character*200 :: list_files + character(len=LVT_CONST_PATH_LEN) :: list_files integer :: sind integer :: yr,mo,da,hr,mn,ss integer :: ftn diff --git a/lvt/datastreams/SMOS_L2sm/SMOSL2sm_obsMod.F90 b/lvt/datastreams/SMOS_L2sm/SMOSL2sm_obsMod.F90 index c77e5a9bb..79c31476d 100644 --- a/lvt/datastreams/SMOS_L2sm/SMOSL2sm_obsMod.F90 +++ b/lvt/datastreams/SMOS_L2sm/SMOSL2sm_obsMod.F90 @@ -17,6 +17,7 @@ module SMOSL2sm_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -48,7 +49,7 @@ module SMOSL2sm_obsMod !EOP type, public :: smosl2smobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir logical :: startmode end type smosl2smobsdec diff --git a/lvt/datastreams/SMOS_L2sm/readSMOSL2smObs.F90 b/lvt/datastreams/SMOS_L2sm/readSMOSL2smObs.F90 index 978234f61..ce8626cb3 100644 --- a/lvt/datastreams/SMOS_L2sm/readSMOSL2smObs.F90 +++ b/lvt/datastreams/SMOS_L2sm/readSMOSL2smObs.F90 @@ -123,6 +123,7 @@ end subroutine readSMOSL2smObs subroutine processSMOSfiles(source, smobs, iyr, imo, ida, ihr, imn, iss) use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_timeMgrMod use LVT_logMod @@ -134,10 +135,9 @@ subroutine processSMOSfiles(source, smobs, iyr, imo, ida, ihr, imn, iss) real :: smobs(LVT_rc%lnc,LVT_rc%lnr) integer :: iyr, imo, ida, ihr, imn, iss - character*100 :: fname - character*100 :: smos_filename + character(len=LVT_CONST_PATH_LEN) :: smos_filename character*8 :: yyyymmdd - character*200 :: list_files + character(len=LVT_CONST_PATH_LEN) :: list_files integer :: sind integer :: yr,mo,da,hr,mn,ss integer :: ftn diff --git a/lvt/datastreams/SMOS_NESDIS/SMOSNESDIS_smobsMod.F90 b/lvt/datastreams/SMOS_NESDIS/SMOSNESDIS_smobsMod.F90 index 4416cbd32..caa7066e0 100644 --- a/lvt/datastreams/SMOS_NESDIS/SMOSNESDIS_smobsMod.F90 +++ b/lvt/datastreams/SMOS_NESDIS/SMOSNESDIS_smobsMod.F90 @@ -17,6 +17,7 @@ module SMOSNESDIS_smobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -49,7 +50,7 @@ module SMOSNESDIS_smobsMod !EOP type, public :: smosnesdisobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc integer :: nr diff --git a/lvt/datastreams/SMOS_NESDIS/readSMOSNESDISsmobs.F90 b/lvt/datastreams/SMOS_NESDIS/readSMOSNESDISsmobs.F90 index c4b2916a9..37c0c740b 100644 --- a/lvt/datastreams/SMOS_NESDIS/readSMOSNESDISsmobs.F90 +++ b/lvt/datastreams/SMOS_NESDIS/readSMOSNESDISsmobs.F90 @@ -18,6 +18,7 @@ subroutine readSMOSNESDISsmobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_logMod, only : LVT_logunit @@ -44,7 +45,7 @@ subroutine readSMOSNESDISsmobs(source) logical :: alarmcheck, file_exists, readflag integer :: iret - character*200 :: name + character(len=LVT_CONST_PATH_LEN) :: name real :: smc(LVT_rc%lnc, LVT_rc%lnr) integer :: fnd real :: timenow diff --git a/lvt/datastreams/SNODAS/SNODAS_obsMod.F90 b/lvt/datastreams/SNODAS/SNODAS_obsMod.F90 index 958986132..5e54df022 100644 --- a/lvt/datastreams/SNODAS/SNODAS_obsMod.F90 +++ b/lvt/datastreams/SNODAS/SNODAS_obsMod.F90 @@ -17,6 +17,7 @@ module SNODAS_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -65,7 +66,7 @@ module SNODAS_obsMod PUBLIC :: SNODASobs !Object to hold SNODAS observation attributes !EOP type, public :: snodasobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc integer :: nr real :: udef @@ -98,7 +99,8 @@ module SNODAS_obsMod ! !INTERFACE: subroutine SNODAS_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -129,8 +131,6 @@ subroutine SNODAS_obsinit(i) integer :: syr, smo, sda, shr, smn, sss integer :: eyr, emo, eda, ehr, emn, ess integer :: ts - character*100 :: coordfile - character*100 :: mdata real :: xi1,xj1,xmesh,orient,alat1,alon1 integer :: t real :: gridDesci(50) diff --git a/lvt/datastreams/SNODAS/readSNODASObs.F90 b/lvt/datastreams/SNODAS/readSNODASObs.F90 index a6fe9aa94..18c7ee0c9 100644 --- a/lvt/datastreams/SNODAS/readSNODASObs.F90 +++ b/lvt/datastreams/SNODAS/readSNODASObs.F90 @@ -17,6 +17,7 @@ subroutine readSNODASObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -49,8 +50,8 @@ subroutine readSNODASObs(source) integer :: i,j,t,c,r integer :: stn_col, stn_row real :: col,row - character*100 :: snodas_swefilename - character*100 :: snodas_snwdfilename + character(len=LVT_CONST_PATH_LEN) :: snodas_swefilename + character(len=LVT_CONST_PATH_LEN) :: snodas_snwdfilename logical :: file_exists logical :: readflag integer :: ftn, ios diff --git a/lvt/datastreams/SNODEP/SNODEP_obsMod.F90 b/lvt/datastreams/SNODEP/SNODEP_obsMod.F90 index 74ae92755..62597fff1 100644 --- a/lvt/datastreams/SNODEP/SNODEP_obsMod.F90 +++ b/lvt/datastreams/SNODEP/SNODEP_obsMod.F90 @@ -17,6 +17,7 @@ module SNODEP_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! @@ -79,7 +80,7 @@ module SNODEP_obsMod integer :: hemi_nr(2) integer :: mi integer :: pmax - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: mesh logical :: startFlag end type snodepobsdec diff --git a/lvt/datastreams/SNODEP/readSNODEPobs.F90 b/lvt/datastreams/SNODEP/readSNODEPobs.F90 index 86257887b..c3692e88b 100644 --- a/lvt/datastreams/SNODEP/readSNODEPobs.F90 +++ b/lvt/datastreams/SNODEP/readSNODEPobs.F90 @@ -39,6 +39,7 @@ subroutine readSNODEPobs(source) ! !USES: use ESMF use grib_api + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -67,7 +68,7 @@ subroutine readSNODEPobs(source) integer :: npts integer :: ftn1,ftn2 integer :: pds5,pds7,pds5_val,pds7_val - character*100 :: name_nh, name_sh + character(len=LVT_CONST_PATH_LEN) :: name_nh, name_sh type(ESMF_Time) :: snodeptime, snodeptime1 logical :: file_exists1,file_exists2,read_flag real :: timenow @@ -228,9 +229,11 @@ end subroutine readSNODEPobs subroutine create_SNODEP_filename(name, mesh, hemi, ndir, yr, mo,da,hr,mn) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none - character*100 :: name + character(len=LVT_CONST_PATH_LEN) :: name integer :: hemi integer :: mesh integer :: yr, mo, da, hr,mn diff --git a/lvt/datastreams/SNODEPmetobs/SNODEP_metobsMod.F90 b/lvt/datastreams/SNODEPmetobs/SNODEP_metobsMod.F90 index 68dd63217..b18b3b461 100644 --- a/lvt/datastreams/SNODEPmetobs/SNODEP_metobsMod.F90 +++ b/lvt/datastreams/SNODEPmetobs/SNODEP_metobsMod.F90 @@ -17,6 +17,7 @@ module SNODEP_metobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -49,7 +50,7 @@ module SNODEP_metobsMod !EOP type, public :: SNODEPmetobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: da type(ESMF_Time) :: startTime real, allocatable :: snod(:,:,:) diff --git a/lvt/datastreams/SNODEPmetobs/readSNODEPmetobs.F90 b/lvt/datastreams/SNODEPmetobs/readSNODEPmetobs.F90 index 59d47ebcf..191d8267b 100644 --- a/lvt/datastreams/SNODEPmetobs/readSNODEPmetobs.F90 +++ b/lvt/datastreams/SNODEPmetobs/readSNODEPmetobs.F90 @@ -138,6 +138,7 @@ subroutine read_snodepdata(source, odir, yr, mo, da) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_timeMgrMod, only : LVT_calendar use LVT_logMod, only : LVT_logunit, LVT_verify, LVT_getNextUnitNumber, & @@ -190,7 +191,7 @@ subroutine read_snodepdata(source, odir, yr, mo, da) real :: col,row integer :: status integer :: data_index - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename real :: tempc, dewpc, avgc type(ESMF_Time) :: datatime, starttime diff --git a/lvt/datastreams/SNOTEL/SNOTEL_obsMod.F90 b/lvt/datastreams/SNOTEL/SNOTEL_obsMod.F90 index 8a1eb9c95..3fe163985 100644 --- a/lvt/datastreams/SNOTEL/SNOTEL_obsMod.F90 +++ b/lvt/datastreams/SNOTEL/SNOTEL_obsMod.F90 @@ -17,6 +17,7 @@ module SNOTEL_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -41,7 +42,7 @@ module SNOTEL_obsMod !EOP type, public :: snotelobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nstns integer :: nstates real :: udef @@ -71,7 +72,8 @@ module SNOTEL_obsMod ! !INTERFACE: subroutine SNOTEL_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -101,8 +103,8 @@ subroutine SNOTEL_obsinit(i) integer :: eyr, emo, eda, ehr, emn, ess integer :: ts integer :: siteid - character*100 :: coordfile - character*100 :: mdata + character(len=LVT_CONST_PATH_LEN) :: coordfile + !character(len=LVT_CONST_PATH_LEN) :: mdata if(.not.allocated(snotelobs)) then allocate(snotelobs(LVT_rc%nDataStreams)) diff --git a/lvt/datastreams/SNOTEL/readSNOTELObs.F90 b/lvt/datastreams/SNOTEL/readSNOTELObs.F90 index e920ae9a5..43d9be2bc 100644 --- a/lvt/datastreams/SNOTEL/readSNOTELObs.F90 +++ b/lvt/datastreams/SNOTEL/readSNOTELObs.F90 @@ -17,6 +17,7 @@ subroutine readSNOTELObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -55,7 +56,7 @@ subroutine readSNOTELObs(source) integer :: i,j,t,c,r,jj integer :: stn_col, stn_row real :: col,row - character*100 :: snotelfilename + character(len=LVT_CONST_PATH_LEN) :: snotelfilename logical :: file_exists logical :: readflag integer :: ftn, ios,ios1 diff --git a/lvt/datastreams/SSEBop/SSEBop_obsMod.F90 b/lvt/datastreams/SSEBop/SSEBop_obsMod.F90 index 1f8be924d..68e33db47 100644 --- a/lvt/datastreams/SSEBop/SSEBop_obsMod.F90 +++ b/lvt/datastreams/SSEBop/SSEBop_obsMod.F90 @@ -17,6 +17,7 @@ module SSEBop_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -46,7 +47,7 @@ module SSEBop_obsMod !EOP type, public :: ssebopdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: use_anomaly integer :: nc, nr integer, allocatable :: n11(:) diff --git a/lvt/datastreams/SSEBop/readSSEBopObs.F90 b/lvt/datastreams/SSEBop/readSSEBopObs.F90 index ea409a189..3a62037fa 100644 --- a/lvt/datastreams/SSEBop/readSSEBopObs.F90 +++ b/lvt/datastreams/SSEBop/readSSEBopObs.F90 @@ -18,6 +18,7 @@ subroutine readSSEBopObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod use LVT_histDataMod @@ -50,7 +51,7 @@ subroutine readSSEBopObs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: ftn logical :: file_exists integer :: nid, ios diff --git a/lvt/datastreams/SURFRAD/SURFRAD_obsMod.F90 b/lvt/datastreams/SURFRAD/SURFRAD_obsMod.F90 index 44bfee3c5..9e1d00890 100644 --- a/lvt/datastreams/SURFRAD/SURFRAD_obsMod.F90 +++ b/lvt/datastreams/SURFRAD/SURFRAD_obsMod.F90 @@ -17,7 +17,7 @@ module SURFRAD_obsMod ! ! !USES: use ESMF - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -55,7 +55,7 @@ module SURFRAD_obsMod !EOP type, public :: SURFRADobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real, allocatable :: dw_psp(:,:) real, allocatable :: windspd(:,:) real, allocatable :: dw_pir(:,:) diff --git a/lvt/datastreams/SURFRAD/readSURFRADObs.F90 b/lvt/datastreams/SURFRAD/readSURFRADObs.F90 index a9c3f5e6c..9aed43519 100644 --- a/lvt/datastreams/SURFRAD/readSURFRADObs.F90 +++ b/lvt/datastreams/SURFRAD/readSURFRADObs.F90 @@ -229,6 +229,7 @@ subroutine read_station_data(source, station_index, station_name, & ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_timeMgrMod, only : LVT_calendar use SURFRAD_obsMod, only : SURFRADobs use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, LVT_releaseUnitNumber @@ -260,8 +261,8 @@ subroutine read_station_data(source, station_index, station_name, & integer, parameter :: nlines = 1440 integer ftn, icount character*3 station_name - character*24 file_name - character*100 directory + character(len=LVT_CONST_PATH_LEN) :: file_name + character(len=LVT_CONST_PATH_LEN) :: directory real swnet_obs, lwnet_obs logical file_exists @@ -387,7 +388,8 @@ end subroutine read_station_data ! !INTERFACE: subroutine get_directory(year, station_index, directory) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -406,7 +408,7 @@ subroutine get_directory(year, station_index, directory) ! !ARGUMENTS integer year integer station_index - character*100 directory + character(len=LVT_CONST_PATH_LEN) :: directory !EOP ! print *,'get_directory ', station_index character*4 yearC @@ -449,7 +451,8 @@ end subroutine get_directory ! !INTERFACE: subroutine get_file_name(year,month,day,station_name, file_name) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -472,7 +475,7 @@ subroutine get_file_name(year,month,day,station_name, file_name) ! !ARGUMENTS integer year,month,day - character*24 file_name + character(len=LVT_CONST_PATH_LEN) :: file_name !EOP integer days_passed, yr diff --git a/lvt/datastreams/THySM/THySM_obsMod.F90 b/lvt/datastreams/THySM/THySM_obsMod.F90 index fc1b38b8a..33dd6643a 100644 --- a/lvt/datastreams/THySM/THySM_obsMod.F90 +++ b/lvt/datastreams/THySM/THySM_obsMod.F90 @@ -17,6 +17,7 @@ module THySM_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -48,7 +49,7 @@ module THySM_obsMod PUBLIC :: THySMobs !EOP type, public :: thysmobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real :: gridDesci(50) integer :: nc, nr type(proj_info) :: proj diff --git a/lvt/datastreams/THySM/readTHySMobs.F90 b/lvt/datastreams/THySM/readTHySMobs.F90 index 81dc64a37..583662d30 100644 --- a/lvt/datastreams/THySM/readTHySMobs.F90 +++ b/lvt/datastreams/THySM/readTHySMobs.F90 @@ -18,6 +18,7 @@ subroutine readTHySMobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod @@ -50,7 +51,7 @@ subroutine readTHySMobs(source) integer :: c,r integer :: ios integer :: ftn - character*100 :: fname_AM, fname_PM + character(len=LVT_CONST_PATH_LEN) :: fname_AM, fname_PM real :: smobs(LVT_rc%lnc,LVT_rc%lnr) real :: sm_file(THySMobs(source)%nc, THySMobs(source)%nr) real :: sm_inp(THySMobs(source)%nc*THySMobs(source)%nr) diff --git a/lvt/datastreams/UASMAP/UASMAP_obsMod.F90 b/lvt/datastreams/UASMAP/UASMAP_obsMod.F90 index f355c5866..2c6483f5c 100644 --- a/lvt/datastreams/UASMAP/UASMAP_obsMod.F90 +++ b/lvt/datastreams/UASMAP/UASMAP_obsMod.F90 @@ -17,6 +17,7 @@ module UASMAP_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -48,7 +49,7 @@ module UASMAP_obsMod PUBLIC :: UASMAPobs !EOP type, public :: thysmobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real :: gridDesci(50) integer :: nc, nr type(proj_info) :: proj diff --git a/lvt/datastreams/UASMAP/readUASMAPobs.F90 b/lvt/datastreams/UASMAP/readUASMAPobs.F90 index 5da0c2b8b..298cb2879 100644 --- a/lvt/datastreams/UASMAP/readUASMAPobs.F90 +++ b/lvt/datastreams/UASMAP/readUASMAPobs.F90 @@ -18,6 +18,7 @@ subroutine readUASMAPobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod @@ -50,7 +51,7 @@ subroutine readUASMAPobs(source) integer :: c,r,r1 integer :: ios integer :: ftn - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname real :: smobs(LVT_rc%lnc,LVT_rc%lnr) real :: sm_file(UASMAPobs(source)%nc, UASMAPobs(source)%nr) real :: sm_inp(UASMAPobs(source)%nc*UASMAPobs(source)%nr) diff --git a/lvt/datastreams/UA_SNOW/UASNOW_obsMod.F90 b/lvt/datastreams/UA_SNOW/UASNOW_obsMod.F90 index 31f80cf9e..337c55ae6 100755 --- a/lvt/datastreams/UA_SNOW/UASNOW_obsMod.F90 +++ b/lvt/datastreams/UA_SNOW/UASNOW_obsMod.F90 @@ -17,6 +17,7 @@ module UASNOW_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -48,7 +49,7 @@ module UASNOW_obsMod PUBLIC :: uasnowobs type, public :: uasnowobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr integer :: yr type(ESMF_Time) :: startTime diff --git a/lvt/datastreams/UA_SNOW/readUASNOWObs.F90 b/lvt/datastreams/UA_SNOW/readUASNOWObs.F90 index 537a46012..a5517dc96 100755 --- a/lvt/datastreams/UA_SNOW/readUASNOWObs.F90 +++ b/lvt/datastreams/UA_SNOW/readUASNOWObs.F90 @@ -19,6 +19,7 @@ subroutine readUASNOWObs(source) ! !USES: use ESMF use LVT_histDataMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_timeMgrMod, only : LVT_calendar use LVT_logMod, only : LVT_logunit, LVT_verify @@ -49,7 +50,7 @@ subroutine readUASNOWObs(source) !EOP integer :: ftn - character*100 :: uafilename + character(len=LVT_CONST_PATH_LEN) :: uafilename logical :: file_exists real, allocatable :: swe1(:,:,:),snwd1(:,:,:) real :: swe_in(uasnowobs(source)%nc*uasnowobs(source)%nr) diff --git a/lvt/datastreams/UCLA_SWE_reanal/UCLASWEreanal_dataMod.F90 b/lvt/datastreams/UCLA_SWE_reanal/UCLASWEreanal_dataMod.F90 index 4eeb544fc..0cbdb1a99 100644 --- a/lvt/datastreams/UCLA_SWE_reanal/UCLASWEreanal_dataMod.F90 +++ b/lvt/datastreams/UCLA_SWE_reanal/UCLASWEreanal_dataMod.F90 @@ -17,6 +17,7 @@ module UCLASWEreanal_dataMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none PRIVATE @@ -46,7 +47,7 @@ module UCLASWEreanal_dataMod PUBLIC :: UCLASWEreanaldata type, public :: uclaswereanaldatadec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr integer :: yr type(ESMF_Time) :: startTime diff --git a/lvt/datastreams/UCLA_SWE_reanal/readUCLASWEreanal.F90 b/lvt/datastreams/UCLA_SWE_reanal/readUCLASWEreanal.F90 index 855221143..946f78ddd 100644 --- a/lvt/datastreams/UCLA_SWE_reanal/readUCLASWEreanal.F90 +++ b/lvt/datastreams/UCLA_SWE_reanal/readUCLASWEreanal.F90 @@ -18,6 +18,7 @@ subroutine readIMDPRCPobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -50,7 +51,7 @@ subroutine readIMDPRCPobs(source) !EOP integer :: ftn - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character*4 :: fyr logical :: file_exists real, allocatable :: rainf(:,:,:) diff --git a/lvt/datastreams/USCRNsm/USCRNsm_obsMod.F90 b/lvt/datastreams/USCRNsm/USCRNsm_obsMod.F90 index 16aa9b9b6..66bd28253 100644 --- a/lvt/datastreams/USCRNsm/USCRNsm_obsMod.F90 +++ b/lvt/datastreams/USCRNsm/USCRNsm_obsMod.F90 @@ -17,6 +17,7 @@ module USCRNsm_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -48,7 +49,7 @@ module USCRNsm_obsMod PUBLIC :: USCRNsmobs !EOP type, public :: uscrnsmobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nstns character*40, allocatable :: stnid(:) real, allocatable :: stnlat(:) @@ -101,7 +102,8 @@ module USCRNsm_obsMod ! ! !INTERFACE: subroutine USCRNsm_obsinit(i) -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -122,7 +124,8 @@ subroutine USCRNsm_obsinit(i) integer :: syr, smo, sda, shr, smn, sss integer :: eyr, emo, eda, ehr, emn, ess integer :: ts, iloc - character*100 :: coordfile, cline + character(len=LVT_CONST_PATH_LEN) :: coordfile + character*100 :: cline integer :: filecheck if(.not.allocated(uscrnsmobs)) then diff --git a/lvt/datastreams/USCRNsm/readUSCRNsmObs.F90 b/lvt/datastreams/USCRNsm/readUSCRNsmObs.F90 index 501e996be..eafe80b26 100644 --- a/lvt/datastreams/USCRNsm/readUSCRNsmObs.F90 +++ b/lvt/datastreams/USCRNsm/readUSCRNsmObs.F90 @@ -17,6 +17,7 @@ subroutine readUSCRNsmObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_timeMgrMod, only : LVT_calendar, LVT_tick @@ -65,7 +66,7 @@ subroutine readUSCRNsmObs(source) integer :: c,t, st, et, r,kk integer :: status logical :: readflag, file_exists - character*100 :: uscrnsmfilename + character(len=LVT_CONST_PATH_LEN) :: uscrnsmfilename real :: gmt,lat, lon real :: t_daily_max, t_daily_min, t_daily_mean, t_daily_avg real :: p_daily_calc,solrad_daily diff --git a/lvt/datastreams/USDM/USDM_obsMod.F90 b/lvt/datastreams/USDM/USDM_obsMod.F90 index 79c0dd40c..aa0239f11 100644 --- a/lvt/datastreams/USDM/USDM_obsMod.F90 +++ b/lvt/datastreams/USDM/USDM_obsMod.F90 @@ -17,6 +17,7 @@ module USDM_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -46,7 +47,7 @@ module USDM_obsMod !EOP type, public :: usdmdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr integer, allocatable :: n11(:) real, allocatable :: drcategory(:) diff --git a/lvt/datastreams/USDM/readUSDMobs.F90 b/lvt/datastreams/USDM/readUSDMobs.F90 index 75378ea8d..a266b1874 100644 --- a/lvt/datastreams/USDM/readUSDMobs.F90 +++ b/lvt/datastreams/USDM/readUSDMobs.F90 @@ -18,6 +18,7 @@ subroutine readUSDMObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod use LVT_histDataMod @@ -50,7 +51,7 @@ subroutine readUSDMObs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: ftn logical :: file_exists integer :: nid, ios diff --git a/lvt/datastreams/USGS_GWwell/USGSGWwell_obsMod.F90 b/lvt/datastreams/USGS_GWwell/USGSGWwell_obsMod.F90 index 7d76a0ebf..7f50d21fb 100644 --- a/lvt/datastreams/USGS_GWwell/USGSGWwell_obsMod.F90 +++ b/lvt/datastreams/USGS_GWwell/USGSGWwell_obsMod.F90 @@ -17,6 +17,7 @@ module USGSGWwell_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -42,7 +43,7 @@ module USGSGWwell_obsMod !EOP type, public :: usgsgwwellobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nstns integer :: nstates real :: udef @@ -72,7 +73,8 @@ module USGSGWwell_obsMod ! !INTERFACE: subroutine USGSGWwell_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_timeMgrMod @@ -97,7 +99,7 @@ subroutine USGSGWwell_obsinit(i) integer :: status, rc integer :: ftn,k - character*100 :: coordfile + character(len=LVT_CONST_PATH_LEN) :: coordfile call ESMF_ConfigGetAttribute(LVT_config, usgsgwwellobs(i)%odir, & label='USGS ground water (well data) observation directory:',rc=status) diff --git a/lvt/datastreams/USGS_GWwell/readUSGSGWwellobs.F90 b/lvt/datastreams/USGS_GWwell/readUSGSGWwellobs.F90 index 16ca41f50..3c56a2942 100644 --- a/lvt/datastreams/USGS_GWwell/readUSGSGWwellobs.F90 +++ b/lvt/datastreams/USGS_GWwell/readUSGSGWwellobs.F90 @@ -17,6 +17,7 @@ subroutine readUSGSGWwellobs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -57,7 +58,7 @@ subroutine readUSGSGWwellobs(source) integer :: i,j,t,c,r,jj integer :: stn_col, stn_row real :: col,row - character*100 :: usgsgwwellfilename + character(len=LVT_CONST_PATH_LEN) :: usgsgwwellfilename logical :: file_exists logical :: readflag integer :: ftn, ios,ios1 diff --git a/lvt/datastreams/USGS_streamflow/USGSSF_obsMod.F90 b/lvt/datastreams/USGS_streamflow/USGSSF_obsMod.F90 index 433e399ff..634c14805 100644 --- a/lvt/datastreams/USGS_streamflow/USGSSF_obsMod.F90 +++ b/lvt/datastreams/USGS_streamflow/USGSSF_obsMod.F90 @@ -17,6 +17,7 @@ module USGSSF_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -40,7 +41,7 @@ module USGSSF_obsMod ! !EOP - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: n_stns integer :: nts integer :: version @@ -65,7 +66,8 @@ module USGSSF_obsMod ! !INTERFACE: subroutine USGSSF_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -86,7 +88,7 @@ subroutine USGSSF_obsinit(i) ! !EOP - character*100 :: stnlist_file + character(len=LVT_CONST_PATH_LEN) :: stnlist_file integer :: ftn, k, status if(.not.allocated(USGSSFobs)) then diff --git a/lvt/datastreams/USGS_streamflow/readUSGSSFObs.F90 b/lvt/datastreams/USGS_streamflow/readUSGSSFObs.F90 index 02c40fa4c..2be787de0 100644 --- a/lvt/datastreams/USGS_streamflow/readUSGSSFObs.F90 +++ b/lvt/datastreams/USGS_streamflow/readUSGSSFObs.F90 @@ -17,6 +17,7 @@ subroutine readUSGSSFObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_timeMgrMod, only : LVT_calendar, LVT_tick @@ -44,7 +45,7 @@ subroutine readUSGSSFObs(source) - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character*20 :: datestring, datestring2, qstring integer :: stn_col, stn_row, c,r real :: col,row diff --git a/lvt/datastreams/USGS_streamflow_gridded/USGSSFgrid_obsMod.F90 b/lvt/datastreams/USGS_streamflow_gridded/USGSSFgrid_obsMod.F90 index 353d4529d..d5fc243d8 100644 --- a/lvt/datastreams/USGS_streamflow_gridded/USGSSFgrid_obsMod.F90 +++ b/lvt/datastreams/USGS_streamflow_gridded/USGSSFgrid_obsMod.F90 @@ -17,6 +17,7 @@ module USGSSFgrid_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -40,7 +41,7 @@ module USGSSFgrid_obsMod ! !EOP - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc,nr integer :: mo integer :: nts @@ -61,7 +62,8 @@ module USGSSFgrid_obsMod ! !INTERFACE: subroutine USGSSFgrid_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -82,7 +84,6 @@ subroutine USGSSFgrid_obsinit(i) ! !EOP - character*100 :: stnlist_file integer :: ftn, k, status if(.not.allocated(USGSSFgridobs)) then diff --git a/lvt/datastreams/USGS_streamflow_gridded/readUSGSSFgridObs.F90 b/lvt/datastreams/USGS_streamflow_gridded/readUSGSSFgridObs.F90 index 78220cb66..624eebcb6 100644 --- a/lvt/datastreams/USGS_streamflow_gridded/readUSGSSFgridObs.F90 +++ b/lvt/datastreams/USGS_streamflow_gridded/readUSGSSFgridObs.F90 @@ -17,6 +17,7 @@ subroutine readUSGSSFgridObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_logMod @@ -42,7 +43,7 @@ subroutine readUSGSSFgridObs(source) - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: data_index,ftn,k,c,r real :: q(LVT_rc%lnc,LVT_rc%lnr) diff --git a/lvt/datastreams/UWET/UWET_obsMod.F90 b/lvt/datastreams/UWET/UWET_obsMod.F90 index 9f884b68b..b18c70a8d 100644 --- a/lvt/datastreams/UWET/UWET_obsMod.F90 +++ b/lvt/datastreams/UWET/UWET_obsMod.F90 @@ -17,6 +17,7 @@ module UWET_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -45,7 +46,7 @@ module UWET_obsMod !EOP type, public :: uwetdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: nc, nr integer, allocatable :: n11(:) real, allocatable :: qle(:) diff --git a/lvt/datastreams/UWET/readUWETObs.F90 b/lvt/datastreams/UWET/readUWETObs.F90 index 6531e3b8f..80c39e421 100644 --- a/lvt/datastreams/UWET/readUWETObs.F90 +++ b/lvt/datastreams/UWET/readUWETObs.F90 @@ -18,6 +18,7 @@ subroutine readUWETObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod, only : LVT_logunit, LVT_verify, & LVT_getNextUnitNumber, LVT_releaseUnitNumber @@ -45,7 +46,7 @@ subroutine readUWETObs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: ftn logical :: file_exists integer :: nid, ios diff --git a/lvt/datastreams/WGPBMR/WGPBMRobsMod.F90 b/lvt/datastreams/WGPBMR/WGPBMRobsMod.F90 index cbb58d2c3..a747239cf 100644 --- a/lvt/datastreams/WGPBMR/WGPBMRobsMod.F90 +++ b/lvt/datastreams/WGPBMR/WGPBMRobsMod.F90 @@ -17,6 +17,7 @@ module WGPBMRobsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -38,7 +39,7 @@ module WGPBMRobsMod !EOP type, public :: wgpbmrobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: stnid end type wgpbmrobsdec diff --git a/lvt/datastreams/WGPBMR/readWGPBMRObs.F90 b/lvt/datastreams/WGPBMR/readWGPBMRObs.F90 index a4e8ae464..cbdf24f12 100644 --- a/lvt/datastreams/WGPBMR/readWGPBMRObs.F90 +++ b/lvt/datastreams/WGPBMR/readWGPBMRObs.F90 @@ -17,6 +17,7 @@ subroutine readWGPBMRObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -43,7 +44,7 @@ subroutine readWGPBMRObs(source) integer :: ftn integer :: c,r logical :: file_exists - character*100 :: wgpbmrfilename + character(len=LVT_CONST_PATH_LEN) :: wgpbmrfilename real :: dummy(LVT_rc%lnc, LVT_rc%lnr) real :: smc(LVT_rc%lnc, LVT_rc%lnr) real :: gridDesc(6) diff --git a/lvt/datastreams/WGSWRC/WGSWRC_obsMod.F90 b/lvt/datastreams/WGSWRC/WGSWRC_obsMod.F90 index df3c6b77c..293b45b93 100644 --- a/lvt/datastreams/WGSWRC/WGSWRC_obsMod.F90 +++ b/lvt/datastreams/WGSWRC/WGSWRC_obsMod.F90 @@ -17,6 +17,7 @@ module WGSWRC_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -41,7 +42,7 @@ module WGSWRC_obsMod type, public :: wgswrcobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir integer :: yr integer :: n_stns character*50, allocatable :: stn_name(:) @@ -64,7 +65,8 @@ module WGSWRC_obsMod ! !INTERFACE: subroutine WGSWRC_obsInit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_obsDataMod use LVT_logMod @@ -86,7 +88,7 @@ subroutine WGSWRC_obsInit(i) integer :: k integer :: ftn integer :: status - character*100 :: stnlist_file + character(len=LVT_CONST_PATH_LEN) :: stnlist_file if(.not.allocated(WGSWRCobs)) then allocate(WGSWRCobs(LVT_rc%nDataStreams)) diff --git a/lvt/datastreams/WGSWRC/readWGSWRCobs.F90 b/lvt/datastreams/WGSWRC/readWGSWRCobs.F90 index d803b81d8..803755194 100644 --- a/lvt/datastreams/WGSWRC/readWGSWRCobs.F90 +++ b/lvt/datastreams/WGSWRC/readWGSWRCobs.F90 @@ -17,6 +17,7 @@ subroutine readWGSWRCObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod, only : LVT_logSingleVar use LVT_obsDataMod, only : LVT_obsData @@ -43,14 +44,13 @@ subroutine readWGSWRCObs(source) ! !EOP - character*200 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: ios integer :: yr,doy,mo,da,hr,mn,ss real*8 :: lis_prevtime real :: gmt integer :: st,et logical :: file_exists - character*20 :: name1, name2 integer :: stnid integer :: sm(7) real :: st1, st2, st3, st4, st5,st6,st7 diff --git a/lvt/datastreams/jasmin/JASMINsm_obsMod.F90 b/lvt/datastreams/jasmin/JASMINsm_obsMod.F90 index 4b9872949..54da15214 100644 --- a/lvt/datastreams/jasmin/JASMINsm_obsMod.F90 +++ b/lvt/datastreams/jasmin/JASMINsm_obsMod.F90 @@ -17,6 +17,7 @@ module JASMINsm_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use map_utils implicit none @@ -48,7 +49,7 @@ module JASMINsm_obsMod PUBLIC :: JASMINsmobs !EOP type, public :: jasminsmobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir real :: gridDesci(50) integer :: jasminnc, jasminnr type(proj_info) :: jasminproj diff --git a/lvt/datastreams/jasmin/readJASMINsmObs.F90 b/lvt/datastreams/jasmin/readJASMINsmObs.F90 index a052bd5c2..88dcb2f85 100644 --- a/lvt/datastreams/jasmin/readJASMINsmObs.F90 +++ b/lvt/datastreams/jasmin/readJASMINsmObs.F90 @@ -18,6 +18,7 @@ subroutine readJASMINsmObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_domain use LVT_histDataMod use LVT_logMod, only : LVT_logunit, LVT_getNextUnitNumber, & @@ -52,7 +53,7 @@ subroutine readJASMINsmObs(source) logical :: alarmCheck logical :: file_exists integer :: c,r,i,j - character*100 :: fname + character(len=LVT_CONST_PATH_LEN) :: fname real :: smobs(LVT_rc%lnc*LVT_rc%lnr,4) real :: rootsm(LVT_rc%lnc*LVT_rc%lnr) real :: lat,lon diff --git a/lvt/datastreams/simGRACE/readsimGRACEObs.F90 b/lvt/datastreams/simGRACE/readsimGRACEObs.F90 index 2850d6c43..c56c14062 100644 --- a/lvt/datastreams/simGRACE/readsimGRACEObs.F90 +++ b/lvt/datastreams/simGRACE/readsimGRACEObs.F90 @@ -18,6 +18,7 @@ subroutine readsimGRACEObs(source) ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc use LVT_logMod use LVT_histDataMod @@ -45,7 +46,7 @@ subroutine readsimGRACEObs(source) ! !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename logical :: file_exists integer :: c,r,t,kk integer :: ftn diff --git a/lvt/datastreams/simGRACE/simGRACE_obsMod.F90 b/lvt/datastreams/simGRACE/simGRACE_obsMod.F90 index 25d0b0940..fd8cba79e 100644 --- a/lvt/datastreams/simGRACE/simGRACE_obsMod.F90 +++ b/lvt/datastreams/simGRACE/simGRACE_obsMod.F90 @@ -18,6 +18,7 @@ module simGRACE_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -48,7 +49,7 @@ module simGRACE_obsMod !EOP type, public :: simgracedec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir character*50 :: config logical :: startFlag integer :: useRawData @@ -86,7 +87,8 @@ module simGRACE_obsMod ! !INTERFACE: subroutine simGRACE_obsinit(i) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_Config use LVT_histDataMod use LVT_logMod @@ -117,7 +119,7 @@ subroutine simGRACE_obsinit(i) integer :: i integer :: status real :: gridDesci(50) - character*100 :: domFile + character(len=LVT_CONST_PATH_LEN) :: domFile character*100 :: map_proj logical :: file_exists real :: stlat, stlon, dx, dy diff --git a/lvt/datastreams/template/template_obsMod.F90 b/lvt/datastreams/template/template_obsMod.F90 index 95882303f..d574fe190 100644 --- a/lvt/datastreams/template/template_obsMod.F90 +++ b/lvt/datastreams/template/template_obsMod.F90 @@ -17,6 +17,7 @@ module template_obsMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none @@ -41,7 +42,7 @@ module template_obsMod PUBLIC :: templateobs type, public :: templateobsdec - character*100 :: odir + character(len=LVT_CONST_PATH_LEN) :: odir end type templateobsdec type(templateobsdec) :: templateobs diff --git a/lvt/interp/breakpt_module.F90 b/lvt/interp/breakpt_module.F90 index 1e687cc86..b09efd54b 100644 --- a/lvt/interp/breakpt_module.F90 +++ b/lvt/interp/breakpt_module.F90 @@ -176,11 +176,12 @@ module breakpoint_module integer function filedate(log1,filename) ! ! dependencies + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use dfport ! ! argument variables integer, intent(INOUT) :: log1 - character*80 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename ! ! local variables integer, dimension(12) :: fileinfo @@ -207,10 +208,11 @@ end function filedate ! ! logical function checkintfile(log1,dataf1,dataf2) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! argument variables integer, intent(INOUT) :: log1 - character*80, intent(INOUT) :: dataf1,dataf2 + character(len=LVT_CONST_PATH_LEN), intent(INOUT) :: dataf1,dataf2 ! ! local variables logical :: fileexists = .FALSE. @@ -369,16 +371,17 @@ end function datestr ! Duplicate declaration... check if this is needed #if 0 subroutine readcard(brkfile,datebeg,dateend,ng,intmins,outfmt,error) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! argument variables - character(80), intent(OUT) :: brkfile + character(len=LVT_CONST_PATH_LEN), intent(OUT) :: brkfile character(10), intent(OUT) :: datebeg,dateend integer, intent(OUT) :: ng,intmins,outfmt logical, intent(OUT) :: error ! ! local variables logical :: fileexists - character(11) :: cardfile + character(len=LVT_CONST_PATH_LEN) :: cardfile integer :: funit = 10 ! cardfile = 'Breakpt.crd' @@ -404,16 +407,17 @@ end subroutine readcard ! ! subroutine brkprecip(brkfile,datebeg,dateend,ngauges,intmins,outfmt) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! argument variables - character*80, intent(INOUT) :: brkfile + character(len=LVT_CONST_PATH_LEN), intent(INOUT) :: brkfile character*10, intent(INOUT) :: datebeg,dateend integer, intent(INOUT) :: ngauges,intmins,outfmt ! ! local variables logical :: brkexists,ppdexists,idxexists,intfiles - character*80 :: wrtline - character*80 :: logfile,ppdfile,idxfile,outfile + character(len=LVT_CONST_PATH_LEN) :: wrtline + character(len=LVT_CONST_PATH_LEN) :: logfile,ppdfile,idxfile,outfile integer :: brkfunit = 50 integer :: log1 = 60 integer :: ppdfunit,idxfunit @@ -570,18 +574,19 @@ end subroutine intindex ! ! subroutine readheader(log1,funit,datafile,intf,gidxs,hlines) + use LVT_constantsMod, only : LVT_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,funit - character*80, intent(IN) :: datafile + character(len=LVT_CONST_PATH_LEN), intent(IN) :: datafile logical, intent(IN) :: intf integer, intent (INOUT) :: gidxs(:,:) integer, intent(OUT) :: hlines ! ! local variables - character*80 :: wrtline + character(len=LVT_CONST_PATH_LEN) :: wrtline character*120 :: hline - character*80 :: dataf2,dataf3 + character(len=LVT_CONST_PATH_LEN) :: dataf2,dataf3 integer :: ng integer :: ppdfunit,idxfunit integer :: i,j,k,m,n @@ -674,15 +679,16 @@ end subroutine readheader ! ! subroutine procstndata(log1,datafile,hlines,ng,gidxs) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,hlines,ng - character*80, intent(IN) :: datafile + character(len=LVT_CONST_PATH_LEN), intent(IN) :: datafile integer, intent(INOUT) :: gidxs(:,:) ! ! local variables - character*80 :: dataf2,dataf3 - character*80 :: wrtline + character(len=LVT_CONST_PATH_LEN) :: dataf2,dataf3 + character(len=LVT_CONST_PATH_LEN) :: wrtline character*80 :: hline character*40 :: tprec,next_tprec character*7 :: nrecs @@ -824,10 +830,11 @@ end subroutine procstndata ! ! subroutine breakagg(log1,funit,datafile,hlines,ng,nint,intmins,dates,gidxs,precip,accy) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,funit - character*80, intent(IN) :: datafile + character(len=LVT_CONST_PATH_LEN), intent(IN) :: datafile integer, intent(IN) :: hlines,ng,nint integer, intent(INOUT) :: intmins integer, intent(INOUT) :: dates(:,:) @@ -836,9 +843,9 @@ subroutine breakagg(log1,funit,datafile,hlines,ng,nint,intmins,dates,gidxs,preci integer, intent(OUT) :: accy(:,:) ! ! local variables - character*80 :: wrtline + character(len=LVT_CONST_PATH_LEN) :: wrtline character*80 :: hline - character*80 :: idxdataf + character(len=LVT_CONST_PATH_LEN) :: idxdataf character*3 :: gage character*6 :: brecs,events integer, dimension(2,5) :: tdata = 0 @@ -1067,16 +1074,17 @@ end subroutine metric ! ! subroutine writestnrec(log1,ng,nint,intmins,outfmt,dates,gidxs,precip,outfile) + use LVT_constantsMod, only: LVT_CONST_PATH_LEN ! ! argument variables integer, intent(IN) :: log1,ng,nint,intmins,outfmt - character*80, intent(INOUT) :: outfile + character(len=LVT_CONST_PATH_LEN), intent(INOUT) :: outfile integer, intent(INOUT) :: dates(:,:) integer, intent(IN) :: gidxs(:,:) real, intent(IN) :: precip(:,:) ! ! local variables - character*80 :: wrtline,datafile + character(len=LVT_CONST_PATH_LEN) :: wrtline,datafile character*16 :: datetime ! MM/DD/YYYY hh:mm character*3 :: gnum integer :: funit = 10 diff --git a/lvt/interp/stninterp_module.F90 b/lvt/interp/stninterp_module.F90 index 9295773a4..95c151cfa 100644 --- a/lvt/interp/stninterp_module.F90 +++ b/lvt/interp/stninterp_module.F90 @@ -90,10 +90,11 @@ module stninterp_module subroutine calcgrids(dirname,stnfile,stns,nnn,method,order,cols,rows,& llx,lly,urx,ury,incr,npts,locarr) ! + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! argument variables - character*40, intent(IN) :: dirname,stnfile + character(len=LVT_CONST_PATH_LEN), intent(IN) :: dirname,stnfile integer, intent(INOUT) :: stns,nnn,method,order integer, intent(INOUT) :: cols,rows real*4, intent(INOUT) :: llx,lly,urx,ury,incr @@ -103,8 +104,8 @@ subroutine calcgrids(dirname,stnfile,stns,nnn,method,order,cols,rows,& ! local variables integer :: s logical :: lerr = .FALSE. - character*80 :: infile - character*80 :: outfile + character(len=LVT_CONST_PATH_LEN) :: infile + character(len=LVT_CONST_PATH_LEN) :: outfile integer :: funit = 10 real(4), allocatable :: stndata(:,:) integer(4), allocatable :: W1grid(:,:,:) ! station numbers for each grid cell diff --git a/lvt/main/LVTmain.F90 b/lvt/main/LVTmain.F90 index 7b089f433..e1ef8ccbd 100644 --- a/lvt/main/LVTmain.F90 +++ b/lvt/main/LVTmain.F90 @@ -16,7 +16,8 @@ ! !INTERFACE: program LVTmain ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only : LVT_rc, LVT_configinit ! ! !INPUT PARAMETERS: @@ -36,7 +37,7 @@ program LVTmain !EOP implicit none - character*500 :: configfile = 'lvt.config' + character(len=LVT_CONST_PATH_LEN) :: configfile = 'lvt.config' integer :: i integer :: iargc !BOC diff --git a/lvt/metrics/LVT_MetricEntropyMod.F90 b/lvt/metrics/LVT_MetricEntropyMod.F90 index df45cca66..b328af1de 100644 --- a/lvt/metrics/LVT_MetricEntropyMod.F90 +++ b/lvt/metrics/LVT_MetricEntropyMod.F90 @@ -32,6 +32,7 @@ module LVT_MetricEntropyMod ! !EOP use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_histDataMod use LVT_statsDataMod @@ -60,7 +61,7 @@ module LVT_MetricEntropyMod integer :: nts_threshold integer, allocatable :: nts(:,:) real, allocatable :: value_model_ts(:) - character*100 :: rstFile + character(len=LVT_CONST_PATH_LEN) :: rstFile end type mentropydec type(mentropydec), allocatable, save :: LVT_mentropy_struc(:) @@ -326,7 +327,8 @@ end subroutine LVT_computeMetricEntropy ! ! !INTERFACE: subroutine computeSingleMetricEntropy(alarm,model,obs,stats,metric) -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_informationContentMod implicit none @@ -374,8 +376,9 @@ subroutine computeSingleMetricEntropy(alarm,model,obs,stats,metric) character*4 :: fdim2 character*7 :: fdim1 integer :: ftn - character*100 :: matlab_command - +#if (defined USE_MATLAB_SUPPORT) + character(len=LVT_CONST_PATH_LEN) :: matlab_command +#endif ts_class = 1 if(LVT_rc%endtime.eq.1.and.metric%selectOpt.eq.1) then diff --git a/lvt/metrics/LVT_SRIMod.F90 b/lvt/metrics/LVT_SRIMod.F90 index b14aef521..7673d330c 100644 --- a/lvt/metrics/LVT_SRIMod.F90 +++ b/lvt/metrics/LVT_SRIMod.F90 @@ -113,7 +113,8 @@ module LVT_SRIMod ! ! !INTERFACE: subroutine LVT_initSRI(selectNlevs, stats,metric) -! !ARGUMENTS: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! !ARGUMENTS: integer :: selectNlevs(LVT_rc%nDataStreams) type(LVT_statsEntry) :: stats type(LVT_metricEntry) :: metric @@ -129,7 +130,7 @@ subroutine LVT_initSRI(selectNlevs, stats,metric) type(ESMF_TimeInterval) :: timeStep integer :: i,m character*4 :: fens - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character*10 :: time integer :: rc diff --git a/lvt/metrics/LVT_percentileMod.F90 b/lvt/metrics/LVT_percentileMod.F90 index a9b1f8869..817985b1f 100644 --- a/lvt/metrics/LVT_percentileMod.F90 +++ b/lvt/metrics/LVT_percentileMod.F90 @@ -18,6 +18,7 @@ module LVT_percentileMod ! ! !USES: use ESMF + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod use LVT_timeMgrMod use LVT_histDataMod @@ -99,10 +100,10 @@ module LVT_percentileMod real :: d_classes(5) integer, allocatable :: ftn_ts_darea(:) integer :: usescaling - character*100 :: mean_filename1 - character*100 :: mean_filename2 - character*100 :: std_filename1 - character*100 :: std_filename2 + character(len=LVT_CONST_PATH_LEN) :: mean_filename1 + character(len=LVT_CONST_PATH_LEN) :: mean_filename2 + character(len=LVT_CONST_PATH_LEN) :: std_filename1 + character(len=LVT_CONST_PATH_LEN) :: std_filename2 type(ESMF_Time) :: stime, etime real, allocatable :: mean1(:) real, allocatable :: mean2(:) @@ -121,7 +122,8 @@ module LVT_percentileMod ! ! !INTERFACE: subroutine LVT_initpercentile(selectNlevs, stats,metric) -! !ARGUMENTS: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! !ARGUMENTS: integer :: selectNlevs(LVT_rc%nDataStreams) type(LVT_statsEntry) :: stats type(LVT_metricEntry) :: metric @@ -136,7 +138,7 @@ subroutine LVT_initpercentile(selectNlevs, stats,metric) type(ESMF_Time) :: stopTime type(ESMF_TimeInterval) :: timeStep integer :: i,k,t,c,r - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character*3 :: ftime character*4 :: fens integer :: rc @@ -148,10 +150,10 @@ subroutine LVT_initpercentile(selectNlevs, stats,metric) real, allocatable :: pctile_model(:,:,:) integer :: usescaling - character*100 :: mean_filename1 - character*100 :: mean_filename2 - character*100 :: std_filename1 - character*100 :: std_filename2 + character(len=LVT_CONST_PATH_LEN) :: mean_filename1 + character(len=LVT_CONST_PATH_LEN) :: mean_filename2 + character(len=LVT_CONST_PATH_LEN) :: std_filename1 + character(len=LVT_CONST_PATH_LEN) :: std_filename2 allocate(LVT_pctile_struc(LVT_rc%nensem)) allocate(stats%pctile(LVT_rc%nensem)) @@ -557,7 +559,8 @@ end subroutine LVT_diagnosepercentile ! !INTERFACE: subroutine diagnoseSinglepercentileParams(model, obs, stats,metric) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -592,7 +595,7 @@ subroutine diagnoseSinglepercentileParams(model, obs, stats,metric) type(ESMF_Time) :: startTime, currTime type(ESMF_TimeInterval) :: ts character*3 :: ftime - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: tindex, day1,day2, day3, day4, day5 integer :: yr_index integer :: p1,p2,p3,p4,p5 @@ -840,7 +843,7 @@ end subroutine diagnoseSinglepercentileParams subroutine diagnoseSinglepercentile(model,obs,stats,metric) ! ! !USES: - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -875,7 +878,7 @@ subroutine diagnoseSinglepercentile(model,obs,stats,metric) type(ESMF_Time) :: currTime real :: min_value character*3 :: ftime - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename integer :: yr_index, tindex logical :: leap_year, skip_flag real :: pvalue @@ -1182,7 +1185,7 @@ end subroutine LVT_computepercentile subroutine computeSinglepercentileparams(alarm,model,obs,stats,metric) ! ! !USES: - + use LVT_constantsMod, only: LVT_CONST_PATH_LEN implicit none ! ! !INPUT PARAMETERS: @@ -1212,7 +1215,7 @@ subroutine computeSinglepercentileparams(alarm,model,obs,stats,metric) type(LVT_metricEntry) :: metric !EOP - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename character*3 :: ftime integer :: ftn integer :: nsize diff --git a/lvt/metrics/LVT_waveletStatMod.F90 b/lvt/metrics/LVT_waveletStatMod.F90 index de73da6cb..4fd318524 100644 --- a/lvt/metrics/LVT_waveletStatMod.F90 +++ b/lvt/metrics/LVT_waveletStatMod.F90 @@ -554,7 +554,8 @@ end subroutine computeSingleWaveletStat ! !INTERFACE: subroutine LVT_writeMetric_waveletstat(pass,final,vlevels,stats,obs) ! -! !USES: + ! !USES: + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_logMod, only : LVT_getNextUnitNumber, LVT_releaseUnitNumber use LVT_statsMod, only : LVT_writeSummaryStats use LVT_pluginIndices @@ -580,7 +581,7 @@ subroutine LVT_writeMetric_waveletstat(pass,final,vlevels,stats,obs) integer :: i ,k,m integer :: ftn - character*100 :: filename + character(len=LVT_CONST_PATH_LEN) :: filename if(LVT_metrics%waveletstat%selectOpt.eq.1) then diff --git a/lvt/runmodes/USAFSIpost/LVT_USAFSIpostMod.F90 b/lvt/runmodes/USAFSIpost/LVT_USAFSIpostMod.F90 index ae7a2b87b..adf882f9a 100644 --- a/lvt/runmodes/USAFSIpost/LVT_USAFSIpostMod.F90 +++ b/lvt/runmodes/USAFSIpost/LVT_USAFSIpostMod.F90 @@ -28,12 +28,14 @@ module LVT_USAFSIpostMod + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + implicit none private type, public :: LVT_USAFSIpost_t private - character(len=255) :: input_nc_file + character(len=LVT_CONST_PATH_LEN) :: input_nc_file integer :: nc integer :: nr real, allocatable :: snoanl(:,:) @@ -384,6 +386,7 @@ subroutine output_grib2(this) ! Imports use grib_api + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only: LVT_rc use LVT_logMod, only: LVT_logunit, LVT_endrun @@ -395,7 +398,7 @@ subroutine output_grib2(this) ! Local variables real :: griddesci(50) - character(len=255) :: fname + character(len=LVT_CONST_PATH_LEN) :: fname integer :: ftn, rc, status2 character(len=255) :: msg real, allocatable :: go(:) @@ -505,6 +508,7 @@ subroutine interp_and_output_grib1(this, gridID) ! Imports use grib_api + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only: LVT_rc use LVT_logMod, only: LVT_logunit, LVT_endrun @@ -536,7 +540,7 @@ subroutine interp_and_output_grib1(this, gridID) logical*1, allocatable :: li(:), lo(:), lo_bin(:), lo_neighbor(:) real, allocatable :: gi(:), go(:), go_bin(:), go_neighbor(:) real, allocatable :: go2d(:,:) - character(len=255) :: fname + character(len=LVT_CONST_PATH_LEN) :: fname integer :: ftn, rc, status2, iret integer :: c,r integer :: igrib @@ -1196,15 +1200,16 @@ end subroutine check_gridID subroutine build_filename_g2(output_dir, yyyymmddhh, filename) ! Imports + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only: LVT_rc ! Defaults implicit none ! Arguments - character(len=255), intent(in) :: output_dir + character(len=LVT_CONST_PATH_LEN), intent(in) :: output_dir character(len=10), intent(in) :: yyyymmddhh - character(len=255), intent(out) :: filename + character(len=LVT_CONST_PATH_LEN), intent(out) :: filename ! filename = trim(output_dir) & ! // '/PS.557WW_SC.' & @@ -1230,14 +1235,17 @@ end subroutine build_filename_g2 ! Build the grib1 filename subroutine build_filename_g1(gridID, output_dir, yyyymmddhh, filename) + ! Imports + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! Defaults implicit none ! Arguments character(len=*), intent(in) :: gridID - character(len=255), intent(in) :: output_dir + character(len=LVT_CONST_PATH_LEN), intent(in) :: output_dir character(len=10), intent(in) :: yyyymmddhh - character(len=255), intent(out) :: filename + character(len=LVT_CONST_PATH_LEN), intent(out) :: filename ! Local variables character(len=10) :: grid @@ -1271,14 +1279,17 @@ end subroutine build_filename_g1 subroutine build_filename_g1_snodep(gridID, output_dir, yyyymmddhh, & filename) + ! Imports + use LVT_constantsMod, only: LVT_CONST_PATH_LEN + ! Defaults implicit none ! Arguments character(len=*), intent(in) :: gridID - character(len=255), intent(in) :: output_dir + character(len=LVT_CONST_PATH_LEN), intent(in) :: output_dir character(len=10), intent(in) :: yyyymmddhh - character(len=255), intent(out) :: filename + character(len=LVT_CONST_PATH_LEN), intent(out) :: filename ! Local variables character(len=10) :: area @@ -1873,6 +1884,7 @@ end subroutine write_grib1 subroutine write_netcdf_latlon(griddesco, nc_out, nr_out, go) ! Imports + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only: LVT_rc use LVT_logMod, only: LVT_logunit, LVT_verify, LVT_endrun use netcdf @@ -1887,7 +1899,7 @@ subroutine write_netcdf_latlon(griddesco, nc_out, nr_out, go) real, intent(in) :: go(nc_out*nr_out) ! Local variables - character(len=255) :: outfilename + character(len=LVT_CONST_PATH_LEN) :: outfilename integer :: shuffle, deflate, deflate_level integer :: iret, ncid integer :: dim_ids(3) @@ -2114,6 +2126,7 @@ end subroutine write_netcdf_latlon subroutine write_netcdf_ps(griddesco, nc_out, nr_out, go) ! Imports + use LVT_constantsMod, only: LVT_CONST_PATH_LEN use LVT_coreMod, only: LVT_rc use LVT_logMod, only: LVT_logunit, LVT_verify, LVT_endrun use netcdf @@ -2128,7 +2141,7 @@ subroutine write_netcdf_ps(griddesco, nc_out, nr_out, go) real, intent(in) :: go(nc_out*nr_out) ! Local variables - character(len=255) :: outfilename + character(len=LVT_CONST_PATH_LEN) :: outfilename integer :: shuffle, deflate, deflate_level integer :: iret, ncid integer :: dim_ids(2) diff --git a/lvt/utils/gnuplot/ADC/plotADC.F90 b/lvt/utils/gnuplot/ADC/plotADC.F90 index 1e801a9ae..3be6cb6ba 100644 --- a/lvt/utils/gnuplot/ADC/plotADC.F90 +++ b/lvt/utils/gnuplot/ADC/plotADC.F90 @@ -45,12 +45,14 @@ program plotADC implicit none + integer, parameter :: LVT_CONST_PATH_LEN = ESMF_MAXPATH_LEN + type(ESMF_Config) :: ts_config character*50 :: d1label, d2label integer :: d1style, d2style - character*100 :: tsconfigfile + character(len=LVT_CONST_PATH_LEN) :: tsconfigfile character*50 :: model_name - character*100 :: configfile,gfile,tsfile, statsodir + character(len=LVT_CONST_PATH_LEN) :: configfile,gfile,tsfile, statsodir character*3 :: expcode type(ESMF_Config) :: config_lvt integer :: lsm, rc diff --git a/lvt/utils/gnuplot/scatter/plotScatter.F90 b/lvt/utils/gnuplot/scatter/plotScatter.F90 index 8eec13ff9..2581ca5e7 100644 --- a/lvt/utils/gnuplot/scatter/plotScatter.F90 +++ b/lvt/utils/gnuplot/scatter/plotScatter.F90 @@ -42,13 +42,14 @@ program plotScatter !EOP implicit none - + + integer, parameter :: LVT_CONST_PATH_LEN = ESMF_MAXPATHLEN type(ESMF_Config) :: ts_config - character*100 :: tsconfigfile + character(len=LVT_CONST_PATH_LEN) :: tsconfigfile character*50 :: model_name character*50 :: d1label, d2label - character*100 :: configfile,gfile,tsfile, statsodir - character*100 :: rmsefile,biasfile,rcorrfile,mfile + character(len=LVT_CONST_PATH_LEN) :: configfile,gfile,tsfile, statsodir + character(len=LVT_CONST_PATH_LEN) :: rmsefile,biasfile,rcorrfile,mfile character*3 :: expcode real , allocatable :: mmaxv(:),mminv(:),mdy(:) real , allocatable :: omaxv(:),ominv(:),ody(:) diff --git a/lvt/utils/gnuplot/timeseries/plotTS.F90 b/lvt/utils/gnuplot/timeseries/plotTS.F90 index a659af6dc..c549ad785 100644 --- a/lvt/utils/gnuplot/timeseries/plotTS.F90 +++ b/lvt/utils/gnuplot/timeseries/plotTS.F90 @@ -45,13 +45,15 @@ program plotTS !EOP implicit none + integer, parameter :: LVT_CONST_PATH_LEN = ESMF_MAXPATHLEN + type(ESMF_Config) :: ts_config character*50 :: model_name character*50 :: d1label, d2label integer :: d1style, d2style - character*100 :: tsconfigfile - character*100 :: configfile,gfile,tsfile, statsodir - character*100 :: rmsefile,biasfile,rcorrfile,mfile + character(len=LVT_CONST_PATH_LEN) :: tsconfigfile + character(len=LVT_CONST_PATH_LEN) :: configfile,gfile,tsfile, statsodir + character(len=LVT_CONST_PATH_LEN) :: rmsefile,biasfile,rcorrfile,mfile character*3 :: expcode real , allocatable :: mmaxv(:),mminv(:),mdy(:),maxv(:),dy(:) real , allocatable :: omaxv(:),ominv(:),ody(:),minv(:) diff --git a/lvt/utils/input_proc/LVTpreproc.F90 b/lvt/utils/input_proc/LVTpreproc.F90 index e30e8c358..6d1f95697 100755 --- a/lvt/utils/input_proc/LVTpreproc.F90 +++ b/lvt/utils/input_proc/LVTpreproc.F90 @@ -27,7 +27,7 @@ program LVTpreproc !EOP implicit none - character*100 :: configfile + character(len=LVT_CONST_PATH_LEN) :: configfile integer :: i integer :: iargc diff --git a/lvt/utils/input_proc/preprocMod.F90 b/lvt/utils/input_proc/preprocMod.F90 index 8cf2dfd42..cb518985e 100644 --- a/lvt/utils/input_proc/preprocMod.F90 +++ b/lvt/utils/input_proc/preprocMod.F90 @@ -22,6 +22,8 @@ module preprocMod public :: paramProcWrite public :: LVT_verify + integer, parameter, public :: LVT_CONST_PATH_LEN = ESMF_MAXPATHLEN + type lvtrcdec ! -- Tile parameters: @@ -71,8 +73,8 @@ module preprocMod character*50, allocatable :: mask_type(:) ! -- Parameter filepath names: - character*140, allocatable :: mfile(:) - character*140, allocatable :: vfile(:) + character(len=LVT_CONST_PATH_LEN), allocatable :: mfile(:) + character(len=LVT_CONST_PATH_LEN), allocatable :: vfile(:) integer, allocatable :: vfile_form(:) integer :: bareclass @@ -113,7 +115,7 @@ module preprocMod !- LSM-specific parameters: type, public :: lsmparam_type_dec - character*100 :: param_filename + character(len=LVT_CONST_PATH_LEN) :: param_filename type(LVT_paramEntry) :: landmask type(LVT_paramEntry) :: landcover diff --git a/lvt/utils/ncl/ADC/plotADC.F90 b/lvt/utils/ncl/ADC/plotADC.F90 index 9602357ed..6de2aedc1 100644 --- a/lvt/utils/ncl/ADC/plotADC.F90 +++ b/lvt/utils/ncl/ADC/plotADC.F90 @@ -44,12 +44,13 @@ program plotADC implicit none + integer, parameter :: LVT_CONST_PATH_LEN = ESMF_MAXPATHLEN type(ESMF_Config) :: ts_config character*50 :: d1label, d2label integer :: d1style, d2style - character*100 :: tsconfigfile,ofile + character(len=LVT_CONST_PATH_LEN) :: tsconfigfile,ofile character*50 :: model_name - character*100 :: configfile,gfile,tsfile, statsodir + character(len=LVT_CONST_PATH_LEN) :: configfile,gfile,tsfile, statsodir character*3 :: expcode type(ESMF_Config) :: config_lvt integer :: rc diff --git a/lvt/utils/ncl/scatter/plotScatter.F90 b/lvt/utils/ncl/scatter/plotScatter.F90 index 58d6ba741..a21542b76 100644 --- a/lvt/utils/ncl/scatter/plotScatter.F90 +++ b/lvt/utils/ncl/scatter/plotScatter.F90 @@ -42,14 +42,15 @@ program plotScatter !EOP implicit none - + + integer, parameter :: LVT_CONST_PATH_LEN = ESMF_MAXPATHLEN type(ESMF_Config) :: ts_config - character*100 :: tsconfigfile - character*100 :: ofile + character(len=LVT_CONST_PATH_LEN) :: tsconfigfile + character(len=LVT_CONST_PATH_LEN) :: ofile character*50 :: model_name character*50 :: d1label, d2label - character*100 :: configfile,gfile,tsfile, statsodir - character*100 :: rmsefile,biasfile,rcorrfile,mfile + character(len=LVT_CONST_PATH_LEN) :: configfile,gfile,tsfile, statsodir + character(len=LVT_CONST_PATH_LEN) :: rmsefile,biasfile,rcorrfile,mfile character*3 :: expcode type(ESMF_Config) :: config_lvt integer :: rc diff --git a/lvt/utils/ncl/timeseries/plotTS.F90 b/lvt/utils/ncl/timeseries/plotTS.F90 index ca0178695..37778d66e 100644 --- a/lvt/utils/ncl/timeseries/plotTS.F90 +++ b/lvt/utils/ncl/timeseries/plotTS.F90 @@ -43,14 +43,15 @@ program plotTS !EOP implicit none + integer, parameter :: LVT_CONST_PATH_LEN = ESMF_MAXPATHLEN type(ESMF_Config) :: ts_config character*50 :: model_name character*50 :: d1label, d2label integer :: d1style, d2style - character*100 :: tsconfigfile,ofile - character*100 :: configfile,gfile,tsfile, statsodir - character*100 :: rmsefile,biasfile,rcorrfile,mfile - character*100 :: acorrfile, armsefile + character(len=LVT_CONST_PATH_LEN) :: tsconfigfile,ofile + character(len=LVT_CONST_PATH_LEN) :: configfile,gfile,tsfile, statsodir + character(len=LVT_CONST_PATH_LEN) :: rmsefile,biasfile,rcorrfile,mfile + character(len=LVT_CONST_PATH_LEN) :: acorrfile, armsefile character*3 :: expcode type(ESMF_Config) :: config_lvt integer :: rc