From 5b8d76fef4d76bdc379aa9f4fd7155d771801574 Mon Sep 17 00:00:00 2001 From: David Bailey Date: Tue, 20 Aug 2024 11:53:43 -0600 Subject: [PATCH 1/7] New wave fracture scheme --- cicecore/cicedyn/general/ice_flux.F90 | 6 +-- cicecore/cicedyn/general/ice_step_mod.F90 | 50 +++++++++++++++-------- icepack | 2 +- 3 files changed, 37 insertions(+), 21 deletions(-) diff --git a/cicecore/cicedyn/general/ice_flux.F90 b/cicecore/cicedyn/general/ice_flux.F90 index 4d19bb8b2..64f136364 100644 --- a/cicecore/cicedyn/general/ice_flux.F90 +++ b/cicecore/cicedyn/general/ice_flux.F90 @@ -328,6 +328,7 @@ module ice_flux real (kind=dbl_kind), & dimension (:,:,:,:), allocatable, public :: & + rsiden, & ! fraction of ice that melts laterally fsurfn, & ! category fsurf fcondtopn,& ! category fcondtop fcondbotn,& ! category fcondbot @@ -368,8 +369,6 @@ module ice_flux real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: & uatmT , & ! uatm on T grid (m/s) vatmT , & ! vatm on T grid (m/s) - rside , & ! fraction of ice that melts laterally - fside , & ! lateral heat flux (W/m^2) wlat , & ! lateral heat rate (m/s) fsw , & ! incoming shortwave radiation (W/m^2) coszen , & ! cosine solar zenith angle, < 0 for sun below horizon @@ -546,13 +545,12 @@ subroutine alloc_flux fsalt_da (nx_block,ny_block,max_blocks), & ! salt flux to ocean due to data assimilation(kg/m^2/s) uatmT (nx_block,ny_block,max_blocks), & ! uatm on T grid vatmT (nx_block,ny_block,max_blocks), & ! vatm on T grid - rside (nx_block,ny_block,max_blocks), & ! fraction of ice that melts laterally - fside (nx_block,ny_block,max_blocks), & ! lateral melt flux (W/m^2) wlat (nx_block,ny_block,max_blocks), & ! lateral melt rate (m/s) fsw (nx_block,ny_block,max_blocks), & ! incoming shortwave radiation (W/m^2) coszen (nx_block,ny_block,max_blocks), & ! cosine solar zenith angle, < 0 for sun below horizon rdg_conv (nx_block,ny_block,max_blocks), & ! convergence term for ridging (1/s) rdg_shear (nx_block,ny_block,max_blocks), & ! shear term for ridging (1/s) + rsiden (nx_block,ny_block,ncat,max_blocks), & ! fraction of ice that melts laterally dardg1ndt (nx_block,ny_block,ncat,max_blocks), & ! rate of area loss by ridging ice (1/s) dardg2ndt (nx_block,ny_block,ncat,max_blocks), & ! rate of area gain by new ridges (1/s) dvirdgndt (nx_block,ny_block,ncat,max_blocks), & ! rate of ice volume ridged (m/s) diff --git a/cicecore/cicedyn/general/ice_step_mod.F90 b/cicecore/cicedyn/general/ice_step_mod.F90 index 2726a6101..cc505b1fc 100644 --- a/cicecore/cicedyn/general/ice_step_mod.F90 +++ b/cicecore/cicedyn/general/ice_step_mod.F90 @@ -28,7 +28,7 @@ module ice_step_mod use icepack_intfc, only: icepack_step_therm2 use icepack_intfc, only: icepack_aggregate use icepack_intfc, only: icepack_step_ridge - use icepack_intfc, only: icepack_step_wavefracture + use icepack_intfc, only: icepack_step_wavefracture_alt, icepack_step_wavefracture use icepack_intfc, only: icepack_step_radiation use icepack_intfc, only: icepack_ocn_mixed_layer, icepack_atm_boundary use icepack_intfc, only: icepack_biogeochemistry, icepack_load_ocean_bio_array @@ -222,11 +222,12 @@ 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, & + floe_rad_c, floe_binwidth use ice_calendar, only: yday - use ice_domain_size, only: ncat, nilyr, nslyr, n_iso, n_aero - use ice_flux, only: frzmlt, sst, Tf, strocnxT_iavg, strocnyT_iavg, rside, fbot, Tbot, Tsnice, & - meltsn, melttn, meltbn, congeln, snoicen, uatmT, vatmT, fside, wlat, & + 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, & + meltsn, melttn, meltbn, congeln, snoicen, uatmT, vatmT, wlat, & wind, rhoa, potT, Qa, zlvl, zlvs, strax, stray, flatn, fsensn, fsurfn, fcondtopn, & flw, fsnow, fpond, sss, mlt_onset, frz_onset, fcondbotn, fcondbot, fsloss, & frain, Tair, strairxT, strairyT, fsurf, fcondtop, fsens, & @@ -239,7 +240,8 @@ subroutine step_therm1 (dt, iblk) 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_state, only: aice, aicen, aicen_init, vicen_init, & - vice, vicen, vsno, vsnon, trcrn, vsnon_init + vice, vicen, vsno, vsnon, trcrn, vsnon_init + #ifdef CICE_IN_NEMO use ice_state, only: aice_init #endif @@ -270,7 +272,7 @@ subroutine step_therm1 (dt, iblk) integer (kind=int_kind) :: & ntrcr, nt_apnd, nt_hpnd, nt_ipnd, nt_alvl, nt_vlvl, nt_Tsfc, & nt_iage, nt_FY, nt_qice, nt_sice, nt_aero, nt_qsno, & - nt_isosno, nt_isoice, nt_rsnw, nt_smice, nt_smliq + nt_isosno, nt_isoice, nt_rsnw, nt_smice, nt_smliq, nt_fsd logical (kind=log_kind) :: & tr_iage, tr_FY, tr_iso, tr_aero, tr_pond, & @@ -308,7 +310,7 @@ subroutine step_therm1 (dt, iblk) nt_qice_out=nt_qice, nt_sice_out=nt_sice, & nt_aero_out=nt_aero, nt_qsno_out=nt_qsno, & nt_rsnw_out=nt_rsnw, nt_smice_out=nt_smice, nt_smliq_out=nt_smliq, & - nt_isosno_out=nt_isosno, nt_isoice_out=nt_isoice) + nt_isosno_out=nt_isosno, nt_isoice_out=nt_isoice, nt_fsd_out=nt_fsd) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & file=__FILE__, line=__LINE__) @@ -465,8 +467,7 @@ subroutine step_therm1 (dt, iblk) Tbot = Tbot (i,j, iblk), & Tsnice = Tsnice (i,j, iblk), & frzmlt = frzmlt (i,j, iblk), & - rside = rside (i,j, iblk), & - fside = fside (i,j, iblk), & + rsiden = rsiden (i,j,:,iblk), & wlat = wlat (i,j, iblk), & fsnow = fsnow (i,j, iblk), & frain = frain (i,j, iblk), & @@ -537,7 +538,11 @@ 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), & - yday=yday, prescribed_ice=prescribed_ice) + yday=yday, prescribed_ice=prescribed_ice, & + afsdn = trcrn (i,j,nt_fsd:nt_fsd+nfsd-1,:,iblk), & + nfsd = nfsd, & + floe_rad_c = floe_rad_c(:), & + floe_binwidth = floe_binwidth(:) ) !----------------------------------------------------------------- ! handle per-category i2x fields, no merging @@ -617,7 +622,7 @@ subroutine step_therm2 (dt, iblk) use ice_calendar, only: yday 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, rside, fside, wlat, & + fsalt, Tf, sss, salinz, fhocn, rsiden, wlat, & meltl, frazil_diag use ice_flux_bgc, only: flux_bio, faero_ocn, & fiso_ocn, HDO_ocn, H2_16O_ocn, H2_18O_ocn @@ -697,9 +702,8 @@ subroutine step_therm2 (dt, iblk) Tf = Tf (i,j, iblk), & sss = sss (i,j, iblk), & salinz = salinz (i,j,:,iblk), & - rside = rside (i,j, iblk), & + rsiden = rsiden (i,j,:,iblk), & meltl = meltl (i,j, iblk), & - fside = fside (i,j, iblk), & wlat = wlat (i,j, iblk), & frzmlt = frzmlt (i,j, iblk), & frazil = frazil (i,j, iblk), & @@ -732,7 +736,7 @@ subroutine step_therm2 (dt, iblk) d_afsd_latm= d_afsd_latm(i,j,:,iblk),& d_afsd_weld= d_afsd_weld(i,j,:,iblk),& floe_rad_c = floe_rad_c(:), & - floe_binwidth = floe_binwidth(:)) + floe_binwidth = floe_binwidth(:) ) endif ! tmask enddo ! i @@ -914,7 +918,20 @@ subroutine step_dyn_wave (dt) do j = jlo, jhi do i = ilo, ihi d_afsd_wave(i,j,:,iblk) = c0 - call icepack_step_wavefracture (wave_spec_type, & + + if (wave_spec_type.eq.'alt') then + call icepack_step_wavefracture_alt (wave_spec_type, & + dt, ncat, nfsd, nfreq, & + aice (i,j, iblk), & + vice (i,j, iblk), & + aicen (i,j,:, iblk), & + floe_rad_l(:), floe_rad_c(:), & + wave_spectrum (i,j,:, iblk), & + wavefreq(:), dwavefreq(:), & + trcrn (i,j,:,:,iblk), & + d_afsd_wave (i,j,:, iblk)) + else + call icepack_step_wavefracture (wave_spec_type, & dt, ncat, nfsd, nfreq, & aice (i,j, iblk), & vice (i,j, iblk), & @@ -924,6 +941,7 @@ subroutine step_dyn_wave (dt) wavefreq(:), dwavefreq(:), & trcrn (i,j,:,:,iblk), & d_afsd_wave (i,j,:, iblk)) + end if end do ! i end do ! j end do ! iblk diff --git a/icepack b/icepack index 4c8709525..d1da722c4 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit 4c87095256c1c599c3ccaa857a95744158751a60 +Subproject commit d1da722c4786238b5ad7f826fdffc5f9037c5b02 From 5b7c850d9af19547023e247bf5001f099fcb2b7c Mon Sep 17 00:00:00 2001 From: David Bailey Date: Tue, 20 Aug 2024 13:19:47 -0600 Subject: [PATCH 2/7] Start CESM3 CICE branch --- .../cicedyn/analysis/ice_history_pond.F90 | 152 +++++++++++++++++- .../cicedyn/dynamics/ice_transport_driver.F90 | 6 +- cicecore/cicedyn/general/ice_flux.F90 | 59 ++++++- cicecore/cicedyn/general/ice_init.F90 | 44 +++-- cicecore/cicedyn/general/ice_step_mod.F90 | 89 ++++++---- .../io/io_netcdf/ice_restart.F90 | 7 +- .../infrastructure/io/io_pio2/ice_restart.F90 | 7 +- cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 | 22 ++- cicecore/drivers/nuopc/cmeps/CICE_RunMod.F90 | 7 +- cicecore/shared/ice_init_column.F90 | 30 +++- cicecore/shared/ice_restart_column.F90 | 91 +++++++++++ 11 files changed, 447 insertions(+), 67 deletions(-) diff --git a/cicecore/cicedyn/analysis/ice_history_pond.F90 b/cicecore/cicedyn/analysis/ice_history_pond.F90 index 976a87d40..626958ea1 100644 --- a/cicecore/cicedyn/analysis/ice_history_pond.F90 +++ b/cicecore/cicedyn/analysis/ice_history_pond.F90 @@ -31,6 +31,13 @@ module ice_history_pond 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' !--------------------------------------------------------------- @@ -43,6 +50,13 @@ 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 !--------------------------------------------------------------- @@ -55,6 +69,13 @@ 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 !======================================================================= @@ -133,6 +154,18 @@ subroutine init_hist_pond_2D 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' @@ -151,6 +184,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) if (tr_pond) then @@ -206,6 +251,48 @@ 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, & + "pond flushing rate due to ice permeability", & + "none", c1, c0, & + ns, f_flpnd) + + if (f_expnd(1:1) /= 'x') & + call define_hist_field(n_expnd,"expnd","m/s",tstr2D, tcstr, & + "exponential pond drainage rate", & + "none", c1, c0, & + ns, f_expnd) + + if (f_frpnd(1:1) /= 'x') & + call define_hist_field(n_frpnd,"frpnd","m/s",tstr2D, tcstr, & + "pond drainage rate due to freeboard constraint", & + "none", c1, c0, & + ns, f_frpnd) + + if (f_rfpnd(1:1) /= 'x') & + call define_hist_field(n_rfpnd,"rfpnd","m/s",tstr2D, tcstr, & + "runoff rate due to rfrac", & + "none", c1, c0, & + ns, f_rfpnd) + + if (f_ilpnd(1:1) /= 'x') & + call define_hist_field(n_ilpnd,"ilpnd","m/s",tstr2D, tcstr, & + "pond loss gain to ice lid freezing / melting", & + "none", c1, c0, & + ns, f_ilpnd) + + if (f_mipnd(1:1) /= 'x') & + call define_hist_field(n_mipnd,"mipnd","m/s",tstr2D, tcstr, & + "pond drainage due to ice melting", & + "none", c1, c0, & + ns, f_mipnd) + + if (f_rdpnd(1:1) /= 'x') & + call define_hist_field(n_rdpnd,"rdpnd","m",tstr2D, tcstr, & + "pond drainage due to ridging", & + "none", c1, c0, & + ns, f_rdpnd) + endif ! histfreq(ns) /= 'x' enddo ! nstreams @@ -251,6 +338,36 @@ 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, & + "category pond flushing rate due to ice permeability", & + "none", c1, c0, & + ns, f_flpndn) + + if (f_expndn(1:1) /= 'x') & + call define_hist_field(n_expndn,"expndn","m/s",tstr3Dc, tcstr, & + "category exponential pond drainage rate", & + "none", c1, c0, & + ns, f_expndn) + + if (f_frpndn(1:1) /= 'x') & + call define_hist_field(n_frpndn,"frpndn","m/s",tstr3Dc, tcstr, & + "category pond drainage rate due to freeboard constraint", & + "none", c1, c0, & + ns, f_frpndn) + + if (f_rfpndn(1:1) /= 'x') & + call define_hist_field(n_rfpndn,"rfpndn","m/s",tstr3Dc, tcstr, & + "category runoff rate due to rfrac", & + "none", c1, c0, & + ns, f_rfpndn) + + if (f_ilpndn(1:1) /= 'x') & + call define_hist_field(n_ilpndn,"ilpndn","m/s",tstr3Dc, tcstr, & + "category pond loss gain to ice lid freezing / melting", & + "none", c1, c0, & + ns, f_ilpndn) + endif ! histfreq(ns) /= 'x' enddo ! ns @@ -268,6 +385,8 @@ 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_history_shared, only: n2D, a2D, a3Dc, ncat_hist, & accum_hist_field use ice_state, only: aice, trcr, trcrn @@ -287,7 +406,7 @@ subroutine accum_hist_pond (iblk) integer (kind=int_kind) :: & nt_apnd, nt_hpnd, nt_alvl, nt_ipnd logical (kind=log_kind) :: & - tr_pond_lvl, tr_pond_topo + tr_pond_lvl, tr_pond_sealvl, tr_pond_topo real (kind=dbl_kind) :: & puny @@ -303,7 +422,7 @@ subroutine accum_hist_pond (iblk) call icepack_query_parameters(puny_out=puny) call icepack_query_tracer_flags(tr_pond_lvl_out=tr_pond_lvl, & - tr_pond_topo_out=tr_pond_topo) + tr_pond_topo_out=tr_pond_topo, tr_pond_sealvl_out=tr_pond_sealvl) call icepack_query_tracer_indices(nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd, & nt_alvl_out=nt_alvl, nt_ipnd_out=nt_ipnd) call icepack_warnings_flush(nu_diag) @@ -340,7 +459,7 @@ subroutine accum_hist_pond (iblk) * trcr(:,:,nt_alvl,iblk) * trcr(:,:,nt_apnd,iblk) & * trcr(:,:,nt_ipnd,iblk), a2D) - elseif (tr_pond_topo) then + elseif (tr_pond_topo .or. tr_pond_sealvl) then if (f_apond(1:1)/= 'x') & call accum_hist_field(n_apond, iblk, & @@ -385,6 +504,21 @@ 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) + endif ! allocated(a2D) ! 3D category fields @@ -399,6 +533,18 @@ subroutine accum_hist_pond (iblk) call accum_hist_field(n_hpondn-n2D, iblk, ncat_hist, & 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) + endif ! allocated(a3Dc) end subroutine accum_hist_pond diff --git a/cicecore/cicedyn/dynamics/ice_transport_driver.F90 b/cicecore/cicedyn/dynamics/ice_transport_driver.F90 index fca964593..1957a7332 100644 --- a/cicecore/cicedyn/dynamics/ice_transport_driver.F90 +++ b/cicecore/cicedyn/dynamics/ice_transport_driver.F90 @@ -1528,7 +1528,7 @@ subroutine state_to_work (nx_block, ny_block, & nt_alvl, nt_apnd, nt_fbri logical (kind=log_kind) :: & - tr_pond_lvl, tr_pond_topo + tr_pond_lvl, tr_pond_topo, tr_pond_sealvl integer (kind=int_kind) :: & i, j, n, it, & ! counting indices @@ -1537,7 +1537,7 @@ subroutine state_to_work (nx_block, ny_block, & character(len=*), parameter :: subname = '(state_to_work)' call icepack_query_tracer_flags(tr_pond_lvl_out=tr_pond_lvl, & - tr_pond_topo_out=tr_pond_topo) + tr_pond_topo_out=tr_pond_topo, tr_pond_sealvl_out=tr_pond_sealvl) call icepack_query_tracer_indices(nt_alvl_out=nt_alvl, nt_apnd_out=nt_apnd, & nt_fbri_out=nt_fbri) call icepack_warnings_flush(nu_diag) @@ -1597,7 +1597,7 @@ subroutine state_to_work (nx_block, ny_block, & enddo enddo elseif (trcr_depend(it) == 2+nt_apnd .and. & - tr_pond_topo) then + (tr_pond_topo .or. tr_pond_sealvl)) then do j = 1, ny_block do i = 1, nx_block works(i,j,narrays+it) = aicen(i,j ,n) & diff --git a/cicecore/cicedyn/general/ice_flux.F90 b/cicecore/cicedyn/general/ice_flux.F90 index 64f136364..bcf369c69 100644 --- a/cicecore/cicedyn/general/ice_flux.F90 +++ b/cicecore/cicedyn/general/ice_flux.F90 @@ -326,6 +326,22 @@ module ice_flux frz_onset, &! day of year that freezing begins (congel or frazil) 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) + + 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) + real (kind=dbl_kind), & dimension (:,:,:,:), allocatable, public :: & rsiden, & ! fraction of ice that melts laterally @@ -391,8 +407,12 @@ 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), & ! @@ -619,6 +639,24 @@ subroutine alloc_flux stat=ierr) if (ierr/=0) call abort_ice('(alloc_flux): Out of memory') + if (tr_pond) & + 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) + stat=ierr) + + if (ierr/=0) call abort_ice('(alloc_flux): Out of memory') + end subroutine alloc_flux !======================================================================= @@ -929,6 +967,7 @@ subroutine init_history_therm logical (kind=log_kind) :: & formdrag, & + tr_pond, & tr_iage integer (kind=int_kind) :: & @@ -944,6 +983,7 @@ subroutine init_history_therm call icepack_query_parameters(formdrag_out=formdrag) call icepack_query_tracer_flags(tr_iage_out=tr_iage) + call icepack_query_tracer_flags(tr_pond_out=tr_pond) call icepack_query_tracer_indices(nt_iage_out=nt_iage) call icepack_query_parameters( dragio_out=dragio, & vonkar_out=vonkar, zref_out=zref, iceruf_out=iceruf) @@ -989,6 +1029,22 @@ subroutine init_history_therm snowfrac (:,:,:) = c0 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 + ! drag coefficients are computed prior to the atmo_boundary call, ! during the thermodynamics section Cdn_ocn(:,:,:) = dragio @@ -1025,7 +1081,7 @@ end subroutine init_history_therm subroutine init_history_dyn - use ice_state, only: aice, vice, vsno, trcr, strength, divu, shear, vort + use ice_state, only: aice, vice, vsno, trcr, strength, divu, shear use ice_grid, only: grid_ice logical (kind=log_kind) :: & @@ -1046,7 +1102,6 @@ subroutine init_history_dyn sig2 (:,:,:) = c0 divu (:,:,:) = c0 shear (:,:,:) = c0 - vort (:,:,:) = c0 taubxU (:,:,:) = c0 taubyU (:,:,:) = c0 strength (:,:,:) = c0 diff --git a/cicecore/cicedyn/general/ice_init.F90 b/cicecore/cicedyn/general/ice_init.F90 index 0796efd2d..8f8b0c00e 100644 --- a/cicecore/cicedyn/general/ice_init.F90 +++ b/cicecore/cicedyn/general/ice_init.F90 @@ -26,7 +26,7 @@ module ice_init use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_aggregate use icepack_intfc, only: icepack_init_trcr - use icepack_intfc, only: icepack_init_parameters + use icepack_intfc, only: icepack_init_parameters, icepack_write_parameters use icepack_intfc, only: icepack_init_tracer_flags use icepack_intfc, only: icepack_init_tracer_sizes use icepack_intfc, only: icepack_query_tracer_flags @@ -78,8 +78,8 @@ subroutine input_data use ice_arrays_column, only: oceanmixed_ice use ice_restart_column, only: & restart_age, restart_FY, restart_lvl, & - restart_pond_lvl, restart_pond_topo, restart_aero, & - restart_fsd, restart_iso, restart_snow + restart_pond_lvl, restart_pond_topo, restart_pond_sealvl, & + restart_aero, restart_fsd, restart_iso, restart_snow use ice_restart_shared, only: & restart, restart_ext, restart_coszen, use_restart_time, & runtype, restart_file, restart_dir, runid, pointer_file, & @@ -157,7 +157,7 @@ subroutine input_data phi_c_slow_mode, phi_i_mushy, kalg, atmiter_conv, Pstar, Cstar, & sw_frac, sw_dtemp, floediam, hfrazilmin, iceruf, iceruf_ocn, & rsnw_fall, rsnw_tmax, rhosnew, rhosmin, rhosmax, Tliquidus_max, & - windmin, drhosdwind, snwlvlfac + windmin, drhosdwind, snwlvlfac, tscale_pnd_drain integer (kind=int_kind) :: ktherm, kstrength, krdg_partic, krdg_redist, natmiter, & kitd, kcatbound, ktransport @@ -171,11 +171,11 @@ subroutine input_data logical (kind=log_kind) :: tr_iage, tr_FY, tr_lvl, tr_pond logical (kind=log_kind) :: tr_iso, tr_aero, tr_fsd, tr_snow - logical (kind=log_kind) :: tr_pond_lvl, tr_pond_topo + logical (kind=log_kind) :: tr_pond_lvl, tr_pond_topo, tr_pond_sealvl integer (kind=int_kind) :: numin, numax ! unit number limits logical (kind=log_kind) :: lcdf64 ! deprecated, backwards compatibility - integer (kind=int_kind) :: rplvl, rptopo + integer (kind=int_kind) :: rplvl, rptopo, rpsealvl real (kind=dbl_kind) :: Cf, ksno, puny, ice_ref_salinity, Tocnfrz character (len=char_len) :: abort_list @@ -225,12 +225,13 @@ subroutine input_data tr_FY, restart_FY, & tr_lvl, restart_lvl, & tr_pond_lvl, restart_pond_lvl, & + tr_pond_sealvl, restart_pond_sealvl, & tr_pond_topo, restart_pond_topo, & tr_snow, restart_snow, & 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/ & @@ -265,6 +266,7 @@ subroutine input_data namelist /ponds_nml/ & hs0, dpscale, frzpnd, & + tscale_pnd_drain, & rfracmin, rfracmax, pndaspect, hs1, & hp1 @@ -497,6 +499,7 @@ subroutine input_data rfracmin = 0.15_dbl_kind ! minimum retained fraction of meltwater rfracmax = 0.85_dbl_kind ! maximum retained fraction of meltwater pndaspect = 0.8_dbl_kind ! ratio of pond depth to area fraction + tscale_pnd_drain = 0.5 snwredist = 'none' ! type of snow redistribution snw_aging_table = 'test' ! snow aging lookup table snw_filename = 'unknown' ! snowtable filename @@ -581,6 +584,8 @@ subroutine input_data restart_lvl = .false. ! level ice restart tr_pond_lvl = .false. ! level-ice melt ponds restart_pond_lvl = .false. ! melt ponds restart + tr_pond_sealvl = .false. ! Sea level melt ponds + restart_pond_sealvl = .false. ! Sea level melt ponds restart tr_pond_topo = .false. ! explicit melt ponds (topographic) restart_pond_topo = .false. ! melt ponds restart tr_snow = .false. ! advanced snow physics @@ -1074,6 +1079,7 @@ subroutine input_data call broadcast_scalar(rfracmin, master_task) call broadcast_scalar(rfracmax, master_task) call broadcast_scalar(pndaspect, master_task) + call broadcast_scalar(tscale_pnd_drain, master_task) call broadcast_scalar(snwredist, master_task) call broadcast_scalar(snw_aging_table, master_task) call broadcast_scalar(snw_filename, master_task) @@ -1161,6 +1167,8 @@ subroutine input_data call broadcast_scalar(restart_lvl, master_task) call broadcast_scalar(tr_pond_lvl, master_task) call broadcast_scalar(restart_pond_lvl, master_task) + call broadcast_scalar(tr_pond_sealvl, master_task) + call broadcast_scalar(restart_pond_sealvl, master_task) call broadcast_scalar(tr_pond_topo, master_task) call broadcast_scalar(restart_pond_topo, master_task) call broadcast_scalar(tr_snow, master_task) @@ -1472,13 +1480,15 @@ subroutine input_data rplvl = 0 rptopo = 0 + rpsealvl = 0 if (tr_pond_lvl ) rplvl = 1 + if (tr_pond_sealvl ) rpsealvl = 1 if (tr_pond_topo) rptopo = 1 tr_pond = .false. ! explicit melt ponds - if (rplvl + rptopo > 0) tr_pond = .true. + if (rplvl + rptopo + rpsealvl > 0) tr_pond = .true. - if (rplvl + rptopo > 1) then + if (rplvl + rptopo + rpsealvl > 1) then if (my_task == master_task) then write(nu_diag,*) subname//' ERROR: Must use only one melt pond scheme' endif @@ -2402,6 +2412,8 @@ subroutine input_data elseif (tr_pond_topo) then write(nu_diag,1010) ' tr_pond_topo = ', tr_pond_topo,' : topo pond formulation' 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' elseif (trim(shortwave) == 'ccsm3') then write(nu_diag,*) 'Pond effects on radiation are treated implicitly in the ccsm3 shortwave scheme' else @@ -2498,6 +2510,7 @@ subroutine input_data if (tr_fsd) write(nu_diag,1010) ' tr_fsd = ', tr_fsd,' : floe size distribution' if (tr_lvl) write(nu_diag,1010) ' tr_lvl = ', tr_lvl,' : ridging related tracers' if (tr_pond_lvl) write(nu_diag,1010) ' tr_pond_lvl = ', tr_pond_lvl,' : level-ice pond formulation' + if (tr_pond_sealvl) write(nu_diag,1010) ' tr_pond_sealvl = ', tr_pond_sealvl,' : sea level pond formulation' if (tr_pond_topo) write(nu_diag,1010) ' tr_pond_topo = ', tr_pond_topo,' : topo pond formulation' if (tr_snow) write(nu_diag,1010) ' tr_snow = ', tr_snow,' : advanced snow physics' if (tr_iage) write(nu_diag,1010) ' tr_iage = ', tr_iage,' : chronological ice age' @@ -2639,6 +2652,7 @@ subroutine input_data write(nu_diag,1011) ' restart_FY = ', restart_FY write(nu_diag,1011) ' restart_lvl = ', restart_lvl write(nu_diag,1011) ' restart_pond_lvl = ', restart_pond_lvl + write(nu_diag,1011) ' restart_pond_sealvl = ', restart_pond_sealvl write(nu_diag,1011) ' restart_pond_topo= ', restart_pond_topo write(nu_diag,1011) ' restart_snow = ', restart_snow write(nu_diag,1011) ' restart_iso = ', restart_iso @@ -2734,11 +2748,12 @@ subroutine input_data rsnw_fall_in=rsnw_fall, rsnw_tmax_in=rsnw_tmax, rhosnew_in=rhosnew, & snwlvlfac_in=snwlvlfac, rhosmin_in=rhosmin, rhosmax_in=rhosmax, & snwredist_in=snwredist, snwgrain_in=snwgrain, snw_aging_table_in=trim(snw_aging_table), & - sw_redist_in=sw_redist, sw_frac_in=sw_frac, sw_dtemp_in=sw_dtemp) + sw_redist_in=sw_redist, sw_frac_in=sw_frac, sw_dtemp_in=sw_dtemp, & + tscale_pnd_drain_in=tscale_pnd_drain) call icepack_init_tracer_flags(tr_iage_in=tr_iage, tr_FY_in=tr_FY, & tr_lvl_in=tr_lvl, tr_iso_in=tr_iso, tr_aero_in=tr_aero, & tr_fsd_in=tr_fsd, tr_snow_in=tr_snow, tr_pond_in=tr_pond, & - tr_pond_lvl_in=tr_pond_lvl, tr_pond_topo_in=tr_pond_topo) + tr_pond_lvl_in=tr_pond_lvl, tr_pond_sealvl_in=tr_pond_sealvl, tr_pond_topo_in=tr_pond_topo) call icepack_init_tracer_sizes(ncat_in=ncat, nilyr_in=nilyr, nslyr_in=nslyr, nblyr_in=nblyr, & nfsd_in=nfsd, n_algae_in=n_algae, n_iso_in=n_iso, n_aero_in=n_aero, & n_DOC_in=n_DOC, n_DON_in=n_DON, & @@ -2799,7 +2814,7 @@ subroutine init_state integer (kind=int_kind) :: ntrcr logical (kind=log_kind) :: tr_iage, tr_FY, tr_lvl, tr_iso, tr_aero - logical (kind=log_kind) :: tr_pond_lvl, tr_pond_topo + logical (kind=log_kind) :: tr_pond_lvl, tr_pond_topo, tr_pond_sealvl logical (kind=log_kind) :: tr_snow, tr_fsd 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 @@ -2817,6 +2832,7 @@ subroutine init_state call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, & tr_lvl_out=tr_lvl, tr_iso_out=tr_iso, tr_aero_out=tr_aero, & tr_pond_lvl_out=tr_pond_lvl, tr_pond_topo_out=tr_pond_topo, & + tr_pond_sealvl_out=tr_pond_sealvl, & tr_snow_out=tr_snow, tr_fsd_out=tr_fsd) call icepack_query_tracer_indices(nt_Tsfc_out=nt_Tsfc, nt_sice_out=nt_sice, & nt_qice_out=nt_qice, nt_qsno_out=nt_qsno, nt_iage_out=nt_iage, nt_fy_out=nt_fy, & @@ -2873,7 +2889,7 @@ subroutine init_state trcr_depend(nt_hpnd) = 2+nt_apnd ! melt pond depth trcr_depend(nt_ipnd) = 2+nt_apnd ! refrozen pond lid endif - if (tr_pond_topo) then + if (tr_pond_topo .or. tr_pond_sealvl) then trcr_depend(nt_apnd) = 0 ! melt pond area trcr_depend(nt_hpnd) = 2+nt_apnd ! melt pond depth trcr_depend(nt_ipnd) = 2+nt_apnd ! refrozen pond lid @@ -2939,7 +2955,7 @@ subroutine init_state nt_strata (nt_ipnd,2) = nt_apnd ! on melt pond area nt_strata (nt_ipnd,1) = nt_alvl ! on level ice area endif - if (tr_pond_topo) then + if (tr_pond_topo .or. tr_pond_sealvl) then n_trcr_strata(nt_hpnd) = 1 ! melt pond depth nt_strata (nt_hpnd,1) = nt_apnd ! on melt pond area n_trcr_strata(nt_ipnd) = 1 ! refrozen pond lid diff --git a/cicecore/cicedyn/general/ice_step_mod.F90 b/cicecore/cicedyn/general/ice_step_mod.F90 index cc505b1fc..5c8bd6efd 100644 --- a/cicecore/cicedyn/general/ice_step_mod.F90 +++ b/cicecore/cicedyn/general/ice_step_mod.F90 @@ -236,6 +236,8 @@ subroutine step_therm1 (dt, iblk) meltt, melts, meltb, congel, snoice, & flatn_f, fsensn_f, fsurfn_f, fcondtopn_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_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 @@ -265,6 +267,8 @@ subroutine step_therm1 (dt, iblk) #endif integer (kind=int_kind) :: & ilo,ihi,jlo,jhi, & ! beginning and end of physical domain + iglob(nx_block), & ! global indices + jglob(ny_block), & ! global indices i, j , & ! horizontal indices n , & ! thickness category index k, kk ! indices for aerosols @@ -275,8 +279,7 @@ subroutine step_therm1 (dt, iblk) nt_isosno, nt_isoice, nt_rsnw, nt_smice, nt_smliq, nt_fsd 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 @@ -301,8 +304,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, & @@ -353,6 +355,8 @@ subroutine step_therm1 (dt, iblk) ihi = this_block%ihi jlo = this_block%jlo jhi = this_block%jhi + iglob = this_block%i_glob + jglob = this_block%j_glob do j = jlo, jhi do i = ilo, ihi @@ -538,11 +542,21 @@ 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), & - yday=yday, prescribed_ice=prescribed_ice, & afsdn = trcrn (i,j,nt_fsd:nt_fsd+nfsd-1,:,iblk), & nfsd = nfsd, & floe_rad_c = floe_rad_c(:), & floe_binwidth = floe_binwidth(:) ) + 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), & + yday=yday, prescribed_ice=prescribed_ice) !----------------------------------------------------------------- ! handle per-category i2x fields, no merging @@ -623,7 +637,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 + meltl, frazil_diag,mipnd use ice_flux_bgc, only: flux_bio, faero_ocn, & fiso_ocn, HDO_ocn, H2_16O_ocn, H2_18O_ocn use ice_grid, only: tmask @@ -736,7 +750,8 @@ subroutine step_therm2 (dt, iblk) d_afsd_latm= d_afsd_latm(i,j,:,iblk),& d_afsd_weld= d_afsd_weld(i,j,:,iblk),& floe_rad_c = floe_rad_c(:), & - floe_binwidth = floe_binwidth(:) ) + floe_binwidth = floe_binwidth(:), & + mipnd = mipnd(i,j, iblk)) endif ! tmask enddo ! i @@ -832,26 +847,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 (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) + 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) enddo ! i enddo ! j @@ -1058,9 +1073,10 @@ 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, & + dvirdgdt, opening, fpond, fresh, fhocn, rdpnd, & aparticn, krdgn, aredistn, vredistn, dardg1ndt, dardg2ndt, & dvirdgndt, araftn, vraftn, fsalt, Tf use ice_flux_bgc, only: flux_bio, faero_ocn, fiso_ocn @@ -1085,7 +1101,9 @@ subroutine step_dyn_ridge (dt, ndtd, iblk) integer (kind=int_kind) :: & ilo,ihi,jlo,jhi, & ! beginning and end of physical domain - i, j, & ! horizontal indices + iglob(nx_block), & ! global indices + jglob(ny_block), & ! global indices + i, j, n, & ! horizontal indices ntrcr, & ! nbtrcr ! @@ -1108,6 +1126,8 @@ subroutine step_dyn_ridge (dt, ndtd, iblk) ihi = this_block%ihi jlo = this_block%jlo jhi = this_block%jhi + iglob = this_block%i_glob + jglob = this_block%j_glob do j = jlo, jhi do i = ilo, ihi @@ -1154,7 +1174,16 @@ 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), & + rdpnd = rdpnd(i,j,iblk)) + + if ((iglob(i) == 162 .and. jglob(j) == 387).or. & + (iglob(i) == 177 .and. jglob(j) == 442).or. & + (iglob(i) == 405 .and. jglob(j) == 465).or. & + (iglob(i) == 507 .and. jglob(j) == 122)) then + print *,"TLAT,TLON",TLAT(i,j,iblk),TLON(i,j,iblk) + print *,'rdpnd',rdpnd(i,j,iblk) + endif endif ! tmask diff --git a/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 b/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 index 9bf3b1d8a..617558c2c 100644 --- a/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 +++ b/cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90 @@ -154,7 +154,7 @@ subroutine init_restart_write(filename_spec) logical (kind=log_kind) :: & skl_bgc, z_tracers, tr_fsd, & tr_iage, tr_FY, tr_lvl, tr_iso, tr_aero, & - tr_pond_topo, tr_pond_lvl, tr_brine, tr_snow, & + tr_pond_topo, tr_pond_lvl, tr_pond_sealvl, tr_brine, tr_snow, & tr_bgc_N, tr_bgc_C, tr_bgc_Nit, & tr_bgc_Sil, tr_bgc_DMS, & tr_bgc_chl, tr_bgc_Am, & @@ -190,6 +190,7 @@ subroutine init_restart_write(filename_spec) tr_iage_out=tr_iage, tr_FY_out=tr_FY, tr_lvl_out=tr_lvl, tr_fsd_out=tr_fsd, & tr_iso_out=tr_iso, tr_aero_out=tr_aero, & tr_pond_topo_out=tr_pond_topo, tr_pond_lvl_out=tr_pond_lvl, & + tr_pond_sealvl_out=tr_pond_sealvl, & tr_snow_out=tr_snow, tr_brine_out=tr_brine, & tr_bgc_N_out=tr_bgc_N, tr_bgc_C_out=tr_bgc_C, tr_bgc_Nit_out=tr_bgc_Nit, & tr_bgc_Sil_out=tr_bgc_Sil, tr_bgc_DMS_out=tr_bgc_DMS, & @@ -357,7 +358,7 @@ subroutine init_restart_write(filename_spec) call define_rest_field(ncid,'a12_4',dims) endif - if (tr_pond_lvl) then + if (tr_pond_lvl .or. tr_pond_sealvl) then call define_rest_field(ncid,'fsnow',dims) endif @@ -449,7 +450,7 @@ subroutine init_restart_write(filename_spec) call define_rest_field(ncid,'ipnd',dims) end if - if (tr_pond_lvl) then + if (tr_pond_lvl .or. tr_pond_sealvl) then call define_rest_field(ncid,'apnd',dims) call define_rest_field(ncid,'hpnd',dims) call define_rest_field(ncid,'ipnd',dims) diff --git a/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 b/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 index b487c243d..3309f86d4 100644 --- a/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 +++ b/cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90 @@ -163,7 +163,7 @@ subroutine init_restart_write(filename_spec) logical (kind=log_kind) :: & tr_iage, tr_FY, tr_lvl, tr_iso, tr_aero, & - tr_pond_topo, tr_pond_lvl, tr_brine, tr_snow, & + tr_pond_topo, tr_pond_lvl, tr_pond_sealvl, tr_brine, tr_snow, & tr_bgc_N, tr_bgc_C, tr_bgc_Nit, & tr_bgc_Sil, tr_bgc_DMS, & tr_bgc_chl, tr_bgc_Am, & @@ -193,6 +193,7 @@ subroutine init_restart_write(filename_spec) tr_iage_out=tr_iage, tr_FY_out=tr_FY, tr_lvl_out=tr_lvl, & tr_iso_out=tr_iso, tr_aero_out=tr_aero, & tr_pond_topo_out=tr_pond_topo, tr_pond_lvl_out=tr_pond_lvl, & + tr_pond_sealvl_out=tr_pond_sealvl, & tr_snow_out=tr_snow, tr_brine_out=tr_brine, & tr_bgc_N_out=tr_bgc_N, tr_bgc_C_out=tr_bgc_C, tr_bgc_Nit_out=tr_bgc_Nit, & tr_bgc_Sil_out=tr_bgc_Sil, tr_bgc_DMS_out=tr_bgc_DMS, & @@ -333,7 +334,7 @@ subroutine init_restart_write(filename_spec) call define_rest_field(File,'a12_4',dims) endif - if (tr_pond_lvl) then + if (tr_pond_lvl .or. tr_pond_sealvl) then call define_rest_field(File,'fsnow',dims) endif @@ -425,7 +426,7 @@ subroutine init_restart_write(filename_spec) call define_rest_field(File,'ipnd',dims) end if - if (tr_pond_lvl) then + if (tr_pond_lvl .or. tr_pond_sealvl) then call define_rest_field(File,'apnd',dims) call define_rest_field(File,'hpnd',dims) call define_rest_field(File,'ipnd',dims) diff --git a/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 b/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 index b235ebf0e..28e24f769 100644 --- a/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 +++ b/cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90 @@ -222,11 +222,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_topo, init_meltponds_sealvl, & 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, & @@ -242,7 +243,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_fsd, tr_iso, tr_aero, tr_brine, tr_snow, & skl_bgc, z_tracers integer(kind=int_kind) :: & @@ -262,7 +263,7 @@ subroutine init_restart() call icepack_query_parameters(skl_bgc_out=skl_bgc, 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_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, & @@ -339,6 +340,21 @@ 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 ! .not. restart_pond + endif ! topographic melt ponds if (tr_pond_topo) then if (trim(runtype) == 'continue') & diff --git a/cicecore/drivers/nuopc/cmeps/CICE_RunMod.F90 b/cicecore/drivers/nuopc/cmeps/CICE_RunMod.F90 index c2cae81cb..d4a9ba075 100644 --- a/cicecore/drivers/nuopc/cmeps/CICE_RunMod.F90 +++ b/cicecore/drivers/nuopc/cmeps/CICE_RunMod.F90 @@ -124,7 +124,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 @@ -149,7 +149,7 @@ 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)' @@ -168,7 +168,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) @@ -376,6 +376,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/shared/ice_init_column.F90 b/cicecore/shared/ice_init_column.F90 index 22cd3184a..1e6e921aa 100644 --- a/cicecore/shared/ice_init_column.F90 +++ b/cicecore/shared/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 @@ -557,6 +557,26 @@ 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) @@ -1713,7 +1733,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 @@ -1797,7 +1817,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_lvl, & 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, & @@ -1856,6 +1876,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 diff --git a/cicecore/shared/ice_restart_column.F90 b/cicecore/shared/ice_restart_column.F90 index 2c5b18c36..6d1bf2017 100644 --- a/cicecore/shared/ice_restart_column.F90 +++ b/cicecore/shared/ice_restart_column.F90 @@ -30,6 +30,7 @@ module ice_restart_column write_restart_FY, read_restart_FY, & write_restart_lvl, read_restart_lvl, & write_restart_pond_lvl, read_restart_pond_lvl, & + write_restart_pond_sealvl, read_restart_pond_sealvl, & write_restart_pond_topo, read_restart_pond_topo, & write_restart_snow, read_restart_snow, & write_restart_fsd, read_restart_fsd, & @@ -43,6 +44,7 @@ module ice_restart_column restart_FY , & ! if .true., read FY tracer restart file restart_lvl , & ! if .true., read lvl tracer restart file restart_pond_lvl , & ! if .true., read meltponds restart file + restart_pond_sealvl , & ! if .true., read meltponds restart file restart_pond_topo, & ! if .true., read meltponds restart file restart_snow , & ! if .true., read snow tracer restart file restart_fsd , & ! if .true., read floe size restart file @@ -415,6 +417,95 @@ end subroutine read_restart_pond_topo !======================================================================= +! Dumps all values needed for restarting +! +! authors Elizabeth C. Hunke, LANL +! David A. Bailey, NCAR + + subroutine write_restart_pond_sealvl() + + use ice_arrays_column, only: dhsn, ffracn + use ice_fileunits, only: nu_dump_pond + use ice_flux, only: fsnow + use ice_state, only: trcrn + + ! local variables + + logical (kind=log_kind) :: diag + integer (kind=int_kind) :: nt_apnd, nt_hpnd, nt_ipnd + character(len=*),parameter :: subname='(write_restart_pond_sealvl)' + + call icepack_query_tracer_indices(nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd, & + nt_ipnd_out=nt_ipnd) + call icepack_warnings_flush(nu_diag) + if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & + file=__FILE__, line=__LINE__) + + diag = .true. + + call write_restart_field(nu_dump_pond,0,trcrn(:,:,nt_apnd,:,:),'ruf8', & + 'apnd',ncat,diag) + call write_restart_field(nu_dump_pond,0,trcrn(:,:,nt_hpnd,:,:),'ruf8', & + 'hpnd',ncat,diag) + call write_restart_field(nu_dump_pond,0,trcrn(:,:,nt_ipnd,:,:),'ruf8', & + 'ipnd',ncat,diag) + call write_restart_field(nu_dump_pond,0, fsnow(:,:, :),'ruf8', & + 'fsnow',1,diag) + call write_restart_field(nu_dump_pond,0, dhsn(:,:, :,:),'ruf8', & + 'dhs',ncat,diag) + call write_restart_field(nu_dump_pond,0,ffracn(:,:, :,:),'ruf8', & + 'ffrac',ncat,diag) + + end subroutine write_restart_pond_sealvl + +!======================================================================= + +! Reads all values needed for a meltpond volume restart +! +! authors Elizabeth C. Hunke, LANL +! David A. Bailey, NCAR + + subroutine read_restart_pond_sealvl() + + use ice_arrays_column, only: dhsn, ffracn + use ice_fileunits, only: nu_restart_pond + use ice_flux, only: fsnow + use ice_state, only: trcrn + + ! local variables + + logical (kind=log_kind) :: & + diag + integer (kind=int_kind) :: nt_apnd, nt_hpnd, nt_ipnd + character(len=*),parameter :: subname='(read_restart_pond_sealvl)' + + call icepack_query_tracer_indices(nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd, & + nt_ipnd_out=nt_ipnd) + call icepack_warnings_flush(nu_diag) + if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & + file=__FILE__, line=__LINE__) + + diag = .true. + + if (my_task == master_task) write(nu_diag,*) subname,'min/max sea level ponds' + + call read_restart_field(nu_restart_pond,0,trcrn(:,:,nt_apnd,:,:),'ruf8', & + 'apnd',ncat,diag,field_loc_center,field_type_scalar) + call read_restart_field(nu_restart_pond,0,trcrn(:,:,nt_hpnd,:,:),'ruf8', & + 'hpnd',ncat,diag,field_loc_center,field_type_scalar) + call read_restart_field(nu_restart_pond,0,trcrn(:,:,nt_ipnd,:,:),'ruf8', & + 'ipnd',ncat,diag,field_loc_center,field_type_scalar) + call read_restart_field(nu_restart_pond,0, fsnow(:,:, :),'ruf8', & + 'fsnow',1,diag,field_loc_center,field_type_scalar) + call read_restart_field(nu_restart_pond,0, dhsn(:,:, :,:),'ruf8', & + 'dhs',ncat,diag,field_loc_center,field_type_scalar) + call read_restart_field(nu_restart_pond,0,ffracn(:,:, :,:),'ruf8', & + 'ffrac',ncat,diag,field_loc_center,field_type_scalar) + + end subroutine read_restart_pond_sealvl + +!======================================================================= + ! Dumps all values needed for restarting snow redistribution/metamorphism ! author Elizabeth C. Hunke, LANL From 23393028a7da1ab4849b85ffde886eae97923b18 Mon Sep 17 00:00:00 2001 From: David Bailey Date: Fri, 20 Sep 2024 11:21:56 -0600 Subject: [PATCH 3/7] Fix icepack_step_therm1 --- cicecore/cicedyn/general/ice_step_mod.F90 | 2 +- icepack | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cicecore/cicedyn/general/ice_step_mod.F90 b/cicecore/cicedyn/general/ice_step_mod.F90 index 5c8bd6efd..11708231f 100644 --- a/cicecore/cicedyn/general/ice_step_mod.F90 +++ b/cicecore/cicedyn/general/ice_step_mod.F90 @@ -545,7 +545,7 @@ subroutine step_therm1 (dt, iblk) afsdn = trcrn (i,j,nt_fsd:nt_fsd+nfsd-1,:,iblk), & nfsd = nfsd, & floe_rad_c = floe_rad_c(:), & - floe_binwidth = floe_binwidth(:) ) + floe_binwidth = floe_binwidth(:), & flpnd = flpnd (i,j, iblk), & expnd = expnd (i,j, iblk), & frpnd = frpnd (i,j, iblk), & diff --git a/icepack b/icepack index d1da722c4..44fa41ce6 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit d1da722c4786238b5ad7f826fdffc5f9037c5b02 +Subproject commit 44fa41ce617ba25731b2665d5acb6099f4baa170 From bda869bed1f98b2e2164d3f1d2b39cf8f82662cf Mon Sep 17 00:00:00 2001 From: David Bailey Date: Tue, 8 Oct 2024 16:00:16 -0600 Subject: [PATCH 4/7] Remove some print statements --- cicecore/cicedyn/general/ice_step_mod.F90 | 8 -------- icepack | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/cicecore/cicedyn/general/ice_step_mod.F90 b/cicecore/cicedyn/general/ice_step_mod.F90 index 11708231f..941dcec34 100644 --- a/cicecore/cicedyn/general/ice_step_mod.F90 +++ b/cicecore/cicedyn/general/ice_step_mod.F90 @@ -1177,14 +1177,6 @@ subroutine step_dyn_ridge (dt, ndtd, iblk) Tf = Tf(i,j,iblk), & rdpnd = rdpnd(i,j,iblk)) - if ((iglob(i) == 162 .and. jglob(j) == 387).or. & - (iglob(i) == 177 .and. jglob(j) == 442).or. & - (iglob(i) == 405 .and. jglob(j) == 465).or. & - (iglob(i) == 507 .and. jglob(j) == 122)) then - print *,"TLAT,TLON",TLAT(i,j,iblk),TLON(i,j,iblk) - print *,'rdpnd',rdpnd(i,j,iblk) - endif - endif ! tmask enddo ! i diff --git a/icepack b/icepack index 44fa41ce6..65987dd01 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit 44fa41ce617ba25731b2665d5acb6099f4baa170 +Subproject commit 65987dd010535cc827d673191dbad85c837f2fef From 6fce2e5b09ed4a86ec9618eef73ac2fd626c98d6 Mon Sep 17 00:00:00 2001 From: David Bailey Date: Wed, 9 Oct 2024 20:33:09 -0600 Subject: [PATCH 5/7] Syntax error in ice_init_column.F90 --- cicecore/shared/ice_init_column.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cicecore/shared/ice_init_column.F90 b/cicecore/shared/ice_init_column.F90 index 1e6e921aa..2616cc0cc 100644 --- a/cicecore/shared/ice_init_column.F90 +++ b/cicecore/shared/ice_init_column.F90 @@ -1817,7 +1817,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_sealvl_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, & From 0a692be19c4b03ce8360c523debc25d8512df797 Mon Sep 17 00:00:00 2001 From: David Bailey Date: Fri, 25 Oct 2024 10:07:19 -0600 Subject: [PATCH 6/7] Fix some merge issues --- cicecore/cicedyn/general/ice_step_mod.F90 | 4 ++-- icepack | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cicecore/cicedyn/general/ice_step_mod.F90 b/cicecore/cicedyn/general/ice_step_mod.F90 index 0c8f53e30..27605b47e 100644 --- a/cicecore/cicedyn/general/ice_step_mod.F90 +++ b/cicecore/cicedyn/general/ice_step_mod.F90 @@ -928,7 +928,7 @@ subroutine step_dyn_wave (dt) if (wave_spec_type.eq.'alt') then call icepack_step_wavefracture_alt (wave_spec_type, & - dt, ncat, nfsd, nfreq, & + dt, nfreq, & aice (i,j, iblk), & vice (i,j, iblk), & aicen (i,j,:, iblk), & @@ -939,7 +939,7 @@ subroutine step_dyn_wave (dt) d_afsd_wave (i,j,:, iblk)) else call icepack_step_wavefracture (wave_spec_type, & - dt, ncat, nfsd, nfreq, & + dt, nfreq, & aice (i,j, iblk), & vice (i,j, iblk), & aicen (i,j,:, iblk), & diff --git a/icepack b/icepack index e3422e78d..f20010d1c 160000 --- a/icepack +++ b/icepack @@ -1 +1 @@ -Subproject commit e3422e78d84339bca76663b3dddf76f8ddb4b204 +Subproject commit f20010d1cac95cacea459725998d3524c2b3f1d1 From e58401f4387b32bad128e159178a3f73d17d671c Mon Sep 17 00:00:00 2001 From: David Bailey Date: Wed, 30 Oct 2024 13:08:03 -0600 Subject: [PATCH 7/7] Set msec using start_tod --- cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 b/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 index 1363503db..7da8245a3 100644 --- a/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 +++ b/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 @@ -834,6 +834,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc) myear = (idate/10000) ! integer year of basedate mmonth= (idate-myear*10000)/100 ! integer month of basedate mday = idate-myear*10000-mmonth*100 ! day of month of basedate + msec = start_tod ! start from basedate if (my_task == master_task) then write(nu_diag,*) trim(subname),' curr_ymd = ',curr_ymd