Skip to content

Commit

Permalink
Remove use of the deprecated "_old" tfrz_options in set_nml files. Th…
Browse files Browse the repository at this point in the history
…is (CICE-Consortium#883)

changes answers for some test cases, as expected.

Update tfrz_option implementation to not allow _old options.
  • Loading branch information
apcraig authored Oct 13, 2023
1 parent 2765630 commit 48a92ef
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 24 deletions.
18 changes: 8 additions & 10 deletions cicecore/cicedyn/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1510,15 +1510,14 @@ subroutine input_data
abort_list = trim(abort_list)//":13"
endif

! tcraig, is it really OK for users to run inconsistently?
! ech: yes, for testing sensitivities. It's not recommended for science runs
if (ktherm == 1 .and. trim(tfrz_option(1:11)) /= 'linear_salt') then
! ech: allow inconsistency for testing sensitivities. It's not recommended for science runs
if (ktherm == 1 .and. trim(tfrz_option) /= 'linear_salt') then
if (my_task == master_task) then
write(nu_diag,*) subname//' WARNING: ktherm = 1 and tfrz_option = ',trim(tfrz_option)
write(nu_diag,*) subname//' WARNING: For consistency, set tfrz_option = linear_salt'
endif
endif
if (ktherm == 2 .and. trim(tfrz_option(1:5)) /= 'mushy') then
if (ktherm == 2 .and. trim(tfrz_option) /= 'mushy') then
if (my_task == master_task) then
write(nu_diag,*) subname//' WARNING: ktherm = 2 and tfrz_option = ',trim(tfrz_option)
write(nu_diag,*) subname//' WARNING: For consistency, set tfrz_option = mushy'
Expand All @@ -1530,7 +1529,6 @@ subroutine input_data
write(nu_diag,*) subname//' WARNING: For consistency, set saltflux_option = constant'
endif
endif
!tcraig
if (ktherm == 1 .and. .not.sw_redist) then
if (my_task == master_task) then
write(nu_diag,*) subname//' WARNING: ktherm = 1 and sw_redist = ',sw_redist
Expand Down Expand Up @@ -2104,19 +2102,19 @@ subroutine input_data
if (trim(saltflux_option) == 'constant') then
write(nu_diag,1002) ' ice_ref_salinity = ',ice_ref_salinity
endif
if (trim(tfrz_option(1:8)) == 'constant') then
if (trim(tfrz_option) == 'constant') then
tmpstr2 = ' : constant ocean freezing temperature (Tocnfrz)'
elseif (trim(tfrz_option(1:8)) == 'minus1p8') then
elseif (trim(tfrz_option) == 'minus1p8') then
tmpstr2 = ' : constant ocean freezing temperature (-1.8C) (to be deprecated)'
elseif (trim(tfrz_option(1:11)) == 'linear_salt') then
elseif (trim(tfrz_option) == 'linear_salt') then
tmpstr2 = ' : linear function of salinity (use with ktherm=1)'
elseif (trim(tfrz_option(1:5)) == 'mushy') then
elseif (trim(tfrz_option) == 'mushy') then
tmpstr2 = ' : Assur (1958) as in mushy-layer thermo (ktherm=2)'
else
tmpstr2 = ' : unknown value'
endif
write(nu_diag,1030) ' tfrz_option = ', trim(tfrz_option),trim(tmpstr2)
if (trim(tfrz_option(1:8)) == 'constant') then
if (trim(tfrz_option) == 'constant') then
write(nu_diag,1002) ' Tocnfrz = ', Tocnfrz
endif
if (update_ocn_f) then
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.alt04
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ krdg_partic = 0
krdg_redist = 0
frzpnd = 'ccsm'
natmiter = 20
tfrz_option = 'linear_salt_old'
tfrz_option = 'linear_salt'
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.alt06
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ ncat = 7
kcatbound = 3
nslyr = 3
ice_ic = 'internal'
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.bgcskl
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ tr_bgc_PON = .true.
tr_bgc_hum = .true.
tr_bgc_DON = .true.
tr_bgc_Fe = .true.
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'

2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.bgcsklclim
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ tr_bgc_PON = .true.
tr_bgc_hum = .true.
tr_bgc_DON = .true.
tr_bgc_Fe = .true.
tfrz_option = "mushy_old"
tfrz_option = "mushy"
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.bgcz
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ tr_bgc_DON = .true.
tr_bgc_Fe = .true.
# modal_aero = .true.
# dEdd_algae = .true.
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.bgczclim
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ tr_bgc_PON = .true.
tr_bgc_hum = .true.
tr_bgc_DON = .true.
tr_bgc_Fe = .true.
tfrz_option = "mushy_old"
tfrz_option = "mushy"


2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.bgczm
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ tr_bgc_DON = .true.
tr_bgc_Fe = .true.
modal_aero = .true.
# dEdd_algae = .true.
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.boxadv
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ krdg_partic = 0
krdg_redist = 0
shortwave = 'ccsm3'
albedo_type = 'constant'
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.boxchan1e
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ice_data_dist = 'uniform'
calc_strair = .false.
rotate_wind = .false.
restore_ice = .false.
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'
f_aice = 'd1'
f_hi = 'd1'
f_hs = 'd'
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.boxchan1n
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ice_data_dist = 'uniform'
calc_strair = .false.
rotate_wind = .false.
restore_ice = .false.
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'
f_aice = 'd1'
f_hi = 'd1'
f_hs = 'd'
Expand Down
4 changes: 2 additions & 2 deletions configuration/scripts/tests/baseline.script
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ if (${ICE_BFBCOMP} != ${ICE_SPVAL}) then
@ cnt = $cnt + 1
echo "Waiting for $job to complete $cnt"
sleep 60 # Sleep for 1 minute, so as not to overwhelm the queue manager
if ($cnt > 100) then
if ($cnt > 30) then
echo "No longer waiting for $job to complete"
set qstatjob = 0 # Abandon check after 100 sleep 60 checks
set qstatjob = 0 # Abandon check after cnt sleep 60 checks
endif
endif
# echo $qstatjob
Expand Down
2 changes: 0 additions & 2 deletions configuration/scripts/tests/omp_suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ smoke gbox128 14x2 boxrestore,reprosum,run10day,gridcd
smoke gbox80 4x5 box2001,reprosum,run10day,gridcd
smoke gbox80 11x3 boxslotcyl,reprosum,run10day,gridcd

sleep 180

#gridB

smoke gx3 4x2 diag1,reprosum,run10day,cmplogrest smoke_gx3_8x4_diag1_reprosum_run10day
Expand Down

0 comments on commit 48a92ef

Please sign in to comment.