Skip to content

Commit 2f4e853

Browse files
committed
remove trailing whitespace from all files and tabs from Fortran files
1 parent bc17151 commit 2f4e853

34 files changed

+165
-165
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sequential patch number (starting from `01`).
2020

2121
### Changed
2222
- The `diag_manager` IO is handled by fms2_io instead of mpp_io. Default behavior assumes that the mpp_io namelist variable is set to *cf_compliant = .true.*
23-
- The user must specify the diagnostic attributes that they want to write to the output files. Example: If there is no *units* attribute, then the variable metadata will not include *units*, and it will not automatically add *units = “none”*.
23+
- The user must specify the diagnostic attributes that they want to write to the output files. Example: If there is no *units* attribute, then the variable metadata will not include *units*, and it will not automatically add *units = “none”*.
2424
- Calls to `register_diag_axis` for an X or Y axis that is shifted from the *CENTER* position need to include the optional argument *domain_position* and should be equal to *EAST* or *NORTH* based on the position relative to the domain. EAST and *NORTH* are exposed through `diag_manager_mod`.
2525
- Changed the handling of *average_T* and *time_bnds* variables so that they are set to values that are sent in and are not manipulated as was the case in mpp_io.
2626
- `interpolator`, `xgrid`, `data_override`, and `amip_interp` now call `fms2_io` routines

amip_interp/amip_interp.F90

+3-3
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,8 @@ subroutine get_amip_sst (Time, Interp, sst, err_msg, lon_model, lat_model)
577577

