Skip to content

Commit b5a043e

Browse files
committed
Move all input filenames to fname_len instead of shr_kind_cl.
1 parent 1e488d8 commit b5a043e

14 files changed

+57
-54
lines changed

src/cpl/nuopc/lnd_comp_nuopc.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module lnd_comp_nuopc
3838
use clm_varctl , only : inst_index, inst_suffix, inst_name
3939
use clm_varctl , only : single_column, clm_varctl_set, iulog
4040
use clm_varctl , only : nsrStartup, nsrContinue, nsrBranch
41+
use clm_varctl , only : FL => fname_len
4142
use clm_time_manager , only : set_timemgr_init, advance_timestep
4243
use clm_time_manager , only : update_rad_dtime
4344
use clm_time_manager , only : get_nstep, get_step_size
@@ -383,7 +384,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
383384
integer :: shrlogunit ! original log unit
384385
integer :: n, ni, nj ! Indices
385386
character(len=CL) :: cvalue ! config data
386-
character(len=CL) :: meshfile_mask ! filename of mesh file with land mask
387+
character(len=FL) :: meshfile_mask ! filename of mesh file with land mask
387388
character(len=CL) :: ctitle ! case description title
388389
character(len=CL) :: caseid ! case identifier name
389390
real(r8) :: scol_lat ! single-column latitude
@@ -392,7 +393,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
392393
real(r8) :: scol_frac ! single-column frac
393394
integer :: scol_mask ! single-column mask
394395
real(r8) :: scol_spval ! single-column special value to indicate it isn't set
395-
character(len=CL) :: single_column_lnd_domainfile ! domain filename to use for single-column mode (i.e. SCAM)
396+
character(len=FL) :: single_column_lnd_domainfile ! domain filename to use for single-column mode (i.e. SCAM)
396397
type(bounds_type) :: bounds ! bounds
397398
type(ESMF_Field) :: lfield ! Land field read in
398399
character(CL) ,pointer :: lfieldnamelist(:) => null() ! Land field namelist item sent with land field

src/cpl/nuopc/lnd_comp_shr.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ module lnd_comp_shr
33
! Model mesh info is here in order to be leveraged by CDEPS in line calls
44

55
use ESMF , only : ESMF_Clock, ESMF_Mesh
6-
use shr_kind_mod, only : r8 => shr_kind_r8, cl=>shr_kind_cl
6+
use shr_kind_mod, only : r8 => shr_kind_r8
7+
use clm_varctl , only : fl => fname_len
78

89
implicit none
910
public
1011

1112
type(ESMF_Clock) :: model_clock ! model clock
1213
type(ESMF_Mesh) :: mesh ! model_mesh
13-
character(len=cl) :: model_meshfile ! model mesh file
14+
character(len=fl) :: model_meshfile ! model mesh file
1415

1516
end module lnd_comp_shr

src/cpl/share_esmf/ExcessIceStreamType.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module ExcessIceStreamType
2121
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_cl
2222
use shr_log_mod , only : errMsg => shr_log_errMsg
2323
use spmdMod , only : mpicom, masterproc
24-
use clm_varctl , only : iulog
24+
use clm_varctl , only : iulog, FL => fname_len
2525
use abortutils , only : endrun
2626
use decompMod , only : bounds_type
2727

