LCOV - code coverage report
Current view: top level - icepack/columnphysics - icepack_parameters.F90 (source / functions) Hit Total Coverage
Test: 210520-185156:a09e51fb16:8:first,base,travis,decomp,reprosum,io,quick,unittest Lines: 357 528 67.61 %
Date: 2021-05-20 20:45:43 Functions: 3 4 75.00 %

          Line data    Source code
       1             : !=========================================================================
       2             : !
       3             : ! flags for the column package
       4             : !
       5             : ! authors: Elizabeth C. Hunke, LANL
       6             : 
       7             :       module icepack_parameters
       8             : 
       9             :       use icepack_kinds
      10             :       use icepack_warnings, only: icepack_warnings_aborted
      11             : 
      12             :       implicit none
      13             :       private
      14             : 
      15             :       public :: icepack_init_parameters
      16             :       public :: icepack_query_parameters
      17             :       public :: icepack_write_parameters
      18             :       public :: icepack_recompute_constants
      19             : 
      20             :       !-----------------------------------------------------------------
      21             :       ! parameter constants
      22             :       !-----------------------------------------------------------------
      23             : 
      24             :       integer (kind=int_kind), parameter, public :: & 
      25             :          nspint = 3                ! number of solar spectral intervals
      26             : 
      27             :       real (kind=dbl_kind), parameter, public :: &
      28             :          c0   = 0.0_dbl_kind, &
      29             :          c1   = 1.0_dbl_kind, &
      30             :          c1p5 = 1.5_dbl_kind, &
      31             :          c2   = 2.0_dbl_kind, &
      32             :          c3   = 3.0_dbl_kind, &
      33             :          c4   = 4.0_dbl_kind, &
      34             :          c5   = 5.0_dbl_kind, &
      35             :          c6   = 6.0_dbl_kind, &
      36             :          c8   = 8.0_dbl_kind, &
      37             :          c10  = 10.0_dbl_kind, &
      38             :          c15  = 15.0_dbl_kind, &
      39             :          c16  = 16.0_dbl_kind, &
      40             :          c20  = 20.0_dbl_kind, &
      41             :          c25  = 25.0_dbl_kind, &
      42             :          c100 = 100.0_dbl_kind, &
      43             :          c180 = 180.0_dbl_kind, &
      44             :          c1000= 1000.0_dbl_kind, &
      45             :          p001 = 0.001_dbl_kind, &
      46             :          p01  = 0.01_dbl_kind, &
      47             :          p1   = 0.1_dbl_kind, &
      48             :          p2   = 0.2_dbl_kind, &
      49             :          p4   = 0.4_dbl_kind, &
      50             :          p5   = 0.5_dbl_kind, &
      51             :          p6   = 0.6_dbl_kind, &
      52             :          p05  = 0.05_dbl_kind, &
      53             :          p15  = 0.15_dbl_kind, &
      54             :          p25  = 0.25_dbl_kind, &
      55             :          p75  = 0.75_dbl_kind, &
      56             :          p333 = c1/c3, &
      57             :          p666 = c2/c3, &
      58             :          spval_const= -1.0e36_dbl_kind
      59             : 
      60             :       real (kind=dbl_kind), public :: &
      61             :          secday = 86400.0_dbl_kind ,&! seconds in calendar day
      62             :          puny   = 1.0e-11_dbl_kind, &
      63             :          bignum = 1.0e+30_dbl_kind, &
      64             :          pi     = 3.14159265358979323846_dbl_kind
      65             : 
      66             :       !-----------------------------------------------------------------
      67             :       ! derived physical constants
      68             :       !    Lfresh = Lsub-Lvap     ,&! latent heat of melting of fresh ice (J/kg)
      69             :       !    cprho  = cp_ocn*rhow   ,&! for ocean mixed layer (J kg / K m^3)
      70             :       !    Cp     = 0.5_dbl_kind*gravit*(rhow-rhoi)*rhoi/rhow ,&! proport const for PE 
      71             :       !-----------------------------------------------------------------
      72             : 
      73             :       real (kind=dbl_kind), public :: &
      74             :          pih        = spval_const     ,&! 0.5 * pi
      75             :          piq        = spval_const     ,&! 0.25 * pi
      76             :          pi2        = spval_const     ,&! 2 * pi
      77             :          rad_to_deg = spval_const     ,&! conversion factor, radians to degrees
      78             :          Lfresh     = spval_const     ,&! latent heat of melting of fresh ice (J/kg)
      79             :          cprho      = spval_const     ,&! for ocean mixed layer (J kg / K m^3)
      80             :          Cp         = spval_const       ! proport const for PE 
      81             : 
      82             :       !-----------------------------------------------------------------
      83             :       ! Densities
      84             :       !-----------------------------------------------------------------
      85             : 
      86             :       real (kind=dbl_kind), public :: &
      87             :          rhos      = 330.0_dbl_kind   ,&! density of snow (kg/m^3)
      88             :          rhoi      = 917.0_dbl_kind   ,&! density of ice (kg/m^3)
      89             :          rhosi     = 940.0_dbl_kind   ,&! average sea ice density
      90             :                                         ! Cox and Weeks, 1982: 919-974 kg/m^2
      91             :          rhow      = 1026.0_dbl_kind  ,&! density of seawater (kg/m^3)
      92             :          rhofresh  = 1000.0_dbl_kind    ! density of fresh water (kg/m^3)
      93             : 
      94             : !-----------------------------------------------------------------------
      95             : ! Parameters for thermodynamics
      96             : !-----------------------------------------------------------------------
      97             : 
      98             :       real (kind=dbl_kind), public :: &
      99             :          hfrazilmin = 0.05_dbl_kind   ,&! min thickness of new frazil ice (m)
     100             :          cp_ice    = 2106._dbl_kind   ,&! specific heat of fresh ice (J/kg/K)
     101             :          cp_ocn    = 4218._dbl_kind   ,&! specific heat of ocn    (J/kg/K)
     102             :                                         ! freshwater value needed for enthalpy
     103             :          depressT  = 0.054_dbl_kind   ,&! Tf:brine salinity ratio (C/ppt)
     104             :          viscosity_dyn = 1.79e-3_dbl_kind, & ! dynamic viscosity of brine (kg/m/s)
     105             :          Tocnfrz   = -1.8_dbl_kind    ,&! freezing temp of seawater (C),
     106             :                                         ! used as Tsfcn for open water
     107             :          Tffresh   = 273.15_dbl_kind  ,&! freezing temp of fresh ice (K)
     108             :          Lsub      = 2.835e6_dbl_kind ,&! latent heat, sublimation freshwater (J/kg)
     109             :          Lvap      = 2.501e6_dbl_kind ,&! latent heat, vaporization freshwater (J/kg)
     110             :          Timelt    = 0.0_dbl_kind     ,&! melting temperature, ice top surface  (C)
     111             :          Tsmelt    = 0.0_dbl_kind     ,&! melting temperature, snow top surface (C)
     112             :          ice_ref_salinity =4._dbl_kind,&! (ppt)
     113             :                                         ! kice is not used for mushy thermo
     114             :          kice      = 2.03_dbl_kind    ,&! thermal conductivity of fresh ice(W/m/deg)
     115             :                                         ! kseaice is used only for zero-layer thermo
     116             :          kseaice   = 2.00_dbl_kind    ,&! thermal conductivity of sea ice (W/m/deg)
     117             :          ksno      = 0.30_dbl_kind    ,&! thermal conductivity of snow  (W/m/deg)
     118             :          hs_min    = 1.e-4_dbl_kind   ,&! min snow thickness for computing zTsn (m)
     119             :          snowpatch = 0.02_dbl_kind    ,&! parameter for fractional snow area (m)
     120             :          saltmax   = 3.2_dbl_kind     ,&! max salinity at ice base for BL99 (ppt)
     121             :                                         ! phi_init, dSin0_frazil are for mushy thermo
     122             :          phi_init  = 0.75_dbl_kind    ,&! initial liquid fraction of frazil
     123             :          min_salin = p1               ,&! threshold for brine pocket treatment
     124             :          salt_loss = 0.4_dbl_kind     ,&! fraction of salt retained in zsalinity
     125             :          dSin0_frazil = c3            ,&! bulk salinity reduction of newly formed frazil
     126             :          dts_b     = 50._dbl_kind     ,&! zsalinity timestep
     127             :          ustar_min = 0.005_dbl_kind   ,&! minimum friction velocity for ocean heat flux (m/s)
     128             :          ! mushy thermo
     129             :          a_rapid_mode      =  0.5e-3_dbl_kind,&! channel radius for rapid drainage mode (m)
     130             :          Rac_rapid_mode    =    10.0_dbl_kind,&! critical Rayleigh number
     131             :          aspect_rapid_mode =     1.0_dbl_kind,&! aspect ratio (larger is wider)
     132             :          dSdt_slow_mode    = -1.5e-7_dbl_kind,&! slow mode drainage strength (m s-1 K-1)
     133             :          phi_c_slow_mode   =    0.05_dbl_kind,&! critical liquid fraction porosity cutoff
     134             :          phi_i_mushy       =    0.85_dbl_kind  ! liquid fraction of congelation ice
     135             : 
     136             :       integer (kind=int_kind), public :: &
     137             :          ktherm = 1      ! type of thermodynamics
     138             :                          ! 0 = 0-layer approximation
     139             :                          ! 1 = Bitz and Lipscomb 1999
     140             :                          ! 2 = mushy layer theory
     141             : 
     142             :       character (char_len), public :: &
     143             :          conduct = 'bubbly', &      ! 'MU71' or 'bubbly'
     144             :          fbot_xfer_type = 'constant' ! transfer coefficient type for ice-ocean heat flux
     145             : 
     146             :       logical (kind=log_kind), public :: &
     147             :          heat_capacity = .true. ,&! if true, ice has nonzero heat capacity
     148             :                                   ! if false, use zero-layer thermodynamics
     149             :          calc_Tsfc     = .true. ,&! if true, calculate surface temperature
     150             :                                   ! if false, Tsfc is computed elsewhere and
     151             :                                   ! atmos-ice fluxes are provided to CICE
     152             :          update_ocn_f = .false. ,&! include fresh water and salt fluxes for frazil
     153             :          solve_zsal   = .false. ,&! if true, update salinity profile from solve_S_dt
     154             :          modal_aero   = .false. ,&! if true, use modal aerosal optical properties
     155             :                                   ! only for use with tr_aero or tr_zaero
     156             :          conserv_check = .false.  ! if true, do conservations checks and abort
     157             : 
     158             :       character(len=char_len), public :: &
     159             :          tfrz_option  = 'mushy'   ! form of ocean freezing temperature
     160             :                                   ! 'minus1p8' = -1.8 C
     161             :                                   ! 'linear_salt' = -depressT * sss
     162             :                                   ! 'mushy' conforms with ktherm=2
     163             : 
     164             : !-----------------------------------------------------------------------
     165             : ! Parameters for radiation
     166             : !-----------------------------------------------------------------------
     167             : 
     168             :       real (kind=dbl_kind), public :: &
     169             :          ! (Briegleb JGR 97 11475-11485  July 1992)
     170             :          emissivity = 0.985_dbl_kind,&! emissivity of snow and ice
     171             :          albocn     = 0.06_dbl_kind ,&! ocean albedo
     172             :          vonkar     = 0.4_dbl_kind  ,&! von Karman constant
     173             :          stefan_boltzmann = 567.0e-10_dbl_kind,&!  W/m^2/K^4
     174             :          ! (Ebert, Schramm and Curry JGR 100 15965-15975 Aug 1995)
     175             :          kappav     = 1.4_dbl_kind  ,&! vis extnctn coef in ice, wvlngth<700nm (1/m)
     176             :          hi_ssl     = 0.050_dbl_kind,&! ice surface scattering layer thickness (m)
     177             :          hs_ssl     = 0.040_dbl_kind,&! snow surface scattering layer thickness (m)
     178             :          ! baseline albedos for ccsm3 shortwave, set in namelist
     179             :          albicev    = 0.78_dbl_kind ,&! visible ice albedo for h > ahmax
     180             :          albicei    = 0.36_dbl_kind ,&! near-ir ice albedo for h > ahmax
     181             :          albsnowv   = 0.98_dbl_kind ,&! cold snow albedo, visible
     182             :          albsnowi   = 0.70_dbl_kind ,&! cold snow albedo, near IR
     183             :          ahmax      = 0.3_dbl_kind  ,&! thickness above which ice albedo is constant (m)
     184             :          ! dEdd tuning parameters, set in namelist
     185             :          R_ice      = c0   ,&! sea ice tuning parameter; +1 > 1sig increase in albedo
     186             :          R_pnd      = c0   ,&! ponded ice tuning parameter; +1 > 1sig increase in albedo
     187             :          R_snw      = c1p5 ,&! snow tuning parameter; +1 > ~.01 change in broadband albedo
     188             :          dT_mlt     = c1p5 ,&! change in temp for non-melt to melt snow grain 
     189             :                              ! radius change (C)
     190             :          rsnw_mlt   = 1500._dbl_kind,&! maximum melting snow grain radius (10^-6 m)
     191             :          kalg       = 0.60_dbl_kind   ! algae absorption coefficient for 0.5 m thick layer
     192             :                                       ! 0.5 m path of 75 mg Chl a / m2
     193             :       ! weights for albedos 
     194             :       ! 4 Jan 2007 BPB  Following are appropriate for complete cloud
     195             :       ! in a summer polar atmosphere with 1.5m bare sea ice surface:
     196             :       ! .636/.364 vis/nir with only 0.5% direct for each band.
     197             :       real (kind=dbl_kind), public :: &                 ! currently used only
     198             :          awtvdr = 0.00318_dbl_kind, &! visible, direct  ! for history and
     199             :          awtidr = 0.00182_dbl_kind, &! near IR, direct  ! diagnostics
     200             :          awtvdf = 0.63282_dbl_kind, &! visible, diffuse
     201             :          awtidf = 0.36218_dbl_kind   ! near IR, diffuse
     202             : 
     203             :       character (len=char_len), public :: &
     204             :          shortwave   = 'dEdd', & ! shortwave method, 'ccsm3' or 'dEdd'
     205             :          albedo_type = 'ccsm3'   ! albedo parameterization, 'ccsm3' or 'constant'
     206             :                                  ! shortwave='dEdd' overrides this parameter
     207             : 
     208             : !-----------------------------------------------------------------------
     209             : ! Parameters for dynamics, including ridging and strength
     210             : !-----------------------------------------------------------------------
     211             : 
     212             :       integer (kind=int_kind), public :: & ! defined in namelist 
     213             :          kstrength   = 1, & ! 0 for simple Hibler (1979) formulation
     214             :                             ! 1 for Rothrock (1975) pressure formulation
     215             :          krdg_partic = 1, & ! 0 for Thorndike et al. (1975) formulation
     216             :                             ! 1 for exponential participation function
     217             :          krdg_redist = 1    ! 0 for Hibler (1980) formulation
     218             :                             ! 1 for exponential redistribution function
     219             : 
     220             :       real (kind=dbl_kind), public :: &  
     221             :          Cf       = 17._dbl_kind     ,&! ratio of ridging work to PE change in ridging
     222             :          Pstar    = 2.75e4_dbl_kind  ,&! constant in Hibler strength formula
     223             :                                        ! (kstrength = 0)
     224             :          Cstar    = 20._dbl_kind     ,&! constant in Hibler strength formula
     225             :                                        ! (kstrength = 0)
     226             :          dragio   = 0.00536_dbl_kind ,&! ice-ocn drag coefficient
     227             :          gravit   = 9.80616_dbl_kind ,&! gravitational acceleration (m/s^2)
     228             :          mu_rdg = 3.0_dbl_kind ! e-folding scale of ridged ice, krdg_partic=1 (m^0.5)
     229             :                                        ! (krdg_redist = 1)
     230             : 
     231             : !-----------------------------------------------------------------------
     232             : ! Parameters for atmosphere
     233             : !-----------------------------------------------------------------------
     234             : 
     235             :       real (kind=dbl_kind), public :: &
     236             :          cp_air = 1005.0_dbl_kind    ,&! specific heat of air (J/kg/K)
     237             :          cp_wv  = 1.81e3_dbl_kind    ,&! specific heat of water vapor (J/kg/K)
     238             :          zvir   = 0.606_dbl_kind     ,&! rh2o/rair - 1.0
     239             :          zref   = 10._dbl_kind       ,&! reference height for stability (m)
     240             :          iceruf = 0.0005_dbl_kind    ,&! ice surface roughness (m)
     241             :          qqqice = 11637800._dbl_kind ,&! for qsat over ice
     242             :          TTTice = 5897.8_dbl_kind    ,&! for qsat over ice
     243             :          qqqocn = 627572.4_dbl_kind  ,&! for qsat over ocn
     244             :          TTTocn = 5107.4_dbl_kind      ! for qsat over ocn
     245             : 
     246             :       character (len=char_len), public :: &
     247             :          atmbndy = 'default' ! atmo boundary method, 'default' ('ccsm3') or 'constant'
     248             : 
     249             :       logical (kind=log_kind), public :: &
     250             :          calc_strair     = .true.  , & ! if true, calculate wind stress
     251             :          formdrag        = .false. , & ! if true, calculate form drag
     252             :          highfreq        = .false.     ! if true, calculate high frequency coupling
     253             : 
     254             :       integer (kind=int_kind), public :: &
     255             :          natmiter        = 5 ! number of iterations for atm boundary layer calcs
     256             : 
     257             :       ! Flux convergence tolerance
     258             :       real (kind=dbl_kind), public :: atmiter_conv = c0
     259             : 
     260             : !-----------------------------------------------------------------------
     261             : ! Parameters for the ice thickness distribution
     262             : !-----------------------------------------------------------------------
     263             : 
     264             :       integer (kind=int_kind), public :: &
     265             :          kitd      = 1 ,&! type of itd conversions
     266             :                          !   0 = delta function
     267             :                          !   1 = linear remap
     268             :          kcatbound = 1   !   0 = old category boundary formula
     269             :                          !   1 = new formula giving round numbers
     270             :                          !   2 = WMO standard
     271             :                          !   3 = asymptotic formula
     272             : 
     273             : !-----------------------------------------------------------------------
     274             : ! Parameters for the floe size distribution
     275             : !-----------------------------------------------------------------------
     276             : 
     277             :       integer (kind=int_kind), public :: &
     278             :          nfreq = 25                   ! number of frequencies
     279             : 
     280             :       real (kind=dbl_kind), public :: &
     281             :          floeshape = 0.66_dbl_kind    ! constant from Steele (unitless)
     282             : 
     283             :       real (kind=dbl_kind), public :: &
     284             :          floediam  = 300.0_dbl_kind   ! effective floe diameter for lateral melt (m)
     285             : 
     286             :       logical (kind=log_kind), public :: &
     287             :          wave_spec = .false.          ! if true, use wave forcing
     288             : 
     289             :       character (len=char_len), public :: &
     290             :          wave_spec_type = 'constant'  ! 'none', 'constant', or 'random'
     291             : 
     292             : !-----------------------------------------------------------------------
     293             : ! Parameters for melt ponds
     294             : !-----------------------------------------------------------------------
     295             : 
     296             :       real (kind=dbl_kind), public :: &
     297             :          hs0       = 0.03_dbl_kind    ! snow depth for transition to bare sea ice (m)
     298             : 
     299             :       ! level-ice ponds
     300             :       character (len=char_len), public :: &
     301             :          frzpnd    = 'cesm'           ! pond refreezing parameterization
     302             : 
     303             :       real (kind=dbl_kind), public :: &
     304             :          dpscale   = c1, &            ! alter e-folding time scale for flushing 
     305             :          rfracmin  = 0.15_dbl_kind, & ! minimum retained fraction of meltwater
     306             :          rfracmax  = 0.85_dbl_kind, & ! maximum retained fraction of meltwater
     307             :          pndaspect = 0.8_dbl_kind, &  ! ratio of pond depth to area fraction
     308             :          hs1       = 0.03_dbl_kind    ! snow depth for transition to bare pond ice (m)
     309             : 
     310             :       ! topo ponds
     311             :       real (kind=dbl_kind), public :: &
     312             :          hp1       = 0.01_dbl_kind    ! critical pond lid thickness for topo ponds
     313             : 
     314             : !-----------------------------------------------------------------------
     315             : ! Parameters for biogeochemistry
     316             : !-----------------------------------------------------------------------
     317             : 
     318             :       character(char_len), public :: &          
     319             :       ! skl biology parameters
     320             :          bgc_flux_type = 'Jin2006'  ! type of ocean-ice poston velocity (or 'constant')
     321             : 
     322             :       logical (kind=log_kind), public :: &
     323             :          z_tracers  = .false.,    & ! if .true., bgc or aerosol tracers are vertically resolved
     324             :          scale_bgc  = .false.,    & ! if .true., initialize bgc tracers proportionally with salinity
     325             :          solve_zbgc = .false.,    & ! if .true., solve vertical biochemistry portion of code
     326             :          dEdd_algae = .false.,    & ! if .true., algal absorption of shortwave is computed in the
     327             :          skl_bgc    = .false.       ! if true, solve skeletal biochemistry
     328             : 
     329             :       real (kind=dbl_kind), public :: & 
     330             :          phi_snow     = p5              , & ! snow porosity
     331             :          grid_o       = c5              , & ! for bottom flux
     332             :          initbio_frac = c1              , & ! fraction of ocean trcr concentration in bio trcrs
     333             :          l_sk         = 7.0_dbl_kind    , & ! characteristic diffusive scale (m)
     334             :          grid_oS      = c5              , & ! for bottom flux
     335             :          l_skS        = 7.0_dbl_kind    , & ! characteristic skeletal layer thickness (m) (zsalinity)
     336             :          algal_vel    = 1.11e-8_dbl_kind, & ! 0.5 cm/d(m/s) Lavoie 2005  1.5 cm/day
     337             :          R_dFe2dust   = 0.035_dbl_kind  , & !  g/g (3.5% content) Tagliabue 2009
     338             :          dustFe_sol   = 0.005_dbl_kind  , & ! solubility fraction
     339             :          frazil_scav  = c1              , & ! fraction or multiple of bgc concentrated in frazil ice
     340             :          sk_l         = 0.03_dbl_kind   , & ! skeletal layer thickness (m)
     341             :          min_bgc      = 0.01_dbl_kind   , & ! fraction of ocean bgc concentration in surface melt
     342             :          T_max        = c0              , & ! maximum temperature (C)
     343             :          fsal         = c1              , & ! Salinity limitation (1)
     344             :          op_dep_min   = p1              , & ! light attenuates for optical depths exceeding min
     345             :          fr_graze_s   = p5              , & ! fraction of grazing spilled or slopped
     346             :          fr_graze_e   = p5              , & ! fraction of assimilation excreted
     347             :          fr_mort2min  = p5              , & ! fractionation of mortality to Am
     348             :          fr_dFe       = 0.3_dbl_kind    , & ! fraction of remineralized nitrogen
     349             :                                             ! (in units of algal iron)
     350             :          k_nitrif     = c0              , & ! nitrification rate (1/day)
     351             :          t_iron_conv  = 3065.0_dbl_kind , & ! desorption loss pFe to dFe (day)
     352             :          max_loss     = 0.9_dbl_kind    , & ! restrict uptake to % of remaining value
     353             :          max_dfe_doc1 = 0.2_dbl_kind    , & ! max ratio of dFe to saccharides in the ice
     354             :                                             ! (nM Fe/muM C)
     355             :          fr_resp      = 0.05_dbl_kind   , & ! fraction of algal growth lost due to respiration
     356             :          fr_resp_s    = 0.75_dbl_kind   , & ! DMSPd fraction of respiration loss as DMSPd
     357             :          y_sk_DMS     = p5              , & ! fraction conversion given high yield
     358             :          t_sk_conv    = 3.0_dbl_kind    , & ! Stefels conversion time (d)
     359             :          t_sk_ox      = 10.0_dbl_kind       ! DMS oxidation time (d)
     360             : 
     361             : 
     362             : !-----------------------------------------------------------------------
     363             : ! Parameters for shortwave redistribution
     364             : !-----------------------------------------------------------------------
     365             : 
     366             :       logical (kind=log_kind), public :: &
     367             :          sw_redist     = .false.
     368             : 
     369             :       real (kind=dbl_kind), public :: & 
     370             :          sw_frac      = 0.9_dbl_kind    , & ! Fraction of internal shortwave moved to surface
     371             :          sw_dtemp     = 0.02_dbl_kind       ! temperature difference from melting
     372             : 
     373             : !=======================================================================
     374             : 
     375             :       contains
     376             : 
     377             : !=======================================================================
     378             : 
     379             : !autodocument_start icepack_init_parameters
     380             : ! subroutine to set the column package internal parameters
     381             : 
     382       13744 :       subroutine icepack_init_parameters(   &
     383             :          puny_in, bignum_in, pi_in, secday_in, &
     384             :          rhos_in, rhoi_in, rhow_in, cp_air_in, emissivity_in, &
     385             :          cp_ice_in, cp_ocn_in, hfrazilmin_in, floediam_in, &
     386             :          depressT_in, dragio_in, albocn_in, gravit_in, viscosity_dyn_in, &
     387             :          Tocnfrz_in, rhofresh_in, zvir_in, vonkar_in, cp_wv_in, &
     388             :          stefan_boltzmann_in, ice_ref_salinity_in, &
     389             :          Tffresh_in, Lsub_in, Lvap_in, Timelt_in, Tsmelt_in, &
     390             :          iceruf_in, Cf_in, Pstar_in, Cstar_in, kappav_in, &
     391             :          kice_in, kseaice_in, ksno_in, &
     392             :          zref_in, hs_min_in, snowpatch_in, rhosi_in, sk_l_in, &
     393             :          saltmax_in, phi_init_in, min_salin_in, salt_loss_in, &
     394             :          min_bgc_in, dSin0_frazil_in, hi_ssl_in, hs_ssl_in, &
     395             :          awtvdr_in, awtidr_in, awtvdf_in, awtidf_in, &
     396             :          qqqice_in, TTTice_in, qqqocn_in, TTTocn_in, &
     397           0 :          ktherm_in, conduct_in, fbot_xfer_type_in, calc_Tsfc_in, dts_b_in, &
     398             :          update_ocn_f_in, ustar_min_in, a_rapid_mode_in, &
     399             :          Rac_rapid_mode_in, aspect_rapid_mode_in, &
     400             :          dSdt_slow_mode_in, phi_c_slow_mode_in, &
     401           0 :          phi_i_mushy_in, shortwave_in, albedo_type_in, albsnowi_in, &
     402             :          albicev_in, albicei_in, albsnowv_in, &
     403             :          ahmax_in, R_ice_in, R_pnd_in, R_snw_in, dT_mlt_in, rsnw_mlt_in, &
     404             :          kalg_in, kstrength_in, krdg_partic_in, krdg_redist_in, mu_rdg_in, &
     405           0 :          atmbndy_in, calc_strair_in, formdrag_in, highfreq_in, natmiter_in, &
     406             :          atmiter_conv_in, &
     407           0 :          tfrz_option_in, kitd_in, kcatbound_in, hs0_in, frzpnd_in, &
     408           0 :          floeshape_in, wave_spec_in, wave_spec_type_in, nfreq_in, &
     409             :          dpscale_in, rfracmin_in, rfracmax_in, pndaspect_in, hs1_in, hp1_in, &
     410           0 :          bgc_flux_type_in, z_tracers_in, scale_bgc_in, solve_zbgc_in, &
     411             :          modal_aero_in, skl_bgc_in, solve_zsal_in, grid_o_in, l_sk_in, &
     412             :          initbio_frac_in, grid_oS_in, l_skS_in,  dEdd_algae_in, &
     413             :          phi_snow_in, heat_capacity_in, T_max_in, fsal_in, &
     414             :          fr_resp_in, algal_vel_in, R_dFe2dust_in, dustFe_sol_in, &
     415             :          op_dep_min_in, fr_graze_s_in, fr_graze_e_in, fr_mort2min_in, &
     416             :          fr_dFe_in, k_nitrif_in, t_iron_conv_in, max_loss_in, &
     417             :          max_dfe_doc1_in, fr_resp_s_in, conserv_check_in, &
     418             :          y_sk_DMS_in, t_sk_conv_in, t_sk_ox_in, frazil_scav_in, &
     419             :          sw_redist_in, sw_frac_in, sw_dtemp_in)
     420             : 
     421             :       !-----------------------------------------------------------------
     422             :       ! parameter constants
     423             :       !-----------------------------------------------------------------
     424             : 
     425             :       real (kind=dbl_kind), intent(in), optional :: &
     426             :          secday_in,     & !
     427             :          puny_in,       & !
     428             :          bignum_in,     & !
     429             :          pi_in            !
     430             : 
     431             :       !-----------------------------------------------------------------
     432             :       ! densities
     433             :       !-----------------------------------------------------------------
     434             : 
     435             :       real (kind=dbl_kind), intent(in), optional :: &
     436             :          rhos_in,       & ! density of snow (kg/m^3)
     437             :          rhoi_in,       & ! density of ice (kg/m^3)
     438             :          rhosi_in,      & ! average sea ice density (kg/m2)
     439             :          rhow_in,       & ! density of seawater (kg/m^3)
     440             :          rhofresh_in      ! density of fresh water (kg/m^3)
     441             : 
     442             : !-----------------------------------------------------------------------
     443             : ! Parameters for thermodynamics
     444             : !-----------------------------------------------------------------------
     445             : 
     446             :       real (kind=dbl_kind), intent(in), optional :: &
     447             :          floediam_in,   & ! effective floe diameter for lateral melt (m)
     448             :          hfrazilmin_in, & ! min thickness of new frazil ice (m)
     449             :          cp_ice_in,     & ! specific heat of fresh ice (J/kg/K)
     450             :          cp_ocn_in,     & ! specific heat of ocn    (J/kg/K)
     451             :          depressT_in,   & ! Tf:brine salinity ratio (C/ppt)
     452             :          viscosity_dyn_in, & ! dynamic viscosity of brine (kg/m/s)
     453             :          Tocnfrz_in,    & ! freezing temp of seawater (C)
     454             :          Tffresh_in,    & ! freezing temp of fresh ice (K)
     455             :          Lsub_in,       & ! latent heat, sublimation freshwater (J/kg)
     456             :          Lvap_in,       & ! latent heat, vaporization freshwater (J/kg)
     457             :          Timelt_in,     & ! melting temperature, ice top surface  (C)
     458             :          Tsmelt_in,     & ! melting temperature, snow top surface (C)
     459             :          ice_ref_salinity_in, & ! (ppt)
     460             :          kice_in,       & ! thermal conductivity of fresh ice(W/m/deg)
     461             :          kseaice_in,    & ! thermal conductivity of sea ice (W/m/deg)
     462             :          ksno_in,       & ! thermal conductivity of snow  (W/m/deg)
     463             :          hs_min_in,     & ! min snow thickness for computing zTsn (m)
     464             :          snowpatch_in,  & ! parameter for fractional snow area (m)
     465             :          saltmax_in,    & ! max salinity at ice base for BL99 (ppt)
     466             :          phi_init_in,   & ! initial liquid fraction of frazil
     467             :          min_salin_in,  & ! threshold for brine pocket treatment
     468             :          salt_loss_in,  & ! fraction of salt retained in zsalinity
     469             :          dSin0_frazil_in  ! bulk salinity reduction of newly formed frazil
     470             : 
     471             :       integer (kind=int_kind), intent(in), optional :: &
     472             :          ktherm_in          ! type of thermodynamics
     473             :                             ! 0 = 0-layer approximation
     474             :                             ! 1 = Bitz and Lipscomb 1999
     475             :                             ! 2 = mushy layer theory
     476             : 
     477             :       character (char_len), intent(in), optional :: &
     478             :          conduct_in, &      ! 'MU71' or 'bubbly'
     479             :          fbot_xfer_type_in  ! transfer coefficient type for ice-ocean heat flux
     480             :         
     481             :       logical (kind=log_kind), intent(in), optional :: &
     482             :          heat_capacity_in, &! if true, ice has nonzero heat capacity
     483             :                             ! if false, use zero-layer thermodynamics
     484             :          calc_Tsfc_in    , &! if true, calculate surface temperature
     485             :                             ! if false, Tsfc is computed elsewhere and
     486             :                             ! atmos-ice fluxes are provided to CICE
     487             :          update_ocn_f_in    ! include fresh water and salt fluxes for frazil
     488             : 
     489             :       real (kind=dbl_kind), intent(in), optional :: &
     490             :          dts_b_in,   &      ! zsalinity timestep
     491             :          ustar_min_in       ! minimum friction velocity for ice-ocean heat flux
     492             :  
     493             :       ! mushy thermo
     494             :       real(kind=dbl_kind), intent(in), optional :: &
     495             :          a_rapid_mode_in      , & ! channel radius for rapid drainage mode (m)
     496             :          Rac_rapid_mode_in    , & ! critical Rayleigh number for rapid drainage mode
     497             :          aspect_rapid_mode_in , & ! aspect ratio for rapid drainage mode (larger=wider)
     498             :          dSdt_slow_mode_in    , & ! slow mode drainage strength (m s-1 K-1)
     499             :          phi_c_slow_mode_in   , & ! liquid fraction porosity cutoff for slow mode
     500             :          phi_i_mushy_in           ! liquid fraction of congelation ice
     501             :         
     502             :         character(len=char_len), intent(in), optional :: &
     503             :              tfrz_option_in              ! form of ocean freezing temperature
     504             :                                          ! 'minus1p8' = -1.8 C
     505             :                                          ! 'linear_salt' = -depressT * sss
     506             :                                          ! 'mushy' conforms with ktherm=2
     507             : 
     508             : !-----------------------------------------------------------------------
     509             : ! Parameters for radiation
     510             : !-----------------------------------------------------------------------
     511             : 
     512             :       real(kind=dbl_kind), intent(in), optional :: &
     513             :          emissivity_in, & ! emissivity of snow and ice
     514             :          albocn_in,     & ! ocean albedo
     515             :          vonkar_in,     & ! von Karman constant
     516             :          stefan_boltzmann_in, & !  W/m^2/K^4
     517             :          kappav_in,     & ! vis extnctn coef in ice, wvlngth<700nm (1/m)
     518             :          hi_ssl_in,     & ! ice surface scattering layer thickness (m)
     519             :          hs_ssl_in,     & ! visible, direct 
     520             :          awtvdr_in,     & ! visible, direct  ! for history and
     521             :          awtidr_in,     & ! near IR, direct  ! diagnostics
     522             :          awtvdf_in,     & ! visible, diffuse
     523             :          awtidf_in        ! near IR, diffuse
     524             : 
     525             :       character (len=char_len), intent(in), optional :: &
     526             :          shortwave_in, & ! shortwave method, 'ccsm3' or 'dEdd'
     527             :          albedo_type_in  ! albedo parameterization, 'ccsm3' or 'constant'
     528             :                          ! shortwave='dEdd' overrides this parameter
     529             : 
     530             :       ! baseline albedos for ccsm3 shortwave, set in namelist
     531             :       real (kind=dbl_kind), intent(in), optional :: &
     532             :          albicev_in  , & ! visible ice albedo for h > ahmax
     533             :          albicei_in  , & ! near-ir ice albedo for h > ahmax
     534             :          albsnowv_in , & ! cold snow albedo, visible
     535             :          albsnowi_in , & ! cold snow albedo, near IR
     536             :          ahmax_in        ! thickness above which ice albedo is constant (m)
     537             :         
     538             :       ! dEdd tuning parameters, set in namelist
     539             :       real (kind=dbl_kind), intent(in), optional :: &
     540             :          R_ice_in    , & ! sea ice tuning parameter; +1 > 1sig increase in albedo
     541             :          R_pnd_in    , & ! ponded ice tuning parameter; +1 > 1sig increase in albedo
     542             :          R_snw_in    , & ! snow tuning parameter; +1 > ~.01 change in broadband albedo
     543             :          dT_mlt_in   , & ! change in temp for non-melt to melt snow grain
     544             :                          ! radius change (C)
     545             :          rsnw_mlt_in , & ! maximum melting snow grain radius (10^-6 m)
     546             :          kalg_in         ! algae absorption coefficient for 0.5 m thick layer
     547             : 
     548             :       logical (kind=log_kind), intent(in), optional :: &
     549             :          sw_redist_in    ! redistribute shortwave
     550             : 
     551             :       real (kind=dbl_kind), intent(in), optional :: & 
     552             :          sw_frac_in  , & ! Fraction of internal shortwave moved to surface
     553             :          sw_dtemp_in     ! temperature difference from melting
     554             : 
     555             : !-----------------------------------------------------------------------
     556             : ! Parameters for dynamics
     557             : !-----------------------------------------------------------------------
     558             : 
     559             :       real(kind=dbl_kind), intent(in), optional :: &
     560             :          Cf_in,         & ! ratio of ridging work to PE change in ridging 
     561             :          Pstar_in,      & ! constant in Hibler strength formula 
     562             :          Cstar_in,      & ! constant in Hibler strength formula 
     563             :          dragio_in,     & ! ice-ocn drag coefficient
     564             :          gravit_in,     & ! gravitational acceleration (m/s^2)
     565             :          iceruf_in        ! ice surface roughness (m)
     566             : 
     567             :       integer (kind=int_kind), intent(in), optional :: & ! defined in namelist 
     568             :          kstrength_in  , & ! 0 for simple Hibler (1979) formulation 
     569             :                            ! 1 for Rothrock (1975) pressure formulation 
     570             :          krdg_partic_in, & ! 0 for Thorndike et al. (1975) formulation 
     571             :                            ! 1 for exponential participation function 
     572             :          krdg_redist_in    ! 0 for Hibler (1980) formulation 
     573             :                            ! 1 for exponential redistribution function 
     574             :  
     575             :       real (kind=dbl_kind), intent(in), optional :: &  
     576             :          mu_rdg_in         ! gives e-folding scale of ridged ice (m^.5) 
     577             :                            ! (krdg_redist = 1) 
     578             : 
     579             : !-----------------------------------------------------------------------
     580             : ! Parameters for atmosphere
     581             : !-----------------------------------------------------------------------
     582             : 
     583             :       real (kind=dbl_kind), intent(in), optional :: &  
     584             :          cp_air_in,     & ! specific heat of air (J/kg/K)
     585             :          cp_wv_in,      & ! specific heat of water vapor (J/kg/K)
     586             :          zvir_in,       & ! rh2o/rair - 1.0
     587             :          zref_in,       & ! reference height for stability (m)
     588             :          qqqice_in,     & ! for qsat over ice
     589             :          TTTice_in,     & ! for qsat over ice
     590             :          qqqocn_in,     & ! for qsat over ocn
     591             :          TTTocn_in        ! for qsat over ocn
     592             : 
     593             :       character (len=char_len), intent(in), optional :: &
     594             :          atmbndy_in ! atmo boundary method, 'default' ('ccsm3') or 'constant'
     595             :         
     596             :       logical (kind=log_kind), intent(in), optional :: &
     597             :          calc_strair_in, &  ! if true, calculate wind stress components
     598             :          formdrag_in,    &  ! if true, calculate form drag
     599             :          highfreq_in        ! if true, use high frequency coupling
     600             :         
     601             :       integer (kind=int_kind), intent(in), optional :: &
     602             :          natmiter_in        ! number of iterations for boundary layer calculations
     603             :         
     604             :       ! Flux convergence tolerance
     605             :       real (kind=dbl_kind), intent(in), optional :: atmiter_conv_in
     606             : 
     607             : !-----------------------------------------------------------------------
     608             : ! Parameters for the ice thickness distribution
     609             : !-----------------------------------------------------------------------
     610             : 
     611             :       integer (kind=int_kind), intent(in), optional :: &
     612             :          kitd_in        , & ! type of itd conversions
     613             :                             !   0 = delta function
     614             :                             !   1 = linear remap
     615             :          kcatbound_in       !   0 = old category boundary formula
     616             :                             !   1 = new formula giving round numbers
     617             :                             !   2 = WMO standard
     618             :                             !   3 = asymptotic formula
     619             : 
     620             : !-----------------------------------------------------------------------
     621             : ! Parameters for the floe size distribution
     622             : !-----------------------------------------------------------------------
     623             : 
     624             :       integer (kind=int_kind), intent(in), optional :: &
     625             :          nfreq_in           ! number of frequencies
     626             : 
     627             :       real (kind=dbl_kind), intent(in), optional :: &
     628             :          floeshape_in       ! constant from Steele (unitless)
     629             : 
     630             :       logical (kind=log_kind), intent(in), optional :: &
     631             :          wave_spec_in       ! if true, use wave forcing
     632             : 
     633             :       character (len=char_len), intent(in), optional :: &
     634             :          wave_spec_type_in  ! type of wave spectrum forcing 
     635             : 
     636             : !-----------------------------------------------------------------------
     637             : ! Parameters for biogeochemistry
     638             : !-----------------------------------------------------------------------
     639             : 
     640             :      character(char_len), intent(in), optional :: &     
     641             :         bgc_flux_type_in    ! type of ocean-ice piston velocity 
     642             :                             ! 'constant', 'Jin2006'      
     643             : 
     644             :       logical (kind=log_kind), intent(in), optional :: &
     645             :          z_tracers_in,      & ! if .true., bgc or aerosol tracers are vertically resolved
     646             :          scale_bgc_in,      & ! if .true., initialize bgc tracers proportionally with salinity
     647             :          solve_zbgc_in,     & ! if .true., solve vertical biochemistry portion of code
     648             :          dEdd_algae_in,     & ! if .true., algal absorptionof Shortwave is computed in the
     649             :          modal_aero_in,     & ! if .true., use modal aerosol formulation in shortwave
     650             :          conserv_check_in     ! if .true., run conservation checks and abort if checks fail
     651             :         
     652             :       logical (kind=log_kind), intent(in), optional :: & 
     653             :          skl_bgc_in,        &   ! if true, solve skeletal biochemistry
     654             :          solve_zsal_in          ! if true, update salinity profile from solve_S_dt
     655             : 
     656             :       real (kind=dbl_kind), intent(in), optional :: & 
     657             :          grid_o_in      , & ! for bottom flux        
     658             :          l_sk_in        , & ! characteristic diffusive scale (zsalinity) (m)
     659             :          initbio_frac_in, & ! fraction of ocean tracer concentration used to initialize tracer 
     660             :          phi_snow_in        ! snow porosity at the ice/snow interface 
     661             : 
     662             :       real (kind=dbl_kind), intent(in), optional :: & 
     663             :          grid_oS_in     , & ! for bottom flux (zsalinity)
     664             :          l_skS_in           ! 0.02 characteristic skeletal layer thickness (m) (zsalinity)
     665             :       real (kind=dbl_kind), intent(in), optional :: &
     666             :          fr_resp_in           , &   ! fraction of algal growth lost due to respiration
     667             :          algal_vel_in         , &   ! 0.5 cm/d(m/s) Lavoie 2005  1.5 cm/day
     668             :          R_dFe2dust_in        , &   !  g/g (3.5% content) Tagliabue 2009
     669             :          dustFe_sol_in        , &   ! solubility fraction
     670             :          T_max_in            , & ! maximum temperature (C)
     671             :          fsal_in             , & ! Salinity limitation (ppt)
     672             :          op_dep_min_in       , & ! Light attenuates for optical depths exceeding min
     673             :          fr_graze_s_in       , & ! fraction of grazing spilled or slopped
     674             :          fr_graze_e_in       , & ! fraction of assimilation excreted 
     675             :          fr_mort2min_in      , & ! fractionation of mortality to Am
     676             :          fr_dFe_in           , & ! fraction of remineralized nitrogen 
     677             :                                     ! (in units of algal iron)
     678             :          k_nitrif_in         , & ! nitrification rate (1/day)            
     679             :          t_iron_conv_in      , & ! desorption loss pFe to dFe (day)
     680             :          max_loss_in         , & ! restrict uptake to % of remaining value 
     681             :          max_dfe_doc1_in     , & ! max ratio of dFe to saccharides in the ice 
     682             :                                     ! (nM Fe/muM C)    
     683             :          fr_resp_s_in        , & ! DMSPd fraction of respiration loss as DMSPd
     684             :          y_sk_DMS_in         , & ! fraction conversion given high yield
     685             :          t_sk_conv_in        , & ! Stefels conversion time (d)
     686             :          t_sk_ox_in          , & ! DMS oxidation time (d)
     687             :          frazil_scav_in          ! scavenging fraction or multiple in frazil ice
     688             : 
     689             :       real (kind=dbl_kind), intent(in), optional :: &
     690             :          sk_l_in,       & ! skeletal layer thickness (m)
     691             :          min_bgc_in       ! fraction of ocean bgc concentration in surface melt
     692             : 
     693             : !-----------------------------------------------------------------------
     694             : ! Parameters for melt ponds
     695             : !-----------------------------------------------------------------------
     696             : 
     697             :       real (kind=dbl_kind), intent(in), optional :: &
     698             :          hs0_in             ! snow depth for transition to bare sea ice (m)
     699             :         
     700             :       ! level-ice ponds
     701             :       character (len=char_len), intent(in), optional :: &
     702             :          frzpnd_in          ! pond refreezing parameterization
     703             :         
     704             :       real (kind=dbl_kind), intent(in), optional :: &
     705             :          dpscale_in, &      ! alter e-folding time scale for flushing 
     706             :          rfracmin_in, &     ! minimum retained fraction of meltwater
     707             :          rfracmax_in, &     ! maximum retained fraction of meltwater
     708             :          pndaspect_in, &    ! ratio of pond depth to pond fraction
     709             :          hs1_in             ! tapering parameter for snow on pond ice
     710             :         
     711             :       ! topo ponds
     712             :       real (kind=dbl_kind), intent(in), optional :: &
     713             :          hp1_in             ! critical parameter for pond ice thickness
     714             : 
     715             : !autodocument_end
     716             : 
     717             :       character(len=*),parameter :: subname='(icepack_init_parameters)'
     718             : 
     719       13744 :       if (present(rhos_in)              ) rhos             = rhos_in
     720       13744 :       if (present(rhoi_in)              ) rhoi             = rhoi_in
     721       13744 :       if (present(rhow_in)              ) rhow             = rhow_in
     722       13744 :       if (present(cp_air_in)            ) cp_air           = cp_air_in
     723       13744 :       if (present(emissivity_in)        ) emissivity       = emissivity_in
     724       13744 :       if (present(floediam_in)          ) floediam         = floediam_in
     725       13744 :       if (present(hfrazilmin_in)        ) hfrazilmin       = hfrazilmin_in
     726       13744 :       if (present(cp_ice_in)            ) cp_ice           = cp_ice_in
     727       13744 :       if (present(cp_ocn_in)            ) cp_ocn           = cp_ocn_in
     728       13744 :       if (present(depressT_in)          ) depressT         = depressT_in
     729       13744 :       if (present(dragio_in)            ) dragio           = dragio_in
     730       13744 :       if (present(albocn_in)            ) albocn           = albocn_in
     731       13744 :       if (present(gravit_in)            ) gravit           = gravit_in
     732       13744 :       if (present(viscosity_dyn_in)     ) viscosity_dyn    = viscosity_dyn_in
     733       13744 :       if (present(Tocnfrz_in)           ) Tocnfrz          = Tocnfrz_in
     734       13744 :       if (present(rhofresh_in)          ) rhofresh         = rhofresh_in
     735       13744 :       if (present(zvir_in)              ) zvir             = zvir_in
     736       13744 :       if (present(vonkar_in)            ) vonkar           = vonkar_in
     737       13744 :       if (present(cp_wv_in)             ) cp_wv            = cp_wv_in
     738       13744 :       if (present(stefan_boltzmann_in)  ) stefan_boltzmann = stefan_boltzmann_in
     739       13744 :       if (present(Tffresh_in)           ) Tffresh          = Tffresh_in
     740       13744 :       if (present(Lsub_in)              ) Lsub             = Lsub_in
     741       13744 :       if (present(Lvap_in)              ) Lvap             = Lvap_in
     742       13744 :       if (present(Timelt_in)            ) Timelt           = Timelt_in
     743       13744 :       if (present(Tsmelt_in)            ) Tsmelt           = Tsmelt_in
     744       13744 :       if (present(ice_ref_salinity_in)  ) ice_ref_salinity = ice_ref_salinity_in
     745       13744 :       if (present(iceruf_in)            ) iceruf           = iceruf_in
     746       13744 :       if (present(Cf_in)                ) Cf               = Cf_in
     747       13744 :       if (present(Pstar_in)             ) Pstar            = Pstar_in
     748       13744 :       if (present(Cstar_in)             ) Cstar            = Cstar_in
     749       13744 :       if (present(kappav_in)            ) kappav           = kappav_in
     750       13744 :       if (present(kice_in)              ) kice             = kice_in
     751       13744 :       if (present(kseaice_in)           ) kseaice          = kseaice_in
     752       13744 :       if (present(ksno_in)              ) ksno             = ksno_in
     753       13744 :       if (present(zref_in)              ) zref             = zref_in
     754       13744 :       if (present(hs_min_in)            ) hs_min           = hs_min_in
     755       13744 :       if (present(snowpatch_in)         ) snowpatch        = snowpatch_in
     756       13744 :       if (present(rhosi_in)             ) rhosi            = rhosi_in
     757       13744 :       if (present(sk_l_in)              ) sk_l             = sk_l_in
     758       13744 :       if (present(saltmax_in)           ) saltmax          = saltmax_in
     759       13744 :       if (present(phi_init_in)          ) phi_init         = phi_init_in
     760       13744 :       if (present(min_salin_in)         ) min_salin        = min_salin_in
     761       13744 :       if (present(salt_loss_in)         ) salt_loss        = salt_loss_in
     762       13744 :       if (present(min_bgc_in)           ) min_bgc          = min_bgc_in
     763       13744 :       if (present(dSin0_frazil_in)      ) dSin0_frazil     = dSin0_frazil_in
     764       13744 :       if (present(hi_ssl_in)            ) hi_ssl           = hi_ssl_in
     765       13744 :       if (present(hs_ssl_in)            ) hs_ssl           = hs_ssl_in
     766       13744 :       if (present(awtvdr_in)            ) awtvdr           = awtvdr_in
     767       13744 :       if (present(awtidr_in)            ) awtidr           = awtidr_in
     768       13744 :       if (present(awtvdf_in)            ) awtvdf           = awtvdf_in
     769       13744 :       if (present(awtidf_in)            ) awtidf           = awtidf_in
     770       13744 :       if (present(qqqice_in)            ) qqqice           = qqqice_in
     771       13744 :       if (present(TTTice_in)            ) TTTice           = TTTice_in
     772       13744 :       if (present(qqqocn_in)            ) qqqocn           = qqqocn_in
     773       13744 :       if (present(TTTocn_in)            ) TTTocn           = TTTocn_in
     774       13744 :       if (present(puny_in)              ) puny             = puny_in
     775       13744 :       if (present(bignum_in)            ) bignum           = bignum_in
     776       13744 :       if (present(pi_in)                ) pi               = pi_in
     777       13744 :       if (present(secday_in)            ) secday           = secday_in
     778       13744 :       if (present(ktherm_in)            ) ktherm           = ktherm_in
     779       13744 :       if (present(conduct_in)           ) conduct          = conduct_in
     780       13744 :       if (present(fbot_xfer_type_in)    ) fbot_xfer_type   = fbot_xfer_type_in
     781       13744 :       if (present(heat_capacity_in)     ) heat_capacity    = heat_capacity_in
     782       13744 :       if (present(calc_Tsfc_in)         ) calc_Tsfc        = calc_Tsfc_in
     783       13744 :       if (present(update_ocn_f_in)      ) update_ocn_f     = update_ocn_f_in
     784       13744 :       if (present(dts_b_in)             ) dts_b            = dts_b_in
     785       13744 :       if (present(ustar_min_in)         ) ustar_min        = ustar_min_in
     786       13744 :       if (present(a_rapid_mode_in)      ) a_rapid_mode     = a_rapid_mode_in
     787       13744 :       if (present(Rac_rapid_mode_in)    ) Rac_rapid_mode   = Rac_rapid_mode_in
     788       13744 :       if (present(aspect_rapid_mode_in) ) aspect_rapid_mode= aspect_rapid_mode_in
     789       13744 :       if (present(dSdt_slow_mode_in)    ) dSdt_slow_mode   = dSdt_slow_mode_in
     790       13744 :       if (present(phi_c_slow_mode_in)   ) phi_c_slow_mode  = phi_c_slow_mode_in
     791       13744 :       if (present(phi_i_mushy_in)       ) phi_i_mushy      = phi_i_mushy_in
     792       13744 :       if (present(shortwave_in)         ) shortwave        = shortwave_in
     793       13744 :       if (present(albedo_type_in)       ) albedo_type      = albedo_type_in
     794       13744 :       if (present(albicev_in)           ) albicev          = albicev_in
     795       13744 :       if (present(albicei_in)           ) albicei          = albicei_in
     796       13744 :       if (present(albsnowv_in)          ) albsnowv         = albsnowv_in
     797       13744 :       if (present(albsnowi_in)          ) albsnowi         = albsnowi_in
     798       13744 :       if (present(ahmax_in)             ) ahmax            = ahmax_in
     799       13744 :       if (present(R_ice_in)             ) R_ice            = R_ice_in
     800       13744 :       if (present(R_pnd_in)             ) R_pnd            = R_pnd_in
     801       13744 :       if (present(R_snw_in)             ) R_snw            = R_snw_in
     802       13744 :       if (present(dT_mlt_in)            ) dT_mlt           = dT_mlt_in
     803       13744 :       if (present(rsnw_mlt_in)          ) rsnw_mlt         = rsnw_mlt_in
     804       13744 :       if (present(kalg_in)              ) kalg             = kalg_in
     805       13744 :       if (present(kstrength_in)         ) kstrength        = kstrength_in
     806       13744 :       if (present(krdg_partic_in)       ) krdg_partic      = krdg_partic_in
     807       13744 :       if (present(krdg_redist_in)       ) krdg_redist      = krdg_redist_in
     808       13744 :       if (present(mu_rdg_in)            ) mu_rdg           = mu_rdg_in
     809       13744 :       if (present(atmbndy_in)           ) atmbndy          = atmbndy_in
     810       13744 :       if (present(calc_strair_in)       ) calc_strair      = calc_strair_in
     811       13744 :       if (present(formdrag_in)          ) formdrag         = formdrag_in
     812       13744 :       if (present(highfreq_in)          ) highfreq         = highfreq_in
     813       13744 :       if (present(natmiter_in)          ) natmiter         = natmiter_in
     814       13744 :       if (present(atmiter_conv_in)      ) atmiter_conv     = atmiter_conv_in
     815       13744 :       if (present(tfrz_option_in)       ) tfrz_option      = tfrz_option_in
     816       13744 :       if (present(kitd_in)              ) kitd             = kitd_in
     817       13744 :       if (present(kcatbound_in)         ) kcatbound        = kcatbound_in
     818       13744 :       if (present(floeshape_in)         ) floeshape        = floeshape_in
     819       13744 :       if (present(wave_spec_in)         ) wave_spec        = wave_spec_in
     820       13744 :       if (present(wave_spec_type_in)    ) wave_spec_type   = wave_spec_type_in
     821       13744 :       if (present(nfreq_in)             ) nfreq            = nfreq_in
     822       13744 :       if (present(hs0_in)               ) hs0              = hs0_in
     823       13744 :       if (present(frzpnd_in)            ) frzpnd           = frzpnd_in
     824       13744 :       if (present(dpscale_in)           ) dpscale          = dpscale_in
     825       13744 :       if (present(rfracmin_in)          ) rfracmin         = rfracmin_in
     826       13744 :       if (present(rfracmax_in)          ) rfracmax         = rfracmax_in
     827       13744 :       if (present(pndaspect_in)         ) pndaspect        = pndaspect_in
     828       13744 :       if (present(hs1_in)               ) hs1              = hs1_in
     829       13744 :       if (present(hp1_in)               ) hp1              = hp1_in
     830       13744 :       if (present(bgc_flux_type_in)     ) bgc_flux_type    = bgc_flux_type_in
     831       13744 :       if (present(z_tracers_in)         ) z_tracers        = z_tracers_in
     832       13744 :       if (present(scale_bgc_in)         ) scale_bgc        = scale_bgc_in
     833       13744 :       if (present(solve_zbgc_in)        ) solve_zbgc       = solve_zbgc_in
     834       13744 :       if (present(dEdd_algae_in)        ) dEdd_algae       = dEdd_algae_in
     835       13744 :       if (present(modal_aero_in)        ) modal_aero       = modal_aero_in
     836       13744 :       if (present(conserv_check_in)     ) conserv_check    = conserv_check_in
     837       13744 :       if (present(skl_bgc_in)           ) skl_bgc          = skl_bgc_in
     838       13744 :       if (present(solve_zsal_in)        ) solve_zsal       = solve_zsal_in
     839       13744 :       if (present(grid_o_in)            ) grid_o           = grid_o_in
     840       13744 :       if (present(l_sk_in)              ) l_sk             = l_sk_in
     841       13744 :       if (present(initbio_frac_in)      ) initbio_frac     = initbio_frac_in
     842       13744 :       if (present(grid_oS_in)           ) grid_oS          = grid_oS_in
     843       13744 :       if (present(l_skS_in)             ) l_skS            = l_skS_in
     844       13744 :       if (present(phi_snow_in)          ) phi_snow         = phi_snow_in
     845       13744 :       if (present(fr_resp_in)           ) fr_resp          = fr_resp_in
     846       13744 :       if (present(algal_vel_in)         ) algal_vel        = algal_vel_in
     847       13744 :       if (present(R_dFe2dust_in)        ) R_dFe2dust       = R_dFe2dust_in
     848       13744 :       if (present(dustFe_sol_in)        ) dustFe_sol       = dustFe_sol_in
     849       13744 :       if (present(T_max_in)             ) T_max            = T_max_in
     850       13744 :       if (present(fsal_in)              ) fsal             = fsal_in
     851       13744 :       if (present(op_dep_min_in)        ) op_dep_min       = op_dep_min_in
     852       13744 :       if (present(fr_graze_s_in)        ) fr_graze_s       = fr_graze_s_in
     853       13744 :       if (present(fr_graze_e_in)        ) fr_graze_e       = fr_graze_e_in
     854       13744 :       if (present(fr_mort2min_in)       ) fr_mort2min      = fr_mort2min_in
     855       13744 :       if (present(fr_dFe_in)            ) fr_dFe           = fr_dFe_in
     856       13744 :       if (present(k_nitrif_in)          ) k_nitrif         = k_nitrif_in
     857       13744 :       if (present(t_iron_conv_in)       ) t_iron_conv      = t_iron_conv_in
     858       13744 :       if (present(max_loss_in)          ) max_loss         = max_loss_in
     859       13744 :       if (present(max_dfe_doc1_in)      ) max_dfe_doc1     = max_dfe_doc1_in
     860       13744 :       if (present(fr_resp_s_in)         ) fr_resp_s        = fr_resp_s_in
     861       13744 :       if (present(y_sk_DMS_in)          ) y_sk_DMS         = y_sk_DMS_in
     862       13744 :       if (present(t_sk_conv_in)         ) t_sk_conv        = t_sk_conv_in
     863       13744 :       if (present(t_sk_ox_in)           ) t_sk_ox          = t_sk_ox_in
     864       13744 :       if (present(frazil_scav_in)       ) frazil_scav      = frazil_scav_in
     865       13744 :       if (present(sw_redist_in)         ) sw_redist        = sw_redist_in
     866       13744 :       if (present(sw_frac_in)           ) sw_frac          = sw_frac_in
     867       13744 :       if (present(sw_dtemp_in)          ) sw_dtemp         = sw_dtemp_in
     868             : 
     869       13744 :       call icepack_recompute_constants()
     870       13744 :       if (icepack_warnings_aborted(subname)) return
     871             : 
     872             :       end subroutine icepack_init_parameters
     873             : 
     874             : !=======================================================================
     875             : 
     876             : !autodocument_start icepack_query_parameters
     877             : ! subroutine to query the column package internal parameters
     878             : 
     879 23450380392 :       subroutine icepack_query_parameters(   &
     880             :          puny_out, bignum_out, pi_out, rad_to_deg_out,&
     881             :          secday_out, c0_out, c1_out, c1p5_out, c2_out, c3_out, c4_out, &
     882             :          c5_out, c6_out, c8_out, c10_out, c15_out, c16_out, c20_out, &
     883             :          c25_out, c100_out, c180_out, c1000_out, p001_out, p01_out, p1_out, &
     884             :          p2_out, p4_out, p5_out, p6_out, p05_out, p15_out, p25_out, p75_out, &
     885             :          p333_out, p666_out, spval_const_out, pih_out, piq_out, pi2_out, &
     886             :          rhos_out, rhoi_out, rhow_out, cp_air_out, emissivity_out, &
     887             :          cp_ice_out, cp_ocn_out, hfrazilmin_out, floediam_out, &
     888             :          depressT_out, dragio_out, albocn_out, gravit_out, viscosity_dyn_out, &
     889             :          Tocnfrz_out, rhofresh_out, zvir_out, vonkar_out, cp_wv_out, &
     890             :          stefan_boltzmann_out, ice_ref_salinity_out, &
     891             :          Tffresh_out, Lsub_out, Lvap_out, Timelt_out, Tsmelt_out, &
     892             :          iceruf_out, Cf_out, Pstar_out, Cstar_out, kappav_out, &
     893             :          kice_out, kseaice_out, ksno_out, &
     894             :          zref_out, hs_min_out, snowpatch_out, rhosi_out, sk_l_out, &
     895             :          saltmax_out, phi_init_out, min_salin_out, salt_loss_out, &
     896             :          min_bgc_out, dSin0_frazil_out, hi_ssl_out, hs_ssl_out, &
     897             :          awtvdr_out, awtidr_out, awtvdf_out, awtidf_out, &
     898             :          qqqice_out, TTTice_out, qqqocn_out, TTTocn_out, update_ocn_f_out, &
     899             :          Lfresh_out, cprho_out, Cp_out, ustar_min_out, a_rapid_mode_out, &
     900           0 :          ktherm_out, conduct_out, fbot_xfer_type_out, calc_Tsfc_out, dts_b_out, &
     901             :          Rac_rapid_mode_out, aspect_rapid_mode_out, dSdt_slow_mode_out, &
     902           0 :          phi_c_slow_mode_out, phi_i_mushy_out, shortwave_out, &
     903           0 :          albedo_type_out, albicev_out, albicei_out, albsnowv_out, &
     904             :          albsnowi_out, ahmax_out, R_ice_out, R_pnd_out, R_snw_out, dT_mlt_out, &
     905             :          rsnw_mlt_out, dEdd_algae_out, &
     906             :          kalg_out, kstrength_out, krdg_partic_out, krdg_redist_out, mu_rdg_out, &
     907           0 :          atmbndy_out, calc_strair_out, formdrag_out, highfreq_out, natmiter_out, &
     908             :          atmiter_conv_out, &
     909           0 :          tfrz_option_out, kitd_out, kcatbound_out, hs0_out, frzpnd_out, &
     910           0 :          floeshape_out, wave_spec_out, wave_spec_type_out, nfreq_out, &
     911             :          dpscale_out, rfracmin_out, rfracmax_out, pndaspect_out, hs1_out, hp1_out, &
     912           0 :          bgc_flux_type_out, z_tracers_out, scale_bgc_out, solve_zbgc_out, &
     913             :          modal_aero_out, skl_bgc_out, solve_zsal_out, grid_o_out, l_sk_out, &
     914             :          initbio_frac_out, grid_oS_out, l_skS_out, &
     915             :          phi_snow_out, heat_capacity_out, conserv_check_out, &
     916             :          fr_resp_out, algal_vel_out, R_dFe2dust_out, dustFe_sol_out, &
     917             :          T_max_out, fsal_out, op_dep_min_out, fr_graze_s_out, fr_graze_e_out, &
     918             :          fr_mort2min_out, fr_resp_s_out, fr_dFe_out, &
     919             :          k_nitrif_out, t_iron_conv_out, max_loss_out, max_dfe_doc1_out, &
     920             :          y_sk_DMS_out, t_sk_conv_out, t_sk_ox_out, frazil_scav_out, &
     921             :          sw_redist_out, sw_frac_out, sw_dtemp_out)
     922             : 
     923             :       !-----------------------------------------------------------------
     924             :       ! parameter constants
     925             :       !-----------------------------------------------------------------
     926             : 
     927             :       real (kind=dbl_kind), intent(out), optional :: &
     928             :          c0_out, c1_out, c1p5_out, c2_out, c3_out, c4_out, &
     929             :          c5_out, c6_out, c8_out, c10_out, c15_out, c16_out, c20_out, &
     930             :          c25_out, c180_out, c100_out, c1000_out, p001_out, p01_out, p1_out, &
     931             :          p2_out, p4_out, p5_out, p6_out, p05_out, p15_out, p25_out, p75_out, &
     932             :          p333_out, p666_out, spval_const_out, pih_out, piq_out, pi2_out, &
     933             :          secday_out,     & ! number of seconds per day
     934             :          puny_out,       & ! a small number
     935             :          bignum_out,     & ! a big number
     936             :          pi_out,         & ! pi
     937             :          rad_to_deg_out, & ! conversion factor from radians to degrees
     938             :          Lfresh_out,     & ! latent heat of melting of fresh ice (J/kg)
     939             :          cprho_out,      & ! for ocean mixed layer (J kg / K m^3)
     940             :          Cp_out            ! proport const for PE 
     941             : 
     942             :       !-----------------------------------------------------------------
     943             :       ! densities
     944             :       !-----------------------------------------------------------------
     945             : 
     946             :       real (kind=dbl_kind), intent(out), optional :: &
     947             :          rhos_out,       & ! density of snow (kg/m^3)
     948             :          rhoi_out,       & ! density of ice (kg/m^3)
     949             :          rhosi_out,      & ! average sea ice density (kg/m2)
     950             :          rhow_out,       & ! density of seawater (kg/m^3)
     951             :          rhofresh_out      ! density of fresh water (kg/m^3)
     952             : 
     953             : !-----------------------------------------------------------------------
     954             : ! Parameters for thermodynamics
     955             : !-----------------------------------------------------------------------
     956             : 
     957             :       real (kind=dbl_kind), intent(out), optional :: &
     958             :          floediam_out,   & ! effective floe diameter for lateral melt (m)
     959             :          hfrazilmin_out, & ! min thickness of new frazil ice (m)
     960             :          cp_ice_out,     & ! specific heat of fresh ice (J/kg/K)
     961             :          cp_ocn_out,     & ! specific heat of ocn    (J/kg/K)
     962             :          depressT_out,   & ! Tf:brine salinity ratio (C/ppt)
     963             :          viscosity_dyn_out, & ! dynamic viscosity of brine (kg/m/s)
     964             :          Tocnfrz_out,    & ! freezing temp of seawater (C)
     965             :          Tffresh_out,    & ! freezing temp of fresh ice (K)
     966             :          Lsub_out,       & ! latent heat, sublimation freshwater (J/kg)
     967             :          Lvap_out,       & ! latent heat, vaporization freshwater (J/kg)
     968             :          Timelt_out,     & ! melting temperature, ice top surface  (C)
     969             :          Tsmelt_out,     & ! melting temperature, snow top surface (C)
     970             :          ice_ref_salinity_out, & ! (ppt)
     971             :          kice_out,       & ! thermal conductivity of fresh ice(W/m/deg)
     972             :          kseaice_out,    & ! thermal conductivity of sea ice (W/m/deg)
     973             :          ksno_out,       & ! thermal conductivity of snow  (W/m/deg)
     974             :          hs_min_out,     & ! min snow thickness for computing zTsn (m)
     975             :          snowpatch_out,  & ! parameter for fractional snow area (m)
     976             :          saltmax_out,    & ! max salinity at ice base for BL99 (ppt)
     977             :          phi_init_out,   & ! initial liquid fraction of frazil
     978             :          min_salin_out,  & ! threshold for brine pocket treatment
     979             :          salt_loss_out,  & ! fraction of salt retained in zsalinity
     980             :          dSin0_frazil_out  ! bulk salinity reduction of newly formed frazil
     981             : 
     982             :       integer (kind=int_kind), intent(out), optional :: &
     983             :          ktherm_out         ! type of thermodynamics
     984             :                             ! 0 = 0-layer approximation
     985             :                             ! 1 = Bitz and Lipscomb 1999
     986             :                             ! 2 = mushy layer theory
     987             : 
     988             :       character (char_len), intent(out), optional :: &
     989             :          conduct_out, &     ! 'MU71' or 'bubbly'
     990             :          fbot_xfer_type_out ! transfer coefficient type for ice-ocean heat flux
     991             :         
     992             :       logical (kind=log_kind), intent(out), optional :: &
     993             :          heat_capacity_out,&! if true, ice has nonzero heat capacity
     994             :                             ! if false, use zero-layer thermodynamics
     995             :          calc_Tsfc_out    ,&! if true, calculate surface temperature
     996             :                             ! if false, Tsfc is computed elsewhere and
     997             :                             ! atmos-ice fluxes are provided to CICE
     998             :          update_ocn_f_out   ! include fresh water and salt fluxes for frazil
     999             : 
    1000             :       real (kind=dbl_kind), intent(out), optional :: &
    1001             :          dts_b_out,   &      ! zsalinity timestep
    1002             :          ustar_min_out       ! minimum friction velocity for ice-ocean heat flux
    1003             :  
    1004             :       ! mushy thermo
    1005             :       real(kind=dbl_kind), intent(out), optional :: &
    1006             :          a_rapid_mode_out      , & ! channel radius for rapid drainage mode (m)
    1007             :          Rac_rapid_mode_out    , & ! critical Rayleigh number for rapid drainage mode
    1008             :          aspect_rapid_mode_out , & ! aspect ratio for rapid drainage mode (larger=wider)
    1009             :          dSdt_slow_mode_out    , & ! slow mode drainage strength (m s-1 K-1)
    1010             :          phi_c_slow_mode_out   , & ! liquid fraction porosity cutoff for slow mode
    1011             :          phi_i_mushy_out           ! liquid fraction of congelation ice
    1012             :         
    1013             :       character(len=char_len), intent(out), optional :: &
    1014             :          tfrz_option_out              ! form of ocean freezing temperature
    1015             :                                       ! 'minus1p8' = -1.8 C
    1016             :                                       ! 'linear_salt' = -depressT * sss
    1017             :                                       ! 'mushy' conforms with ktherm=2
    1018             : 
    1019             : !-----------------------------------------------------------------------
    1020             : ! Parameters for radiation
    1021             : !-----------------------------------------------------------------------
    1022             : 
    1023             :       real(kind=dbl_kind), intent(out), optional :: &
    1024             :          emissivity_out, & ! emissivity of snow and ice
    1025             :          albocn_out,     & ! ocean albedo
    1026             :          vonkar_out,     & ! von Karman constant
    1027             :          stefan_boltzmann_out, & !  W/m^2/K^4
    1028             :          kappav_out,     & ! vis extnctn coef in ice, wvlngth<700nm (1/m)
    1029             :          hi_ssl_out,     & ! ice surface scattering layer thickness (m)
    1030             :          hs_ssl_out,     & ! visible, direct 
    1031             :          awtvdr_out,     & ! visible, direct  ! for history and
    1032             :          awtidr_out,     & ! near IR, direct  ! diagnostics
    1033             :          awtvdf_out,     & ! visible, diffuse
    1034             :          awtidf_out        ! near IR, diffuse
    1035             : 
    1036             :       character (len=char_len), intent(out), optional :: &
    1037             :          shortwave_out, & ! shortwave method, 'ccsm3' or 'dEdd'
    1038             :          albedo_type_out  ! albedo parameterization, 'ccsm3' or 'constant'
    1039             :                              ! shortwave='dEdd' overrides this parameter
    1040             : 
    1041             :       ! baseline albedos for ccsm3 shortwave, set in namelist
    1042             :       real (kind=dbl_kind), intent(out), optional :: &
    1043             :          albicev_out  , & ! visible ice albedo for h > ahmax
    1044             :          albicei_out  , & ! near-ir ice albedo for h > ahmax
    1045             :          albsnowv_out , & ! cold snow albedo, visible
    1046             :          albsnowi_out , & ! cold snow albedo, near IR
    1047             :          ahmax_out        ! thickness above which ice albedo is constant (m)
    1048             :         
    1049             :       ! dEdd tuning parameters, set in namelist
    1050             :       real (kind=dbl_kind), intent(out), optional :: &
    1051             :          R_ice_out    , & ! sea ice tuning parameter; +1 > 1sig increase in albedo
    1052             :          R_pnd_out    , & ! ponded ice tuning parameter; +1 > 1sig increase in albedo
    1053             :          R_snw_out    , & ! snow tuning parameter; +1 > ~.01 change in broadband albedo
    1054             :          dT_mlt_out   , & ! change in temp for non-melt to melt snow grain 
    1055             :                           ! radius change (C)
    1056             :          rsnw_mlt_out , & ! maximum melting snow grain radius (10^-6 m)
    1057             :          kalg_out         ! algae absorption coefficient for 0.5 m thick layer
    1058             : 
    1059             :       logical (kind=log_kind), intent(out), optional :: &
    1060             :          sw_redist_out    ! redistribute shortwave
    1061             : 
    1062             :       real (kind=dbl_kind), intent(out), optional :: & 
    1063             :          sw_frac_out  , & ! Fraction of internal shortwave moved to surface
    1064             :          sw_dtemp_out     ! temperature difference from melting
    1065             : 
    1066             : !-----------------------------------------------------------------------
    1067             : ! Parameters for dynamics
    1068             : !-----------------------------------------------------------------------
    1069             : 
    1070             :       real(kind=dbl_kind), intent(out), optional :: &
    1071             :          Cf_out,         & ! ratio of ridging work to PE change in ridging 
    1072             :          Pstar_out,      & ! constant in Hibler strength formula 
    1073             :          Cstar_out,      & ! constant in Hibler strength formula 
    1074             :          dragio_out,     & ! ice-ocn drag coefficient
    1075             :          gravit_out,     & ! gravitational acceleration (m/s^2)
    1076             :          iceruf_out        ! ice surface roughness (m)
    1077             : 
    1078             :       integer (kind=int_kind), intent(out), optional :: & ! defined in namelist 
    1079             :          kstrength_out  , & ! 0 for simple Hibler (1979) formulation 
    1080             :                             ! 1 for Rothrock (1975) pressure formulation 
    1081             :          krdg_partic_out, & ! 0 for Thorndike et al. (1975) formulation 
    1082             :                             ! 1 for exponential participation function 
    1083             :          krdg_redist_out    ! 0 for Hibler (1980) formulation 
    1084             :                             ! 1 for exponential redistribution function 
    1085             :  
    1086             :       real (kind=dbl_kind), intent(out), optional :: &  
    1087             :          mu_rdg_out         ! gives e-folding scale of ridged ice (m^.5) 
    1088             :                             ! (krdg_redist = 1) 
    1089             : 
    1090             : !-----------------------------------------------------------------------
    1091             : ! Parameters for atmosphere
    1092             : !-----------------------------------------------------------------------
    1093             : 
    1094             :       real (kind=dbl_kind), intent(out), optional :: &  
    1095             :          cp_air_out,     & ! specific heat of air (J/kg/K)
    1096             :          cp_wv_out,      & ! specific heat of water vapor (J/kg/K)
    1097             :          zvir_out,       & ! rh2o/rair - 1.0
    1098             :          zref_out,       & ! reference height for stability (m)
    1099             :          qqqice_out,     & ! for qsat over ice
    1100             :          TTTice_out,     & ! for qsat over ice
    1101             :          qqqocn_out,     & ! for qsat over ocn
    1102             :          TTTocn_out        ! for qsat over ocn
    1103             : 
    1104             :       character (len=char_len), intent(out), optional :: &
    1105             :          atmbndy_out ! atmo boundary method, 'default' ('ccsm3') or 'constant'
    1106             :         
    1107             :       logical (kind=log_kind), intent(out), optional :: &
    1108             :          calc_strair_out, &  ! if true, calculate wind stress components
    1109             :          formdrag_out,    &  ! if true, calculate form drag
    1110             :          highfreq_out        ! if true, use high frequency coupling
    1111             :         
    1112             :       integer (kind=int_kind), intent(out), optional :: &
    1113             :          natmiter_out        ! number of iterations for boundary layer calculations
    1114             :         
    1115             :       ! Flux convergence tolerance
    1116             :       real (kind=dbl_kind), intent(out), optional :: atmiter_conv_out
    1117             : 
    1118             : !-----------------------------------------------------------------------
    1119             : ! Parameters for the ice thickness distribution
    1120             : !-----------------------------------------------------------------------
    1121             : 
    1122             :       integer (kind=int_kind), intent(out), optional :: &
    1123             :          kitd_out        , & ! type of itd conversions
    1124             :                              !   0 = delta function
    1125             :                              !   1 = linear remap
    1126             :          kcatbound_out       !   0 = old category boundary formula
    1127             :                              !   1 = new formula giving round numbers
    1128             :                              !   2 = WMO standard
    1129             :                              !   3 = asymptotic formula
    1130             : 
    1131             : !-----------------------------------------------------------------------
    1132             : ! Parameters for the floe size distribution
    1133             : !-----------------------------------------------------------------------
    1134             : 
    1135             :       integer (kind=int_kind), intent(out), optional :: &
    1136             :          nfreq_out          ! number of frequencies
    1137             : 
    1138             :       real (kind=dbl_kind), intent(out), optional :: &
    1139             :          floeshape_out      ! constant from Steele (unitless)
    1140             : 
    1141             :       logical (kind=log_kind), intent(out), optional :: &
    1142             :          wave_spec_out      ! if true, use wave forcing
    1143             : 
    1144             :       character (len=char_len), intent(out), optional :: &
    1145             :          wave_spec_type_out ! type of wave spectrum forcing
    1146             : 
    1147             : !-----------------------------------------------------------------------
    1148             : ! Parameters for biogeochemistry
    1149             : !-----------------------------------------------------------------------
    1150             : 
    1151             :       character(char_len), intent(out), optional :: &     
    1152             :          bgc_flux_type_out    ! type of ocean-ice piston velocity 
    1153             :                               ! 'constant', 'Jin2006'      
    1154             : 
    1155             :       logical (kind=log_kind), intent(out), optional :: &
    1156             :          z_tracers_out,      & ! if .true., bgc or aerosol tracers are vertically resolved
    1157             :          scale_bgc_out,      & ! if .true., initialize bgc tracers proportionally with salinity
    1158             :          solve_zbgc_out,     & ! if .true., solve vertical biochemistry portion of code
    1159             :          dEdd_algae_out,     & ! if .true., algal absorptionof Shortwave is computed in the
    1160             :          modal_aero_out,     & ! if .true., use modal aerosol formulation in shortwave
    1161             :          conserv_check_out     ! if .true., run conservation checks and abort if checks fail
    1162             :         
    1163             :       logical (kind=log_kind), intent(out), optional :: & 
    1164             :          skl_bgc_out,        &   ! if true, solve skeletal biochemistry
    1165             :          solve_zsal_out          ! if true, update salinity profile from solve_S_dt
    1166             : 
    1167             :       real (kind=dbl_kind), intent(out), optional :: & 
    1168             :          grid_o_out      , & ! for bottom flux        
    1169             :          l_sk_out        , & ! characteristic diffusive scale (zsalinity) (m)
    1170             :          initbio_frac_out, & ! fraction of ocean tracer concentration used to initialize tracer 
    1171             :          phi_snow_out        ! snow porosity at the ice/snow interface 
    1172             : 
    1173             :       real (kind=dbl_kind), intent(out), optional :: & 
    1174             :          grid_oS_out     , & ! for bottom flux (zsalinity)
    1175             :          l_skS_out           ! 0.02 characteristic skeletal layer thickness (m) (zsalinity)
    1176             :       real (kind=dbl_kind), intent(out), optional :: &
    1177             :          fr_resp_out           , &   ! fraction of algal growth lost due to respiration
    1178             :          algal_vel_out         , &   ! 0.5 cm/d(m/s) Lavoie 2005  1.5 cm/day
    1179             :          R_dFe2dust_out        , &   !  g/g (3.5% content) Tagliabue 2009
    1180             :          dustFe_sol_out        , &   ! solubility fraction
    1181             :          T_max_out            , & ! maximum temperature (C)
    1182             :          fsal_out             , & ! Salinity limitation (ppt)
    1183             :          op_dep_min_out       , & ! Light attenuates for optical depths exceeding min
    1184             :          fr_graze_s_out       , & ! fraction of grazing spilled or slopped
    1185             :          fr_graze_e_out       , & ! fraction of assimilation excreted 
    1186             :          fr_mort2min_out      , & ! fractionation of mortality to Am
    1187             :          fr_dFe_out           , & ! fraction of remineralized nitrogen 
    1188             :                                     ! (in units of algal iron)
    1189             :          k_nitrif_out         , & ! nitrification rate (1/day)            
    1190             :          t_iron_conv_out      , & ! desorption loss pFe to dFe (day)
    1191             :          max_loss_out         , & ! restrict uptake to % of remaining value 
    1192             :          max_dfe_doc1_out     , & ! max ratio of dFe to saccharides in the ice 
    1193             :                                     ! (nM Fe/muM C)    
    1194             :          fr_resp_s_out        , & ! DMSPd fraction of respiration loss as DMSPd
    1195             :          y_sk_DMS_out         , & ! fraction conversion given high yield
    1196             :          t_sk_conv_out        , & ! Stefels conversion time (d)
    1197             :          t_sk_ox_out          , & ! DMS oxidation time (d)
    1198             :          frazil_scav_out          ! scavenging fraction or multiple in frazil ice
    1199             : 
    1200             :       real (kind=dbl_kind), intent(out), optional :: &
    1201             :          sk_l_out,       & ! skeletal layer thickness (m)
    1202             :          min_bgc_out       ! fraction of ocean bgc concentration in surface melt
    1203             : 
    1204             : !-----------------------------------------------------------------------
    1205             : ! Parameters for melt ponds
    1206             : !-----------------------------------------------------------------------
    1207             : 
    1208             :       real (kind=dbl_kind), intent(out), optional :: &
    1209             :          hs0_out             ! snow depth for transition to bare sea ice (m)
    1210             :         
    1211             :       ! level-ice ponds
    1212             :       character (len=char_len), intent(out), optional :: &
    1213             :          frzpnd_out          ! pond refreezing parameterization
    1214             :         
    1215             :       real (kind=dbl_kind), intent(out), optional :: &
    1216             :          dpscale_out, &      ! alter e-folding time scale for flushing 
    1217             :          rfracmin_out, &     ! minimum retained fraction of meltwater
    1218             :          rfracmax_out, &     ! maximum retained fraction of meltwater
    1219             :          pndaspect_out, &    ! ratio of pond depth to pond fraction
    1220             :          hs1_out             ! tapering parameter for snow on pond ice
    1221             :         
    1222             :       ! topo ponds
    1223             :       real (kind=dbl_kind), intent(out), optional :: &
    1224             :          hp1_out             ! critical parameter for pond ice thickness
    1225             : 
    1226             : !autodocument_end
    1227             : 
    1228             :       character(len=*),parameter :: subname='(icepack_query_parameters)'
    1229             : 
    1230 23450380392 :       if (present(puny_out)              ) puny_out         = puny
    1231 23450380392 :       if (present(bignum_out)            ) bignum_out       = bignum
    1232 23450380392 :       if (present(pi_out)                ) pi_out           = pi
    1233             : 
    1234 23450380392 :       if (present(c0_out)                ) c0_out           = c0
    1235 23450380392 :       if (present(c1_out)                ) c1_out           = c1
    1236 23450380392 :       if (present(c1p5_out)              ) c1p5_out         = c1p5
    1237 23450380392 :       if (present(c2_out)                ) c2_out           = c2
    1238 23450380392 :       if (present(c3_out)                ) c3_out           = c3
    1239 23450380392 :       if (present(c4_out)                ) c4_out           = c4
    1240 23450380392 :       if (present(c5_out)                ) c5_out           = c5
    1241 23450380392 :       if (present(c6_out)                ) c6_out           = c6
    1242 23450380392 :       if (present(c8_out)                ) c8_out           = c8
    1243 23450380392 :       if (present(c10_out)               ) c10_out          = c10
    1244 23450380392 :       if (present(c15_out)               ) c15_out          = c15
    1245 23450380392 :       if (present(c16_out)               ) c16_out          = c16
    1246 23450380392 :       if (present(c20_out)               ) c20_out          = c20
    1247 23450380392 :       if (present(c25_out)               ) c25_out          = c25
    1248 23450380392 :       if (present(c100_out)              ) c100_out         = c100
    1249 23450380392 :       if (present(c180_out)              ) c180_out         = c180
    1250 23450380392 :       if (present(c1000_out)             ) c1000_out        = c1000
    1251 23450380392 :       if (present(p001_out)              ) p001_out         = p001
    1252 23450380392 :       if (present(p01_out)               ) p01_out          = p01
    1253 23450380392 :       if (present(p1_out)                ) p1_out           = p1
    1254 23450380392 :       if (present(p2_out)                ) p2_out           = p2
    1255 23450380392 :       if (present(p4_out)                ) p4_out           = p4
    1256 23450380392 :       if (present(p5_out)                ) p5_out           = p5
    1257 23450380392 :       if (present(p6_out)                ) p6_out           = p6
    1258 23450380392 :       if (present(p05_out)               ) p05_out          = p05
    1259 23450380392 :       if (present(p15_out)               ) p15_out          = p15
    1260 23450380392 :       if (present(p25_out)               ) p25_out          = p25
    1261 23450380392 :       if (present(p75_out)               ) p75_out          = p75
    1262 23450380392 :       if (present(p333_out)              ) p333_out         = p333
    1263 23450380392 :       if (present(p666_out)              ) p666_out         = p666
    1264 23450380392 :       if (present(spval_const_out)       ) spval_const_out  = spval_const
    1265 23450380392 :       if (present(pih_out)               ) pih_out          = pih
    1266 23450380392 :       if (present(piq_out)               ) piq_out          = piq
    1267 23450380392 :       if (present(pi2_out)               ) pi2_out          = pi2
    1268 23450380392 :       if (present(secday_out)            ) secday_out       = secday
    1269 23450380392 :       if (present(rad_to_deg_out)        ) rad_to_deg_out   = rad_to_deg
    1270             : 
    1271 23450380392 :       if (present(rhos_out)              ) rhos_out         = rhos
    1272 23450380392 :       if (present(rhoi_out)              ) rhoi_out         = rhoi
    1273 23450380392 :       if (present(rhow_out)              ) rhow_out         = rhow
    1274 23450380392 :       if (present(cp_air_out)            ) cp_air_out       = cp_air
    1275 23450380392 :       if (present(emissivity_out)        ) emissivity_out   = emissivity
    1276 23450380392 :       if (present(floediam_out)          ) floediam_out     = floediam
    1277 23450380392 :       if (present(hfrazilmin_out)        ) hfrazilmin_out   = hfrazilmin
    1278 23450380392 :       if (present(cp_ice_out)            ) cp_ice_out       = cp_ice
    1279 23450380392 :       if (present(cp_ocn_out)            ) cp_ocn_out       = cp_ocn
    1280 23450380392 :       if (present(depressT_out)          ) depressT_out     = depressT
    1281 23450380392 :       if (present(dragio_out)            ) dragio_out       = dragio
    1282 23450380392 :       if (present(albocn_out)            ) albocn_out       = albocn
    1283 23450380392 :       if (present(gravit_out)            ) gravit_out       = gravit
    1284 23450380392 :       if (present(viscosity_dyn_out)     ) viscosity_dyn_out= viscosity_dyn
    1285 23450380392 :       if (present(Tocnfrz_out)           ) Tocnfrz_out      = Tocnfrz
    1286 23450380392 :       if (present(rhofresh_out)          ) rhofresh_out     = rhofresh
    1287 23450380392 :       if (present(zvir_out)              ) zvir_out         = zvir
    1288 23450380392 :       if (present(vonkar_out)            ) vonkar_out       = vonkar
    1289 23450380392 :       if (present(cp_wv_out)             ) cp_wv_out        = cp_wv
    1290 23450380392 :       if (present(stefan_boltzmann_out)  ) stefan_boltzmann_out = stefan_boltzmann
    1291 23450380392 :       if (present(Tffresh_out)           ) Tffresh_out      = Tffresh
    1292 23450380392 :       if (present(Lsub_out)              ) Lsub_out         = Lsub
    1293 23450380392 :       if (present(Lvap_out)              ) Lvap_out         = Lvap
    1294 23450380392 :       if (present(Timelt_out)            ) Timelt_out       = Timelt
    1295 23450380392 :       if (present(Tsmelt_out)            ) Tsmelt_out       = Tsmelt
    1296 23450380392 :       if (present(ice_ref_salinity_out)  ) ice_ref_salinity_out = ice_ref_salinity
    1297 23450380392 :       if (present(iceruf_out)            ) iceruf_out       = iceruf
    1298 23450380392 :       if (present(Cf_out)                ) Cf_out           = Cf
    1299 23450380392 :       if (present(Pstar_out)             ) Pstar_out        = Pstar
    1300 23450380392 :       if (present(Cstar_out)             ) Cstar_out        = Cstar
    1301 23450380392 :       if (present(kappav_out)            ) kappav_out       = kappav
    1302 23450380392 :       if (present(kice_out)              ) kice_out         = kice
    1303 23450380392 :       if (present(kseaice_out)           ) kseaice_out      = kseaice
    1304 23450380392 :       if (present(ksno_out)              ) ksno_out         = ksno
    1305 23450380392 :       if (present(zref_out)              ) zref_out         = zref
    1306 23450380392 :       if (present(hs_min_out)            ) hs_min_out       = hs_min
    1307 23450380392 :       if (present(snowpatch_out)         ) snowpatch_out    = snowpatch
    1308 23450380392 :       if (present(rhosi_out)             ) rhosi_out        = rhosi
    1309 23450380392 :       if (present(sk_l_out)              ) sk_l_out         = sk_l
    1310 23450380392 :       if (present(saltmax_out)           ) saltmax_out      = saltmax
    1311 23450380392 :       if (present(phi_init_out)          ) phi_init_out     = phi_init
    1312 23450380392 :       if (present(min_salin_out)         ) min_salin_out    = min_salin
    1313 23450380392 :       if (present(salt_loss_out)         ) salt_loss_out    = salt_loss
    1314 23450380392 :       if (present(min_bgc_out)           ) min_bgc_out      = min_bgc
    1315 23450380392 :       if (present(dSin0_frazil_out)      ) dSin0_frazil_out = dSin0_frazil
    1316 23450380392 :       if (present(hi_ssl_out)            ) hi_ssl_out       = hi_ssl
    1317 23450380392 :       if (present(hs_ssl_out)            ) hs_ssl_out       = hs_ssl
    1318 23450380392 :       if (present(awtvdr_out)            ) awtvdr_out       = awtvdr
    1319 23450380392 :       if (present(awtidr_out)            ) awtidr_out       = awtidr
    1320 23450380392 :       if (present(awtvdf_out)            ) awtvdf_out       = awtvdf
    1321 23450380392 :       if (present(awtidf_out)            ) awtidf_out       = awtidf
    1322 23450380392 :       if (present(qqqice_out)            ) qqqice_out       = qqqice
    1323 23450380392 :       if (present(TTTice_out)            ) TTTice_out       = TTTice
    1324 23450380392 :       if (present(qqqocn_out)            ) qqqocn_out       = qqqocn
    1325 23450380392 :       if (present(TTTocn_out)            ) TTTocn_out       = TTTocn
    1326 23450380392 :       if (present(puny_out)              ) puny_out         = puny
    1327 23450380392 :       if (present(bignum_out)            ) bignum_out       = bignum
    1328 23450380392 :       if (present(pi_out)                ) pi_out           = pi
    1329 23450380392 :       if (present(secday_out)            ) secday_out       = secday
    1330 23450380392 :       if (present(ktherm_out)            ) ktherm_out       = ktherm
    1331 23450380392 :       if (present(conduct_out)           ) conduct_out      = conduct
    1332 23450380392 :       if (present(fbot_xfer_type_out)    ) fbot_xfer_type_out = fbot_xfer_type
    1333 23450380392 :       if (present(heat_capacity_out)     ) heat_capacity_out= heat_capacity
    1334 23450380392 :       if (present(calc_Tsfc_out)         ) calc_Tsfc_out    = calc_Tsfc
    1335 23450380392 :       if (present(update_ocn_f_out)      ) update_ocn_f_out = update_ocn_f
    1336 23450380392 :       if (present(dts_b_out)             ) dts_b_out        = dts_b
    1337 23450380392 :       if (present(ustar_min_out)         ) ustar_min_out    = ustar_min
    1338 23450380392 :       if (present(a_rapid_mode_out)      ) a_rapid_mode_out = a_rapid_mode
    1339 23450380392 :       if (present(Rac_rapid_mode_out)    ) Rac_rapid_mode_out = Rac_rapid_mode
    1340 23450380392 :       if (present(aspect_rapid_mode_out) ) aspect_rapid_mode_out = aspect_rapid_mode
    1341 23450380392 :       if (present(dSdt_slow_mode_out)    ) dSdt_slow_mode_out = dSdt_slow_mode
    1342 23450380392 :       if (present(phi_c_slow_mode_out)   ) phi_c_slow_mode_out = phi_c_slow_mode
    1343 23450380392 :       if (present(phi_i_mushy_out)       ) phi_i_mushy_out  = phi_i_mushy
    1344 23450380392 :       if (present(shortwave_out)         ) shortwave_out    = shortwave
    1345 23450380392 :       if (present(albedo_type_out)       ) albedo_type_out  = albedo_type
    1346 23450380392 :       if (present(albicev_out)           ) albicev_out      = albicev
    1347 23450380392 :       if (present(albicei_out)           ) albicei_out      = albicei
    1348 23450380392 :       if (present(albsnowv_out)          ) albsnowv_out     = albsnowv
    1349 23450380392 :       if (present(albsnowi_out)          ) albsnowi_out     = albsnowi
    1350 23450380392 :       if (present(ahmax_out)             ) ahmax_out        = ahmax
    1351 23450380392 :       if (present(R_ice_out)             ) R_ice_out        = R_ice
    1352 23450380392 :       if (present(R_pnd_out)             ) R_pnd_out        = R_pnd
    1353 23450380392 :       if (present(R_snw_out)             ) R_snw_out        = R_snw
    1354 23450380392 :       if (present(dT_mlt_out)            ) dT_mlt_out       = dT_mlt
    1355 23450380392 :       if (present(rsnw_mlt_out)          ) rsnw_mlt_out     = rsnw_mlt
    1356 23450380392 :       if (present(kalg_out)              ) kalg_out         = kalg
    1357 23450380392 :       if (present(kstrength_out)         ) kstrength_out    = kstrength
    1358 23450380392 :       if (present(krdg_partic_out)       ) krdg_partic_out  = krdg_partic
    1359 23450380392 :       if (present(krdg_redist_out)       ) krdg_redist_out  = krdg_redist
    1360 23450380392 :       if (present(mu_rdg_out)            ) mu_rdg_out       = mu_rdg
    1361 23450380392 :       if (present(atmbndy_out)           ) atmbndy_out      = atmbndy
    1362 23450380392 :       if (present(calc_strair_out)       ) calc_strair_out  = calc_strair
    1363 23450380392 :       if (present(formdrag_out)          ) formdrag_out     = formdrag
    1364 23450380392 :       if (present(highfreq_out)          ) highfreq_out     = highfreq
    1365 23450380392 :       if (present(natmiter_out)          ) natmiter_out     = natmiter
    1366 23450380392 :       if (present(atmiter_conv_out)      ) atmiter_conv_out = atmiter_conv
    1367 23450380392 :       if (present(tfrz_option_out)       ) tfrz_option_out  = tfrz_option
    1368 23450380392 :       if (present(kitd_out)              ) kitd_out         = kitd
    1369 23450380392 :       if (present(kcatbound_out)         ) kcatbound_out    = kcatbound
    1370 23450380392 :       if (present(floeshape_out)         ) floeshape_out    = floeshape
    1371 23450380392 :       if (present(wave_spec_out)         ) wave_spec_out    = wave_spec
    1372 23450380392 :       if (present(wave_spec_type_out)    ) wave_spec_type_out = wave_spec_type
    1373 23450380392 :       if (present(nfreq_out)             ) nfreq_out        = nfreq
    1374 23450380392 :       if (present(hs0_out)               ) hs0_out          = hs0
    1375 23450380392 :       if (present(frzpnd_out)            ) frzpnd_out       = frzpnd
    1376 23450380392 :       if (present(dpscale_out)           ) dpscale_out      = dpscale
    1377 23450380392 :       if (present(rfracmin_out)          ) rfracmin_out     = rfracmin
    1378 23450380392 :       if (present(rfracmax_out)          ) rfracmax_out     = rfracmax
    1379 23450380392 :       if (present(pndaspect_out)         ) pndaspect_out    = pndaspect
    1380 23450380392 :       if (present(hs1_out)               ) hs1_out          = hs1
    1381 23450380392 :       if (present(hp1_out)               ) hp1_out          = hp1
    1382 23450380392 :       if (present(bgc_flux_type_out)     ) bgc_flux_type_out= bgc_flux_type
    1383 23450380392 :       if (present(z_tracers_out)         ) z_tracers_out    = z_tracers
    1384 23450380392 :       if (present(scale_bgc_out)         ) scale_bgc_out    = scale_bgc
    1385 23450380392 :       if (present(solve_zbgc_out)        ) solve_zbgc_out   = solve_zbgc
    1386 23450380392 :       if (present(dEdd_algae_out)        ) dEdd_algae_out   = dEdd_algae
    1387 23450380392 :       if (present(modal_aero_out)        ) modal_aero_out   = modal_aero
    1388 23450380392 :       if (present(conserv_check_out)     ) conserv_check_out= conserv_check
    1389 23450380392 :       if (present(skl_bgc_out)           ) skl_bgc_out      = skl_bgc
    1390 23450380392 :       if (present(solve_zsal_out)        ) solve_zsal_out   = solve_zsal
    1391 23450380392 :       if (present(grid_o_out)            ) grid_o_out       = grid_o
    1392 23450380392 :       if (present(l_sk_out)              ) l_sk_out         = l_sk
    1393 23450380392 :       if (present(initbio_frac_out)      ) initbio_frac_out = initbio_frac
    1394 23450380392 :       if (present(grid_oS_out)           ) grid_oS_out      = grid_oS
    1395 23450380392 :       if (present(l_skS_out)             ) l_skS_out        = l_skS
    1396 23450380392 :       if (present(phi_snow_out)          ) phi_snow_out     = phi_snow
    1397 23450380392 :       if (present(fr_resp_out)           ) fr_resp_out      = fr_resp
    1398 23450380392 :       if (present(algal_vel_out)         ) algal_vel_out    = algal_vel
    1399 23450380392 :       if (present(R_dFe2dust_out)        ) R_dFe2dust_out   = R_dFe2dust
    1400 23450380392 :       if (present(dustFe_sol_out)        ) dustFe_sol_out   = dustFe_sol
    1401 23450380392 :       if (present(T_max_out)             ) T_max_out        = T_max
    1402 23450380392 :       if (present(fsal_out)              ) fsal_out         = fsal
    1403 23450380392 :       if (present(op_dep_min_out)        ) op_dep_min_out   = op_dep_min
    1404 23450380392 :       if (present(fr_graze_s_out)        ) fr_graze_s_out   = fr_graze_s
    1405 23450380392 :       if (present(fr_graze_e_out)        ) fr_graze_e_out   = fr_graze_e
    1406 23450380392 :       if (present(fr_mort2min_out)       ) fr_mort2min_out  = fr_mort2min
    1407 23450380392 :       if (present(fr_dFe_out)            ) fr_dFe_out       = fr_dFe
    1408 23450380392 :       if (present(k_nitrif_out)          ) k_nitrif_out     = k_nitrif
    1409 23450380392 :       if (present(t_iron_conv_out)       ) t_iron_conv_out  = t_iron_conv
    1410 23450380392 :       if (present(max_loss_out)          ) max_loss_out     = max_loss
    1411 23450380392 :       if (present(max_dfe_doc1_out)      ) max_dfe_doc1_out = max_dfe_doc1
    1412 23450380392 :       if (present(fr_resp_s_out)         ) fr_resp_s_out    = fr_resp_s
    1413 23450380392 :       if (present(y_sk_DMS_out)          ) y_sk_DMS_out     = y_sk_DMS
    1414 23450380392 :       if (present(t_sk_conv_out)         ) t_sk_conv_out    = t_sk_conv
    1415 23450380392 :       if (present(t_sk_ox_out)           ) t_sk_ox_out      = t_sk_ox
    1416 23450380392 :       if (present(frazil_scav_out)       ) frazil_scav_out  = frazil_scav
    1417 23450380392 :       if (present(Lfresh_out)            ) Lfresh_out       = Lfresh
    1418 23450380392 :       if (present(cprho_out)             ) cprho_out        = cprho
    1419 23450380392 :       if (present(Cp_out)                ) Cp_out           = Cp
    1420 23450380392 :       if (present(sw_redist_out)         ) sw_redist_out    = sw_redist
    1421 23450380392 :       if (present(sw_frac_out)           ) sw_frac_out      = sw_frac
    1422 23450380392 :       if (present(sw_dtemp_out)          ) sw_dtemp_out     = sw_dtemp
    1423             : 
    1424 23450380392 :       call icepack_recompute_constants()
    1425 23450380392 :       if (icepack_warnings_aborted(subname)) return
    1426             : 
    1427        2132 :       end subroutine icepack_query_parameters
    1428             : 
    1429             : !=======================================================================
    1430             : 
    1431             : !autodocument_start icepack_write_parameters
    1432             : ! subroutine to write the column package internal parameters
    1433             : 
    1434           0 :       subroutine icepack_write_parameters(iounit)
    1435             : 
    1436             :         integer (kind=int_kind), intent(in) :: &
    1437             :              iounit   ! unit number for output
    1438             : 
    1439             : !autodocument_end
    1440             : 
    1441             :         character(len=*),parameter :: subname='(icepack_write_parameters)'
    1442             : 
    1443           0 :         write(iounit,*) subname
    1444           0 :         write(iounit,*) "  rhos   = ",rhos
    1445           0 :         write(iounit,*) "  rhoi   = ",rhoi
    1446           0 :         write(iounit,*) "  rhow   = ",rhow
    1447           0 :         write(iounit,*) "  cp_air = ",cp_air
    1448           0 :         write(iounit,*) "  emissivity = ",emissivity
    1449           0 :         write(iounit,*) "  floediam   = ",floediam
    1450           0 :         write(iounit,*) "  hfrazilmin = ",hfrazilmin
    1451           0 :         write(iounit,*) "  cp_ice = ",cp_ice
    1452           0 :         write(iounit,*) "  cp_ocn = ",cp_ocn
    1453           0 :         write(iounit,*) "  depressT = ",depressT
    1454           0 :         write(iounit,*) "  dragio = ",dragio
    1455           0 :         write(iounit,*) "  albocn = ",albocn
    1456           0 :         write(iounit,*) "  gravit = ",gravit
    1457           0 :         write(iounit,*) "  viscosity_dyn = ",viscosity_dyn
    1458           0 :         write(iounit,*) "  Tocnfrz = ",Tocnfrz
    1459           0 :         write(iounit,*) "  rhofresh = ",rhofresh
    1460           0 :         write(iounit,*) "  zvir   = ",zvir
    1461           0 :         write(iounit,*) "  vonkar = ",vonkar
    1462           0 :         write(iounit,*) "  cp_wv  = ",cp_wv
    1463           0 :         write(iounit,*) "  stefan_boltzmann = ",stefan_boltzmann
    1464           0 :         write(iounit,*) "  Tffresh = ",Tffresh
    1465           0 :         write(iounit,*) "  Lsub   = ",Lsub
    1466           0 :         write(iounit,*) "  Lvap   = ",Lvap
    1467           0 :         write(iounit,*) "  Timelt = ",Timelt
    1468           0 :         write(iounit,*) "  Tsmelt = ",Tsmelt
    1469           0 :         write(iounit,*) "  ice_ref_salinity = ",ice_ref_salinity
    1470           0 :         write(iounit,*) "  iceruf = ",iceruf
    1471           0 :         write(iounit,*) "  Cf     = ",Cf
    1472           0 :         write(iounit,*) "  Pstar  = ",Pstar
    1473           0 :         write(iounit,*) "  Cstar  = ",Cstar
    1474           0 :         write(iounit,*) "  kappav = ",kappav
    1475           0 :         write(iounit,*) "  kice   = ",kice
    1476           0 :         write(iounit,*) "  kseaice = ",kseaice
    1477           0 :         write(iounit,*) "  ksno   = ",ksno
    1478           0 :         write(iounit,*) "  zref   = ",zref
    1479           0 :         write(iounit,*) "  hs_min = ",hs_min
    1480           0 :         write(iounit,*) "  snowpatch = ",snowpatch
    1481           0 :         write(iounit,*) "  rhosi  = ",rhosi
    1482           0 :         write(iounit,*) "  sk_l   = ",sk_l
    1483           0 :         write(iounit,*) "  saltmax   = ",saltmax
    1484           0 :         write(iounit,*) "  phi_init  = ",phi_init
    1485           0 :         write(iounit,*) "  min_salin = ",min_salin
    1486           0 :         write(iounit,*) "  salt_loss = ",salt_loss
    1487           0 :         write(iounit,*) "  min_bgc   = ",min_bgc
    1488           0 :         write(iounit,*) "  dSin0_frazil = ",dSin0_frazil
    1489           0 :         write(iounit,*) "  hi_ssl = ",hi_ssl
    1490           0 :         write(iounit,*) "  hs_ssl = ",hs_ssl
    1491           0 :         write(iounit,*) "  awtvdr = ",awtvdr
    1492           0 :         write(iounit,*) "  awtidr = ",awtidr
    1493           0 :         write(iounit,*) "  awtvdf = ",awtvdf
    1494           0 :         write(iounit,*) "  awtidf = ",awtidf
    1495           0 :         write(iounit,*) "  qqqice = ",qqqice
    1496           0 :         write(iounit,*) "  TTTice = ",TTTice
    1497           0 :         write(iounit,*) "  qqqocn = ",qqqocn
    1498           0 :         write(iounit,*) "  TTTocn = ",TTTocn
    1499           0 :         write(iounit,*) "  puny   = ",puny
    1500           0 :         write(iounit,*) "  bignum = ",bignum
    1501           0 :         write(iounit,*) "  secday = ",secday
    1502           0 :         write(iounit,*) "  pi     = ",pi
    1503           0 :         write(iounit,*) "  pih    = ",pih
    1504           0 :         write(iounit,*) "  piq    = ",piq
    1505           0 :         write(iounit,*) "  pi2    = ",pi2
    1506           0 :         write(iounit,*) "  rad_to_deg = ",rad_to_deg
    1507           0 :         write(iounit,*) "  Lfresh = ",Lfresh
    1508           0 :         write(iounit,*) "  cprho  = ",cprho
    1509           0 :         write(iounit,*) "  Cp     = ",Cp
    1510           0 :         write(iounit,*) "  ktherm        = ", ktherm
    1511           0 :         write(iounit,*) "  conduct       = ", conduct
    1512           0 :         write(iounit,*) "  fbot_xfer_type    = ", fbot_xfer_type
    1513           0 :         write(iounit,*) "  heat_capacity     = ", heat_capacity
    1514           0 :         write(iounit,*) "  calc_Tsfc         = ", calc_Tsfc
    1515           0 :         write(iounit,*) "  update_ocn_f      = ", update_ocn_f
    1516           0 :         write(iounit,*) "  dts_b             = ", dts_b
    1517           0 :         write(iounit,*) "  ustar_min         = ", ustar_min
    1518           0 :         write(iounit,*) "  a_rapid_mode      = ", a_rapid_mode
    1519           0 :         write(iounit,*) "  Rac_rapid_mode    = ", Rac_rapid_mode
    1520           0 :         write(iounit,*) "  aspect_rapid_mode = ", aspect_rapid_mode
    1521           0 :         write(iounit,*) "  dSdt_slow_mode    = ", dSdt_slow_mode
    1522           0 :         write(iounit,*) "  phi_c_slow_mode   = ", phi_c_slow_mode
    1523           0 :         write(iounit,*) "  phi_i_mushy       = ", phi_i_mushy
    1524           0 :         write(iounit,*) "  shortwave     = ", shortwave
    1525           0 :         write(iounit,*) "  albedo_type   = ", albedo_type
    1526           0 :         write(iounit,*) "  albicev       = ", albicev
    1527           0 :         write(iounit,*) "  albicei       = ", albicei
    1528           0 :         write(iounit,*) "  albsnowv      = ", albsnowv
    1529           0 :         write(iounit,*) "  albsnowi      = ", albsnowi
    1530           0 :         write(iounit,*) "  ahmax         = ", ahmax
    1531           0 :         write(iounit,*) "  R_ice         = ", R_ice
    1532           0 :         write(iounit,*) "  R_pnd         = ", R_pnd
    1533           0 :         write(iounit,*) "  R_snw         = ", R_snw
    1534           0 :         write(iounit,*) "  dT_mlt        = ", dT_mlt
    1535           0 :         write(iounit,*) "  rsnw_mlt      = ", rsnw_mlt
    1536           0 :         write(iounit,*) "  kalg          = ", kalg
    1537           0 :         write(iounit,*) "  kstrength     = ", kstrength
    1538           0 :         write(iounit,*) "  krdg_partic   = ", krdg_partic
    1539           0 :         write(iounit,*) "  krdg_redist   = ", krdg_redist
    1540           0 :         write(iounit,*) "  mu_rdg        = ", mu_rdg
    1541           0 :         write(iounit,*) "  atmbndy       = ", atmbndy
    1542           0 :         write(iounit,*) "  calc_strair   = ", calc_strair
    1543           0 :         write(iounit,*) "  formdrag      = ", formdrag
    1544           0 :         write(iounit,*) "  highfreq      = ", highfreq
    1545           0 :         write(iounit,*) "  natmiter      = ", natmiter
    1546           0 :         write(iounit,*) "  atmiter_conv  = ", atmiter_conv
    1547           0 :         write(iounit,*) "  tfrz_option   = ", tfrz_option
    1548           0 :         write(iounit,*) "  kitd          = ", kitd
    1549           0 :         write(iounit,*) "  kcatbound     = ", kcatbound
    1550           0 :         write(iounit,*) "  floeshape     = ", floeshape
    1551           0 :         write(iounit,*) "  wave_spec     = ", wave_spec
    1552           0 :         write(iounit,*) "  wave_spec_type= ", wave_spec_type
    1553           0 :         write(iounit,*) "  nfreq         = ", nfreq
    1554           0 :         write(iounit,*) "  hs0           = ", hs0
    1555           0 :         write(iounit,*) "  frzpnd        = ", frzpnd
    1556           0 :         write(iounit,*) "  dpscale       = ", dpscale
    1557           0 :         write(iounit,*) "  rfracmin      = ", rfracmin
    1558           0 :         write(iounit,*) "  rfracmax      = ", rfracmax
    1559           0 :         write(iounit,*) "  pndaspect     = ", pndaspect
    1560           0 :         write(iounit,*) "  hs1           = ", hs1
    1561           0 :         write(iounit,*) "  hp1           = ", hp1
    1562           0 :         write(iounit,*) "  bgc_flux_type = ", bgc_flux_type
    1563           0 :         write(iounit,*) "  z_tracers     = ", z_tracers
    1564           0 :         write(iounit,*) "  scale_bgc     = ", scale_bgc
    1565           0 :         write(iounit,*) "  solve_zbgc    = ", solve_zbgc
    1566           0 :         write(iounit,*) "  dEdd_algae    = ", dEdd_algae
    1567           0 :         write(iounit,*) "  modal_aero    = ", modal_aero
    1568           0 :         write(iounit,*) "  conserv_check = ", conserv_check
    1569           0 :         write(iounit,*) "  skl_bgc       = ", skl_bgc
    1570           0 :         write(iounit,*) "  solve_zsal    = ", solve_zsal
    1571           0 :         write(iounit,*) "  grid_o        = ", grid_o
    1572           0 :         write(iounit,*) "  l_sk          = ", l_sk
    1573           0 :         write(iounit,*) "  initbio_frac  = ", initbio_frac
    1574           0 :         write(iounit,*) "  grid_oS       = ", grid_oS
    1575           0 :         write(iounit,*) "  l_skS         = ", l_skS
    1576           0 :         write(iounit,*) "  phi_snow      = ", phi_snow
    1577           0 :         write(iounit,*) "  fr_resp       = ", fr_resp
    1578           0 :         write(iounit,*) "  algal_vel     = ", algal_vel
    1579           0 :         write(iounit,*) "  R_dFe2dust    = ", R_dFe2dust
    1580           0 :         write(iounit,*) "  dustFe_sol    = ", dustFe_sol
    1581           0 :         write(iounit,*) "  T_max         = ", T_max
    1582           0 :         write(iounit,*) "  fsal          = ", fsal
    1583           0 :         write(iounit,*) "  op_dep_min    = ", op_dep_min
    1584           0 :         write(iounit,*) "  fr_graze_s    = ", fr_graze_s
    1585           0 :         write(iounit,*) "  fr_graze_e    = ", fr_graze_e
    1586           0 :         write(iounit,*) "  fr_mort2min   = ", fr_mort2min
    1587           0 :         write(iounit,*) "  fr_dFe        = ", fr_dFe
    1588           0 :         write(iounit,*) "  k_nitrif      = ", k_nitrif
    1589           0 :         write(iounit,*) "  t_iron_conv   = ", t_iron_conv
    1590           0 :         write(iounit,*) "  max_loss      = ", max_loss
    1591           0 :         write(iounit,*) "  max_dfe_doc1  = ", max_dfe_doc1
    1592           0 :         write(iounit,*) "  fr_resp_s     = ", fr_resp_s
    1593           0 :         write(iounit,*) "  y_sk_DMS      = ", y_sk_DMS
    1594           0 :         write(iounit,*) "  t_sk_conv     = ", t_sk_conv
    1595           0 :         write(iounit,*) "  t_sk_ox       = ", t_sk_ox
    1596           0 :         write(iounit,*) "  frazil_scav   = ", frazil_scav
    1597           0 :         write(iounit,*) "  sw_redist     = ", sw_redist
    1598           0 :         write(iounit,*) "  sw_frac       = ", sw_frac
    1599           0 :         write(iounit,*) "  sw_dtemp      = ", sw_dtemp
    1600             : 
    1601  1942313278 :       end subroutine icepack_write_parameters
    1602             : 
    1603             : !=======================================================================
    1604             : 
    1605             : !autodocument_start icepack_recompute_constants
    1606             : ! subroutine to reinitialize some derived constants
    1607             : 
    1608 23450397392 :       subroutine icepack_recompute_constants()
    1609             : 
    1610             : !autodocument_end
    1611             : 
    1612             :       character(len=*),parameter :: subname='(icepack_recompute_constants)'
    1613             : 
    1614 23450397392 :         cprho  = cp_ocn*rhow
    1615 23450397392 :         Lfresh = Lsub-Lvap
    1616 23450397392 :         Cp     = 0.5_dbl_kind*gravit*(rhow-rhoi)*rhoi/rhow
    1617 23450397392 :         pih    = p5*pi
    1618 23450397392 :         piq    = p5*p5*pi
    1619 23450397392 :         pi2    = c2*pi
    1620 23450397392 :         rad_to_deg = c180/pi
    1621             : 
    1622 23450397392 :       end subroutine icepack_recompute_constants
    1623             : 
    1624             : !=======================================================================
    1625             : 
    1626             :     end module icepack_parameters
    1627             : 
    1628             : !=======================================================================

Generated by: LCOV version 1.14-6-g40580cd