Skip to content

Commit

Permalink
Update version to CICE 6.4.1 (#803)
Browse files Browse the repository at this point in the history
Update Icepack to latest release version
Remove trailing blank space
  • Loading branch information
apcraig authored Dec 7, 2022
1 parent 48cf07a commit f813294
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 62 deletions.
4 changes: 2 additions & 2 deletions cicecore/cicedyn/dynamics/ice_dyn_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ subroutine alloc_dyn_shared
iceTmask (nx_block,ny_block,max_blocks), & ! T mask for dynamics
iceUmask (nx_block,ny_block,max_blocks), & ! U mask for dynamics
fcor_blk (nx_block,ny_block,max_blocks), & ! Coriolis
DminTarea (nx_block,ny_block,max_blocks), & !
DminTarea (nx_block,ny_block,max_blocks), & !
stat=ierr)
if (ierr/=0) call abort_ice(subname//': Out of memory')

Expand Down Expand Up @@ -240,7 +240,7 @@ subroutine init_dyn_shared (dt)

call set_evp_parameters (dt)
! allocate dyn shared (init_uvel,init_vvel)
call alloc_dyn_shared
call alloc_dyn_shared
! Set halo_dynbundle, this is empirical at this point, could become namelist
halo_dynbundle = .true.
nprocs = get_num_procs()
Expand Down
6 changes: 3 additions & 3 deletions cicecore/cicedyn/dynamics/ice_dyn_vp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module ice_dyn_vp
reltol_andacc ! relative tolerance for Anderson acceleration

character (len=char_len), public :: &
precond , & ! preconditioner for fgmres: 'ident' (identity), 'diag' (diagonal),
precond , & ! preconditioner for fgmres: 'ident' (identity), 'diag' (diagonal),
! 'pgmres' (Jacobi-preconditioned GMRES)
algo_nonlin , & ! nonlinear algorithm: 'picard' (Picard iteration), 'anderson' (Anderson acceleration)
ortho_type ! type of orthogonalization for FGMRES ('cgs' or 'mgs')
Expand Down Expand Up @@ -3344,7 +3344,7 @@ subroutine pgmres (zetax2 , etax2 , &

! Update workspace with boundary values
! NOTE: skipped for efficiency since this is just a preconditioner
! unless bfbflag is active
! unless bfbflag is active
if (bfbflag /= 'off') then
call stack_fields(workspace_x, workspace_y, fld2)
call ice_timer_start(timer_bound)
Expand Down Expand Up @@ -3565,7 +3565,7 @@ subroutine precondition(zetax2 , etax2, &

type (ice_halo), intent(in) :: &
halo_info_mask ! ghost cell update info for masked halo

real (kind=dbl_kind), dimension (nx_block,ny_block,max_blocks), intent(in) :: &
vx , & ! input vector (x components)
vy ! input vector (y components)
Expand Down
12 changes: 6 additions & 6 deletions cicecore/cicedyn/general/ice_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ module ice_forcing

real (kind=dbl_kind), dimension(:,:,:,:,:), allocatable :: &
wave_spectrum_data ! field values at 2 temporal data points

character(char_len), public :: &
atm_data_format, & ! 'bin'=binary or 'nc'=netcdf
ocn_data_format, & ! 'bin'=binary or 'nc'=netcdf
Expand Down Expand Up @@ -5650,7 +5650,7 @@ subroutine get_wave_spec
file=__FILE__, line=__LINE__)
else
#ifdef USE_NETCDF
call wave_spec_data
call wave_spec_data
#else
write (nu_diag,*) "wave spectrum file not available, requires cpp USE_NETCDF"
write (nu_diag,*) "wave spectrum file not available, using default profile"
Expand Down Expand Up @@ -5682,7 +5682,7 @@ subroutine wave_spec_data
use ice_grid, only: hm, tlon, tlat, tmask, umask
use ice_calendar, only: days_per_year, use_leap_years

integer (kind=int_kind) :: &
integer (kind=int_kind) :: &
ncid , & ! netcdf file id
i, j, freq , &
ixm,ixx,ixp , & ! record numbers for neighboring months
Expand Down Expand Up @@ -5710,7 +5710,7 @@ subroutine wave_spec_data
wave_spectrum_profile ! wave spectrum

character(len=64) :: fieldname !netcdf field name
character(char_len_long) :: spec_file
character(char_len_long) :: spec_file
character(char_len) :: wave_spec_type
logical (kind=log_kind) :: wave_spec
character(len=*), parameter :: subname = '(wave_spec_data)'
Expand All @@ -5736,7 +5736,7 @@ subroutine wave_spec_data
yr = fyear ! current year
!-------------------------------------------------------------------
! 6-hourly data
!
!
! Assume that the 6-hourly value is located at the end of the
! 6-hour period. This is the convention for NCEP reanalysis data.
! E.g. record 1 gives conditions at 6 am GMT on 1 January.
Expand Down Expand Up @@ -5787,7 +5787,7 @@ subroutine wave_spec_data
field_type=field_type_scalar)
call ice_close_nc(ncid)


! Interpolate
call interpolate_wavespec_data (wave_spectrum_data, wave_spectrum)

Expand Down
2 changes: 1 addition & 1 deletion cicecore/cicedyn/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ subroutine input_data
write(nu_diag,*) subname//' WARNING: tr_fsd=T but wave_spec=F - not recommended'
endif
end if

! compute grid locations for thermo, u and v fields

grid_ice_thrm = 'T'
Expand Down
76 changes: 38 additions & 38 deletions cicecore/cicedyn/infrastructure/ice_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1396,15 +1396,15 @@ subroutine rectgrid
! original rectgrid defines latlon first
call rectgrid_scale_dxdy
else
! rectgrid no grid spacing.
! rectgrid no grid spacing.
! original method with addition to use namelist lat/lon reference

if (my_task == master_task) then
work_g1 = c0
length = dxrect*cm_to_m/radius*rad_to_deg

work_g1(1,:) = lonrefrect ! reference lon from namelist

do j = 1, ny_global
do i = 2, nx_global
work_g1(i,j) = work_g1(i-1,j) + length ! ULON
Expand All @@ -1416,13 +1416,13 @@ subroutine rectgrid
field_loc_NEcorner, field_type_scalar)
call ice_HaloExtrapolate(ULON, distrb_info, &
ew_boundary_type, ns_boundary_type)

