diff --git a/columnphysics/icepack_itd.F90 b/columnphysics/icepack_itd.F90 index ddcdb7c28..a135f4b21 100644 --- a/columnphysics/icepack_itd.F90 +++ b/columnphysics/icepack_itd.F90 @@ -31,10 +31,10 @@ module icepack_itd use icepack_parameters, only: rhosi, sk_l, hs_ssl, min_salin, rsnw_fall use icepack_tracers, only: nt_Tsfc, nt_qice, nt_qsno, nt_aero, nt_isosno, nt_isoice use icepack_tracers, only: nt_apnd, nt_hpnd, nt_fbri, tr_brine, nt_bgc_S, bio_index - use icepack_tracers, only: n_iso, tr_iso, tr_snow, nt_smice, nt_rsnw, nt_rhos + use icepack_tracers, only: n_iso, tr_iso, tr_snow, nt_smice, nt_rsnw, nt_rhos, nt_sice use icepack_tracers, only: icepack_compute_tracers use icepack_parameters, only: solve_zsal, skl_bgc, z_tracers, hi_min - use icepack_parameters, only: kcatbound, kitd + use icepack_parameters, only: kcatbound, kitd, saltflux_option use icepack_therm_shared, only: Tmin use icepack_warnings, only: warnstr, icepack_warnings_add use icepack_warnings, only: icepack_warnings_setabort, icepack_warnings_aborted @@ -1101,7 +1101,7 @@ subroutine zap_small_areas (dt, ntrcr, & n, k, it, & !counting indices blevels - real (kind=dbl_kind) :: xtmp ! temporary variables + real (kind=dbl_kind) :: xtmp, sicen ! temporary variables real (kind=dbl_kind) , dimension (1):: trcr_skl real (kind=dbl_kind) , dimension (nblyr+1):: bvol @@ -1199,7 +1199,15 @@ subroutine zap_small_areas (dt, ntrcr, & xtmp = (rhoi*vicen(n)) / dt dfresh = dfresh + xtmp - xtmp = rhoi*vicen(n)*ice_ref_salinity*p001 / dt + if (saltflux_option == 'prognostic') then + sicen = c0 + do k=1,nilyr + sicen = sicen + trcrn(nt_sice+k-1,n) / real(nilyr,kind=dbl_kind) + enddo + xtmp = rhoi*vicen(n)*sicen*p001 / dt + else + xtmp = rhoi*vicen(n)*ice_ref_salinity*p001 / dt + endif dfsalt = dfsalt + xtmp aice0 = aice0 + aicen(n) @@ -1316,8 +1324,17 @@ subroutine zap_small_areas (dt, ntrcr, & * (aice-c1)/aice / dt dfresh = dfresh + xtmp - xtmp = rhoi*vicen(n)*ice_ref_salinity*p001 & - * (aice-c1)/aice / dt + if (saltflux_option == 'prognostic') then + sicen = c0 + do k=1,nilyr + sicen = sicen + trcrn(nt_sice+k-1,n) / real(nilyr,kind=dbl_kind) + enddo + xtmp = rhoi*vicen(n)*sicen*p001 & + * (aice-c1)/aice / dt + else + xtmp = rhoi*vicen(n)*ice_ref_salinity*p001 & + * (aice-c1)/aice / dt + endif dfsalt = dfsalt + xtmp if (solve_zsal) then diff --git a/columnphysics/icepack_parameters.F90 b/columnphysics/icepack_parameters.F90 index 65ae96380..57ab8ccd1 100644 --- a/columnphysics/icepack_parameters.F90 +++ b/columnphysics/icepack_parameters.F90 @@ -165,6 +165,11 @@ module icepack_parameters ! 'linear_salt' = -depressT * sss ! 'mushy' conforms with ktherm=2 + character(len=char_len), public :: & + saltflux_option = 'constant'! Salt flux computation + ! 'constant' reference value of ice_ref_salinity + ! 'prognostic' prognostic salt flux + !----------------------------------------------------------------------- ! Parameters for radiation !----------------------------------------------------------------------- @@ -455,6 +460,7 @@ subroutine icepack_init_parameters( & atmbndy_in, calc_strair_in, formdrag_in, highfreq_in, natmiter_in, & atmiter_conv_in, calc_dragio_in, & tfrz_option_in, kitd_in, kcatbound_in, hs0_in, frzpnd_in, & + saltflux_option_in, & floeshape_in, wave_spec_in, wave_spec_type_in, nfreq_in, & dpscale_in, rfracmin_in, rfracmax_in, pndaspect_in, hs1_in, hp1_in, & bgc_flux_type_in, z_tracers_in, scale_bgc_in, solve_zbgc_in, & @@ -561,12 +567,16 @@ subroutine icepack_init_parameters( & phi_c_slow_mode_in , & ! liquid fraction porosity cutoff for slow mode phi_i_mushy_in ! liquid fraction of congelation ice - character(len=*), intent(in), optional :: & - tfrz_option_in ! form of ocean freezing temperature - ! 'minus1p8' = -1.8 C - ! 'constant' = Tocnfrz - ! 'linear_salt' = -depressT * sss - ! 'mushy' conforms with ktherm=2 + character(len=*), intent(in), optional :: & + tfrz_option_in ! form of ocean freezing temperature + ! 'minus1p8' = -1.8 C + ! 'linear_salt' = -depressT * sss + ! 'mushy' conforms with ktherm=2 + + character(len=*), intent(in), optional :: & + saltflux_option_in ! Salt flux computation + ! 'constant' reference value of ice_ref_salinity + ! 'prognostic' prognostic salt flux !----------------------------------------------------------------------- ! Parameters for radiation @@ -931,6 +941,7 @@ subroutine icepack_init_parameters( & if (present(natmiter_in) ) natmiter = natmiter_in if (present(atmiter_conv_in) ) atmiter_conv = atmiter_conv_in if (present(tfrz_option_in) ) tfrz_option = tfrz_option_in + if (present(saltflux_option_in) ) saltflux_option = saltflux_option_in if (present(kitd_in) ) kitd = kitd_in if (present(kcatbound_in) ) kcatbound = kcatbound_in if (present(floeshape_in) ) floeshape = floeshape_in @@ -1160,6 +1171,7 @@ subroutine icepack_query_parameters( & atmbndy_out, calc_strair_out, formdrag_out, highfreq_out, natmiter_out, & atmiter_conv_out, calc_dragio_out, & tfrz_option_out, kitd_out, kcatbound_out, hs0_out, frzpnd_out, & + saltflux_option_out, & floeshape_out, wave_spec_out, wave_spec_type_out, nfreq_out, & dpscale_out, rfracmin_out, rfracmax_out, pndaspect_out, hs1_out, hp1_out, & bgc_flux_type_out, z_tracers_out, scale_bgc_out, solve_zbgc_out, & @@ -1282,6 +1294,12 @@ subroutine icepack_query_parameters( & ! 'linear_salt' = -depressT * sss ! 'mushy' conforms with ktherm=2 + character(len=*), intent(out), optional :: & + saltflux_option_out ! Salt flux computation + ! 'constant' reference value of ice_ref_salinity + ! 'prognostic' prognostic salt flux + + !----------------------------------------------------------------------- ! Parameters for radiation !----------------------------------------------------------------------- @@ -1677,6 +1695,7 @@ subroutine icepack_query_parameters( & if (present(natmiter_out) ) natmiter_out = natmiter if (present(atmiter_conv_out) ) atmiter_conv_out = atmiter_conv if (present(tfrz_option_out) ) tfrz_option_out = tfrz_option + if (present(saltflux_option_out) ) saltflux_option_out = saltflux_option if (present(kitd_out) ) kitd_out = kitd if (present(kcatbound_out) ) kcatbound_out = kcatbound if (present(floeshape_out) ) floeshape_out = floeshape @@ -1883,6 +1902,7 @@ subroutine icepack_write_parameters(iounit) write(iounit,*) " natmiter = ", natmiter write(iounit,*) " atmiter_conv = ", atmiter_conv write(iounit,*) " tfrz_option = ", tfrz_option + write(iounit,*) " saltflux_option = ", saltflux_option write(iounit,*) " kitd = ", kitd write(iounit,*) " kcatbound = ", kcatbound write(iounit,*) " floeshape = ", floeshape diff --git a/columnphysics/icepack_therm_itd.F90 b/columnphysics/icepack_therm_itd.F90 index c39f95142..071ad78da 100644 --- a/columnphysics/icepack_therm_itd.F90 +++ b/columnphysics/icepack_therm_itd.F90 @@ -28,11 +28,12 @@ module icepack_therm_itd use icepack_parameters, only: rhosi, conserv_check, rhosmin use icepack_parameters, only: kitd, ktherm use icepack_parameters, only: z_tracers, solve_zsal, hfrazilmin, hi_min + use icepack_parameters, only: saltflux_option use icepack_tracers, only: ntrcr, nbtrcr use icepack_tracers, only: nt_qice, nt_qsno, nt_fbri, nt_sice use icepack_tracers, only: nt_apnd, nt_hpnd, nt_aero, nt_isosno, nt_isoice - use icepack_tracers, only: nt_Tsfc, nt_iage, nt_FY, nt_fsd, nt_rhos + use icepack_tracers, only: nt_Tsfc, nt_iage, nt_FY, nt_fsd, nt_rhos, nt_sice use icepack_tracers, only: nt_alvl, nt_vlvl use icepack_tracers, only: tr_pond_lvl, tr_pond_topo, tr_snow use icepack_tracers, only: tr_iage, tr_FY, tr_lvl, tr_aero, tr_iso, tr_brine, tr_fsd @@ -985,7 +986,7 @@ subroutine lateral_melt (dt, ncat, & real (kind=dbl_kind), intent(in) :: & sss real (kind=dbl_kind) :: & - Ti, Si0, qi0, & + Ti, Si0, qi0, sicen, & elapsed_t, & ! FSD subcycling subdt ! FSD timestep (s) @@ -1094,7 +1095,15 @@ subroutine lateral_melt (dt, ncat, & ! dfresh > 0, dfsalt > 0, dfpond > 0 dfresh = (rhoi*vicen(n) + rhos*vsnon(n)) * rsiden(n) / dt - dfsalt = rhoi*vicen(n)*ice_ref_salinity*p001 * rsiden(n) / dt + if (saltflux_option == 'prognostic') then + sicen = c0 + do k=1,nilyr + sicen = sicen + trcrn(nt_sice+k-1,n) / real(nilyr,kind=dbl_kind) + enddo + dfsalt = rhoi*vicen(n)*sicen*p001 * rsiden(n) / dt + else + dfsalt = rhoi*vicen(n)*ice_ref_salinity*p001 * rsiden(n) / dt + endif fresh = fresh + dfresh fsalt = fsalt + dfsalt @@ -1597,18 +1606,23 @@ subroutine add_new_ice (ncat, nilyr, & !----------------------------------------------------------------- if (update_ocn_f) then - if (ktherm <= 1) then - dfresh = -rhoi*vi0new/dt + dfresh = -rhoi*vi0new/dt + if (saltflux_option == 'prognostic') then + dfsalt = Si0new*p001*dfresh + else dfsalt = ice_ref_salinity*p001*dfresh - fresh = fresh + dfresh - fsalt = fsalt + dfsalt - ! elseif (ktherm == 2) the fluxes are added elsewhere endif + fresh = fresh + dfresh + fsalt = fsalt + dfsalt else ! update_ocn_f = false if (ktherm == 2) then ! return mushy-layer frazil to ocean (POP) vi0tmp = fnew*dt / (rhoi*Lfresh) dfresh = -rhoi*(vi0new - vi0tmp)/dt - dfsalt = ice_ref_salinity*p001*dfresh + if (saltflux_option == 'prognostic') then + dfsalt = Si0new*p001*dfresh + else + dfsalt = ice_ref_salinity*p001*dfresh + endif fresh = fresh + dfresh fsalt = fsalt + dfsalt frazil_diag = frazil - vi0tmp diff --git a/columnphysics/icepack_therm_vertical.F90 b/columnphysics/icepack_therm_vertical.F90 index 9af2b6ab3..620fc2921 100644 --- a/columnphysics/icepack_therm_vertical.F90 +++ b/columnphysics/icepack_therm_vertical.F90 @@ -27,6 +27,8 @@ module icepack_therm_vertical use icepack_parameters, only: ustar_min, fbot_xfer_type, formdrag, calc_strair use icepack_parameters, only: rfracmin, rfracmax, dpscale, frzpnd, snwgrain, snwlvlfac use icepack_parameters, only: phi_i_mushy, floeshape, floediam, use_smliq_pnd, snwredist + use icepack_parameters, only: saltflux_option + use icepack_tracers, only: tr_iage, tr_FY, tr_aero, tr_pond, tr_fsd, tr_iso use icepack_tracers, only: tr_pond_lvl, tr_pond_topo use icepack_tracers, only: n_aero, n_iso @@ -237,7 +239,7 @@ subroutine thermo_vertical (nilyr, nslyr, & einter ! intermediate energy real (kind=dbl_kind) :: & - fadvocn ! advective heat flux to ocean + fadvocn, saltvol, dfsalt ! advective heat flux to ocean character(len=*),parameter :: subname='(thermo_vertical)' @@ -290,6 +292,14 @@ subroutine thermo_vertical (nilyr, nslyr, & worki = hin works = hsn + ! Save initial salt volume for prognostic flux + if (saltflux_option == 'prognostic') then + saltvol = c0 + do k=1,nilyr + saltvol = saltvol + rhoi*zSin(k)*hin*p001 / real(nilyr,kind=dbl_kind) + enddo + endif + !----------------------------------------------------------------- ! Compute new surface temperature and internal ice and snow ! temperatures. @@ -431,7 +441,15 @@ subroutine thermo_vertical (nilyr, nslyr, & dhs = hsn - works - hsn_new freshn = freshn + evapn - (rhoi*dhi + rhos*dhs) / dt - fsaltn = fsaltn - rhoi*dhi*ice_ref_salinity*p001/dt + if (saltflux_option == 'prognostic') then + dfsalt = c0 + do k=1,nilyr + dfsalt = dfsalt + rhoi*zSin(k)*hin*p001 / real(nilyr,kind=dbl_kind) + enddo + fsaltn = fsaltn - (dfsalt - saltvol) / dt + else + fsaltn = fsaltn - rhoi*dhi*ice_ref_salinity*p001/dt + endif fhocnn = fhocnn + fadvocn ! for ktherm=2 if (hin == c0) then @@ -2565,7 +2583,6 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, & enddo endif - !----------------------------------------------------------------- ! Update the neutral drag coefficients to account for form drag ! Oceanic and atmospheric drag coefficients diff --git a/columnphysics/version.txt b/columnphysics/version.txt index 8b51f89e8..f31cebc77 100644 --- a/columnphysics/version.txt +++ b/columnphysics/version.txt @@ -1 +1 @@ -ICEPACK 1.3.2 +ICEPACK 1.3.3 diff --git a/configuration/driver/icedrv_InitMod.F90 b/configuration/driver/icedrv_InitMod.F90 index 2ac595ba0..1efd44011 100644 --- a/configuration/driver/icedrv_InitMod.F90 +++ b/configuration/driver/icedrv_InitMod.F90 @@ -44,7 +44,7 @@ subroutine icedrv_initialize use icedrv_flux, only: init_coupler_flux, init_history_therm, & init_flux_atm_ocn use icedrv_forcing, only: init_forcing, get_forcing, get_wave_spec - use icedrv_forcing_bgc, only: get_forcing_bgc, faero_default, fiso_default, init_forcing_bgc + use icedrv_forcing_bgc, only: get_forcing_bgc, faero_default, fiso_default, init_forcing_bgc use icedrv_restart_shared, only: restart use icedrv_init, only: input_data, init_state, init_grid2, init_fsd use icedrv_init_column, only: init_thermo_vertical, init_shortwave, init_zbgc @@ -138,7 +138,7 @@ subroutine icedrv_initialize if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & file=__FILE__,line= __LINE__) - call init_forcing ! initialize forcing (standalone) + call init_forcing ! initialize forcing (standalone) if (skl_bgc .or. z_tracers) call init_forcing_bgc !cn if (tr_fsd .and. wave_spec) call get_wave_spec ! wave spectrum in ice call get_forcing(istep1) ! get forcing from data arrays diff --git a/configuration/driver/icedrv_MAIN.F90 b/configuration/driver/icedrv_MAIN.F90 index 2df464cd5..881bb9aac 100644 --- a/configuration/driver/icedrv_MAIN.F90 +++ b/configuration/driver/icedrv_MAIN.F90 @@ -1,24 +1,24 @@ !======================================================================= ! Copyright (c) 2022, Triad National Security, LLC ! All rights reserved. -! +! ! Copyright 2022. Triad National Security, LLC. This software was -! produced under U.S. Government contract DE-AC52-06NA25396 for Los +! produced under U.S. Government contract DE-AC52-06NA25396 for Los ! Alamos National Laboratory (LANL), which is operated by Triad -! National Security, LLC for the U.S. Department of Energy. The U.S. -! Government has rights to use, reproduce, and distribute this software. -! NEITHER THE GOVERNMENT NOR TRIAD NATIONAL SECURITY, LLC MAKES ANY +! National Security, LLC for the U.S. Department of Energy. The U.S. +! Government has rights to use, reproduce, and distribute this software. +! NEITHER THE GOVERNMENT NOR TRIAD NATIONAL SECURITY, LLC MAKES ANY ! WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF -! THIS SOFTWARE. If software is modified to produce derivative works, -! such modified software should be clearly marked, so as not to confuse +! THIS SOFTWARE. If software is modified to produce derivative works, +! such modified software should be clearly marked, so as not to confuse ! it with the version available from LANL. ! ! The full license and distribution policy are available from ! https://github.com/CICE-Consortium -! +! !======================================================================= -! Main driver routine for Icepack, the column package for CICE. +! Main driver routine for Icepack, the column package for CICE. ! Initializes and steps through the model. ! ! author Elizabeth C. Hunke, LANL diff --git a/configuration/driver/icedrv_RunMod.F90 b/configuration/driver/icedrv_RunMod.F90 index 5455607d5..4b7170663 100644 --- a/configuration/driver/icedrv_RunMod.F90 +++ b/configuration/driver/icedrv_RunMod.F90 @@ -127,7 +127,7 @@ subroutine ice_step !----------------------------------------------------------------- call icepack_query_parameters(skl_bgc_out=skl_bgc, z_tracers_out=z_tracers) - call icepack_query_parameters(solve_zsal_out=solve_zsal, & + call icepack_query_parameters(solve_zsal_out=solve_zsal, & calc_Tsfc_out=calc_Tsfc, & wave_spec_out=wave_spec) call icepack_query_tracer_flags(tr_brine_out=tr_brine,tr_fsd_out=tr_fsd, & @@ -147,7 +147,7 @@ subroutine ice_step !----------------------------------------------------------------- ! Scale radiation fields !----------------------------------------------------------------- - + if (calc_Tsfc) call prep_radiation () ! call icedrv_diagnostics_debug ('post prep_radiation') @@ -169,26 +169,26 @@ subroutine ice_step !----------------------------------------------------------------- ! dynamics, transport, ridging !----------------------------------------------------------------- - + call init_history_dyn - + ! wave fracture of the floe size distribution ! note this is called outside of the dynamics subcycling loop if (tr_fsd .and. wave_spec) call step_dyn_wave(dt) do k = 1, ndtd - + ! ridging call step_dyn_ridge (dt_dyn, ndtd) - + ! clean up, update tendency diagnostics offset = c0 call update_state (dt_dyn, daidtd, dvidtd, dagedtd, offset) - + enddo ! call icedrv_diagnostics_debug ('post dynamics') - + !----------------------------------------------------------------- ! snow redistribution and metamorphosis !----------------------------------------------------------------- @@ -203,13 +203,13 @@ subroutine ice_step !----------------------------------------------------------------- ! albedo, shortwave radiation !----------------------------------------------------------------- - + call step_radiation (dt) !----------------------------------------------------------------- ! get ready for coupling and the next time step !----------------------------------------------------------------- - + call coupling_prep ! call icedrv_diagnostics_debug ('post step_rad, cpl') @@ -217,7 +217,7 @@ subroutine ice_step !----------------------------------------------------------------- ! write data !----------------------------------------------------------------- - + if (mod(istep,diagfreq) == 0) then call runtime_diags(dt) ! log file if (solve_zsal) call zsal_diags @@ -228,16 +228,16 @@ subroutine ice_step if (history_cdf) then call history_write() endif - + if (write_restart == 1) then call dumpfile ! core variables for restarting if (solve_zsal .or. skl_bgc .or. z_tracers) & call write_restart_bgc ! biogeochemistry call final_restart endif - + end subroutine ice_step - + !======================================================================= ! ! Prepare for coupling @@ -264,7 +264,7 @@ subroutine coupling_prep ! local variables - integer (kind=int_kind) :: & + integer (kind=int_kind) :: & n , & ! thickness category index i , & ! horizontal index k , & ! tracer index @@ -314,7 +314,7 @@ subroutine coupling_prep do n = 1, ncat do i = 1, nx if (aicen(i,n) > puny) then - + alvdf(i) = alvdf(i) + alvdfn(i,n)*aicen(i,n) alidf(i) = alidf(i) + alidfn(i,n)*aicen(i,n) alvdr(i) = alvdr(i) + alvdrn(i,n)*aicen(i,n) @@ -329,7 +329,7 @@ subroutine coupling_prep apeff_ai(i) = apeff_ai(i) + apeffn(i,n)*aicen(i,n) ! for history snowfrac(i) = snowfrac(i) + snowfracn(i,n)*aicen(i,n) ! for history - + endif ! aicen > puny enddo enddo @@ -357,8 +357,8 @@ subroutine coupling_prep fsalt_ai (i) = fsalt (i) fhocn_ai (i) = fhocn (i) fswthru_ai(i) = fswthru(i) - fzsal_ai (i) = fzsal (i) - fzsal_g_ai(i) = fzsal_g(i) + fzsal_ai (i) = fzsal (i) + fzsal_g_ai(i) = fzsal_g(i) if (nbtrcr > 0) then do k = 1, nbtrcr diff --git a/configuration/driver/icedrv_arrays_column.F90 b/configuration/driver/icedrv_arrays_column.F90 index d1f153ce2..3d48cdac3 100644 --- a/configuration/driver/icedrv_arrays_column.F90 +++ b/configuration/driver/icedrv_arrays_column.F90 @@ -127,7 +127,7 @@ module icedrv_arrays_column real (kind=dbl_kind), dimension (nblyr+1), public :: & igrid ! biology vertical interface points - + real (kind=dbl_kind), dimension (nilyr+1), public :: & cgrid , & ! CICE vertical coordinate icgrid , & ! interface grid for CICE (shortwave variable) @@ -180,12 +180,12 @@ module icedrv_arrays_column integer (kind=int_kind), dimension(nx,icepack_max_algae), public :: & algal_peak ! vertical location of algal maximum, 0 if no maximum - real (kind=dbl_kind), & + real (kind=dbl_kind), & dimension (nx,nblyr+1,ncat), public :: & Zoo ! N losses accumulated in timestep (ie. zooplankton/bacteria) ! (mmol/m^3) - real (kind=dbl_kind), & + real (kind=dbl_kind), & dimension (nx,ncat), public :: & dhbr_top , & ! brine top change dhbr_bot ! brine bottom change @@ -211,18 +211,18 @@ module icedrv_arrays_column NO_net ! Total nitrate per grid cell logical (kind=log_kind), dimension (nx), public :: & - Rayleigh_criteria ! .true. means Ra_c was reached + Rayleigh_criteria ! .true. means Ra_c was reached real (kind=dbl_kind), dimension (nx), public :: & Rayleigh_real ! .true. = c1, .false. = c0 - real (kind=dbl_kind), & + real (kind=dbl_kind), & dimension (nx,ncat), public :: & sice_rho ! avg sea ice density (kg/m^3) ! ech: diagnostic only? - real (kind=dbl_kind), & + real (kind=dbl_kind), & dimension (nx,ncat), public :: & - fzsaln , & ! category fzsal(kg/m^2/s) + fzsaln , & ! category fzsal(kg/m^2/s) fzsaln_g ! salt flux from gravity drainage only real (kind=dbl_kind), dimension (nx), public :: & @@ -239,7 +239,7 @@ module icedrv_arrays_column real (kind=dbl_kind), dimension (nx), public :: & upNO , & ! nitrate uptake rate (mmol/m^2/d) times aice upNH ! ammonium uptake rate (mmol/m^2/d) times aice - + real (kind=dbl_kind), & dimension(nx,max_ntrcr,ncat), public :: & trcrn_sw ! bgc tracers active in the delta-Eddington shortwave @@ -266,7 +266,7 @@ module icedrv_arrays_column real (kind=dbl_kind), dimension (nx,nfreq), public :: & wave_spectrum ! wave spectrum - real (kind=dbl_kind), dimension (nx,nfsd), public :: & + real (kind=dbl_kind), dimension (nx,nfsd), public :: & ! change in floe size distribution due to processes d_afsd_newi, d_afsd_latg, d_afsd_latm, d_afsd_wave, d_afsd_weld diff --git a/configuration/driver/icedrv_calendar.F90 b/configuration/driver/icedrv_calendar.F90 index 048a23e4c..b8d5dcbde 100644 --- a/configuration/driver/icedrv_calendar.F90 +++ b/configuration/driver/icedrv_calendar.F90 @@ -147,7 +147,7 @@ subroutine init_calendar calendar_type = ' ' if (use_leap_years .and. days_per_year == 365) calendar_type = 'Gregorian' - + dayyr = real(days_per_year, kind=dbl_kind) if (days_per_year == 360) then daymo = daymo360 @@ -160,7 +160,7 @@ subroutine init_calendar ! Get the time in seconds from calendar zero to start of initial year call time2sec(year_init,1,1,basis_seconds) - ! determine initial date (assumes namelist year_init, istep0 unchanged) + ! determine initial date (assumes namelist year_init, istep0 unchanged) sec = mod(time,secday) ! elapsed seconds into date at ! end of dt tday = (time-sec)/secday + c1 ! absolute day number @@ -171,7 +171,7 @@ subroutine init_calendar yday = mday + daycal(month) ! day of the year nyr = nyr - year_init + 1 ! year number - idate0 = (nyr+year_init-1)*10000 + month*100 + mday ! date (yyyymmdd) + idate0 = (nyr+year_init-1)*10000 + month*100 + mday ! date (yyyymmdd) end subroutine init_calendar @@ -217,10 +217,10 @@ subroutine calendar(ttime) yday = mday + daycal(month) ! day of the year nyr = nyr - year_init + 1 ! year number - + hour = int((ttime)/c3600) + c1 ! hour - idate = (nyr+year_init-1)*10000 + month*100 + mday ! date (yyyymmdd) + idate = (nyr+year_init-1)*10000 + month*100 + mday ! date (yyyymmdd) if (istep >= npt+1) stop_now = 1 if (nyr /= nyrp) new_year = .true. @@ -244,7 +244,7 @@ subroutine calendar(ttime) if (force_restart_now) write_restart = 1 if (dump_last .and. istep == npt) write_restart = 1 - + endif ! istep > 1 if (mod(istep,diagfreq) == 0 .and. stop_now /= 1) then @@ -282,7 +282,7 @@ subroutine time2sec(year,month,day,tsec) tsec = secday * days_since_calz else - + if (use_leap_years) then call set_calendar(year) @@ -292,7 +292,7 @@ subroutine time2sec(year,month,day,tsec) ! Subtract a year because we only want to count whole years years_since_calz = year - 1 - + ! Add days from preceeding years days_since_calz = days_since_calz & + int(years_since_calz/c400)*days_per_4c @@ -313,9 +313,9 @@ subroutine time2sec(year,month,day,tsec) + years_since_calz*days_per_y tsec = secday * days_since_calz - + else ! Using fixed 365-day calendar - + days_since_calz = c365*year + daycal365(month) + day - c1 tsec = secday * days_since_calz @@ -359,7 +359,7 @@ subroutine sec2time(year,month,day,tsec) year = int(days_since_calz/days_per_4c)*400 days_since_calz = days_since_calz & - int(days_since_calz/days_per_4c)*days_per_4c - + if (days_since_calz == 4*days_per_c) then year = year + 400 days_since_calz = days_per_y + 1 @@ -367,11 +367,11 @@ subroutine sec2time(year,month,day,tsec) year = year + int(days_since_calz/days_per_c)*100 days_since_calz = days_since_calz & - int(days_since_calz/days_per_c)*days_per_c - + year = year + int(days_since_calz/days_per_4y)*4 days_since_calz = days_since_calz & - int(days_since_calz/days_per_4y)*days_per_4y - + if (days_since_calz == 4*days_per_y) then year = year + 4 days_since_calz = days_per_y + 1 @@ -395,10 +395,10 @@ subroutine sec2time(year,month,day,tsec) day = days_since_calz - daycal(month) else ! Using fixed 365-day calendar - + year = int(days_since_calz/c365) days_since_calz = days_since_calz - year*365 + 1 - + ! Calculate the month month = 1 do k = 1, 12 @@ -416,7 +416,7 @@ end subroutine sec2time !======================================================================= -! Set the "days per month", "days per year", etc variables for the +! Set the "days per month", "days per year", etc variables for the ! current year. ! ! authors: Craig MacLachlan, UK Met Office @@ -433,7 +433,7 @@ subroutine set_calendar(year) if (mod(year, 4) == 0) isleap = .true. if (mod(year,100) == 0) isleap = .false. if (mod(year,400) == 0) isleap = .true. - + ! Ensure the calendar is set correctly if (isleap) then daycal = daycal366 diff --git a/configuration/driver/icedrv_constants.F90 b/configuration/driver/icedrv_constants.F90 index 961d6f822..4bb56c8b7 100644 --- a/configuration/driver/icedrv_constants.F90 +++ b/configuration/driver/icedrv_constants.F90 @@ -1,7 +1,7 @@ !======================================================================= ! ! This module defines a variety of physical and numerical constants -! used throughout the ice model +! used throughout the ice model ! ! author Elizabeth C. Hunke, LANL diff --git a/configuration/driver/icedrv_diagnostics.F90 b/configuration/driver/icedrv_diagnostics.F90 index d5f6f60ea..eaa44d5e1 100644 --- a/configuration/driver/icedrv_diagnostics.F90 +++ b/configuration/driver/icedrv_diagnostics.F90 @@ -83,7 +83,7 @@ subroutine runtime_diags (dt) snwredist ! fields at diagnostic points - real (kind=dbl_kind) :: & + real (kind=dbl_kind) :: & pTair, pfsnow, pfrain, & paice, hiavg, hsavg, hbravg, psalt, pTsfc, & pevap, pfhocn, fsdavg, & @@ -130,18 +130,18 @@ subroutine runtime_diags (dt) pTair = Tair(n) - Tffresh ! air temperature pfsnow = fsnow(n)*dt/rhos ! snowfall pfrain = frain(n)*dt/rhow ! rainfall - - paice = aice(n) ! ice area + + paice = aice(n) ! ice area hiavg = c0 ! avg ice thickness hsavg = c0 ! avg snow thickness - fsdavg = c0 ! FSD rep radius + fsdavg = c0 ! FSD rep radius hbravg = c0 ! avg brine thickness rsnwavg = c0 ! avg snow grain radius rhosavg = c0 ! avg snow density smicetot = c0 ! total mass of ice in snow (kg/m2) smliqtot = c0 ! total mass of liquid in snow (kg/m2) smtot = c0 ! total mass of snow volume (kg/m2) - psalt = c0 + psalt = c0 if (paice /= c0) then hiavg = vice(n)/paice hsavg = vsno(n)/paice @@ -181,7 +181,7 @@ subroutine runtime_diags (dt) pdhs(n) = vsno(n) - pdhs(n) ! snow thickness change pde(n) =-(work1(n)- pde(n))/dt ! ice/snow energy change pfhocn = -fhocn(n) ! ocean heat used by ice - + work3(:) = c0 do k = 1, n_iso @@ -193,9 +193,9 @@ subroutine runtime_diags (dt) !----------------------------------------------------------------- ! start spewing !----------------------------------------------------------------- - + write(nu_diag_out+n-1,899) nx_names(n) - + write(nu_diag_out+n-1,*) ' ' write(nu_diag_out+n-1,*) '----------atm----------' write(nu_diag_out+n-1,900) 'air temperature (C) = ',pTair @@ -218,7 +218,7 @@ subroutine runtime_diags (dt) write(nu_diag_out+n-1,900) 'avg brine thickness (m)= ',hbravg if (tr_fsd) & write(nu_diag_out+n-1,900) 'avg fsd rep radius (m) = ',fsdavg - + if (calc_Tsfc) then write(nu_diag_out+n-1,900) 'surface temperature(C) = ',pTsfc ! ice/snow write(nu_diag_out+n-1,900) 'absorbed shortwave flx = ',fswabs(n) @@ -257,7 +257,7 @@ subroutine runtime_diags (dt) write(nu_diag_out+n-1,900) 'sss (ppt) = ',sss(n) ! sea surface salinity write(nu_diag_out+n-1,900) 'freezing temp (C) = ',Tf(n) ! freezing temperature write(nu_diag_out+n-1,900) 'heat used (W/m^2) = ',pfhocn ! ocean heat used by ice - + if (tr_iso) then do k = 1, n_iso write(nu_diag_out+n-1,901) 'isotopic precip = ',fiso_atm(n,k)*dt,k @@ -471,7 +471,7 @@ subroutine print_state(plabel,i) character (*), intent(in) :: plabel - integer (kind=int_kind), intent(in) :: & + integer (kind=int_kind), intent(in) :: & i ! horizontal index ! local variables diff --git a/configuration/driver/icedrv_diagnostics_bgc.F90 b/configuration/driver/icedrv_diagnostics_bgc.F90 index 55f2a6e04..1eab55021 100644 --- a/configuration/driver/icedrv_diagnostics_bgc.F90 +++ b/configuration/driver/icedrv_diagnostics_bgc.F90 @@ -34,7 +34,7 @@ module icedrv_diagnostics_bgc ! authors: Nicole Jeffery, LANL subroutine hbrine_diags () - + use icedrv_arrays_column, only: darcy_V use icedrv_diagnostics, only: nx_names use icedrv_domain_size, only: nilyr @@ -93,13 +93,13 @@ subroutine hbrine_diags () !----------------------------------------------------------------- write(nu_diag_out+n-1,899) nx_names(n) - + write(nu_diag_out+n-1,*) '------ hbrine ------' write(nu_diag_out+n-1,900) 'hbrine, (m) = ',phinS write(nu_diag_out+n-1,900) 'fbri, cat1 (m) = ',pfbri write(nu_diag_out+n-1,900) 'hbrine cat1, (m) = ',phinS1 write(nu_diag_out+n-1,900) 'darcy_V cat1, (m/s)= ',pdarcy_V - if (ktherm == 2) then + if (ktherm == 2) then write(nu_diag_out+n-1,*) ' ' write(nu_diag_out+n-1,*) '------ Thermosaline Salinity ------' write(nu_diag_out+n-1,803) 'Sice1 cat1 S (ppt)' @@ -168,7 +168,7 @@ subroutine bgc_diags () integer (kind=int_kind), dimension(icepack_max_doc) :: & nt_bgc_doc, nlt_bgc_DOC integer (kind=int_kind), dimension(icepack_max_don) :: & - nt_bgc_don, nlt_bgc_DON + nt_bgc_don, nlt_bgc_DON integer (kind=int_kind), dimension(icepack_max_aero) :: & nt_zaero, nlt_zaero, nlt_zaero_sw integer (kind=int_kind), dimension(icepack_max_fe) :: & @@ -181,7 +181,7 @@ subroutine bgc_diags () real (kind=dbl_kind), dimension(icepack_max_don) :: & pDON_ac, pDON_sk real (kind=dbl_kind), dimension(icepack_max_fe ) :: & - pFed_ac, pFed_sk, pFep_ac, pFep_sk + pFed_ac, pFed_sk, pFep_ac, pFep_sk real (kind=dbl_kind), dimension(icepack_max_aero) :: & pflux_zaero, pflux_snow_zaero, pflux_atm_zaero, & pflux_atm_zaero_s @@ -196,7 +196,7 @@ subroutine bgc_diags () real (kind=dbl_kind), dimension(2,icepack_max_don) :: & pDONs real (kind=dbl_kind), dimension(2,icepack_max_fe ) :: & - pFeds, pFeps + pFeds, pFeps real (kind=dbl_kind), dimension(2,icepack_max_aero) :: & pzaeros real (kind=dbl_kind), dimension(nblyr+1) :: & @@ -210,8 +210,8 @@ subroutine bgc_diags () real (kind=dbl_kind), dimension(nblyr+1,icepack_max_don) :: & pDON real (kind=dbl_kind), dimension(nblyr+1,icepack_max_fe ) :: & - pFed, pFep - real (kind=dbl_kind), dimension (nblyr+1) :: & + pFed, pFep + real (kind=dbl_kind), dimension (nblyr+1) :: & zspace real (kind=dbl_kind), dimension (nslyr+nilyr+2) :: & pchlsw @@ -288,15 +288,15 @@ subroutine bgc_diags () if (tr_bgc_DON) then do k = 1,n_don pDON_ac(k) = ocean_bio(n,nlt_bgc_DON(k)) - enddo + enddo endif if (tr_bgc_Fe ) then - do k = 1,n_fed + do k = 1,n_fed pFed_ac (k) = ocean_bio(n,nlt_bgc_Fed (k)) - enddo - do k = 1,n_fep + enddo + do k = 1,n_fep pFep_ac (k) = ocean_bio(n,nlt_bgc_Fep (k)) - enddo + enddo endif if (tr_bgc_Nit) pNit_ac = ocean_bio(n,nlt_bgc_Nit) if (tr_bgc_Am) pAm_ac = ocean_bio(n,nlt_bgc_Am) diff --git a/configuration/driver/icedrv_domain_size.F90 b/configuration/driver/icedrv_domain_size.F90 index 9f951272a..b556f3ea1 100644 --- a/configuration/driver/icedrv_domain_size.F90 +++ b/configuration/driver/icedrv_domain_size.F90 @@ -21,24 +21,24 @@ module icedrv_domain_size nslyr = NSNWLYR , & ! number of snow layers per category n_iso = NTRISO , & ! number of isotopes in use n_aero = NTRAERO , & ! number of aerosols in use - n_zaero = TRZAERO , & ! number of z aerosols in use - n_algae = TRALG , & ! number of algae in use + n_zaero = TRZAERO , & ! number of z aerosols in use + n_algae = TRALG , & ! number of algae in use n_doc = TRDOC , & ! number of DOC pools in use n_dic = TRDIC , & ! number of DIC pools in use n_don = TRDON , & ! number of DON pools in use n_fed = TRFED , & ! number of Fe pools in use dissolved Fe n_fep = TRFEP , & ! number of Fe pools in use particulate Fe nfreq = 25 , & ! number of wave frequencies ! HARDWIRED FOR NOW - nblyr = NBGCLYR , & ! number of bio/brine layers per category + nblyr = NBGCLYR , & ! number of bio/brine layers per category ! maximum number of biology tracers + aerosols - ! *** add to kscavz in icepack_zbgc_shared.F90 + ! *** add to kscavz in icepack_zbgc_shared.F90 n_bgc = (n_algae*2 + n_doc + n_dic + n_don + n_fed + n_fep + n_zaero & - + 8) , & ! nit, am, sil, dmspp, dmspd, dms, pon, humic + + 8) , & ! nit, am, sil, dmspp, dmspd, dms, pon, humic nltrcr = (n_bgc*TRBGCZ+TRZS)*TRBRI, & ! number of zbgc (includes zaero) - ! and zsalinity tracers + ! and zsalinity tracers max_nsw = (nilyr+nslyr+2) & ! total chlorophyll plus aerosols * (1+TRZAERO),& ! number of tracers active in shortwave calculation - max_ntrcr = 1 & ! 1 = surface temperature + max_ntrcr = 1 & ! 1 = surface temperature + nilyr & ! ice salinity + nilyr & ! ice enthalpy + nslyr & ! snow enthalpy @@ -51,11 +51,11 @@ module icedrv_domain_size + TRSNOW*4*nslyr & ! snow redistribution/metamorphism + n_iso*2 & ! number of isotopes (in ice and snow) + n_aero*4 & ! number of aerosols * 4 aero layers - + TRBRI & ! brine height - + TRBGCS*n_bgc & ! skeletal layer BGC + + TRBRI & ! brine height + + TRBGCS*n_bgc & ! skeletal layer BGC + TRZS *TRBRI* nblyr & ! zsalinity (off if TRBRI=0) - + n_bgc*TRBGCZ*TRBRI*(nblyr+3) & ! zbgc (off if TRBRI=0) - + n_bgc*TRBGCZ & ! mobile/stationary phase tracer + + n_bgc*TRBGCZ*TRBRI*(nblyr+3) & ! zbgc (off if TRBRI=0) + + n_bgc*TRBGCZ & ! mobile/stationary phase tracer + 1 ! for unused tracer flags !======================================================================= diff --git a/configuration/driver/icedrv_flux.F90 b/configuration/driver/icedrv_flux.F90 index 9b3a3d32b..7e0e992ee 100644 --- a/configuration/driver/icedrv_flux.F90 +++ b/configuration/driver/icedrv_flux.F90 @@ -36,9 +36,9 @@ module icedrv_flux real (kind=dbl_kind), dimension (nx), public :: & - ! in from atmos (if .not.calc_strair) + ! in from atmos (if .not.calc_strair) strax , & ! wind stress components (N/m^2) - stray , & ! + stray , & ! ! in from ocean uocn , & ! ocean current, x-direction (m/s) @@ -66,7 +66,7 @@ module icedrv_flux closing, & ! rate of closing due to divergence/shear (1/s) opening ! rate of opening due to divergence/shear (1/s) - real (kind=dbl_kind), & + real (kind=dbl_kind), & dimension (nx,ncat), public :: & ! ridging diagnostics in categories dardg1ndt, & ! rate of area loss by ridging ice (1/s) @@ -77,7 +77,7 @@ module icedrv_flux ardgn, & ! fractional area of ridged ice vrdgn, & ! volume of ridged ice araftn, & ! rafting ice area - vraftn, & ! rafting ice volume + vraftn, & ! rafting ice volume aredistn, & ! redistribution function: fraction of new ridge area vredistn ! redistribution function: fraction of new ridge volume @@ -105,7 +105,7 @@ module icedrv_flux ! in from atmosphere (if .not. calc_Tsfc) ! These are per ice area - real (kind=dbl_kind), & + real (kind=dbl_kind), & dimension (nx,ncat), public :: & fsurfn_f , & ! net flux to top surface, excluding fcondtop fcondtopn_f, & ! downward cond flux at top surface (W m-2) @@ -205,7 +205,7 @@ module icedrv_flux snoicen ! snow-ice formation in category n (m) real (kind=dbl_kind), dimension (nx,ncat), public :: & - keffn_top ! effective thermal conductivity of the top ice layer + keffn_top ! effective thermal conductivity of the top ice layer ! on categories (W/m^2/K) ! quantities passed from ocean mixed layer to atmosphere @@ -247,8 +247,8 @@ module icedrv_flux mlt_onset, &! day of year that sfc melting begins 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), & + + real (kind=dbl_kind), & dimension (nx,ncat), public :: & fsurfn, & ! category fsurf fcondtopn,& ! category fcondtop @@ -259,10 +259,10 @@ module icedrv_flux ! As above but these remain grid box mean values i.e. they are not ! divided by aice at end of ice_dynamics. ! These are used for generating - ! ice diagnostics as these are more accurate. + ! ice diagnostics as these are more accurate. ! (The others suffer from problem of incorrect values at grid boxes ! that change from an ice free state to an icy state.) - + real (kind=dbl_kind), dimension (nx), public :: & fresh_ai, & ! fresh water flux to ocean (kg/m^2/s) fsalt_ai, & ! salt flux to ocean (kg/m^2/s) @@ -277,12 +277,12 @@ module icedrv_flux rside , & ! fraction of ice that melts laterally fside , & ! lateral heat flux (W/m^2) fsw , & ! incoming shortwave radiation (W/m^2) - coszen , & ! cosine solar zenith angle, < 0 for sun below horizon + coszen , & ! cosine solar zenith angle, < 0 for sun below horizon rdg_conv, & ! convergence term for ridging (1/s) rdg_shear ! shear term for ridging (1/s) - + real (kind=dbl_kind), dimension(nx,nilyr+1), public :: & - salinz , & ! initial salinity profile (ppt) + salinz , & ! initial salinity profile (ppt) Tmltz ! initial melting temperature (C) !----------------------------------------------------------------- @@ -293,12 +293,12 @@ module icedrv_flux real (kind=dbl_kind), & ! coupling variable for both tr_aero and tr_zaero dimension (nx,icepack_max_aero), public :: & - faero_atm ! aerosol deposition rate (kg/m^2 s) + faero_atm ! aerosol deposition rate (kg/m^2 s) real (kind=dbl_kind), & ! coupling variable for tr_iso dimension (nx,icepack_max_iso), public :: & - fiso_atm , & ! isotope deposition rate (kg/m^2 s) - fiso_evap ! isotope evaporation rate (kg/m^2 s) + fiso_atm , & ! isotope deposition rate (kg/m^2 s) + fiso_evap ! isotope evaporation rate (kg/m^2 s) real (kind=dbl_kind), & dimension (nx,icepack_max_nbtrcr), public :: & @@ -324,8 +324,8 @@ module icedrv_flux flux_bio_ai ! all bio fluxes to ocean, averaged over grid cell real (kind=dbl_kind), dimension (nx), public :: & - fzsal_ai, & ! salt flux to ocean from zsalinity (kg/m^2/s) - fzsal_g_ai ! gravity drainage salt flux to ocean (kg/m^2/s) + fzsal_ai, & ! salt flux to ocean from zsalinity (kg/m^2/s) + fzsal_g_ai ! gravity drainage salt flux to ocean (kg/m^2/s) ! internal @@ -337,7 +337,7 @@ module icedrv_flux dsnown ! change in snow thickness in category n (m) real (kind=dbl_kind), dimension (nx), public :: & - nit , & ! ocean nitrate (mmol/m^3) + nit , & ! ocean nitrate (mmol/m^3) amm , & ! ammonia/um (mmol/m^3) sil , & ! silicate (mmol/m^3) dmsp , & ! dmsp (mmol/m^3) @@ -364,15 +364,15 @@ module icedrv_flux fdon ! ice-ocean don flux (mmol/m^2/s) (proteins and amino acids) real (kind=dbl_kind), dimension (nx,icepack_max_dic), public :: & - dic , & ! ocean dic (mmol/m^3) - fdic ! ice-ocean dic flux (mmol/m^2/s) + dic , & ! ocean dic (mmol/m^3) + fdic ! ice-ocean dic flux (mmol/m^2/s) real (kind=dbl_kind), dimension (nx,icepack_max_fe), public :: & - fed, fep , & ! ocean dissolved and particulate fe (nM) - ffed, ffep ! ice-ocean dissolved and particulate fe flux (umol/m^2/s) + fed, fep , & ! ocean dissolved and particulate fe (nM) + ffed, ffep ! ice-ocean dissolved and particulate fe flux (umol/m^2/s) real (kind=dbl_kind), dimension (nx,icepack_max_aero), public :: & - zaeros ! ocean aerosols (mmol/m^3) + zaeros ! ocean aerosols (mmol/m^3) !======================================================================= @@ -520,7 +520,7 @@ subroutine init_coupler_flux fsens (:) = c0 flat (:) = c0 fswabs (:) = c0 - flwout (:) = -stefan_boltzmann*Tffresh**4 + flwout (:) = -stefan_boltzmann*Tffresh**4 ! in case atm model diagnoses Tsfc from flwout evap (:) = c0 evaps (:) = c0 @@ -561,7 +561,7 @@ subroutine init_coupler_flux fdon (:,:)= c0 ffep (:,:)= c0 ffed (:,:)= c0 - + !----------------------------------------------------------------- ! derived or computed fields !----------------------------------------------------------------- @@ -569,7 +569,7 @@ subroutine init_coupler_flux coszen (:) = c0 ! Cosine of the zenith angle ! fsw (:) = c0 ! shortwave radiation (W/m^2) fsw (:) = swvdr(:) + swvdf(:) + swidr(:) + swidf(:) - scale_factor(:) = c1 ! shortwave scaling factor + scale_factor(:) = c1 ! shortwave scaling factor wind (:) = sqrt(uatm(:)**2 + vatm(:)**2) ! wind speed, (m/s) Cdn_atm(:) = (vonkar/log(zref/iceruf)) & * (vonkar/log(zref/iceruf)) ! atmo drag for RASM @@ -695,8 +695,8 @@ subroutine init_history_therm snowfrac (:) = c0 frazil_diag (:) = c0 - ! drag coefficients are computed prior to the atmo_boundary call, - ! during the thermodynamics section + ! drag coefficients are computed prior to the atmo_boundary call, + ! during the thermodynamics section Cdn_ocn(:) = dragio Cdn_atm(:) = (vonkar/log(zref/iceruf)) & * (vonkar/log(zref/iceruf)) ! atmo drag for RASM @@ -781,7 +781,7 @@ subroutine init_history_bgc use icedrv_arrays_column, only: PP_net, grow_net, hbri use icedrv_arrays_column, only: ice_bio_net, snow_bio_net, fbio_snoice, fbio_atmice - use icedrv_arrays_column, only: fzsal, fzsal_g, zfswin + use icedrv_arrays_column, only: fzsal, fzsal_g, zfswin character(len=*), parameter :: subname='(init_history_bgc)' PP_net (:) = c0 diff --git a/configuration/driver/icedrv_forcing.F90 b/configuration/driver/icedrv_forcing.F90 index cfee30172..5a4854988 100644 --- a/configuration/driver/icedrv_forcing.F90 +++ b/configuration/driver/icedrv_forcing.F90 @@ -13,8 +13,8 @@ module icedrv_forcing use icedrv_constants, only: nu_diag, nu_forcing, nu_open_clos use icedrv_constants, only: c0, c1, c2, c10, c100, p5, c4, c24 use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted - use icepack_intfc, only: icepack_init_parameters, icepack_query_parameters - use icepack_intfc, only: icepack_sea_freezing_temperature + use icepack_intfc, only: icepack_query_parameters + use icepack_intfc, only: icepack_sea_freezing_temperature use icepack_intfc, only: icepack_init_wave use icedrv_system, only: icedrv_system_abort use icedrv_flux, only: zlvl, Tair, potT, rhoa, uatm, vatm, wind, & @@ -52,7 +52,7 @@ module icedrv_forcing flw_data, & qdp_data, & sst_data, & - sss_data, & + sss_data, & uocn_data, & vocn_data, & frain_data, & @@ -70,7 +70,7 @@ module icedrv_forcing open_data, & clos_data - character(char_len), public :: & + character(char_len), public :: & atm_data_format, & ! 'bin'=binary or 'nc'=netcdf ocn_data_format, & ! 'bin'=binary or 'nc'=netcdf bgc_data_format, & ! 'bin'=binary or 'nc'=netcdf @@ -82,8 +82,8 @@ module icedrv_forcing ice_data_file, & ! ice forcing data file bgc_data_file, & ! biogeochemistry forcing data file precip_units ! 'mm_per_month', 'mm_per_sec', 'mks' - - character(char_len_long), public :: & + + character(char_len_long), public :: & data_dir ! top directory for forcing data real (kind=dbl_kind), parameter, public :: & @@ -137,10 +137,10 @@ subroutine init_forcing potT_data(:) = potT (i) ! air potential temperature (K) rhoa_data(:) = rhoa (i) ! air density (kg/m^3) uatm_data(:) = uatm (i) ! wind velocity components (m/s) - vatm_data(:) = vatm (i) + vatm_data(:) = vatm (i) wind_data(:) = wind (i) ! wind speed (m/s) strax_data(:) = strax(i) ! wind stress components (N/m^2) - stray_data(:) = stray(i) + stray_data(:) = stray(i) fsw_data(:) = fsw (i) ! incoming shortwave radiation (W/m^2) swvdr_data(:) = swvdr(i) ! sw down, visible, direct (W/m^2) swvdf_data(:) = swvdf(i) ! sw down, visible, diffuse (W/m^2) @@ -628,7 +628,7 @@ subroutine prepare_forcing (Tair, fsw, & logical (kind=log_kind) :: & calc_strair - real (kind=dbl_kind), parameter :: & + real (kind=dbl_kind), parameter :: & lapse_rate = 0.0065_dbl_kind ! (K/m) lapse rate over sea level real (kind=dbl_kind) :: & @@ -653,11 +653,11 @@ subroutine prepare_forcing (Tair, fsw, & ! convert precipitation units to kg/m^2 s !----------------------------------------------------------------- if (trim(precip_units) == 'mm_per_month') then - precip_factor = 12._dbl_kind/(secday*dayyr) + precip_factor = 12._dbl_kind/(secday*dayyr) elseif (trim(precip_units) == 'mm_per_day') then precip_factor = c1/secday elseif (trim(precip_units) == 'mm_per_sec' .or. & - trim(precip_units) == 'mks') then + trim(precip_units) == 'mks') then precip_factor = c1 ! mm/sec = kg/m^2 s endif @@ -712,15 +712,15 @@ subroutine prepare_forcing (Tair, fsw, & swvdf(nt) = fsw(nt)*frcvdf ! visible diffuse swidr(nt) = fsw(nt)*frcidr ! near IR direct swidf(nt) = fsw(nt)*frcidf ! near IR diffuse - + ! precipitation fsnow(nt) = fsnow(nt) * precip_factor ! determine whether precip is rain or snow - ! HadGEM forcing provides separate snowfall and rainfall rather + ! HadGEM forcing provides separate snowfall and rainfall rather ! than total precipitation ! if (trim(atm_data_type) /= 'hadgem') then - frain(nt) = c0 + frain(nt) = c0 if (Tair(nt) >= Tffresh) then frain(nt) = fsnow(nt) fsnow(nt) = c0 @@ -843,7 +843,7 @@ subroutine interp_coeff (recnum, recslot, secint, dataloc, & else ! recslot = 1 if (dataloc==1) then ! data located at middle of interval t1 = (rcnum-p5)*secint - else + else t1 = rcnum*secint ! data located at end of interval endif t2 = t1 + secint ! + 1 interval @@ -989,7 +989,7 @@ subroutine ocn_NICE qdp ! deep ocean heat flux character (char_len_long) filename - + character(len=*), parameter :: subname='(ocn_NICE)' ! ocn_data_file = 'oceanmixed_daily_3.txt' @@ -1039,7 +1039,7 @@ subroutine ocn_ISPOL qdp ! deep ocean heat flux character (char_len_long) filename - + character(len=*), parameter :: subname='(ocn_ISPOL)' ! ocn_data_file = 'pop_frc.gx1v3.051202_but_hblt_from_010815_ispol.txt' @@ -1133,7 +1133,7 @@ end subroutine ice_open_clos !======================================================================= subroutine get_wave_spec - + use icedrv_arrays_column, only: wave_spectrum, wave_sig_ht, & dwavefreq, wavefreq use icedrv_domain_size, only: nfreq diff --git a/configuration/driver/icedrv_forcing_bgc.F90 b/configuration/driver/icedrv_forcing_bgc.F90 index 22f7bc4e1..f47102278 100644 --- a/configuration/driver/icedrv_forcing_bgc.F90 +++ b/configuration/driver/icedrv_forcing_bgc.F90 @@ -19,7 +19,7 @@ module icedrv_forcing_bgc implicit none private - public :: get_forcing_bgc, faero_default, fiso_default, init_forcing_bgc + public :: get_forcing_bgc, faero_default, fiso_default, init_forcing_bgc real (kind=dbl_kind), dimension(365) :: & ! hardwired for now sil_data, nit_data @@ -45,10 +45,10 @@ subroutine init_forcing_bgc character (char_len_long) filename character(len=*), parameter :: subname='(init_forcing_bgc)' - + if (trim(bgc_data_type) == 'ISPOL' .or. & trim(bgc_data_type) == 'NICE') then - + if (trim(bgc_data_type) == 'ISPOL') & filename = trim(data_dir)//'/ISPOL_2004/'//trim(bgc_data_file) if (trim(bgc_data_type) == 'NICE') & @@ -71,7 +71,7 @@ subroutine init_forcing_bgc end if end subroutine init_forcing_bgc - + !======================================================================= ! ! Read and interpolate annual climatologies of silicate and nitrate. @@ -112,18 +112,18 @@ subroutine get_forcing_bgc trim(bgc_data_type) == 'NICE') then dataloc = 2 ! data located at end of interval - maxrec = 365 ! - + maxrec = 365 ! + ! current record number - recnum = int(yday) - + recnum = int(yday) + ! Compute record numbers for surrounding data (2 on each side) ixm = mod(recnum+maxrec-2,maxrec) + 1 ixx = mod(recnum-1, maxrec) + 1 - + recslot = 2 call interp_coeff (recnum, recslot, secday, dataloc, c1intp, c2intp) - + if (tr_bgc_Sil) then sil(:) = c1intp * sil_data(ixm) + c2intp * sil_data(ixx) endif @@ -152,19 +152,19 @@ end subroutine get_forcing_bgc ! authors: Elizabeth Hunke, LANL subroutine faero_default - + use icedrv_flux, only: faero_atm character(len=*), parameter :: subname='(faero_default)' - + faero_atm(:,1) = 1.e-12_dbl_kind ! kg/m^2 s faero_atm(:,2) = 1.e-13_dbl_kind faero_atm(:,3) = 1.e-14_dbl_kind faero_atm(:,4) = 1.e-14_dbl_kind faero_atm(:,5) = 1.e-14_dbl_kind faero_atm(:,6) = 1.e-14_dbl_kind - + end subroutine faero_default - + !======================================================================= ! constant values for atmospheric water isotopes diff --git a/configuration/driver/icedrv_init.F90 b/configuration/driver/icedrv_init.F90 index a29bf25af..b00aaf37d 100644 --- a/configuration/driver/icedrv_init.F90 +++ b/configuration/driver/icedrv_init.F90 @@ -99,7 +99,7 @@ subroutine input_data natmiter, kitd, kcatbound character (len=char_len) :: shortwave, albedo_type, conduct, fbot_xfer_type, & - tfrz_option, frzpnd, atmbndy, wave_spec_type, snwredist, snw_aging_table + tfrz_option, saltflux_option, frzpnd, atmbndy, wave_spec_type, snwredist, snw_aging_table logical (kind=log_kind) :: sw_redist, use_smliq_pnd, snwgrain real (kind=dbl_kind) :: sw_frac, sw_dtemp @@ -107,6 +107,9 @@ subroutine input_data ! Flux convergence tolerance real (kind=dbl_kind) :: atmiter_conv + ! Ice reference salinity for fluxes + real (kind=dbl_kind) :: ice_ref_salinity + logical (kind=log_kind) :: calc_Tsfc, formdrag, highfreq, calc_strair, calc_dragio logical (kind=log_kind) :: conserv_check @@ -119,7 +122,7 @@ subroutine input_data nt_smice, nt_smliq, nt_rhos, nt_rsnw, & nt_aero, nt_fsd, nt_isosno, nt_isoice - real (kind=real_kind) :: rplvl, rptopo + real (kind=real_kind) :: rplvl, rptopo real (kind=dbl_kind) :: Cf, puny character(len=*), parameter :: subname='(input_data)' @@ -170,7 +173,8 @@ subroutine input_data fbot_xfer_type, oceanmixed_ice, emissivity, & formdrag, highfreq, natmiter, & atmiter_conv, calc_dragio, & - tfrz_option, default_season, wave_spec_type, & + tfrz_option, saltflux_option, ice_ref_salinity, & + default_season, wave_spec_type, & precip_units, fyear_init, ycycle, & atm_data_type, ocn_data_type, bgc_data_type, & atm_data_file, ocn_data_file, bgc_data_file, & @@ -205,7 +209,7 @@ subroutine input_data atmbndy_out=atmbndy, calc_strair_out=calc_strair, & formdrag_out=formdrag, highfreq_out=highfreq, & emissivity_out=emissivity, & - kitd_out=kitd, kcatbound_out=kcatbound, hs0_out=hs0, & + kitd_out=kitd, kcatbound_out=kcatbound, hs0_out=hs0, & dpscale_out=dpscale, frzpnd_out=frzpnd, & rfracmin_out=rfracmin, rfracmax_out=rfracmax, & pndaspect_out=pndaspect, hs1_out=hs1, hp1_out=hp1, & @@ -218,7 +222,8 @@ subroutine input_data dSdt_slow_mode_out=dSdt_slow_mode, & phi_c_slow_mode_out=phi_c_slow_mode, Tliquidus_max_out=Tliquidus_max, & phi_i_mushy_out=phi_i_mushy, conserv_check_out=conserv_check, & - tfrz_option_out=tfrz_option, kalg_out=kalg, & + tfrz_option_out=tfrz_option, saltflux_option_out=saltflux_option, & + ice_ref_salinity_out=ice_ref_salinity, kalg_out=kalg, & fbot_xfer_type_out=fbot_xfer_type, puny_out=puny, & wave_spec_type_out=wave_spec_type, & sw_redist_out=sw_redist, sw_frac_out=sw_frac, sw_dtemp_out=sw_dtemp, & @@ -241,11 +246,11 @@ subroutine input_data year_init = 0 ! initial year istep0 = 0 ! no. of steps taken in previous integrations, ! real (dumped) or imagined (to set calendar) - dt = 3600.0_dbl_kind ! time step, s - npt = 99999 ! total number of time steps (dt) + dt = 3600.0_dbl_kind ! time step, s + npt = 99999 ! total number of time steps (dt) diagfreq = 24 ! how often diag output is written diag_file = 'ice_diag' ! history file name prefix - cpl_bgc = .false. ! + cpl_bgc = .false. ! dumpfreq='y' ! restart frequency option dump_last=.false. ! restart at end of run restart = .false. ! if true, read restart files for initialization @@ -282,7 +287,7 @@ subroutine input_data ! extra tracers tr_iage = .false. ! ice age tr_FY = .false. ! ice age - tr_lvl = .false. ! level ice + tr_lvl = .false. ! level ice tr_pond_lvl = .false. ! level-ice melt ponds tr_pond_topo = .false. ! topographic melt ponds tr_snow = .false. ! snow tracers (wind redistribution, metamorphosis) @@ -426,13 +431,13 @@ subroutine input_data !----------------------------------------------------------------- ! set up diagnostics output and resolve conflicts !----------------------------------------------------------------- - + write(ice_stdout,*) 'Diagnostic output will be in files ' write(ice_stdout,*)' ','icepack.runlog.timestamp' do n = 1,nx write(nx_names(n),'(a,i2.2)') 'point_',n - enddo + enddo nx_names_default(1) = 'icefree' nx_names_default(2) = 'slab' nx_names_default(3) = 'full_ITD' @@ -447,7 +452,7 @@ subroutine input_data write(ice_stdout,*)' ',trim(diag_file_names) open(nu_diag_out+n-1, file=diag_file_names, status='unknown') end do - + write(nu_diag,*) '-----------------------------------' write(nu_diag,*) ' ICEPACK model diagnostic output ' write(nu_diag,*) '-----------------------------------' @@ -579,6 +584,13 @@ subroutine input_data 'WARNING: For consistency, set tfrz_option = mushy' endif + if (ktherm == 1 .and. trim(saltflux_option) /= 'constant') then + write (nu_diag,*) & + 'WARNING: ktherm = 1 and saltflux_option = ',trim(saltflux_option) + write (nu_diag,*) & + 'WARNING: For consistency, set saltflux_option = constant' + endif + if (ktherm == 0) then write (nu_diag,*) 'WARNING: ktherm = 0 zero-layer thermodynamics' write (nu_diag,*) 'WARNING: has been deprecated' @@ -614,7 +626,7 @@ subroutine input_data wave_spec = .false. if (tr_fsd .and. (trim(wave_spec_type) /= 'none')) wave_spec = .true. if (tr_fsd .and. (trim(wave_spec_type) == 'none')) then - write (nu_diag,*) 'WARNING: tr_fsd=T but wave_spec=F - not recommended' + write (nu_diag,*) 'WARNING: tr_fsd=T but wave_spec=F - not recommended' end if !----------------------------------------------------------------- @@ -755,6 +767,11 @@ subroutine input_data write(nu_diag,1030) ' fbot_xfer_type = ', trim(fbot_xfer_type) write(nu_diag,1010) ' oceanmixed_ice = ', oceanmixed_ice write(nu_diag,1030) ' tfrz_option = ', trim(tfrz_option) + write(nu_diag,*) ' saltflux_option = ', & + trim(saltflux_option) + if (trim(saltflux_option) == 'constant') then + write(nu_diag,1005) ' ice_ref_salinity = ', ice_ref_salinity + endif write(nu_diag,1010) ' restore_ocn = ', restore_ocn if (restore_ocn) & write(nu_diag,1005) ' trestore = ', trestore @@ -815,7 +832,7 @@ subroutine input_data nt_ipnd = ntrcr ! on level-ice ponds (if frzpnd='hlid') endif if (tr_pond_topo) then - ntrcr = ntrcr + 1 ! + ntrcr = ntrcr + 1 ! nt_ipnd = ntrcr ! refrozen pond ice lid thickness endif endif @@ -855,12 +872,12 @@ subroutine input_data nt_aero = ntrcr + 1 ntrcr = ntrcr + 4*n_aero ! 4 dEdd layers, n_aero species endif - + if (ntrcr > max_ntrcr-1) then write(nu_diag,*) 'max_ntrcr-1 < number of namelist tracers' write(nu_diag,*) 'max_ntrcr-1 = ',max_ntrcr-1,' ntrcr = ',ntrcr call icedrv_system_abort(file=__FILE__,line=__LINE__) - endif + endif write(nu_diag,*) ' ' write(nu_diag,1020) 'max_ntrcr = ', max_ntrcr @@ -936,7 +953,8 @@ subroutine input_data dSdt_slow_mode_in=dSdt_slow_mode, & phi_c_slow_mode_in=phi_c_slow_mode, Tliquidus_max_in=Tliquidus_max, & phi_i_mushy_in=phi_i_mushy, conserv_check_in=conserv_check, & - tfrz_option_in=tfrz_option, kalg_in=kalg, & + tfrz_option_in=tfrz_option, saltflux_option_in=saltflux_option, & + ice_ref_salinity_in=ice_ref_salinity, kalg_in=kalg, & fbot_xfer_type_in=fbot_xfer_type, & wave_spec_type_in=wave_spec_type, wave_spec_in=wave_spec, & sw_redist_in=sw_redist, sw_frac_in=sw_frac, sw_dtemp_in=sw_dtemp, & @@ -1146,11 +1164,11 @@ subroutine init_state do it = 1, ntrcr ! mask for base quantity on which tracers are carried if (trcr_depend(it) == 0) then ! area - trcr_base(it,1) = c1 + trcr_base(it,1) = c1 elseif (trcr_depend(it) == 1) then ! ice volume - trcr_base(it,2) = c1 + trcr_base(it,2) = c1 elseif (trcr_depend(it) == 2) then ! snow volume - trcr_base(it,3) = c1 + trcr_base(it,3) = c1 else trcr_base(it,1) = c1 ! default: ice area trcr_base(it,2) = c0 @@ -1259,8 +1277,8 @@ subroutine set_state_var (nx, & ! ocean values may be redefined here, unlike in CICE real (kind=dbl_kind), dimension (nx), intent(inout) :: & - Tf , & ! freezing temperature (C) - sst ! sea surface temperature (C) + Tf , & ! freezing temperature (C) + sst ! sea surface temperature (C) real (kind=dbl_kind), dimension (nx,nilyr), & intent(in) :: & @@ -1336,7 +1354,7 @@ subroutine set_state_var (nx, & aicen(i,n) = c0 vicen(i,n) = c0 vsnon(i,n) = c0 - trcrn(i,nt_Tsfc,n) = Tf(i) ! surface temperature + trcrn(i,nt_Tsfc,n) = Tf(i) ! surface temperature if (max_ntrcr >= 2) then do it = 2, max_ntrcr trcrn(i,it,n) = c0 @@ -1364,7 +1382,7 @@ subroutine set_state_var (nx, & !----------------------------------------------------------------- i = 1 ! ice-free - ! already initialized above + ! already initialized above !----------------------------------------------------------------- @@ -1399,7 +1417,7 @@ subroutine set_state_var (nx, & afsd=trcrn(i,nt_fsd:nt_fsd+nfsd-1,n)) ! surface temperature trcrn(i,nt_Tsfc,n) = Tsfc ! deg C - ! ice enthalpy, salinity + ! ice enthalpy, salinity do k = 1, nilyr trcrn(i,nt_qice+k-1,n) = qin(k) trcrn(i,nt_sice+k-1,n) = salinz(i,k) @@ -1423,17 +1441,17 @@ subroutine set_state_var (nx, & call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & file=__FILE__, line=__LINE__) - endif - + + endif ! (i <= nx) !----------------------------------------------------------------- i = 3 ! full thickness distribution if (i <= nx) then ! initial category areas in cells with ice hbar = c3 ! initial ice thickness with greatest area - ! Note: the resulting average ice thickness + ! Note: the resulting average ice thickness ! tends to be less than hbar due to the - ! nonlinear distribution of ice thicknesses + ! nonlinear distribution of ice thicknesses sum = c0 do n = 1, ncat @@ -1449,7 +1467,7 @@ subroutine set_state_var (nx, & do n = 1, ncat ainit(n) = ainit(n) / (sum + puny/ncat) ! normalize enddo - + do n = 1, ncat ! ice volume, snow volume aicen(i,n) = ainit(n) @@ -1471,7 +1489,7 @@ subroutine set_state_var (nx, & ! surface temperature trcrn(i,nt_Tsfc,n) = Tsfc ! deg C - ! ice enthalpy, salinity + ! ice enthalpy, salinity do k = 1, nilyr trcrn(i,nt_qice+k-1,n) = qin(k) trcrn(i,nt_sice+k-1,n) = salinz(i,k) @@ -1495,10 +1513,11 @@ subroutine set_state_var (nx, & call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & file=__FILE__, line=__LINE__) - endif + + endif ! (i <= nx) !----------------------------------------------------------------- - + ! land ! already initialized above (tmask = 0) i = 4 diff --git a/configuration/driver/icedrv_init_column.F90 b/configuration/driver/icedrv_init_column.F90 index ab4a0d59a..852ad5430 100644 --- a/configuration/driver/icedrv_init_column.F90 +++ b/configuration/driver/icedrv_init_column.F90 @@ -288,7 +288,7 @@ subroutine init_shortwave call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & file=__FILE__, line=__LINE__) - + !----------------------------------------------------------------- ! Define aerosol tracer on shortwave grid !----------------------------------------------------------------- @@ -304,29 +304,29 @@ subroutine init_shortwave enddo !----------------------------------------------------------------- - ! Aggregate albedos + ! Aggregate albedos !----------------------------------------------------------------- do n = 1, ncat do i = 1, nx - + if (aicen(i,n) > puny) then - + alvdf(i) = alvdf(i) + alvdfn(i,n)*aicen(i,n) alidf(i) = alidf(i) + alidfn(i,n)*aicen(i,n) alvdr(i) = alvdr(i) + alvdrn(i,n)*aicen(i,n) alidr(i) = alidr(i) + alidrn(i,n)*aicen(i,n) - + netsw = swvdr(i) + swidr(i) + swvdf(i) + swidf(i) if (netsw > puny) then ! sun above horizon albice(i) = albice(i) + albicen(i,n)*aicen(i,n) albsno(i) = albsno(i) + albsnon(i,n)*aicen(i,n) albpnd(i) = albpnd(i) + albpndn(i,n)*aicen(i,n) endif - + apeff_ai(i) = apeff_ai(i) + apeffn(i,n)*aicen(i,n) snowfrac(i) = snowfrac(i) + snowfracn(i,n)*aicen(i,n) - + endif ! aicen > puny enddo ! i enddo ! ncat @@ -341,7 +341,7 @@ subroutine init_shortwave alidf_ai (i) = alidf (i) alvdr_ai (i) = alvdr (i) alidr_ai (i) = alidr (i) - + !---------------------------------------------------------------- ! Save net shortwave for scaling factor in scale_factor !---------------------------------------------------------------- @@ -364,7 +364,7 @@ end subroutine init_shortwave ! Initialize vertical profile for biogeochemistry - subroutine init_bgc() + subroutine init_bgc() use icedrv_arrays_column, only: zfswin, trcrn_sw use icedrv_arrays_column, only: ocean_bio_all, ice_bio_net, snow_bio_net @@ -395,10 +395,10 @@ subroutine init_bgc() RayleighR real(kind=dbl_kind), dimension(max_ntrcr,ncat) :: & - trcrn_bgc - + trcrn_bgc + real(kind=dbl_kind), dimension(nilyr,ncat) :: & - sicen + sicen integer (kind=int_kind) :: & nbtrcr, ntrcr, ntrcr_o, & @@ -408,13 +408,13 @@ subroutine init_bgc() ! Initialize - bphi(:,:,:) = c0 ! initial porosity for no ice + bphi(:,:,:) = c0 ! initial porosity for no ice iDi (:,:,:) = c0 ! interface diffusivity bTiz(:,:,:) = c0 ! initial bio grid ice temperature iki (:,:,:) = c0 ! permeability ocean_bio_all(:,:) = c0 - ice_bio_net (:,:) = c0 ! integrated ice tracer conc (mmol/m^2 or mg/m^2) + ice_bio_net (:,:) = c0 ! integrated ice tracer conc (mmol/m^2 or mg/m^2) snow_bio_net (:,:) = c0 ! integrated snow tracer conc (mmol/m^2 or mg/m^2) zfswin (:,:,:) = c0 ! shortwave flux on bio grid trcrn_sw (:,:,:) = c0 ! tracers active in the shortwave calculation @@ -438,7 +438,7 @@ subroutine init_bgc() !----------------------------------------------------------------- ! zsalinity initialization !----------------------------------------------------------------- - + if (solve_zsal) then do i = 1, nx call icepack_init_zsalinity(ncat=ncat, nblyr=nblyr, & @@ -492,7 +492,7 @@ subroutine init_bgc() max_aero =max_aero, max_dic=max_dic, max_fe =max_fe, & nit =nit(i), amm=amm(i), sil =sil(i), & dmsp=dmsp(i), dms=dms(i), algalN=algalN(i,:), & - doc =doc(i,:), don=don(i,:), dic =dic(i,:), & + doc =doc(i,:), don=don(i,:), dic =dic(i,:), & fed =fed(i,:), fep=fep(i,:), zaeros=zaeros(i,:), & ocean_bio_all=ocean_bio_all(i,:), hum=hum(i)) call icepack_warnings_flush(nu_diag) @@ -562,7 +562,7 @@ subroutine init_hbrine() if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & file=__FILE__,line= __LINE__) - first_ice(:,:) = .true. + first_ice(:,:) = .true. if (tr_brine) trcrn(:,nt_fbri,:) = c1 end subroutine init_hbrine @@ -570,7 +570,7 @@ end subroutine init_hbrine !======================================================================= ! Namelist variables, set to default values; may be altered at run time -! +! ! author Elizabeth C. Hunke, LANL ! Nicole Jeffery, LANL @@ -653,7 +653,7 @@ subroutine init_zbgc tr_bgc_N, tr_bgc_C, tr_bgc_chl, & tr_bgc_DON, tr_bgc_Fe, tr_zaero, & tr_bgc_hum, tr_aero - + integer (kind=int_kind) :: & ktherm @@ -703,9 +703,9 @@ subroutine init_zbgc fedtype_1 , feptype_1 , zaerotype_bc1 , & zaerotype_bc2 , zaerotype_dust1 , zaerotype_dust2 , & zaerotype_dust3 , zaerotype_dust4 , ratio_C2N_diatoms , & - ratio_C2N_sp , ratio_C2N_phaeo , ratio_chl2N_diatoms, & + ratio_C2N_sp , ratio_C2N_phaeo , ratio_chl2N_diatoms, & ratio_chl2N_sp , ratio_chl2N_phaeo , F_abs_chl_diatoms , & - F_abs_chl_sp , F_abs_chl_phaeo , ratio_C2N_proteins + F_abs_chl_sp , F_abs_chl_phaeo , ratio_C2N_proteins real (kind=dbl_kind), dimension(icepack_max_dic) :: & dictype @@ -737,16 +737,16 @@ subroutine init_zbgc R_C2N_DON real (kind=dbl_kind), dimension(icepack_max_algae) :: & - R_Si2N , & ! algal Sil to N (mole/mole) + R_Si2N , & ! algal Sil to N (mole/mole) R_S2N , & ! algal S to N (mole/mole) ! Marchetti et al 2006, 3 umol Fe/mol C for iron limited Pseudo-nitzschia R_Fe2C , & ! algal Fe to carbon (umol/mmol) R_Fe2N ! algal Fe to N (umol/mmol) - real (kind=dbl_kind), dimension(icepack_max_don) :: & + real (kind=dbl_kind), dimension(icepack_max_don) :: & R_Fe2DON ! Fe to N of DON (nmol/umol) - real (kind=dbl_kind), dimension(icepack_max_doc) :: & + real (kind=dbl_kind), dimension(icepack_max_doc) :: & R_Fe2DOC ! Fe to C of DOC (nmol/umol) real (kind=dbl_kind), dimension(icepack_max_algae) :: & @@ -759,11 +759,11 @@ subroutine init_zbgc mort_pre , & ! mortality (1/day) mort_Tdep , & ! T dependence of mortality (1/C) k_exude , & ! algal carbon exudation rate (1/d) - K_Nit , & ! nitrate half saturation (mmol/m^3) - K_Am , & ! ammonium half saturation (mmol/m^3) + K_Nit , & ! nitrate half saturation (mmol/m^3) + K_Am , & ! ammonium half saturation (mmol/m^3) K_Sil , & ! silicon half saturation (mmol/m^3) K_Fe ! iron half saturation or micromol/m^3 - + real (kind=dbl_kind), dimension(icepack_max_DON) :: & f_don , & ! fraction of spilled grazing to DON kn_bac , & ! Bacterial degredation of DON (1/d) @@ -771,13 +771,13 @@ subroutine init_zbgc real (kind=dbl_kind), dimension(icepack_max_DOC) :: & f_exude , & ! fraction of exuded carbon to each DOC pool - k_bac ! Bacterial degredation of DOC (1/d) + k_bac ! Bacterial degredation of DOC (1/d) real (kind=dbl_kind), dimension(icepack_max_nbtrcr) :: & zbgc_frac_init,&! initializes mobile fraction - bgc_tracer_type ! described tracer in mobile or stationary phases + bgc_tracer_type ! described tracer in mobile or stationary phases ! < 0 is purely mobile (eg. nitrate) - ! > 0 has timescales for transitions between + ! > 0 has timescales for transitions between ! phases based on whether the ice is melting or growing real (kind=dbl_kind), dimension(icepack_max_nbtrcr) :: & @@ -798,7 +798,7 @@ subroutine init_zbgc character(len=*), parameter :: subname='(init_zbgc)' !------------------------------------------------------------ - ! Tracers have mobile and stationary phases. + ! Tracers have mobile and stationary phases. ! ice growth allows for retention, ice melt facilitates mobility ! bgc_tracer_type defines the exchange timescales between these phases ! -1 : entirely in the mobile phase, no exchange (this is the default) @@ -855,9 +855,9 @@ subroutine init_zbgc fedtype_1 , feptype_1 , zaerotype_bc1 , & zaerotype_bc2 , zaerotype_dust1 , zaerotype_dust2 , & zaerotype_dust3 , zaerotype_dust4 , ratio_C2N_diatoms , & - ratio_C2N_sp , ratio_C2N_phaeo , ratio_chl2N_diatoms, & + ratio_C2N_sp , ratio_C2N_phaeo , ratio_chl2N_diatoms, & ratio_chl2N_sp , ratio_chl2N_phaeo , F_abs_chl_diatoms , & - F_abs_chl_sp , F_abs_chl_phaeo , ratio_C2N_proteins + F_abs_chl_sp , F_abs_chl_phaeo , ratio_C2N_proteins !----------------------------------------------------------------- ! query Icepack values @@ -891,24 +891,24 @@ subroutine init_zbgc restore_bgc = .false. ! restore bgc if true solve_zsal = .false. ! update salinity tracer profile from solve_S_dt bgc_data_type = 'default'! source of bgc data - tr_bgc_PON = .false. !--------------------------------------------- + tr_bgc_PON = .false. !--------------------------------------------- tr_bgc_Nit = .false. ! biogeochemistry (skl or zbgc) tr_bgc_C = .false. ! if skl_bgc = .true. then skl tr_bgc_chl = .false. ! if z_tracers = .true. then vertically resolved tr_bgc_Sil = .false. ! if z_tracers + solve_zbgc = .true. then - tr_bgc_Am = .false. ! vertically resolved with reactions + tr_bgc_Am = .false. ! vertically resolved with reactions tr_bgc_DMS = .false. !------------------------------------------------ - tr_bgc_DON = .false. ! + tr_bgc_DON = .false. ! tr_bgc_hum = .false. ! - tr_bgc_Fe = .false. ! + tr_bgc_Fe = .false. ! tr_bgc_N = .true. ! - ! z biology parameters - ratio_Si2N_diatoms = 1.8_dbl_kind ! algal Si to N (mol/mol) + ! z biology parameters + ratio_Si2N_diatoms = 1.8_dbl_kind ! algal Si to N (mol/mol) ratio_Si2N_sp = c0 ! diatoms, small plankton, phaeocystis ratio_Si2N_phaeo = c0 ratio_S2N_diatoms = 0.03_dbl_kind ! algal S to N (mol/mol) - ratio_S2N_sp = 0.03_dbl_kind + ratio_S2N_sp = 0.03_dbl_kind ratio_S2N_phaeo = 0.03_dbl_kind ratio_Fe2C_diatoms = 0.0033_dbl_kind ! algal Fe to C (umol/mol) ratio_Fe2C_sp = 0.0033_dbl_kind @@ -924,13 +924,13 @@ subroutine init_zbgc chlabs_diatoms = 0.03_dbl_kind ! chl absorption (1/m/(mg/m^3)) chlabs_sp = 0.01_dbl_kind chlabs_phaeo = 0.05_dbl_kind - alpha2max_low_diatoms = 0.8_dbl_kind ! light limitation (1/(W/m^2)) + alpha2max_low_diatoms = 0.8_dbl_kind ! light limitation (1/(W/m^2)) alpha2max_low_sp = 0.67_dbl_kind alpha2max_low_phaeo = 0.67_dbl_kind - beta2max_diatoms = 0.018_dbl_kind ! light inhibition (1/(W/m^2)) + beta2max_diatoms = 0.018_dbl_kind ! light inhibition (1/(W/m^2)) beta2max_sp = 0.0025_dbl_kind beta2max_phaeo = 0.01_dbl_kind - mu_max_diatoms = 1.2_dbl_kind ! maximum growth rate (1/day) + mu_max_diatoms = 1.2_dbl_kind ! maximum growth rate (1/day) mu_max_sp = 0.851_dbl_kind mu_max_phaeo = 0.851_dbl_kind grow_Tdep_diatoms = 0.06_dbl_kind ! Temperature dependence of growth (1/C) @@ -960,10 +960,10 @@ subroutine init_zbgc K_Fe_diatoms = c1 ! iron half saturation (nM) K_Fe_sp = 0.2_dbl_kind K_Fe_phaeo = p1 - f_don_protein = 0.6_dbl_kind ! fraction of spilled grazing to proteins - kn_bac_protein = 0.03_dbl_kind ! Bacterial degredation of DON (1/d) - f_don_Am_protein = 0.25_dbl_kind ! fraction of remineralized DON to ammonium - f_doc_s = 0.4_dbl_kind ! fraction of mortality to DOC + f_don_protein = 0.6_dbl_kind ! fraction of spilled grazing to proteins + kn_bac_protein = 0.03_dbl_kind ! Bacterial degredation of DON (1/d) + f_don_Am_protein = 0.25_dbl_kind ! fraction of remineralized DON to ammonium + f_doc_s = 0.4_dbl_kind ! fraction of mortality to DOC f_doc_l = 0.4_dbl_kind f_exude_s = c1 ! fraction of exudation to DOC f_exude_l = c1 @@ -998,7 +998,7 @@ subroutine init_zbgc F_abs_chl_diatoms = 2.0_dbl_kind ! scales absorbed radiation for dEdd F_abs_chl_sp = 4.0_dbl_kind F_abs_chl_phaeo = 5.0_dbl_kind - ratio_C2N_proteins = 7.0_dbl_kind ! ratio of C to N in proteins (mol/mol) + ratio_C2N_proteins = 7.0_dbl_kind ! ratio of C to N in proteins (mol/mol) !----------------------------------------------------------------- ! read from input file @@ -1032,12 +1032,12 @@ subroutine init_zbgc if (solve_zsal .and. TRZS == 0) then write(nu_diag,*) 'WARNING: solve_zsal=T but 0 zsalinity tracers' write(nu_diag,*) 'WARNING: setting solve_zsal = F' - solve_zsal = .false. + solve_zsal = .false. elseif (solve_zsal .and. nblyr < 1) then write(nu_diag,*) 'WARNING: solve_zsal=T but 0 zsalinity tracers' write(nu_diag,*) 'WARNING: setting solve_zsal = F' - solve_zsal = .false. - endif + solve_zsal = .false. + endif if (solve_zsal .and. ((.not. tr_brine) .or. (ktherm /= 1))) then write(nu_diag,*) 'WARNING: solve_zsal needs tr_brine=T and ktherm=1' @@ -1065,7 +1065,7 @@ subroutine init_zbgc 'WARNING: setting solve_zsal and tr_brine = F' solve_zsal = .false. tr_brine = .false. - endif + endif write(nu_diag,1010) ' tr_brine = ', tr_brine if (tr_brine) then @@ -1198,7 +1198,7 @@ subroutine init_zbgc if (n_zaero > icepack_max_aero) then print*, 'error:number of z aerosols exceeds icepack_max_aero' call icedrv_system_abort(file=__FILE__,line=__LINE__) - endif + endif if (skl_bgc .and. n_bgc < 2) then write (nu_diag,*) ' ' @@ -1248,7 +1248,7 @@ subroutine init_zbgc !----------------------------------------------------------------- ! initialize zbgc tracer indices - !----------------------------------------------------------------- + !----------------------------------------------------------------- ntrcr_o = ntrcr nt_fbri = 0 @@ -1274,13 +1274,13 @@ subroutine init_zbgc do k = 1,nblyr trcr_depend(nt_bgc_S + k - 1) = 2 + nt_fbri + ntd trcr_base (nt_bgc_S,1) = c0 ! default: ice area - trcr_base (nt_bgc_S,2) = c1 - trcr_base (nt_bgc_S,3) = c0 + trcr_base (nt_bgc_S,2) = c1 + trcr_base (nt_bgc_S,3) = c0 n_trcr_strata(nt_bgc_S) = 1 nt_strata(nt_bgc_S,1) = nt_fbri nt_strata(nt_bgc_S,2) = 0 enddo - endif + endif !----------------------------------------------------------------- ! biogeochemistry @@ -1309,7 +1309,7 @@ subroutine init_zbgc nlt_bgc_DON(:) = 0 nt_bgc_DON(:) = 0 - ! vectors of size icepack_max_fe + ! vectors of size icepack_max_fe nlt_bgc_Fed(:) = 0 nlt_bgc_Fep(:) = 0 nt_bgc_Fed(:) = 0 @@ -1377,7 +1377,7 @@ subroutine init_zbgc R_Fe2DON(1) = ratio_Fe2DON R_C2N_DON(1) = ratio_C2N_proteins - + R_Fe2DOC(1) = ratio_Fe2DOC_s R_Fe2DOC(2) = ratio_Fe2DOC_l R_Fe2DOC(3) = c0 @@ -1444,14 +1444,14 @@ subroutine init_zbgc k_bac(2) = k_bac_l dictype(:) = -c1 - + algaltype(1) = algaltype_diatoms algaltype(2) = algaltype_sp algaltype(3) = algaltype_phaeo doctype(1) = doctype_s doctype(2) = doctype_l - + dontype(1) = dontype_protein fedtype(1) = fedtype_1 @@ -1494,16 +1494,16 @@ subroutine init_zbgc nk = 1 nt_depend = 0 - if (dEdd_algae) then + if (dEdd_algae) then nlt_chl_sw = 1 nbtrcr_sw = nilyr+nslyr+2 ! only the bottom layer will be nonzero - endif - - elseif (z_tracers) then ! defined on nblyr+1 in ice + endif + + elseif (z_tracers) then ! defined on nblyr+1 in ice ! and 2 snow layers (snow surface + interior) nk = nblyr + 1 - nt_depend = 2 + nt_fbri + ntd + nt_depend = 2 + nt_fbri + ntd if (tr_bgc_N) then if (dEdd_algae) then @@ -1518,11 +1518,11 @@ subroutine init_zbgc !----------------------------------------------------------------- ! assign tracer indices and dependencies - ! bgc_tracer_type: < 0 purely mobile , >= 0 stationary + ! bgc_tracer_type: < 0 purely mobile , >= 0 stationary !------------------------------------------------------------------ if (tr_bgc_N) then - do mm = 1, n_algae + do mm = 1, n_algae call init_bgc_trcr(nk, nt_fbri, & nt_bgc_N(mm), nlt_bgc_N(mm), & algaltype(mm), nt_depend, & @@ -1544,14 +1544,14 @@ subroutine init_zbgc nt_strata, bio_index) bio_index_o(nlt_bgc_Nit) = icepack_max_algae + 1 endif ! tr_bgc_Nit - + if (tr_bgc_C) then ! ! Algal C is not yet distinct from algal N ! * Reqires exudation and/or changing C:N ratios ! for implementation ! - ! do mm = 1,n_algae + ! do mm = 1,n_algae ! call init_bgc_trcr(nk, nt_fbri, & ! nt_bgc_C(mm), nlt_bgc_C(mm), & ! algaltype(mm), nt_depend, & @@ -1606,7 +1606,7 @@ subroutine init_zbgc trcr_base, n_trcr_strata, & nt_strata, bio_index) bio_index_o(nlt_bgc_Am) = 2*icepack_max_algae + icepack_max_doc + icepack_max_dic + 2 - endif + endif if (tr_bgc_Sil) then call init_bgc_trcr(nk, nt_fbri, & nt_bgc_Sil, nlt_bgc_Sil, & @@ -1616,7 +1616,7 @@ subroutine init_zbgc trcr_base, n_trcr_strata, & nt_strata, bio_index) bio_index_o(nlt_bgc_Sil) = 2*icepack_max_algae + icepack_max_doc + icepack_max_dic + 3 - endif + endif if (tr_bgc_DMS) then ! all together call init_bgc_trcr(nk, nt_fbri, & nt_bgc_DMSPp, nlt_bgc_DMSPp, & @@ -1644,7 +1644,7 @@ subroutine init_zbgc trcr_base, n_trcr_strata, & nt_strata, bio_index) bio_index_o(nlt_bgc_DMS) = 2*icepack_max_algae + icepack_max_doc + icepack_max_dic + 6 - endif + endif if (tr_bgc_PON) then call init_bgc_trcr(nk, nt_fbri, & nt_bgc_PON, nlt_bgc_PON, & @@ -1690,8 +1690,8 @@ subroutine init_zbgc bio_index_o(nlt_bgc_Fep(mm)) = 2*icepack_max_algae + icepack_max_doc + icepack_max_dic & + icepack_max_don + icepack_max_fe + 7 + mm enddo ! mm - endif ! tr_bgc_Fe - + endif ! tr_bgc_Fe + if (tr_bgc_hum) then call init_bgc_trcr(nk, nt_fbri, & nt_bgc_hum, nlt_bgc_hum, & @@ -1701,15 +1701,15 @@ subroutine init_zbgc trcr_base, n_trcr_strata, & nt_strata, bio_index) bio_index_o(nlt_bgc_hum) = 2*icepack_max_algae + icepack_max_doc + 8 + icepack_max_dic & - + icepack_max_don + 2*icepack_max_fe + icepack_max_aero + + icepack_max_don + 2*icepack_max_fe + icepack_max_aero endif endif ! skl_bgc or z_tracers - if (z_tracers) then ! defined on nblyr+1 in ice + if (z_tracers) then ! defined on nblyr+1 in ice ! and 2 snow layers (snow surface + interior) nk = nblyr + 1 - nt_depend = 2 + nt_fbri + ntd + nt_depend = 2 + nt_fbri + ntd ! z layer aerosols if (tr_zaero) then @@ -1734,15 +1734,15 @@ subroutine init_zbgc if (nbtrcr > 0) then nt_zbgc_frac = ntrcr + 1 ntrcr = ntrcr + nbtrcr - do k = 1,nbtrcr - zbgc_frac_init(k) = c1 - trcr_depend(nt_zbgc_frac+k-1) = 2+nt_fbri + do k = 1,nbtrcr + zbgc_frac_init(k) = c1 + trcr_depend(nt_zbgc_frac+k-1) = 2+nt_fbri trcr_base(nt_zbgc_frac+ k - 1,1) = c0 trcr_base(nt_zbgc_frac+ k - 1,2) = c1 trcr_base(nt_zbgc_frac+ k - 1,3) = c0 - n_trcr_strata(nt_zbgc_frac+ k - 1)= 1 + n_trcr_strata(nt_zbgc_frac+ k - 1)= 1 nt_strata(nt_zbgc_frac+ k - 1,1) = nt_fbri - nt_strata(nt_zbgc_frac+ k - 1,2) = 0 + nt_strata(nt_zbgc_frac+ k - 1,2) = 0 tau_ret(k) = c1 tau_rel(k) = c1 if (bgc_tracer_type(k) >= c0 .and. bgc_tracer_type(k) < p5) then @@ -1770,7 +1770,7 @@ subroutine init_zbgc do k = 1, nbtrcr zbgc_init_frac(k) = frazil_scav if (bgc_tracer_type(k) < c0) zbgc_init_frac(k) = initbio_frac - enddo + enddo !----------------------------------------------------------------- ! set values in icepack @@ -1804,7 +1804,7 @@ subroutine init_zbgc file=__FILE__, line=__LINE__) call icepack_init_tracer_indices( & - nt_fbri_in=nt_fbri, & + nt_fbri_in=nt_fbri, & nt_bgc_Nit_in=nt_bgc_Nit, nt_bgc_Am_in=nt_bgc_Am, nt_bgc_Sil_in=nt_bgc_Sil, & nt_bgc_DMS_in=nt_bgc_DMS, nt_bgc_PON_in=nt_bgc_PON, nt_bgc_S_in=nt_bgc_S, & nt_bgc_N_in=nt_bgc_N, nt_bgc_chl_in=nt_bgc_chl, nt_bgc_hum_in=nt_bgc_hum, & @@ -1825,7 +1825,7 @@ subroutine init_zbgc !----------------------------------------------------------------- ! final consistency checks - !----------------------------------------------------------------- + !----------------------------------------------------------------- if (nbtrcr > icepack_max_nbtrcr) then write (nu_diag,*) ' ' write (nu_diag,*) 'nbtrcr > icepack_max_nbtrcr' @@ -1845,7 +1845,7 @@ subroutine init_zbgc write(nu_diag,*) 'max_ntrcr < number of namelist tracers' write(nu_diag,*) 'max_ntrcr = ',max_ntrcr,' ntrcr = ',ntrcr call icedrv_system_abort(file=__FILE__,line=__LINE__) - endif + endif !----------------------------------------------------------------- ! spew @@ -1875,14 +1875,14 @@ subroutine init_zbgc write(nu_diag,1010) ' tr_bgc_DMS = ', tr_bgc_DMS write(nu_diag,1010) ' tr_bgc_PON = ', tr_bgc_PON write(nu_diag,1010) ' tr_bgc_DON = ', tr_bgc_DON - write(nu_diag,1010) ' tr_bgc_Fe = ', tr_bgc_Fe - + write(nu_diag,1010) ' tr_bgc_Fe = ', tr_bgc_Fe + elseif (z_tracers) then write(nu_diag,*) ' bgc_data_type = ', & trim(bgc_data_type) - write(nu_diag,1010) ' dEdd_algae = ', dEdd_algae - write(nu_diag,1010) ' modal_aero = ', modal_aero + write(nu_diag,1010) ' dEdd_algae = ', dEdd_algae + write(nu_diag,1010) ' modal_aero = ', modal_aero write(nu_diag,1010) ' scale_bgc = ', scale_bgc write(nu_diag,1010) ' solve_zbgc = ', solve_zbgc write(nu_diag,1020) ' number of ztracers = ', nbtrcr @@ -1904,11 +1904,11 @@ subroutine init_zbgc write(nu_diag,1010) ' tr_bgc_DMS = ', tr_bgc_DMS write(nu_diag,1010) ' tr_bgc_PON = ', tr_bgc_PON write(nu_diag,1010) ' tr_bgc_DON = ', tr_bgc_DON - write(nu_diag,1010) ' tr_bgc_Fe = ', tr_bgc_Fe + write(nu_diag,1010) ' tr_bgc_Fe = ', tr_bgc_Fe write(nu_diag,1000) ' grid_o = ', grid_o write(nu_diag,1005) ' l_sk = ', l_sk write(nu_diag,1000) ' initbio_frac = ', initbio_frac - write(nu_diag,1000) ' frazil_scav = ', frazil_scav + write(nu_diag,1000) ' frazil_scav = ', frazil_scav endif ! skl_bgc or solve_bgc @@ -1964,7 +1964,7 @@ subroutine init_bgc_trcr(nk, nt_fbri, & integer (kind=int_kind) :: & k , & ! loop index n_strata , & ! temporary values - nt_strata1, & ! + nt_strata1, & ! nt_strata2 real (kind=dbl_kind) :: & @@ -1976,12 +1976,12 @@ subroutine init_bgc_trcr(nk, nt_fbri, & !-------- - nt_bgc = ntrcr + 1 + nt_bgc = ntrcr + 1 nbtrcr = nbtrcr + 1 nlt_bgc = nbtrcr bgc_tracer_type(nbtrcr) = bgctype - - if (nk > 1) then + + if (nk > 1) then ! include vertical bgc in snow do k = nk, nk+1 ntrcr = ntrcr + 1 @@ -1994,10 +1994,10 @@ subroutine init_bgc_trcr(nk, nt_fbri, & nt_strata (nt_bgc + k,2) = 0 enddo - trcr_base1 = c0 - trcr_base2 = c1 + trcr_base1 = c0 + trcr_base2 = c1 trcr_base3 = c0 - n_strata = 1 + n_strata = 1 nt_strata1 = nt_fbri nt_strata2 = 0 else ! nk = 1 diff --git a/configuration/driver/icedrv_restart.F90 b/configuration/driver/icedrv_restart.F90 index cecaa9034..9bd371b50 100644 --- a/configuration/driver/icedrv_restart.F90 +++ b/configuration/driver/icedrv_restart.F90 @@ -18,8 +18,8 @@ module icedrv_restart implicit none private :: & write_restart_age, read_restart_age, & - write_restart_FY, read_restart_FY, & - write_restart_lvl, read_restart_lvl, & + write_restart_FY, read_restart_FY, & + write_restart_lvl, read_restart_lvl, & write_restart_pond_lvl, read_restart_pond_lvl, & write_restart_pond_topo, read_restart_pond_topo, & write_restart_snow, read_restart_snow, & @@ -72,12 +72,12 @@ subroutine dumpfile ! construct path/file iyear = nyr + year_init - 1 - + write(filename,'(a,a,a,i4.4,a,i2.2,a,i2.2,a,i5.5)') & restart_dir(1:lenstr(restart_dir)), & restart_file(1:lenstr(restart_file)),'.', & iyear,'-',month,'-',mday,'-',sec - + 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) call icepack_query_tracer_flags(tr_iage_out=tr_iage, tr_FY_out=tr_FY, & @@ -94,7 +94,7 @@ subroutine dumpfile open(nu_dump,file=filename,form='unformatted') write(nu_dump) istep1,time,time_forc write(nu_diag,*) 'Writing ',filename(1:lenstr(filename)) - + !----------------------------------------------------------------- ! state variables ! Tsfc is the only tracer written to binary files. All other @@ -185,7 +185,7 @@ subroutine restartfile (ice_ic) character(len=char_len_long) :: filename character(len=*), parameter :: subname='(restartfile)' - if (present(ice_ic)) then + if (present(ice_ic)) then filename = trim(ice_ic) else call icedrv_system_abort(string=subname//'no ice_ic present', & @@ -226,12 +226,12 @@ subroutine restartfile (ice_ic) do k=1,nilyr call read_restart_field(nu_restart,trcrn(:,nt_sice+k-1,:),ncat) enddo - + write(nu_diag,*) 'min/max qice for each layer' do k=1,nilyr call read_restart_field(nu_restart,trcrn(:,nt_qice+k-1,:),ncat) enddo - + write(nu_diag,*) 'min/max qsno for each layer' do k=1,nslyr call read_restart_field(nu_restart,trcrn(:,nt_qsno+k-1,:),ncat) @@ -349,9 +349,9 @@ subroutine read_restart_field(nu,work,ndim) maxw = maxval(work) sumw = sum(work) write(nu_diag,*) subname, minw, maxw, sumw - + end subroutine read_restart_field - + !======================================================================= ! Writes a single restart field. @@ -372,10 +372,10 @@ subroutine write_restart_field(nu,work,ndim) integer (kind=int_kind) :: & n, i ! loop indices - + real (kind=dbl_kind), dimension(nx) :: & work2 ! input array (real, 8-byte) - + real (kind=dbl_kind) :: & minw, maxw, sumw ! diagnostics @@ -385,12 +385,12 @@ subroutine write_restart_field(nu,work,ndim) work2(:) = work(:,n) write(nu) (work2(i), i=1,nx) enddo - + minw = minval(work) maxw = maxval(work) sumw = sum(work) write(nu_diag,*) subname, minw, maxw, sumw - + end subroutine write_restart_field !======================================================================= @@ -421,7 +421,7 @@ subroutine write_restart_pond_topo() use icedrv_state, only: trcrn use icedrv_domain_size, only: ncat - integer (kind=int_kind) :: nt_apnd, nt_hpnd, nt_ipnd + integer (kind=int_kind) :: nt_apnd, nt_hpnd, nt_ipnd character(len=*), parameter :: subname='(write_restart_pond_topo)' call icepack_query_tracer_indices(nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd, & @@ -447,7 +447,7 @@ subroutine read_restart_pond_topo() use icedrv_state, only: trcrn use icedrv_domain_size, only: ncat - integer (kind=int_kind) :: nt_apnd, nt_hpnd, nt_ipnd + integer (kind=int_kind) :: nt_apnd, nt_hpnd, nt_ipnd character(len=*), parameter :: subname='(read_restart_pond_topo)' call icepack_query_tracer_indices(nt_apnd_out=nt_apnd, nt_hpnd_out=nt_hpnd, & @@ -495,7 +495,7 @@ end subroutine write_restart_snow !======================================================================= -! Reads all values needed to restart snow redistribution/metamorphism +! Reads all values needed to restart snow redistribution/metamorphism ! ! authors Elizabeth C. Hunke, LANL @@ -797,7 +797,7 @@ subroutine write_restart_aero() k ! loop indices integer (kind=int_kind) :: nt_aero character(len=*), parameter :: subname='(write_restart_aero)' - + call icepack_query_tracer_indices(nt_aero_out=nt_aero) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & @@ -873,7 +873,7 @@ subroutine write_restart_iso() k ! loop indices integer (kind=int_kind) :: nt_isosno, nt_isoice character(len=*), parameter :: subname='(write_restart_iso)' - + call icepack_query_tracer_indices(nt_isosno_out=nt_isosno) call icepack_query_tracer_indices(nt_isoice_out=nt_isoice) call icepack_warnings_flush(nu_diag) @@ -950,7 +950,7 @@ subroutine write_restart_hbrine() if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & file=__FILE__,line= __LINE__) - do i = 1, nx + do i = 1, nx do n = 1, ncat if (first_ice (i,n)) then first_ice_real(i,n) = c1 @@ -1001,7 +1001,7 @@ subroutine read_restart_hbrine() first_ice (i,n) = .false. endif enddo ! ncat - enddo ! i + enddo ! i end subroutine read_restart_hbrine diff --git a/configuration/driver/icedrv_restart_bgc.F90 b/configuration/driver/icedrv_restart_bgc.F90 index b7150cfd8..c5859c898 100644 --- a/configuration/driver/icedrv_restart_bgc.F90 +++ b/configuration/driver/icedrv_restart_bgc.F90 @@ -78,7 +78,7 @@ subroutine write_restart_bgc() call icepack_query_parameters(solve_zsal_out=solve_zsal) call icepack_query_parameters(z_tracers_out=z_tracers) call icepack_query_tracer_sizes(nbtrcr_out=nbtrcr) - call icepack_query_tracer_flags(tr_bgc_Nit_out=tr_bgc_Nit, & + call icepack_query_tracer_flags(tr_bgc_Nit_out=tr_bgc_Nit, & tr_bgc_Am_out=tr_bgc_Am, & tr_bgc_Sil_out=tr_bgc_Sil, tr_bgc_hum_out=tr_bgc_hum, & tr_bgc_DMS_out=tr_bgc_DMS, tr_bgc_PON_out=tr_bgc_PON, & @@ -106,10 +106,10 @@ subroutine write_restart_bgc() if (solve_zsal) then do k = 1, nblyr - call write_restart_field(nu_dump,trcrn(:,nt_bgc_S+k-1,:),ncat) + call write_restart_field(nu_dump,trcrn(:,nt_bgc_S+k-1,:),ncat) enddo - - call write_restart_field(nu_dump,sss,1) + + call write_restart_field(nu_dump,sss,1) do i = 1, nx if (Rayleigh_criteria(i)) then @@ -119,7 +119,7 @@ subroutine write_restart_bgc() endif enddo - call write_restart_field(nu_dump,Rayleigh_real,1) + call write_restart_field(nu_dump,Rayleigh_real,1) endif ! solve_zsal @@ -129,13 +129,13 @@ subroutine write_restart_bgc() if (skl_bgc) then do k = 1, n_algae - call write_restart_field(nu_dump,trcrn(:,nt_bgc_N(k),:),ncat) + call write_restart_field(nu_dump,trcrn(:,nt_bgc_N(k),:),ncat) if (tr_bgc_chl) & - call write_restart_field(nu_dump,trcrn(:,nt_bgc_chl(k),:),ncat) + call write_restart_field(nu_dump,trcrn(:,nt_bgc_chl(k),:),ncat) enddo if (tr_bgc_C) then ! do k = 1, n_algae -! call write_restart_field(nu_dump,trcrn(:,nt_bgc_C(k),:),ncat) +! call write_restart_field(nu_dump,trcrn(:,nt_bgc_C(k),:),ncat) ! enddo do k = 1, n_doc call write_restart_field(nu_dump,trcrn(:,nt_bgc_DOC(k),:),ncat) @@ -165,10 +165,10 @@ subroutine write_restart_bgc() enddo endif if (tr_bgc_Fe ) then - do k = 1, n_fed + do k = 1, n_fed call write_restart_field(nu_dump,trcrn(:,nt_bgc_Fed(k),:),ncat) enddo - do k = 1, n_fep + do k = 1, n_fep call write_restart_field(nu_dump,trcrn(:,nt_bgc_Fep(k),:),ncat) enddo endif @@ -290,7 +290,7 @@ subroutine write_restart_bgc() do k = 1, n_dic call write_restart_field(nu_dump,dic(:,k),1) enddo ! k - endif + endif if (tr_bgc_Nit) & call write_restart_field(nu_dump,nit,1) if (tr_bgc_Am) & @@ -380,7 +380,7 @@ subroutine read_restart_bgc() call icepack_query_tracer_sizes(nbtrcr_out=nbtrcr) - call icepack_query_tracer_flags(tr_bgc_Nit_out=tr_bgc_Nit, & + call icepack_query_tracer_flags(tr_bgc_Nit_out=tr_bgc_Nit, & tr_bgc_Am_out=tr_bgc_Am, & tr_bgc_Sil_out=tr_bgc_Sil, tr_bgc_hum_out=tr_bgc_hum, & tr_bgc_DMS_out=tr_bgc_DMS, tr_bgc_PON_out=tr_bgc_PON, & @@ -412,13 +412,13 @@ subroutine read_restart_bgc() do k = 1, nblyr call read_restart_field(nu_restart,trcrn(:,nt_bgc_S+k-1,:),ncat) enddo - + write(nu_diag,*) 'min/max sea surface salinity' call read_restart_field(nu_restart,sss,1) write(nu_diag,*) 'min/max Rayleigh' call read_restart_field(nu_restart,Rayleigh_real,1) - do i = 1, nx + do i = 1, nx if (Rayleigh_real (i) .GE. c1) then Rayleigh_criteria (i) = .true. elseif (Rayleigh_real (i) < c1) then @@ -481,10 +481,10 @@ subroutine read_restart_bgc() endif if (tr_bgc_Fe) then write (nu_diag,*) 'min/max dFe, pFe' - do k = 1, n_fed + do k = 1, n_fed call read_restart_field(nu_restart,trcrn(:,nt_bgc_Fed (k),:),ncat) enddo - do k = 1, n_fep + do k = 1, n_fep call read_restart_field(nu_restart,trcrn(:,nt_bgc_Fep (k),:),ncat) enddo endif @@ -662,7 +662,7 @@ subroutine read_restart_bgc() endif endif ! skl_bgc or z_tracers - + end subroutine read_restart_bgc !======================================================================= diff --git a/configuration/driver/icedrv_state.F90 b/configuration/driver/icedrv_state.F90 index 8711c29f0..1a9ca66f5 100644 --- a/configuration/driver/icedrv_state.F90 +++ b/configuration/driver/icedrv_state.F90 @@ -10,7 +10,7 @@ ! aicen(i,n) aice(i) --- ! vicen(i,n) vice(i) m ! vsnon(i,n) vsno(i) m -! trcrn(i,it,n) trcr(i,it) +! trcrn(i,it,n) trcr(i,it) ! ! Area is dimensionless because aice is the fractional area ! (normalized so that the sum over all categories, including open @@ -104,7 +104,7 @@ module icedrv_state strength ! ice strength (N/m) !----------------------------------------------------------------- - ! ice state at start of time step, saved for later in the step + ! ice state at start of time step, saved for later in the step !----------------------------------------------------------------- real (kind=dbl_kind), dimension(nx), & @@ -115,7 +115,7 @@ module icedrv_state dimension(nx,ncat), public :: & aicen_init , & ! initial ice concentration, for linear ITD vicen_init , & ! initial ice volume (m), for linear ITD - vsnon_init ! initial snow volume (m), for aerosol + vsnon_init ! initial snow volume (m), for aerosol !======================================================================= diff --git a/configuration/driver/icedrv_step.F90 b/configuration/driver/icedrv_step.F90 index 410a53564..7fd2461f4 100644 --- a/configuration/driver/icedrv_step.F90 +++ b/configuration/driver/icedrv_step.F90 @@ -134,7 +134,7 @@ subroutine step_therm1 (dt) ! column packge includes use icepack_intfc, only: icepack_step_therm1 - logical (kind=log_kind) :: & + logical (kind=log_kind) :: & prescribed_ice ! if .true., use prescribed ice instead of computed real (kind=dbl_kind), intent(in) :: & @@ -248,7 +248,7 @@ subroutine step_therm1 (dt) enddo enddo endif ! tr_aero - + if (tr_iso) then ! trcrn(nt_isosno/ice) has units kg/m^3 do n = 1, ncat @@ -278,16 +278,16 @@ subroutine step_therm1 (dt) vsno = vsno(i), vsnon = vsnon(i,:), & uvel = uvel(i), vvel = vvel(i), & Tsfc = trcrn(i,nt_Tsfc,:), & - zqsn = trcrn(i,nt_qsno:nt_qsno+nslyr-1,:), & - zqin = trcrn(i,nt_qice:nt_qice+nilyr-1,:), & - zSin = trcrn(i,nt_sice:nt_sice+nilyr-1,:), & - alvl = trcrn(i,nt_alvl,:), & - vlvl = trcrn(i,nt_vlvl,:), & - apnd = trcrn(i,nt_apnd,:), & - hpnd = trcrn(i,nt_hpnd,:), & - ipnd = trcrn(i,nt_ipnd,:), & + zqsn = trcrn(i,nt_qsno:nt_qsno+nslyr-1,:), & + zqin = trcrn(i,nt_qice:nt_qice+nilyr-1,:), & + zSin = trcrn(i,nt_sice:nt_sice+nilyr-1,:), & + alvl = trcrn(i,nt_alvl,:), & + vlvl = trcrn(i,nt_vlvl,:), & + apnd = trcrn(i,nt_apnd,:), & + hpnd = trcrn(i,nt_hpnd,:), & + ipnd = trcrn(i,nt_ipnd,:), & iage = trcrn(i,nt_iage,:), & - FY = trcrn(i,nt_FY,:), & + FY = trcrn(i,nt_FY,:), & rsnwn = rsnwn (:,:), & smicen = smicen(:,:), & smliqn = smliqn(:,:), & @@ -385,7 +385,7 @@ subroutine step_therm1 (dt) enddo enddo endif ! tr_aero - + if (tr_iso) then do n = 1, ncat if (vicen(i,n) > puny) isoice(:,n) = isoice(:,n)/vicen(i,n) @@ -396,7 +396,7 @@ subroutine step_therm1 (dt) enddo enddo endif ! tr_iso - + if (tr_snow) then do n = 1, ncat do k = 1, nslyr @@ -411,7 +411,7 @@ subroutine step_therm1 (dt) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & file=__FILE__, line=__LINE__) - + end subroutine step_therm1 !======================================================================= @@ -434,7 +434,7 @@ subroutine step_therm2 (dt) nltrcr, nx, nfsd use icedrv_flux, only: fresh, frain, fpond, frzmlt, frazil, frz_onset use icedrv_flux, only: update_ocn_f, fsalt, Tf, sss, salinz, fhocn, rside, fside - use icedrv_flux, only: meltl, frazil_diag, flux_bio, faero_ocn, fiso_ocn + use icedrv_flux, only: meltl, frazil_diag, flux_bio, faero_ocn, fiso_ocn use icedrv_flux, only: HDO_ocn, H2_16O_ocn, H2_18O_ocn use icedrv_init, only: tmask use icedrv_state, only: aice, aicen, aice0, trcr_depend @@ -481,7 +481,7 @@ subroutine step_therm2 (dt) call icepack_step_therm2(dt=dt, ncat=ncat, & nltrcr=nltrcr, nilyr=nilyr, nslyr=nslyr, & - hin_max=hin_max(:), nblyr=nblyr, & + hin_max=hin_max(:), nblyr=nblyr, & aicen=aicen(i,:), & vicen=vicen(i,:), & vsnon=vsnon(i,:), & @@ -531,7 +531,7 @@ subroutine step_therm2 (dt) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & file=__FILE__, line=__LINE__) - + end subroutine step_therm2 !======================================================================= @@ -563,7 +563,7 @@ subroutine update_state (dt, daidt, dvidt, dagedt, offset) real (kind=dbl_kind), intent(in), optional :: & offset ! d(age)/dt time offset = dt for thermo, 0 for dyn - integer (kind=int_kind) :: & + integer (kind=int_kind) :: & i, & ! horizontal indices ntrcr, & ! nt_iage ! @@ -596,9 +596,9 @@ subroutine update_state (dt, daidt, dvidt, dagedt, offset) do i = 1, nx !----------------------------------------------------------------- - ! Aggregate the updated state variables (includes ghost cells). - !----------------------------------------------------------------- - + ! Aggregate the updated state variables (includes ghost cells). + !----------------------------------------------------------------- + if (tmask(i)) then call icepack_aggregate (ncat=ncat, & aicen=aicen(i,:), trcrn=trcrn(i,1:ntrcr,:), & @@ -729,7 +729,7 @@ subroutine step_dyn_ridge (dt, ndtd) ! local variables - integer (kind=int_kind) :: & + integer (kind=int_kind) :: & i, & ! horizontal indices ntrcr, & ! nbtrcr ! @@ -1148,7 +1148,7 @@ subroutine ocean_mixed_layer (dt) endif enddo ! i - !----------------------------------------------------------------- + !----------------------------------------------------------------- ! Compute boundary layer quantities !----------------------------------------------------------------- @@ -1157,22 +1157,22 @@ subroutine ocean_mixed_layer (dt) call icepack_atm_boundary(sfctype = 'ocn', & Tsf = sst(i), & potT = potT(i), & - uatm = uatm(i), & - vatm = vatm(i), & - wind = wind(i), & - zlvl = zlvl(i), & - Qa = Qa(i), & + uatm = uatm(i), & + vatm = vatm(i), & + wind = wind(i), & + zlvl = zlvl(i), & + Qa = Qa(i), & rhoa = rhoa(i), & - strx = strairx_ocn(i), & - stry = strairy_ocn(i), & - Tref = Tref_ocn(i), & - Qref = Qref_ocn(i), & - delt = delt(i), & + strx = strairx_ocn(i), & + stry = strairy_ocn(i), & + Tref = Tref_ocn(i), & + Qref = Qref_ocn(i), & + delt = delt(i), & delq = delq(i), & lhcoef = lhcoef(i), & shcoef = shcoef(i), & - Cdn_atm = Cdn_atm(i), & - Cdn_atm_ratio_n = Cdn_atm_ratio(i)) + Cdn_atm = Cdn_atm(i), & + Cdn_atm_ratio_n = Cdn_atm_ratio(i)) endif enddo ! i call icepack_warnings_flush(nu_diag) @@ -1235,7 +1235,7 @@ subroutine biogeochemistry (dt) use icedrv_flux, only: hin_old, flux_bio, flux_bio_atm, faero_atm use icedrv_flux, only: nit, amm, sil, dmsp, dms, algalN, doc, don, dic, fed, fep, zaeros, hum use icedrv_state, only: aicen_init, vicen_init, aicen, vicen, vsnon - use icedrv_state, only: trcrn, vsnon_init, aice0 + use icedrv_state, only: trcrn, vsnon_init, aice0 real (kind=dbl_kind), intent(in) :: & dt ! time step @@ -1324,10 +1324,10 @@ subroutine biogeochemistry (dt) ! call icepack_warnings_flush(nu_diag) ! if (icepack_warnings_aborted()) call icedrv_system_abort(i, istep1, subname, & ! file=__FILE__,line= __LINE__) - + do mm = 1,nbtrcr - ocean_bio(i,mm) = ocean_bio_all(i,bio_index_o(mm)) - enddo ! mm + ocean_bio(i,mm) = ocean_bio_all(i,bio_index_o(mm)) + enddo ! mm if (tr_zaero) then do mm = 1, n_zaero ! update aerosols flux_bio_atm(i,nlt_zaero(mm)) = faero_atm(i,mm) @@ -1391,7 +1391,7 @@ subroutine biogeochemistry (dt) ! call icepack_warnings_flush(nu_diag) ! if (icepack_warnings_aborted()) call icedrv_system_abort(i, istep1, subname, & ! __FILE__, __LINE__) - + enddo ! i call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call icedrv_system_abort(string=subname, & diff --git a/configuration/scripts/icepack_in b/configuration/scripts/icepack_in index 387804ef2..7cebeeb7b 100644 --- a/configuration/scripts/icepack_in +++ b/configuration/scripts/icepack_in @@ -112,6 +112,8 @@ update_ocn_f = .false. l_mpond_fresh = .false. tfrz_option = 'mushy' + ice_ref_salinity = 4.0 + saltflux_option = 'constant' oceanmixed_ice = .true. wave_spec_type = 'none' restore_ocn = .false. diff --git a/configuration/scripts/options/set_nml.saltflux b/configuration/scripts/options/set_nml.saltflux new file mode 100644 index 000000000..8fdb3940e --- /dev/null +++ b/configuration/scripts/options/set_nml.saltflux @@ -0,0 +1,2 @@ + ktherm = 2 + saltflux_option = 'prognostic' diff --git a/configuration/scripts/tests/base_suite.ts b/configuration/scripts/tests/base_suite.ts index 93f456524..771381355 100644 --- a/configuration/scripts/tests/base_suite.ts +++ b/configuration/scripts/tests/base_suite.ts @@ -31,6 +31,7 @@ restart col 1x1 alt01 restart col 1x1 alt02 restart col 1x1 alt03 restart col 1x1 alt04 +restart col 1x1 saltflux restart col 1x1 dyn restart col 1x1 fsd12,short restart col 1x1 snwitdrdg,snwgrain diff --git a/doc/source/conf.py b/doc/source/conf.py index d5bf8ee48..c512c61fa 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -62,9 +62,9 @@ # built documents. # # The short X.Y version. -version = u'1.3.2' +version = u'1.3.3' # The full version, including alpha/beta/rc tags. -version = u'1.3.2' +version = u'1.3.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/source/icepack_index.rst b/doc/source/icepack_index.rst index df73a5ae0..c58beda5d 100755 --- a/doc/source/icepack_index.rst +++ b/doc/source/icepack_index.rst @@ -403,6 +403,7 @@ either Celsius or Kelvin units). Deprecated parameters are listed at the end. "rsnw_sig", "standard deviation of snow grain radius", "250. :math:`\times` 10\ :math:`^{-6}` m" "**S**", "", "" "salinz", "ice salinity profile", "ppt" + "saltflux_option", "constant or prognostic salinity fluxes","constant" "saltmax", "max salinity, at ice base (:cite:`Bitz99`)", "3.2 ppt" "scale_factor", "scaling factor for shortwave radiation components", "" "sec", "seconds elasped into idate", "" diff --git a/doc/source/user_guide/interfaces.include b/doc/source/user_guide/interfaces.include index c4739f32d..5919e7742 100644 --- a/doc/source/user_guide/interfaces.include +++ b/doc/source/user_guide/interfaces.include @@ -595,9 +595,6 @@ icepack_step_ridge !tr_pond_topo,& ! if .true., use explicit topography-based ponds !tr_aero ,& ! if .true., use aerosol tracers !tr_brine !,& ! if .true., brine height differs from ice thickness - #ifdef UNDEPRECATE_0LAYER - !heat_capacity ! if true, ice has nonzero heat capacity - #endif logical (kind=log_kind), dimension(:), intent(inout) :: & first_ice ! true until ice forms @@ -741,11 +738,7 @@ icepack_init_parameters stefan_boltzmann_in, ice_ref_salinity_in, & Tffresh_in, Lsub_in, Lvap_in, Timelt_in, Tsmelt_in, & iceruf_in, Cf_in, Pstar_in, Cstar_in, kappav_in, & - #ifdef UNDEPRECATE_0LAYER - kice_in, kseaice_in, ksno_in, & - #else kice_in, ksno_in, & - #endif zref_in, hs_min_in, snowpatch_in, rhosi_in, sk_l_in, & saltmax_in, phi_init_in, min_salin_in, salt_loss_in, & min_bgc_in, dSin0_frazil_in, hi_ssl_in, hs_ssl_in, & @@ -762,16 +755,13 @@ icepack_init_parameters atmbndy_in, calc_strair_in, formdrag_in, highfreq_in, natmiter_in, & atmiter_conv_in, calc_dragio_in, & tfrz_option_in, kitd_in, kcatbound_in, hs0_in, frzpnd_in, & + saltflux_option_in, & floeshape_in, wave_spec_in, wave_spec_type_in, nfreq_in, & dpscale_in, rfracmin_in, rfracmax_in, pndaspect_in, hs1_in, hp1_in, & bgc_flux_type_in, z_tracers_in, scale_bgc_in, solve_zbgc_in, & modal_aero_in, skl_bgc_in, solve_zsal_in, grid_o_in, l_sk_in, & initbio_frac_in, grid_oS_in, l_skS_in, dEdd_algae_in, & - #ifdef UNDEPRECATE_0LAYER - phi_snow_in, heat_capacity_in, T_max_in, fsal_in, & - #else phi_snow_in, T_max_in, fsal_in, & - #endif fr_resp_in, algal_vel_in, R_dFe2dust_in, dustFe_sol_in, & op_dep_min_in, fr_graze_s_in, fr_graze_e_in, fr_mort2min_in, & fr_dFe_in, k_nitrif_in, t_iron_conv_in, max_loss_in, & @@ -790,7 +780,7 @@ icepack_init_parameters !----------------------------------------------------------------- character(len=*), intent(in), optional :: & - argcheck_in ! optional argument checking + argcheck_in ! optional argument checking, never, first, or always !----------------------------------------------------------------- ! parameter constants @@ -832,9 +822,6 @@ icepack_init_parameters Tsmelt_in, & ! melting temperature, snow top surface (C) ice_ref_salinity_in, & ! (ppt) kice_in, & ! thermal conductivity of fresh ice(W/m/deg) - #ifdef UNDEPRECATE_0LAYER - kseaice_in, & ! thermal conductivity of sea ice (W/m/deg) - #endif ksno_in, & ! thermal conductivity of snow (W/m/deg) hs_min_in, & ! min snow thickness for computing zTsn (m) snowpatch_in, & ! parameter for fractional snow area (m) @@ -846,11 +833,7 @@ icepack_init_parameters integer (kind=int_kind), intent(in), optional :: & ktherm_in ! type of thermodynamics - #ifdef UNDEPRECATE_0LAYER - ! 0 = 0-layer approximation - #else ! -1 none - #endif ! 1 = Bitz and Lipscomb 1999 ! 2 = mushy layer theory @@ -859,10 +842,6 @@ icepack_init_parameters fbot_xfer_type_in ! transfer coefficient type for ice-ocean heat flux logical (kind=log_kind), intent(in), optional :: & - #ifdef UNDEPRECATE_0LAYER - heat_capacity_in, &! if true, ice has nonzero heat capacity - ! if false, use zero-layer thermodynamics - #endif calc_Tsfc_in , &! if true, calculate surface temperature ! if false, Tsfc is computed elsewhere and ! atmos-ice fluxes are provided to CICE @@ -881,11 +860,16 @@ icepack_init_parameters phi_c_slow_mode_in , & ! liquid fraction porosity cutoff for slow mode phi_i_mushy_in ! liquid fraction of congelation ice - character(len=*), intent(in), optional :: & - tfrz_option_in ! form of ocean freezing temperature - ! 'minus1p8' = -1.8 C - ! 'linear_salt' = -depressT * sss - ! 'mushy' conforms with ktherm=2 + character(len=*), intent(in), optional :: & + tfrz_option_in ! form of ocean freezing temperature + ! 'minus1p8' = -1.8 C + ! 'linear_salt' = -depressT * sss + ! 'mushy' conforms with ktherm=2 + + character(len=*), intent(in), optional :: & + saltflux_option_in ! Salt flux computation + ! 'constant' reference value of ice_ref_salinity + ! 'prognostic' prognostic salt flux !----------------------------------------------------------------------- ! Parameters for radiation @@ -1160,11 +1144,7 @@ icepack_query_parameters stefan_boltzmann_out, ice_ref_salinity_out, & Tffresh_out, Lsub_out, Lvap_out, Timelt_out, Tsmelt_out, & iceruf_out, Cf_out, Pstar_out, Cstar_out, kappav_out, & - #ifdef UNDEPRECATE_0LAYER - kice_out, kseaice_out, ksno_out, & - #else kice_out, ksno_out, & - #endif zref_out, hs_min_out, snowpatch_out, rhosi_out, sk_l_out, & saltmax_out, phi_init_out, min_salin_out, salt_loss_out, & min_bgc_out, dSin0_frazil_out, hi_ssl_out, hs_ssl_out, & @@ -1181,16 +1161,13 @@ icepack_query_parameters atmbndy_out, calc_strair_out, formdrag_out, highfreq_out, natmiter_out, & atmiter_conv_out, calc_dragio_out, & tfrz_option_out, kitd_out, kcatbound_out, hs0_out, frzpnd_out, & + saltflux_option_out, & floeshape_out, wave_spec_out, wave_spec_type_out, nfreq_out, & dpscale_out, rfracmin_out, rfracmax_out, pndaspect_out, hs1_out, hp1_out, & bgc_flux_type_out, z_tracers_out, scale_bgc_out, solve_zbgc_out, & modal_aero_out, skl_bgc_out, solve_zsal_out, grid_o_out, l_sk_out, & initbio_frac_out, grid_oS_out, l_skS_out, & - #ifdef UNDEPRECATE_0LAYER - phi_snow_out, heat_capacity_out, conserv_check_out, & - #else phi_snow_out, conserv_check_out, & - #endif fr_resp_out, algal_vel_out, R_dFe2dust_out, dustFe_sol_out, & T_max_out, fsal_out, op_dep_min_out, fr_graze_s_out, fr_graze_e_out, & fr_mort2min_out, fr_resp_s_out, fr_dFe_out, & @@ -1260,9 +1237,6 @@ icepack_query_parameters Tsmelt_out, & ! melting temperature, snow top surface (C) ice_ref_salinity_out, & ! (ppt) kice_out, & ! thermal conductivity of fresh ice(W/m/deg) - #ifdef UNDEPRECATE_0LAYER - kseaice_out, & ! thermal conductivity of sea ice (W/m/deg) - #endif ksno_out, & ! thermal conductivity of snow (W/m/deg) hs_min_out, & ! min snow thickness for computing zTsn (m) snowpatch_out, & ! parameter for fractional snow area (m) @@ -1274,11 +1248,7 @@ icepack_query_parameters integer (kind=int_kind), intent(out), optional :: & ktherm_out ! type of thermodynamics - #ifdef UNDEPRECATE_0LAYER - ! 0 = 0-layer approximation - #else ! -1 none - #endif ! 1 = Bitz and Lipscomb 1999 ! 2 = mushy layer theory @@ -1287,10 +1257,6 @@ icepack_query_parameters fbot_xfer_type_out ! transfer coefficient type for ice-ocean heat flux logical (kind=log_kind), intent(out), optional :: & - #ifdef UNDEPRECATE_0LAYER - heat_capacity_out,&! if true, ice has nonzero heat capacity - ! if false, use zero-layer thermodynamics - #endif calc_Tsfc_out ,&! if true, calculate surface temperature ! if false, Tsfc is computed elsewhere and ! atmos-ice fluxes are provided to CICE @@ -1315,6 +1281,12 @@ icepack_query_parameters ! 'linear_salt' = -depressT * sss ! 'mushy' conforms with ktherm=2 + character(len=*), intent(out), optional :: & + saltflux_option_out ! Salt flux computation + ! 'constant' reference value of ice_ref_salinity + ! 'prognostic' prognostic salt flux + + !----------------------------------------------------------------------- ! Parameters for radiation !----------------------------------------------------------------------- @@ -2108,7 +2080,7 @@ icepack_init_trcr nslyr ! number of snow layers real (kind=dbl_kind), intent(in) :: & - Tair, & ! air temperature (C) + Tair, & ! air temperature (K) Tf ! freezing temperature (C) real (kind=dbl_kind), dimension(:), intent(in) :: & @@ -2496,11 +2468,7 @@ icepack_init_tracer_flags subroutine icepack_init_tracer_flags(& tr_iage_in, tr_FY_in, tr_lvl_in, tr_snow_in, & - #ifdef UNDEPRECATE_CESMPONDS - tr_pond_in, tr_pond_cesm_in, tr_pond_lvl_in, tr_pond_topo_in, & - #else tr_pond_in, tr_pond_lvl_in, tr_pond_topo_in, & - #endif tr_fsd_in, tr_aero_in, tr_iso_in, tr_brine_in, tr_zaero_in, & tr_bgc_Nit_in, tr_bgc_N_in, tr_bgc_DON_in, tr_bgc_C_in, tr_bgc_chl_in, & tr_bgc_Am_in, tr_bgc_Sil_in, tr_bgc_DMS_in, tr_bgc_Fe_in, tr_bgc_hum_in, & @@ -2511,9 +2479,6 @@ icepack_init_tracer_flags tr_FY_in , & ! if .true., use first-year area tracer tr_lvl_in , & ! if .true., use level ice tracer tr_pond_in , & ! if .true., use melt pond tracer - #ifdef UNDEPRECATE_CESMPONDS - tr_pond_cesm_in , & ! if .true., use cesm pond tracer - #endif tr_pond_lvl_in , & ! if .true., use level-ice pond tracer tr_pond_topo_in , & ! if .true., use explicit topography-based ponds tr_snow_in , & ! if .true., use snow metamorphosis tracers @@ -2546,11 +2511,7 @@ icepack_query_tracer_flags subroutine icepack_query_tracer_flags(& tr_iage_out, tr_FY_out, tr_lvl_out, tr_snow_out, & - #ifdef UNDEPRECATE_CESMPONDS - tr_pond_out, tr_pond_cesm_out, tr_pond_lvl_out, tr_pond_topo_out, & - #else tr_pond_out, tr_pond_lvl_out, tr_pond_topo_out, & - #endif tr_fsd_out, tr_aero_out, tr_iso_out, tr_brine_out, tr_zaero_out, & tr_bgc_Nit_out, tr_bgc_N_out, tr_bgc_DON_out, tr_bgc_C_out, tr_bgc_chl_out, & tr_bgc_Am_out, tr_bgc_Sil_out, tr_bgc_DMS_out, tr_bgc_Fe_out, tr_bgc_hum_out, & @@ -2561,9 +2522,6 @@ icepack_query_tracer_flags tr_FY_out , & ! if .true., use first-year area tracer tr_lvl_out , & ! if .true., use level ice tracer tr_pond_out , & ! if .true., use melt pond tracer - #ifdef UNDEPRECATE_CESMPONDS - tr_pond_cesm_out , & ! if .true., use cesm pond tracer - #endif tr_pond_lvl_out , & ! if .true., use level-ice pond tracer tr_pond_topo_out , & ! if .true., use explicit topography-based ponds tr_snow_out , & ! if .true., use snow metamorphosis tracers diff --git a/doc/source/user_guide/ug_case_settings.rst b/doc/source/user_guide/ug_case_settings.rst index b1d0df230..3dab90e44 100644 --- a/doc/source/user_guide/ug_case_settings.rst +++ b/doc/source/user_guide/ug_case_settings.rst @@ -365,6 +365,8 @@ forcing_nml "", "``mm_per_sec``", "(same as MKS units)", "" "", "``m_per_sec``", "", "" "``restore_ocn``", "logical", "restore sst to data", "``.false.``" + "``saltflux_option``", "``constant``","salt flux is referenced to a constant salinity","``constant``" + "","``prognostic``","use actual sea ice bulk salinity in flux" "``tfrz_option``","``constant``", "constant ocean freezing temperature (Tocnfrz)","``mushy``" "", "``linear_salt``", "linear function of salinity (ktherm=1)", "" "", "``minus1p8``", "constant ocean freezing temperature (:math:`-1.8^{\circ} C`)", ""