Skip to content

Commit

Permalink
Code modifications to use LVT_CONST_PATH_LEN.
Browse files Browse the repository at this point in the history
  • Loading branch information
emkemp committed Jan 10, 2025
1 parent f42d254 commit 1a5b41f
Show file tree
Hide file tree
Showing 21 changed files with 181 additions and 137 deletions.
9 changes: 5 additions & 4 deletions lvt/core/LVT_DAMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ end subroutine LVT_DAInit
subroutine LVT_readLISDAdata(pass)
!
! !USES:


use LVT_constantsMod, only: LVT_CONST_PATH_LEN
implicit none
!
! !INPUT PARAMETERS:
Expand All @@ -200,7 +201,7 @@ subroutine LVT_readLISDAdata(pass)
!
!EOP
#if 0
character*100 :: innovfile, gainfile, spreadfile
character(len=LVT_CONST_PATH_LEN) :: innovfile, gainfile, spreadfile
logical :: file_exists
integer :: ftn
integer :: t
Expand Down Expand Up @@ -580,7 +581,7 @@ end subroutine logSpreadEntry
subroutine LVT_computeDAstats(pass)
!
! !USES:

use LVT_constantsMod, only: LVT_CONST_PATH_LEN
implicit none
!
! !INPUT PARAMETERS:
Expand All @@ -601,7 +602,7 @@ subroutine LVT_computeDAstats(pass)
integer :: c,r,v,t
character(len=12) :: cdate
character(len=4) :: cdate1
character*100 :: fname1, fname2
character(len=LVT_CONST_PATH_LEN) :: fname1, fname2
integer :: ftn
#if 0
integer :: dimID(2), nobsId, ninnov_meanId, ninnov_varId
Expand Down
20 changes: 14 additions & 6 deletions lvt/core/LVT_DataStreamsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -4653,10 +4658,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
Expand Down Expand Up @@ -4762,11 +4769,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
Expand Down
8 changes: 4 additions & 4 deletions lvt/core/LVT_LISoutputHandlerMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions lvt/core/LVT_LISpostMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
47 changes: 24 additions & 23 deletions lvt/core/LVT_PRIV_rcMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
module LVT_PRIV_rcMod
!
! !USES:
!
use LVT_constantsMod, only: LVT_CONST_PATH_LEN
!
! !INPUT PARAMETERS:
!
! !OUTPUT PARAMETERS:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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(:)
Expand All @@ -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
Expand All @@ -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(:)
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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(:)
Expand Down
Loading

0 comments on commit 1a5b41f

Please sign in to comment.