diff --git a/cicecore/cicedyn/analysis/ice_history_pond.F90 b/cicecore/cicedyn/analysis/ice_history_pond.F90 index 64e21099f..88b5fa899 100644 --- a/cicecore/cicedyn/analysis/ice_history_pond.F90 +++ b/cicecore/cicedyn/analysis/ice_history_pond.F90 @@ -26,19 +26,19 @@ module ice_history_pond !--------------------------------------------------------------- character (len=max_nstrm), public :: & - f_apondn = 'm', f_apeffn = 'm', & - f_hpondn = 'm', & - f_apond = 'x', f_apond_ai = 'x', & - f_hpond = 'x', f_hpond_ai = 'x', & - f_ipond = 'x', f_ipond_ai = 'x', & - f_flpnd = 'x', f_expnd = 'x', & - f_frpnd = 'x', f_rfpnd = 'x', & - f_ilpnd = 'x', f_mipnd = 'x', & - f_rdpnd = 'x', & - f_flpndn = 'x', f_expndn = 'x', & - f_frpndn = 'x', f_rfpndn = 'x', & - f_ilpndn = 'x', & - f_apeff = 'x', f_apeff_ai = 'x' + f_apondn = 'm', f_apeffn = 'm', & + f_hpondn = 'm', & + f_apond = 'x', f_apond_ai = 'x', & + f_hpond = 'x', f_hpond_ai = 'x', & + f_ipond = 'x', f_ipond_ai = 'x', & + f_apeff = 'x', f_apeff_ai = 'x', & + f_dpnd_flush = 'x', f_dpnd_expon = 'x', & + f_dpnd_freebd = 'x', f_dpnd_initial = 'x', & + f_dpnd_dlid = 'x', f_dpnd_melt = 'x', & + f_dpnd_ridge = 'x', & + f_dpnd_flushn = 'x', f_dpnd_exponn = 'x', & + f_dpnd_freebdn= 'x', f_dpnd_initialn= 'x', & + f_dpnd_dlidn = 'x' !--------------------------------------------------------------- ! namelist variables @@ -50,14 +50,19 @@ module ice_history_pond f_apond, f_apond_ai , & f_hpond, f_hpond_ai , & f_ipond, f_ipond_ai , & - f_flpnd, f_expnd , & - f_frpnd, f_rfpnd , & - f_ilpnd, f_mipnd , & - f_rdpnd, & - f_flpndn, f_expndn , & - f_frpndn, f_rfpndn , & - f_ilpndn, & - f_apeff, f_apeff_ai + f_apeff, f_apeff_ai , & + f_dpnd_flush , & + f_dpnd_expon , & + f_dpnd_freebd , & + f_dpnd_initial , & + f_dpnd_dlid , & + f_dpnd_melt , & + f_dpnd_ridge , & + f_dpnd_flushn , & + f_dpnd_exponn , & + f_dpnd_freebdn , & + f_dpnd_initialn , & + f_dpnd_dlidn !--------------------------------------------------------------- ! field indices @@ -69,14 +74,14 @@ module ice_history_pond n_apond , n_apond_ai, & n_hpond , n_hpond_ai, & n_ipond , n_ipond_ai, & - n_flpnd , n_expnd , & - n_frpnd , n_rfpnd , & - n_ilpnd , n_mipnd , & - n_rdpnd, & - n_flpndn , n_expndn , & - n_frpndn , n_rfpndn , & - n_ilpndn , & - n_apeff , n_apeff_ai + n_apeff , n_apeff_ai, & + n_dpnd_flush , n_dpnd_expon, & + n_dpnd_freebd , n_dpnd_initial, & + n_dpnd_dlid , n_dpnd_melt, & + n_dpnd_ridge , & + n_dpnd_flushn , n_dpnd_exponn, & + n_dpnd_freebdn, n_dpnd_initialn, & + n_dpnd_dlidn !======================================================================= @@ -94,13 +99,14 @@ subroutine init_hist_pond_2D integer (kind=int_kind) :: ns integer (kind=int_kind) :: nml_error ! namelist i/o error flag - logical (kind=log_kind) :: tr_pond + logical (kind=log_kind) :: tr_pond, tr_pond_topo character(len=char_len_long) :: tmpstr2 ! for namelist check character(len=char_len) :: nml_name ! text namelist name character(len=*), parameter :: subname = '(init_hist_pond_2D)' - call icepack_query_tracer_flags(tr_pond_out=tr_pond) + call icepack_query_tracer_flags(tr_pond_out=tr_pond,& + tr_pond_topo_out=tr_pond_topo) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & file=__FILE__, line=__LINE__) @@ -148,29 +154,46 @@ subroutine init_hist_pond_2D endif if (.not. tr_pond) then - f_apondn = 'x' - f_hpondn = 'x' - f_apeffn = 'x' - f_apond = 'x' - f_hpond = 'x' - f_ipond = 'x' - f_flpnd = 'x' - f_expnd = 'x' - f_frpnd = 'x' - f_rfpnd = 'x' - f_ilpnd = 'x' - f_mipnd = 'x' - f_rdpnd = 'x' - f_flpndn = 'x' - f_expndn = 'x' - f_frpndn = 'x' - f_rfpndn = 'x' - f_ilpndn = 'x' - f_apeff = 'x' - f_apond_ai = 'x' - f_hpond_ai = 'x' - f_ipond_ai = 'x' - f_apeff_ai = 'x' + f_apondn = 'x' + f_hpondn = 'x' + f_apeffn = 'x' + f_apond = 'x' + f_hpond = 'x' + f_ipond = 'x' + f_apeff = 'x' + f_apond_ai = 'x' + f_hpond_ai = 'x' + f_ipond_ai = 'x' + f_apeff_ai = 'x' + f_dpnd_flush = 'x' + f_dpnd_expon = 'x' + f_dpnd_freebd = 'x' + f_dpnd_initial = 'x' + f_dpnd_dlid = 'x' + f_dpnd_melt = 'x' + f_dpnd_ridge = 'x' + f_dpnd_flushn = 'x' + f_dpnd_exponn = 'x' + f_dpnd_freebdn = 'x' + f_dpnd_initialn= 'x' + f_dpnd_dlidn = 'x' + endif + + if (tr_pond_topo) then + ! tcraig, July 2025. Turn off dpnd history fields for topo ponds, + ! they are not yet validated. This is temporary. + f_dpnd_flush = 'x' + f_dpnd_expon = 'x' + f_dpnd_freebd = 'x' + f_dpnd_initial = 'x' + f_dpnd_dlid = 'x' + f_dpnd_melt = 'x' + f_dpnd_ridge = 'x' + f_dpnd_flushn = 'x' + f_dpnd_exponn = 'x' + f_dpnd_freebdn = 'x' + f_dpnd_initialn= 'x' + f_dpnd_dlidn = 'x' endif call broadcast_scalar (f_apondn, master_task) @@ -184,18 +207,18 @@ subroutine init_hist_pond_2D call broadcast_scalar (f_hpond_ai, master_task) call broadcast_scalar (f_ipond_ai, master_task) call broadcast_scalar (f_apeff_ai, master_task) - call broadcast_scalar (f_flpnd, master_task) - call broadcast_scalar (f_expnd, master_task) - call broadcast_scalar (f_frpnd, master_task) - call broadcast_scalar (f_rfpnd, master_task) - call broadcast_scalar (f_ilpnd, master_task) - call broadcast_scalar (f_mipnd, master_task) - call broadcast_scalar (f_rdpnd, master_task) - call broadcast_scalar (f_flpndn, master_task) - call broadcast_scalar (f_expndn, master_task) - call broadcast_scalar (f_frpndn, master_task) - call broadcast_scalar (f_rfpndn, master_task) - call broadcast_scalar (f_ilpndn, master_task) + call broadcast_scalar (f_dpnd_flush , master_task) + call broadcast_scalar (f_dpnd_expon , master_task) + call broadcast_scalar (f_dpnd_freebd , master_task) + call broadcast_scalar (f_dpnd_initial , master_task) + call broadcast_scalar (f_dpnd_dlid , master_task) + call broadcast_scalar (f_dpnd_melt , master_task) + call broadcast_scalar (f_dpnd_ridge , master_task) + call broadcast_scalar (f_dpnd_flushn , master_task) + call broadcast_scalar (f_dpnd_exponn , master_task) + call broadcast_scalar (f_dpnd_freebdn , master_task) + call broadcast_scalar (f_dpnd_initialn, master_task) + call broadcast_scalar (f_dpnd_dlidn , master_task) if (tr_pond) then @@ -251,47 +274,47 @@ subroutine init_hist_pond_2D "weighted by ice area", c1, c0, & ns, f_apeff_ai) - if (f_flpnd(1:1) /= 'x') & - call define_hist_field(n_flpnd,"flpnd","m/s",tstr2D, tcstr, & + if (f_dpnd_flush(1:1) /= 'x') & + call define_hist_field(n_dpnd_flush,"dpnd_flush","m/s",tstr2D, tcstr, & "pond flushing rate due to ice permeability", & "none", c1, c0, & - ns, f_flpnd) + ns, f_dpnd_flush) - if (f_expnd(1:1) /= 'x') & - call define_hist_field(n_expnd,"expnd","m/s",tstr2D, tcstr, & + if (f_dpnd_expon(1:1) /= 'x') & + call define_hist_field(n_dpnd_expon,"dpnd_expon","m/s",tstr2D, tcstr, & "exponential pond drainage rate", & "none", c1, c0, & - ns, f_expnd) + ns, f_dpnd_expon) - if (f_frpnd(1:1) /= 'x') & - call define_hist_field(n_frpnd,"frpnd","m/s",tstr2D, tcstr, & + if (f_dpnd_freebd(1:1) /= 'x') & + call define_hist_field(n_dpnd_freebd,"dpnd_freebd","m/s",tstr2D, tcstr, & "pond drainage rate due to freeboard constraint", & "none", c1, c0, & - ns, f_frpnd) + ns, f_dpnd_freebd) - if (f_rfpnd(1:1) /= 'x') & - call define_hist_field(n_rfpnd,"rfpnd","m/s",tstr2D, tcstr, & + if (f_dpnd_initial(1:1) /= 'x') & + call define_hist_field(n_dpnd_initial,"dpnd_initial","m/s",tstr2D, tcstr, & "runoff rate due to rfrac", & "none", c1, c0, & - ns, f_rfpnd) + ns, f_dpnd_initial) - if (f_ilpnd(1:1) /= 'x') & - call define_hist_field(n_ilpnd,"ilpnd","m/s",tstr2D, tcstr, & + if (f_dpnd_dlid(1:1) /= 'x') & + call define_hist_field(n_dpnd_dlid,"dpnd_dlid","m/s",tstr2D, tcstr, & "pond loss / gain to ice lid freezing / melting", & "none", c1, c0, & - ns, f_ilpnd) + ns, f_dpnd_dlid) - if (f_mipnd(1:1) /= 'x') & - call define_hist_field(n_mipnd,"mipnd","m/s",tstr2D, tcstr, & + if (f_dpnd_melt(1:1) /= 'x') & + call define_hist_field(n_dpnd_melt,"dpnd_melt","m/s",tstr2D, tcstr, & "pond drainage due to ice melting", & "none", c1, c0, & - ns, f_mipnd) + ns, f_dpnd_melt) - if (f_rdpnd(1:1) /= 'x') & - call define_hist_field(n_rdpnd,"rdpnd","m",tstr2D, tcstr, & + if (f_dpnd_ridge(1:1) /= 'x') & + call define_hist_field(n_dpnd_ridge,"dpnd_ridge","m",tstr2D, tcstr, & "pond drainage due to ridging", & "none", c1, c0, & - ns, f_rdpnd) + ns, f_dpnd_ridge) endif ! histfreq(ns) /= 'x' enddo ! nstreams @@ -338,35 +361,35 @@ subroutine init_hist_pond_3Dc "none", c1, c0, & ns, f_apeffn) - if (f_flpndn(1:1) /= 'x') & - call define_hist_field(n_flpndn,"flpndn","m/s",tstr3Dc, tcstr, & + if (f_dpnd_flushn(1:1) /= 'x') & + call define_hist_field(n_dpnd_flushn,"dpnd_flushn","m/s",tstr3Dc, tcstr, & "category pond flushing rate due to ice permeability", & "none", c1, c0, & - ns, f_flpndn) + ns, f_dpnd_flushn) - if (f_expndn(1:1) /= 'x') & - call define_hist_field(n_expndn,"expndn","m/s",tstr3Dc, tcstr, & + if (f_dpnd_exponn(1:1) /= 'x') & + call define_hist_field(n_dpnd_exponn,"dpnd_exponn","m/s",tstr3Dc, tcstr, & "category exponential pond drainage rate", & "none", c1, c0, & - ns, f_expndn) + ns, f_dpnd_exponn) - if (f_frpndn(1:1) /= 'x') & - call define_hist_field(n_frpndn,"frpndn","m/s",tstr3Dc, tcstr, & + if (f_dpnd_freebdn(1:1) /= 'x') & + call define_hist_field(n_dpnd_freebdn,"dpnd_freebdn","m/s",tstr3Dc, tcstr, & "category pond drainage rate due to freeboard constraint", & "none", c1, c0, & - ns, f_frpndn) + ns, f_dpnd_freebdn) - if (f_rfpndn(1:1) /= 'x') & - call define_hist_field(n_rfpndn,"rfpndn","m/s",tstr3Dc, tcstr, & + if (f_dpnd_initialn(1:1) /= 'x') & + call define_hist_field(n_dpnd_initialn,"dpnd_initialn","m/s",tstr3Dc, tcstr, & "category runoff rate due to rfrac", & "none", c1, c0, & - ns, f_rfpndn) + ns, f_dpnd_initialn) - if (f_ilpndn(1:1) /= 'x') & - call define_hist_field(n_ilpndn,"ilpndn","m/s",tstr3Dc, tcstr, & + if (f_dpnd_dlidn(1:1) /= 'x') & + call define_hist_field(n_dpnd_dlidn,"dpnd_dlidn","m/s",tstr3Dc, tcstr, & "category pond loss / gain to ice lid freezing / melting", & "none", c1, c0, & - ns, f_ilpndn) + ns, f_dpnd_dlidn) endif ! histfreq(ns) /= 'x' enddo ! ns @@ -385,8 +408,9 @@ subroutine accum_hist_pond (iblk) use ice_blocks, only: block, get_block, nx_block, ny_block use ice_domain, only: blocks_ice use ice_flux, only: apeff_ai - use ice_flux, only: flpnd, expnd, frpnd, rfpnd, ilpnd, mipnd,rdpnd - use ice_flux, only: flpndn, expndn, frpndn, rfpndn, ilpndn + use ice_flux, only: dpnd_flush, dpnd_expon, dpnd_freebd, dpnd_initial + use ice_flux, only: dpnd_dlid, dpnd_melt,dpnd_ridge, dpnd_dlidn + use ice_flux, only: dpnd_flushn, dpnd_exponn, dpnd_freebdn, dpnd_initialn use ice_history_shared, only: n2D, a2D, a3Dc, ncat_hist, & accum_hist_field use ice_state, only: aice, trcr, trcrn @@ -504,20 +528,20 @@ subroutine accum_hist_pond (iblk) if (f_apeff_ai(1:1) /= 'x') & call accum_hist_field(n_apeff_ai, iblk, apeff_ai(:,:,iblk), a2D) - if (f_flpnd (1:1) /= 'x') & - call accum_hist_field(n_flpnd, iblk, flpnd(:,:,iblk), a2D) - if (f_expnd (1:1) /= 'x') & - call accum_hist_field(n_expnd, iblk, expnd(:,:,iblk), a2D) - if (f_frpnd (1:1) /= 'x') & - call accum_hist_field(n_frpnd, iblk, frpnd(:,:,iblk), a2D) - if (f_rfpnd (1:1) /= 'x') & - call accum_hist_field(n_rfpnd, iblk, rfpnd(:,:,iblk), a2D) - if (f_ilpnd (1:1) /= 'x') & - call accum_hist_field(n_ilpnd, iblk, ilpnd(:,:,iblk), a2D) - if (f_mipnd (1:1) /= 'x') & - call accum_hist_field(n_mipnd, iblk, mipnd(:,:,iblk), a2D) - if (f_rdpnd (1:1) /= 'x') & - call accum_hist_field(n_rdpnd, iblk, rdpnd(:,:,iblk), a2D) + if (f_dpnd_flush (1:1) /= 'x') & + call accum_hist_field(n_dpnd_flush , iblk, dpnd_flush (:,:,iblk), a2D) + if (f_dpnd_expon (1:1) /= 'x') & + call accum_hist_field(n_dpnd_expon , iblk, dpnd_expon (:,:,iblk), a2D) + if (f_dpnd_freebd (1:1) /= 'x') & + call accum_hist_field(n_dpnd_freebd , iblk, dpnd_freebd (:,:,iblk), a2D) + if (f_dpnd_initial (1:1) /= 'x') & + call accum_hist_field(n_dpnd_initial, iblk, dpnd_initial(:,:,iblk), a2D) + if (f_dpnd_dlid (1:1) /= 'x') & + call accum_hist_field(n_dpnd_dlid , iblk, dpnd_dlid (:,:,iblk), a2D) + if (f_dpnd_melt (1:1) /= 'x') & + call accum_hist_field(n_dpnd_melt , iblk, dpnd_melt (:,:,iblk), a2D) + if (f_dpnd_ridge (1:1) /= 'x') & + call accum_hist_field(n_dpnd_ridge , iblk, dpnd_ridge (:,:,iblk), a2D) endif ! allocated(a2D) @@ -534,16 +558,16 @@ subroutine accum_hist_pond (iblk) trcrn(:,:,nt_apnd,1:ncat_hist,iblk) & * trcrn(:,:,nt_hpnd,1:ncat_hist,iblk), a3Dc) - if (f_flpndn (1:1) /= 'x') & - call accum_hist_field(n_flpndn-n2D, iblk, ncat_hist, flpndn(:,:,:,iblk), a3Dc) - if (f_expndn (1:1) /= 'x') & - call accum_hist_field(n_expndn-n2D, iblk, ncat_hist, expndn(:,:,:,iblk), a3Dc) - if (f_frpndn (1:1) /= 'x') & - call accum_hist_field(n_frpndn-n2D, iblk, ncat_hist, frpndn(:,:,:,iblk), a3Dc) - if (f_rfpndn (1:1) /= 'x') & - call accum_hist_field(n_rfpndn-n2D, iblk, ncat_hist, rfpndn(:,:,:,iblk), a3Dc) - if (f_ilpndn (1:1) /= 'x') & - call accum_hist_field(n_ilpndn-n2D, iblk, ncat_hist, ilpndn(:,:,:,iblk), a3Dc) + if (f_dpnd_flushn (1:1) /= 'x') & + call accum_hist_field(n_dpnd_flushn-n2D , iblk, ncat_hist, dpnd_flushn (:,:,1:ncat_hist,iblk), a3Dc) + if (f_dpnd_exponn (1:1) /= 'x') & + call accum_hist_field(n_dpnd_exponn-n2D , iblk, ncat_hist, dpnd_exponn (:,:,1:ncat_hist,iblk), a3Dc) + if (f_dpnd_freebdn (1:1) /= 'x') & + call accum_hist_field(n_dpnd_freebdn-n2D , iblk, ncat_hist, dpnd_freebdn (:,:,1:ncat_hist,iblk), a3Dc) + if (f_dpnd_initialn (1:1) /= 'x') & + call accum_hist_field(n_dpnd_initialn-n2D, iblk, ncat_hist, dpnd_initialn(:,:,1:ncat_hist,iblk), a3Dc) + if (f_dpnd_dlidn (1:1) /= 'x') & + call accum_hist_field(n_dpnd_dlidn-n2D , iblk, ncat_hist, dpnd_dlidn (:,:,1:ncat_hist,iblk), a3Dc) endif ! allocated(a3Dc) diff --git a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 index 857b55483..56e26bf6b 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_remap.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_remap.F90 @@ -13,10 +13,10 @@ ! transport using incremental remapping, Mon. Wea. Rev., 132, ! 1341-1354. ! -! Lemieux, J.-F., Lipscomb, W. H., Craig, A., Bailey, D. A., -! Hunke, E. C., Blain, P., Rasmussen, T. A. S., Bentsen, M., -! Dupont, F., Hebert, D., and Allard, R., 2024: CICE on a -! C-grid: new momentum, stress, and transport schemes for CICEv6.5, +! Lemieux, J.-F., Lipscomb, W. H., Craig, A., Bailey, D. A., +! Hunke, E. C., Blain, P., Rasmussen, T. A. S., Bentsen, M., +! Dupont, F., Hebert, D., and Allard, R., 2024: CICE on a +! C-grid: new momentum, stress, and transport schemes for CICEv6.5, ! Geosci. Model Dev., 17, 6703-6724. ! ! authors William H. Lipscomb, LANL @@ -246,12 +246,12 @@ module ice_transport_remap ! field implied by the remapping was, in general, different from the ! value of del*u computed in the dynamics. For energetic consistency ! (in CICE as well as in layered ocean models such as HYPOP), -! these two values should agree. This can be ensured by using the -! edge flux adjustment (EFA) method by setting l_edge_flux_adj = T. -! The EFA method specifies the area transported across each grid cell -! edge in the arrays edgearea_e and edgearea_n. The departure regions -! are then tweaked, following an idea by Mats Bentsen, such that they -! have the desired area. If l_edge_flux_adj = F, these regions are +! these two values should agree. This can be ensured by using the +! edge flux adjustment (EFA) method by setting l_edge_flux_adj = T. +! The EFA method specifies the area transported across each grid cell +! edge in the arrays edgearea_e and edgearea_n. The departure regions +! are then tweaked, following an idea by Mats Bentsen, such that they +! have the desired area. If l_edge_flux_adj = F, these regions are ! not tweaked, and the edgearea arrays are output variables. ! !======================================================================= @@ -280,11 +280,11 @@ subroutine init_remap ! regions are adjusted to obtain the desired area. ! If false, edgearea is computed in locate_triangles and passed out. ! - ! l_edge_flux_adj = .false. has been the default approach in CICE. - ! It is used like this for the B-grid. However, idealized tests with - ! the C-grid have shown that l_edge_flux_adj = .false. leads to a - ! checkerboard pattern in prognostic fields such as aice Using - ! l_edge_flux_adj = .true. eliminates the checkerboard pattern in + ! l_edge_flux_adj = .false. has been the default approach in CICE. + ! It is used like this for the B-grid. However, idealized tests with + ! the C-grid have shown that l_edge_flux_adj = .false. leads to a + ! checkerboard pattern in prognostic fields such as aice Using + ! l_edge_flux_adj = .true. eliminates the checkerboard pattern in ! C-grid simulations (Lemieux et al. 2024). !------------------------------------------------------------------- @@ -626,7 +626,7 @@ subroutine horizontal_remap (dt, ntrace, & jhi = this_block%jhi !------------------------------------------------------------------- - ! If l_edge_flux_adj is true, compute edgearea by taking the + ! If l_edge_flux_adj is true, compute edgearea by taking the ! divergence of the velocity field. Otherwise, initialize edgearea. !------------------------------------------------------------------- @@ -2048,7 +2048,7 @@ subroutine locate_triangles (nx_block, ny_block, & ! areafact_c or areafac_ce (areafact_c for the other edge) are used ! (with shifted indices) to make sure that a flux area on one edge ! is consistent with the analogous area on the other edge and to - ! ensure that areas add up when using l_edge_flux_adj = T. + ! ensure that areas add up when using l_edge_flux_adj = T. ! See PR #849 for details. !------------------------------------------------------------------- diff --git a/cicecore/cicedyn/general/ice_flux.F90 b/cicecore/cicedyn/general/ice_flux.F90 index 11239612e..ff71a4a4d 100644 --- a/cicecore/cicedyn/general/ice_flux.F90 +++ b/cicecore/cicedyn/general/ice_flux.F90 @@ -343,20 +343,20 @@ module ice_flux frazil_diag ! frazil ice growth diagnostic (m/step-->cm/day) real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: & - flpnd, & ! pond flushing rate due to ice permeability (m/step) - expnd, & ! exponential pond drainage rate (m/step) - frpnd, & ! pond drainage rate due to freeboard constraint (m/step) - rfpnd, & ! runoff rate due to rfrac (m/step) - ilpnd, & ! pond loss/gain (+/-) to ice lid freezing/melting (m/step) - mipnd, & ! pond 'drainage' due to ice melting (m / step) - rdpnd ! pond 'drainage' due to ridging (m) + dpnd_flush, & ! pond flushing rate due to ice permeability (m/step) + dpnd_expon, & ! exponential pond drainage rate (m/step) + dpnd_freebd, & ! pond drainage rate due to freeboard constraint (m/step) + dpnd_initial,& ! runoff rate due to rfrac (m/step) + dpnd_dlid, & ! pond loss/gain (+/-) to ice lid freezing/melting (m/step) + dpnd_melt, & ! pond 'drainage' due to ice melting (m / step) + dpnd_ridge ! pond 'drainage' due to ridging (m) real (kind=dbl_kind), dimension (:,:,:,:), allocatable, public :: & - flpndn, & ! category pond flushing rate due to ice permeability (m/step) - expndn, & ! category exponential pond drainage rate (m/step) - frpndn, & ! category pond drainage rate due to freeboard constraint (m/step) - rfpndn, & ! category runoff rate due to rfrac (m/step) - ilpndn ! category pond loss/gain (+/-) to ice lid freezing/melting (m/step) + dpnd_flushn, & ! category pond flushing rate due to ice permeability (m/step) + dpnd_exponn, & ! category exponential pond drainage rate (m/step) + dpnd_freebdn,& ! category pond drainage rate due to freeboard constraint (m/step) + dpnd_initialn,&! category runoff rate due to rfrac (m/step) + dpnd_dlidn ! category pond loss/gain (+/-) to ice lid freezing/melting (m/step) real (kind=dbl_kind), dimension (:,:,:,:), allocatable, public :: & fsurfn, & ! category fsurf @@ -421,12 +421,8 @@ subroutine alloc_flux use ice_grid, only : grid_ice - logical (kind=log_kind) :: tr_pond - integer (int_kind) :: ierr - call icepack_query_tracer_flags(tr_pond_out=tr_pond) - allocate( & strax (nx_block,ny_block,max_blocks), & ! wind stress components (N/m^2) stray (nx_block,ny_block,max_blocks), & ! @@ -629,11 +625,6 @@ subroutine alloc_flux stat=ierr) if (ierr/=0) call abort_ice('(alloc_flux): Out of memory') - swuvrdr(:,:,:) = c0 - swuvrdf(:,:,:) = c0 - swpardr(:,:,:) = c0 - swpardf(:,:,:) = c0 - if (grid_ice == "CD" .or. grid_ice == "C") & allocate( & taubxN (nx_block,ny_block,max_blocks), & ! seabed stress (x) at N points (N/m^2) @@ -667,24 +658,24 @@ subroutine alloc_flux stressmU (nx_block,ny_block,max_blocks), & ! sigma11-sigma22 stress12U (nx_block,ny_block,max_blocks), & ! sigma12 stat=ierr) - if (ierr/=0) call abort_ice('(alloc_flux): Out of memory') + if (ierr/=0) call abort_ice('(alloc_flux): Out of memory (C or CD grid)') + ! Pond diagnostics allocate( & - flpnd (nx_block,ny_block,max_blocks), & ! pond flushing rate due to ice permeability (m/step) - expnd (nx_block,ny_block,max_blocks), & ! exponential pond drainage rate (m/step) - frpnd (nx_block,ny_block,max_blocks), & ! pond drainage rate due to freeboard constraint (m/step) - rfpnd (nx_block,ny_block,max_blocks), & ! runoff rate due to rfrac (m/step) - ilpnd (nx_block,ny_block,max_blocks), & ! pond loss/gain (+/-) to ice lid freezing/melting (m/step) - mipnd (nx_block,ny_block,max_blocks), & ! pond 'drainage' due to ice melting (m / step) - rdpnd (nx_block,ny_block,max_blocks), & ! pond 'drainage' due to ridging (m) - flpndn (nx_block,ny_block,ncat,max_blocks), & ! category pond flushing rate due to ice permeability (m/step) - expndn (nx_block,ny_block,ncat,max_blocks), & ! category exponential pond drainage rate (m/step) - frpndn (nx_block,ny_block,ncat,max_blocks), & ! category pond drainage rate due to freeboard constraint (m/step) - rfpndn (nx_block,ny_block,ncat,max_blocks), & ! category runoff rate due to rfrac (m/step) - ilpndn (nx_block,ny_block,ncat,max_blocks), & ! category pond loss/gain (+/-) to ice lid freezing/melting (m/step) + dpnd_flush (nx_block,ny_block,max_blocks), & ! pond flushing rate due to ice permeability (m/step) + dpnd_expon (nx_block,ny_block,max_blocks), & ! exponential pond drainage rate (m/step) + dpnd_freebd (nx_block,ny_block,max_blocks), & ! pond drainage rate due to freeboard constraint (m/step) + dpnd_initial (nx_block,ny_block,max_blocks), & ! runoff rate due to rfrac (m/step) + dpnd_dlid (nx_block,ny_block,max_blocks), & ! pond loss/gain (+/-) to ice lid freezing/melting (m/step) + dpnd_melt (nx_block,ny_block,max_blocks), & ! pond 'drainage' due to ice melting (m / step) + dpnd_ridge (nx_block,ny_block,max_blocks), & ! pond 'drainage' due to ridging (m) + dpnd_flushn (nx_block,ny_block,ncat,max_blocks), & ! category pond flushing rate due to ice permeability (m/step) + dpnd_exponn (nx_block,ny_block,ncat,max_blocks), & ! category exponential pond drainage rate (m/step) + dpnd_freebdn (nx_block,ny_block,ncat,max_blocks), & ! category pond drainage rate due to freeboard constraint (m/step) + dpnd_initialn(nx_block,ny_block,ncat,max_blocks), & ! category runoff rate due to rfrac (m/step) + dpnd_dlidn (nx_block,ny_block,ncat,max_blocks), & ! category pond loss/gain (+/-) to ice lid freezing/melting (m/step) stat=ierr) - - if (ierr/=0) call abort_ice('(alloc_flux): Out of memory') + if (ierr/=0) call abort_ice('(alloc_flux): Out of memory (ponds)') end subroutine alloc_flux @@ -790,6 +781,11 @@ subroutine init_coupler_flux fsensn_f (:,:,:,:) = c0 ! sensible heat flux (W/m^2) endif ! + swuvrdr(:,:,:) = c0 ! visible uvr flux, direct (W/m^2) + swuvrdf(:,:,:) = c0 ! visible uvr flux, diffuse (W/m^2) + swpardr(:,:,:) = c0 ! visible par flux, direct (W/m^2) + swpardf(:,:,:) = c0 ! visible par flux, diffuse (W/m^2) + fiso_atm (:,:,:,:) = c0 ! isotope deposition rate (kg/m2/s) faero_atm (:,:,:,:) = c0 ! aerosol deposition rate (kg/m2/s) flux_bio_atm (:,:,:,:) = c0 ! zaero and bio deposition rate (kg/m2/s) @@ -1069,20 +1065,18 @@ subroutine init_history_therm frazil_diag (:,:,:) = c0 ! Extra pond diagnostics - if (tr_pond) then - flpnd(:,:,:) = c0 - expnd(:,:,:) = c0 - frpnd(:,:,:) = c0 - rfpnd(:,:,:) = c0 - ilpnd(:,:,:) = c0 - mipnd(:,:,:) = c0 - rdpnd(:,:,:) = c0 - flpndn(:,:,:,:) = c0 - expndn(:,:,:,:) = c0 - frpndn(:,:,:,:) = c0 - rfpndn(:,:,:,:) = c0 - ilpndn(:,:,:,:) = c0 - endif + dpnd_flush(:,:,:) = c0 + dpnd_expon(:,:,:) = c0 + dpnd_freebd(:,:,:) = c0 + dpnd_initial(:,:,:) = c0 + dpnd_dlid(:,:,:) = c0 + dpnd_melt(:,:,:) = c0 + dpnd_ridge(:,:,:) = c0 + dpnd_flushn(:,:,:,:) = c0 + dpnd_exponn(:,:,:,:) = c0 + dpnd_freebdn(:,:,:,:) = c0 + dpnd_initialn(:,:,:,:) = c0 + dpnd_dlidn(:,:,:,:) = c0 ! drag coefficients are computed prior to the atmo_boundary call, ! during the thermodynamics section diff --git a/cicecore/cicedyn/general/ice_init.F90 b/cicecore/cicedyn/general/ice_init.F90 index e7259b6d1..92580a512 100644 --- a/cicecore/cicedyn/general/ice_init.F90 +++ b/cicecore/cicedyn/general/ice_init.F90 @@ -232,7 +232,7 @@ subroutine input_data tr_iso, restart_iso, & tr_aero, restart_aero, & tr_fsd, restart_fsd, & - n_iso, n_aero, n_zaero, n_algae, & + n_iso, n_aero, n_zaero, n_algae, & n_doc, n_dic, n_don, n_fed, n_fep namelist /thermo_nml/ & @@ -241,7 +241,7 @@ subroutine input_data dSdt_slow_mode, phi_c_slow_mode, phi_i_mushy, & floediam, hfrazilmin, Tliquidus_max, hi_min, & tscale_pnd_drain - + namelist /dynamics_nml/ & kdyn, ndte, revised_evp, yield_curve, & @@ -249,7 +249,7 @@ subroutine input_data brlx, arlx, ssh_stress, & advection, coriolis, kridge, ktransport, & kstrength, krdg_partic, krdg_redist, mu_rdg, & - e_yieldcurve, e_plasticpot, visc_method, & + e_yieldcurve, e_plasticpot, visc_method, & maxits_nonlin, precond, dim_fgmres, & dim_pgmres, maxits_fgmres, maxits_pgmres, monitor_nonlin, & monitor_fgmres, monitor_pgmres, reltol_nonlin, reltol_fgmres, & @@ -2452,6 +2452,7 @@ subroutine input_data write(nu_diag,1002) ' hs1 = ', hs1,' : snow depth of transition to pond ice' elseif (tr_pond_topo) then write(nu_diag,1010) ' tr_pond_topo = ', tr_pond_topo,' : topo pond formulation' + write(nu_diag,*) ' WARNING: dpnd history fields are turned off for topo ponds' write(nu_diag,1002) ' hp1 = ', hp1,' : critical ice lid thickness for topo ponds' elseif (tr_pond_sealvl) then write(nu_diag,1010) ' tr_pond_sealvl = ', tr_pond_sealvl,' : sealvl pond formulation' diff --git a/cicecore/cicedyn/general/ice_step_mod.F90 b/cicecore/cicedyn/general/ice_step_mod.F90 index 07a314ec7..b7aff0779 100644 --- a/cicecore/cicedyn/general/ice_step_mod.F90 +++ b/cicecore/cicedyn/general/ice_step_mod.F90 @@ -244,8 +244,8 @@ subroutine step_therm1 (dt, iblk) flatn_f, fsensn_f, fsurfn_f, fcondtopn_f, & dfsurfndTsfc_f, dflatndTsfc_f, & send_i2x_per_cat, fswthrun_ai, dsnow - use ice_flux, only: flpnd, expnd, frpnd, rfpnd, ilpnd - use ice_flux, only: flpndn, expndn, frpndn, rfpndn, ilpndn + use ice_flux, only: dpnd_flush, dpnd_expon, dpnd_freebd, dpnd_initial, & + dpnd_dlid, dpnd_flushn, dpnd_exponn, dpnd_freebdn, dpnd_initialn, dpnd_dlidn use ice_flux_bgc, only: dsnown, faero_atm, faero_ocn, fiso_atm, fiso_ocn, & Qa_iso, Qref_iso, fiso_evap, HDO_ocn, H2_16O_ocn, H2_18O_ocn use ice_grid, only: lmask_n, lmask_s, tmask, opmask @@ -555,16 +555,16 @@ subroutine step_therm1 (dt, iblk) lmask_s = lmask_s (i,j, iblk), & mlt_onset = mlt_onset (i,j, iblk), & frz_onset = frz_onset (i,j, iblk), & - flpnd = flpnd (i,j, iblk), & - expnd = expnd (i,j, iblk), & - frpnd = frpnd (i,j, iblk), & - rfpnd = rfpnd (i,j, iblk), & - ilpnd = ilpnd (i,j, iblk), & - flpndn = flpndn (i,j,:,iblk), & - expndn = expndn (i,j,:,iblk), & - frpndn = frpndn (i,j,:,iblk), & - rfpndn = rfpndn (i,j,:,iblk), & - ilpndn = ilpndn (i,j,:,iblk), & + dpnd_flush = dpnd_flush (i,j, iblk), & + dpnd_expon = dpnd_expon (i,j, iblk), & + dpnd_freebd = dpnd_freebd (i,j, iblk), & + dpnd_initial = dpnd_initial(i,j, iblk), & + dpnd_dlid = dpnd_dlid (i,j, iblk), & + dpnd_flushn = dpnd_flushn (i,j,:,iblk), & + dpnd_exponn = dpnd_exponn (i,j,:,iblk), & + dpnd_freebdn = dpnd_freebdn(i,j,:,iblk), & + dpnd_initialn=dpnd_initialn(i,j,:,iblk), & + dpnd_dlidn = dpnd_dlidn (i,j,:,iblk), & yday=yday, prescribed_ice=prescribed_ice) !----------------------------------------------------------------- @@ -646,7 +646,7 @@ subroutine step_therm2 (dt, iblk) use ice_domain_size, only: ncat, nilyr, nslyr, nblyr, nfsd use ice_flux, only: fresh, frain, fpond, frzmlt, frazil, frz_onset, & fsalt, Tf, sss, salinz, fhocn, rsiden, wlat, & - meltl, frazil_diag, mipnd + meltl, frazil_diag, dpnd_melt use ice_flux_bgc, only: flux_bio, faero_ocn, & fiso_ocn, HDO_ocn, H2_16O_ocn, H2_18O_ocn use ice_grid, only: tmask, opmask @@ -707,53 +707,54 @@ subroutine step_therm2 (dt, iblk) if (tr_fsd) & wave_sig_ht(i,j,iblk) = c4*SQRT(SUM(wave_spectrum(i,j,:,iblk)*dwavefreq(:))) - call icepack_step_therm2(dt=dt, & - hin_max = hin_max (:), & - aicen = aicen (i,j,:,iblk), & - vicen = vicen (i,j,:,iblk), & - vsnon = vsnon (i,j,:,iblk), & - aicen_init = aicen_init(i,j,:,iblk), & - vicen_init = vicen_init(i,j,:,iblk), & - trcrn = trcrn (i,j,:,:,iblk), & - aice0 = aice0 (i,j, iblk), & - aice = aice (i,j, iblk), & - trcr_depend= trcr_depend(:), & - trcr_base = trcr_base(:,:), & - n_trcr_strata = n_trcr_strata(:), & - nt_strata = nt_strata(:,:), & - Tf = Tf (i,j, iblk), & - sss = sss (i,j, iblk), & - salinz = salinz (i,j,:,iblk), & - rsiden = rsiden (i,j,:,iblk), & - meltl = meltl (i,j, iblk), & - wlat = wlat (i,j, iblk), & - frzmlt = frzmlt (i,j, iblk), & - frazil = frazil (i,j, iblk), & - frain = frain (i,j, iblk), & - fpond = fpond (i,j, iblk), & - fresh = fresh (i,j, iblk), & - fsalt = fsalt (i,j, iblk), & - fhocn = fhocn (i,j, iblk), & - faero_ocn = faero_ocn (i,j,:,iblk), & - first_ice = first_ice (i,j,:,iblk), & - flux_bio = flux_bio (i,j,1:nbtrcr,iblk), & - ocean_bio = ocean_bio (i,j,1:nbtrcr,iblk), & - frazil_diag= frazil_diag(i,j,iblk), & - frz_onset = frz_onset (i,j, iblk), & - yday = yday, & - fiso_ocn = fiso_ocn (i,j,:,iblk), & - HDO_ocn = HDO_ocn (i,j, iblk), & - H2_16O_ocn = H2_16O_ocn(i,j, iblk), & - H2_18O_ocn = H2_18O_ocn(i,j, iblk), & - wave_sig_ht= wave_sig_ht(i,j,iblk), & - wave_spectrum = wave_spectrum(i,j,:,iblk), & - wavefreq = wavefreq(:), & - dwavefreq = dwavefreq(:), & - d_afsd_latg= d_afsd_latg(i,j,:,iblk),& - d_afsd_newi= d_afsd_newi(i,j,:,iblk),& - d_afsd_latm= d_afsd_latm(i,j,:,iblk),& - d_afsd_weld= d_afsd_weld(i,j,:,iblk),& - mipnd = mipnd(i,j, iblk)) + call icepack_step_therm2(dt=dt, & + hin_max = hin_max (:), & + aicen = aicen (i,j,:,iblk), & + vicen = vicen (i,j,:,iblk), & + vsnon = vsnon (i,j,:,iblk), & + aicen_init = aicen_init (i,j,:,iblk), & + vicen_init = vicen_init (i,j,:,iblk), & + trcrn = trcrn (i,j,:,:,iblk), & + aice0 = aice0 (i,j, iblk), & + aice = aice (i,j, iblk), & + trcr_depend = trcr_depend(:), & + trcr_base = trcr_base (:,:), & + n_trcr_strata = n_trcr_strata(:), & + nt_strata = nt_strata (:,:), & + Tf = Tf (i,j, iblk), & + sss = sss (i,j, iblk), & + salinz = salinz (i,j,:,iblk), & + rsiden = rsiden (i,j,:,iblk), & + meltl = meltl (i,j, iblk), & + wlat = wlat (i,j, iblk), & + frzmlt = frzmlt (i,j, iblk), & + frazil = frazil (i,j, iblk), & + frain = frain (i,j, iblk), & + fpond = fpond (i,j, iblk), & + fresh = fresh (i,j, iblk), & + fsalt = fsalt (i,j, iblk), & + fhocn = fhocn (i,j, iblk), & + faero_ocn = faero_ocn (i,j,:,iblk), & + first_ice = first_ice (i,j,:,iblk), & + flux_bio = flux_bio (i,j,1:nbtrcr,iblk), & + ocean_bio = ocean_bio (i,j,1:nbtrcr,iblk), & + frazil_diag = frazil_diag(i,j, iblk), & + frz_onset = frz_onset (i,j, iblk), & + yday = yday, & + fiso_ocn = fiso_ocn (i,j,:,iblk), & + HDO_ocn = HDO_ocn (i,j, iblk), & + H2_16O_ocn = H2_16O_ocn (i,j, iblk), & + H2_18O_ocn = H2_18O_ocn (i,j, iblk), & + wave_sig_ht = wave_sig_ht(i,j, iblk), & + wave_spectrum = & + wave_spectrum(i,j,:,iblk), & + wavefreq = wavefreq (:), & + dwavefreq = dwavefreq (:), & + d_afsd_latg = d_afsd_latg(i,j,:,iblk), & + d_afsd_newi = d_afsd_newi(i,j,:,iblk), & + d_afsd_latm = d_afsd_latm(i,j,:,iblk), & + d_afsd_weld = d_afsd_weld(i,j,:,iblk), & + dpnd_melt = dpnd_melt (i,j, iblk)) endif ! tmask enddo ! i @@ -847,26 +848,26 @@ subroutine update_state (dt, daidt, dvidt, dvsdt, dagedt, offset) nt_strata = nt_strata(:,:), & Tf = Tf(i,j,iblk)) - if (present(offset)) then - - !----------------------------------------------------------------- - ! Compute thermodynamic area and volume tendencies. - !----------------------------------------------------------------- - - if (present(daidt)) daidt(i,j,iblk) = (aice(i,j,iblk) - daidt(i,j,iblk)) / dt - if (present(dvidt)) dvidt(i,j,iblk) = (vice(i,j,iblk) - dvidt(i,j,iblk)) / dt - if (present(dvsdt)) dvsdt(i,j,iblk) = (vsno(i,j,iblk) - dvsdt(i,j,iblk)) / dt - if (tr_iage .and. present(dagedt)) then - if (offset > c0) then ! thermo - if (trcr(i,j,nt_iage,iblk) > c0) & - dagedt(i,j,iblk) = (trcr(i,j,nt_iage,iblk) & - - dagedt(i,j,iblk) - offset) / dt - else ! dynamics - dagedt(i,j,iblk) = (trcr(i,j,nt_iage,iblk) & - - dagedt(i,j,iblk)) / dt - endif - endif ! tr_iage - endif ! present(offset) + if (present(offset)) then + + !----------------------------------------------------------------- + ! Compute thermodynamic area and volume tendencies. + !----------------------------------------------------------------- + + if (present(daidt)) daidt(i,j,iblk) = (aice(i,j,iblk) - daidt(i,j,iblk)) / dt + if (present(dvidt)) dvidt(i,j,iblk) = (vice(i,j,iblk) - dvidt(i,j,iblk)) / dt + if (present(dvsdt)) dvsdt(i,j,iblk) = (vsno(i,j,iblk) - dvsdt(i,j,iblk)) / dt + if (present(dagedt) .and. tr_iage) then + if (offset > c0) then ! thermo + if (trcr(i,j,nt_iage,iblk) > c0) & + dagedt(i,j,iblk) = (trcr(i,j,nt_iage,iblk) & + - dagedt(i,j,iblk) - offset) / dt + else ! dynamics + dagedt(i,j,iblk) = (trcr(i,j,nt_iage,iblk) & + - dagedt(i,j,iblk)) / dt + endif + endif ! tr_iage + endif ! present(offset) enddo ! i enddo ! j @@ -1059,10 +1060,9 @@ subroutine step_dyn_ridge (dt, ndtd, iblk) use ice_arrays_column, only: hin_max, first_ice use ice_domain_size, only: ncat, nilyr, nslyr, n_aero, nblyr - use ice_grid, only: TLAT, TLON use ice_flux, only: & rdg_conv, rdg_shear, dardg1dt, dardg2dt, & - dvirdgdt, opening, fpond, fresh, fhocn, rdpnd, & + dvirdgdt, opening, fpond, fresh, fhocn, dpnd_ridge, & aparticn, krdgn, aredistn, vredistn, dardg1ndt, dardg2ndt, & dvirdgndt, araftn, vraftn, fsalt, Tf use ice_flux_bgc, only: flux_bio, faero_ocn, fiso_ocn @@ -1087,7 +1087,7 @@ subroutine step_dyn_ridge (dt, ndtd, iblk) integer (kind=int_kind) :: & ilo,ihi,jlo,jhi, & ! beginning and end of physical domain - i, j, n, & ! horizontal indices + i, j, & ! horizontal indices ntrcr, & ! nbtrcr ! @@ -1155,8 +1155,8 @@ subroutine step_dyn_ridge (dt, ndtd, iblk) fsalt = fsalt (i,j, iblk), & first_ice = first_ice(i,j,:,iblk), & flux_bio = flux_bio (i,j,1:nbtrcr,iblk), & - Tf = Tf(i,j,iblk), & - rdpnd = rdpnd(i,j,iblk)) + Tf = Tf (i,j, iblk), & + dpnd_ridge=dpnd_ridge(i,j, iblk)) endif ! tmask enddo ! i diff --git a/cicecore/cicedyn/infrastructure/ice_grid.F90 b/cicecore/cicedyn/infrastructure/ice_grid.F90 index e06512064..d6f306c90 100644 --- a/cicecore/cicedyn/infrastructure/ice_grid.F90 +++ b/cicecore/cicedyn/infrastructure/ice_grid.F90 @@ -391,7 +391,7 @@ subroutine init_grid1 deallocate(work_mom, stat=ierr) if (ierr/=0) call abort_ice(subname//' ERROR: Dealloc error', file=__FILE__, line=__LINE__) - case('pop_nc', 'geosnc') + case('pop_nc', 'geosnc') fieldname='ulat' call ice_open_nc(grid_file,fid_grid) @@ -413,7 +413,7 @@ subroutine init_grid1 ! Fill kmt if (trim(kmt_type) =='file') then select case(trim(grid_format)) - case ('mom_nc', 'pop_nc', 'geosnc') + case ('mom_nc', 'pop_nc', 'geosnc') ! mask variable name might be kmt or mask, check both call ice_open_nc(kmt_file,fid_kmt) @@ -534,11 +534,11 @@ subroutine init_grid2 trim(grid_type) == 'tripole' .or. & trim(grid_type) == 'regional' ) then select case (trim(grid_format)) - case('mom_nc') + case('mom_nc') call mom_grid ! derive cice grid from MOM supergrid nc file - case ('pop_nc') + case ('pop_nc') call popgrid_nc ! read POP grid lengths from nc file - case ('geosnc') + case ('geosnc') call geosgrid_nc ! read GEOS MOM grid used from nc file case default call popgrid ! read POP grid lengths directly @@ -557,7 +557,7 @@ subroutine init_grid2 hm(:,:,:) = c1 else if (trim(kmt_type) =='file') then select case (trim(grid_format)) - case('mom_nc', 'pop_nc' ,'geosnc') + case('mom_nc', 'pop_nc' ,'geosnc') call kmtmask('nc') case default call kmtmask('bin') diff --git a/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 b/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 index 4f476cb51..cc3a4caff 100644 --- a/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 +++ b/cicecore/drivers/direct/hadgem3/CICE_InitMod.F90 @@ -296,8 +296,7 @@ subroutine init_restart ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -331,8 +330,7 @@ subroutine init_restart endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -346,8 +344,7 @@ subroutine init_restart endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -379,10 +376,8 @@ subroutine init_restart endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90 b/cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90 index b255c55f3..4921482a6 100644 --- a/cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90 +++ b/cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90 @@ -296,8 +296,7 @@ subroutine init_restart ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -331,8 +330,7 @@ subroutine init_restart endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -346,8 +344,7 @@ subroutine init_restart endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -379,10 +376,8 @@ subroutine init_restart endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/cicecore/drivers/mapl/geos/CICE_InitMod.F90 b/cicecore/drivers/mapl/geos/CICE_InitMod.F90 index 2f7da8cf9..f187b9eb7 100644 --- a/cicecore/drivers/mapl/geos/CICE_InitMod.F90 +++ b/cicecore/drivers/mapl/geos/CICE_InitMod.F90 @@ -353,8 +353,7 @@ subroutine init_restart() ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -388,8 +387,7 @@ subroutine init_restart() endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -403,8 +401,7 @@ subroutine init_restart() endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -464,10 +461,8 @@ subroutine init_restart() endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 b/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 index 0a5e27840..8af7704fb 100644 --- a/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 +++ b/cicecore/drivers/mct/cesm1/CICE_InitMod.F90 @@ -332,8 +332,7 @@ subroutine init_restart ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -367,8 +366,7 @@ subroutine init_restart endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -382,8 +380,7 @@ subroutine init_restart endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -445,10 +442,8 @@ subroutine init_restart endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 b/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 index f28e7c7ad..c46e05a01 100644 --- a/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 +++ b/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 @@ -13,7 +13,6 @@ module CICE_InitMod use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags use icepack_intfc, only: icepack_query_tracer_indices, icepack_query_tracer_sizes - use icepack_intfc, only: icepack_init_sealvlpnd implicit none private @@ -98,7 +97,7 @@ subroutine cice_init2() use ice_arrays_column , only: wavefreq, dwavefreq logical(kind=log_kind) :: tr_aero, tr_zaero, skl_bgc, z_tracers - logical(kind=log_kind) :: tr_iso, tr_fsd, wave_spec, tr_snow, tr_pond_sealvl + logical(kind=log_kind) :: tr_iso, tr_fsd, wave_spec, tr_snow character(len=char_len) :: snw_aging_table real(kind=dbl_kind), dimension(25) :: wave_spectrum_profile ! hardwire for now character(len=*), parameter :: subname = '(cice_init2)' @@ -181,13 +180,6 @@ subroutine cice_init2() wave_spectrum_profile=wave_spectrum_profile, wavefreq=wavefreq, dwavefreq=dwavefreq) end if - call icepack_query_tracer_flags(tr_pond_sealvl_out=tr_pond_sealvl) - call icepack_warnings_flush(nu_diag) - if (icepack_warnings_aborted()) call abort_ice(trim(subname), & - file=__FILE__,line= __LINE__) - ! This must be called before init_shortwave - if (tr_pond_sealvl) call icepack_init_sealvlpnd ! sealvl ponds - ! Initialize shortwave components using swdn from previous timestep ! if restarting. These components will be scaled to current forcing ! in prep_radiation. @@ -286,7 +278,7 @@ subroutine init_restart() if (trim(runtype) == 'continue') then ! start from core restart file call restartfile() ! given by pointer in ice_in - call calendar() ! update time parameters + call calendar() ! update time parameters if (kdyn == 2) call read_restart_eap ! EAP else if (restart) then ! ice_ic = core restart file call restartfile (ice_ic) ! or 'default' or 'none' @@ -299,8 +291,7 @@ subroutine init_restart() ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -334,8 +325,7 @@ subroutine init_restart() endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -349,8 +339,7 @@ subroutine init_restart() endif ! sealvl melt ponds if (tr_pond_sealvl) then - if (trim(runtype) == 'continue') & - restart_pond_sealvl = .true. + if (trim(runtype) == 'continue') restart_pond_sealvl = .true. if (restart_pond_sealvl) then call read_restart_pond_sealvl else @@ -364,8 +353,7 @@ subroutine init_restart() endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -425,10 +413,8 @@ subroutine init_restart() endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 b/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 index 2cc29cb9c..4f4449546 100644 --- a/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 +++ b/cicecore/drivers/nuopc/dmi/CICE_InitMod.F90 @@ -351,8 +351,7 @@ subroutine init_restart ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -386,8 +385,7 @@ subroutine init_restart endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -401,8 +399,7 @@ subroutine init_restart endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -464,10 +461,8 @@ subroutine init_restart endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/cicecore/drivers/standalone/cice/CICE_InitMod.F90 b/cicecore/drivers/standalone/cice/CICE_InitMod.F90 index 3775f5a2b..66a5256e0 100644 --- a/cicecore/drivers/standalone/cice/CICE_InitMod.F90 +++ b/cicecore/drivers/standalone/cice/CICE_InitMod.F90 @@ -24,7 +24,6 @@ module CICE_InitMod use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters, icepack_query_tracer_flags, & icepack_query_tracer_indices, icepack_query_tracer_sizes - use icepack_intfc, only: icepack_init_sealvlpnd implicit none private @@ -94,7 +93,7 @@ subroutine cice_init use ice_transport_driver, only: init_transport logical(kind=log_kind) :: tr_aero, tr_zaero, skl_bgc, z_tracers, & - tr_iso, tr_fsd, wave_spec, tr_snow, tr_pond_sealvl + tr_iso, tr_fsd, wave_spec, tr_snow character(len=char_len) :: snw_aging_table character(len=*), parameter :: subname = '(cice_init)' @@ -191,13 +190,6 @@ subroutine cice_init if (icepack_warnings_aborted()) call abort_ice(trim(subname), & file=__FILE__,line= __LINE__) - call icepack_query_tracer_flags(tr_pond_sealvl_out=tr_pond_sealvl) - call icepack_warnings_flush(nu_diag) - if (icepack_warnings_aborted()) call abort_ice(trim(subname), & - file=__FILE__,line= __LINE__) - ! This must be called before init_shortwave - if (tr_pond_sealvl) call icepack_init_sealvlpnd ! sealvl ponds - ! Initialize shortwave components using swdn from previous timestep ! if restarting. These components will be scaled to current forcing ! in prep_radiation. @@ -345,8 +337,7 @@ subroutine init_restart ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -380,8 +371,7 @@ subroutine init_restart endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -395,8 +385,7 @@ subroutine init_restart endif ! sealvl melt ponds if (tr_pond_sealvl) then - if (trim(runtype) == 'continue') & - restart_pond_sealvl = .true. + if (trim(runtype) == 'continue') restart_pond_sealvl = .true. if (restart_pond_sealvl) then call read_restart_pond_sealvl else @@ -410,8 +399,7 @@ subroutine init_restart endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -473,10 +461,8 @@ subroutine init_restart endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 b/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 index 9e212799e..66a5256e0 100644 --- a/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 +++ b/cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90 @@ -265,11 +265,12 @@ subroutine init_restart use ice_grid, only: tmask use ice_init, only: ice_ic use ice_init_column, only: init_age, init_FY, init_lvl, init_snowtracers, & - init_meltponds_lvl, init_meltponds_topo, & + init_meltponds_lvl, init_meltponds_sealvl, init_meltponds_topo, & init_isotope, init_aerosol, init_hbrine, init_bgc, init_fsd use ice_restart_column, only: restart_age, read_restart_age, & restart_FY, read_restart_FY, restart_lvl, read_restart_lvl, & restart_pond_lvl, read_restart_pond_lvl, & + restart_pond_sealvl, read_restart_pond_sealvl, & restart_pond_topo, read_restart_pond_topo, & restart_snow, read_restart_snow, & restart_fsd, read_restart_fsd, & @@ -286,7 +287,7 @@ subroutine init_restart i, j , & ! horizontal indices iblk ! block index logical(kind=log_kind) :: & - tr_iage, tr_FY, tr_lvl, tr_pond_lvl, & + tr_iage, tr_FY, tr_lvl, tr_pond_lvl, tr_pond_sealvl, & tr_pond_topo, tr_snow, tr_fsd, tr_iso, tr_aero, tr_brine, & skl_bgc, z_tracers integer(kind=int_kind) :: & @@ -307,6 +308,7 @@ subroutine init_restart z_tracers_out=z_tracers) call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, & tr_lvl_out=tr_lvl, tr_pond_lvl_out=tr_pond_lvl, & + tr_pond_sealvl_out = tr_pond_sealvl, & tr_pond_topo_out=tr_pond_topo, tr_aero_out=tr_aero, tr_brine_out=tr_brine, & tr_snow_out=tr_snow, tr_fsd_out=tr_fsd, tr_iso_out=tr_iso) call icepack_query_tracer_indices(nt_alvl_out=nt_alvl, nt_vlvl_out=nt_vlvl, & @@ -335,8 +337,7 @@ subroutine init_restart ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -370,8 +371,7 @@ subroutine init_restart endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -383,10 +383,23 @@ subroutine init_restart enddo ! iblk endif endif + ! sealvl melt ponds + if (tr_pond_sealvl) then + if (trim(runtype) == 'continue') restart_pond_sealvl = .true. + if (restart_pond_sealvl) then + call read_restart_pond_sealvl + else + do iblk = 1, nblocks + call init_meltponds_sealvl(trcrn(:,:,nt_apnd,:,iblk), & + trcrn(:,:,nt_hpnd,:,iblk), & + trcrn(:,:,nt_ipnd,:,iblk), & + dhsn(:,:,:,iblk)) + enddo ! iblk + endif + endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -448,10 +461,8 @@ subroutine init_restart endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/cicecore/drivers/unittest/halochk/CICE_InitMod.F90 b/cicecore/drivers/unittest/halochk/CICE_InitMod.F90 index 9e212799e..66a5256e0 100644 --- a/cicecore/drivers/unittest/halochk/CICE_InitMod.F90 +++ b/cicecore/drivers/unittest/halochk/CICE_InitMod.F90 @@ -265,11 +265,12 @@ subroutine init_restart use ice_grid, only: tmask use ice_init, only: ice_ic use ice_init_column, only: init_age, init_FY, init_lvl, init_snowtracers, & - init_meltponds_lvl, init_meltponds_topo, & + init_meltponds_lvl, init_meltponds_sealvl, init_meltponds_topo, & init_isotope, init_aerosol, init_hbrine, init_bgc, init_fsd use ice_restart_column, only: restart_age, read_restart_age, & restart_FY, read_restart_FY, restart_lvl, read_restart_lvl, & restart_pond_lvl, read_restart_pond_lvl, & + restart_pond_sealvl, read_restart_pond_sealvl, & restart_pond_topo, read_restart_pond_topo, & restart_snow, read_restart_snow, & restart_fsd, read_restart_fsd, & @@ -286,7 +287,7 @@ subroutine init_restart i, j , & ! horizontal indices iblk ! block index logical(kind=log_kind) :: & - tr_iage, tr_FY, tr_lvl, tr_pond_lvl, & + tr_iage, tr_FY, tr_lvl, tr_pond_lvl, tr_pond_sealvl, & tr_pond_topo, tr_snow, tr_fsd, tr_iso, tr_aero, tr_brine, & skl_bgc, z_tracers integer(kind=int_kind) :: & @@ -307,6 +308,7 @@ subroutine init_restart z_tracers_out=z_tracers) call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, & tr_lvl_out=tr_lvl, tr_pond_lvl_out=tr_pond_lvl, & + tr_pond_sealvl_out = tr_pond_sealvl, & tr_pond_topo_out=tr_pond_topo, tr_aero_out=tr_aero, tr_brine_out=tr_brine, & tr_snow_out=tr_snow, tr_fsd_out=tr_fsd, tr_iso_out=tr_iso) call icepack_query_tracer_indices(nt_alvl_out=nt_alvl, nt_vlvl_out=nt_vlvl, & @@ -335,8 +337,7 @@ subroutine init_restart ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -370,8 +371,7 @@ subroutine init_restart endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -383,10 +383,23 @@ subroutine init_restart enddo ! iblk endif endif + ! sealvl melt ponds + if (tr_pond_sealvl) then + if (trim(runtype) == 'continue') restart_pond_sealvl = .true. + if (restart_pond_sealvl) then + call read_restart_pond_sealvl + else + do iblk = 1, nblocks + call init_meltponds_sealvl(trcrn(:,:,nt_apnd,:,iblk), & + trcrn(:,:,nt_hpnd,:,iblk), & + trcrn(:,:,nt_ipnd,:,iblk), & + dhsn(:,:,:,iblk)) + enddo ! iblk + endif + endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -448,10 +461,8 @@ subroutine init_restart endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/cicecore/drivers/unittest/opticep/CICE_InitMod.F90 b/cicecore/drivers/unittest/opticep/CICE_InitMod.F90 index 9e212799e..66a5256e0 100644 --- a/cicecore/drivers/unittest/opticep/CICE_InitMod.F90 +++ b/cicecore/drivers/unittest/opticep/CICE_InitMod.F90 @@ -265,11 +265,12 @@ subroutine init_restart use ice_grid, only: tmask use ice_init, only: ice_ic use ice_init_column, only: init_age, init_FY, init_lvl, init_snowtracers, & - init_meltponds_lvl, init_meltponds_topo, & + init_meltponds_lvl, init_meltponds_sealvl, init_meltponds_topo, & init_isotope, init_aerosol, init_hbrine, init_bgc, init_fsd use ice_restart_column, only: restart_age, read_restart_age, & restart_FY, read_restart_FY, restart_lvl, read_restart_lvl, & restart_pond_lvl, read_restart_pond_lvl, & + restart_pond_sealvl, read_restart_pond_sealvl, & restart_pond_topo, read_restart_pond_topo, & restart_snow, read_restart_snow, & restart_fsd, read_restart_fsd, & @@ -286,7 +287,7 @@ subroutine init_restart i, j , & ! horizontal indices iblk ! block index logical(kind=log_kind) :: & - tr_iage, tr_FY, tr_lvl, tr_pond_lvl, & + tr_iage, tr_FY, tr_lvl, tr_pond_lvl, tr_pond_sealvl, & tr_pond_topo, tr_snow, tr_fsd, tr_iso, tr_aero, tr_brine, & skl_bgc, z_tracers integer(kind=int_kind) :: & @@ -307,6 +308,7 @@ subroutine init_restart z_tracers_out=z_tracers) call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, & tr_lvl_out=tr_lvl, tr_pond_lvl_out=tr_pond_lvl, & + tr_pond_sealvl_out = tr_pond_sealvl, & tr_pond_topo_out=tr_pond_topo, tr_aero_out=tr_aero, tr_brine_out=tr_brine, & tr_snow_out=tr_snow, tr_fsd_out=tr_fsd, tr_iso_out=tr_iso) call icepack_query_tracer_indices(nt_alvl_out=nt_alvl, nt_vlvl_out=nt_vlvl, & @@ -335,8 +337,7 @@ subroutine init_restart ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -370,8 +371,7 @@ subroutine init_restart endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -383,10 +383,23 @@ subroutine init_restart enddo ! iblk endif endif + ! sealvl melt ponds + if (tr_pond_sealvl) then + if (trim(runtype) == 'continue') restart_pond_sealvl = .true. + if (restart_pond_sealvl) then + call read_restart_pond_sealvl + else + do iblk = 1, nblocks + call init_meltponds_sealvl(trcrn(:,:,nt_apnd,:,iblk), & + trcrn(:,:,nt_hpnd,:,iblk), & + trcrn(:,:,nt_ipnd,:,iblk), & + dhsn(:,:,:,iblk)) + enddo ! iblk + endif + endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -448,10 +461,8 @@ subroutine init_restart endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/cicecore/drivers/unittest/opticep/CICE_RunMod.F90 b/cicecore/drivers/unittest/opticep/CICE_RunMod.F90 index 59213f728..53476776b 100644 --- a/cicecore/drivers/unittest/opticep/CICE_RunMod.F90 +++ b/cicecore/drivers/unittest/opticep/CICE_RunMod.F90 @@ -151,7 +151,7 @@ subroutine ice_step use ice_history_bgc, only: init_history_bgc use ice_restart, only: final_restart use ice_restart_column, only: write_restart_age, write_restart_FY, & - write_restart_lvl, write_restart_pond_lvl, & + write_restart_lvl, write_restart_pond_lvl, write_restart_pond_sealvl,& write_restart_pond_topo, write_restart_aero, write_restart_fsd, & write_restart_iso, write_restart_bgc, write_restart_hbrine, & write_restart_snow @@ -174,7 +174,8 @@ subroutine ice_step logical (kind=log_kind) :: & tr_iage, tr_FY, tr_lvl, tr_fsd, tr_snow, & - tr_pond_lvl, tr_pond_topo, tr_brine, tr_iso, tr_aero, & + tr_pond_lvl, tr_pond_sealvl, tr_pond_topo, & + tr_brine, tr_iso, tr_aero, & calc_Tsfc, skl_bgc, z_tracers, wave_spec character(len=*), parameter :: subname = '(ice_step)' @@ -191,7 +192,7 @@ subroutine ice_step call icepack_query_parameters(calc_Tsfc_out=calc_Tsfc, skl_bgc_out=skl_bgc, & z_tracers_out=z_tracers, ktherm_out=ktherm, wave_spec_out=wave_spec) call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, & - tr_lvl_out=tr_lvl, tr_pond_lvl_out=tr_pond_lvl, & + tr_lvl_out=tr_lvl, tr_pond_lvl_out=tr_pond_lvl, tr_pond_sealvl_out=tr_pond_sealvl, & tr_pond_topo_out=tr_pond_topo, tr_brine_out=tr_brine, tr_aero_out=tr_aero, & tr_iso_out=tr_iso, tr_fsd_out=tr_fsd, tr_snow_out=tr_snow) call icepack_warnings_flush(nu_diag) @@ -397,6 +398,7 @@ subroutine ice_step if (tr_FY) call write_restart_FY if (tr_lvl) call write_restart_lvl if (tr_pond_lvl) call write_restart_pond_lvl + if (tr_pond_sealvl) call write_restart_pond_sealvl if (tr_pond_topo) call write_restart_pond_topo if (tr_snow) call write_restart_snow if (tr_fsd) call write_restart_fsd diff --git a/cicecore/drivers/unittest/opticep/ice_init_column.F90 b/cicecore/drivers/unittest/opticep/ice_init_column.F90 index c05c5185c..34f28cdba 100644 --- a/cicecore/drivers/unittest/opticep/ice_init_column.F90 +++ b/cicecore/drivers/unittest/opticep/ice_init_column.F90 @@ -44,7 +44,7 @@ module ice_init_column private public :: init_thermo_vertical, init_shortwave, & init_age, init_FY, init_lvl, init_fsd, & - init_meltponds_lvl, init_meltponds_topo, & + init_meltponds_lvl, init_meltponds_topo, init_meltponds_sealvl, & init_aerosol, init_bgc, init_hbrine, init_zbgc, input_zbgc, & count_tracers, init_isotope, init_snowtracers @@ -165,6 +165,7 @@ subroutine init_shortwave use ice_arrays_column, only: fswpenln, Iswabsn, Sswabsn, albicen, & albsnon, alvdrn, alidrn, alvdfn, alidfn, fswsfcn, & fswthrun, fswthrun_vdr, fswthrun_vdf, fswthrun_idr, fswthrun_idf, & + fswthrun_uvrdr, fswthrun_uvrdf, fswthrun_pardr, fswthrun_pardf, & fswintn, albpndn, apeffn, trcrn_sw, dhsn, ffracn, snowfracn, & swgrid, igrid use ice_blocks, only: block, get_block @@ -175,8 +176,9 @@ subroutine init_shortwave use ice_flux, only: alvdf, alidf, alvdr, alidr, & alvdr_ai, alidr_ai, alvdf_ai, alidf_ai, & swvdr, swvdf, swidr, swidf, scale_factor, snowfrac, & + swuvrdr, swuvrdf, swpardr, swpardf, & albice, albsno, albpnd, apeff_ai, coszen, fsnow - use ice_grid, only: tlat, tlon, tmask + use ice_grid, only: tlat, tlon, tmask, opmask use ice_restart_shared, only: restart, runtype use ice_state, only: aicen, vicen, vsnon, trcrn @@ -287,6 +289,11 @@ subroutine init_shortwave alidrn(i,j,n,iblk) = c0 alvdfn(i,j,n,iblk) = c0 alidfn(i,j,n,iblk) = c0 + albpndn(i,j,n,iblk) = c0 + albicen(i,j,n,iblk) = c0 + albsnon(i,j,n,iblk) = c0 + apeffn(i,j,n,iblk) = c0 + snowfracn(i,j,n,iblk) = c0 fswsfcn(i,j,n,iblk) = c0 fswintn(i,j,n,iblk) = c0 fswthrun(i,j,n,iblk) = c0 @@ -294,6 +301,10 @@ subroutine init_shortwave fswthrun_vdf(i,j,n,iblk) = c0 fswthrun_idr(i,j,n,iblk) = c0 fswthrun_idf(i,j,n,iblk) = c0 + fswthrun_uvrdr(i,j,n,iblk) = c0 + fswthrun_uvrdf(i,j,n,iblk) = c0 + fswthrun_pardr(i,j,n,iblk) = c0 + fswthrun_pardf(i,j,n,iblk) = c0 enddo ! ncat enddo @@ -303,7 +314,9 @@ subroutine init_shortwave if (shortwave(1:4) == 'dEdd') then ! delta Eddington -#ifndef CESMCOUPLED +#if defined (CESMCOUPLED) || defined (GEOSCOUPLED) + ! initialized externally +#else ! initialize orbital parameters ! These come from the driver in the coupled model. call icepack_init_orbit() @@ -325,7 +338,7 @@ subroutine init_shortwave endif enddo - if (tmask(i,j,iblk)) then + if (tmask(i,j,iblk) .or. opmask(i,j,iblk)) then call icepack_step_radiation (dt=dt, & fbri=fbri(:), & aicen=aicen(i,j,:,iblk), & @@ -347,6 +360,8 @@ subroutine init_shortwave sec=msec, & swvdr=swvdr(i,j,iblk), swvdf=swvdf(i,j,iblk),& swidr=swidr(i,j,iblk), swidf=swidf(i,j,iblk),& + swuvrdr=swuvrdr(i,j,iblk), swuvrdf=swuvrdf (i,j,iblk), & + swpardr=swpardr(i,j,iblk), swpardf=swpardf (i,j,iblk), & coszen=coszen(i,j,iblk), fsnow=fsnow(i,j,iblk),& alvdrn=alvdrn(i,j,:,iblk), alvdfn=alvdfn(i,j,:,iblk), & alidrn=alidrn(i,j,:,iblk), alidfn=alidfn(i,j,:,iblk), & @@ -356,6 +371,10 @@ subroutine init_shortwave !opt fswthrun_vdf=fswthrun_vdf(i,j,:,iblk), & !opt fswthrun_idr=fswthrun_idr(i,j,:,iblk), & !opt fswthrun_idf=fswthrun_idf(i,j,:,iblk), & +!opt fswthrun_uvrdr=fswthrun_uvrdr (i,j,: ,iblk), & +!opt fswthrun_uvrdf=fswthrun_uvrdf (i,j,: ,iblk), & +!opt fswthrun_pardr=fswthrun_pardr (i,j,: ,iblk), & +!opt fswthrun_pardf=fswthrun_pardf (i,j,: ,iblk), & fswpenln=fswpenln(i,j,:,:,iblk), & Sswabsn=Sswabsn(i,j,:,:,iblk), Iswabsn=Iswabsn(i,j,:,:,iblk), & albicen=albicen(i,j,:,iblk), albsnon=albsnon(i,j,:,iblk), & @@ -538,6 +557,27 @@ end subroutine init_meltponds_lvl !======================================================================= +! Initialize melt ponds. + + subroutine init_meltponds_sealvl(apnd, hpnd, ipnd, dhsn) + + real(kind=dbl_kind), dimension(:,:,:), intent(out) :: & + apnd , & ! melt pond area fraction + hpnd , & ! melt pond depth + ipnd , & ! melt pond refrozen lid thickness + dhsn ! depth difference for snow on sea ice and pond ice + + character(len=*),parameter :: subname='(init_meltponds_sealvl)' + + apnd(:,:,:) = c0 + hpnd(:,:,:) = c0 + ipnd(:,:,:) = c0 + dhsn(:,:,:) = c0 + + end subroutine init_meltponds_sealvl + +!======================================================================= + ! Initialize melt ponds. subroutine init_meltponds_topo(apnd, hpnd, ipnd) @@ -1063,7 +1103,7 @@ subroutine input_zbgc ! z biology parameters grid_o = 0.006 ! for bottom flux grid_o_t = 0.006 ! for top flux - l_sk = 2.0_dbl_kind ! characteristic diffusive scale (m) + l_sk = 2.0_dbl_kind ! characteristic diffusive scale brine (m) initbio_frac = c1 ! fraction of ocean trcr concentration in bio trcrs frazil_scav = 0.8_dbl_kind ! increase in initial bio tracer from ocean scavenging ratio_Si2N_diatoms = 1.8_dbl_kind ! algal Si to N (mol/mol) @@ -1787,7 +1827,7 @@ subroutine count_tracers integer (kind=int_kind) :: ntrcr logical (kind=log_kind) :: tr_iage, tr_FY, tr_lvl, tr_pond, tr_aero, tr_fsd logical (kind=log_kind) :: tr_snow - logical (kind=log_kind) :: tr_iso, tr_pond_lvl, tr_pond_topo + logical (kind=log_kind) :: tr_iso, tr_pond_lvl, tr_pond_topo, tr_pond_sealvl 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_aero integer (kind=int_kind) :: nt_fsd, nt_isosno, nt_isoice @@ -1871,7 +1911,7 @@ subroutine count_tracers 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_pond_out=tr_pond, & - tr_pond_lvl_out=tr_pond_lvl, & + tr_pond_lvl_out=tr_pond_lvl, tr_pond_sealvl_out=tr_pond_sealvl, & tr_pond_topo_out=tr_pond_topo, tr_brine_out=tr_brine, tr_fsd_out=tr_fsd, & tr_snow_out=tr_snow, tr_iso_out=tr_iso, & tr_bgc_Nit_out=tr_bgc_Nit, tr_bgc_Am_out =tr_bgc_Am, tr_bgc_Sil_out=tr_bgc_Sil, & @@ -1930,6 +1970,10 @@ subroutine count_tracers ntrcr = ntrcr + 1 ! refrozen pond ice lid thickness nt_ipnd = ntrcr ! on level-ice ponds (if frzpnd='hlid') endif + if (tr_pond_sealvl) then + ntrcr = ntrcr + 1 ! refrozen pond ice lid thickness + nt_ipnd = ntrcr ! on sea level ponds (if frzpnd='hlid') + endif if (tr_pond_topo) then ntrcr = ntrcr + 1 ! nt_ipnd = ntrcr ! refrozen pond ice lid thickness @@ -2813,7 +2857,7 @@ subroutine init_zbgc call icepack_init_zbgc( & !opt zbgc_init_frac_in=zbgc_init_frac, tau_ret_in=tau_ret, tau_rel_in=tau_rel, & !opt zbgc_frac_init_in=zbgc_frac_init, bgc_tracer_type_in=bgc_tracer_type) - ) + ) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & file=__FILE__, line=__LINE__) diff --git a/cicecore/drivers/unittest/opticep/ice_step_mod.F90 b/cicecore/drivers/unittest/opticep/ice_step_mod.F90 index 69f49a6f5..6d8fff7f9 100644 --- a/cicecore/drivers/unittest/opticep/ice_step_mod.F90 +++ b/cicecore/drivers/unittest/opticep/ice_step_mod.F90 @@ -60,7 +60,10 @@ subroutine save_init ! saves initial values for aice, aicen, vicen, vsnon use ice_state, only: aice, aicen, aice_init, aicen_init, & - vicen, vicen_init, vsnon, vsnon_init + vicen, vicen_init, vsnon, vsnon_init, trcrn, Tsfcn_init + + integer (kind=int_kind) :: & + nt_Tsfc ! Tsfc index in trcrn character(len=*), parameter :: subname = '(save_init)' @@ -70,10 +73,13 @@ subroutine save_init ! Save the initial ice area and volume in each category. !----------------------------------------------------------------- + call icepack_query_tracer_indices(nt_Tsfc_out=nt_Tsfc) + aice_init = aice aicen_init = aicen vicen_init = vicen vsnon_init = vsnon + Tsfcn_init = trcrn(:,:,nt_Tsfc,:,:) end subroutine save_init @@ -222,7 +228,8 @@ subroutine step_therm1 (dt, iblk) Cdn_atm, Cdn_atm_skin, Cdn_atm_floe, Cdn_atm_rdg, Cdn_atm_pond, & hfreebd, hdraft, hridge, distrdg, hkeel, dkeel, lfloe, dfloe, & fswsfcn, fswintn, Sswabsn, Iswabsn, meltsliqn, meltsliq, & - fswthrun, fswthrun_vdr, fswthrun_vdf, fswthrun_idr, fswthrun_idf + fswthrun, fswthrun_vdr, fswthrun_vdf, fswthrun_idr, fswthrun_idf, & + fswthrun_uvrdr, fswthrun_uvrdf, fswthrun_pardr, fswthrun_pardf use ice_calendar, only: yday use ice_domain_size, only: ncat, nilyr, nslyr, n_iso, n_aero, nfsd use ice_flux, only: frzmlt, sst, Tf, strocnxT_iavg, strocnyT_iavg, rsiden, fbot, Tbot, Tsnice, & @@ -232,12 +239,16 @@ subroutine step_therm1 (dt, iblk) frain, Tair, strairxT, strairyT, fsurf, fcondtop, fsens, & flat, fswabs, flwout, evap, evaps, evapi, Tref, Qref, Uref, fresh, fsalt, fhocn, & fswthru, fswthru_vdr, fswthru_vdf, fswthru_idr, fswthru_idf, & + fswthru_uvrdr, fswthru_uvrdf, fswthru_pardr, fswthru_pardf, & meltt, melts, meltb, congel, snoice, & flatn_f, fsensn_f, fsurfn_f, fcondtopn_f, & + dfsurfndTsfc_f, dflatndTsfc_f, & send_i2x_per_cat, fswthrun_ai, dsnow + use ice_flux, only: dpnd_flush, dpnd_expon, dpnd_freebd, dpnd_initial, & + dpnd_dlid, dpnd_flushn, dpnd_exponn, dpnd_freebdn, dpnd_initialn, dpnd_dlidn use ice_flux_bgc, only: dsnown, faero_atm, faero_ocn, fiso_atm, fiso_ocn, & Qa_iso, Qref_iso, fiso_evap, HDO_ocn, H2_16O_ocn, H2_18O_ocn - use ice_grid, only: lmask_n, lmask_s, tmask + use ice_grid, only: lmask_n, lmask_s, tmask, opmask use ice_state, only: aice, aicen, aicen_init, vicen_init, & vice, vicen, vsno, vsnon, trcrn, vsnon_init #ifdef CICE_IN_NEMO @@ -273,8 +284,7 @@ subroutine step_therm1 (dt, iblk) nt_isosno, nt_isoice, nt_rsnw, nt_smice, nt_smliq logical (kind=log_kind) :: & - tr_iage, tr_FY, tr_iso, tr_aero, tr_pond, & - tr_pond_lvl, tr_pond_topo, calc_Tsfc, snwgrain + tr_iage, tr_FY, tr_iso, tr_aero, calc_Tsfc, snwgrain real (kind=dbl_kind) :: & puny ! a very small number @@ -299,8 +309,7 @@ subroutine step_therm1 (dt, iblk) call icepack_query_tracer_sizes(ntrcr_out=ntrcr) call icepack_query_tracer_flags( & tr_iage_out=tr_iage, tr_FY_out=tr_FY, tr_iso_out=tr_iso, & - tr_aero_out=tr_aero, tr_pond_out=tr_pond, & - tr_pond_lvl_out=tr_pond_lvl, tr_pond_topo_out=tr_pond_topo) + tr_aero_out=tr_aero ) call icepack_query_tracer_indices( & nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd, nt_ipnd_out=nt_ipnd, & nt_alvl_out=nt_alvl, nt_vlvl_out=nt_vlvl, nt_Tsfc_out=nt_Tsfc, & @@ -387,7 +396,7 @@ subroutine step_therm1 (dt, iblk) enddo endif ! tr_aero - if (tmask(i,j,iblk)) then + if (tmask(i,j,iblk) .or. opmask(i,j,iblk)) then call icepack_step_therm1(dt=dt, & aicen_init = aicen_init (i,j,:,iblk), & @@ -484,6 +493,10 @@ subroutine step_therm1 (dt, iblk) !opt fswthrun_vdf = fswthrun_vdf (i,j,:,iblk),& !opt fswthrun_idr = fswthrun_idr (i,j,:,iblk),& !opt fswthrun_idf = fswthrun_idf (i,j,:,iblk),& +!opt fswthrun_uvrdr = fswthrun_uvrdr (i,j,:,iblk),& +!opt fswthrun_uvrdf = fswthrun_uvrdf (i,j,:,iblk),& +!opt fswthrun_pardr = fswthrun_pardr (i,j,:,iblk),& +!opt fswthrun_pardf = fswthrun_pardf (i,j,:,iblk),& fswabs = fswabs (i,j, iblk), & flwout = flwout (i,j, iblk), & Sswabsn = Sswabsn (i,j,:,:,iblk), & @@ -504,10 +517,16 @@ subroutine step_therm1 (dt, iblk) !opt fswthru_vdf = fswthru_vdf (i,j, iblk), & !opt fswthru_idr = fswthru_idr (i,j, iblk), & !opt fswthru_idf = fswthru_idf (i,j, iblk), & +!opt fswthru_uvrdr = fswthru_uvrdr (i,j, iblk), & +!opt fswthru_uvrdf = fswthru_uvrdf (i,j, iblk), & +!opt fswthru_pardr = fswthru_pardr (i,j, iblk), & +!opt fswthru_pardf = fswthru_pardf (i,j, iblk), & flatn_f = flatn_f (i,j,:,iblk), & fsensn_f = fsensn_f (i,j,:,iblk), & fsurfn_f = fsurfn_f (i,j,:,iblk), & fcondtopn_f = fcondtopn_f (i,j,:,iblk), & +!opt dfsurfdT = dfsurfndTsfc_f(i,j,:,iblk), & +!opt dflatdT = dflatndTsfc_f (i,j,:,iblk), & faero_atm = faero_atm (i,j,1:n_aero,iblk), & faero_ocn = faero_ocn (i,j,1:n_aero,iblk), & !opt fiso_atm = fiso_atm (i,j,:,iblk), & @@ -536,8 +555,18 @@ subroutine step_therm1 (dt, iblk) lmask_s = lmask_s (i,j, iblk), & mlt_onset = mlt_onset (i,j, iblk), & frz_onset = frz_onset (i,j, iblk), & +!opt dpnd_flush = dpnd_flush (i,j, iblk), & +!opt dpnd_expon = dpnd_expon (i,j, iblk), & +!opt dpnd_freebd = dpnd_freebd (i,j, iblk), & +!opt dpnd_initial = dpnd_initial(i,j, iblk), & +!opt dpnd_dlid = dpnd_dlid (i,j, iblk), & +!opt dpnd_flushn = dpnd_flushn (i,j,:,iblk), & +!opt dpnd_exponn = dpnd_exponn (i,j,:,iblk), & +!opt dpnd_freebdn = dpnd_freebdn(i,j,:,iblk), & +!opt dpnd_initialn=dpnd_initialn(i,j,:,iblk), & +!opt dpnd_dlidn = dpnd_dlidn (i,j,:,iblk), & yday=yday) -!opt prescribed_ice=prescribed_ice) +!opt prescribed_ice=prescribed_ice) !----------------------------------------------------------------- ! handle per-category i2x fields, no merging @@ -618,10 +647,10 @@ subroutine step_therm2 (dt, iblk) use ice_domain_size, only: ncat, nilyr, nslyr, nblyr, nfsd use ice_flux, only: fresh, frain, fpond, frzmlt, frazil, frz_onset, & fsalt, Tf, sss, salinz, fhocn, rsiden, wlat, & - meltl, frazil_diag + meltl, frazil_diag, dpnd_melt use ice_flux_bgc, only: flux_bio, faero_ocn, & fiso_ocn, HDO_ocn, H2_16O_ocn, H2_18O_ocn - use ice_grid, only: tmask + use ice_grid, only: tmask, opmask use ice_state, only: aice, aicen, aice0, trcr_depend, & aicen_init, vicen_init, trcrn, vicen, vsnon, & trcr_base, n_trcr_strata, nt_strata @@ -673,7 +702,7 @@ subroutine step_therm2 (dt, iblk) do j = jlo, jhi do i = ilo, ihi - if (tmask(i,j,iblk)) then + if (tmask(i,j,iblk) .or. opmask(i,j,iblk)) then ! significant wave height for FSD if (tr_fsd) & @@ -717,15 +746,15 @@ subroutine step_therm2 (dt, iblk) !opt HDO_ocn = HDO_ocn (i,j, iblk), & !opt H2_16O_ocn = H2_16O_ocn(i,j, iblk), & !opt H2_18O_ocn = H2_18O_ocn(i,j, iblk), & -!opt nfsd = nfsd, & -!opt wave_sig_ht= wave_sig_ht(i,j,iblk), & -!opt wave_spectrum = wave_spectrum(i,j,:,iblk), & -!opt wavefreq = wavefreq(:), & -!opt dwavefreq = dwavefreq(:), & -!opt d_afsd_latg= d_afsd_latg(i,j,:,iblk),& -!opt d_afsd_newi= d_afsd_newi(i,j,:,iblk),& -!opt d_afsd_latm= d_afsd_latm(i,j,:,iblk),& -!opt d_afsd_weld= d_afsd_weld(i,j,:,iblk)) +!opt wave_sig_ht= wave_sig_ht(i,j, iblk), & +!opt wave_spectrum=wave_spectrum(i,j,:,iblk), & +!opt wavefreq = wavefreq (:), & +!opt dwavefreq = dwavefreq (:), & +!opt d_afsd_latg=d_afsd_latg(i,j,:,iblk), & +!opt d_afsd_newi=d_afsd_newi(i,j,:,iblk), & +!opt d_afsd_latm=d_afsd_latm(i,j,:,iblk), & +!opt d_afsd_weld=d_afsd_weld(i,j,:,iblk), & +!opt dpnd_melt = dpnd_melt( i,j, iblk)) ) endif ! tmask @@ -1034,7 +1063,7 @@ subroutine step_dyn_ridge (dt, ndtd, iblk) use ice_domain_size, only: ncat, nilyr, nslyr, n_aero, nblyr use ice_flux, only: & rdg_conv, rdg_shear, dardg1dt, dardg2dt, & - dvirdgdt, opening, fpond, fresh, fhocn, & + dvirdgdt, opening, fpond, fresh, fhocn, dpnd_ridge, & aparticn, krdgn, aredistn, vredistn, dardg1ndt, dardg2ndt, & dvirdgndt, araftn, vraftn, fsalt, Tf use ice_flux_bgc, only: flux_bio, faero_ocn, fiso_ocn @@ -1127,8 +1156,9 @@ subroutine step_dyn_ridge (dt, ndtd, iblk) fsalt = fsalt (i,j, iblk), & first_ice = first_ice(i,j,:,iblk), & flux_bio = flux_bio (i,j,1:nbtrcr,iblk), & - Tf = Tf(i,j,iblk)) - + Tf = Tf (i,j, iblk) & +!opt dpnd_ridge=dpnd_ridge(i,j,iblk)) + ) endif ! tmask enddo ! i @@ -1263,13 +1293,15 @@ subroutine step_radiation (dt, iblk) use ice_arrays_column, only: ffracn, dhsn, & fswsfcn, fswintn, fswpenln, Sswabsn, Iswabsn, & fswthrun, fswthrun_vdr, fswthrun_vdf, fswthrun_idr, fswthrun_idf, & + fswthrun_uvrdr, fswthrun_uvrdf, fswthrun_pardr, fswthrun_pardf, & albicen, albsnon, albpndn, & alvdrn, alidrn, alvdfn, alidfn, apeffn, trcrn_sw, snowfracn, & swgrid, igrid use ice_calendar, only: calendar_type, days_per_year, nextsw_cday, yday, msec use ice_domain_size, only: ncat, n_aero, nilyr, nslyr, n_zaero, n_algae, nblyr - use ice_flux, only: swvdr, swvdf, swidr, swidf, coszen, fsnow - use ice_grid, only: TLAT, TLON, tmask + use ice_flux, only: swvdr, swvdf, swidr, swidf, coszen, fsnow, & + swuvrdr, swuvrdf, swpardr, swpardf + use ice_grid, only: TLAT, TLON, tmask, opmask use ice_state, only: aicen, vicen, vsnon, trcrn use ice_timers, only: ice_timer_start, ice_timer_stop, timer_sw use ice_communicate, only: my_task @@ -1370,7 +1402,7 @@ subroutine step_radiation (dt, iblk) endif enddo - if (tmask(i,j,iblk)) then + if (tmask(i,j,iblk) .or. opmask(i,j,iblk)) then call icepack_step_radiation (dt=dt, & fbri=fbri(:), & @@ -1393,6 +1425,8 @@ subroutine step_radiation (dt, iblk) sec=msec, & swvdr =swvdr (i,j ,iblk), swvdf =swvdf (i,j ,iblk), & swidr =swidr (i,j ,iblk), swidf =swidf (i,j ,iblk), & + swuvrdr =swuvrdr (i,j ,iblk), swuvrdf =swuvrdf (i,j ,iblk), & + swpardr =swpardr (i,j ,iblk), swpardf =swpardf (i,j ,iblk), & coszen =coszen (i,j ,iblk), fsnow =fsnow (i,j ,iblk), & alvdrn =alvdrn (i,j,: ,iblk), alvdfn =alvdfn (i,j,: ,iblk), & alidrn =alidrn (i,j,: ,iblk), alidfn =alidfn (i,j,: ,iblk), & @@ -1402,7 +1436,11 @@ subroutine step_radiation (dt, iblk) !opt fswthrun_vdf =fswthrun_vdf (i,j,: ,iblk), & !opt fswthrun_idr =fswthrun_idr (i,j,: ,iblk), & !opt fswthrun_idf =fswthrun_idf (i,j,: ,iblk), & - fswpenln=fswpenln(i,j,:,:,iblk), & +!opt fswthrun_uvrdr =fswthrun_uvrdr (i,j,: ,iblk), & +!opt fswthrun_uvrdf =fswthrun_uvrdf (i,j,: ,iblk), & +!opt fswthrun_pardr =fswthrun_pardr (i,j,: ,iblk), & +!opt fswthrun_pardf =fswthrun_pardf (i,j,: ,iblk), & + fswpenln =fswpenln (i,j,:,:,iblk), & Sswabsn =Sswabsn (i,j,:,:,iblk), Iswabsn =Iswabsn (i,j,:,:,iblk), & albicen =albicen (i,j,: ,iblk), albsnon =albsnon (i,j,: ,iblk), & albpndn =albpndn (i,j,: ,iblk), apeffn =apeffn (i,j,: ,iblk), & diff --git a/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 b/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 index 9e212799e..66a5256e0 100644 --- a/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 +++ b/cicecore/drivers/unittest/sumchk/CICE_InitMod.F90 @@ -265,11 +265,12 @@ subroutine init_restart use ice_grid, only: tmask use ice_init, only: ice_ic use ice_init_column, only: init_age, init_FY, init_lvl, init_snowtracers, & - init_meltponds_lvl, init_meltponds_topo, & + init_meltponds_lvl, init_meltponds_sealvl, init_meltponds_topo, & init_isotope, init_aerosol, init_hbrine, init_bgc, init_fsd use ice_restart_column, only: restart_age, read_restart_age, & restart_FY, read_restart_FY, restart_lvl, read_restart_lvl, & restart_pond_lvl, read_restart_pond_lvl, & + restart_pond_sealvl, read_restart_pond_sealvl, & restart_pond_topo, read_restart_pond_topo, & restart_snow, read_restart_snow, & restart_fsd, read_restart_fsd, & @@ -286,7 +287,7 @@ subroutine init_restart i, j , & ! horizontal indices iblk ! block index logical(kind=log_kind) :: & - tr_iage, tr_FY, tr_lvl, tr_pond_lvl, & + tr_iage, tr_FY, tr_lvl, tr_pond_lvl, tr_pond_sealvl, & tr_pond_topo, tr_snow, tr_fsd, tr_iso, tr_aero, tr_brine, & skl_bgc, z_tracers integer(kind=int_kind) :: & @@ -307,6 +308,7 @@ subroutine init_restart z_tracers_out=z_tracers) call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, & tr_lvl_out=tr_lvl, tr_pond_lvl_out=tr_pond_lvl, & + tr_pond_sealvl_out = tr_pond_sealvl, & tr_pond_topo_out=tr_pond_topo, tr_aero_out=tr_aero, tr_brine_out=tr_brine, & tr_snow_out=tr_snow, tr_fsd_out=tr_fsd, tr_iso_out=tr_iso) call icepack_query_tracer_indices(nt_alvl_out=nt_alvl, nt_vlvl_out=nt_vlvl, & @@ -335,8 +337,7 @@ subroutine init_restart ! tracers ! ice age tracer if (tr_iage) then - if (trim(runtype) == 'continue') & - restart_age = .true. + if (trim(runtype) == 'continue') restart_age = .true. if (restart_age) then call read_restart_age else @@ -370,8 +371,7 @@ subroutine init_restart endif ! level-ice melt ponds if (tr_pond_lvl) then - if (trim(runtype) == 'continue') & - restart_pond_lvl = .true. + if (trim(runtype) == 'continue') restart_pond_lvl = .true. if (restart_pond_lvl) then call read_restart_pond_lvl else @@ -383,10 +383,23 @@ subroutine init_restart enddo ! iblk endif endif + ! sealvl melt ponds + if (tr_pond_sealvl) then + if (trim(runtype) == 'continue') restart_pond_sealvl = .true. + if (restart_pond_sealvl) then + call read_restart_pond_sealvl + else + do iblk = 1, nblocks + call init_meltponds_sealvl(trcrn(:,:,nt_apnd,:,iblk), & + trcrn(:,:,nt_hpnd,:,iblk), & + trcrn(:,:,nt_ipnd,:,iblk), & + dhsn(:,:,:,iblk)) + enddo ! iblk + endif + endif ! topographic melt ponds if (tr_pond_topo) then - if (trim(runtype) == 'continue') & - restart_pond_topo = .true. + if (trim(runtype) == 'continue') restart_pond_topo = .true. if (restart_pond_topo) then call read_restart_pond_topo else @@ -448,10 +461,8 @@ subroutine init_restart endif if (trim(runtype) == 'continue') then - if (tr_brine) & - restart_hbrine = .true. - if (skl_bgc .or. z_tracers) & - restart_bgc = .true. + if (tr_brine) restart_hbrine = .true. + if (skl_bgc .or. z_tracers) restart_bgc = .true. endif if (tr_brine .or. skl_bgc) then ! brine height tracer diff --git a/configuration/scripts/ice_in b/configuration/scripts/ice_in index a931e7c4d..776f9f966 100644 --- a/configuration/scripts/ice_in +++ b/configuration/scripts/ice_in @@ -656,10 +656,22 @@ f_apondn = 'x' f_apeffn = 'x' f_hpondn = 'x' + f_dpnd_flushn = 'x' + f_dpnd_exponn = 'x' + f_dpnd_freebdn = 'x' + f_dpnd_initialn= 'x' + f_dpnd_dlidn = 'x' f_apond = 'm' f_hpond = 'm' f_ipond = 'm' f_apeff = 'm' + f_dpnd_flush = 'x' + f_dpnd_expon = 'x' + f_dpnd_freebd = 'x' + f_dpnd_initial = 'x' + f_dpnd_dlid = 'x' + f_dpnd_melt = 'x' + f_dpnd_ridge = 'x' f_apond_ai = 'm' f_hpond_ai = 'm' f_ipond_ai = 'm' diff --git a/configuration/scripts/options/set_nml.histall b/configuration/scripts/options/set_nml.histall index 28d2a04af..2b9810bdd 100644 --- a/configuration/scripts/options/set_nml.histall +++ b/configuration/scripts/options/set_nml.histall @@ -160,10 +160,22 @@ f_apondn = 'md' f_apeffn = 'md' f_hpondn = 'md' + f_dpnd_flushn = 'md' + f_dpnd_exponn = 'md' + f_dpnd_freebdn = 'md' + f_dpnd_initialn= 'md' + f_dpnd_dlidn = 'md' f_apond = 'md' f_hpond = 'md' f_ipond = 'md' f_apeff = 'md' + f_dpnd_flush = 'md' + f_dpnd_expon = 'md' + f_dpnd_freebd = 'md' + f_dpnd_initial = 'md' + f_dpnd_dlid = 'md' + f_dpnd_melt = 'md' + f_dpnd_ridge = 'md' f_apond_ai = 'md' f_hpond_ai = 'md' f_ipond_ai = 'md' diff --git a/configuration/scripts/options/set_nml.pondsealvl b/configuration/scripts/options/set_nml.pondsealvl index 17c2511a8..b92be0b90 100644 --- a/configuration/scripts/options/set_nml.pondsealvl +++ b/configuration/scripts/options/set_nml.pondsealvl @@ -5,3 +5,26 @@ tr_pond_topo = .false. tr_pond_lvl = .false. tr_pond_sealvl = .true. tscale_pnd_drain = 0.5d0 +f_apondn = 'm' +f_apeffn = 'm' +f_hpondn = 'm' +f_dpnd_flushn = 'm' +f_dpnd_exponn = 'm' +f_dpnd_freebdn = 'm' +f_dpnd_initialn= 'm' +f_dpnd_dlidn = 'm' +f_apond = 'm' +f_hpond = 'm' +f_ipond = 'm' +f_apeff = 'm' +f_dpnd_flush = 'm' +f_dpnd_expon = 'm' +f_dpnd_freebd = 'm' +f_dpnd_initial = 'm' +f_dpnd_dlid = 'm' +f_dpnd_melt = 'm' +f_dpnd_ridge = 'm' +f_apond_ai = 'm' +f_hpond_ai = 'm' +f_ipond_ai = 'm' +f_apeff_ai = 'm' diff --git a/doc/source/cice_index.rst b/doc/source/cice_index.rst index 52da8649c..949ab80b6 100644 --- a/doc/source/cice_index.rst +++ b/doc/source/cice_index.rst @@ -56,6 +56,7 @@ section :ref:`tabnamelist`. "ANGLET", "ANGLE converted to T-cells", "radians" "aparticn", "participation function", "" "apeff_ai", "grid-cell-mean effective pond fraction", "" + "apnd_sl", "equilibrium pond fraction in sealvl ponds", "" "apondn", "area concentration of melt ponds", "" "arlx1i", "relaxation constant for dynamics (stress)", "" "araftn", "area fraction of rafted ice", "" @@ -629,6 +630,7 @@ section :ref:`tabnamelist`. "runtype", "type of initialization used", "" "**S**", "", "" "s11, s12, s22", "stress tensor components", "" + "saltflux_option", "form of coupled salt flux ", "" "saltmax", "max salinity, at ice base (:cite:`Bitz99`)", "3.2 ppt" "scale_factor", "scaling factor for shortwave radiation components", "" "seabed_stress", "if true, calculate seabed stress", "F" @@ -697,7 +699,6 @@ section :ref:`tabnamelist`. "Tf", "freezing temperature", "C" "Tffresh", "freezing temp of fresh ice", "273.15 K" "tfrz_option", "form of ocean freezing temperature", "" - "saltflux_option", "form of coupled salt flux ", "" "thinS", "minimum ice thickness for brine tracer", "" "timer_stats", "logical to turn on extra timer statistics", ".false." "timesecs", "total elapsed time in seconds", "s" @@ -722,6 +723,7 @@ section :ref:`tabnamelist`. "tr_iage", "if true, use ice age tracer", "" "tr_lvl", "if true, use level ice area and volume tracers", "" "tr_pond_lvl", "if true, use level-ice melt pond scheme", "" + "tr_pond_sealvl", "if true, use sea level melt pond scheme", "" "tr_pond_topo", "if true, use topo melt pond scheme", "" "trcr", "ice tracers", "" "trcr_depend", "tracer dependency on basic state variables", "" @@ -729,6 +731,7 @@ section :ref:`tabnamelist`. "trestore", "restoring time scale", "days" "tripole", "if true, block lies along tripole boundary", "" "tripoleT", "if true, tripole boundary is T-fold; if false, U-fold", "" + "tscale_pnd_drain", "mushy macroscopic drainage timescale", "days" "Tsf_errmax", "max allowed :math:`T_{\mathit sf}` error (thermodynamics)", "5.\ :math:`\times`\ 10\ :math:`^{-4}`\ deg" "Tsfc(n)", "temperature of ice/snow top surface (in category n)", "C" "Tsnz", "Internal snow temperature", "C" diff --git a/doc/source/science_guide/sg_tracers.rst b/doc/source/science_guide/sg_tracers.rst index 5935fe67e..31747d20c 100644 --- a/doc/source/science_guide/sg_tracers.rst +++ b/doc/source/science_guide/sg_tracers.rst @@ -78,7 +78,10 @@ is not in use. "tr_FY", "1", "aice", "nt_FY", " " "tr_lvl", "2", "aice", "nt_alvl", " " " ", " ", "vice", "nt_vlvl", " " - "tr_pond_lvl", "3", "aice", "nt_apnd", " " + "tr_pond_lvl", "3", "alvl", "nt_apnd", " " + " ", " ", "apnd", "nt_vpnd", " " + " ", " ", "apnd", "nt_ipnd", " " + "tr_pond_sealvl", "3", "aice", "nt_apnd", " " " ", " ", "apnd", "nt_vpnd", " " " ", " ", "apnd", "nt_ipnd", " " "tr_pond_topo", "3", "aice", "nt_apnd", " " diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index 4e0542ab9..2f705e64c 100644 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -418,8 +418,9 @@ tracer_nml "``tr_iage``", "logical", "ice age", "``.false.``" "``tr_iso``", "logical", "isotopes", "``.false.``" "``tr_lvl``", "logical", "level ice area and volume", "``.false.``" - "``tr_pond_lvl``", "logical", "level-ice melt ponds", "``.false.``" "``tr_pond_cesm``", " ", "DEPRECATED", " " + "``tr_pond_lvl``", "logical", "level-ice melt ponds", "``.false.``" + "``tr_pond_sealvl``", "logical", "sea-level melt ponds", "``.false.``" "``tr_pond_topo``", "logical", "topo melt ponds", "``.false.``" "``tr_snow``", "logical", "advanced snow physics", "``.false.``" "``restart_aero``", "logical", "restart tracer values from file", "``.false.``" @@ -429,6 +430,7 @@ tracer_nml "``restart_iso``", "logical", "restart tracer values from file", "``.false.``" "``restart_lvl``", "logical", "restart tracer values from file", "``.false.``" "``restart_pond_lvl``", "logical", "restart tracer values from file", "``.false.``" + "``restart_pond_sealvl``", "logical", "restart tracer values from file", "``.false.``" "``restart_pond_topo``", "logical", "restart tracer values from file", "``.false.``" "``restart_snow``", "logical", "restart snow tracer values from file", "``.false.``" "", "", "", "" @@ -463,6 +465,7 @@ thermo_nml "``phi_i_mushy``", ":math:`0<\phi_i < 1`", "solid fraction at lower boundary", "0.85" "``Rac_rapid_mode``", "real", "critical Rayleigh number", "10.0" "``Tliquidus_max``", "real", "maximum liquidus temperature of mush (C)", "0.0" + "``tscale_pnd_drain``", "real", "mushy macroscopic drainage timescale (days)", "10" "", "", "", "" @@ -598,6 +601,7 @@ ponds_nml :widths: 15, 15, 30, 15 "", "", "", "" + "``apnd_sl``", "real", "equilibrium pond fraction in sealvl ponds", "0.27" "``dpscale``", "real", "time scale for flushing in permeable ice", "1.0" "``frzpnd``", "``cesm``", "CESM pond refreezing forumulation", "``cesm``" "", "``hlid``", "Stefan refreezing with pond ice thickness", "" diff --git a/doc/source/user_guide/ug_implementation.rst b/doc/source/user_guide/ug_implementation.rst index 30e865feb..69c288ee8 100644 --- a/doc/source/user_guide/ug_implementation.rst +++ b/doc/source/user_guide/ug_implementation.rst @@ -1406,6 +1406,9 @@ It may also be helpful for debugging to increase the precision of the history fi output from 4 bytes to 8 bytes. This is changed through the ``history_precision`` namelist flag. +Note that the dpnd pond history fields have not yet been implemented for the topo +ponds scheme and are turned off in the code. + **************** Diagnostic files **************** diff --git a/doc/source/user_guide/ug_troubleshooting.rst b/doc/source/user_guide/ug_troubleshooting.rst index b5ed34bba..8686c5f47 100644 --- a/doc/source/user_guide/ug_troubleshooting.rst +++ b/doc/source/user_guide/ug_troubleshooting.rst @@ -245,12 +245,13 @@ With the addition of several alternative parameterizations for sea ice processes, a number of subprocesses now appear in multiple parts of the code with differing descriptions. For instance, sea ice porosity and permeability, along with associated flushing and flooding, are -calculated separately for mushy thermodynamics, topo and level-ice melt -ponds, and for the brine height tracer, each employing its own +calculated separately for mushy thermodynamics and various pond schemes, +and for the brine height tracer, each employing its own equations. Likewise, the BL99 and mushy thermodynamics compute freeboard and snow–ice formation differently, and the topo and level-ice melt pond schemes both allow fresh ice to grow atop melt ponds, using slightly -different formulations for Stefan freezing. These various process +different formulations for Stefan freezing. Mass calculations throughout +the code are inconsistent with respect to pond water. These various process parameterizations will be compared and their subprocess descriptions possibly unified in the future. diff --git a/icepack b/icepack index f61be9a1b..4469e2e87 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit f61be9a1bd3578f89d559f9a8901252367cca0d7 +Subproject commit 4469e2e878e952bf6669ffe4252507b9c0925a89