@@ -45,8 +45,8 @@ module ExcessIceStreamType
4545
end type excessicestream_type
4646
! ! PRIVATE DATA:
4747
type, private :: streamcontrol_type
48-
character(len=CL) :: stream_fldFileName_exice ! data Filename
49-
character(len=CL) :: stream_meshfile_exice ! mesh Filename
48+
character(len=FL) :: stream_fldFileName_exice ! data Filename
49+
character(len=FL) :: stream_meshfile_exice ! mesh Filename
5050
character(len=CL) :: stream_mapalgo_exice ! map algo
5151
contains
5252
procedure, private :: ReadNML ! Read in namelist
@@ -264,8 +264,8 @@ subroutine ReadNML(this, bounds, NLFilename)
264264
integer :: nu_nml ! unit for namelist file
265265
integer :: nml_error ! namelist i/o error flag
266266
logical :: use_excess_ice_streams = .false. ! logical to turn on use of excess ice streams
267-
character(len=CL) :: stream_fldFileName_exice = ' '
268-
character(len=CL) :: stream_meshfile_exice = ' '
267+
character(len=FL) :: stream_fldFileName_exice = ' '
268+
character(len=FL) :: stream_meshfile_exice = ' '
269269
character(len=CL) :: stream_mapalgo_exice = 'bilinear'
270270
character(len=*), parameter :: namelist_name = 'exice_streams' ! MUST agree with name in namelist and read
271271
character(len=*), parameter :: subName = "('exice_streams::ReadNML')"

src/cpl/share_esmf/FireDataBaseType.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module FireDataBaseType
1111
use dshr_strdata_mod , only : shr_strdata_type
1212
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_CL
1313
use shr_log_mod , only : errMsg => shr_log_errMsg
14-
use clm_varctl , only : iulog
14+
use clm_varctl , only : iulog, FL => fname_len
1515
use spmdMod , only : masterproc, mpicom, iam
1616
use abortutils , only : endrun
1717
use decompMod , only : bounds_type
@@ -171,8 +171,8 @@ subroutine hdm_init( this, bounds, NLFilename )
171171
integer :: stream_year_first_popdens ! first year in pop. dens. stream to use
172172
integer :: stream_year_last_popdens ! last year in pop. dens. stream to use
173173
integer :: model_year_align_popdens ! align stream_year_first_hdm with
174-
character(len=CL) :: stream_fldFileName_popdens ! population density streams filename
175-
character(len=CL) :: stream_meshfile_popdens ! population density streams filename
174+
character(len=FL) :: stream_fldFileName_popdens ! population density streams filename
175+
character(len=FL) :: stream_meshfile_popdens ! population density streams filename
176176
character(len=CL) :: popdensmapalgo ! mapping alogrithm for population density
177177
character(len=CL) :: popdens_tintalgo ! time interpolation alogrithm for population density
178178
integer :: rc
@@ -338,8 +338,8 @@ subroutine lnfm_init( this, bounds, NLFilename )
338338
integer :: stream_year_first_lightng ! first year in Lightning stream to use
339339
integer :: stream_year_last_lightng ! last year in Lightning stream to use
340340
integer :: model_year_align_lightng ! align stream_year_first_lnfm with
341-
character(len=CL) :: stream_fldFileName_lightng ! lightning stream filename to read
342-
character(len=CL) :: stream_meshfile_lightng ! lightning stream filename to read
341+
character(len=FL) :: stream_fldFileName_lightng ! lightning stream filename to read
342+
character(len=FL) :: stream_meshfile_lightng ! lightning stream filename to read
343343
character(len=CL) :: lightng_tintalgo ! stream -> model time interpolation alogrithm
344344
character(len=CL) :: lightngmapalgo ! stream-> model mapping alogrithm
345345
integer :: rc

src/cpl/share_esmf/PrigentRoughnessStreamType.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module PrigentRoughnessStreamType
1111
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_cl
1212
use shr_log_mod , only : errMsg => shr_log_errMsg
1313
use spmdMod , only : mpicom, masterproc
14-
use clm_varctl , only : iulog
14+
use clm_varctl , only : iulog, FL => fname_len
1515
use abortutils , only : endrun
1616
use decompMod , only : bounds_type
1717

@@ -36,8 +36,8 @@ module PrigentRoughnessStreamType
3636

