Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
280 changes: 152 additions & 128 deletions cicecore/cicedyn/analysis/ice_history_pond.F90

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions cicecore/cicedyn/dynamics/ice_transport_remap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
!
!=======================================================================
Expand Down Expand Up @@ -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).
!-------------------------------------------------------------------

Expand Down Expand Up @@ -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.
!-------------------------------------------------------------------

Expand Down Expand Up @@ -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.
!-------------------------------------------------------------------

Expand Down
94 changes: 44 additions & 50 deletions cicecore/cicedyn/general/ice_flux.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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), & !
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions cicecore/cicedyn/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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/ &
Expand All @@ -241,15 +241,15 @@ 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, &
evp_algorithm, elasticDamp, &
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, &
Expand Down Expand Up @@ -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'
Expand Down
Loading
Loading