Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Icepack optional arguments attribute #443

Merged
merged 2 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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
21 changes: 7 additions & 14 deletions columnphysics/icepack_brine.F90
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,12 @@ subroutine compute_microS_mushy (nilyr, nblyr, &
real (kind=dbl_kind), dimension (nilyr+1), intent(in) :: &
cgrid ! CICE vertical coordinate

real (kind=dbl_kind), &
intent(in) :: &
real (kind=dbl_kind), intent(in) :: &
hice_old , & ! previous timestep ice height (m)
sss , & ! ocean salinity (ppt)
sst ! ocean temperature (C)

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

real (kind=dbl_kind), intent(out) :: &
Expand All @@ -177,19 +175,16 @@ subroutine compute_microS_mushy (nilyr, nblyr, &
real (kind=dbl_kind), intent(inout) :: &
hbr_old ! previous timestep brine height (m)

real (kind=dbl_kind), dimension (nblyr+1), &
intent(inout) :: &
real (kind=dbl_kind), dimension (nblyr+1), intent(inout) :: &
iDin ! tracer diffusivity/h^2 (1/s) includes gravity drainage/molecular

real (kind=dbl_kind), dimension (nblyr+1), &
intent(inout) :: &
real (kind=dbl_kind), dimension (nblyr+1), intent(inout) :: &
iphin , & ! porosity on the igrid
ibrine_rho , & ! brine rho on interface
ibrine_sal , & ! brine sal on interface
iTin ! Temperature on the igrid (oC)

real (kind=dbl_kind), dimension (nblyr+2), &
intent(inout) :: &
real (kind=dbl_kind), dimension (nblyr+2), intent(inout) :: &
bSin , & ! bulk salinity (ppt) on bgrid
brine_sal , & ! equilibrium brine salinity (ppt)
brine_rho ! internal brine density (kg/m^3)
Expand Down Expand Up @@ -313,14 +308,12 @@ subroutine prepare_hbrine (nblyr, &
integer (kind=int_kind), intent(in) :: &
nblyr ! number of bio layers

real (kind=dbl_kind), dimension (:), &
intent(in) :: &
real (kind=dbl_kind), dimension (:), intent(in) :: &
bSin , & ! salinity of ice layers on bio grid (ppt)
bTin , & ! temperature of ice layers on bio grid for history (C)
i_grid ! biology grid interface points

real (kind=dbl_kind), dimension (:), &
intent(inout) :: &
real (kind=dbl_kind), dimension (:), intent(inout) :: &
brine_sal , & ! equilibrium brine salinity (ppt)
brine_rho , & ! internal brine density (kg/m^3)
ibrine_rho , & ! brine density on interface (kg/m^3)
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 @@ -681,8 +681,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 @@ -695,8 +695,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
12 changes: 4 additions & 8 deletions columnphysics/icepack_snow.F90
Original file line number Diff line number Diff line change
Expand Up @@ -925,13 +925,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 +1188,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 @@ -897,13 +897,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 @@ -913,7 +915,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 @@ -933,14 +937,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 @@ -1327,14 +1331,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 @@ -1402,30 +1408,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 @@ -141,8 +141,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 @@ -151,8 +150,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 @@ -695,8 +693,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 @@ -1775,14 +1772,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
Loading
Loading