3737
! ! PRIVATE DATA:
3838
type, private :: streamcontrol_type
39-
character(len=CL) :: stream_fldFileName_prigentroughness ! data Filename
40-
character(len=CL) :: stream_meshfile_prigentroughness ! mesh Filename
39+
character(len=FL) :: stream_fldFileName_prigentroughness ! data Filename
40+
character(len=FL) :: stream_meshfile_prigentroughness ! mesh Filename
4141
character(len=CL) :: prigentroughnessmapalgo ! map algo
4242
contains
4343
procedure, private :: ReadNML ! Read in control namelist
@@ -280,8 +280,8 @@ subroutine ReadNML(this, bounds, NLFilename)
280280
integer :: nu_nml ! unit for namelist file
281281
integer :: nml_error ! namelist i/o error flag
282282
logical :: use_prigent_roughness = .true.
283-
character(len=CL) :: stream_fldFileName_prigentroughness = ' '
284-
character(len=CL) :: stream_meshfile_prigentroughness = ' '
283+
character(len=FL) :: stream_fldFileName_prigentroughness = ' '
284+
character(len=FL) :: stream_meshfile_prigentroughness = ' '
285285
character(len=CL) :: prigentroughnessmapalgo = 'bilinear'
286286
character(len=*), parameter :: namelist_name = 'prigentroughness' ! MUST agree with group name in namelist definition to read.
287287
character(len=*), parameter :: subName = "('prigentroughness::ReadNML')"

src/cpl/share_esmf/SoilMoistureStreamMod.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module SoilMoistureStreamMod
1717
use shr_mpi_mod , only : shr_mpi_bcast
1818
use decompMod , only : bounds_type, subgrid_level_column
1919
use abortutils , only : endrun
20-
use clm_varctl , only : iulog, use_soil_moisture_streams
20+
use clm_varctl , only : iulog, use_soil_moisture_streams, FL => fname_len
2121
use controlMod , only : NLFilename
2222
use LandunitType , only : lun
2323
use ColumnType , only : col
@@ -78,7 +78,7 @@ subroutine PrescribedSoilMoistureInit(bounds)
7878
integer :: nu_nml ! unit for namelist file
7979
integer :: nml_error ! namelist i/o error flag
8080
integer :: soilm_offset ! Offset in time for dataset (sec)
81-
character(len=CL) :: stream_fldfilename_soilm ! ustar stream filename to read
81+
character(len=FL) :: stream_fldfilename_soilm ! ustar stream filename to read
8282
character(len=CL) :: soilm_tintalgo = 'linear' ! Time interpolation alogrithm
8383
character(len=CL) :: stream_mapalgo = 'bilinear'
8484
real(r8) :: stream_dtlimit = 15._r8

src/cpl/share_esmf/UrbanTimeVarType.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module UrbanTimeVarType
1111
use shr_log_mod , only : errMsg => shr_log_errMsg
1212
use abortutils , only : endrun
1313
use decompMod , only : bounds_type, subgrid_level_landunit
14-
use clm_varctl , only : iulog
14+
use clm_varctl , only : iulog, FL => fname_len
1515
use landunit_varcon , only : isturb_MIN, isturb_MAX
1616
use clm_varcon , only : spval
1717
use LandunitType , only : lun
@@ -126,8 +126,8 @@ subroutine urbantv_init(this, bounds, NLFilename)
126126
integer :: model_year_align_urbantv ! align stream_year_first_urbantv with this model year
127127
integer :: nu_nml ! unit for namelist file
128128
integer :: nml_error ! namelist i/o error flag
129-
character(len=CL) :: stream_fldFileName_urbantv ! urban tv streams filename
130-
character(len=CL) :: stream_meshfile_urbantv ! urban tv streams filename
129+
character(len=FL) :: stream_fldFileName_urbantv ! urban tv streams filename
130+
character(len=FL) :: stream_meshfile_urbantv ! urban tv streams filename
131131
character(len=CL) :: urbantvmapalgo = 'nn' ! mapping alogrithm for urban ac
132132
character(len=CL) :: urbantv_tintalgo = 'linear' ! time interpolation alogrithm
133133
integer :: rc ! error code

