Skip to content

Commit

Permalink
revert ascci num lines changes and change time_interp_external2 lengt…
Browse files Browse the repository at this point in the history
…h to file instead of path
  • Loading branch information
rem1776 authored and rem1776 committed Aug 5, 2024
1 parent 612d59d commit f9cac03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions mpp/include/mpp_util.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,8 @@ end function rarray_to_char
integer, dimension(2) :: get_ascii_file_num_lines_and_length !< number of lines (1) and
!! max line length (2)
integer :: num_lines, max_length
character(len=FMS_FILE_LEN) :: str_tmp
integer, parameter :: LENGTH=1024
character(len=LENGTH) :: str_tmp
character(len=5) :: text
integer :: status, f_unit, from_pe
logical :: file_exist
Expand Down Expand Up @@ -1388,10 +1389,10 @@ end function rarray_to_char
call mpp_error(FATAL, 'get_ascii_file_num_lines: Error reading line '//trim(text)// &
' in file '//trim(FILENAME)//'.')
end if
if ( len_trim(str_tmp) == FMS_FILE_LEN ) then
write(UNIT=text, FMT='(I5)') FMS_FILE_LEN
if ( len_trim(str_tmp) == LENGTH) then
write(UNIT=text, FMT='(I5)') LENGTH
call mpp_error(FATAL, 'get_ascii_file_num_lines: Length of output string ('//trim(text)//&
& ' is too small. Increase the FMS_MAX_FILE_LEN cpp value.')
& ' is too small. Increase the LENGTH value.')
end if
if (len_trim(str_tmp) > max_length) max_length = len_trim(str_tmp)
num_lines = num_lines + 1
Expand Down
4 changes: 2 additions & 2 deletions time_interp/time_interp_external2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module time_interp_external2_mod
use time_interp_mod, only : time_interp, time_interp_init
use axis_utils2_mod, only : get_axis_cart, get_axis_modulo, get_axis_modulo_times
use fms_mod, only : lowercase, check_nml_error
use platform_mod, only: r8_kind, FMS_PATH_LEN
use platform_mod, only: r8_kind, FMS_FILE_LEN
use horiz_interp_mod, only : horiz_interp, horiz_interp_type
use fms2_io_mod, only : Valid_t, FmsNetcdfDomainFile_t, open_file, get_unlimited_dimension_name, &
variable_att_exists, FmsNetcdfFile_t, &
Expand Down Expand Up @@ -126,7 +126,7 @@ module time_interp_external2_mod
!> Holds filename and file object
!> @ingroup time_interp_external2_mod
type, private :: filetype
character(len=FMS_PATH_LEN) :: filename = ''
character(len=FMS_FILE_LEN) :: filename = ''
type(FmsNetcdfFile_t), pointer :: fileobj => NULL()
end type filetype

Expand Down

0 comments on commit f9cac03

Please sign in to comment.