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

Generated by: LCOV version 1.14-6-g40580cd