Skip to content

Commit

Permalink
Merge pull request #26 from apcraig/main230718
Browse files Browse the repository at this point in the history
Update Icepack from Consortium main #4728746, July 18 2023
  • Loading branch information
eclare108213 authored Jul 19, 2023
2 parents b2b8066 + d3b0ecc commit e8e7d7d
Show file tree
Hide file tree
Showing 22 changed files with 204 additions and 112 deletions.
12 changes: 4 additions & 8 deletions columnphysics/icepack_aerosol.F90
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ subroutine update_aerosol(dt, &
vice_old, &
vsno_old

real (kind=dbl_kind), dimension(:), &
intent(in) :: &
real (kind=dbl_kind), dimension(:), intent(in) :: &
faero_atm ! aerosol deposition rate (W/m^2 s)

real (kind=dbl_kind), dimension(:), &
intent(inout) :: &
real (kind=dbl_kind), dimension(:), intent(inout) :: &
faero_ocn ! aerosol flux to ocean (W/m^2 s)

real (kind=dbl_kind), dimension(:,:), intent(inout) :: &
Expand Down Expand Up @@ -473,12 +471,10 @@ subroutine update_snow_bgc (dt, nblyr, &
zbgc_atm, & ! and atm to ice concentration * volume (kg or mmol/m^3*m)
flux_bio ! total ocean tracer flux (mmol/m^2/s)

real (kind=dbl_kind), dimension(nbtrcr), &
intent(in) :: &
real (kind=dbl_kind), dimension(nbtrcr), intent(in) :: &
flux_bio_atm ! aerosol deposition rate (kg or mmol/m^2 s)

real (kind=dbl_kind), dimension(ntrcr), &
intent(inout) :: &
real (kind=dbl_kind), dimension(ntrcr), intent(inout) :: &
trcrn ! ice/snow tracer array

! local variables
Expand Down
3 changes: 1 addition & 2 deletions columnphysics/icepack_age.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ subroutine increment_age (dt, iage)
real (kind=dbl_kind), intent(in) :: &
dt ! time step

real (kind=dbl_kind), &
intent(inout) :: &
real (kind=dbl_kind), intent(inout) :: &
iage

character(len=*),parameter :: subname='(increment_age)'
Expand Down
12 changes: 4 additions & 8 deletions columnphysics/icepack_algae.F90
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,10 @@ subroutine zbio (dt, nblyr, &
icgrid , & ! CICE interface coordinate
fswthrul ! visible short wave radiation on icgrid (W/m^2)

real (kind=dbl_kind), dimension(nbtrcr), &
intent(in) :: &
real (kind=dbl_kind), dimension(nbtrcr), intent(in) :: &
flux_bio_atm ! aerosol/bgc deposition rate (mmol/m^2 s)

real (kind=dbl_kind), dimension(ntrcr), &
intent(inout) :: &
real (kind=dbl_kind), dimension(ntrcr), intent(inout) :: &
trcrn

real (kind=dbl_kind), dimension (nblyr+1), intent(inout) :: &
Expand Down Expand Up @@ -2198,8 +2196,7 @@ subroutine compute_FCT_matrix (C_in, sbdiag, dt, nblyr, &
bphin_N, & ! Porosity with min condition on igrid
bgrid

real (kind=dbl_kind), dimension (nblyr+1), &
intent(out) :: &
real (kind=dbl_kind), dimension (nblyr+1), intent(out) :: &
sbdiag , & ! sub-diagonal matrix elements
diag , & ! diagonal matrix elements
spdiag , & ! super-diagonal matrix elements
Expand Down Expand Up @@ -2385,8 +2382,7 @@ subroutine compute_FCT_corr (C_in, C_low, dt, nblyr, &
real (kind=dbl_kind), intent(in) :: &
dt ! time step

real (kind=dbl_kind), dimension (nblyr+1), &
intent(in) :: &
real (kind=dbl_kind), dimension (nblyr+1), intent(in) :: &
D_sbdiag , & ! sub-diagonal artificial diffusion matrix elements
ML , & ! Lumped mass diagonal matrix elements
D_spdiag ! super-diagonal artificial diffusion matrix elements
Expand Down
9 changes: 3 additions & 6 deletions columnphysics/icepack_atmo.F90
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ subroutine atmo_boundary_layer (sfctype, &
real (kind=dbl_kind), intent(inout) :: &
Cdn_atm_ratio_n ! ratio drag coeff / neutral drag coeff

real (kind=dbl_kind), &
intent(inout) :: &
real (kind=dbl_kind), intent(inout) :: &
strx , & ! x surface stress (N)
stry ! y surface stress (N)

Expand Down Expand Up @@ -545,8 +544,7 @@ subroutine neutral_drag_coeffs (apnd, hpnd, &
aicen , & ! concentration of ice
vicen ! volume per unit area of ice (m)

real (kind=dbl_kind), &
intent(out) :: &
real (kind=dbl_kind), intent(out) :: &
hfreebd , & ! freeboard (m)
hdraft , & ! draught of ice + snow column (Stoessel1993)
hridge , & ! ridge height
Expand Down Expand Up @@ -863,8 +861,7 @@ subroutine icepack_atm_boundary(sfctype, &
Cdn_atm , & ! neutral drag coefficient
Cdn_atm_ratio_n ! ratio drag coeff / neutral drag coeff

real (kind=dbl_kind), &
intent(inout) :: &
real (kind=dbl_kind), intent(inout) :: &
strx , & ! x surface stress (N)
stry ! y surface stress (N)

Expand Down
6 changes: 2 additions & 4 deletions columnphysics/icepack_firstyear.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ subroutine update_FYarea (dt, &
dt , & ! time step
yday ! day of the year

logical (kind=log_kind), &
intent(in) :: &
logical (kind=log_kind), intent(in) :: &
nhmask, shmask

real (kind=dbl_kind), &
intent(inout) :: &
real (kind=dbl_kind), intent(inout) :: &
FYarea

character(len=*),parameter :: subname='(update_FYarea)'
Expand Down
3 changes: 1 addition & 2 deletions columnphysics/icepack_flux.F90
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ subroutine set_sfcflux (aicen, &
fcondtopn)

! ice state variables
real (kind=dbl_kind), &
intent(in) :: &
real (kind=dbl_kind), intent(in) :: &
aicen , & ! concentration of ice
flatn_f , & ! latent heat flux (W/m^2)
fsensn_f , & ! sensible heat flux (W/m^2)
Expand Down
3 changes: 1 addition & 2 deletions columnphysics/icepack_itd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,7 @@ subroutine column_sum (nsum, xin, xout)
integer (kind=int_kind), intent(in) :: &
nsum ! number of categories/layers

real (kind=dbl_kind), dimension (nsum), &
intent(in) :: &
real (kind=dbl_kind), dimension (nsum), intent(in) :: &
xin ! input field

real (kind=dbl_kind), intent(out) :: &
Expand Down
3 changes: 1 addition & 2 deletions columnphysics/icepack_mechred.F90
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,7 @@ subroutine ridge_prep (dt, &
real (kind=dbl_kind), intent(inout):: &
asum ! sum of ice and open water area

real (kind=dbl_kind), &
intent(out):: &
real (kind=dbl_kind), intent(out):: &
closing_net, & ! net rate at which area is removed (1/s)
divu_adv , & ! divu as implied by transport scheme (1/s)
opning ! rate of opening due to divergence/shear
Expand Down
14 changes: 6 additions & 8 deletions columnphysics/icepack_snow.F90
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,8 @@ subroutine snow_redist(dt, nslyr, ncat, wind, ain, vin, vsn, zqsn, &
hslyr, hsn_new(n), &
zqsn(:,n))
if (icepack_warnings_aborted(subname)) return
else
hsn_new(1) = hsn_new(1) + dhsn
endif ! nslyr > 1
endif ! |dhsn| > puny
endif ! ain > puny
Expand Down Expand Up @@ -925,13 +927,11 @@ subroutine snow_dry_metamorph (nslyr,nilyr, dt, rsnw, drsnw_dry, zqsn, &
real (kind=dbl_kind), intent(in) :: &
dt ! time step (s)

real (kind=dbl_kind), dimension(nslyr), &
intent(in) :: &
real (kind=dbl_kind), dimension(nslyr), intent(in) :: &
rsnw, & ! snow grain radius (10^-6 m)
zqsn ! snow enthalpy (J m-3)

real (kind=dbl_kind), dimension(nslyr), &
intent(inout) :: &
real (kind=dbl_kind), dimension(nslyr), intent(inout) :: &
drsnw_dry ! change due to snow aging (10^-6 m)

real (kind=dbl_kind), intent(in) :: &
Expand Down Expand Up @@ -1190,12 +1190,10 @@ subroutine drain_snow (nslyr, vsnon, aicen, &
real (kind=dbl_kind), intent(inout) :: &
meltsliq ! total liquid content (kg/m^2)

real (kind=dbl_kind), dimension(nslyr), &
intent(in) :: &
real (kind=dbl_kind), dimension(nslyr), intent(in) :: &
massice ! mass of ice in snow (kg/m^2)

real (kind=dbl_kind), dimension(nslyr), &
intent(inout) :: &
real (kind=dbl_kind), dimension(nslyr), intent(inout) :: &
massliq ! mass of liquid in snow (kg/m^2)

! local temporary variables
Expand Down
32 changes: 19 additions & 13 deletions columnphysics/icepack_therm_itd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -898,13 +898,15 @@ subroutine lateral_melt (dt, ncat, &

integer (kind=int_kind), intent(in) :: &
ncat , & ! number of thickness categories
nfsd , & ! number of floe size categories
nilyr , & ! number of ice layers
nblyr , & ! number of bio layers
nslyr , & ! number of snow layers
n_aero , & ! number of aerosol tracers
nbtrcr ! number of bio tracers

integer (kind=int_kind), intent(in), optional :: &
nfsd ! number of floe size categories

real (kind=dbl_kind), dimension (:), intent(inout) :: &
aicen , & ! concentration of ice
vicen , & ! volume per unit area of ice (m)
Expand All @@ -914,7 +916,9 @@ subroutine lateral_melt (dt, ncat, &
trcrn ! tracer array

real (kind=dbl_kind), intent(in) :: &
rside , & ! fraction of ice that melts laterally
rside ! fraction of ice that melts laterally

real (kind=dbl_kind), intent(in), optional :: &
wlat ! lateral melt rate (m/s)

real (kind=dbl_kind), intent(inout) :: &
Expand All @@ -934,14 +938,14 @@ subroutine lateral_melt (dt, ncat, &
real (kind=dbl_kind), dimension(:), intent(inout) :: &
faero_ocn ! aerosol flux to ocean (kg/m^2/s)

real (kind=dbl_kind), dimension(:), intent(inout) :: &
real (kind=dbl_kind), dimension(:), intent(inout), optional :: &
fiso_ocn ! isotope flux to ocean (kg/m^2/s)

real (kind=dbl_kind), dimension (:), intent(in) :: &
real (kind=dbl_kind), dimension (:), intent(in), optional :: &
floe_rad_c , & ! fsd size bin centre in m (radius)
floe_binwidth ! fsd size bin width in m (radius)

real (kind=dbl_kind), dimension (:), intent(out) :: &
real (kind=dbl_kind), dimension (:), intent(out), optional :: &
d_afsd_latm ! change in fsd due to lateral melt (m)

! local variables
Expand Down Expand Up @@ -1329,14 +1333,16 @@ subroutine add_new_ice (ncat, nilyr, &

integer (kind=int_kind), intent(in) :: &
ncat , & ! number of thickness categories
nfsd , & ! number of floe size categories
nilyr , & ! number of ice layers
nblyr , & ! number of bio layers
ntrcr , & ! number of tracers
nltrcr, & ! number of zbgc tracers
n_aero, & ! number of aerosol tracers
ktherm ! type of thermodynamics (-1 none, 1 BL99, 2 mushy)

integer (kind=int_kind), intent(in), optional :: &
nfsd ! number of floe size categories

real (kind=dbl_kind), dimension(0:ncat), intent(in) :: &
hin_max ! category boundaries (m)

Expand Down Expand Up @@ -1404,30 +1410,30 @@ subroutine add_new_ice (ncat, nilyr, &

! water isotopes

real (kind=dbl_kind), dimension(:), intent(inout) :: &
real (kind=dbl_kind), dimension(:), intent(inout), optional :: &
fiso_ocn ! isotope flux to ocean (kg/m^2/s)

real (kind=dbl_kind), intent(in) :: &
real (kind=dbl_kind), intent(in), optional :: &
HDO_ocn , & ! ocean concentration of HDO (kg/kg)
H2_16O_ocn , & ! ocean concentration of H2_16O (kg/kg)
H2_18O_ocn ! ocean concentration of H2_18O (kg/kg)

! floe size distribution
real (kind=dbl_kind), intent(in) :: &
real (kind=dbl_kind), intent(in), optional :: &
wave_sig_ht ! significant height of waves globally (m)

real (kind=dbl_kind), dimension(:), intent(in) :: &
real (kind=dbl_kind), dimension(:), intent(in), optional :: &
wave_spectrum ! ocean surface wave spectrum, E(f) (m^2 s)

real(kind=dbl_kind), dimension(:), intent(in) :: &
real(kind=dbl_kind), dimension(:), intent(in), optional :: &
wavefreq, & ! wave frequencies (s^-1)
dwavefreq ! wave frequency bin widths (s^-1)

real (kind=dbl_kind), dimension (:), intent(in) :: &
real (kind=dbl_kind), dimension (:), intent(in), optional :: &
floe_rad_c , & ! fsd size bin centre in m (radius)
floe_binwidth ! fsd size bin width in m (radius)

real (kind=dbl_kind), dimension(:), intent(out) :: &
real (kind=dbl_kind), dimension(:), intent(out), optional :: &
! change in thickness distribution (area)
d_afsd_latg , & ! due to fsd lateral growth
d_afsd_newi ! new ice formation
Expand Down
15 changes: 5 additions & 10 deletions columnphysics/icepack_therm_vertical.F90
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ subroutine thermo_vertical (nilyr, nslyr, &
massliq ! liquid water mass in snow (kg/m^2)

! input from atmosphere
real (kind=dbl_kind), &
intent(in) :: &
real (kind=dbl_kind), intent(in) :: &
flw , & ! incoming longwave radiation (W/m^2)
potT , & ! air potential temperature (K)
Qa , & ! specific humidity (kg/kg)
Expand All @@ -150,8 +149,7 @@ subroutine thermo_vertical (nilyr, nslyr, &
shcoef , & ! transfer coefficient for sensible heat
lhcoef ! transfer coefficient for latent heat

real (kind=dbl_kind), &
intent(inout) :: &
real (kind=dbl_kind), intent(inout) :: &
fswsfc , & ! SW absorbed at ice/snow surface (W m-2)
fswint , & ! SW absorbed in ice interior, below surface (W m-2)
fpond ! fresh water flux to ponds (kg/m^2/s)
Expand Down Expand Up @@ -692,8 +690,7 @@ subroutine init_vertical_profile(nilyr, nslyr, &
real (kind=dbl_kind), dimension (:), intent(in) :: &
zSin ! internal ice layer salinities

real (kind=dbl_kind), dimension (:), &
intent(inout) :: &
real (kind=dbl_kind), dimension (:), intent(inout) :: &
zqsn , & ! snow enthalpy
zTsn ! snow temperature

Expand Down Expand Up @@ -1772,14 +1769,12 @@ subroutine freeboard (nslyr, &
! real (kind=dbl_kind), intent(in) :: &
! dt ! time step

real (kind=dbl_kind), &
intent(inout) :: &
real (kind=dbl_kind), intent(inout) :: &
snoice , & ! snow-ice formation (m/step-->cm/day)
dsnow ! change in snow thickness after snow-ice formation (m)
! iage ! ice age (s)

real (kind=dbl_kind), &
intent(inout) :: &
real (kind=dbl_kind), intent(inout) :: &
hin , & ! ice thickness (m)
hsn ! snow thickness (m)

Expand Down
15 changes: 5 additions & 10 deletions columnphysics/icepack_zbgc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ subroutine add_new_ice_bgc (dt, nblyr, &
real (kind=dbl_kind), intent(in) :: &
dt ! time step (s)

real (kind=dbl_kind), dimension (:), &
intent(in) :: &
real (kind=dbl_kind), dimension (:), intent(in) :: &
aicen_init , & ! initial concentration of ice
vicen_init , & ! intiial volume per unit area of ice (m)
aicen , & ! concentration of ice
Expand All @@ -108,8 +107,7 @@ subroutine add_new_ice_bgc (dt, nblyr, &
real (kind=dbl_kind), intent(in) :: &
vsnon1 ! category 1 snow volume per unit area (m)

real (kind=dbl_kind), dimension (:,:), &
intent(inout) :: &
real (kind=dbl_kind), dimension (:,:), intent(inout) :: &
trcrn ! ice tracers

real (kind=dbl_kind), intent(in) :: &
Expand All @@ -122,12 +120,10 @@ subroutine add_new_ice_bgc (dt, nblyr, &
real (kind=dbl_kind), intent(in) :: &
hsurp ! thickness of new ice added to each cat

real (kind=dbl_kind), dimension (:), &
intent(inout) :: &
real (kind=dbl_kind), dimension (:), intent(inout) :: &
flux_bio ! tracer flux to ocean from biology (mmol/m^2/s)

real (kind=dbl_kind), dimension (:), &
intent(in) :: &
real (kind=dbl_kind), dimension (:), intent(in) :: &
ocean_bio ! ocean concentration of biological tracer

! local
Expand Down Expand Up @@ -398,8 +394,7 @@ subroutine adjust_tracer_profile (nbtrcr, dt, ntrcr, &
real (kind=dbl_kind), dimension (nilyr+1), intent(in) :: &
cgrid ! CICE grid

real (kind=dbl_kind), dimension (ntrcr), &
intent(inout) :: &
real (kind=dbl_kind), dimension (ntrcr), intent(inout) :: &
trcrn ! ice tracers

! local variables
Expand Down
Loading

0 comments on commit e8e7d7d

Please sign in to comment.