src/cpl/share_esmf/ZenderSoilErodStreamType.F90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module ZenderSoilErodStreamType
1818
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_cl
1919
use shr_log_mod , only : errMsg => shr_log_errMsg
2020
use spmdMod , only : mpicom, masterproc
21-
use clm_varctl , only : iulog
21+
use clm_varctl , only : iulog, FL => fname_len
2222
use abortutils , only : endrun
2323
use decompMod , only : bounds_type
2424

@@ -42,8 +42,8 @@ module ZenderSoilErodStreamType
4242

4343
! ! PRIVATE DATA:
4444
type, private :: streamcontrol_type
45-
character(len=CL) :: stream_fldFileName_zendersoilerod ! data Filename
46-
character(len=CL) :: stream_meshfile_zendersoilerod ! mesh Filename
45+
character(len=FL) :: stream_fldFileName_zendersoilerod ! data Filename
46+
character(len=FL) :: stream_meshfile_zendersoilerod ! mesh Filename
4747
character(len=CL) :: zendersoilerod_mapalgo ! map algo
4848
logical :: namelist_set = .false. ! if namelist was set yet
4949
contains
@@ -300,10 +300,10 @@ subroutine ReadNML(this, bounds, NLFilename)
300300
integer :: i ! Indices
301301
integer :: nu_nml ! unit for namelist file
302302
integer :: nml_error ! namelist i/o error flag
303-
character(len=CL) :: stream_fldFileName_zendersoilerod = ' '
304-
character(len=CL) :: stream_meshfile_zendersoilerod = ' '
303+
character(len=FL) :: stream_fldFileName_zendersoilerod = ' '
304+
character(len=FL) :: stream_meshfile_zendersoilerod = ' '
305305
character(len=CL) :: zendersoilerod_mapalgo = ' '
306-
character(len=CL) :: tmp_file_array(3)
306+
character(len=FL) :: tmp_file_array(3)
307307
character(len=*), parameter :: namelist_name = 'zendersoilerod' ! MUST agree with group name in namelist definition to read.
308308
character(len=*), parameter :: subName = "('zendersoilerod::ReadNML')"
309309
!-----------------------------------------------------------------------

src/cpl/share_esmf/ch4FInundatedStreamType.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module ch4FInundatedStreamType
1212
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_cl
1313
use shr_log_mod , only : errMsg => shr_log_errMsg
1414
use spmdMod , only : mpicom, masterproc
15-
use clm_varctl , only : iulog
15+
use clm_varctl , only : iulog, FL => fname_len
1616
use abortutils , only : endrun
1717
use decompMod , only : bounds_type
1818
use ch4varcon , only : finundation_mtd
@@ -41,8 +41,8 @@ module ch4FInundatedStreamType
4141

4242
! ! PRIVATE DATA:
4343
type, private :: streamcontrol_type
44-
character(len=CL) :: stream_fldFileName_ch4finundated ! data Filename
45-
character(len=CL) :: stream_meshfile_ch4finundated ! mesh Filename
44+
character(len=FL) :: stream_fldFileName_ch4finundated ! data Filename
45+
character(len=FL) :: stream_meshfile_ch4finundated ! mesh Filename
4646
character(len=CL) :: ch4finundatedmapalgo ! map algo
4747
contains
4848
procedure, private :: ReadNML ! Read in namelist
@@ -338,8 +338,8 @@ subroutine ReadNML(this, bounds, NLFilename)
338338
! local variables
339339
integer :: nu_nml ! unit for namelist file
340340
integer :: nml_error ! namelist i/o error flag
341-
character(len=CL) :: stream_fldFileName_ch4finundated = ' '
342-
character(len=CL) :: stream_meshfile_ch4finundated = ' '
341+
character(len=FL) :: stream_fldFileName_ch4finundated = ' '
342+
character(len=FL) :: stream_meshfile_ch4finundated = ' '
343343
character(len=CL) :: ch4finundatedmapalgo = 'bilinear'
344344
character(len=*), parameter :: namelist_name = 'ch4finundated' ! MUST agree with name in namelist and read
345345
character(len=*), parameter :: subName = "('ch4finundated::ReadNML')"

