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 CICE to latest Consortium master #26

Merged
merged 22 commits into from
Jun 4, 2021
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
840e931
Merge remote-tracking branch 'upstream/emc/develop' into emc/develop
DeniseWorthen Nov 10, 2020
b720380
Update Time Manager (#566)
apcraig Mar 16, 2021
714dba6
use cell-centered ice velocity for high-freq wind stress calculation …
eclare108213 Mar 16, 2021
d627ea2
Update Icepack to latest version (#580)
apcraig Mar 17, 2021
f843756
add machine compy (#581)
apcraig Mar 18, 2021
1ae2f03
Fix reading of mixed layer forcing file. (#578)
dabail10 Mar 24, 2021
6b399d1
Fixes for uninitialized variables (snan testing) (#579)
apcraig Mar 25, 2021
e204fb8
Add JRA55 dataset tool and documentation (#582)
apcraig Mar 25, 2021
3d0e747
Fix 'max_blocks' estimation and add checks (#587)
phil-blain Apr 2, 2021
b52e91c
Merge remote-tracking branch 'upstream/emc/develop' into emc/develop
DeniseWorthen Apr 5, 2021
afc3a58
Update gx1 initial condition, Icepack, tests, and version. Fix hmix …
apcraig Apr 6, 2021
9b51179
Update Icepack (#590)
apcraig Apr 7, 2021
2378740
updates for RASM (#593)
apcraig Apr 9, 2021
4d9cf31
update onyx batch settings (#596)
apcraig Apr 10, 2021
f462721
Modify to new ice_calendar in DMI NUOPC routines (#598)
mhrib Apr 14, 2021
1cddc84
Remove hc_jday and replace with "compute_days_between" for HYCOM forc…
mhrib Apr 20, 2021
a09e51f
Add 'iceruf' to namelist (#600)
phil-blain May 20, 2021
97370d7
Update testing, in particular for diagnostics and decompositions (#602)
apcraig May 26, 2021
bd512d4
Update coverage tool to manually filter some Fortran90 continuation l…
apcraig May 27, 2021
51db2f9
Merge remote-tracking branch 'Consortium/master' into feature/updcice
DeniseWorthen Jun 1, 2021
d8fb6d9
switch icepack branches
DeniseWorthen Jun 2, 2021
9a76541
update icepack
DeniseWorthen Jun 4, 2021
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
8 changes: 4 additions & 4 deletions .github/workflows/test-cice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

defaults:
run:
shell: /bin/csh {0}
shell: /bin/csh -e {0}

jobs:
build:
Expand Down Expand Up @@ -104,9 +104,9 @@ jobs:
- name: download input data
run: |
cd $HOME/cice-dirs/input
wget https://zenodo.org/record/3728358/files/CICE_data_gx3_grid_ic-20200320.tar.gz && tar xvfz CICE_data_gx3_grid_ic-20200320.tar.gz
wget https://zenodo.org/record/3728362/files/CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz
wget https://zenodo.org/record/3728364/files/CICE_data_gx3_forcing_JRA55-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_JRA55-20200320.tar.gz
wget --progress=dot:giga https://zenodo.org/record/3728358/files/CICE_data_gx3_grid_ic-20200320.tar.gz && tar xvfz CICE_data_gx3_grid_ic-20200320.tar.gz
wget --progress=dot:giga https://zenodo.org/record/3728362/files/CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz
wget --progress=dot:giga https://zenodo.org/record/3728364/files/CICE_data_gx3_forcing_JRA55-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_JRA55-20200320.tar.gz
pwd
ls -alR
# - name: run case
Expand Down
4 changes: 3 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[submodule "icepack"]
path = icepack
url = https://github.com/NOAA-EMC/Icepack
#url = https://github.com/NOAA-EMC/Icepack
url = https://github.com/DeniseWorthen/Icepack
branch = feature/icepack_noabort
14 changes: 13 additions & 1 deletion cice.setup
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,18 @@ if ((${dosuite} == 1 || ${dotest} == 1) && ${testid} == ${spval}) then
exit -1
endif

# This creates a new sandbox and modifies the source code for "improved" lcov analysis
# Turn this if block off if you don't want coverage to do that
if ($coverage == 1) then
set sandbox_lcov = ${ICE_SANDBOX}/../cice_lcov_${sdate}-${stime}
cp -p -r ${ICE_SANDBOX} ${sandbox_lcov}
echo "shifting to sandbox = ${sandbox_lcov}"
set ICE_SANDBOX = ${sandbox_lcov}
set ICE_SCRIPTS = "${ICE_SANDBOX}/configuration/scripts"
cd ${ICE_SANDBOX}
${ICE_SCRIPTS}/tests/lcov_modify_source.sh
endif

#---------------------------------------------------------------------
# Setup tsfile and test suite support stuff

Expand Down Expand Up @@ -1094,7 +1106,7 @@ cd ${testname_base}
source ./cice.settings
if (\${dobuild} == true) then
if (\${doreuse} == true) then
set ciceexe = "../ciceexe.\${ICE_ENVNAME}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}"
set ciceexe = "../ciceexe.\${ICE_TARGET}.\${ICE_ENVNAME}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}"
./cice.build --exe \${ciceexe}
if !(-e \${ciceexe}) cp -p \${ICE_RUNDIR}/cice \${ciceexe}
else
Expand Down
76 changes: 44 additions & 32 deletions cicecore/cicedynB/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,22 @@ module ice_diagnostics

implicit none
private
public :: runtime_diags, init_mass_diags, init_diags, &
print_state, print_points_state, diagnostic_abort

public :: runtime_diags, init_mass_diags, init_diags, debug_ice, &
print_state, diagnostic_abort

! diagnostic output file
character (len=char_len), public :: diag_file

! point print data

logical (kind=log_kind), public :: &
debug_model , & ! if true, debug model at high level
print_points , & ! if true, print point data
print_global ! if true, print global data

integer (kind=int_kind), public :: &
debug_model_step = 999999999 ! begin printing at istep1=debug_model_step

integer (kind=int_kind), parameter, public :: &
npnt = 2 ! total number of points to be printed

Expand Down Expand Up @@ -87,16 +90,6 @@ module ice_diagnostics
totaeron , & ! total aerosol mass
totaeros ! total aerosol mass

! printing info for routine print_state
! iblkp, ip, jp, mtask identify the grid cell to print
! character (char_len) :: plabel
integer (kind=int_kind), parameter, public :: &
check_step = 999999999, & ! begin printing at istep1=check_step
iblkp = 1, & ! block number
ip = 72, & ! i index
jp = 11, & ! j index
mtask = 0 ! my_task

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

contains
Expand Down Expand Up @@ -1525,20 +1518,39 @@ end subroutine init_diags

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

! This routine is useful for debugging.
! Calls to it should be inserted in the form (after thermo, for example)
! do iblk = 1, nblocks
! do j=jlo,jhi
! do i=ilo,ihi
! plabel = 'post thermo'
! if (istep1 >= check_step .and. iblk==iblkp .and i==ip &
! .and. j==jp .and. my_task == mtask) &
! call print_state(plabel,i,j,iblk)
! enddo
! enddo
! This routine is useful for debugging
! author Elizabeth C. Hunke, LANL

subroutine debug_ice(iblk, plabeld)

use ice_kinds_mod
use ice_calendar, only: istep1
use ice_communicate, only: my_task
use ice_blocks, only: nx_block, ny_block

character (char_len), intent(in) :: plabeld
integer (kind=int_kind), intent(in) :: iblk

! local
integer (kind=int_kind) :: i, j, m
character(len=*), parameter :: subname='(debug_ice)'

! tcraig, do this only on one point, the first point
! do m = 1, npnt
m = 1
if (istep1 >= debug_model_step .and. &
iblk == pbloc(m) .and. my_task == pmloc(m)) then
i = piloc(m)
j = pjloc(m)
call print_state(plabeld,i,j,iblk)
endif
! enddo
!
! 'use ice_diagnostics' may need to be inserted also

end subroutine debug_ice

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

! This routine is useful for debugging.
! author: Elizabeth C. Hunke, LANL

subroutine print_state(plabel,i,j,iblk)
Expand Down Expand Up @@ -1587,7 +1599,7 @@ subroutine print_state(plabel,i,j,iblk)

this_block = get_block(blocks_ice(iblk),iblk)

write(nu_diag,*) plabel
write(nu_diag,*) subname,plabel
write(nu_diag,*) 'istep1, my_task, i, j, iblk:', &
istep1, my_task, i, j, iblk
write(nu_diag,*) 'Global i and j:', &
Expand Down Expand Up @@ -1699,16 +1711,14 @@ subroutine print_state(plabel,i,j,iblk)
write(nu_diag,*) ' evap = ',evap (i,j,iblk)
write(nu_diag,*) ' flwout = ',flwout(i,j,iblk)
write(nu_diag,*) ' '
call flush_fileunit(nu_diag)

end subroutine print_state

!=======================================================================
#ifdef UNDEPRECATE_print_points_state

! This routine is useful for debugging.
! Calls can be inserted anywhere and it will print info on print_points points
! call print_points_state(plabel)
!
! 'use ice_diagnostics' may need to be inserted also

subroutine print_points_state(plabel,ilabel)

Expand Down Expand Up @@ -1764,6 +1774,7 @@ subroutine print_points_state(plabel,ilabel)
write(llabel,'(a)') 'pps:'//trim(llabel)
endif

write(nu_diag,*) subname
write(nu_diag,*) trim(llabel),'istep1, my_task, i, j, iblk=', &
istep1, my_task, i, j, iblk
write(nu_diag,*) trim(llabel),'Global i and j=', &
Expand Down Expand Up @@ -1842,12 +1853,13 @@ subroutine print_points_state(plabel,ilabel)
write(nu_diag,*) ' evap = ',evap (i,j,iblk)
write(nu_diag,*) ' flwout = ',flwout(i,j,iblk)
write(nu_diag,*) ' '
call flush_fileunit(nu_diag)

endif ! my_task
enddo ! ncnt

end subroutine print_points_state

#endif
!=======================================================================

! prints error information prior to aborting
Expand Down
8 changes: 4 additions & 4 deletions cicecore/cicedynB/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ subroutine accum_hist (dt)
use ice_domain_size, only: nfsd
use ice_grid, only: tmask, lmask_n, lmask_s, dxu, dyu
use ice_calendar, only: new_year, write_history, &
write_ic, time, histfreq, nstreams, month, &
write_ic, timesecs, histfreq, nstreams, mmonth, &
new_month
use ice_dyn_eap, only: a11, a12, e11, e12, e22, s11, s12, s22, &
yieldstress11, yieldstress12, yieldstress22
Expand Down Expand Up @@ -1864,7 +1864,7 @@ subroutine accum_hist (dt)
avgct(ns) = avgct(ns) + c1
! if (avgct(ns) == c1) time_beg(ns) = (time-dt)/int(secday)
if (avgct(ns) == c1) then
time_beg(ns) = (time-dt)/int(secday)
time_beg(ns) = (timesecs-dt)/int(secday)
time_beg(ns) = real(time_beg(ns),kind=real_kind)
endif
endif
Expand Down Expand Up @@ -3966,7 +3966,7 @@ subroutine accum_hist (dt)
enddo ! iblk
!$OMP END PARALLEL DO

time_end(ns) = time/int(secday)
time_end(ns) = timesecs/int(secday)
time_end(ns) = real(time_end(ns),kind=real_kind)

!---------------------------------------------------------------
Expand Down Expand Up @@ -4057,7 +4057,7 @@ subroutine accum_hist (dt)
enddo
endif ! new_year

if ( (month .eq. 7) .and. new_month ) then
if ( (mmonth .eq. 7) .and. new_month ) then
do j=jlo,jhi
do i=ilo,ihi
! reset SH Jul 1
Expand Down
20 changes: 10 additions & 10 deletions cicecore/cicedynB/analysis/ice_history_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,9 @@ module ice_history_shared

subroutine construct_filename(ncfile,suffix,ns)

use ice_calendar, only: sec, nyr, month, daymo, &
use ice_calendar, only: msec, myear, mmonth, daymo, &
mday, write_ic, histfreq, histfreq_n, &
year_init, new_year, new_month, new_day, &
new_year, new_month, new_day, &
dt
use ice_restart_shared, only: lenstr

Expand All @@ -667,12 +667,12 @@ subroutine construct_filename(ncfile,suffix,ns)
character (len=1) :: cstream
character(len=*), parameter :: subname = '(construct_filename)'

iyear = nyr + year_init - 1 ! set year_init=1 in ice_in to get iyear=nyr
imonth = month
iyear = myear
imonth = mmonth
iday = mday
isec = sec - dt
isec = msec - dt

if (write_ic) isec = sec
if (write_ic) isec = msec
! construct filename
if (write_ic) then
write(ncfile,'(a,a,i4.4,a,i2.2,a,i2.2,a,i5.5,a,a)') &
Expand All @@ -688,7 +688,7 @@ subroutine construct_filename(ncfile,suffix,ns)
imonth = 12
iday = daymo(imonth)
elseif (new_month) then
imonth = month - 1
imonth = mmonth - 1
iday = daymo(imonth)
elseif (new_day) then
iday = iday - 1
Expand All @@ -703,7 +703,7 @@ subroutine construct_filename(ncfile,suffix,ns)
if (histfreq(ns) == '1') then ! instantaneous, write every dt
write(ncfile,'(a,a,i4.4,a,i2.2,a,i2.2,a,i5.5,a,a)') &
history_file(1:lenstr(history_file))//trim(cstream),'_inst.', &
iyear,'-',imonth,'-',iday,'-',sec,'.',suffix
iyear,'-',imonth,'-',iday,'-',msec,'.',suffix

elseif (hist_avg) then ! write averaged data

Expand All @@ -714,7 +714,7 @@ subroutine construct_filename(ncfile,suffix,ns)
elseif (histfreq(ns) == 'h'.or.histfreq(ns) == 'H') then ! hourly
write(ncfile,'(a,a,i2.2,a,i4.4,a,i2.2,a,i2.2,a,i5.5,a,a)') &
history_file(1:lenstr(history_file))//trim(cstream),'_', &
histfreq_n(ns),'h.',iyear,'-',imonth,'-',iday,'-',sec,'.',suffix
histfreq_n(ns),'h.',iyear,'-',imonth,'-',iday,'-',msec,'.',suffix
elseif (histfreq(ns) == 'm'.or.histfreq(ns) == 'M') then ! monthly
write(ncfile,'(a,a,i4.4,a,i2.2,a,a)') &
history_file(1:lenstr(history_file))//trim(cstream),'.', &
Expand All @@ -728,7 +728,7 @@ subroutine construct_filename(ncfile,suffix,ns)
else ! instantaneous with histfreq > dt
write(ncfile,'(a,a,i4.4,a,i2.2,a,i2.2,a,i5.5,a,a)') &
history_file(1:lenstr(history_file)),'_inst.', &
iyear,'-',imonth,'-',iday,'-',sec,'.',suffix
iyear,'-',imonth,'-',iday,'-',msec,'.',suffix
endif
endif

Expand Down
3 changes: 1 addition & 2 deletions cicecore/cicedynB/dynamics/ice_dyn_evp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ subroutine evp (dt)
first_time = .false.
endif
if (trim(grid_type) == 'tripole') then
call abort_ice(trim(subname)//' &
& Kernel not tested on tripole grid. Set kevp_kernel=0')
call abort_ice(trim(subname)//' Kernel not tested on tripole grid. Set kevp_kernel=0')
endif
call ice_dyn_evp_1d_copyin( &
nx_block,ny_block,nblocks,nx_global+2*nghost,ny_global+2*nghost, &
Expand Down
Loading