if (my_task == master_task) then
work_g1 = c0
length = dyrect*cm_to_m/radius*rad_to_deg

work_g1(:,1) = latrefrect ! reference latitude from namelist

do i = 1, nx_global
do j = 2, ny_global
work_g1(i,j) = work_g1(i,j-1) + length ! ULAT
Expand Down Expand Up @@ -1535,84 +1535,84 @@ subroutine rectgrid
end subroutine rectgrid

!=======================================================================

subroutine rectgrid_scale_dxdy

! generate a variable spaced rectangluar grid.
! extend spacing from center of grid outward.
use ice_constants, only: c0, c1, c2, radius, cm_to_m, &
field_loc_center, field_loc_NEcorner, field_type_scalar

integer (kind=int_kind) :: &
i, j, iblk, &
imid, jmid, &
center1, center2 ! array centers for expanding dx, dy

real (kind=dbl_kind) :: &
length, &
rad_to_deg

real (kind=dbl_kind), dimension(:,:), allocatable :: &
work_g1

character(len=*), parameter :: subname = '(rectgrid_scale_dxdy)'

call icepack_query_parameters(rad_to_deg_out=rad_to_deg)

allocate(work_g1(nx_global,ny_global))

! determine dx spacing
! strategy: initialize with dxrect.
! if want to scale the grid, work from center outwards,
! multplying neighbor cell by scale factor.
! this assumes dx varies in x direction only.
! (i.e, dx is the same across same y location)
if (my_task == master_task) then

! initialize with initial dxrect
work_g1(:,:) = dxrect

! check if nx is even or odd
! if even, middle 2 columns are center
! of odd, middle 1 column is center
if (mod(nx_global,2) == 0) then ! nx_global is even

! with even number of x locatons,
! the center two y columns are center
center1 = nx_global/2 ! integer math
center2 = center1 + 1 ! integer math

else ! nx_global = odd
! only one center index. set center2=center1
center1 = ceiling(real(nx_global/2),int_kind)
center2 = center1
endif

! note loop over only half the x grid points (center1)-1
! working from the center outward.
do j = 1, ny_global
do i = 1, center1-1
! work from center1 to left
work_g1(center1-i,j) = dxscale*work_g1(center1-i+1,j)

! work from center2 to right
work_g1(center2+i,j) = dxscale*work_g1(center2+i-1,j)
enddo ! i
enddo ! j

endif ! my_task == master_task


! note work_g1 is converted to meters in primary_grid_lengths_HTN
call primary_grid_lengths_HTN(work_g1) ! dxU, dxT, dxN, dxE

! make ULON array
if (my_task == master_task) then

! make first column reference lon in radians.
! the remaining work_g1 is still dx in meters
work_g1(1,:) = lonrefrect/rad_to_deg ! radians

! loop over remaining points and add spacing to successive
! x locations
do j = 1, ny_global
Expand All @@ -1626,57 +1626,57 @@ subroutine rectgrid_scale_dxdy
field_loc_NEcorner, field_type_scalar)
call ice_HaloExtrapolate(ULON, distrb_info, &
ew_boundary_type, ns_boundary_type)