src/cpl/share_esmf/cropcalStreamMod.F90

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module cropcalStreamMod
1414
use decompMod , only : bounds_type
1515
use abortutils , only : endrun
1616
use clm_varctl , only : iulog
17+
use clm_varctl , only : FL => fname_len
1718
use clm_varctl , only : use_crop
1819
use clm_varctl , only : use_cropcal_rx_swindows, use_cropcal_rx_cultivar_gdds, use_cropcal_streams
1920
use clm_varctl , only : adapt_cropcal_rx_cultivar_gdds
@@ -47,16 +48,16 @@ module cropcalStreamMod
4748
character(len=CS), allocatable :: stream_varnames_gdd20_season_enddate(:) ! start uses stream_varnames_sdate
4849
integer :: ncft ! Number of crop functional types (excl. generic crops)
4950
logical :: allow_invalid_swindow_inputs ! Fall back on paramfile sowing windows in cases of invalid values in stream_fldFileName_swindow_start and _end?
50-
character(len=CL) :: stream_fldFileName_swindow_start ! sowing window start stream filename to read
51-
character(len=CL) :: stream_fldFileName_swindow_end ! sowing window end stream filename to read
52-
character(len=CL) :: stream_fldFileName_cultivar_gdds ! cultivar growing degree-days stream filename to read
53-
character(len=CL) :: stream_fldFileName_gdd20_baseline ! GDD20 baseline stream filename to read
51+
character(len=FL) :: stream_fldFileName_swindow_start ! sowing window start stream filename to read
52+
character(len=FL) :: stream_fldFileName_swindow_end ! sowing window end stream filename to read
53+
character(len=FL) :: stream_fldFileName_cultivar_gdds ! cultivar growing degree-days stream filename to read
54+
character(len=FL) :: stream_fldFileName_gdd20_baseline ! GDD20 baseline stream filename to read
5455
logical :: cropcals_rx ! Used only for setting input files in namelist; does nothing in code, but needs to be here so namelist read doesn't crash
5556
logical :: cropcals_rx_adapt ! Used only for setting input files in namelist; does nothing in code, but needs to be here so namelist read doesn't crash
5657
logical :: stream_gdd20_seasons ! Read start and end dates for gdd20 seasons from streams instead of using hemisphere-specific values
5758
logical :: allow_invalid_gdd20_season_inputs ! Fall back on hemisphere "warm periods" in cases of invalid values in stream_fldFileName_gdd20_season_start and _end?
58-
character(len=CL) :: stream_fldFileName_gdd20_season_start ! Stream filename to read for start of gdd20 season
59-
character(len=CL) :: stream_fldFileName_gdd20_season_end ! Stream filename to read for end of gdd20 season
59+
character(len=FL) :: stream_fldFileName_gdd20_season_start ! Stream filename to read for start of gdd20 season
60+
character(len=FL) :: stream_fldFileName_gdd20_season_end ! Stream filename to read for end of gdd20 season
6061

6162
character(len=*), parameter :: sourcefile = &
6263
__FILE__
@@ -89,7 +90,7 @@ subroutine cropcal_init(bounds)
8990
integer :: model_year_align_cropcal_cultivar_gdds ! alignment year for cultivar gdd stream
9091
integer :: nu_nml ! unit for namelist file
9192
integer :: nml_error ! namelist i/o error flag
92-
character(len=CL) :: stream_meshfile_cropcal ! crop calendar stream meshfile
93+
character(len=FL) :: stream_meshfile_cropcal ! crop calendar stream meshfile
9394
character(len=CL) :: cropcal_mapalgo = 'nn' ! Mapping alogrithm
9495
character(len=CL) :: cropcal_tintalgo = 'nearest' ! Time interpolation alogrithm
9596
integer :: cropcal_offset = 0 ! Offset in time for dataset (sec)

0 commit comments

Comments
 (0)