From fe3338e3ddd589ee94f37d8c1daaf90a55efc0b2 Mon Sep 17 00:00:00 2001 From: Lettie Roach Date: Wed, 12 Oct 2022 13:29:04 -0400 Subject: [PATCH 01/10] Clarifications to FSD documentation (#405) * Clarifications to documentation * Edit documentation * Update docs * Add space --- doc/source/science_guide/sg_itd.rst | 19 +++++++++++-------- doc/source/user_guide/ug_case_settings.rst | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/doc/source/science_guide/sg_itd.rst b/doc/source/science_guide/sg_itd.rst index 43b221788..d73983c84 100755 --- a/doc/source/science_guide/sg_itd.rst +++ b/doc/source/science_guide/sg_itd.rst @@ -106,14 +106,17 @@ In this theory, individual floes are identified with a size :math:`r` and area : distribution :math:`f(r,h) dr dh` is the fraction of grid surface area covered by ice with thickness between :math:`h` and :math:`h + dh` and lateral floe size between :math:`r` and :math:`r + dr`. The FSTD integrates over all floe sizes and -ice thicknesses to unity; over all floe sizes to the ITD; and over all thicknesses to the FSD. +ice thicknesses to unity (:math:`\int_r \int_h F(r,h) dr dh =1`); over all floe sizes to the ITD (:math:`\int_r F(r,h) dr =g(h)`); and over all thicknesses to the FSD (:math:`\int_h F(r,h)dh = f(r)`). -For implementation in CICE, the continuous function :math:`f(r,h)` is replaced +For implementation in CICE, the continuous function :math:`f(r,h)dr dh` is replaced with a product of two discrete variables: :math:`a_{in}` as defined above and :math:`F_{in,k}`. :math:`F_{in,k}` is the fraction of ice belonging to thickness category :math:`n` with lateral -floe size belonging to floe size class :math:`k`, giving +floe size belonging to floe size class :math:`k` (denoted ``afsdn`` in the code). +We then have :math:`\sum_{n=0}^{N_C}\sum_{k=0}^{N_f} a_{in} F_{in,k} = 1` and :math:`\sum_{k=0}^{N_f} F_{in,k} = 1`. -:math:`F_{in,k}` is carried as an area-weighted tracer. +:math:`F_{in,k}` is carried as an area-weighted tracer. The FSD (continuous function :math:`f(r)dr` +or discrete function :math:`f_{k}`, denoted ``afsd`` in the code) is recovered via +:math:`\sum_{n=1}^{N_C} a_{in} F_{in,k} = f_{k}`. The FSD may be ignored when considering processes that only modify ice thickness (eg. vertical thermodynamics), and the ITD can be ignored when considering processes that only modify floe sizes (eg. wave fracture). For processes that affect both the ITD and the FSD, (eg. lateral melt), @@ -138,7 +141,7 @@ in thickness and lateral size, at a rate :math:`\mathbf{G} = (G_r,G_h)`. The thi term represents growth of new ice: new floes are created at a rate :math:`\dot{A}_p` in the smallest thickness category and a given lateral size category. If wave forcing is provided, the size of newly formed floes is determined via a tensile stress limitation -arising from the wave field (:cite:`Shen01`,:cite:`Roach19`); otherwise, all floes +arising from the wave field (:cite:`Shen01`, :cite:`Roach19`); otherwise, all floes are presumed to grow as pancakes in the smallest floe size category resolved. To allow for the joining of individual floes to one another, we represent the welding together of floes in freezing conditions via the fourth term, @@ -174,13 +177,13 @@ currently supports ``nfsd = 1, 12, 16, 24``. Although ``nfsd = 1`` tracks the s is assumed when ``tr_fsd=false``, the processes acting on the floes differ. It is assumed that the floe size lies at the midpoint of each floe size category. -If simulations begin without ice (``ice_init='none'``), the FSD can emerge without initialization. This -is the recommended initialization for studies on the FSD itself. If simulations begin with ice cover, +If simulations begin without ice (``ice_init='none'``), the FSD can emerge without initialization. +If simulations begin with ice cover, some initial FSD must be prescribed in ``init_fsd``. The default (used for ``ice_init='default'``) is a simple relationship determined from point observations by :cite:`Perovich14`, but its basin-wide applicability has not been tested. In Icepack, ``ice_init='default'`` is selected for the slab and the full ITD cells. - +The history output includes FSD tendency terms for each of the floe-size-modifying processes. Note that the sum of these does not equal the change in the FSD, as the FSD is also modified by changes in the ITD. diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 649e28efd..b0d9158ab 100755 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -373,7 +373,7 @@ forcing_nml "", "``true``", "include frazil water/salt fluxes in ocn fluxes", "" "``ustar_min``", "real", "minimum value of ocean friction velocity in m/s", "0.005" "``wave_spec_type``", "``constant``", "wave data file is provided, constant wave spectrum, for testing", "``none``" - "", "``none``", "no wave data provided, no wave-ice interactions", "" + "", "``none``", "no wave data provided, no wave-ice interactions (not recommended when using the FSD)", "" "", "``profile``", "no wave data file is provided, use fixed dummy wave spectrum, for testing", "" "", "``random``", "wave data file is provided, wave spectrum generated using random number", "" "``ycycle``", "integer", "number of years in forcing data cycle", "1" From 3fb5f0ec5ede823dfea04561637d499632a3db7e Mon Sep 17 00:00:00 2001 From: daveh150 Date: Wed, 12 Oct 2022 13:46:14 -0500 Subject: [PATCH 02/10] Corrected variable name swndf, swndr to swidf, swidr to match what is in CICE code (#406) --- doc/source/icepack_index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/icepack_index.rst b/doc/source/icepack_index.rst index e79c52afb..330dc480d 100755 --- a/doc/source/icepack_index.rst +++ b/doc/source/icepack_index.rst @@ -443,8 +443,8 @@ either Celsius or Kelvin units). "strocnx(y)", "ice–ocean stress in the x(y)-direction (U-cell)", "N/m\ :math:`^2`" "strocnx(y)T", "ice–ocean stress, x(y)-dir. (T-cell)", "N/m\ :math:`^2`" "strtltx(y)", "surface stress due to sea surface slope", "N/m\ :math:`^2`" - "swndf", "incoming shortwave radiation, near IR, diffuse", "W/m\ :math:`^2`" - "swndr", "incoming shortwave radiation, near IR, direct", "W/m\ :math:`^2`" + "swidf", "incoming shortwave radiation, near IR, diffuse", "W/m\ :math:`^2`" + "swidr", "incoming shortwave radiation, near IR, direct", "W/m\ :math:`^2`" "swvdf", "incoming shortwave radiation, visible, diffuse", "W/m\ :math:`^2`" "swvdr", "incoming shortwave radiation, visible, direct", "W/m\ :math:`^2`" "sw_redist", "option to redistribute shortwave", ".false." From b77d51c3aef823bdb045caec7c4bdea70ce9e1ff Mon Sep 17 00:00:00 2001 From: Lettie Roach Date: Thu, 20 Oct 2022 18:23:27 -0400 Subject: [PATCH 03/10] Add warning for FSD without waves, clarify documentation (#409) * Clarifications to documentation * Edit documentation * Update docs * Add space * Add warning for waves=F and FSD=T * Clarify documentation on wave forcing --- configuration/driver/icedrv_init.F90 | 3 +++ doc/source/user_guide/ug_case_settings.rst | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) mode change 100755 => 100644 doc/source/user_guide/ug_case_settings.rst diff --git a/configuration/driver/icedrv_init.F90 b/configuration/driver/icedrv_init.F90 index 7aa71361b..bd3ed1501 100644 --- a/configuration/driver/icedrv_init.F90 +++ b/configuration/driver/icedrv_init.F90 @@ -650,6 +650,9 @@ subroutine input_data wave_spec = .false. if (tr_fsd .and. (trim(wave_spec_type) /= 'none')) wave_spec = .true. + if (tr_fsd .and. (trim(wave_spec_type) == 'none')) then + write (nu_diag,*) 'WARNING: tr_fsd=T but wave_spec=F - not recommended' + end if !----------------------------------------------------------------- ! spew diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst old mode 100755 new mode 100644 index b0d9158ab..9d1e15663 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -372,10 +372,10 @@ forcing_nml "``update_ocn_f``", "``.false.``", "do not include frazil water/salt fluxes in ocn fluxes", "``.false.``" "", "``true``", "include frazil water/salt fluxes in ocn fluxes", "" "``ustar_min``", "real", "minimum value of ocean friction velocity in m/s", "0.005" - "``wave_spec_type``", "``constant``", "wave data file is provided, constant wave spectrum, for testing", "``none``" + "``wave_spec_type``", "``constant``", "wave data file is provided, sea surface height generated using constant phase (1 iteration of wave fracture)", "``none``" "", "``none``", "no wave data provided, no wave-ice interactions (not recommended when using the FSD)", "" - "", "``profile``", "no wave data file is provided, use fixed dummy wave spectrum, for testing", "" - "", "``random``", "wave data file is provided, wave spectrum generated using random number", "" + "", "``profile``", "no wave data file is provided, use fixed dummy wave spectrum, for testing, sea surface height generated using constant phase (1 iteration of wave fracture)", "" + "", "``random``", "wave data file is provided, sea surface height generated using random number (multiple iterations of wave fracture)", "" "``ycycle``", "integer", "number of years in forcing data cycle", "1" "", "", "", "" From 18fc1c9b79d81604eafdb1fac4ddd039b78ad390 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Tue, 15 Nov 2022 13:27:03 -0700 Subject: [PATCH 04/10] finalize 0-layer thermo and cesm ponds deprecation in Icepack (#411) * finalize 0-layer thermo and cesm ponds deprecation * set default hs0=0 and document * formatting table in doc * revert default hs0 = 0.03 --- columnphysics/icepack_itd.F90 | 177 ----------- columnphysics/icepack_mechred.F90 | 11 - columnphysics/icepack_meltpond_cesm.F90 | 157 ---------- columnphysics/icepack_meltpond_lvl.F90 | 4 - columnphysics/icepack_meltpond_topo.F90 | 80 ----- columnphysics/icepack_parameters.F90 | 68 ---- columnphysics/icepack_shortwave.F90 | 126 -------- columnphysics/icepack_therm_0layer.F90 | 343 --------------------- columnphysics/icepack_therm_itd.F90 | 20 -- columnphysics/icepack_therm_shared.F90 | 28 +- columnphysics/icepack_therm_vertical.F90 | 125 -------- columnphysics/icepack_tracers.F90 | 26 -- configuration/driver/icedrv_init.F90 | 101 +----- configuration/driver/icedrv_restart.F90 | 76 ----- doc/source/icepack_index.rst | 24 +- doc/source/science_guide/sg_thermo.rst | 80 ++--- doc/source/science_guide/sg_tracers.rst | 6 +- doc/source/user_guide/ug_case_settings.rst | 9 +- 18 files changed, 46 insertions(+), 1415 deletions(-) delete mode 100644 columnphysics/icepack_meltpond_cesm.F90 delete mode 100644 columnphysics/icepack_therm_0layer.F90 diff --git a/columnphysics/icepack_itd.F90 b/columnphysics/icepack_itd.F90 index 0a177e5eb..75f60aa95 100644 --- a/columnphysics/icepack_itd.F90 +++ b/columnphysics/icepack_itd.F90 @@ -764,9 +764,6 @@ subroutine cleanup_itd (dt, ntrcr, & nbtrcr, nblyr, & tr_aero, & tr_pond_topo, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, & -#endif first_ice, & trcr_depend, trcr_base, & n_trcr_strata,nt_strata, & @@ -816,12 +813,7 @@ subroutine cleanup_itd (dt, ntrcr, & logical (kind=log_kind), intent(in) :: & tr_aero, & ! aerosol flag -#ifdef UNDEPRECATE_0LAYER - tr_pond_topo, & ! topo pond flag - heat_capacity ! if false, ice and snow have zero heat capacity -#else tr_pond_topo ! topo pond flag -#endif logical (kind=log_kind), dimension(ncat), intent(inout) :: & first_ice ! For bgc and S tracers. set to true if zapping ice. @@ -978,11 +970,7 @@ subroutine cleanup_itd (dt, ntrcr, & !------------------------------------------------------------------- call zap_snow_temperature(dt, ncat, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, nblyr, & -#else nblyr, & -#endif nslyr, aicen, & trcrn, vsnon, & dfresh, dfhocn, & @@ -1022,21 +1010,6 @@ subroutine cleanup_itd (dt, ntrcr, & if (present(fzsal)) & fzsal = fzsal + dfzsal -#ifdef UNDEPRECATE_0LAYER - !---------------------------------------------------------------- - ! If using zero-layer model (no heat capacity), check that the - ! energy of snow and ice is correct. - !---------------------------------------------------------------- - - if ((.not. heat_capacity) .and. aice > puny) then - call zerolayer_check (ncat, nilyr, & - nslyr, aicen, & - vicen, vsnon, & - trcrn) - if (icepack_warnings_aborted(subname)) return - endif -#endif - end subroutine cleanup_itd !======================================================================= @@ -1468,9 +1441,6 @@ end subroutine zap_snow !======================================================================= subroutine zap_snow_temperature(dt, ncat, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, & -#endif nblyr, & nslyr, aicen, & trcrn, vsnon, & @@ -1490,10 +1460,6 @@ subroutine zap_snow_temperature(dt, ncat, & real (kind=dbl_kind), intent(in) :: & dt ! time step -#ifdef UNDEPRECATE_0LAYER - logical (kind=log_kind), intent(in) :: & - heat_capacity ! if false, ice and snow have zero heat capacity -#endif real (kind=dbl_kind), dimension (:), intent(in) :: & aicen ! concentration of ice @@ -1555,11 +1521,7 @@ subroutine zap_snow_temperature(dt, ncat, & do k = 1, nslyr ! snow enthalpy and max temperature -#ifdef UNDEPRECATE_0LAYER - if (hsn > hs_min .and. heat_capacity) then -#else if (hsn > hs_min) then -#endif ! zqsn < 0 zqsn = trcrn(nt_qsno+k-1,n) Tmax = -zqsn*puny*rnslyr / (rhos*cp_ice*vsnon(n)) @@ -1610,145 +1572,6 @@ subroutine zap_snow_temperature(dt, ncat, & end subroutine zap_snow_temperature -#ifdef UNDEPRECATE_0LAYER -!======================================================================= -! Checks that the snow and ice energy in the zero layer thermodynamics -! model still agrees with the snow and ice volume. -! If there is an error, the model will abort. -! This subroutine is only called if heat_capacity = .false. -! -! author: Alison McLaren, Met Office -! May 2010: ECH replaced eicen, esnon with trcrn but did not test -! the changes. The loop below runs over n=1,ncat and I added loops -! over k, making the test more stringent. - - subroutine zerolayer_check (ncat, nilyr, & - nslyr, aicen, & - vicen, vsnon, & - trcrn) - - integer (kind=int_kind), intent(in) :: & - ncat , & ! number of thickness categories - nilyr , & ! number of ice layers - nslyr ! number of snow layers - - real (kind=dbl_kind), dimension (:), intent(inout) :: & - aicen , & ! concentration of ice - vicen , & ! volume per unit area of ice (m) - vsnon ! volume per unit area of snow (m) - - real (kind=dbl_kind), dimension (:,:), intent(inout) :: & - trcrn ! ice tracers - - ! local variables - - integer (kind=int_kind) :: & - k , & ! vertical index - n ! category index - - real (kind=dbl_kind) :: & - max_error ! max error in zero layer energy check - ! (so max volume error = puny) - - real (kind=dbl_kind), dimension (ncat) :: & - eicen ! energy of melting for each ice layer (J/m^2) - - real (kind=dbl_kind), dimension (ncat) :: & - esnon ! energy of melting for each snow layer (J/m^2) - - logical (kind=log_kind) :: & - ice_energy_correct , & ! zero layer ice energy check - snow_energy_correct ! zero layer snow energy check - - real (kind=dbl_kind) :: & - worka, workb - - character(len=*),parameter :: subname='(zerolayer_check)' - - !----------------------------------------------------------------- - ! Initialize - !----------------------------------------------------------------- - - max_error = puny*Lfresh*rhos ! max error in zero layer energy check - ! (so max volume error = puny) - - !---------------------------------------------------------------- - ! Calculate difference between ice and snow energies and the - ! energy values derived from the ice and snow volumes - !---------------------------------------------------------------- - - ice_energy_correct = .true. - snow_energy_correct = .true. - - worka = c0 - workb = c0 - - do n = 1, ncat - - eicen(n) = c0 - do k = 1, nilyr - eicen(n) = eicen(n) + trcrn(nt_qice+k-1,n) & - * vicen(n) / real(nilyr,kind=dbl_kind) - enddo - worka = eicen(n) + rhoi * Lfresh * vicen(n) - esnon(n) = c0 - do k = 1, nslyr - esnon(n) = esnon(n) + trcrn(nt_qsno+k-1,n) & - * vsnon(n) / real(nslyr,kind=dbl_kind) - enddo - workb = esnon(n) + rhos * Lfresh * vsnon(n) - - if(abs(worka) > max_error) ice_energy_correct = .false. - if(abs(workb) > max_error) snow_energy_correct = .false. - - !---------------------------------------------------------------- - ! If there is a problem, abort with error message - !---------------------------------------------------------------- - - if (.not. ice_energy_correct) then - - if (abs(worka) > max_error) then - call icepack_warnings_setabort(.true.,__FILE__,__LINE__) - call icepack_warnings_add(subname//' zerolayer check - wrong ice energy') - write(warnstr,*) subname, 'n:', n - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'eicen =', eicen(n) - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'error=', worka - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'vicen =', vicen(n) - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'aicen =', aicen(n) - call icepack_warnings_add(warnstr) - endif - - endif - if (icepack_warnings_aborted(subname)) return - - if (.not. snow_energy_correct) then - - if (abs(workb) > max_error) then - call icepack_warnings_setabort(.true.,__FILE__,__LINE__) - call icepack_warnings_add(subname//' zerolayer check - wrong snow energy') - write(warnstr,*) subname, 'n:', n - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'esnon =', esnon(n) - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'error=', workb - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'vsnon =', vsnon(n) - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'aicen =', aicen(n) - call icepack_warnings_add(warnstr) - return - endif - - endif - - enddo ! ncat - - end subroutine zerolayer_check -#endif !======================================================================= !autodocument_start icepack_init_itd ! Initialize area fraction and thickness boundaries for the itd model diff --git a/columnphysics/icepack_mechred.F90 b/columnphysics/icepack_mechred.F90 index 67138aca3..5ef805744 100644 --- a/columnphysics/icepack_mechred.F90 +++ b/columnphysics/icepack_mechred.F90 @@ -39,11 +39,7 @@ module icepack_mechred use icepack_parameters, only: puny, Lfresh, rhoi, rhos use icepack_parameters, only: kstrength, krdg_partic, krdg_redist, mu_rdg -#ifdef UNDEPRECATE_0LAYER - use icepack_parameters, only: heat_capacity, conserv_check -#else use icepack_parameters, only: conserv_check -#endif use icepack_tracers, only: tr_pond_topo, tr_aero, tr_iso, tr_brine, ntrcr, nbtrcr use icepack_tracers, only: nt_qice, nt_qsno, nt_fbri, nt_sice use icepack_tracers, only: nt_alvl, nt_vlvl, nt_aero, nt_isosno, nt_isoice @@ -1818,9 +1814,6 @@ subroutine icepack_step_ridge (dt, ndtd, & !tr_pond_topo,& ! if .true., use explicit topography-based ponds !tr_aero ,& ! if .true., use aerosol tracers !tr_brine !,& ! if .true., brine height differs from ice thickness -#ifdef UNDEPRECATE_0LAYER - !heat_capacity ! if true, ice has nonzero heat capacity -#endif logical (kind=log_kind), dimension(:), intent(inout) :: & first_ice ! true until ice forms @@ -1911,11 +1904,7 @@ subroutine icepack_step_ridge (dt, ndtd, & n_aero, & nbtrcr, nblyr, & tr_aero, & -#ifdef UNDEPRECATE_0LAYER - tr_pond_topo, heat_capacity, & -#else tr_pond_topo, & -#endif first_ice, & trcr_depend, trcr_base, & n_trcr_strata, nt_strata, & diff --git a/columnphysics/icepack_meltpond_cesm.F90 b/columnphysics/icepack_meltpond_cesm.F90 deleted file mode 100644 index 24e6b762f..000000000 --- a/columnphysics/icepack_meltpond_cesm.F90 +++ /dev/null @@ -1,157 +0,0 @@ -!======================================================================= - -! CESM meltpond parameterization -! -! This meltpond parameterization was developed for use with the delta- -! Eddington radiation scheme, and only affects the radiation budget in -! the model. That is, although the pond volume is tracked, that liquid -! water is not used elsewhere in the model for mass budgets or other -! physical processes. -! -! authors David A. Bailey (NCAR) -! Marika M. Holland (NCAR) -! Elizabeth C. Hunke (LANL) - - module icepack_meltpond_cesm - -#ifdef UNDEPRECATE_CESMPONDS - use icepack_kinds - use icepack_parameters, only: c0, c1, c2, p01, puny - use icepack_parameters, only: rhofresh, rhoi, rhos, Timelt, pndaspect, use_smliq_pnd - use icepack_warnings, only: warnstr, icepack_warnings_add - use icepack_warnings, only: icepack_warnings_setabort, icepack_warnings_aborted - - implicit none - - private - public :: compute_ponds_cesm - -!======================================================================= - - contains - -!======================================================================= - - subroutine compute_ponds_cesm(dt, hi_min, & - rfrac, meltt, & - melts, frain, & - aicen, vicen, & - Tsfcn, apnd, hpnd, & - meltsliqn) - - real (kind=dbl_kind), intent(in) :: & - dt, & ! time step (s) - hi_min ! minimum ice thickness allowed for thermo (m) - - real (kind=dbl_kind), intent(in) :: & - meltsliqn, & ! liquid input from snow liquid tracer - rfrac, & ! water fraction retained for melt ponds - meltt, & - melts, & - frain, & - aicen, & - vicen - - real (kind=dbl_kind), intent(in) :: & - Tsfcn - - real (kind=dbl_kind), intent(inout) :: & - apnd, & - hpnd - -! local temporary variables - - real (kind=dbl_kind) :: & - volpn - - real (kind=dbl_kind) :: & - hi , & ! ice thickness (m) - dTs , & ! surface temperature diff for freeze-up (C) - Tp , & ! pond freezing temperature (C) - apondn, & - hpondn - - real (kind=dbl_kind), parameter :: & - Td = c2 , & ! temperature difference for freeze-up (C) - rexp = p01 , & ! pond contraction scaling - dpthhi = 0.9_dbl_kind ! ratio of pond depth to ice thickness - - character(len=*),parameter :: subname='(compute_ponds_cesm)' - - !----------------------------------------------------------------- - ! Initialize - !----------------------------------------------------------------- - volpn = hpnd * apnd * aicen - - !----------------------------------------------------------------- - ! Identify grid cells where ice can melt - !----------------------------------------------------------------- - - if (aicen > puny) then - - hi = vicen/aicen - - if (hi < hi_min) then - - !-------------------------------------------------------------- - ! Remove ponds on thin ice - !-------------------------------------------------------------- - apondn = c0 - hpondn = c0 - volpn = c0 - - else - - !----------------------------------------------------------- - ! Update pond volume - !----------------------------------------------------------- - if (use_smliq_pnd) then - volpn = volpn & - + rfrac/rhofresh*(meltt*rhoi & - + meltsliqn) & - * aicen - else - volpn = volpn & - + rfrac/rhofresh*(meltt*rhoi & - + melts*rhos & - + frain* dt)& - * aicen - endif - - !----------------------------------------------------------- - ! Shrink pond volume under freezing conditions - !----------------------------------------------------------- - Tp = Timelt - Td - dTs = max(Tp - Tsfcn,c0) - volpn = volpn * exp(rexp*dTs/Tp) - volpn = max(volpn, c0) - - ! fraction of ice covered by ponds - apondn = min (sqrt(volpn/(pndaspect*aicen)), c1) - hpondn = pndaspect * apondn - ! fraction of grid cell covered by ponds - apondn = apondn * aicen - - !----------------------------------------------------------- - ! Limit pond depth - !----------------------------------------------------------- - hpondn = min(hpondn, dpthhi*hi) - - endif - - !----------------------------------------------------------- - ! Reload tracer array - !----------------------------------------------------------- - apnd = apondn / aicen - hpnd = hpondn - - endif - - end subroutine compute_ponds_cesm - -#endif -!======================================================================= - - end module icepack_meltpond_cesm - -!======================================================================= diff --git a/columnphysics/icepack_meltpond_lvl.F90 b/columnphysics/icepack_meltpond_lvl.F90 index fe7b822f3..47ca49c98 100644 --- a/columnphysics/icepack_meltpond_lvl.F90 +++ b/columnphysics/icepack_meltpond_lvl.F90 @@ -47,11 +47,7 @@ subroutine compute_ponds_lvl(dt, nilyr, & integer (kind=int_kind), intent(in) :: & nilyr, & ! number of ice layers -#ifdef UNDEPRECATE_0LAYER - ktherm ! type of thermodynamics (0 0-layer, 1 BL99, 2 mushy) -#else ktherm ! type of thermodynamics (-1 none, 1 BL99, 2 mushy) -#endif real (kind=dbl_kind), intent(in) :: & dt, & ! time step (s) hi_min, & ! minimum ice thickness allowed for thermo (m) diff --git a/columnphysics/icepack_meltpond_topo.F90 b/columnphysics/icepack_meltpond_topo.F90 index 82f4920a7..830c7a0b0 100644 --- a/columnphysics/icepack_meltpond_topo.F90 +++ b/columnphysics/icepack_meltpond_topo.F90 @@ -39,11 +39,7 @@ module icepack_meltpond_topo !======================================================================= subroutine compute_ponds_topo(dt, ncat, nilyr, & -#ifdef UNDEPRECATE_0LAYER - ktherm, heat_capacity, & -#else ktherm, & -#endif aice, aicen, & vice, vicen, & vsno, vsnon, & @@ -58,11 +54,6 @@ subroutine compute_ponds_topo(dt, ncat, nilyr, & nilyr, & ! number of ice layers ktherm ! type of thermodynamics (0 0-layer, 1 BL99, 2 mushy) -#ifdef UNDEPRECATE_0LAYER - logical (kind=log_kind), intent(in) :: & - heat_capacity ! if true, ice has nonzero heat capacity - ! if false, use zero-layer thermodynamics -#endif real (kind=dbl_kind), intent(in) :: & dt ! time step (s) @@ -169,18 +160,11 @@ subroutine compute_ponds_topo(dt, ncat, nilyr, & ! calculate pond area and depth !-------------------------------------------------------------- call pond_area(dt, ncat, nilyr, & -#ifdef UNDEPRECATE_0LAYER - ktherm, heat_capacity, & -#else ktherm, & -#endif aice, vice, vsno, & aicen, vicen, vsnon, & qicen, sicen, & volpn, volp, & -#ifdef UNDEPRECATE_0LAYER - Tsfcn, Tf, & -#endif apondn, hpondn, dvn ) if (icepack_warnings_aborted(subname)) return @@ -308,44 +292,23 @@ end subroutine compute_ponds_topo ! Computes melt pond area, pond depth and melting rates subroutine pond_area(dt, ncat, nilyr,& -#ifdef UNDEPRECATE_0LAYER - ktherm, heat_capacity, & -#else ktherm, & -#endif aice, vice, vsno, & aicen, vicen, vsnon,& qicen, sicen, & volpn, volp, & -#ifdef UNDEPRECATE_0LAYER - Tsfcn, Tf, & -#endif apondn,hpondn,dvolp ) integer (kind=int_kind), intent(in) :: & ncat , & ! number of thickness categories nilyr, & ! number of ice layers -#ifdef UNDEPRECATE_0LAYER - ktherm ! type of thermodynamics (0 0-layer, 1 BL99, 2 mushy) -#else ktherm ! type of thermodynamics (-1 none, 1 BL99, 2 mushy) -#endif -#ifdef UNDEPRECATE_0LAYER - logical (kind=log_kind), intent(in) :: & - heat_capacity ! if true, ice has nonzero heat capacity - ! if false, use zero-layer thermodynamics - real (kind=dbl_kind), intent(in) :: & - dt, aice, vice, vsno, Tf - real (kind=dbl_kind), dimension(:), intent(in) :: & - aicen, vicen, vsnon, Tsfcn -#else real (kind=dbl_kind), intent(in) :: & dt, aice, vice, vsno real (kind=dbl_kind), dimension(:), intent(in) :: & aicen, vicen, vsnon -#endif real (kind=dbl_kind), dimension(:,:), intent(in) :: & qicen, & @@ -532,11 +495,7 @@ subroutine pond_area(dt, ncat, nilyr,& if (ktherm /= 2 .and. pressure_head > c0) then do n = 1, ncat-1 if (hicen(n) > c0) then -#ifdef UNDEPRECATE_0LAYER - call permeability_phi(heat_capacity, nilyr, qicen(:,n), sicen(:,n), Tsfcn(n), Tf, perm) -#else call permeability_phi(nilyr, qicen(:,n), sicen(:,n), perm) -#endif if (icepack_warnings_aborted(subname)) return if (perm > c0) permflag = 1 drain = perm*apondn(n)*pressure_head*dt / (viscosity_dyn*hicen(n)) @@ -775,17 +734,8 @@ end subroutine calc_hpond ! determine the liquid fraction of brine in the ice and the permeability -#ifdef UNDEPRECATE_0LAYER - subroutine permeability_phi(heat_capacity, nilyr, qicen, sicen, Tsfcn, Tf, perm) -#else subroutine permeability_phi(nilyr, qicen, sicen, perm) -#endif -#ifdef UNDEPRECATE_0LAYER - logical (kind=log_kind), intent(in) :: & - heat_capacity ! if true, ice has nonzero heat capacity - ! if false, use zero-layer thermodynamics -#endif integer (kind=int_kind), intent(in) :: & nilyr ! number of ice layers @@ -793,12 +743,6 @@ subroutine permeability_phi(nilyr, qicen, sicen, perm) qicen, & ! energy of melting for each ice layer (J/m2) sicen ! salinity (ppt) -#ifdef UNDEPRECATE_0LAYER - real (kind=dbl_kind), intent(in) :: & - Tsfcn, & ! sea ice surface skin temperature (degC) - Tf ! ocean freezing temperature [= ice bottom temperature] (degC) -#endif - real (kind=dbl_kind), intent(out) :: & perm ! permeability @@ -821,18 +765,10 @@ subroutine permeability_phi(nilyr, qicen, sicen, perm) ! NOTE this assumes Tmlt = Si * depressT !----------------------------------------------------------------- -#ifdef UNDEPRECATE_0LAYER - if (heat_capacity) then -#endif do k = 1,nilyr Tmlt = -sicen(k) * depressT Tin(k) = calculate_Tin_from_qin(qicen(k),Tmlt) enddo -#ifdef UNDEPRECATE_0LAYER - else - Tin(1) = (Tsfcn + Tf) / c2 - endif -#endif !----------------------------------------------------------------- ! brine salinity and liquid fraction @@ -846,15 +782,7 @@ subroutine permeability_phi(nilyr, qicen, sicen, perm) -21.8_dbl_kind * Tin(k) & - 0.919_dbl_kind * Tin(k)**2 & - 0.01878_dbl_kind * Tin(k)**3 -#ifdef UNDEPRECATE_0LAYER - if (heat_capacity) then -#endif phi(k) = sicen(k)/Sbr ! liquid fraction -#ifdef UNDEPRECATE_0LAYER - else - phi(k) = ice_ref_salinity / Sbr ! liquid fraction - endif -#endif enddo ! k else @@ -869,15 +797,7 @@ subroutine permeability_phi(nilyr, qicen, sicen, perm) call icepack_warnings_add(subname//' topo ponds: zero brine salinity in permeability') return endif -#ifdef UNDEPRECATE_0LAYER - if (heat_capacity) then -#endif phi(k) = sicen(k) / Sbr ! liquid fraction -#ifdef UNDEPRECATE_0LAYER - else - phi(k) = ice_ref_salinity / Sbr ! liquid fraction - endif -#endif enddo endif diff --git a/columnphysics/icepack_parameters.F90 b/columnphysics/icepack_parameters.F90 index fbb0870db..8b969f1fe 100644 --- a/columnphysics/icepack_parameters.F90 +++ b/columnphysics/icepack_parameters.F90 @@ -120,10 +120,6 @@ module icepack_parameters ice_ref_salinity =4._dbl_kind,&! (ppt) ! kice is not used for mushy thermo kice = 2.03_dbl_kind ,&! thermal conductivity of fresh ice(W/m/deg) -#ifdef UNDEPRECATE_0LAYER - ! kseaice is used only for zero-layer thermo - kseaice = 2.00_dbl_kind ,&! thermal conductivity of sea ice (W/m/deg) -#endif ksno = 0.30_dbl_kind ,&! thermal conductivity of snow (W/m/deg) hs_min = 1.e-4_dbl_kind ,&! min snow thickness for computing zTsn (m) snowpatch = 0.02_dbl_kind ,&! parameter for fractional snow area (m) @@ -145,11 +141,7 @@ module icepack_parameters integer (kind=int_kind), public :: & ktherm = 1 ! type of thermodynamics -#ifdef UNDEPRECATE_0LAYER - ! 0 = 0-layer approximation -#else ! -1 none -#endif ! 1 = Bitz and Lipscomb 1999 ! 2 = mushy layer theory @@ -158,10 +150,6 @@ module icepack_parameters fbot_xfer_type = 'constant' ! transfer coefficient type for ice-ocean heat flux logical (kind=log_kind), public :: & -#ifdef UNDEPRECATE_0LAYER - heat_capacity = .true. ,&! if true, ice has nonzero heat capacity - ! if false, use zero-layer thermodynamics -#endif calc_Tsfc = .true. ,&! if true, calculate surface temperature ! if false, Tsfc is computed elsewhere and ! atmos-ice fluxes are provided to CICE @@ -449,11 +437,7 @@ subroutine icepack_init_parameters( & stefan_boltzmann_in, ice_ref_salinity_in, & Tffresh_in, Lsub_in, Lvap_in, Timelt_in, Tsmelt_in, & iceruf_in, Cf_in, Pstar_in, Cstar_in, kappav_in, & -#ifdef UNDEPRECATE_0LAYER - kice_in, kseaice_in, ksno_in, & -#else kice_in, ksno_in, & -#endif zref_in, hs_min_in, snowpatch_in, rhosi_in, sk_l_in, & saltmax_in, phi_init_in, min_salin_in, salt_loss_in, & min_bgc_in, dSin0_frazil_in, hi_ssl_in, hs_ssl_in, & @@ -475,11 +459,7 @@ subroutine icepack_init_parameters( & bgc_flux_type_in, z_tracers_in, scale_bgc_in, solve_zbgc_in, & modal_aero_in, skl_bgc_in, solve_zsal_in, grid_o_in, l_sk_in, & initbio_frac_in, grid_oS_in, l_skS_in, dEdd_algae_in, & -#ifdef UNDEPRECATE_0LAYER - phi_snow_in, heat_capacity_in, T_max_in, fsal_in, & -#else phi_snow_in, T_max_in, fsal_in, & -#endif fr_resp_in, algal_vel_in, R_dFe2dust_in, dustFe_sol_in, & op_dep_min_in, fr_graze_s_in, fr_graze_e_in, fr_mort2min_in, & fr_dFe_in, k_nitrif_in, t_iron_conv_in, max_loss_in, & @@ -540,9 +520,6 @@ subroutine icepack_init_parameters( & Tsmelt_in, & ! melting temperature, snow top surface (C) ice_ref_salinity_in, & ! (ppt) kice_in, & ! thermal conductivity of fresh ice(W/m/deg) -#ifdef UNDEPRECATE_0LAYER - kseaice_in, & ! thermal conductivity of sea ice (W/m/deg) -#endif ksno_in, & ! thermal conductivity of snow (W/m/deg) hs_min_in, & ! min snow thickness for computing zTsn (m) snowpatch_in, & ! parameter for fractional snow area (m) @@ -554,11 +531,7 @@ subroutine icepack_init_parameters( & integer (kind=int_kind), intent(in), optional :: & ktherm_in ! type of thermodynamics -#ifdef UNDEPRECATE_0LAYER - ! 0 = 0-layer approximation -#else ! -1 none -#endif ! 1 = Bitz and Lipscomb 1999 ! 2 = mushy layer theory @@ -567,10 +540,6 @@ subroutine icepack_init_parameters( & fbot_xfer_type_in ! transfer coefficient type for ice-ocean heat flux logical (kind=log_kind), intent(in), optional :: & -#ifdef UNDEPRECATE_0LAYER - heat_capacity_in, &! if true, ice has nonzero heat capacity - ! if false, use zero-layer thermodynamics -#endif calc_Tsfc_in , &! if true, calculate surface temperature ! if false, Tsfc is computed elsewhere and ! atmos-ice fluxes are provided to CICE @@ -888,9 +857,6 @@ subroutine icepack_init_parameters( & if (present(Cstar_in) ) Cstar = Cstar_in if (present(kappav_in) ) kappav = kappav_in if (present(kice_in) ) kice = kice_in -#ifdef UNDEPRECATE_0LAYER - if (present(kseaice_in) ) kseaice = kseaice_in -#endif if (present(ksno_in) ) ksno = ksno_in if (present(zref_in) ) zref = zref_in if (present(hs_min_in) ) hs_min = hs_min_in @@ -917,9 +883,6 @@ subroutine icepack_init_parameters( & if (present(ktherm_in) ) ktherm = ktherm_in if (present(conduct_in) ) conduct = conduct_in if (present(fbot_xfer_type_in) ) fbot_xfer_type = fbot_xfer_type_in -#ifdef UNDEPRECATE_0LAYER - if (present(heat_capacity_in) ) heat_capacity = heat_capacity_in -#endif if (present(calc_Tsfc_in) ) calc_Tsfc = calc_Tsfc_in if (present(update_ocn_f_in) ) update_ocn_f = update_ocn_f_in if (present(dts_b_in) ) dts_b = dts_b_in @@ -1156,11 +1119,7 @@ subroutine icepack_query_parameters( & stefan_boltzmann_out, ice_ref_salinity_out, & Tffresh_out, Lsub_out, Lvap_out, Timelt_out, Tsmelt_out, & iceruf_out, Cf_out, Pstar_out, Cstar_out, kappav_out, & -#ifdef UNDEPRECATE_0LAYER - kice_out, kseaice_out, ksno_out, & -#else kice_out, ksno_out, & -#endif zref_out, hs_min_out, snowpatch_out, rhosi_out, sk_l_out, & saltmax_out, phi_init_out, min_salin_out, salt_loss_out, & min_bgc_out, dSin0_frazil_out, hi_ssl_out, hs_ssl_out, & @@ -1182,11 +1141,7 @@ subroutine icepack_query_parameters( & bgc_flux_type_out, z_tracers_out, scale_bgc_out, solve_zbgc_out, & modal_aero_out, skl_bgc_out, solve_zsal_out, grid_o_out, l_sk_out, & initbio_frac_out, grid_oS_out, l_skS_out, & -#ifdef UNDEPRECATE_0LAYER - phi_snow_out, heat_capacity_out, conserv_check_out, & -#else phi_snow_out, conserv_check_out, & -#endif fr_resp_out, algal_vel_out, R_dFe2dust_out, dustFe_sol_out, & T_max_out, fsal_out, op_dep_min_out, fr_graze_s_out, fr_graze_e_out, & fr_mort2min_out, fr_resp_s_out, fr_dFe_out, & @@ -1256,9 +1211,6 @@ subroutine icepack_query_parameters( & Tsmelt_out, & ! melting temperature, snow top surface (C) ice_ref_salinity_out, & ! (ppt) kice_out, & ! thermal conductivity of fresh ice(W/m/deg) -#ifdef UNDEPRECATE_0LAYER - kseaice_out, & ! thermal conductivity of sea ice (W/m/deg) -#endif ksno_out, & ! thermal conductivity of snow (W/m/deg) hs_min_out, & ! min snow thickness for computing zTsn (m) snowpatch_out, & ! parameter for fractional snow area (m) @@ -1270,11 +1222,7 @@ subroutine icepack_query_parameters( & integer (kind=int_kind), intent(out), optional :: & ktherm_out ! type of thermodynamics -#ifdef UNDEPRECATE_0LAYER - ! 0 = 0-layer approximation -#else ! -1 none -#endif ! 1 = Bitz and Lipscomb 1999 ! 2 = mushy layer theory @@ -1283,10 +1231,6 @@ subroutine icepack_query_parameters( & fbot_xfer_type_out ! transfer coefficient type for ice-ocean heat flux logical (kind=log_kind), intent(out), optional :: & -#ifdef UNDEPRECATE_0LAYER - heat_capacity_out,&! if true, ice has nonzero heat capacity - ! if false, use zero-layer thermodynamics -#endif calc_Tsfc_out ,&! if true, calculate surface temperature ! if false, Tsfc is computed elsewhere and ! atmos-ice fluxes are provided to CICE @@ -1640,9 +1584,6 @@ subroutine icepack_query_parameters( & if (present(Cstar_out) ) Cstar_out = Cstar if (present(kappav_out) ) kappav_out = kappav if (present(kice_out) ) kice_out = kice -#ifdef UNDEPRECATE_0LAYER - if (present(kseaice_out) ) kseaice_out = kseaice -#endif if (present(ksno_out) ) ksno_out = ksno if (present(zref_out) ) zref_out = zref if (present(hs_min_out) ) hs_min_out = hs_min @@ -1669,9 +1610,6 @@ subroutine icepack_query_parameters( & if (present(ktherm_out) ) ktherm_out = ktherm if (present(conduct_out) ) conduct_out = conduct if (present(fbot_xfer_type_out) ) fbot_xfer_type_out = fbot_xfer_type -#ifdef UNDEPRECATE_0LAYER - if (present(heat_capacity_out) ) heat_capacity_out= heat_capacity -#endif if (present(calc_Tsfc_out) ) calc_Tsfc_out = calc_Tsfc if (present(update_ocn_f_out) ) update_ocn_f_out = update_ocn_f if (present(dts_b_out) ) dts_b_out = dts_b @@ -1838,9 +1776,6 @@ subroutine icepack_write_parameters(iounit) write(iounit,*) " Cstar = ",Cstar write(iounit,*) " kappav = ",kappav write(iounit,*) " kice = ",kice -#ifdef UNDEPRECATE_0LAYER - write(iounit,*) " kseaice = ",kseaice -#endif write(iounit,*) " ksno = ",ksno write(iounit,*) " zref = ",zref write(iounit,*) " hs_min = ",hs_min @@ -1878,9 +1813,6 @@ subroutine icepack_write_parameters(iounit) write(iounit,*) " ktherm = ", ktherm write(iounit,*) " conduct = ", conduct write(iounit,*) " fbot_xfer_type = ", fbot_xfer_type -#ifdef UNDEPRECATE_0LAYER - write(iounit,*) " heat_capacity = ", heat_capacity -#endif write(iounit,*) " calc_Tsfc = ", calc_Tsfc write(iounit,*) " update_ocn_f = ", update_ocn_f write(iounit,*) " dts_b = ", dts_b diff --git a/columnphysics/icepack_shortwave.F90 b/columnphysics/icepack_shortwave.F90 index b8eacf92c..4a6e34c28 100644 --- a/columnphysics/icepack_shortwave.F90 +++ b/columnphysics/icepack_shortwave.F90 @@ -46,19 +46,11 @@ module icepack_shortwave use icepack_parameters, only: albocn, Timelt, snowpatch, awtvdr, awtidr, awtvdf, awtidf use icepack_parameters, only: kappav, hs_min, rhofresh, rhos, nspint, rsnw_fall, snwredist, rsnw_tmax use icepack_parameters, only: hi_ssl, hs_ssl, min_bgc, sk_l, snwlvlfac, snwgrain -#ifdef UNDEPRECATE_0LAYER - use icepack_parameters, only: z_tracers, skl_bgc, calc_tsfc, shortwave, kalg, heat_capacity -#else use icepack_parameters, only: z_tracers, skl_bgc, calc_tsfc, shortwave, kalg -#endif use icepack_parameters, only: r_ice, r_pnd, r_snw, dt_mlt, rsnw_mlt, hs0, hs1, hp1 use icepack_parameters, only: pndaspect, albedo_type, albicev, albicei, albsnowv, albsnowi, ahmax use icepack_tracers, only: ntrcr, nbtrcr_sw -#ifdef UNDEPRECATE_CESMPONDS - use icepack_tracers, only: tr_pond_cesm, tr_pond_lvl, tr_pond_topo -#else use icepack_tracers, only: tr_pond_lvl, tr_pond_topo -#endif use icepack_tracers, only: tr_bgc_N, tr_aero use icepack_tracers, only: nt_bgc_N, nt_zaero, tr_bgc_N use icepack_tracers, only: tr_zaero, nlt_chl_sw, nlt_zaero_sw @@ -99,9 +91,6 @@ subroutine shortwave_ccsm3 (aicen, vicen, & vsnon, Tsfcn, & swvdr, swvdf, & swidr, swidf, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, & -#endif albedo_type, & albicev, albicei, & albsnowv, albsnowi, & @@ -144,10 +133,6 @@ subroutine shortwave_ccsm3 (aicen, vicen, & albsnowi, & ! cold snow albedo, near IR ahmax ! thickness above which ice albedo is constant (m) -#ifdef UNDEPRECATE_0LAYER - logical(kind=log_kind), intent(in) :: & - heat_capacity! if true, ice has nonzero heat capacity -#endif character (len=char_len), intent(in) :: & albedo_type ! albedo parameterization, 'ccsm3' or 'constant' @@ -297,12 +282,7 @@ subroutine shortwave_ccsm3 (aicen, vicen, & ! Compute solar radiation absorbed in ice and penetrating to ocean. !----------------------------------------------------------------- -#ifdef UNDEPRECATE_0LAYER - call absorbed_solar (heat_capacity, & - nilyr, & -#else call absorbed_solar (nilyr, & -#endif aicen(n), & vicen(n), & vsnon(n), & @@ -580,12 +560,7 @@ end subroutine constant_albedos ! authors William H. Lipscomb, LANL ! C. M. Bitz, UW -#ifdef UNDEPRECATE_0LAYER - subroutine absorbed_solar (heat_capacity, & - nilyr, aicen, & -#else subroutine absorbed_solar (nilyr, aicen, & -#endif vicen, vsnon, & swvdr, swvdf, & swidr, swidf, & @@ -602,10 +577,6 @@ subroutine absorbed_solar (nilyr, aicen, & fswpenl, & Iswabs) -#ifdef UNDEPRECATE_0LAYER - logical(kind=log_kind), intent(in) :: & - heat_capacity ! if true, ice has nonzero heat capacity -#endif integer (kind=int_kind), intent(in) :: & nilyr ! number of ice layers @@ -752,23 +723,6 @@ subroutine absorbed_solar (nilyr, aicen, & ! SW absorbed in ice interior fswint = fswpen - fswthru -#ifdef UNDEPRECATE_0LAYER - !---------------------------------------------------------------- - ! if zero-layer model (no heat capacity), no SW is absorbed in ice - ! interior, so add to surface absorption - !---------------------------------------------------------------- - - if (.not. heat_capacity) then - - ! SW absorbed at snow/ice surface - fswsfc = fswsfc + fswint - - ! SW absorbed in ice interior (nilyr = 1) - fswint = c0 - Iswabs(1) = c0 - - endif ! heat_capacity -#endif end subroutine absorbed_solar ! End ccsm3 shortwave method @@ -791,9 +745,6 @@ subroutine run_dEdd(dt, ncat, & hpndn, ipndn, & aeron, kalg, & trcrn_bgcsw, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, & -#endif tlat, tlon, & calendar_type, & days_per_year, & @@ -837,9 +788,6 @@ subroutine run_dEdd(dt, ncat, & nslyr ! number of snow layers logical(kind=log_kind), intent(in) :: & -#ifdef UNDEPRECATE_0LAYER - heat_capacity,& ! if true, ice has nonzero heat capacity -#endif dEdd_algae, & ! .true. use prognostic chla in dEdd modal_aero ! .true. use modal aerosol treatment @@ -1035,26 +983,7 @@ subroutine run_dEdd(dt, ncat, & if (icepack_warnings_aborted(subname)) return ! set pond properties -#ifdef UNDEPRECATE_CESMPONDS - if (tr_pond_cesm) then - ! fraction of ice area - fpn = apndn(n) - ! pond depth over fraction fpn - hpn = hpndn(n) - ! snow infiltration - if (hsn >= hs_min .and. hs0 > puny) then - asnow = min(hsn/hs0, c1) ! delta-Eddington formulation - fpn = (c1 - asnow) * fpn - hpn = pndaspect * fpn - endif - ! Zero out fraction of thin ponds for radiation only - if (hpn < hpmin) fpn = c0 - fsn = min(fsn, c1-fpn) - apeffn(n) = fpn ! for history - elseif (tr_pond_lvl) then -#else if (tr_pond_lvl) then -#endif hsnlvl = hsn ! initialize if (trim(snwredist) == 'bulk') then hsnlvl = hsn / (c1 + snwlvlfac*(c1-alvln(n))) @@ -1173,11 +1102,7 @@ subroutine run_dEdd(dt, ncat, & call shortwave_dEdd(dEdd_algae, & nslyr, nilyr, & -#ifdef UNDEPRECATE_0LAYER - coszen, heat_capacity, & -#else coszen, & -#endif aicen(n), vicen(n), & hsn, fsn, & rhosnwn, rsnwn, & @@ -1264,11 +1189,7 @@ end subroutine run_dEdd ! subroutine shortwave_dEdd (dEdd_algae, & nslyr, nilyr, & -#ifdef UNDEPRECATE_0LAYER - coszen, heat_capacity,& -#else coszen, & -#endif aice, vice, & hs, fs, & rhosnw, rsnw, & @@ -1303,9 +1224,6 @@ subroutine shortwave_dEdd (dEdd_algae, & nslyr ! number of snow layers logical (kind=log_kind), intent(in) :: & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, & ! if true, ice has nonzero heat capacity -#endif dEdd_algae, & ! .true. use prognostic chla in dEdd modal_aero ! .true. use modal aerosol treatment @@ -1490,11 +1408,7 @@ subroutine shortwave_dEdd (dEdd_algae, & srftyp = 0 call compute_dEdd(nilyr, nslyr, klev, klevp, & zbio, dEdd_algae, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, fnidr, coszen, & -#else fnidr, coszen, & -#endif R_ice, R_pnd, & kaer_tab, waer_tab, gaer_tab, & kaer_bc_tab, waer_bc_tab, gaer_bc_tab, & @@ -1535,11 +1449,7 @@ subroutine shortwave_dEdd (dEdd_algae, & srftyp = 1 call compute_dEdd(nilyr, nslyr, klev, klevp, & zbio, dEdd_algae, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, fnidr, coszen, & -#else fnidr, coszen, & -#endif R_ice, R_pnd, & kaer_tab, waer_tab, gaer_tab, & kaer_bc_tab, waer_bc_tab, gaer_bc_tab, & @@ -1585,11 +1495,7 @@ subroutine shortwave_dEdd (dEdd_algae, & srftyp = 2 call compute_dEdd(nilyr, nslyr, klev, klevp, & zbio, dEdd_algae, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, fnidr, coszen, & -#else fnidr, coszen, & -#endif R_ice, R_pnd, & kaer_tab, waer_tab, gaer_tab, & kaer_bc_tab, waer_bc_tab, gaer_bc_tab, & @@ -1708,11 +1614,7 @@ end subroutine shortwave_dEdd subroutine compute_dEdd (nilyr, nslyr, klev, klevp, & zbio, dEdd_algae, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, fnidr, coszen, & -#else fnidr, coszen, & -#endif R_ice, R_pnd, & kaer_tab, waer_tab, gaer_tab, & kaer_bc_tab, waer_bc_tab, gaer_bc_tab, & @@ -1738,9 +1640,6 @@ subroutine compute_dEdd (nilyr, nslyr, klev, klevp, & ! (0 layer is included also) logical (kind=log_kind), intent(in) :: & -#ifdef UNDEPRECATE_0LAYER - heat_capacity,& ! if true, ice has nonzero heat capacity -#endif dEdd_algae, & ! .true. use prognostic chla in dEdd modal_aero ! .true. use modal aerosol treatment @@ -3161,25 +3060,6 @@ subroutine compute_dEdd (nilyr, nslyr, klev, klevp, & enddo ! k fswpenl(nilyr+1) = fswpenl(nilyr+1) + fthrul(nilyr+1)*fi -#ifdef UNDEPRECATE_0LAYER - !---------------------------------------------------------------- - ! if ice has zero heat capacity, no SW can be absorbed - ! in the ice/snow interior, so add to surface absorption. - ! Note: nilyr = nslyr = 1 for this case - !---------------------------------------------------------------- - - if (.not. heat_capacity) then - - ! SW absorbed at snow/ice surface - fswsfc = fswsfc + Iswabs(1) + Sswabs(1) - - ! SW absorbed in ice interior - fswint = c0 - Iswabs(1) = c0 - Sswabs(1) = c0 - - endif ! heat_capacity -#endif end subroutine compute_dEdd !======================================================================= @@ -4307,9 +4187,6 @@ subroutine icepack_step_radiation (dt, ncat, & hpndn, ipndn, & aeron, kalg, & trcrn_bgcsw, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, & -#endif TLAT, TLON, & calendar_type,days_per_year, & nextsw_cday, yday, & @@ -4358,9 +4235,6 @@ subroutine icepack_step_radiation (dt, ncat, & Tsfcn, & swvdr, swvdf, & swidr, swidf, & -#ifdef UNDEPRECATE_0LAYER - heat_capacity, & -#endif albedo_type, & albicev, albicei, & albsnowv, albsnowi, & diff --git a/columnphysics/icepack_therm_0layer.F90 b/columnphysics/icepack_therm_0layer.F90 deleted file mode 100644 index 1105b9eaf..000000000 --- a/columnphysics/icepack_therm_0layer.F90 +++ /dev/null @@ -1,343 +0,0 @@ -!========================================================================= -! -! Update ice and snow internal temperatures -! using zero-layer thermodynamics -! -! authors: Alison McLaren, UK MetOffice -! Elizabeth C. Hunke, LANL -! -! 2012: Split from icepack_therm_vertical.F90 - - module icepack_therm_0layer - -#ifdef UNDEPRECATE_0LAYER - use icepack_kinds - use icepack_parameters, only: c0, c1, p5, puny - use icepack_parameters, only: kseaice, ksno - use icepack_therm_bl99, only: surface_fluxes - use icepack_warnings, only: warnstr, icepack_warnings_add - use icepack_warnings, only: icepack_warnings_setabort, icepack_warnings_aborted - - implicit none - - private - public :: zerolayer_temperature - -!======================================================================= - - contains - -!======================================================================= -! -! Compute new surface temperature using zero layer model of Semtner -! (1976). -! -! New temperatures are computed iteratively by solving a -! surface flux balance equation (i.e. net surface flux from atmos -! equals conductive flux from the top to the bottom surface). -! -! author: Alison McLaren, Met Office -! (but largely taken from temperature_changes) - - subroutine zerolayer_temperature(nilyr, nslyr, & - rhoa, flw, & - potT, Qa, & - shcoef, lhcoef, & - fswsfc, & - hilyr, hslyr, & - Tsf, Tbot, & - fsensn, flatn, & - flwoutn, fsurfn, & - fcondtopn,fcondbot ) - - integer (kind=int_kind), intent(in) :: & - nilyr , & ! number of ice layers - nslyr ! number of snow layers - - real (kind=dbl_kind), intent(in) :: & - rhoa , & ! air density (kg/m^3) - flw , & ! incoming longwave radiation (W/m^2) - potT , & ! air potential temperature (K) - Qa , & ! specific humidity (kg/kg) - shcoef , & ! transfer coefficient for sensible heat - lhcoef , & ! transfer coefficient for latent heat - Tbot , & ! ice bottom surface temperature (deg C) - fswsfc ! SW absorbed at ice/snow surface (W m-2) - - real (kind=dbl_kind), intent(in) :: & - hilyr , & ! ice layer thickness (m) - hslyr ! snow layer thickness (m) - - real (kind=dbl_kind), intent(inout):: & - fsensn , & ! surface downward sensible heat (W m-2) - flatn , & ! surface downward latent heat (W m-2) - flwoutn , & ! upward LW at surface (W m-2) - fsurfn , & ! net flux to top surface, excluding fcondtopn - fcondtopn ! downward cond flux at top surface (W m-2) - - real (kind=dbl_kind), intent(out):: & - fcondbot ! downward cond flux at bottom surface (W m-2) - - real (kind=dbl_kind), & - intent(inout) :: & - Tsf ! ice/snow surface temperature, Tsfcn - - ! local variables - - logical (kind=log_kind), parameter :: & - l_zerolayerchecks = .true. - - integer (kind=int_kind), parameter :: & - nitermax = 50 ! max number of iterations in temperature solver - - real (kind=dbl_kind), parameter :: & - Tsf_errmax = 5.e-4_dbl_kind ! max allowed error in Tsf - ! recommend Tsf_errmax < 0.01 K - - integer (kind=int_kind) :: & - niter ! iteration counter in temperature solver - - real (kind=dbl_kind) :: & - Tsf_start , & ! Tsf at start of iteration - dTsf , & ! Tsf - Tsf_start - dfsurf_dT ! derivative of fsurfn wrt Tsf - - real (kind=dbl_kind) :: & - dTsf_prev , & ! dTsf from previous iteration - dfsens_dT , & ! deriv of fsens wrt Tsf (W m-2 deg-1) - dflat_dT , & ! deriv of flat wrt Tsf (W m-2 deg-1) - dflwout_dT ! deriv of flwout wrt Tsf (W m-2 deg-1) - - real (kind=dbl_kind) :: & - kh , & ! effective conductivity - diag , & ! diagonal matrix elements - rhs ! rhs of tri-diagonal matrix equation - - real (kind=dbl_kind) :: & - heff , & ! effective ice thickness (m) - ! ( hice + hsno*kseaice/ksnow) - kratio , & ! ratio of ice and snow conductivies - avg_Tsf ! = 1. if Tsf averaged w/Tsf_start, else = 0. - - logical (kind=log_kind) :: & - converged ! = true when local solution has converged - - character(len=*),parameter :: subname='(zerolayer_temperature)' - - !----------------------------------------------------------------- - ! Initialize - !----------------------------------------------------------------- - - fcondbot = c0 - - converged = .false. - - dTsf_prev = c0 - - !----------------------------------------------------------------- - ! Solve for new temperatures. - ! Iterate until temperatures converge with minimal temperature - ! change. - !----------------------------------------------------------------- - - do niter = 1, nitermax - - if (.not. converged) then - - !----------------------------------------------------------------- - ! Update radiative and turbulent fluxes and their derivatives - ! with respect to Tsf. - !----------------------------------------------------------------- - - call surface_fluxes (Tsf, fswsfc, & - rhoa, flw, & - potT, Qa, & - shcoef, lhcoef, & - flwoutn, fsensn, & - flatn, fsurfn, & - dflwout_dT, dfsens_dT, & - dflat_dT, dfsurf_dT) - if (icepack_warnings_aborted(subname)) return - - !----------------------------------------------------------------- - ! Compute effective ice thickness (includes snow) and thermal - ! conductivity - !----------------------------------------------------------------- - - kratio = kseaice/ksno - - heff = hilyr + kratio * hslyr - kh = kseaice / heff - - !----------------------------------------------------------------- - ! Compute conductive flux at top surface, fcondtopn. - ! If fsurfn < fcondtopn and Tsf = 0, then reset Tsf to slightly less - ! than zero (but not less than -puny). - !----------------------------------------------------------------- - - fcondtopn = kh * (Tsf - Tbot) - - if (fsurfn < fcondtopn) & - Tsf = min (Tsf, -puny) - - !----------------------------------------------------------------- - ! Save surface temperature at start of iteration - !----------------------------------------------------------------- - - Tsf_start = Tsf - - !----------------------------------------------------------------- - ! Solve surface balance equation to obtain the new temperatures. - !----------------------------------------------------------------- - - diag = dfsurf_dT - kh - rhs = dfsurf_dT*Tsf - fsurfn & - - kh*Tbot - Tsf = rhs / diag - - !----------------------------------------------------------------- - ! Determine whether the computation has converged to an acceptable - ! solution. Four conditions must be satisfied: - ! - ! (1) Tsf <= 0 C. - ! (2) Tsf is not oscillating; i.e., if both dTsf(niter) and - ! dTsf(niter-1) have magnitudes greater than puny, then - ! dTsf(niter)/dTsf(niter-1) cannot be a negative number - ! with magnitude greater than 0.5. - ! (3) abs(dTsf) < Tsf_errmax - ! (4) If Tsf = 0 C, then the downward turbulent/radiative - ! flux, fsurfn, must be greater than or equal to the downward - ! conductive flux, fcondtopn. - !----------------------------------------------------------------- - - !----------------------------------------------------------------- - ! Initialize convergence flag (true until proven false), dTsf, - ! and temperature-averaging coefficients. - ! Average only if test 1 or 2 fails. - ! Initialize energy. - !----------------------------------------------------------------- - - converged = .true. - dTsf = Tsf - Tsf_start - avg_Tsf = c0 - - !----------------------------------------------------------------- - ! Condition 1: check for Tsf > 0 - ! If Tsf > 0, set Tsf = 0 and leave converged=.true. - !----------------------------------------------------------------- - - if (Tsf > puny) then - Tsf = c0 - dTsf = -Tsf_start - - !----------------------------------------------------------------- - ! Condition 2: check for oscillating Tsf - ! If oscillating, average all temps to increase rate of convergence. - ! It is possible that this may never occur. - !----------------------------------------------------------------- - - elseif (niter > 1 & ! condition (2) - .and. Tsf_start <= -puny & - .and. abs(dTsf) > puny & - .and. abs(dTsf_prev) > puny & - .and. -dTsf/(dTsf_prev+puny*puny) > p5) then - - avg_Tsf = c1 ! average with starting temp - dTsf = p5 * dTsf - converged = .false. - endif - - !----------------------------------------------------------------- - ! If condition 2 failed, average new surface temperature with - ! starting value. - !----------------------------------------------------------------- - Tsf = Tsf & - + avg_Tsf * p5 * (Tsf_start - Tsf) - - !----------------------------------------------------------------- - ! Condition 3: check for large change in Tsf - !----------------------------------------------------------------- - - if (abs(dTsf) > Tsf_errmax) then - converged = .false. - endif - - !----------------------------------------------------------------- - ! Condition 4: check for fsurfn < fcondtopn with Tsf > 0 - !----------------------------------------------------------------- - - fsurfn = fsurfn + dTsf*dfsurf_dT - fcondtopn = kh * (Tsf-Tbot) - - if (Tsf > -puny .and. fsurfn < fcondtopn) then - converged = .false. - endif - - fcondbot = fcondtopn - - dTsf_prev = dTsf - - endif ! converged - - enddo ! temperature iteration niter - - !----------------------------------------------------------------- - ! Check for convergence failures. - !----------------------------------------------------------------- - if (.not.converged) then - write(warnstr,*) subname, 'Thermo iteration does not converge,' - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'Ice thickness:', hilyr*nilyr - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'Snow thickness:', hslyr*nslyr - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'dTsf, Tsf_errmax:',dTsf_prev, & - Tsf_errmax - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'Tsf:', Tsf - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'fsurfn:', fsurfn - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'fcondtopn, fcondbot', & - fcondtopn, fcondbot - call icepack_warnings_add(warnstr) - call icepack_warnings_setabort(.true.,__FILE__,__LINE__) - call icepack_warnings_add(subname//" zerolayer_temperature: Thermo iteration does not converge" ) - return - endif - - !----------------------------------------------------------------- - ! Check that if Tsfc < 0, then fcondtopn = fsurfn - !----------------------------------------------------------------- - - if (l_zerolayerchecks) then - if (Tsf < c0 .and. & - abs(fcondtopn-fsurfn) > puny) then - - write(warnstr,*) subname, 'fcondtopn does not equal fsurfn,' - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'Tsf=',Tsf - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'fcondtopn=',fcondtopn - call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'fsurfn=',fsurfn - call icepack_warnings_add(warnstr) - call icepack_warnings_setabort(.true.,__FILE__,__LINE__) - call icepack_warnings_add(subname//" zerolayer_temperature: fcondtopn /= fsurfn" ) - return - endif - endif ! l_zerolayerchecks - - ! update fluxes that depend on Tsf - flwoutn = flwoutn + dTsf_prev * dflwout_dT - fsensn = fsensn + dTsf_prev * dfsens_dT - flatn = flatn + dTsf_prev * dflat_dT - - end subroutine zerolayer_temperature - -#endif -!======================================================================= - - end module icepack_therm_0layer - -!======================================================================= diff --git a/columnphysics/icepack_therm_itd.F90 b/columnphysics/icepack_therm_itd.F90 index 7a701916b..663322ab9 100644 --- a/columnphysics/icepack_therm_itd.F90 +++ b/columnphysics/icepack_therm_itd.F90 @@ -25,11 +25,7 @@ module icepack_therm_itd use icepack_parameters, only: rhos, rhoi, Lfresh, ice_ref_salinity use icepack_parameters, only: phi_init, dsin0_frazil, hs_ssl, salt_loss use icepack_parameters, only: rhosi, conserv_check, rhosmin -#ifdef UNDEPRECATE_0LAYER - use icepack_parameters, only: kitd, ktherm, heat_capacity -#else use icepack_parameters, only: kitd, ktherm -#endif use icepack_parameters, only: z_tracers, solve_zsal, hfrazilmin use icepack_tracers, only: ntrcr, nbtrcr @@ -37,11 +33,7 @@ module icepack_therm_itd use icepack_tracers, only: nt_apnd, nt_hpnd, nt_aero, nt_isosno, nt_isoice use icepack_tracers, only: nt_Tsfc, nt_iage, nt_FY, nt_fsd, nt_rhos use icepack_tracers, only: nt_alvl, nt_vlvl -#ifdef UNDEPRECATE_CESMPONDS - use icepack_tracers, only: tr_pond_cesm, tr_pond_lvl, tr_pond_topo, tr_snow -#else use icepack_tracers, only: tr_pond_lvl, tr_pond_topo, tr_snow -#endif use icepack_tracers, only: tr_iage, tr_FY, tr_lvl, tr_aero, tr_iso, tr_brine, tr_fsd use icepack_tracers, only: n_aero, n_iso use icepack_tracers, only: bio_index @@ -1320,11 +1312,7 @@ subroutine add_new_ice (ncat, nilyr, & ntrcr , & ! number of tracers nltrcr, & ! number of zbgc tracers n_aero, & ! number of aerosol tracers -#ifdef UNDEPRECATE_0LAYER - ktherm ! type of thermodynamics (0 0-layer, 1 BL99, 2 mushy) -#else ktherm ! type of thermodynamics (-1 none, 1 BL99, 2 mushy) -#endif real (kind=dbl_kind), dimension(0:ncat), intent(in) :: & hin_max ! category boundaries (m) @@ -1877,11 +1865,7 @@ subroutine add_new_ice (ncat, nilyr, & (trcrn(nt_vlvl,n)*vice1 + vin0new(n))/vicen(n) endif -#ifdef UNDEPRECATE_CESMPONDS - if (tr_pond_cesm .or. tr_pond_topo) then -#else if (tr_pond_topo) then -#endif trcrn(nt_apnd,n) = & trcrn(nt_apnd,n)*area1/aicen(n) elseif (tr_pond_lvl) then @@ -2276,11 +2260,7 @@ subroutine icepack_step_therm2 (dt, ncat, nltrcr, & n_aero, & nbtrcr, nblyr, & tr_aero, & -#ifdef UNDEPRECATE_0LAYER - tr_pond_topo, heat_capacity, & -#else tr_pond_topo, & -#endif first_ice, & trcr_depend, trcr_base, & n_trcr_strata, nt_strata, & diff --git a/columnphysics/icepack_therm_shared.F90 b/columnphysics/icepack_therm_shared.F90 index bbd6f720b..ad00db2ac 100644 --- a/columnphysics/icepack_therm_shared.F90 +++ b/columnphysics/icepack_therm_shared.F90 @@ -12,11 +12,7 @@ module icepack_therm_shared use icepack_parameters, only: cp_ocn, cp_ice, rhoi, rhos, Tffresh, TTTice, qqqice use icepack_parameters, only: stefan_boltzmann, emissivity, Lfresh, Tsmelt use icepack_parameters, only: saltmax, min_salin, depressT -#ifdef UNDEPRECATE_0LAYER - use icepack_parameters, only: ktherm, heat_capacity, tfrz_option -#else use icepack_parameters, only: ktherm, tfrz_option -#endif use icepack_parameters, only: calc_Tsfc use icepack_warnings, only: warnstr, icepack_warnings_add use icepack_warnings, only: icepack_warnings_setabort, icepack_warnings_aborted @@ -249,16 +245,9 @@ subroutine icepack_init_thermo(nilyr, sprofile) ! Set l_brine to false for zero layer thermodynamics !----------------------------------------------------------------- -#ifdef UNDEPRECATE_0LAYER - heat_capacity = .true. - if (ktherm == 0) heat_capacity = .false. ! 0-layer thermodynamics - - l_brine = .false. - if (saltmax > min_salin .and. heat_capacity) l_brine = .true. -#else l_brine = .false. if (saltmax > min_salin) l_brine = .true. -#endif + !----------------------------------------------------------------- ! Prescibe vertical profile of salinity and melting temperature. ! Note this profile is only used for BL99 thermodynamics. @@ -324,10 +313,6 @@ subroutine icepack_init_trcr(Tair, Tf, & Tsfc = Tf ! default if (calc_Tsfc) Tsfc = min(Tsmelt, Tair - Tffresh) ! deg C -#ifdef UNDEPRECATE_0LAYER - if (heat_capacity) then -#endif - ! ice enthalpy do k = 1, nilyr ! assume linear temp profile and compute enthalpy @@ -348,17 +333,6 @@ subroutine icepack_init_trcr(Tair, Tf, & qsn(k) = -rhos*(Lfresh - cp_ice*Ti) enddo ! nslyr -#ifdef UNDEPRECATE_0LAYER - else ! one layer with zero heat capacity - - ! ice energy - qin(1) = -rhoi * Lfresh - - ! snow energy - qsn(1) = -rhos * Lfresh - - endif ! heat_capacity -#endif end subroutine icepack_init_trcr !======================================================================= diff --git a/columnphysics/icepack_therm_vertical.F90 b/columnphysics/icepack_therm_vertical.F90 index 7329fe373..9b71bae15 100644 --- a/columnphysics/icepack_therm_vertical.F90 +++ b/columnphysics/icepack_therm_vertical.F90 @@ -23,21 +23,13 @@ module icepack_therm_vertical use icepack_parameters, only: c0, c1, p001, p5, puny use icepack_parameters, only: pi, depressT, Lvap, hs_min, cp_ice, min_salin use icepack_parameters, only: cp_ocn, rhow, rhoi, rhos, Lfresh, rhofresh, ice_ref_salinity -#ifdef UNDEPRECATE_0LAYER - use icepack_parameters, only: ktherm, heat_capacity, calc_Tsfc, rsnw_fall, rsnw_tmax -#else use icepack_parameters, only: ktherm, calc_Tsfc, rsnw_fall, rsnw_tmax -#endif use icepack_parameters, only: ustar_min, fbot_xfer_type, formdrag, calc_strair use icepack_parameters, only: rfracmin, rfracmax, dpscale, frzpnd, snwgrain, snwlvlfac use icepack_parameters, only: phi_i_mushy, floeshape, floediam, use_smliq_pnd, snwredist use icepack_tracers, only: tr_iage, tr_FY, tr_aero, tr_pond, tr_fsd, tr_iso -#ifdef UNDEPRECATE_CESMPONDS - use icepack_tracers, only: tr_pond_cesm, tr_pond_lvl, tr_pond_topo -#else use icepack_tracers, only: tr_pond_lvl, tr_pond_topo -#endif use icepack_tracers, only: n_aero, n_iso use icepack_therm_shared, only: ferrmax, l_brine @@ -45,9 +37,6 @@ module icepack_therm_vertical use icepack_therm_shared, only: hi_min use icepack_therm_shared, only: adjust_enthalpy use icepack_therm_bl99, only: temperature_changes -#ifdef UNDEPRECATE_0LAYER - use icepack_therm_0layer, only: zerolayer_temperature -#endif use icepack_therm_mushy, only: temperature_changes_salinity use icepack_warnings, only: warnstr, icepack_warnings_add @@ -63,9 +52,6 @@ module icepack_therm_vertical use icepack_age, only: increment_age use icepack_firstyear, only: update_FYarea use icepack_flux, only: set_sfcflux, merge_fluxes -#ifdef UNDEPRECATE_CESMPONDS - use icepack_meltpond_cesm, only: compute_ponds_cesm -#endif use icepack_meltpond_lvl, only: compute_ponds_lvl use icepack_meltpond_topo, only: compute_ponds_topo use icepack_snow, only: drain_snow @@ -311,9 +297,6 @@ subroutine thermo_vertical (nilyr, nslyr, & ! temperatures. !----------------------------------------------------------------- -#ifdef UNDEPRECATE_0LAYER - if (heat_capacity) then ! usual case -#endif if (ktherm == 2) then call temperature_changes_salinity(dt, & @@ -365,36 +348,6 @@ subroutine thermo_vertical (nilyr, nslyr, & endif ! ktherm -#ifdef UNDEPRECATE_0LAYER - else - - if (calc_Tsfc) then - - call zerolayer_temperature(nilyr, nslyr, & - rhoa, flw, & - potT, Qa, & - shcoef, lhcoef, & - fswsfc, & - hilyr, hslyr, & - Tsf, Tbot, & - fsensn, flatn, & - flwoutn, fsurfn, & - fcondtopn, fcondbotn ) - if (icepack_warnings_aborted(subname)) return - - else - - !------------------------------------------------------------ - ! Set fcondbot = fcondtop for zero layer thermodynamics - ! fcondtop is set in call to set_sfcflux in step_therm1 - !------------------------------------------------------------ - - fcondbotn = fcondtopn ! zero layer - - endif ! calc_Tsfc - - endif ! heat_capacity -#endif ! intermediate energy for error check einter = c0 @@ -778,10 +731,6 @@ subroutine init_vertical_profile(nilyr, nslyr, & !----------------------------------------------------------------- ! Snow enthalpy and maximum allowed snow temperature -#ifdef UNDEPRECATE_0LAYER - ! If heat_capacity = F, zqsn and zTsn are used only for checking - ! conservation. -#endif !----------------------------------------------------------------- do k = 1, nslyr @@ -793,11 +742,7 @@ subroutine init_vertical_profile(nilyr, nslyr, & ! where 'd' denotes an error due to roundoff. !----------------------------------------------------------------- -#ifdef UNDEPRECATE_0LAYER - if (hslyr > hs_min/rnslyr .and. heat_capacity) then -#else if (hslyr > hs_min/rnslyr) then -#endif ! zqsn < 0 Tmax = -zqsn(k)*puny*rnslyr / & (rhos*cp_ice*vsnon) @@ -827,11 +772,7 @@ subroutine init_vertical_profile(nilyr, nslyr, & ! If zTsn is out of bounds, print diagnostics and exit. !----------------------------------------------------------------- -#ifdef UNDEPRECATE_0LAYER - if (tsno_high .and. heat_capacity) then -#else if (tsno_high) then -#endif do k = 1, nslyr if (hslyr > hs_min/rnslyr) then @@ -860,11 +801,7 @@ subroutine init_vertical_profile(nilyr, nslyr, & enddo ! nslyr endif ! tsno_high -#ifdef UNDEPRECATE_0LAYER - if (tsno_low .and. heat_capacity) then -#else if (tsno_low) then -#endif do k = 1, nslyr if (zTsn(k) < Tmin) then ! allowing for roundoff error @@ -930,14 +867,6 @@ subroutine init_vertical_profile(nilyr, nslyr, & Tmlts(k) = -zSin(k) * depressT endif - !----------------------------------------------------------------- - ! Compute ice enthalpy -#ifdef UNDEPRECATE_0LAYER - ! If heat_capacity = F, zqin and zTin are used only for checking - ! conservation. -#endif - !----------------------------------------------------------------- - !----------------------------------------------------------------- ! Compute ice temperatures from enthalpies using quadratic formula !----------------------------------------------------------------- @@ -967,11 +896,7 @@ subroutine init_vertical_profile(nilyr, nslyr, & ! If zTin is out of bounds, print diagnostics and exit. !----------------------------------------------------------------- -#ifdef UNDEPRECATE_0LAYER - if (tice_high .and. heat_capacity) then -#else if (tice_high) then -#endif write(warnstr,*) ' ' call icepack_warnings_add(warnstr) write(warnstr,*) subname, 'Starting thermo, zTin > Tmax, layer', k @@ -1007,11 +932,7 @@ subroutine init_vertical_profile(nilyr, nslyr, & endif endif ! tice_high -#ifdef UNDEPRECATE_0LAYER - if (tice_low .and. heat_capacity) then -#else if (tice_low) then -#endif write(warnstr,*) ' ' call icepack_warnings_add(warnstr) write(warnstr,*) subname, 'Starting thermo T < Tmin, layer', k @@ -1343,9 +1264,6 @@ subroutine thickness_changes (nilyr, nslyr, & Tmlts = -zSin(nilyr) * depressT ! enthalpy of new ice growing at bottom surface -#ifdef UNDEPRECATE_0LAYER - if (heat_capacity) then -#endif if (l_brine) then qbotmax = -p5*rhoi*Lfresh ! max enthalpy of ice growing at bottom qbot = -rhoi * (cp_ice * (Tmlts-Tbot) & @@ -1355,11 +1273,6 @@ subroutine thickness_changes (nilyr, nslyr, & else qbot = -rhoi * (-cp_ice * Tbot + Lfresh) endif -#ifdef UNDEPRECATE_0LAYER - else ! zero layer - qbot = -rhoi * Lfresh - endif -#endif dhi = ebot_gro / qbot ! dhi > 0 hqtot = dzi(nilyr)*zqin(nilyr) + dhi*qbot @@ -1704,9 +1617,6 @@ subroutine thickness_changes (nilyr, nslyr, & zi2(1) = c0 zi2(1+nilyr) = hin -#ifdef UNDEPRECATE_0LAYER - if (heat_capacity) then -#endif do k = 1, nilyr-1 zi1(k+1) = zi1(k) + dzi(k) zi2(k+1) = zi2(k) + hilyr @@ -1729,14 +1639,6 @@ subroutine thickness_changes (nilyr, nslyr, & zSin) if (icepack_warnings_aborted(subname)) return -#ifdef UNDEPRECATE_0LAYER - else ! zero layer (nilyr=1) - - zqin(1) = -rhoi * Lfresh - zqsn(1) = -rhos * Lfresh - - endif -#endif if (nslyr > 1) then !----------------------------------------------------------------- @@ -2910,9 +2812,6 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, & !----------------------------------------------------------------- ! Melt ponds -#ifdef UNDEPRECATE_CESMPONDS - ! If using tr_pond_cesm, the full calculation is performed here. -#endif ! If using tr_pond_topo, the rest of the calculation is done after ! the surface fluxes are merged, below. !----------------------------------------------------------------- @@ -2920,27 +2819,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, & !call ice_timer_start(timer_ponds) if (tr_pond) then -#ifdef UNDEPRECATE_CESMPONDS - if (tr_pond_cesm) then - rfrac = rfracmin + (rfracmax-rfracmin) * aicen(n) - call compute_ponds_cesm(dt=dt, & - hi_min=hi_min, & - rfrac=rfrac, & - meltt=melttn(n), & - melts=meltsn(n), & - frain=frain, & - aicen=aicen (n), & - vicen=vicen (n), & - Tsfcn=Tsfc (n), & - apnd=apnd (n), & - hpnd=hpnd (n), & - meltsliqn=l_meltsliqn(n)) - if (icepack_warnings_aborted(subname)) return - - elseif (tr_pond_lvl) then -#else if (tr_pond_lvl) then -#endif rfrac = rfracmin + (rfracmax-rfracmin) * aicen(n) call compute_ponds_lvl (dt=dt, & nilyr=nilyr, & @@ -3125,11 +3004,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, & !call ice_timer_start(timer_ponds) if (tr_pond_topo) then call compute_ponds_topo(dt, ncat, nilyr, & -#ifdef UNDEPRECATE_0LAYER - ktherm, heat_capacity, & -#else ktherm, & -#endif aice, aicen, & vice, vicen, & vsno, vsnon, & diff --git a/columnphysics/icepack_tracers.F90 b/columnphysics/icepack_tracers.F90 index 9af512f17..9f2f2f77c 100644 --- a/columnphysics/icepack_tracers.F90 +++ b/columnphysics/icepack_tracers.F90 @@ -103,9 +103,6 @@ module icepack_tracers tr_FY = .false., & ! if .true., use first-year area tracer tr_lvl = .false., & ! if .true., use level ice tracer tr_pond = .false., & ! if .true., use melt pond tracer -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_cesm = .false., & ! if .true., use cesm pond tracer -#endif tr_pond_lvl = .false., & ! if .true., use level-ice pond tracer tr_pond_topo = .false., & ! if .true., use explicit topography-based ponds tr_snow = .false., & ! if .true., use snow metamorphosis tracers @@ -209,11 +206,7 @@ module icepack_tracers subroutine icepack_init_tracer_flags(& tr_iage_in, tr_FY_in, tr_lvl_in, tr_snow_in, & -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_in, tr_pond_cesm_in, tr_pond_lvl_in, tr_pond_topo_in, & -#else tr_pond_in, tr_pond_lvl_in, tr_pond_topo_in, & -#endif tr_fsd_in, tr_aero_in, tr_iso_in, tr_brine_in, tr_zaero_in, & tr_bgc_Nit_in, tr_bgc_N_in, tr_bgc_DON_in, tr_bgc_C_in, tr_bgc_chl_in, & tr_bgc_Am_in, tr_bgc_Sil_in, tr_bgc_DMS_in, tr_bgc_Fe_in, tr_bgc_hum_in, & @@ -224,9 +217,6 @@ subroutine icepack_init_tracer_flags(& tr_FY_in , & ! if .true., use first-year area tracer tr_lvl_in , & ! if .true., use level ice tracer tr_pond_in , & ! if .true., use melt pond tracer -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_cesm_in , & ! if .true., use cesm pond tracer -#endif tr_pond_lvl_in , & ! if .true., use level-ice pond tracer tr_pond_topo_in , & ! if .true., use explicit topography-based ponds tr_snow_in , & ! if .true., use snow metamorphosis tracers @@ -255,9 +245,6 @@ subroutine icepack_init_tracer_flags(& if (present(tr_FY_in) ) tr_FY = tr_FY_in if (present(tr_lvl_in) ) tr_lvl = tr_lvl_in if (present(tr_pond_in)) tr_pond = tr_pond_in -#ifdef UNDEPRECATE_CESMPONDS - if (present(tr_pond_cesm_in)) tr_pond_cesm = tr_pond_cesm_in -#endif if (present(tr_pond_lvl_in) ) tr_pond_lvl = tr_pond_lvl_in if (present(tr_pond_topo_in)) tr_pond_topo = tr_pond_topo_in if (present(tr_snow_in) ) tr_snow = tr_snow_in @@ -286,11 +273,7 @@ end subroutine icepack_init_tracer_flags subroutine icepack_query_tracer_flags(& tr_iage_out, tr_FY_out, tr_lvl_out, tr_snow_out, & -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_out, tr_pond_cesm_out, tr_pond_lvl_out, tr_pond_topo_out, & -#else tr_pond_out, tr_pond_lvl_out, tr_pond_topo_out, & -#endif tr_fsd_out, tr_aero_out, tr_iso_out, tr_brine_out, tr_zaero_out, & tr_bgc_Nit_out, tr_bgc_N_out, tr_bgc_DON_out, tr_bgc_C_out, tr_bgc_chl_out, & tr_bgc_Am_out, tr_bgc_Sil_out, tr_bgc_DMS_out, tr_bgc_Fe_out, tr_bgc_hum_out, & @@ -301,9 +284,6 @@ subroutine icepack_query_tracer_flags(& tr_FY_out , & ! if .true., use first-year area tracer tr_lvl_out , & ! if .true., use level ice tracer tr_pond_out , & ! if .true., use melt pond tracer -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_cesm_out , & ! if .true., use cesm pond tracer -#endif tr_pond_lvl_out , & ! if .true., use level-ice pond tracer tr_pond_topo_out , & ! if .true., use explicit topography-based ponds tr_snow_out , & ! if .true., use snow metamorphosis tracers @@ -332,9 +312,6 @@ subroutine icepack_query_tracer_flags(& if (present(tr_FY_out) ) tr_FY_out = tr_FY if (present(tr_lvl_out) ) tr_lvl_out = tr_lvl if (present(tr_pond_out)) tr_pond_out = tr_pond -#ifdef UNDEPRECATE_CESMPONDS - if (present(tr_pond_cesm_out)) tr_pond_cesm_out = tr_pond_cesm -#endif if (present(tr_pond_lvl_out) ) tr_pond_lvl_out = tr_pond_lvl if (present(tr_pond_topo_out)) tr_pond_topo_out = tr_pond_topo if (present(tr_snow_out) ) tr_snow_out = tr_snow @@ -374,9 +351,6 @@ subroutine icepack_write_tracer_flags(iounit) write(iounit,*) " tr_FY = ",tr_FY write(iounit,*) " tr_lvl = ",tr_lvl write(iounit,*) " tr_pond = ",tr_pond -#ifdef UNDEPRECATE_CESMPONDS - write(iounit,*) " tr_pond_cesm = ",tr_pond_cesm -#endif write(iounit,*) " tr_pond_lvl = ",tr_pond_lvl write(iounit,*) " tr_pond_topo = ",tr_pond_topo write(iounit,*) " tr_snow = ",tr_snow diff --git a/configuration/driver/icedrv_init.F90 b/configuration/driver/icedrv_init.F90 index bd3ed1501..200eba29e 100644 --- a/configuration/driver/icedrv_init.F90 +++ b/configuration/driver/icedrv_init.F90 @@ -111,21 +111,13 @@ subroutine input_data integer (kind=int_kind) :: ntrcr logical (kind=log_kind) :: tr_iage, tr_FY, tr_lvl, tr_pond, tr_snow logical (kind=log_kind) :: tr_iso, tr_aero, tr_fsd -#ifdef UNDEPRECATE_CESMPONDS - logical (kind=log_kind) :: tr_pond_cesm, tr_pond_lvl, tr_pond_topo, wave_spec -#else logical (kind=log_kind) :: tr_pond_lvl, tr_pond_topo, wave_spec -#endif integer (kind=int_kind) :: nt_Tsfc, nt_sice, nt_qice, nt_qsno, nt_iage, nt_FY integer (kind=int_kind) :: nt_alvl, nt_vlvl, nt_apnd, nt_hpnd, nt_ipnd, & nt_smice, nt_smliq, nt_rhos, nt_rsnw, & nt_aero, nt_fsd, nt_isosno, nt_isoice - -#ifdef UNDEPRECATE_CESMPONDS - real (kind=real_kind) :: rpcesm, rplvl, rptopo -#else + real (kind=real_kind) :: rplvl, rptopo -#endif real (kind=dbl_kind) :: Cf, puny character(len=*), parameter :: subname='(input_data)' @@ -188,9 +180,6 @@ subroutine input_data tr_iage, & tr_FY, & tr_lvl, & -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_cesm, & -#endif tr_pond_lvl, & tr_pond_topo, & tr_snow, & @@ -291,9 +280,6 @@ subroutine input_data tr_iage = .false. ! ice age tr_FY = .false. ! ice age tr_lvl = .false. ! level ice -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_cesm = .false. ! CESM melt ponds -#endif tr_pond_lvl = .false. ! level-ice melt ponds tr_pond_topo = .false. ! topographic melt ponds tr_snow = .false. ! snow tracers (wind redistribution, metamorphosis) @@ -475,29 +461,15 @@ subroutine input_data kcatbound = 0 endif -#ifdef UNDEPRECATE_CESMPONDS - rpcesm = c0 -#endif rplvl = c0 rptopo = c0 -#ifdef UNDEPRECATE_CESMPONDS - if (tr_pond_cesm) rpcesm = c1 -#endif if (tr_pond_lvl ) rplvl = c1 if (tr_pond_topo) rptopo = c1 tr_pond = .false. ! explicit melt ponds -#ifdef UNDEPRECATE_CESMPONDS - if (rpcesm + rplvl + rptopo > puny) tr_pond = .true. -#else if (rplvl + rptopo > puny) tr_pond = .true. -#endif -#ifdef UNDEPRECATE_CESMPONDS - if (rpcesm + rplvl + rptopo > c1 + puny) then -#else if (rplvl + rptopo > c1 + puny) then -#endif write (nu_diag,*) 'WARNING: Must use only one melt pond scheme' call icedrv_system_abort(file=__FILE__,line=__LINE__) endif @@ -514,14 +486,6 @@ subroutine input_data hs0 = c0 endif -#ifdef UNDEPRECATE_CESMPONDS - if (tr_pond_cesm .and. trim(frzpnd) /= 'cesm') then - write (nu_diag,*) 'WARNING: tr_pond_cesm=T' - write (nu_diag,*) 'WARNING: frzpnd, dpscale not used' - frzpnd = 'cesm' - endif -#endif - if (trim(shortwave) /= 'dEdd' .and. tr_pond .and. calc_tsfc) then write (nu_diag,*) 'WARNING: Must use dEdd shortwave' write (nu_diag,*) 'WARNING: with tr_pond and calc_tsfc=T.' @@ -628,13 +592,6 @@ subroutine input_data calc_strair = .true. endif -#ifdef UNDEPRECATE_CESMPONDS - if (tr_pond_cesm) then - write (nu_diag,*) 'ERROR: formdrag=T but frzpnd=cesm' - call icedrv_system_abort(file=__FILE__,line=__LINE__) - endif -#endif - if (.not. tr_lvl) then write (nu_diag,*) 'WARNING: formdrag=T but tr_lvl=F' write (nu_diag,*) 'WARNING: Setting tr_lvl=T' @@ -812,9 +769,6 @@ subroutine input_data write(nu_diag,1010) ' tr_iage = ', tr_iage write(nu_diag,1010) ' tr_FY = ', tr_FY write(nu_diag,1010) ' tr_lvl = ', tr_lvl -#ifdef UNDEPRECATE_CESMPONDS - write(nu_diag,1010) ' tr_pond_cesm = ', tr_pond_cesm -#endif write(nu_diag,1010) ' tr_pond_lvl = ', tr_pond_lvl write(nu_diag,1010) ' tr_pond_topo = ', tr_pond_topo write(nu_diag,1010) ' tr_snow = ', tr_snow @@ -1003,11 +957,7 @@ subroutine input_data call icepack_init_tracer_flags(tr_iage_in=tr_iage, & tr_FY_in=tr_FY, tr_lvl_in=tr_lvl, tr_aero_in=tr_aero, & tr_iso_in=tr_iso, tr_snow_in=tr_snow, & -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_in=tr_pond, tr_pond_cesm_in=tr_pond_cesm, & -#else tr_pond_in=tr_pond, & -#endif tr_pond_lvl_in=tr_pond_lvl, & tr_pond_topo_in=tr_pond_topo, tr_fsd_in=tr_fsd) call icepack_init_tracer_indices(nt_Tsfc_in=nt_Tsfc, & @@ -1097,18 +1047,9 @@ subroutine init_state k , & ! vertical index it ! tracer index -#ifdef UNDEPRECATE_0LAYER - logical (kind=log_kind) :: & - heat_capacity ! from icepack -#endif - integer (kind=int_kind) :: ntrcr logical (kind=log_kind) :: tr_iage, tr_FY, tr_lvl, tr_aero, tr_fsd, tr_iso -#ifdef UNDEPRECATE_CESMPONDS - logical (kind=log_kind) :: tr_pond_cesm, tr_pond_lvl, tr_pond_topo, tr_snow -#else logical (kind=log_kind) :: tr_pond_lvl, tr_pond_topo, tr_snow -#endif integer (kind=int_kind) :: nt_Tsfc, nt_sice, nt_qice, nt_qsno, nt_iage, nt_fy integer (kind=int_kind) :: nt_alvl, nt_vlvl, nt_apnd, nt_hpnd, nt_ipnd, & nt_smice, nt_smliq, nt_rhos, nt_rsnw, & @@ -1120,18 +1061,11 @@ subroutine init_state ! query Icepack values !----------------------------------------------------------------- -#ifdef UNDEPRECATE_0LAYER - call icepack_query_parameters(heat_capacity_out=heat_capacity) -#endif call icepack_query_tracer_sizes(ntrcr_out=ntrcr) call icepack_query_tracer_flags(tr_iage_out=tr_iage, & tr_FY_out=tr_FY, tr_lvl_out=tr_lvl, tr_aero_out=tr_aero, & tr_iso_out=tr_iso, tr_snow_out=tr_snow, & -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_cesm_out=tr_pond_cesm, tr_pond_lvl_out=tr_pond_lvl, & -#else tr_pond_lvl_out=tr_pond_lvl, & -#endif tr_pond_topo_out=tr_pond_topo, tr_fsd_out=tr_fsd) call icepack_query_tracer_indices(nt_Tsfc_out=nt_Tsfc, & nt_sice_out=nt_sice, nt_qice_out=nt_qice, & @@ -1162,27 +1096,6 @@ subroutine init_state call icedrv_system_abort(file=__FILE__,line=__LINE__) endif -#ifdef UNDEPRECATE_0LAYER - if (.not.heat_capacity) then - - write (nu_diag,*) 'WARNING - Zero-layer thermodynamics' - - if (nilyr > 1) then - write (nu_diag,*) 'nilyr =', nilyr - write (nu_diag,*) & - 'Must have nilyr = 1 if ktherm = 0' - call icedrv_system_abort(file=__FILE__,line=__LINE__) - endif - - if (nslyr > 1) then - write (nu_diag,*) 'nslyr =', nslyr - write (nu_diag,*) & - 'Must have nslyr = 1 if heat_capacity = F' - call icedrv_system_abort(file=__FILE__,line=__LINE__) - endif - - endif ! heat_capacity = F -#endif !----------------------------------------------------------------- ! Set tracer types !----------------------------------------------------------------- @@ -1199,12 +1112,6 @@ subroutine init_state if (tr_FY) trcr_depend(nt_FY) = 0 ! area-weighted first-year ice area if (tr_lvl) trcr_depend(nt_alvl) = 0 ! level ice area if (tr_lvl) trcr_depend(nt_vlvl) = 1 ! level ice volume -#ifdef UNDEPRECATE_CESMPONDS - if (tr_pond_cesm) then - trcr_depend(nt_apnd) = 0 ! melt pond area - trcr_depend(nt_hpnd) = 2+nt_apnd ! melt pond depth - endif -#endif if (tr_pond_lvl) then trcr_depend(nt_apnd) = 2+nt_alvl ! melt pond area trcr_depend(nt_hpnd) = 2+nt_apnd ! melt pond depth @@ -1264,12 +1171,6 @@ subroutine init_state nt_strata (it,2) = 0 enddo -#ifdef UNDEPRECATE_CESMPONDS - if (tr_pond_cesm) then - n_trcr_strata(nt_hpnd) = 1 ! melt pond depth - nt_strata (nt_hpnd,1) = nt_apnd ! on melt pond area - endif -#endif if (tr_pond_lvl) then n_trcr_strata(nt_apnd) = 1 ! melt pond area nt_strata (nt_apnd,1) = nt_alvl ! on level ice area diff --git a/configuration/driver/icedrv_restart.F90 b/configuration/driver/icedrv_restart.F90 index 1dd5c201b..0053a21ba 100644 --- a/configuration/driver/icedrv_restart.F90 +++ b/configuration/driver/icedrv_restart.F90 @@ -20,9 +20,6 @@ module icedrv_restart write_restart_age, read_restart_age, & write_restart_FY, read_restart_FY, & write_restart_lvl, read_restart_lvl, & -#ifdef UNDEPRECATE_CESMPONDS - write_restart_pond_cesm, read_restart_pond_cesm, & -#endif write_restart_pond_lvl, read_restart_pond_lvl, & write_restart_pond_topo, read_restart_pond_topo, & write_restart_snow, read_restart_snow, & @@ -67,11 +64,7 @@ subroutine dumpfile logical (kind=log_kind) :: & tr_iage, tr_FY, tr_lvl, tr_iso, tr_aero, tr_brine, & -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_topo, tr_pond_cesm, tr_pond_lvl, tr_snow, tr_fsd -#else tr_pond_topo, tr_pond_lvl, tr_snow, tr_fsd -#endif ! solve_zsal, skl_bgc, z_tracers character(len=char_len_long) :: filename @@ -90,11 +83,7 @@ subroutine dumpfile call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, & tr_lvl_out=tr_lvl, tr_aero_out=tr_aero, tr_iso_out=tr_iso, & tr_brine_out=tr_brine, & -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_topo_out=tr_pond_topo, tr_pond_cesm_out=tr_pond_cesm, & -#else tr_pond_topo_out=tr_pond_topo, & -#endif tr_pond_lvl_out=tr_pond_lvl,tr_snow_out=tr_snow,tr_fsd_out=tr_fsd) ! call icepack_query_parameters(solve_zsal_out=solve_zsal, & ! skl_bgc_out=skl_bgc, z_tracers_out=z_tracers) @@ -147,9 +136,6 @@ subroutine dumpfile if (tr_iage) call write_restart_age() ! ice age tracer if (tr_FY) call write_restart_FY() ! first-year area tracer if (tr_lvl) call write_restart_lvl() ! level ice tracer -#ifdef UNDEPRECATE_CESMPONDS - if (tr_pond_cesm) call write_restart_pond_cesm() ! CESM melt ponds -#endif if (tr_pond_lvl) call write_restart_pond_lvl() ! level-ice melt ponds if (tr_pond_topo) call write_restart_pond_topo() ! topographic melt ponds if (tr_snow) call write_restart_snow() ! snow metamorphosis tracers @@ -194,11 +180,7 @@ subroutine restartfile (ice_ic) logical (kind=log_kind) :: & tr_iage, tr_FY, tr_lvl, tr_iso, tr_aero, tr_brine, & -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_topo, tr_pond_cesm, tr_pond_lvl, tr_snow, tr_fsd -#else tr_pond_topo, tr_pond_lvl, tr_snow, tr_fsd -#endif character(len=char_len_long) :: filename character(len=*), parameter :: subname='(restartfile)' @@ -220,11 +202,7 @@ subroutine restartfile (ice_ic) call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, & tr_lvl_out=tr_lvl, tr_aero_out=tr_aero, tr_iso_out=tr_iso, & tr_brine_out=tr_brine, & -#ifdef UNDEPRECATE_CESMPONDS - tr_pond_topo_out=tr_pond_topo, tr_pond_cesm_out=tr_pond_cesm, & -#else tr_pond_topo_out=tr_pond_topo, & -#endif tr_pond_lvl_out=tr_pond_lvl,tr_snow_out=tr_snow,tr_fsd_out=tr_fsd) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & @@ -285,9 +263,6 @@ subroutine restartfile (ice_ic) if (tr_iage) call read_restart_age() ! ice age tracer if (tr_FY) call read_restart_FY() ! first-year area tracer if (tr_lvl) call read_restart_lvl() ! level ice tracer -#ifdef UNDEPRECATE_CESMPONDS - if (tr_pond_cesm) call read_restart_pond_cesm() ! CESM melt ponds -#endif if (tr_pond_lvl) call read_restart_pond_lvl() ! level-ice melt ponds if (tr_pond_topo) call read_restart_pond_topo() ! topographic melt ponds if (tr_snow) call read_restart_snow() ! snow metamorphosis tracers @@ -739,57 +714,6 @@ subroutine read_restart_lvl() end subroutine read_restart_lvl -#ifdef UNDEPRECATE_CESMPONDS -!=======================================================================! - -! Dumps all values needed for restarting -! -! authors Elizabeth C. Hunke, LANL -! David A. Bailey, NCAR - - subroutine write_restart_pond_cesm() - - use icedrv_state, only: trcrn - use icedrv_domain_size, only: ncat - integer (kind=int_kind) :: nt_apnd, nt_hpnd - character(len=*), parameter :: subname='(write_restart_pond_cesm)' - - call icepack_query_tracer_indices(nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd) - call icepack_warnings_flush(nu_diag) - if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & - file=__FILE__,line= __LINE__) - - call write_restart_field(nu_dump,trcrn(:,nt_apnd,:),ncat) - call write_restart_field(nu_dump,trcrn(:,nt_hpnd,:),ncat) - - end subroutine write_restart_pond_cesm - -!======================================================================= - -! Reads all values needed for a meltpond volume restart -! -! authors Elizabeth C. Hunke, LANL -! David A. Bailey, NCAR - - subroutine read_restart_pond_cesm() - - use icedrv_state, only: trcrn - use icedrv_domain_size, only: ncat - integer (kind=int_kind) :: nt_apnd, nt_hpnd - character(len=*), parameter :: subname='(read_restart_pond_cesm)' - - call icepack_query_tracer_indices(nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd) - call icepack_warnings_flush(nu_diag) - if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & - file=__FILE__,line= __LINE__) - - write(nu_diag,*) 'min/max cesm ponds' - - call read_restart_field(nu_restart,trcrn(:,nt_apnd,:),ncat) - call read_restart_field(nu_restart,trcrn(:,nt_hpnd,:),ncat) - - end subroutine read_restart_pond_cesm -#endif !======================================================================= ! ! Dumps all values needed for restarting diff --git a/doc/source/icepack_index.rst b/doc/source/icepack_index.rst index 330dc480d..80be4abf6 100755 --- a/doc/source/icepack_index.rst +++ b/doc/source/icepack_index.rst @@ -10,7 +10,7 @@ code. Values appearing in this list are fixed or recommended; most namelist parameters are indicated ( :math:`\bullet`) with their default values. For other namelist options, see Section :ref:`tabnamelist`. All quantities in the code are expressed in MKS units (temperatures may take -either Celsius or Kelvin units). +either Celsius or Kelvin units). Deprecated parameters are listed at the end. .. csv-table:: *Alphabetical Index of Icepack Variables and Parameters* :header: " ", " ", " " @@ -203,7 +203,6 @@ either Celsius or Kelvin units). "H2_16O_ocn", "concentration of H2_16O isotope in ocean", "kg/kg" "H2_18O_ocn", "concentration of H2_18O isotope in ocean", "kg/kg" "HDO_ocn", "concentration of HDO isotope in ocean", "kg/kg" - "heat_capacity", "DEPRECATED", "" "hfrazilmin", "minimum thickness of new frazil ice", "0.05 m" "hi_min", "minimum ice thickness for thinnest ice category", "0.01 m" "hi_ssl", "ice surface scattering layer thickness", "0.05 m" @@ -219,7 +218,7 @@ either Celsius or Kelvin units). "hpmin", "minimum melt pond depth (shortwave)", "0.005 m" "hpondn", "melt pond depth", "m" "hs_min", "minimum thickness for which :math:`T_s` is computed", "1.\ :math:`\times`\ 10\ :math:`^{-4}` m" - "hs0", ":math:`\bullet` snow depth at which transition to ice occurs (dEdd)", "0.03 m" + "hs0", ":math:`\bullet` snow depth at which transition to ice occurs (dEdd)", "" "hs1", ":math:`\bullet` snow depth of transition to pond ice", "0.03 m" "hs_ssl", "snow surface scattering layer thickness", "0.04 m" "Hstar", "determines mean thickness of ridged ice", "25. m" @@ -251,7 +250,6 @@ either Celsius or Kelvin units). "krdg_partic", ":math:`\bullet` ridging participation function", "1" "krdg_redist", ":math:`\bullet` ridging redistribution function", "1" "krdgn", "mean ridge thickness per thickness of ridging ice", "" - "kseaice", "DEPRECATED", "" "ksno", "thermal conductivity of snow", "0.30 W/m/deg" "kstrength", ":math:`\bullet` ice stength formulation (1= :cite:`Rothrock75`, 0 = :cite:`Hibler79`)", "1" "ktherm", ":math:`\bullet` thermodynamic formulation (-1 none, 1 = :cite:`Bitz99`, 2 = mushy)", "" @@ -475,7 +473,6 @@ either Celsius or Kelvin units). "tr_FY", ":math:`\bullet` if true, use first-year area tracer", "" "tr_iage", ":math:`\bullet` if true, use ice age tracer", "" "tr_lvl", ":math:`\bullet` if true, use level ice area and volume tracers", "" - "tr_pond_cesm", "DEPRECATED", "" "tr_pond_lvl", ":math:`\bullet` if true, use level-ice melt pond scheme", "" "tr_pond_topo", ":math:`\bullet` if true, use topo melt pond scheme", "" "trcr", "ice tracers", "" @@ -525,18 +522,13 @@ either Celsius or Kelvin units). "zref", "reference height for stability", "10. m" "zTrf", "reference height for :math:`T_{ref}`, :math:`Q_{ref}`, :math:`U_{ref}`", "2. m" "zvir", "gas constant (water vapor)/gas constant (air) - 1", "0.606" - - -.. - deprecation comments - ktherm=0 (zero-layer thermodynamics) is being deprecated - heat_capacity is being deprecated as part of ktherm=0 (zero-layer thermo) deprecation - "heat_capacity", ":math:`\bullet` if true, use salinity-dependent thermodynamics", "T" + "**Deprecated options and parameters**", "", "" + "heat_capacity", "if true, use salinity-dependent thermodynamics", "T" "kseaice", "thermal conductivity of ice for zero-layer thermodynamics", "2.0 W/m/deg" - "ktherm", ":math:`\bullet` thermodynamic formulation (0 = zero-layer, 1 = :cite:`Bitz99`, 2 = mushy)", "" - + "ktherm", "thermodynamic formulation (0 = zero-layer, 1 = :cite:`Bitz99`, 2 = mushy)", "" + "tr_pond_cesm", "if true, use CESM melt pond scheme", "" .. - comment tr_pond_cesm is being deprecated - "tr_pond_cesm", ":math:`\bullet` if true, use CESM melt pond scheme", "" + new deprecation comments + diff --git a/doc/source/science_guide/sg_thermo.rst b/doc/source/science_guide/sg_thermo.rst index 355415a8d..15f356ab8 100755 --- a/doc/source/science_guide/sg_thermo.rst +++ b/doc/source/science_guide/sg_thermo.rst @@ -5,12 +5,6 @@ Thermodynamics ============== -.. - ktherm=0 (zero-layer thermodynamics) is being deprecated - The current Icepack version includes three thermodynamics - options, the "zero-layer" thermodynamics of :cite:`Semtner76` - (``ktherm`` = 0), the Bitz and Lipscomb model :cite:`Bitz99` - The current Icepack version includes two thermodynamics options, the Bitz and Lipscomb model :cite:`Bitz99` (``ktherm`` = 1) that assumes a fixed salinity profile, and a "mushy" @@ -61,6 +55,39 @@ to "move" the excess internal shortwave in this case up to the top surface to be The namelist parameters for this option are ``sw_redist``, ``sw_frac``, and ``sw_dtemp``. By default, ``sw_redist`` is set to ``.false.`` +Snow fraction +------------- + +In several places in the code, the snow fraction over ice (either sea ice or pond lids) varies +as a function of snow depth. That is, thin layers of snow are assumed to be patchy, which +allows the shortwave flux to increase gradually as the layer thins, preventing sudden changes +in the shortwave reaching the sea ice (which can cause the thermodynamics solver to not converge). +For example, the parameter ``snowpatch`` is used for the CCSM3 radiation scheme, with a default +value of 0.02: + +.. math:: + f_{snow} = \frac{h_s}{h_s + h_{snowpatch}}, + +The parameters ``hs0`` and ``hs1`` are used similarly for delta-Eddington radiation calculations with +meltponds, with ``hs0`` over sea ice and ``hs1`` over pond ice. + +In the tests shown in :cite:`Hunke13`, :math:`h_{s0}=0` for all cases except with the cesm +pond scheme; that pond scheme has now been deprecated. :math:`h_{s0}` can be used with the topo pond +scheme, although its impacts have not been documented. We enforce :math:`hs0=0` for level-ice ponds +because the infiltration of snow by pond water accomplishes the gradual radiative forcing +transition for which the patchy-snow parameters were originally intended. When level-ice ponds +are not used, then a typical value for hs0 is 0.03. + +With level-ice ponds, the pond water is allowed to infiltrate snow over the level ice area, +invisible to the radiation scheme, until the water becomes deep enough to show through the +snow layer. The pond fraction is computed during this process and then used to +set the snow fraction such that :math:`f_{snow}+f_{pond}=1`. The ponds are only on the level ice +area, and so there is still snow on the ridges even if the entire level ice area becomes filled +with ponds. + +See :cite:`Hunke13` for a discussion of the impacts of varying hs1, whose default value is 0.03. + + .. _ponds: Melt ponds @@ -107,36 +134,6 @@ In addition to the physical processes discussed below, tracer equations and definitions for melt ponds are also described in the :ref:`tracers` section. -CESM formulation (``tr_pond_cesm`` = true) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -*Note that the CESM pond option is being deprecated.* - -Melt pond area and thickness tracers are carried on each ice thickness -category as in the :ref:`tracers` section. Defined simply as the product -of pond area, :math:`a_p`, and depth, :math:`h_p`, the melt pond volume, -:math:`V_{p}`, grows through addition of ice or snow melt water or rain -water, and shrinks when the ice surface temperature becomes cold, - -.. math:: - \begin{aligned} - {\rm pond \ growth:\ } \ V_{p}^\prime &= V_{p}(t) +\Delta V_{melt} , \\ - {\rm pond \ contraction:\ } \ V_{p}(t+\Delta t) &= V_{p}^\prime\exp\left[r_2\left( {\max\left(T_p-T_{sfc}, 0\right) \over T_p}\right)\right], \end{aligned} - :label: meltpond-cesm - -where :math:`dh_{i}` and :math:`dh_{s}` represent ice and snow melt at -the top surface of each thickness category and :math:`r_2=0.01`. Here, -:math:`T_p` is a reference temperature equal to :math:`-2^\circ`\ C. -Pond depth is assumed to be a linear function of the pond fraction -(:math:`h_p=\delta_p a_p`) and is limited by the category ice thickness -(:math:`h_p \le 0.9 h_i`). The pond shape (``pndaspect``) -:math:`\delta_p = 0.8` in the standard CESM pond configuration. The area -and thickness are computed according to the assumed pond shape, and the -pond area is then reduced in the presence of snow for the radiation -calculation. Ponds are allowed only on ice at least 1 cm thick. This -formulation differs slightly from that documented in -:cite:`Holland12`. - Topographic formulation (``tr_pond_topo`` = true) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -871,17 +868,6 @@ that :math:`F_{bot} + F_{side} \ge F_{frzmlt}` in the case that New temperatures ---------------- -.. comment: ktherm=0 (zero-layer thermo) is being deprecated -.. Zero-layer thermodynamics (``ktherm`` = 0) -.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. An option for zero-layer thermodynamics :cite:`Semtner76` is -.. available in this version of Icepack by setting the namelist parameter -.. ``ktherm`` to 0 and changing the number of ice layers, nilyr, in -.. **icedrv\_domain\_size.F90** to 1. In the zero-layer case, the ice is -.. fresh and the thermodynamic calculations are much simpler than in the -.. other configurations, which we describe here. - Bitz and Lipscomb thermodynamics (``ktherm`` = 1) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/source/science_guide/sg_tracers.rst b/doc/source/science_guide/sg_tracers.rst index e14fbc3c6..96c63ce7a 100755 --- a/doc/source/science_guide/sg_tracers.rst +++ b/doc/source/science_guide/sg_tracers.rst @@ -45,10 +45,8 @@ is discussed in :cite:`Armour11`. Tracers that depend on other tracers ------------------------------------ -*Note that the cesm pond option is being deprecated.* - Tracers may be defined that depend on other tracers. Melt pond tracers -provide an example (these equations pertain to cesm and topo tracers; +provide an example (these equations pertain to topo tracers; level-ice tracers are similar with an extra factor of :math:`a_{lvl}`, see Equations :eq:`transport-lvl`–:eq:`transport-ipnd-lvl`). Conservation equations for pond area fraction :math:`a_{pnd}a_i` and pond volume @@ -73,7 +71,7 @@ tracer. For a generic quantity :math:`q` that represents a mean value over the ice fraction, :math:`q a_i` is the average value over the grid cell. -Thus for cesm or topo melt ponds, :math:`h_{pnd}` can be considered the +Thus for topo melt ponds, :math:`h_{pnd}` can be considered the actual pond depth, :math:`h_{pnd}a_{pnd}` is the mean pond depth over the sea ice, and :math:`h_{pnd}a_{pnd}a_i` is the mean pond depth over the grid cell. These quantities are illustrated in Figure :ref:`fig-tracers`. diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 9d1e15663..7af90dbc1 100644 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -183,15 +183,11 @@ tracer_nml "``tr_iage``", "logical", "ice age", "``.false.``" "``tr_iso``", "logical", "isotopes", "``.false.``" "``tr_lvl``", "logical", "level ice area and volume", "``.false.``" - "``tr_pond_cesm``", "logical", "DEPRECATED", "``.false.``" "``tr_pond_lvl``", "logical", "level-ice melt ponds", "``.false.``" "``tr_pond_topo``", "logical", "topo melt ponds", "``.false.``" "``tr_snow``", "logical", "advanced snow physics", "``.false.``" "", "", "", "" -.. comment tr_pond_cesm is being deprecated - "``tr_pond_cesm``", "logical", "CESM melt ponds", "``.false.``" - thermo_nml ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -218,9 +214,6 @@ thermo_nml "``Rac_rapid_mode``", "real", "critical Rayleigh number", "10.0" "", "", "", "" -.. - ktherm=0 (zero-layer thermodynamics) is being deprecated - "", "``0``", "zero-layer thermodynamic model", "" dynamics_nml ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -280,7 +273,7 @@ ponds_nml "``frzpnd``", "``cesm``", "CESM pond refreezing forumulation", "``cesm``" "", "``hlid``", "Stefan refreezing with pond ice thickness", "" "``hp1``", "real", "critical ice lid thickness for topo ponds in m", "0.01" - "``hs0``", "real", "snow depth of transition to bare sea ice in m", "0.03" + "``hs0``", "real", "snow depth of transition to bare sea ice in m", "" "``hs1``", "real", "snow depth of transition to pond ice in m", "0.03" "``pndaspect``", "real", "aspect ratio of pond changes (depth:area)", "0.8" "``rfracmax``", ":math:`0 \le r_{max} \le 1`", "maximum melt water added to ponds", "0.85" From 5bf584f6b7f76d64d64db3965407c8ca216b1329 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Wed, 16 Nov 2022 08:47:06 -0700 Subject: [PATCH 05/10] snow grain radius bug fix (#412) --- columnphysics/icepack_shortwave.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/columnphysics/icepack_shortwave.F90 b/columnphysics/icepack_shortwave.F90 index 4a6e34c28..1063c4b29 100644 --- a/columnphysics/icepack_shortwave.F90 +++ b/columnphysics/icepack_shortwave.F90 @@ -3592,7 +3592,7 @@ subroutine shortwave_dEdd_set_snow(nslyr, R_snw, & do ks = 1, nslyr rsnw(ks) = max(rsnw_fall,rsnow(ks)) - rsnw(ks) = min(rsnw_tmax,rsnow(ks)) + rsnw(ks) = min(rsnw_tmax,rsnw (ks)) rhosnw(ks) = rhos enddo From 493373809c85561f0c48f6255b713b7ec0642a8d Mon Sep 17 00:00:00 2001 From: Elizabeth Hunke Date: Fri, 18 Nov 2022 12:04:52 -0700 Subject: [PATCH 06/10] Initial, partial deprecation of zsalinity (#413) * Initial, partial deprecation of zsalinity * remove zsal tests * make icepack_warnings_getall public --- columnphysics/icepack_parameters.F90 | 9 +++++++++ columnphysics/icepack_warnings.F90 | 4 ++-- columnphysics/icepack_zbgc.F90 | 5 ++++- columnphysics/icepack_zbgc_shared.F90 | 3 +++ columnphysics/icepack_zsalinity.F90 | 8 +++++++- configuration/driver/icedrv_init_column.F90 | 6 ++++++ configuration/scripts/tests/base_suite.ts | 2 -- configuration/scripts/tests/travis_suite.ts | 1 - doc/source/science_guide/sg_bgc.rst | 12 ++++++------ doc/source/user_guide/ug_case_settings.rst | 6 ++++-- doc/source/user_guide/ug_implementation.rst | 5 ++++- 11 files changed, 45 insertions(+), 16 deletions(-) diff --git a/columnphysics/icepack_parameters.F90 b/columnphysics/icepack_parameters.F90 index 8b969f1fe..b6b1f197d 100644 --- a/columnphysics/icepack_parameters.F90 +++ b/columnphysics/icepack_parameters.F90 @@ -1057,7 +1057,16 @@ subroutine icepack_init_parameters( & if (present(modal_aero_in) ) modal_aero = modal_aero_in if (present(conserv_check_in) ) conserv_check = conserv_check_in if (present(skl_bgc_in) ) skl_bgc = skl_bgc_in +#ifdef UNDEPRECATE_ZSAL if (present(solve_zsal_in) ) solve_zsal = solve_zsal_in +#else + if (present(solve_zsal_in)) then + if (solve_zsal_in) then + call icepack_warnings_add(subname//' zsalinity is being deprecated') + call icepack_warnings_setabort(.true.,__FILE__,__LINE__) + endif + endif +#endif if (present(grid_o_in) ) grid_o = grid_o_in if (present(l_sk_in) ) l_sk = l_sk_in if (present(initbio_frac_in) ) initbio_frac = initbio_frac_in diff --git a/columnphysics/icepack_warnings.F90 b/columnphysics/icepack_warnings.F90 index d8e403a60..36adb6721 100644 --- a/columnphysics/icepack_warnings.F90 +++ b/columnphysics/icepack_warnings.F90 @@ -24,10 +24,10 @@ module icepack_warnings icepack_warnings_flush, & icepack_warnings_aborted, & icepack_warnings_add, & - icepack_warnings_setabort + icepack_warnings_setabort, & + icepack_warnings_getall private :: & - icepack_warnings_getall, & icepack_warnings_getone !======================================================================= diff --git a/columnphysics/icepack_zbgc.F90 b/columnphysics/icepack_zbgc.F90 index 54b33f22e..964efd442 100644 --- a/columnphysics/icepack_zbgc.F90 +++ b/columnphysics/icepack_zbgc.F90 @@ -45,7 +45,9 @@ module icepack_zbgc use icepack_algae, only: zbio, sklbio use icepack_therm_shared, only: calculate_Tin_from_qin use icepack_itd, only: column_sum, column_conservation_check +#ifdef UNDEPRECATE_ZSAL use icepack_zsalinity, only: zsalinity +#endif implicit none @@ -1055,6 +1057,7 @@ subroutine icepack_biogeochemistry(dt, & hbri = hbri + hbrin * aicen(n) +#ifdef UNDEPRECATE_ZSAL if (solve_zsal) then call zsalinity (n, dt, & @@ -1083,7 +1086,7 @@ subroutine icepack_biogeochemistry(dt, & if (icepack_warnings_aborted(subname)) return endif ! solve_zsal - +#endif endif ! tr_brine !----------------------------------------------------------------- diff --git a/columnphysics/icepack_zbgc_shared.F90 b/columnphysics/icepack_zbgc_shared.F90 index 770180782..51a8a8bda 100644 --- a/columnphysics/icepack_zbgc_shared.F90 +++ b/columnphysics/icepack_zbgc_shared.F90 @@ -158,9 +158,12 @@ module icepack_zbgc_shared real (kind=dbl_kind), parameter, public :: & bphimin = 0.03_dbl_kind ! minimum porosity for zbgc only +#ifdef UNDEPRECATE_ZSAL +! these parameters are used more generally for zbgc !----------------------------------------------------------------------- ! Parameters for zsalinity !----------------------------------------------------------------------- +#endif real (kind=dbl_kind), parameter, public :: & viscos_dynamic = 2.2_dbl_kind , & ! 1.8e-3_dbl_kind (pure water at 0^oC) (kg/m/s) diff --git a/columnphysics/icepack_zsalinity.F90 b/columnphysics/icepack_zsalinity.F90 index 20035804c..16de63bd0 100644 --- a/columnphysics/icepack_zsalinity.F90 +++ b/columnphysics/icepack_zsalinity.F90 @@ -13,6 +13,12 @@ ! module icepack_zsalinity +! zsalinity is being deprecated +! Additional code cleanup will follow including removal of +! solve_zsal, tr_bgc_S, grid_oS, l_skS, iki, TRZS, +! Rayleigh_real, Rayleigh_criteria, and all *zsal* +! icepack_brine.F90 subroutines icepack_init_zsalinity, compute_microS +#ifdef UNDEPRECATE_ZSAL use icepack_kinds use icepack_parameters, only: c0, c1, c2, p001, p5, puny, rhow, depressT, gravit use icepack_parameters, only: rhosi, min_salin, salt_loss @@ -1148,7 +1154,7 @@ subroutine column_sum_zsal (zsal_totn, nblyr, & enddo ! k end subroutine column_sum_zsal - +#endif !======================================================================= end module icepack_zsalinity diff --git a/configuration/driver/icedrv_init_column.F90 b/configuration/driver/icedrv_init_column.F90 index 357fa6ec8..c43d018b0 100644 --- a/configuration/driver/icedrv_init_column.F90 +++ b/configuration/driver/icedrv_init_column.F90 @@ -1030,6 +1030,7 @@ subroutine init_zbgc !----------------------------------------------------------------- ! zsalinity and brine !----------------------------------------------------------------- +#ifdef UNDEPRECATE_ZSAL if (solve_zsal .and. TRZS == 0) then write(nu_diag,*) 'WARNING: solve_zsal=T but 0 zsalinity tracers' write(nu_diag,*) 'WARNING: setting solve_zsal = F' @@ -1046,6 +1047,11 @@ subroutine init_zbgc tr_brine = .true. ktherm = 1 endif +#else + if (solve_zsal) then + write(nu_diag,*) 'WARNING: zsalinity is being deprecated' + endif +#endif if (tr_brine .and. TRBRI == 0 ) then write(nu_diag,*) & diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index 76af2b660..ba5b9c660 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -4,7 +4,6 @@ smoke col 1x1 debug,run1year smoke col 1x1 debug,bgcispol smoke col 1x1 debug,bgcnice smoke col 1x1 debug,bgcsklnice -smoke col 1x1 debug,run1year,zsal smoke col 1x1 debug,run1year,thermo1 smoke col 1x1 debug,run1year,swredist smoke col 1x1 debug,run1year,swccsm3 @@ -25,7 +24,6 @@ restart col 1x1 diag1 restart col 1x1 pondlvl restart col 1x1 pondtopo restart col 1x1 bgcispol -restart col 1x1 zsal restart col 1x1 thermo1 restart col 1x1 swccsm3 restart col 1x1 isotope diff --git a/configuration/scripts/tests/travis_suite.ts b/configuration/scripts/tests/travis_suite.ts index 2a4801581..b1617f132 100644 --- a/configuration/scripts/tests/travis_suite.ts +++ b/configuration/scripts/tests/travis_suite.ts @@ -14,7 +14,6 @@ restart col 1x1 diag1 restart col 1x1 pondlvl restart col 1x1 pondtopo restart col 1x1 bgcispol -restart col 1x1 zsal restart col 1x1 thermo1 restart col 1x1 swccsm3 restart col 1x1 isotope diff --git a/doc/source/science_guide/sg_bgc.rst b/doc/source/science_guide/sg_bgc.rst index 205d8be87..90f93f620 100755 --- a/doc/source/science_guide/sg_bgc.rst +++ b/doc/source/science_guide/sg_bgc.rst @@ -129,8 +129,7 @@ difference between the brine height and the equilibrium sea surface. Brine height motion is computed in **icepack\_brine.F90** from thermodynamic variables and the ice microstructural state deduced from internal bulk salinities and temperature. This tracer is -required for the transport of vertically resolved biogeochemical tracers -and is closely coupled to the z-salinity prognostic salinity model. +required for the transport of vertically resolved biogeochemical tracers. Vertical transport processes are, generally, a result of the brine motion. Therefore the vertical transport equations for biogeochemical @@ -450,10 +449,11 @@ flags in **icepack\_in** must be true: a) ``tr_brine``, b) ``z_tracers``, and c) This is appropriate for the black carbon and dust aerosols specified by ``tr_zaero`` true. -In addition, a halodynamics scheme must also be used. The default -thermo-halodynamics is mushy layer ``ktherm`` set to 2. An alternative uses -the Bitz and Lipscomb thermodynamics ``ktherm`` set to 1 and ``solve_zsal`` -true (referred to as "zsalinity"). +.. zsalinity is being deprecated +.. In addition, a halodynamics scheme must also be used. The default +.. thermo-halodynamics is mushy layer ``ktherm`` set to 2. An alternative uses +.. the Bitz and Lipscomb thermodynamics ``ktherm`` set to 1 and ``solve_zsal`` +.. true (referred to as "zsalinity"). With the above flags, the default biochemistry is a simple algal-nitrate system: ``tr_bgc_N`` and ``tr_bgc_Nit`` are true. Options diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 7af90dbc1..837997a0a 100644 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -96,7 +96,7 @@ can be modified as needed. "NTRAERO", "integer", "number of aerosol tracers", "1" "NTRISO", "integer", "number of water isotope tracers", "1" "TRBRI", "0,1", "brine height tracer", "0" - "TRZS", "0,1", "zsalinity tracer, needs TRBRI=1", "0" + "TRZS", "", "DEPRECATED", "" "TRBGCS", "0,1", "skeletal layer tracer, needs TRBGCZ=0", "0" "TRBGCZ", "0,1", "zbgc tracers, needs TRBGCS=0 and TRBRI=1", "0" "NBGCLYR", "integer", "number of zbgc layers", "1" @@ -499,7 +499,7 @@ zbgc_nml "``silicatetype``", "real", "mobility type between stationary and mobile silicate", "-1.0" "``skl_bgc``", "logical", "biogeochemistry", "``.false.``" "``solve_zbgc``", "logical", "", "``.false.``" - "``solve_zsal``", "logical", "update salinity tracer profile", "``.false.``" + "``solve_zsal``", "logical", "DEPRECATED", "``.false.``" "``tau_max``", "real", "long time mobile to stationary exchanges", "1.73e-5" "``tau_min``", "real", "rapid module to stationary exchanges", "5200." "``tr_bgc_Am``", "logical", "ammonium tracer", "``.false.``" @@ -540,6 +540,8 @@ zbgc_nml .. "``restart_bgc``", "logical", "restart tracer values from file", "``.false.``" .. "``restart_hbrine``", "logical", "", "``.false.``" .. "``restart_zsal``", "logical", "", "``.false.``" +.. "``solve_zsal``", "logical", "update salinity tracer profile", "``.false.``" +.. "TRZS", "0,1", "zsalinity tracer, needs TRBRI=1", "0" * = If Icepack is run stand-alone and wave_spec_type is not set to none, then a fixed wave spectrum is defined in the code to use for testing. As with other input data, this spectrum should not be used for production runs or publications. diff --git a/doc/source/user_guide/ug_implementation.rst b/doc/source/user_guide/ug_implementation.rst index fe244fcea..b4239b87e 100755 --- a/doc/source/user_guide/ug_implementation.rst +++ b/doc/source/user_guide/ug_implementation.rst @@ -228,7 +228,7 @@ i.e. f\_fbio, except they are averaged by ice area. "f\_aero", "aerosol mass (snow and ice ssl and int)", "aerosnossl, aerosnoint,aeroicessl, aeroiceint", "kg/kg" "f\_fbio", "biological ice to ocean flux", "fN, fDOC, fNit, fAm,fDON,fFep\ :math:`^a`, fFed\ :math:`^a`, fSil,fhum, fPON, fDMSPd,fDMS, fDMSPp, fzaero", "mmol m\ :math:`^{-2}` s\ :math:`^{-1}`" "f\_zaero", "bulk z-aerosol mass fraction", "zaero", "kg/kg" - "f\_bgc\_S", "bulk z-salinity", "bgc\_S", "ppt" + "f\_bgc\_S", "DEPRECATED", "bgc\_S", "ppt" "f\_bgc\_N", "bulk algal N concentration", "bgc\_N", "mmol m\ :math:`^{-3}`" "f\_bgc\_C", "bulk algal C concentration", "bgc\_C", "mmol m\ :math:`^{-3}`" "f\_bgc\_DOC", "bulk DOC concentration", "bgc\_DOC", "mmol m\ :math:`^{-3}`" @@ -267,3 +267,6 @@ i.e. f\_fbio, except they are averaged by ice area. :math:`^b` units are :math:`\mu`\ mol m\ :math:`^{-3}` :math:`^c` units are :math:`\mu`\ mol m\ :math:`^{-2}` + +.. deprecated +.. "f\_bgc\_S", "bulk z-salinity", "bgc\_S", "ppt" From 64a27d3f140fcdbb809590b58096af721db3fcb7 Mon Sep 17 00:00:00 2001 From: apcraig Date: Fri, 18 Nov 2022 12:18:08 -0700 Subject: [PATCH 07/10] Remove redundancy in public declaration --- columnphysics/icepack_warnings.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/columnphysics/icepack_warnings.F90 b/columnphysics/icepack_warnings.F90 index f59e6b24a..36adb6721 100644 --- a/columnphysics/icepack_warnings.F90 +++ b/columnphysics/icepack_warnings.F90 @@ -19,7 +19,6 @@ module icepack_warnings character(len=char_len_long), public :: warnstr public :: & - icepack_warnings_getall, & icepack_warnings_clear, & icepack_warnings_print, & icepack_warnings_flush, & From 894464623890a64c317117e622c1e0c430586d01 Mon Sep 17 00:00:00 2001 From: apcraig Date: Fri, 18 Nov 2022 16:00:16 -0700 Subject: [PATCH 08/10] recover main bit-for-bit --- configuration/scripts/options/set_nml.alt03 | 2 +- configuration/scripts/options/set_nml.alt04 | 2 +- configuration/scripts/options/set_nml.bgcispol | 1 + configuration/scripts/options/set_nml.bgcnice | 1 + configuration/scripts/options/set_nml.bgcsklnice | 1 + configuration/scripts/options/set_nml.fsd12 | 1 + configuration/scripts/options/set_nml.leap | 1 + configuration/scripts/options/set_nml.modal | 2 ++ 8 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configuration/scripts/options/set_nml.alt03 b/configuration/scripts/options/set_nml.alt03 index 3fa70399f..bd51c8561 100644 --- a/configuration/scripts/options/set_nml.alt03 +++ b/configuration/scripts/options/set_nml.alt03 @@ -5,7 +5,7 @@ sw_redist = .true. sw_frac = 0.9d0 sw_dtemp = 0.02d0 - tfrz_option = 'linear_salt' + tfrz_option = 'linear_salt_old' conduct = 'bubbly' conserv_check = .true. restore_ocn = .true. diff --git a/configuration/scripts/options/set_nml.alt04 b/configuration/scripts/options/set_nml.alt04 index 8986e13ff..ba5a54670 100644 --- a/configuration/scripts/options/set_nml.alt04 +++ b/configuration/scripts/options/set_nml.alt04 @@ -8,7 +8,7 @@ sw_redist = .true. sw_frac = 0.9d0 sw_dtemp = 0.02d0 - tfrz_option = 'linear_salt' + tfrz_option = 'linear_salt_old' conduct = 'bubbly' krdg_partic = 0 krdg_redist = 0 diff --git a/configuration/scripts/options/set_nml.bgcispol b/configuration/scripts/options/set_nml.bgcispol index f1a40b1a3..8c530fd2f 100644 --- a/configuration/scripts/options/set_nml.bgcispol +++ b/configuration/scripts/options/set_nml.bgcispol @@ -24,3 +24,4 @@ tr_bgc_hum = .true. tr_bgc_DON = .true. tr_bgc_Fe = .false. + tfrz_option = 'mushy_old' diff --git a/configuration/scripts/options/set_nml.bgcnice b/configuration/scripts/options/set_nml.bgcnice index c9cd9f0fd..5062b1699 100644 --- a/configuration/scripts/options/set_nml.bgcnice +++ b/configuration/scripts/options/set_nml.bgcnice @@ -24,3 +24,4 @@ tr_bgc_hum = .true. tr_bgc_DON = .true. tr_bgc_Fe = .true. + tfrz_option = 'mushy_old' diff --git a/configuration/scripts/options/set_nml.bgcsklnice b/configuration/scripts/options/set_nml.bgcsklnice index 7d7fbaeb7..ef3fb435f 100644 --- a/configuration/scripts/options/set_nml.bgcsklnice +++ b/configuration/scripts/options/set_nml.bgcsklnice @@ -22,3 +22,4 @@ year_init = 2015 tr_bgc_hum = .true. tr_bgc_DON = .true. tr_bgc_Fe = .true. + tfrz_option = 'mushy_old' diff --git a/configuration/scripts/options/set_nml.fsd12 b/configuration/scripts/options/set_nml.fsd12 index f3534b8ce..1692e95b2 100644 --- a/configuration/scripts/options/set_nml.fsd12 +++ b/configuration/scripts/options/set_nml.fsd12 @@ -1,2 +1,3 @@ tr_fsd = .true. wave_spec_type = 'constant' +tfrz_option = 'mushy_old' diff --git a/configuration/scripts/options/set_nml.leap b/configuration/scripts/options/set_nml.leap index 71af9479a..4802b6eea 100644 --- a/configuration/scripts/options/set_nml.leap +++ b/configuration/scripts/options/set_nml.leap @@ -1,2 +1,3 @@ days_per_year = 365 use_leap_years = .true. +tfrz_option = 'mushy_old' diff --git a/configuration/scripts/options/set_nml.modal b/configuration/scripts/options/set_nml.modal index 61ba0c055..22e670ca6 100644 --- a/configuration/scripts/options/set_nml.modal +++ b/configuration/scripts/options/set_nml.modal @@ -5,3 +5,5 @@ tr_aero = .true. modal_aero = .true. rfracmin = 0.15 rfracmax = 1.0 +tfrz_option = 'mushy_old' + From ae5a4ef0d76521dcb626ea5da7f8aec47957397b Mon Sep 17 00:00:00 2001 From: apcraig Date: Fri, 18 Nov 2022 18:31:47 -0700 Subject: [PATCH 09/10] update tfrz_option --- configuration/scripts/options/set_nml.thermo1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration/scripts/options/set_nml.thermo1 b/configuration/scripts/options/set_nml.thermo1 index 4ed48a77a..e1c3c2aac 100644 --- a/configuration/scripts/options/set_nml.thermo1 +++ b/configuration/scripts/options/set_nml.thermo1 @@ -6,5 +6,5 @@ sw_redist = .true. sw_frac = 0.9d0 sw_dtemp = 0.02d0 conduct = 'MU71' -tfrz_option = 'linear_salt' +tfrz_option = 'linear_salt_old' atm_data_type = 'clim' From cabfe0f111b61057db16cd8891f83ea4ad447a8a Mon Sep 17 00:00:00 2001 From: Tony Craig Date: Sun, 20 Nov 2022 10:11:10 -0800 Subject: [PATCH 10/10] make fsd12 tests short length to give extra time (#414) --- configuration/scripts/tests/base_suite.ts | 4 ++-- configuration/scripts/tests/travis_suite.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index ba5b9c660..93f456524 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -13,7 +13,7 @@ smoke col 1x1 debug,run1year,alt03 smoke col 1x1 debug,run1year,alt04 smoke col 1x1 debug,run1year,leap,dt30min smoke col 1x1 debug,run1year,dyn -smoke col 1x1 debug,run1year,fsd12 +smoke col 1x1 debug,run1year,fsd12,short smoke col 1x1 debug,run1year,fsd1 smoke col 1x1 debug,run1year,snw30percent,snwgrain smoke col 1x1 debug,run1year,snwitdrdg @@ -32,7 +32,7 @@ restart col 1x1 alt02 restart col 1x1 alt03 restart col 1x1 alt04 restart col 1x1 dyn -restart col 1x1 fsd12 +restart col 1x1 fsd12,short restart col 1x1 snwitdrdg,snwgrain restart col 1x1 modal diff --git a/configuration/scripts/tests/travis_suite.ts b/configuration/scripts/tests/travis_suite.ts index b1617f132..8c22ba46c 100644 --- a/configuration/scripts/tests/travis_suite.ts +++ b/configuration/scripts/tests/travis_suite.ts @@ -22,6 +22,6 @@ restart col 1x1 alt02 restart col 1x1 alt03 restart col 1x1 alt04 restart col 1x1 dyn -restart col 1x1 fsd12 +restart col 1x1 fsd12,short restart col 1x1 snwitdrdg,snwgrain restart col 1x1 modal