! determine dy spacing
! strategy: initialize with dyrect.
! if want to scale the grid, work from center outwards,
! multplying neighbor cell by scale factor.
! this assumes dy varies in y direction only.
! (i.e, dy is the same across same x location)
if (my_task == master_task) then

! initialize with initial dxrect
work_g1(:,:) = dyrect

! check if ny is even or odd
! if even, middle 2 rows are center
! of odd, middle 1 row is center
if (mod(ny_global,2) == 0) then ! ny_global is even

! with even number of x locatons,
! the center two y columns are center
center1 = ny_global/2 ! integer math
center2 = center1 + 1 ! integer math

else ! ny_global = odd
! only one center index. set center2=center1
center1 = ceiling(real(ny_global/2),int_kind)
center2 = center1
endif

! note loop over only half the y grid points (center1)-1
! working from the center outward.
do i = 1, nx_global
do j = 1, center1-1
! work from center1 to bottom
work_g1(i,center1-j) = dyscale*work_g1(i,center1-j+1)

! work from center2 to top
work_g1(i,center2+j) = dyscale*work_g1(i,center2+j-1)
enddo ! i
enddo ! j
endif ! mytask == master_task
! note work_g1 is converted to meters primary_grid_lengths_HTE
call primary_grid_lengths_HTE(work_g1) ! dyU, dyT, dyN, dyE

! make ULAT array
if (my_task == master_task) then

! make first row reference lat in radians.
! the remaining work_g1 is still dy in meters
work_g1(:,1) = latrefrect/rad_to_deg ! radians


! loop over remaining points and add spacing to successive
! x locations
do j = 2, ny_global ! start from j=2. j=1 is latrefrect
Expand All @@ -1690,10 +1690,10 @@ subroutine rectgrid_scale_dxdy
field_loc_NEcorner, field_type_scalar)
call ice_HaloExtrapolate(ULAT, distrb_info, &
ew_boundary_type, ns_boundary_type)


deallocate(work_g1)

end subroutine rectgrid_scale_dxdy

!=======================================================================
Expand Down
2 changes: 1 addition & 1 deletion cicecore/drivers/direct/hadgem3/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ subroutine cice_init
call init_calendar ! initialize some calendar stuff
call init_hist (dt) ! initialize output history file

if (kdyn == 1) then
if (kdyn == 1) then
call init_evp
else if (kdyn == 2) then
call init_eap ! define eap dynamics parameters, variables
Expand Down
2 changes: 1 addition & 1 deletion cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ subroutine cice_init
call init_calendar ! initialize some calendar stuff
call init_hist (dt) ! initialize output history file

if (kdyn == 1) then
if (kdyn == 1) then
call init_evp
else if (kdyn == 2) then
call init_eap ! define eap dynamics parameters, variables
Expand Down
2 changes: 1 addition & 1 deletion cicecore/drivers/mct/cesm1/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ subroutine cice_init(mpicom_ice)
call init_calendar ! initialize some calendar stuff
call init_hist (dt) ! initialize output history file

if (kdyn == 1) then
if (kdyn == 1) then
call init_evp
else if (kdyn == 2) then
call init_eap ! define eap dynamics parameters, variables
Expand Down
2 changes: 1 addition & 1 deletion cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
call t_startf ('cice_init1')
call cice_init1
call t_stopf ('cice_init1')

!-----------------------------------------------------------------
! Advertise fields
!-----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion cicecore/drivers/nuopc/dmi/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ subroutine cice_init(mpi_comm)
call init_calendar ! initialize some calendar stuff
call init_hist (dt) ! initialize output history file

if (kdyn == 1) then
if (kdyn == 1) then
call init_evp
else if (kdyn == 2) then
call init_eap ! define eap dynamics parameters, variables
Expand Down
2 changes: 1 addition & 1 deletion cicecore/drivers/standalone/cice/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ subroutine cice_init
call init_calendar ! initialize some calendar stuff
call init_hist (dt) ! initialize output history file

if (kdyn == 1) then
if (kdyn == 1) then
call init_evp
else if (kdyn == 2) then
call init_eap ! define eap dynamics parameters, variables
Expand Down
2 changes: 1 addition & 1 deletion cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ subroutine cice_init
call init_calendar ! initialize some calendar stuff
call init_hist (dt) ! initialize output history file

if (kdyn == 1) then
if (kdyn == 1) then
call init_evp
else if (kdyn == 2) then
call init_eap ! define eap dynamics parameters, variables
Expand Down
Loading

0 comments on commit f813294

Please sign in to comment.