Skip to content

Commit

Permalink
Remove un-necessary white space
Browse files Browse the repository at this point in the history
Removed all trailing whitespace from F90 files
  • Loading branch information
mnlevy1981 committed Mar 29, 2016
1 parent fd5ae75 commit d1b392d
Show file tree
Hide file tree
Showing 13 changed files with 141 additions and 147 deletions.
2 changes: 1 addition & 1 deletion src/cvmix_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Program cvmix_driver
!EOP
!BOC
integer :: nlev, max_nlev
real(kind=cvmix_r8) :: ocn_depth
real(kind=cvmix_r8) :: ocn_depth
character(len=cvmix_strlen) :: mix_type

namelist/cvmix_nml/mix_type, nlev, max_nlev, ocn_depth
Expand Down
48 changes: 22 additions & 26 deletions src/cvmix_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module cvmix_io
! !MODULE: cvmix_io
!
! !DESCRIPTION:
! This module contains routines to read CVmix variables from data files or
! This module contains routines to read CVmix variables from data files or
! output CVmix variables to data files. Currently only ascii and netCDF output
! are supported, as well as netCDF input, but the plan is to also include plain
! binary input / output as well.
Expand Down Expand Up @@ -102,7 +102,7 @@ subroutine cvmix_io_open(file_id, file_name, file_format, read_only)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
character(len=*), intent(in) :: file_name, file_format
Expand Down Expand Up @@ -139,8 +139,8 @@ subroutine cvmix_io_open(file_id, file_name, file_format, read_only)
file_index => file_index%next
end do
allocate(file_index%next)
file_index%next%file_id = file_id
file_index%next%prev => file_index
file_index%next%file_id = file_id
file_index%next%prev => file_index
nullify(file_index%next%next)
file_index => file_index%next
end if
Expand Down Expand Up @@ -200,7 +200,7 @@ subroutine cvmix_input_read_1d_double(file_id, var_name, local_copy)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -242,7 +242,6 @@ subroutine cvmix_input_read_1d_double(file_id, var_name, local_copy)
end if
end if


if (.not.lerr_in_read) then
call netcdf_check(nf90_inquire_variable(file_id, varid, dimids=dims))
dims1 = dims(1)
Expand Down Expand Up @@ -290,7 +289,7 @@ subroutine cvmix_input_read_2d_integer(file_id, var_name, local_copy)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -331,7 +330,6 @@ subroutine cvmix_input_read_2d_integer(file_id, var_name, local_copy)
end if
end if


if (.not.lerr_in_read) then
call netcdf_check(nf90_inquire_variable(file_id, varid, dimids=dims1))
do i=1,2
Expand Down Expand Up @@ -381,7 +379,7 @@ subroutine cvmix_input_read_2d_double(file_id, var_name, local_copy)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -422,7 +420,6 @@ subroutine cvmix_input_read_2d_double(file_id, var_name, local_copy)
end if
end if


if (.not.lerr_in_read) then
call netcdf_check(nf90_inquire_variable(file_id, varid, dimids=dims1))
do i=1,2
Expand Down Expand Up @@ -472,7 +469,7 @@ subroutine cvmix_input_read_3d_double(file_id, var_name, local_copy)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -513,7 +510,6 @@ subroutine cvmix_input_read_3d_double(file_id, var_name, local_copy)
end if
end if


