Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
d088bfb
Update some CICE variable names to clarify grid (#729)
apcraig Jul 15, 2022
1585c31
Add unit test for optional arguments, "optargs" (#730)
apcraig Jul 15, 2022
21bd95b
cice.setup: remove 'suite.jobs' at start of 'suite.submit' (#731)
phil-blain Jul 15, 2022
9be1c35
Deprecate CESM ponds (tr_pond_cesm) (#733)
dabail10 Jul 31, 2022
3af3d1b
Deprecate 0-layer thermodynamics in the CICE driver (#732)
eclare108213 Jul 31, 2022
c6470cf
Update icepack to 3cb1746a202615044e (#743)
apcraig Jul 31, 2022
063a7f2
Update cice.t-test.py to use cartopy instead of basemap. (#742)
apcraig Jul 31, 2022
731c61d
change visc_method default to avg_zeta, change alt07 to test avg_stre…
apcraig Aug 2, 2022
26db2c3
cice.setup: allow command line to override suite options (#745)
phil-blain Aug 2, 2022
5a1701c
Update Icepack and version number (#748)
apcraig Aug 4, 2022
08c6b33
ice_grid: do call 'gridbox_verts' for rectangular grids (#749)
phil-blain Aug 12, 2022
d673e44
Clean up code and add several minor features (#750)
apcraig Aug 15, 2022
75ef5d2
Update ECCC machine files (#751)
phil-blain Aug 17, 2022
fea412a
ice_calendar: zero-initialize 'nstreams' (#752)
phil-blain Aug 17, 2022
1f70caf
Merge remote-tracking branch 'Consortium/main' into feature/updcice
DeniseWorthen Aug 20, 2022
c87dcd3
Added dxgrow, dygrow to facilitate variable spaced grid. Modified rec…
daveh150 Aug 22, 2022
2d0b213
Update Pull Request Template, add question about updating Icepack (#754)
apcraig Aug 23, 2022
588a86f
Refactored evp sub cycling loop (#756)
TillRasmussen Aug 24, 2022
007fbff
ice_grid: initialize 'l_readCenter' for all grid types (#758)
phil-blain Aug 24, 2022
6587995
move deformation out of loop for B grid only (#755)
TillRasmussen Sep 22, 2022
6399af7
Update dEdd implementation (#760)
apcraig Sep 29, 2022
036f1f7
Update grid averaging for tmass, aice, uvelT, vvelT (#762)
apcraig Sep 29, 2022
422117f
doc: improve "Quick Start" section (#765)
phil-blain Oct 6, 2022
8c6ba04
Refactor strocnxT, strocnyT implementation (#764)
apcraig Oct 10, 2022
578c111
ice_init: do broadcast 'default_season' (#766)
phil-blain Oct 11, 2022
af8cc84
Correct units in FSD history output (#769)
lettie-roach Oct 11, 2022
6a62a11
Update box test options (#772)
apcraig Oct 14, 2022
0447b9e
Update computation of cdn_ocn for use in dynamics (#771)
apcraig Oct 14, 2022
2435fa7
Change icetmask to logical consistent with iceumask, icenmask, iceema…
apcraig Oct 17, 2022
16b78da
ice_dyn_vp: allow for bit-for-bit reproducibility under `bfbflag` (#774)
phil-blain Oct 20, 2022
db2d7a9
Update Narwhal Port (#776)
apcraig Oct 20, 2022
670d2f2
Add time-varying wave forcing, add warning for FSD without waves, mak…
lettie-roach Nov 1, 2022
3820cde
Port to gust intel and cray (#781)
apcraig Nov 1, 2022
d6d081a
Merge branch 'emc/develop' into feature/updcice
DeniseWorthen Nov 2, 2022
2e68b9e
Merge remote-tracking branch 'Consortium/main' into feature/updcice
DeniseWorthen Nov 2, 2022
b893ee9
add initializationsin ice_state
DeniseWorthen Nov 2, 2022
aa1e066
Update KE diagnostic (#784)
apcraig Nov 7, 2022
251ca48
Add wave-ice coupling to nuopc/cmeps driver (#782)
DeniseWorthen Nov 8, 2022
b11bfb4
Merge remote-tracking branch 'Consortium/main' into feature/updcice
DeniseWorthen Nov 8, 2022
5a32f12
finalize 0-layer thermo and cesm ponds deprecation in CICE (#787)
eclare108213 Nov 16, 2022
9808b51
CESM Updates (#785)
dabail10 Nov 16, 2022
fe16051
Merge remote-tracking branch 'Consortium/main' into feature/updcice
DeniseWorthen Nov 16, 2022
99daf69
allocate c and cd var in evp, reduce number of "if grid_ice". (#778)
TillRasmussen Nov 17, 2022
9104a8c
Rename cicedynB to cicedyn, update test suites (#790)
apcraig Nov 18, 2022
ed4855e
Update Icepack (#794)
apcraig Nov 19, 2022
cb58257
Trap solve_zsal = true at initialization (#795)
apcraig Nov 20, 2022
b16d7fd
Update Icepack to #5999551 including snowbrinebugs (#797)
apcraig Dec 2, 2022
90a8b62
Merge branch 'NOAA-EMC:emc/develop' into feature/updcice
DeniseWorthen Dec 6, 2022
ad8d577
Merge remote-tracking branch 'Consortium/main' into feature/updcice
DeniseWorthen Dec 6, 2022
4befa1e
Saltflux option for CICE (#799)
dabail10 Dec 7, 2022
48cf07a
Update stress12T calculation for C-grid (#802)
apcraig Dec 7, 2022
f813294
Update version to CICE 6.4.1 (#803)
apcraig Dec 7, 2022
eebb350
Adding method to check namelist in any order, tested with NAG Fortran…
daveh150 Dec 16, 2022
0bf0fdc
Fix OMP setup and 'setmask' (#806)
dabail10 Dec 17, 2022
ce2298e
Merge remote-tracking branch 'Consortium/main' into feature/updcice
DeniseWorthen Jan 4, 2023
ed472ab
fix for nudiag_set
DeniseWorthen Jan 9, 2023
506614d
Merge remote-tracking branch 'CICE-Consortium/main' into test
DeniseWorthen Jan 14, 2023
dd25b0f
Merge branch 'test' into feature/updcice
DeniseWorthen Jan 14, 2023
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
14 changes: 14 additions & 0 deletions .github/workflows/test-cice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ jobs:
ln -s ${GITHUB_WORKSPACE}/../CICE ${HOME}/cice
# ls -al ${HOME}/
# ls -al ${GITHUB_WORKSPACE}/
- name: check for tabs
run: |
cd $HOME/cice/cicecore
set cnt = 0
set ffiles = `find -P . -iname "*.f*"`
set cfiles = `find -P . -iname "*.c*"`
foreach file ($ffiles $cfiles)
set fcnt = `sed -n '/\t/p' $file | wc -l`
@ cnt = $cnt + $fcnt
if ($fcnt > 0) then
echo "TAB found: $fcnt $file"
endif
end
exit $cnt
- name: setup conda env
shell: /bin/bash {0}
run: |
Expand Down
17 changes: 16 additions & 1 deletion cice.setup
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,22 @@ if ( ${dosuite} == 0 ) then
set sets = ""

else
set tarrays = `echo ${testsuite} | sed 's/,/ /g' | fmt -1 | sort -u`
# generate unique set of suites in tarrays in order they are set
set tarrays0 = `echo ${testsuite} | sed 's/,/ /g' | fmt -1 `
#echo "${0}: tarrays0 = ${tarrays0}"
set tarrays = $tarrays0[1]
foreach t1 ( ${tarrays0} )
set found = 0
foreach t2 ( ${tarrays} )
if ( ${t1} == ${t2} ) then
set found = 1
endif
end
if ( ${found} == 0 ) then
set tarrays = ( ${tarrays} ${t1} )
endif
end
#echo "${0}: tarrays = ${tarrays}"
set testsuitecnt = 0
foreach tarray ( ${tarrays} )
@ testsuitecnt = ${testsuitecnt} + 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ module ice_diagnostics
totms , & ! total ice/snow water mass (sh)
totmin , & ! total ice water mass (nh)
totmis , & ! total ice water mass (sh)
totsn , & ! total salt mass (nh)
totss , & ! total salt mass (sh)
toten , & ! total ice/snow energy (J)
totes ! total ice/snow energy (J)

Expand Down Expand Up @@ -154,14 +156,16 @@ subroutine runtime_diags (dt)
rhofresh, lfresh, lvap, ice_ref_salinity, Tffresh

character (len=char_len) :: &
snwredist
snwredist, saltflux_option

! hemispheric state quantities
real (kind=dbl_kind) :: &
umaxn, hmaxn, shmaxn, arean, snwmxn, extentn, shmaxnt, &
umaxs, hmaxs, shmaxs, areas, snwmxs, extents, shmaxst, &
etotn, mtotn, micen, msnwn, pmaxn, ketotn, &
etots, mtots, mices, msnws, pmaxs, ketots, &
stotn, &
stots, &
urmsn, albtotn, arean_alb, mpndn, ptotn, spondn, &
urmss, albtots, areas_alb, mpnds, ptots, sponds

Expand Down Expand Up @@ -226,7 +230,7 @@ subroutine runtime_diags (dt)
awtvdr_out=awtvdr, awtidr_out=awtidr, awtvdf_out=awtvdf, awtidf_out=awtidf, &
rhofresh_out=rhofresh, lfresh_out=lfresh, lvap_out=lvap, &
ice_ref_salinity_out=ice_ref_salinity,snwredist_out=snwredist, &
snwgrain_out=snwgrain)
snwgrain_out=snwgrain, saltflux_option_out=saltflux_option)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
Expand Down Expand Up @@ -512,6 +516,15 @@ subroutine runtime_diags (dt)
etots = global_sum(work1, distrb_info, &
field_loc_center, tareas)

! total salt volume
call total_salt (work2)

stotn = global_sum(work2, distrb_info, &
field_loc_center, tarean)
stots = global_sum(work2, distrb_info, &
field_loc_center, tareas)


!-----------------------------------------------------------------
! various fluxes
!-----------------------------------------------------------------
Expand Down Expand Up @@ -785,12 +798,22 @@ subroutine runtime_diags (dt)
swerrs = (fswnets - fswdns) / (fswnets - c1)

! salt mass
msltn = micen*ice_ref_salinity*p001
mslts = mices*ice_ref_salinity*p001
if (saltflux_option == 'prognostic') then
! compute the total salt mass
msltn = stotn*rhoi*p001
mslts = stots*rhoi*p001

! change in salt mass
delmsltn = rhoi*(stotn-totsn)*p001
delmslts = rhoi*(stots-totss)*p001
else
msltn = micen*ice_ref_salinity*p001
mslts = mices*ice_ref_salinity*p001

! change in salt mass
delmsltn = delmxn*ice_ref_salinity*p001
delmslts = delmxs*ice_ref_salinity*p001
! change in salt mass
delmsltn = delmxn*ice_ref_salinity*p001
delmslts = delmxs*ice_ref_salinity*p001
endif

! salt error
serrn = (sfsaltn + delmsltn) / (msltn + c1)
Expand Down Expand Up @@ -1275,7 +1298,7 @@ subroutine init_mass_diags
rhoi, rhos, rhofresh

real (kind=dbl_kind), dimension (nx_block,ny_block,max_blocks) :: &
work1
work1, work2

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

Expand Down Expand Up @@ -1310,6 +1333,12 @@ subroutine init_mass_diags
toten = global_sum(work1, distrb_info, field_loc_center, tarean)
totes = global_sum(work1, distrb_info, field_loc_center, tareas)

! north/south salt
call total_salt (work2)
totsn = global_sum(work2, distrb_info, field_loc_center, tarean)
totss = global_sum(work2, distrb_info, field_loc_center, tareas)


if (print_points) then
do n = 1, npnt
if (my_task == pmloc(n)) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ subroutine init_hist (dt)
use ice_history_fsd, only: init_hist_fsd_2D, init_hist_fsd_3Df, &
init_hist_fsd_4Df, f_afsd, f_afsdn
use ice_restart_shared, only: restart
use ice_fileunits, only: goto_nml

real (kind=dbl_kind), intent(in) :: &
dt ! time step
Expand All @@ -102,7 +103,11 @@ subroutine init_hist (dt)
character (len=25) :: &
cstr_gat, cstr_gau, cstr_gav, & ! mask area name for t, u, v atm grid (ga)
cstr_got, cstr_gou, cstr_gov ! mask area name for t, u, v ocn grid (go)
character(len=char_len) :: description
character (len=25) :: &
gridstr2D, gridstr ! temporary string names
character(len=char_len) :: description
character(len=char_len_long) :: tmpstr2 ! for namelist check
character(len=char_len) :: nml_name ! text namelist name

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

Expand Down Expand Up @@ -226,24 +231,39 @@ subroutine init_hist (dt)
file=__FILE__, line=__LINE__)

if (my_task == master_task) then
write(nu_diag,*) subname,' Reading icefields_nml'
nml_name = 'icefields_nml'
write(nu_diag,*) subname,' Reading ', trim(nml_name)

! open file
call get_fileunit(nu_nml)
open (nu_nml, file=trim(nml_filename), status='old',iostat=nml_error)
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: icefields_nml open file '// &
call abort_ice(subname//'ERROR: '//trim(nml_name)//' open file '// &
trim(nml_filename), &
file=__FILE__, line=__LINE__)
endif

! seek to this namelist
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)
read(nu_nml, nml=icefields_nml,iostat=nml_error)
! check if error
if (nml_error /= 0) then
! backspace and re-read erroneous line
backspace(nu_nml)
read(nu_nml,fmt='(A)') tmpstr2
call abort_ice(subname//'ERROR: ' // trim(nml_name) // ' reading ' // &
trim(tmpstr2), file=__FILE__, line=__LINE__)
endif
end do
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: icefields_nml reading ', &
file=__FILE__, line=__LINE__)
endif

close(nu_nml)
call release_fileunit(nu_nml)
endif
Expand Down Expand Up @@ -418,10 +438,6 @@ subroutine init_hist (dt)
f_taubyE = f_tauby
endif

#ifndef ncdf
f_bounds = .false.
#endif

! write dimensions for 3D or 4D history variables
! note: list of variables checked here is incomplete
if (f_aicen(1:1) /= 'x' .or. f_vicen(1:1) /= 'x' .or. &
Expand Down Expand Up @@ -1307,21 +1323,25 @@ subroutine init_hist (dt)
select case (grid_ice)
case('B')
description = ", on U grid (NE corner values)"
gridstr2d = trim(ustr2D)
gridstr = trim(ucstr)
case ('CD','C')
description = ", on T grid"
gridstr2d = trim(tstr2D)
gridstr = trim(tcstr)
end select

call define_hist_field(n_sig1,"sig1","1",ustr2D, ucstr, &
call define_hist_field(n_sig1,"sig1","1",gridstr2d, gridstr, &
"norm. principal stress 1", &
"sig1 is instantaneous" // trim(description), c1, c0, &
ns1, f_sig1)

call define_hist_field(n_sig2,"sig2","1",ustr2D, ucstr, &
call define_hist_field(n_sig2,"sig2","1",gridstr2d, gridstr, &
"norm. principal stress 2", &
"sig2 is instantaneous" // trim(description), c1, c0, &
ns1, f_sig2)

call define_hist_field(n_sigP,"sigP","1",ustr2D, ucstr, &
call define_hist_field(n_sigP,"sigP","1",gridstr2d, gridstr, &
"ice pressure", &
"sigP is instantaneous" // trim(description), c1, c0, &
ns1, f_sigP)
Expand Down Expand Up @@ -2162,12 +2182,13 @@ subroutine accum_hist (dt)

real (kind=dbl_kind) :: awtvdr, awtidr, awtvdf, awtidf, puny, secday, rad_to_deg
real (kind=dbl_kind) :: Tffresh, rhoi, rhos, rhow, ice_ref_salinity
real (kind=dbl_kind) :: rho_ice, rho_ocn, Tice, Sbr, phi, rhob, dfresh, dfsalt
real (kind=dbl_kind) :: rho_ice, rho_ocn, Tice, Sbr, phi, rhob, dfresh, dfsalt, sicen
logical (kind=log_kind) :: formdrag, skl_bgc
logical (kind=log_kind) :: tr_pond, tr_aero, tr_brine, tr_snow
integer (kind=int_kind) :: ktherm
integer (kind=int_kind) :: nt_sice, nt_qice, nt_qsno, nt_iage, nt_FY, nt_Tsfc, &
nt_alvl, nt_vlvl
character (len=char_len) :: saltflux_option

type (block) :: &
this_block ! block information for current block
Expand All @@ -2179,6 +2200,7 @@ subroutine accum_hist (dt)
call icepack_query_parameters(Tffresh_out=Tffresh, rhoi_out=rhoi, rhos_out=rhos, &
rhow_out=rhow, ice_ref_salinity_out=ice_ref_salinity)
call icepack_query_parameters(formdrag_out=formdrag, skl_bgc_out=skl_bgc, ktherm_out=ktherm)
call icepack_query_parameters(saltflux_option_out=saltflux_option)
call icepack_query_tracer_flags(tr_pond_out=tr_pond, tr_aero_out=tr_aero, &
tr_brine_out=tr_brine, tr_snow_out=tr_snow)
call icepack_query_tracer_indices(nt_sice_out=nt_sice, nt_qice_out=nt_qice, &
Expand Down Expand Up @@ -2263,7 +2285,7 @@ subroutine accum_hist (dt)
!---------------------------------------------------------------

!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block, &
!$OMP k,n,qn,ns,sn,rho_ocn,rho_ice,Tice,Sbr,phi,rhob,dfresh,dfsalt, &
!$OMP k,n,qn,ns,sn,rho_ocn,rho_ice,Tice,Sbr,phi,rhob,dfresh,dfsalt,sicen, &
!$OMP worka,workb,worka3,Tinz4d,Sinz4d,Tsnz4d)

do iblk = 1, nblocks
Expand Down Expand Up @@ -3222,7 +3244,16 @@ subroutine accum_hist (dt)
dfresh = -rhoi*frazil(i,j,iblk)/dt
endif
endif
dfsalt = ice_ref_salinity*p001*dfresh
if (saltflux_option == 'prognostic') then
sicen = c0
do k = 1, nzilyr
sicen = sicen + trcr(i,j,nt_sice+k-1,iblk)*vice(i,j,iblk) &
/ real(nzilyr,kind=dbl_kind)
enddo
dfsalt = sicen*p001*dfresh
else
dfsalt = ice_ref_salinity*p001*dfresh
endif
worka(i,j) = aice(i,j,iblk)*(fsalt(i,j,iblk)+dfsalt)
endif
enddo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ subroutine init_hist_bgc_2D
use ice_communicate, only: my_task, master_task
use ice_history_shared, only: tstr2D, tcstr, define_hist_field, &
f_fsalt, f_fsalt_ai, f_sice
use ice_fileunits, only: goto_nml

integer (kind=int_kind) :: n, ns
integer (kind=int_kind) :: nml_error ! namelist i/o error flag
Expand All @@ -283,6 +284,9 @@ subroutine init_hist_bgc_2D
tr_bgc_DON, tr_bgc_Fe, tr_bgc_hum, &
skl_bgc, solve_zsal, z_tracers

character(len=char_len) :: nml_name ! for namelist check
character(len=char_len_long) :: tmpstr2 ! for namelist check

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

call icepack_query_parameters(skl_bgc_out=skl_bgc, &
Expand All @@ -305,24 +309,39 @@ subroutine init_hist_bgc_2D
!-----------------------------------------------------------------

if (my_task == master_task) then
write(nu_diag,*) subname,' Reading icefields_bgc_nml'
nml_name = 'icefields_bgc_nml'
write(nu_diag,*) subname,' Reading ', trim(nml_name)

! check if can open file
call get_fileunit(nu_nml)
open (nu_nml, file=trim(nml_filename), status='old',iostat=nml_error)
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: icefields_bgc_nml open file '// &
call abort_ice(subname//'ERROR: '//trim(nml_name)//' open file '// &
trim(nml_filename), &
file=__FILE__, line=__LINE__)
endif

! seek to 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)
read(nu_nml, nml=icefields_bgc_nml,iostat=nml_error)
! check if error
if (nml_error /= 0) then
! backspace and re-read erroneous line
backspace(nu_nml)
read(nu_nml,fmt='(A)') tmpstr2
call abort_ice(subname//'ERROR: ' // trim(nml_name) // ' reading ' // &
trim(tmpstr2), file=__FILE__, line=__LINE__)
endif
end do
if (nml_error /= 0) then
call abort_ice(subname//'ERROR: icefields_bgc_nml reading ', &
file=__FILE__, line=__LINE__)
endif

close(nu_nml)
call release_fileunit(nu_nml)
endif
Expand Down
Loading