diff --git a/columnphysics/icepack_itd.F90 b/columnphysics/icepack_itd.F90 index fd19265c2..4b9ef197d 100644 --- a/columnphysics/icepack_itd.F90 +++ b/columnphysics/icepack_itd.F90 @@ -734,11 +734,11 @@ subroutine column_conservation_check (fieldid, & call icepack_warnings_add(warnstr) write(warnstr,*) subname, 'Conservation error: ', trim(fieldid) call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'Initial value =', x1 + write(warnstr,*) subname, ' Initial value = ', x1 call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'Final value =', x2 + write(warnstr,*) subname, ' Final value = ', x2 call icepack_warnings_add(warnstr) - write(warnstr,*) subname, 'Difference =', x2 - x1 + write(warnstr,*) subname, ' Difference = ', x2 - x1 call icepack_warnings_add(warnstr) endif diff --git a/columnphysics/icepack_mechred.F90 b/columnphysics/icepack_mechred.F90 index 5da2fb1e4..54a7e9a19 100644 --- a/columnphysics/icepack_mechred.F90 +++ b/columnphysics/icepack_mechred.F90 @@ -39,7 +39,7 @@ module icepack_mechred use icepack_parameters, only: puny, Lfresh, rhoi, rhos use icepack_parameters, only: kstrength, krdg_partic, krdg_redist, mu_rdg - use icepack_parameters, only: heat_capacity + use icepack_parameters, only: heat_capacity, conserv_check 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 @@ -79,10 +79,6 @@ module icepack_mechred ! (krdg_redist = 0) ! Flato & Hibler (1995) have Hstar = 100 - logical (kind=log_kind), parameter :: & - l_conservation_check = .false. ! if true, check conservation - ! (useful for debugging) - !======================================================================= contains @@ -322,7 +318,7 @@ subroutine ridge_ice (dt, ndtd, & ! Compute initial values of conserved quantities. !----------------------------------------------------------------- - if (l_conservation_check) then + if (conserv_check) then do n = 1, ncat eicen(n) = c0 @@ -459,7 +455,7 @@ subroutine ridge_ice (dt, ndtd, & ! Check for conservation (allowing for snow thrown into ocean). !----------------------------------------------------------------- - if (l_conservation_check) then + if (conserv_check) then do n = 1, ncat eicen(n) = c0 @@ -503,38 +499,38 @@ subroutine ridge_ice (dt, ndtd, & vsno_final = vsno_final + msnow_mlt/rhos esno_final = esno_final + esnow_mlt - fieldid = 'vice, ridging' + fieldid = subname//':vice' call column_conservation_check (fieldid, & vice_init, vice_final, & puny) if (icepack_warnings_aborted(subname)) return - fieldid = 'vsno, ridging' + fieldid = subname//':vsno' call column_conservation_check (fieldid, & vsno_init, vsno_final, & puny) if (icepack_warnings_aborted(subname)) return - fieldid = 'eice, ridging' + fieldid = subname//':eice' call column_conservation_check (fieldid, & eice_init, eice_final, & puny*Lfresh*rhoi) if (icepack_warnings_aborted(subname)) return - fieldid = 'esno, ridging' + fieldid = subname//':esno' call column_conservation_check (fieldid, & esno_init, esno_final, & puny*Lfresh*rhos) if (icepack_warnings_aborted(subname)) return - fieldid = 'sice, ridging' + fieldid = subname//':sice' call column_conservation_check (fieldid, & sice_init, sice_final, & puny) if (icepack_warnings_aborted(subname)) return - fieldid = 'vbrin, ridging' + fieldid = subname//':vbrin' call column_conservation_check (fieldid, & vbri_init, vbri_final, & puny*c10) if (icepack_warnings_aborted(subname)) return - endif ! l_conservation_check + endif ! conserv_check !----------------------------------------------------------------- ! Compute ridging diagnostics. diff --git a/columnphysics/icepack_parameters.F90 b/columnphysics/icepack_parameters.F90 index 79d4d84b8..1e346223c 100644 --- a/columnphysics/icepack_parameters.F90 +++ b/columnphysics/icepack_parameters.F90 @@ -151,8 +151,9 @@ module icepack_parameters ! atmos-ice fluxes are provided to CICE update_ocn_f = .false. ,&! include fresh water and salt fluxes for frazil solve_zsal = .false. ,&! if true, update salinity profile from solve_S_dt - modal_aero = .false. ! if true, use modal aerosal optical properties + modal_aero = .false. ,&! if true, use modal aerosal optical properties ! only for use with tr_aero or tr_zaero + conserv_check = .false. ! if true, do conservations checks and abort character(len=char_len), public :: & tfrz_option = 'mushy' ! form of ocean freezing temperature @@ -398,7 +399,7 @@ subroutine icepack_init_parameters( & 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, & - max_dfe_doc1_in, fr_resp_s_in, & + max_dfe_doc1_in, fr_resp_s_in, conserv_check_in, & y_sk_DMS_in, t_sk_conv_in, t_sk_ox_in, frazil_scav_in) !----------------------------------------------------------------- @@ -620,7 +621,8 @@ subroutine icepack_init_parameters( & scale_bgc_in, & ! if .true., initialize bgc tracers proportionally with salinity solve_zbgc_in, & ! if .true., solve vertical biochemistry portion of code dEdd_algae_in, & ! if .true., algal absorptionof Shortwave is computed in the - modal_aero_in ! if .true., use modal aerosol formulation in shortwave + modal_aero_in, & ! if .true., use modal aerosol formulation in shortwave + conserv_check_in ! if .true., run conservation checks and abort if checks fail logical (kind=log_kind), intent(in), optional :: & skl_bgc_in, & ! if true, solve skeletal biochemistry @@ -804,6 +806,7 @@ subroutine icepack_init_parameters( & if (present(solve_zbgc_in) ) solve_zbgc = solve_zbgc_in if (present(dEdd_algae_in) ) dEdd_algae = dEdd_algae_in 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 if (present(solve_zsal_in) ) solve_zsal = solve_zsal_in if (present(grid_o_in) ) grid_o = grid_o_in @@ -879,7 +882,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, & - phi_snow_out, heat_capacity_out, & + phi_snow_out, heat_capacity_out, conserv_check_out, & 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, & @@ -1114,7 +1117,8 @@ subroutine icepack_query_parameters( & scale_bgc_out, & ! if .true., initialize bgc tracers proportionally with salinity solve_zbgc_out, & ! if .true., solve vertical biochemistry portion of code dEdd_algae_out, & ! if .true., algal absorptionof Shortwave is computed in the - modal_aero_out ! if .true., use modal aerosol formulation in shortwave + modal_aero_out, & ! if .true., use modal aerosol formulation in shortwave + conserv_check_out ! if .true., run conservation checks and abort if checks fail logical (kind=log_kind), intent(out), optional :: & skl_bgc_out, & ! if true, solve skeletal biochemistry @@ -1339,6 +1343,7 @@ subroutine icepack_query_parameters( & if (present(solve_zbgc_out) ) solve_zbgc_out = solve_zbgc if (present(dEdd_algae_out) ) dEdd_algae_out = dEdd_algae if (present(modal_aero_out) ) modal_aero_out = modal_aero + if (present(conserv_check_out) ) conserv_check_out= conserv_check if (present(skl_bgc_out) ) skl_bgc_out = skl_bgc if (present(solve_zsal_out) ) solve_zsal_out = solve_zsal if (present(grid_o_out) ) grid_o_out = grid_o @@ -1513,6 +1518,7 @@ subroutine icepack_write_parameters(iounit) write(iounit,*) " solve_zbgc = ", solve_zbgc write(iounit,*) " dEdd_algae = ", dEdd_algae write(iounit,*) " modal_aero = ", modal_aero + write(iounit,*) " conserv_check = ", conserv_check write(iounit,*) " skl_bgc = ", skl_bgc write(iounit,*) " solve_zsal = ", solve_zsal write(iounit,*) " grid_o = ", grid_o diff --git a/columnphysics/icepack_therm_itd.F90 b/columnphysics/icepack_therm_itd.F90 index be094ebb1..9cd233049 100644 --- a/columnphysics/icepack_therm_itd.F90 +++ b/columnphysics/icepack_therm_itd.F90 @@ -24,7 +24,7 @@ module icepack_therm_itd use icepack_parameters, only: p001, p1, p333, p5, p666, puny, bignum 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 + use icepack_parameters, only: rhosi, conserv_check use icepack_parameters, only: kitd, ktherm, heat_capacity use icepack_parameters, only: z_tracers, solve_zsal @@ -60,10 +60,6 @@ module icepack_therm_itd lateral_melt, & icepack_step_therm2 - logical (kind=log_kind), parameter, public :: & - l_conservation_check = .false. ! if true, check conservation - ! (useful for debugging) - !======================================================================= contains @@ -221,7 +217,7 @@ subroutine linear_itd (ncat, hin_max, & ! conserve. !----------------------------------------------------------------- - if (l_conservation_check) then + if (conserv_check) then do n = 1, ncat @@ -264,7 +260,7 @@ subroutine linear_itd (ncat, hin_max, & call column_sum (ncat, vbrin, vbri_init) if (icepack_warnings_aborted(subname)) return - endif ! l_conservation_check + endif ! conserv_check !----------------------------------------------------------------- ! Initialize remapping flag. @@ -608,7 +604,7 @@ subroutine linear_itd (ncat, hin_max, & ! Check volume and energy conservation. !----------------------------------------------------------------- - if (l_conservation_check) then + if (conserv_check) then do n = 1, ncat @@ -651,32 +647,32 @@ subroutine linear_itd (ncat, hin_max, & call column_sum (ncat, vbrin, vbri_final) if (icepack_warnings_aborted(subname)) return - fieldid = 'vice, ITD remap' + fieldid = subname//':vice' call column_conservation_check (fieldid, & vice_init, vice_final, & puny) if (icepack_warnings_aborted(subname)) return - fieldid = 'vsno, ITD remap' + fieldid = subname//':vsno' call column_conservation_check (fieldid, & vsno_init, vsno_final, & puny) if (icepack_warnings_aborted(subname)) return - fieldid = 'eice, ITD remap' + fieldid = subname//':eice' call column_conservation_check (fieldid, & eice_init, eice_final, & puny*Lfresh*rhoi) if (icepack_warnings_aborted(subname)) return - fieldid = 'esno, ITD remap' + fieldid = subname//':esno' call column_conservation_check (fieldid, & esno_init, esno_final, & puny*Lfresh*rhos) if (icepack_warnings_aborted(subname)) return - fieldid = 'sicen, ITD remap' + fieldid = subname//':sicen' call column_conservation_check (fieldid, & sice_init, sice_final, & puny) if (icepack_warnings_aborted(subname)) return - fieldid = 'vbrin, ITD remap' + fieldid = subname//':vbrin' call column_conservation_check (fieldid, & vbri_init, vbri_final, & puny*c10) @@ -1504,7 +1500,7 @@ subroutine add_new_ice (ncat, nilyr, & endif enddo - if (l_conservation_check) then + if (conserv_check) then do n = 1, ncat do k = 1, nilyr @@ -1517,7 +1513,7 @@ subroutine add_new_ice (ncat, nilyr, & call column_sum (ncat, eicen, eice_init) if (icepack_warnings_aborted(subname)) return - endif ! l_conservation_check + endif ! conserv_check !----------------------------------------------------------------- ! Compute average enthalpy of new ice. @@ -1554,7 +1550,7 @@ subroutine add_new_ice (ncat, nilyr, & vi0_init = vi0new ! for bgc ! increment ice volume and energy - if (l_conservation_check) then + if (conserv_check) then vice_init = vice_init + vi0new eice_init = eice_init + vi0new*qi0new endif @@ -1873,7 +1869,7 @@ subroutine add_new_ice (ncat, nilyr, & enddo ! ncats - if (l_conservation_check) then + if (conserv_check) then do n = 1, ncat eicen(n) = c0 @@ -1887,18 +1883,18 @@ subroutine add_new_ice (ncat, nilyr, & call column_sum (ncat, eicen, eice_final) if (icepack_warnings_aborted(subname)) return - fieldid = 'vice, add_new_ice' + fieldid = subname//':vice' call column_conservation_check (fieldid, & vice_init, vice_final, & puny) if (icepack_warnings_aborted(subname)) return - fieldid = 'eice, add_new_ice' + fieldid = subname//':eice' call column_conservation_check (fieldid, & eice_init, eice_final, & puny*Lfresh*rhoi) if (icepack_warnings_aborted(subname)) return - endif ! l_conservation_check + endif ! conserv_check !----------------------------------------------------------------- ! Biogeochemistry @@ -1911,8 +1907,7 @@ subroutine add_new_ice (ncat, nilyr, & aicen, vicen, vsnon1, & vi0new, ntrcr, trcrn, & nbtrcr, sss, ocean_bio,& - flux_bio, hsurp, & - l_conservation_check) + flux_bio, hsurp) if (icepack_warnings_aborted(subname)) return end subroutine add_new_ice diff --git a/columnphysics/icepack_zbgc.F90 b/columnphysics/icepack_zbgc.F90 index 2dc2de251..a21fc2c42 100644 --- a/columnphysics/icepack_zbgc.F90 +++ b/columnphysics/icepack_zbgc.F90 @@ -16,7 +16,7 @@ module icepack_zbgc use icepack_parameters, only: k_nitrif, t_iron_conv, max_loss, max_dfe_doc1 use icepack_parameters, only: fr_resp_s, y_sk_DMS, t_sk_conv, t_sk_ox use icepack_parameters, only: scale_bgc, ktherm, skl_bgc, solve_zsal - use icepack_parameters, only: z_tracers, fsal + use icepack_parameters, only: z_tracers, fsal, conserv_check use icepack_tracers, only: nt_sice, nt_bgc_S, bio_index use icepack_tracers, only: tr_brine, nt_fbri, nt_qice, nt_Tsfc @@ -74,7 +74,7 @@ subroutine add_new_ice_bgc (dt, nblyr, & vi0new, & ntrcr, trcrn, nbtrcr, & sss, ocean_bio, flux_bio, & - hsurp, l_conservation_check) + hsurp) integer (kind=int_kind), intent(in) :: & nblyr , & ! number of bio layers @@ -128,9 +128,6 @@ subroutine add_new_ice_bgc (dt, nblyr, & intent(in) :: & ocean_bio ! ocean concentration of biological tracer - logical (kind=log_kind), intent(in) :: & - l_conservation_check - ! local integer (kind=int_kind) :: & @@ -264,17 +261,17 @@ subroutine add_new_ice_bgc (dt, nblyr, & endif ! nltrcr > 0 endif ! vi0new > 0 - if (tr_brine .and. l_conservation_check) then + if (tr_brine .and. conserv_check) then call column_sum (ncat, vbrin, vbri_final) if (icepack_warnings_aborted(subname)) return - fieldid = 'vbrin, add_new_ice_bgc' + fieldid = subname//':vbrin' call column_conservation_check (fieldid, & vbri_init, vbri_final, & puny) if (icepack_warnings_aborted(subname)) return - endif ! l_conservation_check + endif ! conserv_check end subroutine add_new_ice_bgc diff --git a/configuration/driver/icedrv_init.F90 b/configuration/driver/icedrv_init.F90 index 9fe409170..221dfeee4 100644 --- a/configuration/driver/icedrv_init.F90 +++ b/configuration/driver/icedrv_init.F90 @@ -100,6 +100,7 @@ subroutine input_data real (kind=dbl_kind) :: atmiter_conv logical (kind=log_kind) :: calc_Tsfc, formdrag, highfreq, calc_strair + logical (kind=log_kind) :: conserv_check integer (kind=int_kind) :: ntrcr logical (kind=log_kind) :: tr_iage, tr_FY, tr_lvl, tr_pond @@ -121,7 +122,8 @@ subroutine input_data days_per_year, use_leap_years, year_init, istep0, & dt, npt, ndtd, dump_last, & ice_ic, restart, restart_dir, restart_file, & - dumpfreq, diagfreq, diag_file, cpl_bgc + dumpfreq, diagfreq, diag_file, cpl_bgc, & + conserv_check namelist /grid_nml/ & kcatbound @@ -198,7 +200,7 @@ subroutine input_data aspect_rapid_mode_out=aspect_rapid_mode, & dSdt_slow_mode_out=dSdt_slow_mode, & phi_c_slow_mode_out=phi_c_slow_mode, & - phi_i_mushy_out=phi_i_mushy, & + phi_i_mushy_out=phi_i_mushy, conserv_check_out=conserv_check, & tfrz_option_out=tfrz_option, kalg_out=kalg, & fbot_xfer_type_out=fbot_xfer_type, puny_out=puny, & wave_spec_type_out=wave_spec_type) @@ -493,6 +495,7 @@ subroutine input_data trim(restart_file) write(nu_diag,*) ' ice_ic = ', & trim(ice_ic) + write(nu_diag,1010) ' conserv_check = ', conserv_check write(nu_diag,1020) ' kitd = ', kitd write(nu_diag,1020) ' kcatbound = ', & kcatbound @@ -760,7 +763,7 @@ subroutine input_data aspect_rapid_mode_in=aspect_rapid_mode, & dSdt_slow_mode_in=dSdt_slow_mode, & phi_c_slow_mode_in=phi_c_slow_mode, & - phi_i_mushy_in=phi_i_mushy, & + phi_i_mushy_in=phi_i_mushy, conserv_check_in=conserv_check, & tfrz_option_in=tfrz_option, kalg_in=kalg, & fbot_xfer_type_in=fbot_xfer_type, & wave_spec_type_in=wave_spec_type, wave_spec_in=wave_spec) diff --git a/configuration/scripts/icepack_in b/configuration/scripts/icepack_in index 094fb5409..c4ec7fabf 100644 --- a/configuration/scripts/icepack_in +++ b/configuration/scripts/icepack_in @@ -14,6 +14,7 @@ diagfreq = 24 diag_file = 'ice_diag' cpl_bgc = .false. + conserv_check = .false. / &grid_nml diff --git a/configuration/scripts/options/set_nml.alt03 b/configuration/scripts/options/set_nml.alt03 index 4954ce9e6..b8cbaa370 100644 --- a/configuration/scripts/options/set_nml.alt03 +++ b/configuration/scripts/options/set_nml.alt03 @@ -5,6 +5,7 @@ ktherm = 1 tfrz_option = 'linear_salt' conduct = 'bubbly' + conserv_check = .true. restore_ocn = .true. trestore = 0 atm_data_type = 'default' diff --git a/doc/source/icepack_index.rst b/doc/source/icepack_index.rst index d72aecd13..e049585c1 100755 --- a/doc/source/icepack_index.rst +++ b/doc/source/icepack_index.rst @@ -80,6 +80,7 @@ either Celsius or Kelvin units). "coldsnow", "value for constant albedo parameterization", "0.81" "conduct", ":math:`\bullet` conductivity parameterization", "" "congel", "basal ice growth", "m" + "conserv_check", "if true, check conservation", "" "coszen", "cosine of the zenith angle", "" "Cp", "proportionality constant for potential energy", "kg/m\ :math:`^2`/s\ :math:`^2`" "cp_air", "specific heat of air", "1005.0 J/kg/K" @@ -247,7 +248,6 @@ either Celsius or Kelvin units). "ktherm", ":math:`\bullet` thermodynamic formulation (0 = zero-layer, 1 = :cite:`Bitz99`, 2 = mushy)", "" "**L**", "", "" "l_brine", "flag for brine pocket effects", "" - "l_conservation_check", "if true, check conservation when ridging", "" "l_mpond_fresh", ":math:`\bullet` if true, retain (topo) pond water until ponds drain", "" "Lfresh", "latent heat of melting of fresh ice = Lsub - Lvap", "J/kg" "lhcoef", "transfer coefficient for latent heat", "" diff --git a/doc/source/user_guide/interfaces.include b/doc/source/user_guide/interfaces.include index 98a11035e..3c642d2fd 100644 --- a/doc/source/user_guide/interfaces.include +++ b/doc/source/user_guide/interfaces.include @@ -750,6 +750,7 @@ icepack_init_parameters ahmax_in, R_ice_in, R_pnd_in, R_snw_in, dT_mlt_in, rsnw_mlt_in, & kalg_in, kstrength_in, krdg_partic_in, krdg_redist_in, mu_rdg_in, & atmbndy_in, calc_strair_in, formdrag_in, highfreq_in, natmiter_in, & + atmiter_conv_in, & tfrz_option_in, kitd_in, kcatbound_in, hs0_in, frzpnd_in, & floeshape_in, wave_spec_in, wave_spec_type_in, nfreq_in, & dpscale_in, rfracmin_in, rfracmax_in, pndaspect_in, hs1_in, hp1_in, & @@ -760,7 +761,7 @@ icepack_init_parameters 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, & - max_dfe_doc1_in, fr_resp_s_in, & + max_dfe_doc1_in, fr_resp_s_in, conserv_check_in, & y_sk_DMS_in, t_sk_conv_in, t_sk_ox_in, frazil_scav_in) !----------------------------------------------------------------- @@ -937,6 +938,9 @@ icepack_init_parameters integer (kind=int_kind), intent(in), optional :: & natmiter_in ! number of iterations for boundary layer calculations + ! Flux convergence tolerance + real (kind=dbl_kind), intent(in), optional :: atmiter_conv_in + !----------------------------------------------------------------------- ! Parameters for the ice thickness distribution !----------------------------------------------------------------------- @@ -979,7 +983,8 @@ icepack_init_parameters scale_bgc_in, & ! if .true., initialize bgc tracers proportionally with salinity solve_zbgc_in, & ! if .true., solve vertical biochemistry portion of code dEdd_algae_in, & ! if .true., algal absorptionof Shortwave is computed in the - modal_aero_in ! if .true., use modal aerosol formulation in shortwave + modal_aero_in, & ! if .true., use modal aerosol formulation in shortwave + conserv_check_in ! if .true., run conservation checks and abort if checks fail logical (kind=log_kind), intent(in), optional :: & skl_bgc_in, & ! if true, solve skeletal biochemistry @@ -1083,13 +1088,14 @@ icepack_query_parameters rsnw_mlt_out, dEdd_algae_out, & kalg_out, kstrength_out, krdg_partic_out, krdg_redist_out, mu_rdg_out, & atmbndy_out, calc_strair_out, formdrag_out, highfreq_out, natmiter_out, & + atmiter_conv_out, & tfrz_option_out, kitd_out, kcatbound_out, hs0_out, frzpnd_out, & floeshape_out, wave_spec_out, wave_spec_type_out, nfreq_out, & dpscale_out, rfracmin_out, rfracmax_out, pndaspect_out, hs1_out, hp1_out, & 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, & - phi_snow_out, heat_capacity_out, & + phi_snow_out, heat_capacity_out, conserv_check_out, & 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, & @@ -1279,6 +1285,9 @@ icepack_query_parameters integer (kind=int_kind), intent(out), optional :: & natmiter_out ! number of iterations for boundary layer calculations + ! Flux convergence tolerance + real (kind=dbl_kind), intent(out), optional :: atmiter_conv_out + !----------------------------------------------------------------------- ! Parameters for the ice thickness distribution !----------------------------------------------------------------------- @@ -1321,7 +1330,8 @@ icepack_query_parameters scale_bgc_out, & ! if .true., initialize bgc tracers proportionally with salinity solve_zbgc_out, & ! if .true., solve vertical biochemistry portion of code dEdd_algae_out, & ! if .true., algal absorptionof Shortwave is computed in the - modal_aero_out ! if .true., use modal aerosol formulation in shortwave + modal_aero_out, & ! if .true., use modal aerosol formulation in shortwave + conserv_check_out ! if .true., run conservation checks and abort if checks fail logical (kind=log_kind), intent(out), optional :: & skl_bgc_out, & ! if true, solve skeletal biochemistry diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 052851a7c..f3f3299dc 100755 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -251,6 +251,7 @@ column physics. "``restart_hbrine``", "true/false", "restart the brine height tracer (automatically turned on if restart = .true.)", "``.false.``" "``tr_zaero``", "true/false", "turns on black carbon and dust aerosols", "``.false.``" "``modal_aero``", "true/false", "turns on a modal aerosol option", "``.false.``" + "``conserv_check``", "true/false", "turns on conservation checks in the columnphysics", "``.false.``" "``skl_bgc``", "true/false", "turns on a single bottom layer biogeochemistry. z_tracers and solve_zbgc must be false", "``.false.``" "``z_tracers``", "true/false", "turns on a vertically resolved transport", "``.true.``" "``dEdd_algae``", "true/false", "Include radiative impact of algae and aerosols in the delta-Eddington shortwave scheme. Requires shortwave = 'dEdd'.", "``.false.``" diff --git a/doc/source/user_guide/ug_troubleshooting.rst b/doc/source/user_guide/ug_troubleshooting.rst index 728bb641c..94a2786d3 100755 --- a/doc/source/user_guide/ug_troubleshooting.rst +++ b/doc/source/user_guide/ug_troubleshooting.rst @@ -56,6 +56,9 @@ A printing utility is available in the driver that can be helpful when debugging code. Not all of these will work everywhere in the code, due to possible conflicts in module dependencies. +`conserv\_check` = true (**ice\_in**) + Diagnoses conservation in various icepack algorithms. + *debug\_icepack* (**configuration/driver/ice\_diagnostics.F90**) A wrapper for *print\_state* that is easily called from numerous points during initialization and the timestepping loop