Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Icepack to #6703bc533c968 May 22, 2023 #829

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cicecore/cicedyn/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ subroutine init_hist (dt)
trim(tmpstr2), file=__FILE__, line=__LINE__)
endif
end do

close(nu_nml)
call release_fileunit(nu_nml)
endif
Expand Down
6 changes: 3 additions & 3 deletions cicecore/cicedyn/analysis/ice_history_pond.F90
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ subroutine init_hist_pond_2D
trim(nml_filename), &
file=__FILE__, line=__LINE__)
endif

! goto this namelist in file
call goto_nml(nu_nml,trim(nml_name),nml_error)
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: searching for '// trim(nml_name), &
file=__FILE__, line=__LINE__)
endif

! read namelist
nml_error = 1
do while (nml_error > 0)
Expand All @@ -121,7 +121,7 @@ subroutine init_hist_pond_2D
trim(tmpstr2), file=__FILE__, line=__LINE__)
endif
end do

close(nu_nml)
call release_fileunit(nu_nml)
endif
Expand Down
2 changes: 1 addition & 1 deletion cicecore/cicedyn/analysis/ice_history_snow.F90
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ subroutine init_hist_snow_2D (dt)
integer (kind=int_kind) :: ns
integer (kind=int_kind) :: nml_error ! namelist i/o error flag
real (kind=dbl_kind) :: rhofresh, secday
logical (kind=log_kind) :: tr_snow
logical (kind=log_kind) :: tr_snow
character(len=char_len_long) :: tmpstr2 ! for namelist check
character(len=char_len) :: nml_name ! for namelist check

Expand Down
24 changes: 12 additions & 12 deletions cicecore/cicedyn/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ subroutine input_data
use ice_timers, only: timer_stats
use ice_memusage, only: memory_stats
use ice_fileunits, only: goto_nml

#ifdef CESMCOUPLED
use shr_file_mod, only: shr_file_setIO
#endif
Expand Down Expand Up @@ -169,7 +169,7 @@ subroutine input_data

character (len=char_len) :: abort_list
character (len=char_len) :: nml_name ! namelist name
character (len=char_len_long) :: tmpstr2
character (len=char_len_long) :: tmpstr2

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

Expand Down Expand Up @@ -609,7 +609,7 @@ subroutine input_data
call abort_ice(subname//'ERROR: searching for '// trim(nml_name), &
file=__FILE__, line=__LINE__)
endif

! read namelist
nml_error = 1
do while (nml_error > 0)
Expand Down Expand Up @@ -657,7 +657,7 @@ subroutine input_data
call abort_ice(subname//'ERROR: searching for '// trim(nml_name), &
file=__FILE__, line=__LINE__)
endif

! read namelist
nml_error = 1
do while (nml_error > 0)
Expand All @@ -681,7 +681,7 @@ subroutine input_data
call abort_ice(subname//'ERROR: searching for '// trim(nml_name), &
file=__FILE__, line=__LINE__)
endif

! read namelist
nml_error = 1
do while (nml_error > 0)
Expand All @@ -699,7 +699,7 @@ subroutine input_data
! read dynamics_nml
nml_name = 'dynamics_nml'
write(nu_diag,*) subname,' Reading ', trim(nml_name)

! goto namelist in file
call goto_nml(nu_nml,trim(nml_name),nml_error)
if (nml_error /= 0) then
Expand All @@ -724,7 +724,7 @@ subroutine input_data
! read shortwave_nml
nml_name = 'shortwave_nml'
write(nu_diag,*) subname,' Reading ', trim(nml_name)

! goto namelist in file
call goto_nml(nu_nml,trim(nml_name),nml_error)
if (nml_error /= 0) then
Expand All @@ -749,14 +749,14 @@ subroutine input_data
! read ponds_nml
nml_name = 'ponds_nml'
write(nu_diag,*) subname,' Reading ', trim(nml_name)

! goto namelist in file
call goto_nml(nu_nml,trim(nml_name),nml_error)
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: searching for '// trim(nml_name), &
file=__FILE__, line=__LINE__)
endif

! read namelist
nml_error = 1
do while (nml_error > 0)
Expand All @@ -774,14 +774,14 @@ subroutine input_data
! read snow_nml
nml_name = 'snow_nml'
write(nu_diag,*) subname,' Reading ', trim(nml_name)

! goto namelist in file
call goto_nml(nu_nml,trim(nml_name),nml_error)
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: searching for '// trim(nml_name), &
file=__FILE__, line=__LINE__)
endif

! read namelist
nml_error = 1
do while (nml_error > 0)
Expand Down Expand Up @@ -821,7 +821,7 @@ subroutine input_data
endif
end do

! done reading namelist.
! done reading namelist.
close(nu_nml)
call release_fileunit(nu_nml)
endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3749,7 +3749,7 @@ end subroutine ice_HaloUpdate4DI4
!***********************************************************************
! This routine updates ghost cells for an input array using
! a second array as needed by the stress fields.
! This is just like 2DR8 except no averaging and only on tripole
! This is just like 2DR8 except no averaging and only on tripole

subroutine ice_HaloUpdate_stress(array1, array2, halo, &
fieldLoc, fieldKind, &
Expand Down
4 changes: 2 additions & 2 deletions cicecore/cicedyn/infrastructure/ice_domain.F90
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ subroutine init_domain_blocks
if (my_task == master_task) then
nml_name = 'domain_nml'
write(nu_diag,*) subname,' Reading ', trim(nml_name)

call get_fileunit(nu_nml)
open (nu_nml, file=trim(nml_filename), status='old',iostat=nml_error)
if (nml_error /= 0) then
Expand All @@ -186,7 +186,7 @@ subroutine init_domain_blocks
call abort_ice(subname//'ERROR: searching for '// trim(nml_name), &
file=__FILE__, line=__LINE__)
endif

nml_error = 1
do while (nml_error > 0)
read(nu_nml, nml=domain_nml,iostat=nml_error)
Expand Down
22 changes: 11 additions & 11 deletions cicecore/shared/ice_fileunits.F90
Original file line number Diff line number Diff line change
Expand Up @@ -328,32 +328,32 @@ end subroutine flush_fileunit
subroutine goto_nml(iunit, nml, status)
! Search to namelist group within ice_in file.
! for compilers that do not allow optional namelists

! passed variables
integer(kind=int_kind), intent(in) :: &
iunit ! namelist file unit

character(len=*), intent(in) :: &
nml ! namelist to search for

integer(kind=int_kind), intent(out) :: &
status ! status of subrouine

! local variables
character(len=char_len) :: &
file_str, & ! string in file
nml_str ! namelist string to test

integer(kind=int_kind) :: &
i, n ! dummy integers


! rewind file
rewind(iunit)

! define test string with ampersand
nml_str = '&' // trim(adjustl(nml))

! search for the record containing the namelist group we're looking for
do
read(iunit, '(a)', iostat=status) file_str
Expand All @@ -365,10 +365,10 @@ subroutine goto_nml(iunit, nml, status)
end if
end if
end do

! backspace to namelist name in file
backspace(iunit)

end subroutine goto_nml

!=======================================================================
Expand Down