Skip to content

Commit

Permalink
More code changes to use LVT_CONST_PATH_LEN.
Browse files Browse the repository at this point in the history
  • Loading branch information
emkemp committed Jan 17, 2025
1 parent 3fa4b39 commit 1317dbb
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 38 deletions.
6 changes: 4 additions & 2 deletions lvt/datastreams/ANSA_SWE/readANSASWEobs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -221,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:
Expand Down Expand Up @@ -251,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
!
Expand Down
2 changes: 1 addition & 1 deletion lvt/datastreams/LSWG_Tb/LSWG_Tb_obsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ subroutine LSWG_Tb_obsinit(i)
integer :: ts
integer :: siteid
character(len=LVT_CONST_PATH_LEN) :: coordfile
character*100 :: mdata
character(len=LVT_CONST_PATH_LEN) :: mdata

#if 0
call ESMF_ConfigGetAttribute(LVT_config, lswg_Tbobs%filename, &
Expand Down
3 changes: 2 additions & 1 deletion lvt/interp/breakpt_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 24 additions & 11 deletions lvt/runmodes/USAFSIpost/LVT_USAFSIpostMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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(:,:)
Expand Down Expand Up @@ -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

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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.' &
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions lvt/utils/gnuplot/ADC/plotADC.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions lvt/utils/gnuplot/scatter/plotScatter.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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(:)
Expand Down
8 changes: 5 additions & 3 deletions lvt/utils/gnuplot/timeseries/plotTS.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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(:)
Expand Down
2 changes: 1 addition & 1 deletion lvt/utils/input_proc/LVTpreproc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ program LVTpreproc
!EOP
implicit none

character*100 :: configfile
character(len=LVT_CONST_PATH_LEN) :: configfile
integer :: i
integer :: iargc

Expand Down
6 changes: 4 additions & 2 deletions lvt/utils/input_proc/preprocMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ module preprocMod
public :: paramProcWrite
public :: LVT_verify

integer, parameter, public :: LVT_CONST_PATH_LEN = ESMF_MAXPATHLEN

type lvtrcdec

! -- Tile parameters:
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions lvt/utils/ncl/ADC/plotADC.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions lvt/utils/ncl/scatter/plotScatter.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions lvt/utils/ncl/timeseries/plotTS.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1317dbb

Please sign in to comment.