Skip to content

Commit

Permalink
Remove _old options for tfrz_option (#468)
Browse files Browse the repository at this point in the history
* Remove older "_old" tfrz_options, added for backwards compatibility

Modify tfrz_option logic in icepack_sea_freezing_temperature to trap unsupported values

* Update Icepack set_nml settings, remove _old from tfrz_option
  • Loading branch information
apcraig authored Oct 13, 2023
1 parent aea58f3 commit f6989f1
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 24 deletions.
13 changes: 9 additions & 4 deletions columnphysics/icepack_therm_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -393,22 +393,27 @@ function icepack_sea_freezing_temperature(sss) result(Tf)

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

if (trim(tfrz_option(1:5)) == 'mushy') then
if (trim(tfrz_option) == 'mushy') then

Tf = icepack_liquidus_temperature(sss) ! deg C

elseif (trim(tfrz_option(1:11)) == 'linear_salt') then
elseif (trim(tfrz_option) == 'linear_salt') then

Tf = -depressT * sss ! deg C

elseif (trim(tfrz_option(1:8)) == 'constant') then
elseif (trim(tfrz_option) == 'constant') then

Tf = Tocnfrz

else
elseif (trim(tfrz_option) == 'minus1p8') then

Tf = -1.8_dbl_kind

else

call icepack_warnings_add(subname//' tfrz_option unsupported: '//trim(tfrz_option))
call icepack_warnings_setabort(.true.,__FILE__,__LINE__)

endif

end function icepack_sea_freezing_temperature
Expand Down
13 changes: 2 additions & 11 deletions columnphysics/icepack_tracers.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
module icepack_tracers

use icepack_kinds
use icepack_parameters, only: c0, c1, puny, rhos, rsnw_fall, rhosnew, Tocnfrz, tfrz_option
use icepack_parameters, only: c0, c1, puny, rhos, rsnw_fall, rhosnew
use icepack_parameters, only: snwredist, snwgrain
use icepack_warnings, only: warnstr, icepack_warnings_add
use icepack_warnings, only: icepack_warnings_setabort, icepack_warnings_aborted
Expand Down Expand Up @@ -1265,16 +1265,7 @@ subroutine icepack_compute_tracers (ntrcr, trcr_depend, &
else
trcrn(it) = c0
if (it == nt_Tsfc) then
! tcraig, these old options should be deprecated
! exist for bit-for-bit backwards compatibility in testing
if (tfrz_option == "mushy_old" .or. &
tfrz_option == "linear_salt_old" .or. &
tfrz_option == "constant_old" .or. &
tfrz_option == "minus1p8_old") then
trcrn(it) = Tocnfrz ! surface temperature
else
trcrn(it) = Tf ! surface temperature
endif
trcrn(it) = Tf ! surface temperature
endif
endif

Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.alt03
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
sw_redist = .true.
sw_frac = 0.9d0
sw_dtemp = 0.02d0
tfrz_option = 'linear_salt_old'
tfrz_option = 'linear_salt'
conduct = 'bubbly'
conserv_check = .true.
restore_ocn = .true.
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 @@ -8,7 +8,7 @@
sw_redist = .true.
sw_frac = 0.9d0
sw_dtemp = 0.02d0
tfrz_option = 'linear_salt_old'
tfrz_option = 'linear_salt'
conduct = 'bubbly'
krdg_partic = 0
krdg_redist = 0
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.bgcispol
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
tr_bgc_hum = .true.
tr_bgc_DON = .true.
tr_bgc_Fe = .false.
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.bgcnice
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
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.bgcsklnice
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ year_init = 2015
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.fsd12
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tr_fsd = .true.
wave_spec_type = 'constant'
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.leap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
days_per_year = 365
use_leap_years = .true.
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.modal
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ tr_aero = .true.
modal_aero = .true.
rfracmin = 0.15
rfracmax = 1.0
tfrz_option = 'mushy_old'
tfrz_option = 'mushy'

2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.thermo1
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ sw_redist = .true.
sw_frac = 0.9d0
sw_dtemp = 0.02d0
conduct = 'MU71'
tfrz_option = 'linear_salt_old'
tfrz_option = 'linear_salt'
atm_data_type = 'clim'

0 comments on commit f6989f1

Please sign in to comment.