if (.not.lerr_in_read) then
call netcdf_check(nf90_inquire_variable(file_id, varid, dimids=dims1))
do i=1,3
Expand Down Expand Up @@ -564,7 +560,7 @@ subroutine cvmix_output_write_single_col(file_id, CVmix_vars, var_names, &
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -795,7 +791,7 @@ subroutine cvmix_output_write_multi_col(file_id, CVmix_vars, var_names)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -990,7 +986,7 @@ subroutine cvmix_output_write_2d_double(file_id, var_name, dim_names, &
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -1034,7 +1030,7 @@ subroutine cvmix_output_write_2d_double(file_id, var_name, dim_names, &
write(file_id, "(E24.17E2)",advance='no') field(i,j)
if (j.ne.dims(2)) write(file_id, "(1X)", advance='no')
end do
write(file_id, *)
write(file_id, *)
end do
case DEFAULT
print*, "ERROR: cvmix_output_write_2d_double only writes to netcdf"
Expand Down Expand Up @@ -1065,7 +1061,7 @@ subroutine cvmix_output_write_3d_double(file_id, var_name, dim_names, &
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -1133,7 +1129,7 @@ subroutine cvmix_output_write_att_integer(file_id, att_name, att_val, &
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -1198,7 +1194,7 @@ subroutine cvmix_output_write_att_real(file_id, att_name, att_val, var_name)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -1263,7 +1259,7 @@ subroutine cvmix_output_write_att_string(file_id, att_name, att_val, var_name)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -1327,7 +1323,7 @@ subroutine cvmix_io_close(file_id)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -1417,7 +1413,7 @@ subroutine cvmix_io_close_all
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !LOCAL VARIABLES:
integer :: fid
Expand Down Expand Up @@ -1449,7 +1445,7 @@ function get_file_name(file_id)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -1493,7 +1489,7 @@ function get_file_type(file_id)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -1538,7 +1534,7 @@ function cvmix_input_get_netcdf_dim(file_id, dim_name)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down Expand Up @@ -1595,7 +1591,7 @@ function get_netcdf_varid(file_id, var_name, xtype, ndims)
!\\
! !USES:
! Only those used by entire module.
! Only those used by entire module.

! !INPUT PARAMETERS:
integer, intent(in) :: file_id
Expand Down
6 changes: 3 additions & 3 deletions src/drivers/cvmix_bgrnd_BL.F90
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ Subroutine cvmix_BL_driver(nlev, max_nlev, ocn_depth)
! depth (also allocate memory for diffusivity and viscosity)
allocate(iface_depth(max_nlev+1))
iface_depth(1) = cvmix_zero

! Depth is 0 at sea level and negative at ocean bottom in CVMix
do kw = 2,max_nlev+1
iface_depth(kw) = iface_depth(kw-1) - ocn_depth/real(nlev,cvmix_r8)
end do

! Allocate memory to store viscosity and diffusivity values (for pointer)
allocate(Mdiff(ncol,max_nlev+1), Tdiff(ncol,max_nlev+1))
allocate(Mdiff(ncol,max_nlev+1), Tdiff(ncol,max_nlev+1))

! Initialization for CVMix data types
call cvmix_put(CVmix_params, 'max_nlev', max_nlev)
Expand Down Expand Up @@ -142,7 +142,7 @@ Subroutine cvmix_BL_driver(nlev, max_nlev, ocn_depth)
cvmix_get_bkgnd_real_2D('static_Tdiff'),(/nlev+1/))
call cvmix_coeffs_bkgnd(CVmix_vars_memcopy(2), &
CVmix_bkgnd_params_user=CVmix_BL_params)

! Output
#ifdef _NETCDF
! data will have diffusivity from both columns (needed for NCL script)
Expand Down
19 changes: 9 additions & 10 deletions src/drivers/cvmix_kpp_drv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,22 @@ Subroutine cvmix_kpp_driver()

! Read namelists

! Defaults for test 1
! Defaults for test 1
ltest1 = .false.
nlev1 = 4
layer_thick1 = real(10, cvmix_r8)
hmix1 = -real(15, cvmix_r8)
ri_crit = 0.3_cvmix_r8
interp_type_t1 = 'quadratic'

! Defaults for test 2
! Defaults for test 2
ltest2 = .false.

! Defaults for test 3
! Defaults for test 3
ltest3 = .false.
nlev3 = 220

! Defaults for test 4
! Defaults for test 4
ltest4 = .false.
OBL_levid4 = 3
interp_type_t4 = 'quadratic'
Expand Down Expand Up @@ -133,7 +133,7 @@ Subroutine cvmix_kpp_driver()
! layer thickness) is stored at cell centers and then interpolated
! (user can specify linear, quadratic or cubic interpolant) between
! cell centers. OBL_depth is set to depth where interpolated bulk
! Richardson number = Ri_crit; level-center depth (zt) and bulk
! Richardson number = Ri_crit; level-center depth (zt) and bulk
! Richardson numbers are written out to test1.nc or test1.out
if (ltest1) then
print*, "Test 1: determining OBL depth"
Expand Down Expand Up @@ -338,7 +338,7 @@ Subroutine cvmix_kpp_driver()
#endif

call cvmix_output_write(fid, CVmix_vars4, (/"zt ", "zw ", "Mdiff", &
"Tdiff", "Sdiff"/))
"Tdiff", "Sdiff"/))
#ifdef _NETCDF
call cvmix_output_write_att(fid, "interp_type2", interp_type_t4)
call cvmix_output_write_att(fid, "OBL_depth", &
Expand Down Expand Up @@ -379,7 +379,7 @@ Subroutine cvmix_kpp_driver()
#endif

call cvmix_output_write(fid, CVmix_vars4, (/"zt ", "zw ", "Mdiff", &
"Tdiff", "Sdiff"/))
"Tdiff", "Sdiff"/))
#ifdef _NETCDF
call cvmix_output_write_att(fid, "interp_type2", interp_type_t4)
call cvmix_output_write_att(fid, "OBL_depth", &
Expand Down Expand Up @@ -462,7 +462,7 @@ Subroutine cvmix_kpp_driver()
ws_cntr = w_s)

shear_sqr = cvmix_kpp_compute_unresolved_shear(zt, w_s, &
Nsqr_iface = buoy_freq_iface**2)
Nsqr_iface = buoy_freq_iface**2)
! Note that Vt_shear_sqr is the fourth argument in compute_bulk_Richardson
! so it does not need to declared explicitly (even though it is optional)
Ri_bulk2 = cvmix_kpp_compute_bulk_Richardson(zt, (buoyancy(1)-buoyancy), &
Expand Down Expand Up @@ -525,7 +525,7 @@ Subroutine cvmix_kpp_driver()
print*, ""
print*, "Test 6: 2 simple tests for velocity scale"
print*, "----------"

call cvmix_init_kpp(vonkarman=vonkarman6)
sigma6 = 0.1_cvmix_r8

Expand Down Expand Up @@ -567,7 +567,6 @@ Subroutine cvmix_kpp_driver()
print*, "w_m = ", w_m6
print*, "w_s = ", w_s6
print*, ""


end if ! ltest6

Expand Down
4 changes: 2 additions & 2 deletions src/drivers/cvmix_tidal_Simmons.F90
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Subroutine cvmix_tidal_driver()
namelist/Simmons_nml/grid_file, physics_file, energy_flux_file, &
energy_flux_var, lon_out, lat_out

! Read namelist variables
! Read namelist variables
grid_file = "none"
physics_file = "none"
energy_flux_file = "none"
Expand All @@ -83,7 +83,7 @@ Subroutine cvmix_tidal_driver()
nlat = -1
max_nlev = -1
call cvmix_io_open(fid, trim(grid_file), 'nc', read_only=.true.)
#ifdef _NETCDF
#ifdef _NETCDF
nlon = cvmix_input_get_netcdf_dim(fid, 'lon')
nlat = cvmix_input_get_netcdf_dim(fid, 'lat')
max_nlev = cvmix_input_get_netcdf_dim(fid, 'nlev')
Expand Down
Loading

0 comments on commit d1b392d

Please sign in to comment.