578578
if(.not. open_file(fileobj, trim(ncfilename), 'read')) &
579579
call error_mesg ('get_amip_sst', 'Error in opening file '//trim(ncfilename), FATAL)
580-
581-
call get_dimension_size(fileobj, 'TIME', nrecords)
580+
581+
call get_dimension_size(fileobj, 'TIME', nrecords)
582582
if (nrecords < 1) call mpp_error('amip_interp_mod', &
583583
'Invalid number of SST records in daily SST data file: '//trim(ncfilename), FATAL)
584584
allocate(timeval(nrecords), ryr(nrecords), rmo(nrecords), rdy(nrecords))
@@ -1434,7 +1434,7 @@ subroutine read_record (type, Date, Adate, dat)
14341434
Curr_date = Adate
14351435
if (verbose > 2 .and. mpp_pe() == 0) &
14361436
print *, '....... checking ', Adate
1437-
if (Date == Adate) ierr = 0
1437+
if (Date == Adate) ierr = 0
14381438
if (yr == 0 .and. mo == Date%month) ierr = 0
14391439
if (ierr == 0) exit
14401440
enddo

axis_utils/axis_utils2.F90

+21-21
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module axis_utils2_mod
3232
!<DESCRIPTION>
3333
!
3434
! subroutine get_axis_cart(axis,cart) : Returns X,Y,Z or T cartesian attribute
35-
! subroutine get_axis_bounds(axis,axis_bound,axes) : Return axis_bound either from an array of
35+
! subroutine get_axis_bounds(axis,axis_bound,axes) : Return axis_bound either from an array of
3636
! available axes, or defined based on axis mid-points
3737
! function get_axis_modulo : Returns true if axis has the modulo attribute
3838
! function get_axis_fold : Returns is axis is folded at a boundary (non-standard meta-data)
@@ -59,7 +59,7 @@ module axis_utils2_mod
5959
integer, parameter :: maxatts = 100
6060
real, parameter :: epsln= 1.e-10
6161
real, parameter :: fp5 = 0.5, f360 = 360.0
62-
62+
6363
! Include variable "version" to be written to log file.
6464
#include<file_version.h>
6565

@@ -340,13 +340,13 @@ subroutine tranlon(lon, lon_start, istrt)
340340
istrt=0
341341
do i=1,len-1
342342
if (lon(i+1) < lon(i)) then
343-
istrt=i+1
343+
istrt=i+1
344344
exit
345345
endif
346346
enddo
347347

348348
if (istrt>1) then ! grid is not monotonic
349-
if (abs(lon(len)-lon(1)) < epsln) then
349+
if (abs(lon(len)-lon(1)) < epsln) then
350350
tmp = cshift(lon(1:len-1),istrt-1)
351351
lon(1:len-1) = tmp
352352
lon(len) = lon(1)
@@ -405,15 +405,15 @@ function frac_index (value, array)
405405
real :: value, frac_index
406406
real, dimension(:) :: array
407407
logical keep_going
408-
408+
409409
ia = size(array(:))
410410

411411
do i=2,ia
412412
if (array(i) < array(i-1)) then
413-
unit = stdout()
413+
unit = stdout()
414414
write (unit,*) '=> Error: "frac_index" array must be monotonically increasing when searching for nearest value to ',&
415415
value
416-
write (unit,*) ' array(i) < array(i-1) for i=',i
416+
write (unit,*) ' array(i) < array(i-1) for i=',i
417417
write (unit,*) ' array(i) for i=1..ia follows:'
418418
do ii=1,ia
419419
write (unit,*) 'i=',ii, ' array(i)=',array(ii)
@@ -431,7 +431,7 @@ function frac_index (value, array)
431431
do while (i <= ia .and. keep_going)
432432
i = i+1
433433
if (value <= array(i)) then
434-
frac_index = float(i-1) + (value-array(i-1))/(array(i)-array(i-1))
434+
frac_index = float(i-1) + (value-array(i-1))/(array(i)-array(i-1))
435435
keep_going = .false.
436436
endif
437437
enddo
@@ -489,7 +489,7 @@ function nearest_index (value, array)
489489
unit = stdout()
490490
write (unit,*) '=> Error: "nearest_index" array must be monotonically increasing &
491491
&when searching for nearest value to ',value
492-
write (unit,*) ' array(i) < array(i-1) for i=',i
492+
write (unit,*) ' array(i) < array(i-1) for i=',i
493493
write (unit,*) ' array(i) for i=1..ia follows:'
494494
do ii=1,ia
495495
write (unit,*) 'i=',ii, ' array(i)=',array(ii)
@@ -516,7 +516,7 @@ end function nearest_index
516516

517517
!#############################################################################
518518

519-
subroutine interp_1d_linear(grid1,grid2,data1,data2)
519+
subroutine interp_1d_linear(grid1,grid2,data1,data2)
520520

521521
real, dimension(:), intent(in) :: grid1, data1, grid2
522522
real, dimension(:), intent(inout) :: data2
@@ -550,8 +550,8 @@ subroutine interp_1d_linear(grid1,grid2,data1,data2)
550550
data2(i) = data1(n)
551551
else
552552
w = (grid2(i)-grid1(n-1))/(grid1(n)-grid1(n-1))
553-
data2(i) = (1.-w)*data1(n-1) + w*data1(n)
554-
endif
553+
data2(i) = (1.-w)*data1(n-1) + w*data1(n)
554+
endif
555555
endif
556556
enddo
557557

@@ -561,7 +561,7 @@ subroutine interp_1d_linear(grid1,grid2,data1,data2)
561561
end subroutine interp_1d_linear
562562

563563
!###################################################################
564-
subroutine interp_1d_cubic_spline(grid1, grid2, data1, data2, yp1, ypn)
564+
subroutine interp_1d_cubic_spline(grid1, grid2, data1, data2, yp1, ypn)
565565

566566
real, dimension(:), intent(in) :: grid1, grid2, data1
567567
real, dimension(:), intent(inout) :: data2
@@ -572,7 +572,7 @@ subroutine interp_1d_cubic_spline(grid1, grid2, data1, data2, yp1, ypn)
572572
integer :: n, m, i, k, klo, khi
573573

574574
n = size(grid1(:))
575-
m = size(grid2(:))
575+
m = size(grid2(:))
576576

577577
do i=2,n
578578
if (grid1(i) <= grid1(i-1)) call mpp_error(FATAL, 'grid1 not monotonic')
@@ -622,7 +622,7 @@ subroutine interp_1d_cubic_spline(grid1, grid2, data1, data2, yp1, ypn)
622622
else
623623
if(n==1) then
624624
klo = n
625-
else
625+
else
626626
klo = n -1
627627
endif
628628
endif
@@ -637,15 +637,15 @@ end subroutine interp_1d_cubic_spline
637637

638638
!###################################################################
639639

640-
subroutine interp_1d_1d(grid1,grid2,data1,data2, method, yp1, yp2)
640+
subroutine interp_1d_1d(grid1,grid2,data1,data2, method, yp1, yp2)
641641

642642
real, dimension(:), intent(in) :: grid1, data1, grid2
643643
real, dimension(:), intent(inout) :: data2
644644
character(len=*), optional, intent(in) :: method
645645
real, optional, intent(in) :: yp1, yp2
646646

647647
real :: y1, y2
648-
character(len=32) :: interp_method
648+
character(len=32) :: interp_method
649649
integer :: k2, ks, ke
650650

651651
k2 = size(grid2(:))
@@ -673,7 +673,7 @@ end subroutine interp_1d_1d
673673
!###################################################################
674674

675675

676-
subroutine interp_1d_2d(grid1,grid2,data1,data2)
676+
subroutine interp_1d_2d(grid1,grid2,data1,data2)
677677

678678
real, dimension(:,:), intent(in) :: grid1, data1, grid2
679679
real, dimension(:,:), intent(inout) :: data2
@@ -698,7 +698,7 @@ end subroutine interp_1d_2d
698698

699699
!###################################################################
700700

701-
subroutine interp_1d_3d(grid1,grid2,data1,data2, method, yp1, yp2)
701+
subroutine interp_1d_3d(grid1,grid2,data1,data2, method, yp1, yp2)
702702

703703
real, dimension(:,:,:), intent(in) :: grid1, data1, grid2
704704
real, dimension(:,:,:), intent(inout) :: data2
@@ -797,7 +797,7 @@ program test
797797

798798
integer :: n_src = 0
799799
integer :: n_dst = 0
800-
real, dimension(MAXSIZE) :: grid_src = 0
800+
real, dimension(MAXSIZE) :: grid_src = 0
801801
real, dimension(MAXSIZE) :: grid_dst = 0
802802
real, dimension(MAXSIZE) :: data_src = 0
803803

@@ -839,7 +839,7 @@ program test
839839
371.054289820675, 395.098187506342, 446.150726850039 /)
840840

841841

842-
!---reading namelist
842+
!---reading namelist
843843
#ifdef INTERNAL_FILE_NML
844844
read (input_nml_file, test_axis_utils_nml, iostat=io)
845845
ierr = check_nml_error(io,'test_axis_utils_nml')

column_diagnostics/column_diagnostics.F90

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ subroutine initialize_diagnostic_columns &
238238
character(len=8) :: char
239239
character(len=32) :: filename
240240
logical :: allow_ij_input
241-
logical :: open_file
241+
logical :: open_file
242242
integer :: io
243243
!--------------------------------------------------------------------
244244
! local variables:

diag_manager/diag_manager.F90

+1-1
Original file line numberDiff line numberDiff line change
@@ -3927,7 +3927,7 @@ SUBROUTINE diag_manager_init(diag_model_subset, time_init, err_msg)
39273927
ALLOCATE(fnum_for_domain(max_files))
39283928
ALLOCATE(pelist(mpp_npes()))
39293929
!> Initialize fnum_for_domain with "dn" which stands for done
3930-
fnum_for_domain(:) = "dn"
3930+
fnum_for_domain(:) = "dn"
39313931
CALL mpp_get_current_pelist(pelist, pelist_name)
39323932

39333933
! set the diag_init_time if time_init present. Otherwise, set it to base_time

diag_manager/diag_output.F90

+12-12
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ SUBROUTINE diag_output_init(file_name, FORMAT, file_title, file_unit,&
169169
else
170170
fname_no_tile = trim(file_name)
171171
endif
172-
elseif (lowercase(file_name(len_file_name-4:len_file_name-1)) .eq. "tile") then
172+
elseif (lowercase(file_name(len_file_name-4:len_file_name-1)) .eq. "tile") then
173173
fname_no_tile = file_name(1:len_file_name-6)
174-
elseif (len_file_name < 9) then
174+
elseif (len_file_name < 9) then
175175
fname_no_tile = trim(file_name)
176176
elseif (lowercase(file_name(len_file_name-7:len_file_name-4)) .eq. "tile") then
177177
fname_no_tile = file_name(1:len_file_name-9)
@@ -190,7 +190,7 @@ SUBROUTINE diag_output_init(file_name, FORMAT, file_title, file_unit,&
190190
! trim(fname_no_tile)(len_file_name-3:len_file_name) == ".nc") write (6,*)trim(fname_no_tile)
191191
! trim(fname_no_tile)(len(trim(fname_no_tile))-3:len(trim(fname_no_tile))) == ".nc") &
192192
! trim(fname_no_tile)(len(trim(fname_no_tile))-3:len(trim(fname_no_tile))) = " "
193-
193+
194194
!> Check to make sure that only domain2D or domainUG is used. If both are not null, then FATAL
195195
if (domain .NE. NULL_DOMAIN2D .AND. domainU .NE. NULL_DOMAINUG)&
196196
& CALL error_mesg('diag_output_init', "Domain2D and DomainUG can not be used at the same time in "//&
@@ -380,7 +380,7 @@ SUBROUTINE write_axis_meta_data(file_unit, axes, fileob, time_ops, time_axis_reg
380380
call register_variable_attribute(fptr, axis_name, "positive", "up")
381381
case (-1)
382382
call register_variable_attribute(fptr, axis_name, "positive", "down")
383-
end select
383+
end select
384384
call write_data(fptr, axis_name, axis_data(istart:iend) )
385385
endif
386386
type is (FmsNetcdfFile_t) !< For regional X and Y axes, treat as any other axis
@@ -404,7 +404,7 @@ SUBROUTINE write_axis_meta_data(file_unit, axes, fileob, time_ops, time_axis_reg
404404
"FmsNetcdfFile_t for a X or Y axis, ", FATAL)
405405
end select
406406
endif
407-
407+
408408
ELSE
409409
select type (fptr)
410410
type is (FmsNetcdfDomainFile_t)
@@ -436,7 +436,7 @@ SUBROUTINE write_axis_meta_data(file_unit, axes, fileob, time_ops, time_axis_reg
436436
call register_variable_attribute(fptr, axis_name, "positive", "up")
437437
case (-1)
438438
call register_variable_attribute(fptr, axis_name, "positive", "down")
439-
end select
439+
end select
440440
call write_data(fileob, axis_name, axis_data(istart:iend) )
441441
END IF
442442
ELSE
@@ -518,7 +518,7 @@ SUBROUTINE write_axis_meta_data(file_unit, axes, fileob, time_ops, time_axis_reg
518518
call register_variable_attribute(fptr, axis_name, "positive", "up")
519519
case (-1)
520520
call register_variable_attribute(fptr, axis_name, "positive", "down")
521-
end select
521+
end select
522522
call write_data(fptr, axis_name, axis_data)
523523
endif
524524
type is (FmsNetcdfFile_t)
@@ -552,7 +552,7 @@ SUBROUTINE write_axis_meta_data(file_unit, axes, fileob, time_ops, time_axis_reg
552552

553553
call register_variable_attribute(fptr, axis_name, "long_name", axis_long_name)
554554
if(trim(axis_cart_name).ne."N") call register_variable_attribute(fptr, axis_name, "axis",trim(axis_cart_name))
555-
is_time_axis_registered = .true.
555+
is_time_axis_registered = .true.
556556
if (present(time_axis_registered)) time_axis_registered = is_time_axis_registered
557557
type is (FmsNetcdfUnstructuredDomainFile_t)
558558
call register_axis(fptr, axis_name, size(axis_data) )
@@ -943,7 +943,7 @@ FUNCTION write_field_meta_data ( file_unit, name, axes, units, long_name, range,
943943
& fill=CMOR_MISSING_VALUE,&
944944
& pack=ipack, time_method=time_method)
945945
END IF
946-
END IF
946+
END IF
947947
if (.not. variable_exists(fileob,name)) then
948948
! ipack Valid values:
949949
! 1 = 64bit </LI>
@@ -1144,7 +1144,7 @@ subroutine diag_field_write_field (field, buffer, static, fileob, file_num, file
11441144
TYPE(diag_fieldtype), INTENT(inout) :: Field
11451145
REAL , INTENT(inout) :: buffer(:,:,:,:)
11461146
logical, intent(in), optional :: static
1147-
class(FmsNetcdfFile_t), optional, intent(inout),target :: fileob
1147+
class(FmsNetcdfFile_t), optional, intent(inout),target :: fileob
11481148
class(FmsNetcdfFile_t), pointer :: fptr => null()
11491149
integer, intent(in), optional :: file_num
11501150
type(FmsNetcdfUnstructuredDomainFile_t),intent(inout), optional :: fileobjU(:)
@@ -1294,10 +1294,10 @@ subroutine diag_write_time (fileob,rtime_value,time_index,time_name)
12941294
endif
12951295
!> Write the time data
12961296
call write_data (fileob, trim(name_time), rtime_value, unlim_dim_level=time_index)
1297-
!> Cleanup
1297+
!> Cleanup
12981298
if (allocated(name_time)) deallocate(name_time)
12991299
if (associated(fptr)) nullify(fptr)
1300-
end subroutine diag_write_time
1300+
end subroutine diag_write_time
13011301
! </SUBROUTINE>
13021302

13031303
! <FUNCTION NAME="get_axis_index">

diag_manager/diag_util.F90

+1-1
Original file line numberDiff line numberDiff line change
@@ -2495,7 +2495,7 @@ SUBROUTINE diag_data_out(file, field, dat, time, final_call_in, static_write_in)
24952495
IF ( PRESENT(final_call_in) ) final_call = final_call_in
24962496
static_write = .FALSE.
24972497
IF ( PRESENT(static_write_in) ) static_write = static_write_in
2498-
!> dif is the time as a real that is evaluated
2498+
!> dif is the time as a real that is evaluated
24992499
dif = get_date_dif(time, base_time, files(file)%time_units)
25002500

25012501
! get file_unit, open new file and close curent file if necessary

doxyfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ RECURSIVE = YES
820820
# Note that relative paths are relative to the directory from which doxygen is
821821
# run.
822822

823-
EXCLUDE =
823+
EXCLUDE =
824824
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
825825
# directories that are symbolic links (a Unix file system feature) are excluded
826826
# from the input.
@@ -852,7 +852,7 @@ EXCLUDE_SYMBOLS =
852852
# that contain example code fragments that are included (see the \include
853853
# command).
854854

855-
EXAMPLE_PATH =
855+
EXAMPLE_PATH =
856856

857857
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
858858
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and

0 commit comments

Comments
 (0)