-
Notifications
You must be signed in to change notification settings - Fork 134
/
icepack_parameters.F90
2059 lines (1820 loc) · 111 KB
/
icepack_parameters.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
!=========================================================================
!
! flags for the column package
!
! authors: Elizabeth C. Hunke, LANL
module icepack_parameters
use icepack_kinds
use icepack_warnings, only: icepack_warnings_aborted, &
icepack_warnings_add, icepack_warnings_setabort
implicit none
private
public :: icepack_init_parameters
public :: icepack_query_parameters
public :: icepack_write_parameters
public :: icepack_recompute_constants
public :: icepack_chkoptargflag
!-----------------------------------------------------------------
! control options
!-----------------------------------------------------------------
character (char_len), public :: &
argcheck = 'first' ! optional argument checks, 'never','first','always'
!-----------------------------------------------------------------
! parameter constants
!-----------------------------------------------------------------
real (kind=dbl_kind), parameter, public :: &
c0 = 0.0_dbl_kind, &
c1 = 1.0_dbl_kind, &
c1p5 = 1.5_dbl_kind, &
c2 = 2.0_dbl_kind, &
c3 = 3.0_dbl_kind, &
c4 = 4.0_dbl_kind, &
c5 = 5.0_dbl_kind, &
c6 = 6.0_dbl_kind, &
c8 = 8.0_dbl_kind, &
c10 = 10.0_dbl_kind, &
c15 = 15.0_dbl_kind, &
c16 = 16.0_dbl_kind, &
c20 = 20.0_dbl_kind, &
c25 = 25.0_dbl_kind, &
c100 = 100.0_dbl_kind, &
c180 = 180.0_dbl_kind, &
c1000= 1000.0_dbl_kind, &
p001 = 0.001_dbl_kind, &
p01 = 0.01_dbl_kind, &
p1 = 0.1_dbl_kind, &
p2 = 0.2_dbl_kind, &
p4 = 0.4_dbl_kind, &
p5 = 0.5_dbl_kind, &
p6 = 0.6_dbl_kind, &
p05 = 0.05_dbl_kind, &
p15 = 0.15_dbl_kind, &
p25 = 0.25_dbl_kind, &
p75 = 0.75_dbl_kind, &
p333 = c1/c3, &
p666 = c2/c3, &
spval_const= -1.0e36_dbl_kind
real (kind=dbl_kind), public :: &
secday = 86400.0_dbl_kind ,&! seconds in calendar day
puny = 1.0e-11_dbl_kind, &
bignum = 1.0e+30_dbl_kind, &
pi = 3.14159265358979323846_dbl_kind
!-----------------------------------------------------------------
! derived physical constants
! Lfresh = Lsub-Lvap ,&! latent heat of melting of fresh ice (J/kg)
! cprho = cp_ocn*rhow ,&! for ocean mixed layer (J kg / K m^3)
! Cp = 0.5_dbl_kind*gravit*(rhow-rhoi)*rhoi/rhow ,&! proport const for PE
!-----------------------------------------------------------------
real (kind=dbl_kind), public :: &
pih = spval_const ,&! 0.5 * pi
piq = spval_const ,&! 0.25 * pi
pi2 = spval_const ,&! 2 * pi
rad_to_deg = spval_const ,&! conversion factor, radians to degrees
Lfresh = spval_const ,&! latent heat of melting of fresh ice (J/kg)
cprho = spval_const ,&! for ocean mixed layer (J kg / K m^3)
Cp = spval_const ! proport const for PE
!-----------------------------------------------------------------
! Densities
!-----------------------------------------------------------------
real (kind=dbl_kind), public :: &
rhos = 330.0_dbl_kind ,&! density of snow (kg/m^3)
rhoi = 917.0_dbl_kind ,&! density of ice (kg/m^3)
rhosi = 940.0_dbl_kind ,&! average sea ice density
! Cox and Weeks, 1982: 919-974 kg/m^2
rhow = 1026.0_dbl_kind ,&! density of seawater (kg/m^3)
rhofresh = 1000.0_dbl_kind ! density of fresh water (kg/m^3)
!-----------------------------------------------------------------------
! Parameters for thermodynamics
!-----------------------------------------------------------------------
real (kind=dbl_kind), public :: &
hfrazilmin = 0.05_dbl_kind ,&! min thickness of new frazil ice (m)
cp_ice = 2106._dbl_kind ,&! specific heat of fresh ice (J/kg/K)
cp_ocn = 4218._dbl_kind ,&! specific heat of ocn (J/kg/K)
! freshwater value needed for enthalpy
depressT = 0.054_dbl_kind ,&! Tf:brine salinity ratio (C/ppt)
viscosity_dyn = 1.79e-3_dbl_kind, & ! dynamic viscosity of brine (kg/m/s)
tscale_pnd_drain = c10 ,&! mushy macroscopic drainage timescale (days)
Tocnfrz = -1.8_dbl_kind ,&! freezing temp of seawater (C),
! used as Tsfcn for open water
Tffresh = 273.15_dbl_kind ,&! freezing temp of fresh ice (K)
Lsub = 2.835e6_dbl_kind ,&! latent heat, sublimation freshwater (J/kg)
Lvap = 2.501e6_dbl_kind ,&! latent heat, vaporization freshwater (J/kg)
Timelt = 0.0_dbl_kind ,&! melting temperature, ice top surface (C)
Tsmelt = 0.0_dbl_kind ,&! melting temperature, snow top surface (C)
ice_ref_salinity =4._dbl_kind,&! (ppt)
! kice is not used for mushy thermo
kice = 2.03_dbl_kind ,&! thermal conductivity of fresh ice(W/m/deg)
ksno = 0.30_dbl_kind ,&! thermal conductivity of snow (W/m/deg)
hs_min = 1.e-4_dbl_kind ,&! min snow thickness for computing zTsn (m)
snowpatch = 0.02_dbl_kind ,&! parameter for fractional snow area (m)
saltmax = 3.2_dbl_kind ,&! max salinity at ice base for BL99 (ppt)
! phi_init, dSin0_frazil are for mushy thermo
phi_init = 0.75_dbl_kind ,&! initial liquid fraction of frazil
min_salin = p1 ,&! threshold for brine pocket treatment
salt_loss = 0.4_dbl_kind ,&! fraction of salt retained in zsalinity
Tliquidus_max = c0 ,&! maximum liquidus temperature of mush (C)
dSin0_frazil = c3 ,&! bulk salinity reduction of newly formed frazil
dts_b = 50._dbl_kind ,&! zsalinity timestep
ustar_min = 0.005_dbl_kind ,&! minimum friction velocity for ocean heat flux (m/s)
hi_min = p01 ,&! minimum ice thickness allowed (m) for thermo
! mushy thermo
a_rapid_mode = 0.5e-3_dbl_kind,&! channel radius for rapid drainage mode (m)
Rac_rapid_mode = 10.0_dbl_kind,&! critical Rayleigh number
aspect_rapid_mode = 1.0_dbl_kind,&! aspect ratio (larger is wider)
dSdt_slow_mode = -1.5e-7_dbl_kind,&! slow mode drainage strength (m s-1 K-1)
phi_c_slow_mode = 0.05_dbl_kind,&! critical liquid fraction porosity cutoff
phi_i_mushy = 0.85_dbl_kind ! liquid fraction of congelation ice
integer (kind=int_kind), public :: &
ktherm = 1 ! type of thermodynamics
! -1 none
! 1 = Bitz and Lipscomb 1999
! 2 = mushy layer theory
character (char_len), public :: &
conduct = 'bubbly', & ! 'MU71' or 'bubbly'
fbot_xfer_type = 'constant', & ! transfer coefficient type for ice-ocean heat flux
cpl_frazil = 'fresh_ice_correction' ! type of coupling for frazil ice
logical (kind=log_kind), public :: &
calc_Tsfc = .true. ,&! if true, calculate surface temperature
! if false, Tsfc is computed elsewhere and
! atmos-ice fluxes are provided to CICE
update_ocn_f = .false. ,&! include fresh water and salt fluxes for frazil
solve_zsal = .false. ,&! if true, update salinity profile from solve_S_dt
modal_aero = .false. ,&! if true, use modal aerosal optical properties
! only for use with tr_aero or tr_zaero
conserv_check = .false. ! if true, do conservations checks and abort
character(len=char_len), public :: &
tfrz_option = 'mushy' ! form of ocean freezing temperature
! 'minus1p8' = -1.8 C
! 'constant' = Tocnfrz
! 'linear_salt' = -depressT * sss
! 'mushy' conforms with ktherm=2
character(len=char_len), public :: &
saltflux_option = 'constant'! Salt flux computation
! 'constant' reference value of ice_ref_salinity
! 'prognostic' prognostic salt flux
!-----------------------------------------------------------------------
! Parameters for radiation
!-----------------------------------------------------------------------
real (kind=dbl_kind), public :: &
! (Briegleb JGR 97 11475-11485 July 1992)
emissivity = 0.985_dbl_kind,&! emissivity of snow and ice
albocn = 0.06_dbl_kind ,&! ocean albedo
vonkar = 0.4_dbl_kind ,&! von Karman constant
stefan_boltzmann = 567.0e-10_dbl_kind,&! W/m^2/K^4
! (Ebert, Schramm and Curry JGR 100 15965-15975 Aug 1995)
kappav = 1.4_dbl_kind ,&! vis extnctn coef in ice, wvlngth<700nm (1/m)
hi_ssl = 0.050_dbl_kind,&! ice surface scattering layer thickness (m)
hs_ssl = 0.040_dbl_kind,&! snow surface scattering layer thickness (m)
! baseline albedos for ccsm3 shortwave, set in namelist
albicev = 0.78_dbl_kind ,&! visible ice albedo for h > ahmax
albicei = 0.36_dbl_kind ,&! near-ir ice albedo for h > ahmax
albsnowv = 0.98_dbl_kind ,&! cold snow albedo, visible
albsnowi = 0.70_dbl_kind ,&! cold snow albedo, near IR
ahmax = 0.3_dbl_kind ,&! thickness above which ice albedo is constant (m)
! dEdd tuning parameters, set in namelist
R_ice = c0 ,&! sea ice tuning parameter; +1 > 1sig increase in albedo
R_pnd = c0 ,&! ponded ice tuning parameter; +1 > 1sig increase in albedo
R_snw = c1p5 ,&! snow tuning parameter; +1 > ~.01 change in broadband albedo
dT_mlt = c1p5 ,&! change in temp for non-melt to melt snow grain
! radius change (C)
rsnw_mlt = 1500._dbl_kind,&! maximum melting snow grain radius (10^-6 m)
kalg = 0.60_dbl_kind ! algae absorption coefficient for 0.5 m thick layer
! 0.5 m path of 75 mg Chl a / m2
! weights for albedos
! 4 Jan 2007 BPB Following are appropriate for complete cloud
! in a summer polar atmosphere with 1.5m bare sea ice surface:
! .636/.364 vis/nir with only 0.5% direct for each band.
real (kind=dbl_kind), public :: & ! currently used only
awtvdr = 0.00318_dbl_kind, &! visible, direct ! for history and
awtidr = 0.00182_dbl_kind, &! near IR, direct ! diagnostics
awtvdf = 0.63282_dbl_kind, &! visible, diffuse
awtidf = 0.36218_dbl_kind ! near IR, diffuse
character (len=char_len), public :: &
shortwave = 'dEdd', & ! shortwave method, 'ccsm3' or 'dEdd' or 'dEdd_snicar_ad'
albedo_type = 'ccsm3' ! albedo parameterization, 'ccsm3' or 'constant'
! shortwave='dEdd' overrides this parameter
! Parameters for shortwave redistribution
logical (kind=log_kind), public :: &
sw_redist = .false.
real (kind=dbl_kind), public :: &
sw_frac = 0.9_dbl_kind , & ! Fraction of internal shortwave moved to surface
sw_dtemp = 0.02_dbl_kind ! temperature difference from melting
! Parameters for dEdd_snicar_ad
character (len=char_len), public :: &
snw_ssp_table = 'test' ! lookup table: 'snicar' or 'test'
!-----------------------------------------------------------------------
! Parameters for dynamics, including ridging and strength
!-----------------------------------------------------------------------
integer (kind=int_kind), public :: & ! defined in namelist
kstrength = 1, & ! 0 for simple Hibler (1979) formulation
! 1 for Rothrock (1975) pressure formulation
krdg_partic = 1, & ! 0 for Thorndike et al. (1975) formulation
! 1 for exponential participation function
krdg_redist = 1 ! 0 for Hibler (1980) formulation
! 1 for exponential redistribution function
real (kind=dbl_kind), public :: &
Cf = 17._dbl_kind ,&! ratio of ridging work to PE change in ridging
Pstar = 2.75e4_dbl_kind ,&! constant in Hibler strength formula
! (kstrength = 0)
Cstar = 20._dbl_kind ,&! constant in Hibler strength formula
! (kstrength = 0)
dragio = 0.00536_dbl_kind ,&! ice-ocn drag coefficient
thickness_ocn_layer1 = 2.0_dbl_kind,&! thickness of first ocean level (m)
iceruf_ocn = 0.03_dbl_kind ,&! under-ice roughness (m)
gravit = 9.80616_dbl_kind ,&! gravitational acceleration (m/s^2)
mu_rdg = 3.0_dbl_kind ! e-folding scale of ridged ice, krdg_partic=1 (m^0.5)
! (krdg_redist = 1)
logical (kind=log_kind), public :: &
calc_dragio = .false. ! if true, calculate dragio from iceruf_ocn and thickness_ocn_layer1
!-----------------------------------------------------------------------
! Parameters for atmosphere
!-----------------------------------------------------------------------
real (kind=dbl_kind), public :: &
cp_air = 1005.0_dbl_kind ,&! specific heat of air (J/kg/K)
cp_wv = 1.81e3_dbl_kind ,&! specific heat of water vapor (J/kg/K)
zvir = 0.606_dbl_kind ,&! rh2o/rair - 1.0
zref = 10._dbl_kind ,&! reference height for stability (m)
iceruf = 0.0005_dbl_kind ,&! ice surface roughness (m)
qqqice = 11637800._dbl_kind ,&! for qsat over ice
TTTice = 5897.8_dbl_kind ,&! for qsat over ice
qqqocn = 627572.4_dbl_kind ,&! for qsat over ocn
TTTocn = 5107.4_dbl_kind ,&! for qsat over ocn
senscoef= 0.0012_dbl_kind ,&! Sensible heat flux coefficient for constant-based boundary layer
latncoef= 0.0015_dbl_kind ! Latent heat flux coefficient for constant-based boundary layer
character (len=char_len), public :: &
atmbndy = 'similarity' ! atmo boundary method, 'similarity', 'constant' or 'mixed'
logical (kind=log_kind), public :: &
calc_strair = .true. , & ! if true, calculate wind stress
formdrag = .false. , & ! if true, calculate form drag
highfreq = .false. ! if true, calculate high frequency coupling
integer (kind=int_kind), public :: &
natmiter = 5 ! number of iterations for atm boundary layer calcs
! Flux convergence tolerance
real (kind=dbl_kind), public :: atmiter_conv = c0
!-----------------------------------------------------------------------
! Parameters for the ice thickness distribution
!-----------------------------------------------------------------------
integer (kind=int_kind), public :: &
kitd = 1 ,&! type of itd conversions
! 0 = delta function
! 1 = linear remap
kcatbound = 1 ! 0 = old category boundary formula
! 1 = new formula giving round numbers
! 2 = WMO standard
! 3 = asymptotic formula
!-----------------------------------------------------------------------
! Parameters for the floe size distribution
!-----------------------------------------------------------------------
integer (kind=int_kind), public :: &
nfreq = 25 ! number of frequencies
real (kind=dbl_kind), public :: &
floeshape = 0.66_dbl_kind ! constant from Steele (unitless)
real (kind=dbl_kind), public :: &
floediam = 300.0_dbl_kind ! effective floe diameter for lateral melt (m)
logical (kind=log_kind), public :: &
wave_spec = .false. ! if true, use wave forcing
character (len=char_len), public :: &
wave_spec_type = 'constant' ! 'none', 'constant', or 'random'
!-----------------------------------------------------------------------
! Parameters for melt ponds
!-----------------------------------------------------------------------
real (kind=dbl_kind), public :: &
hs0 = 0.03_dbl_kind ! snow depth for transition to bare sea ice (m)
! level-ice ponds
character (len=char_len), public :: &
frzpnd = 'cesm' ! pond refreezing parameterization
real (kind=dbl_kind), public :: &
dpscale = 0.001_dbl_kind,& ! alter e-folding time scale for flushing (ktherm=1)
rfracmin = 0.15_dbl_kind, & ! minimum retained fraction of meltwater
rfracmax = 0.85_dbl_kind, & ! maximum retained fraction of meltwater
pndaspect = 0.8_dbl_kind, & ! ratio of pond depth to area fraction
hs1 = 0.03_dbl_kind ! snow depth for transition to bare pond ice (m)
! topo ponds
real (kind=dbl_kind), public :: &
hp1 = 0.01_dbl_kind ! critical pond lid thickness for topo ponds
!-----------------------------------------------------------------------
! Parameters for snow redistribution, metamorphosis
!-----------------------------------------------------------------------
character (len=char_len), public :: &
snwredist = 'none', & ! type of snow redistribution
snw_aging_table = 'test' ! lookup table: 'snicar' or 'test' or 'file'
logical (kind=log_kind), public :: &
use_smliq_pnd = .false. , & ! use liquid in snow for ponds
snwgrain = .false. ! snow metamorphosis
real (kind=dbl_kind), public :: &
rsnw_fall = 54.526_dbl_kind, & ! radius of new snow (10^-6 m)
rsnw_tmax = 1500.0_dbl_kind, & ! maximum snow radius (10^-6 m)
rhosnew = 100.0_dbl_kind, & ! new snow density (kg/m^3)
rhosmin = 100.0_dbl_kind, & ! minimum snow density (kg/m^3)
rhosmax = 450.0_dbl_kind, & ! maximum snow density (kg/m^3)
windmin = 10.0_dbl_kind, & ! minimum wind speed to compact snow (m/s)
drhosdwind = 27.3_dbl_kind, & ! wind compaction factor for snow (kg s/m^4)
snwlvlfac = 0.3_dbl_kind ! fractional increase in snow
! depth for bulk redistribution
! indices for aging lookup table
integer (kind=int_kind), public :: &
isnw_T, & ! maximum temperature index
isnw_Tgrd, & ! maximum temperature gradient index
isnw_rhos ! maximum snow density index
! dry snow aging parameters
real (kind=dbl_kind), dimension(:), allocatable, public :: &
snowage_rhos, & ! snowage table dimension data for rhos (kg/m^3)
snowage_Tgrd, & ! snowage table dimension data for temp gradient (deg K/m)
snowage_T ! snowage table dimension data for temperature (deg K)
real (kind=dbl_kind), dimension(:,:,:), allocatable, public :: &
snowage_tau, & ! snowage table 3D data for tau (10^-6 m)
snowage_kappa, & ! snowage table 3D data for kappa (10^-6 m)
snowage_drdt0 ! snowage table 3D data for drdt0 (10^-6 m/hr)
!-----------------------------------------------------------------------
! Parameters for biogeochemistry
!-----------------------------------------------------------------------
character(char_len), public :: &
! skl biology parameters
bgc_flux_type = 'Jin2006' ! type of ocean-ice piston velocity (or 'constant')
logical (kind=log_kind), public :: &
z_tracers = .false., & ! if .true., bgc or aerosol tracers are vertically resolved
scale_bgc = .false., & ! if .true., initialize bgc tracers proportionally with salinity
solve_zbgc = .false., & ! if .true., solve vertical biochemistry portion of code
dEdd_algae = .false., & ! if .true., algal absorption of shortwave is computed in the
skl_bgc = .false. ! if true, solve skeletal biochemistry
real (kind=dbl_kind), public :: &
phi_snow = p5 , & ! snow porosity
grid_o = c5 , & ! for bottom flux
initbio_frac = c1 , & ! fraction of ocean trcr concentration in bio trcrs
l_sk = 7.0_dbl_kind , & ! characteristic diffusive scale (m)
grid_oS = c5 , & ! for bottom flux
l_skS = 7.0_dbl_kind , & ! characteristic skeletal layer thickness (m) (zsalinity)
algal_vel = 1.11e-8_dbl_kind, & ! 0.5 cm/d(m/s) Lavoie 2005 1.5 cm/day
R_dFe2dust = 0.035_dbl_kind , & ! g/g (3.5% content) Tagliabue 2009
dustFe_sol = 0.005_dbl_kind , & ! solubility fraction
frazil_scav = c1 , & ! fraction or multiple of bgc concentrated in frazil ice
sk_l = 0.03_dbl_kind , & ! skeletal layer thickness (m)
min_bgc = 0.01_dbl_kind , & ! fraction of ocean bgc concentration in surface melt
T_max = c0 , & ! maximum temperature (C)
fsal = c1 , & ! Salinity limitation (1)
op_dep_min = p1 , & ! light attenuates for optical depths exceeding min
fr_graze_s = p5 , & ! fraction of grazing spilled or slopped
fr_graze_e = p5 , & ! fraction of assimilation excreted
fr_mort2min = p5 , & ! fractionation of mortality to Am
fr_dFe = 0.3_dbl_kind , & ! fraction of remineralized nitrogen
! (in units of algal iron)
k_nitrif = c0 , & ! nitrification rate (1/day)
t_iron_conv = 3065.0_dbl_kind , & ! desorption loss pFe to dFe (day)
max_loss = 0.9_dbl_kind , & ! restrict uptake to % of remaining value
max_dfe_doc1 = 0.2_dbl_kind , & ! max ratio of dFe to saccharides in the ice
! (nM Fe/muM C)
fr_resp = 0.05_dbl_kind , & ! fraction of algal growth lost due to respiration
fr_resp_s = 0.75_dbl_kind , & ! DMSPd fraction of respiration loss as DMSPd
y_sk_DMS = p5 , & ! fraction conversion given high yield
t_sk_conv = 3.0_dbl_kind , & ! Stefels conversion time (d)
t_sk_ox = 10.0_dbl_kind ! DMS oxidation time (d)
!=======================================================================
contains
!=======================================================================
!autodocument_start icepack_init_parameters
! subroutine to set the column package internal parameters
subroutine icepack_init_parameters( &
argcheck_in, puny_in, bignum_in, pi_in, secday_in, &
rhos_in, rhoi_in, rhow_in, cp_air_in, emissivity_in, &
cp_ice_in, cp_ocn_in, hfrazilmin_in, floediam_in, &
depressT_in, dragio_in, thickness_ocn_layer1_in, iceruf_ocn_in, &
albocn_in, gravit_in, viscosity_dyn_in, tscale_pnd_drain_in, &
Tocnfrz_in, rhofresh_in, zvir_in, vonkar_in, cp_wv_in, &
stefan_boltzmann_in, ice_ref_salinity_in, &
Tffresh_in, Lsub_in, Lvap_in, Timelt_in, Tsmelt_in, &
iceruf_in, Cf_in, Pstar_in, Cstar_in, kappav_in, &
kice_in, ksno_in, &
zref_in, hs_min_in, snowpatch_in, rhosi_in, sk_l_in, &
saltmax_in, phi_init_in, min_salin_in, salt_loss_in, &
Tliquidus_max_in, &
min_bgc_in, dSin0_frazil_in, hi_ssl_in, hs_ssl_in, &
awtvdr_in, awtidr_in, awtvdf_in, awtidf_in, &
qqqice_in, TTTice_in, qqqocn_in, TTTocn_in, &
ktherm_in, conduct_in, fbot_xfer_type_in, calc_Tsfc_in, dts_b_in, &
update_ocn_f_in, ustar_min_in, hi_min_in, a_rapid_mode_in, &
cpl_frazil_in, &
Rac_rapid_mode_in, aspect_rapid_mode_in, &
dSdt_slow_mode_in, phi_c_slow_mode_in, &
phi_i_mushy_in, shortwave_in, albedo_type_in, albsnowi_in, &
albicev_in, albicei_in, albsnowv_in, &
ahmax_in, R_ice_in, R_pnd_in, R_snw_in, dT_mlt_in, rsnw_mlt_in, &
kalg_in, kstrength_in, krdg_partic_in, krdg_redist_in, mu_rdg_in, &
atmbndy_in, calc_strair_in, formdrag_in, highfreq_in, natmiter_in, &
atmiter_conv_in, calc_dragio_in, &
tfrz_option_in, kitd_in, kcatbound_in, hs0_in, frzpnd_in, &
saltflux_option_in, &
floeshape_in, wave_spec_in, wave_spec_type_in, nfreq_in, &
dpscale_in, rfracmin_in, rfracmax_in, pndaspect_in, hs1_in, hp1_in, &
bgc_flux_type_in, z_tracers_in, scale_bgc_in, solve_zbgc_in, &
modal_aero_in, skl_bgc_in, solve_zsal_in, grid_o_in, l_sk_in, &
initbio_frac_in, grid_oS_in, l_skS_in, dEdd_algae_in, &
phi_snow_in, T_max_in, fsal_in, &
fr_resp_in, algal_vel_in, R_dFe2dust_in, dustFe_sol_in, &
op_dep_min_in, fr_graze_s_in, fr_graze_e_in, fr_mort2min_in, &
fr_dFe_in, k_nitrif_in, t_iron_conv_in, max_loss_in, &
max_dfe_doc1_in, fr_resp_s_in, conserv_check_in, &
y_sk_DMS_in, t_sk_conv_in, t_sk_ox_in, frazil_scav_in, &
sw_redist_in, sw_frac_in, sw_dtemp_in, snwgrain_in, &
snwredist_in, use_smliq_pnd_in, rsnw_fall_in, rsnw_tmax_in, &
rhosnew_in, rhosmin_in, rhosmax_in, windmin_in, drhosdwind_in, &
snwlvlfac_in, isnw_T_in, isnw_Tgrd_in, isnw_rhos_in, &
snowage_rhos_in, snowage_Tgrd_in, snowage_T_in, &
snowage_tau_in, snowage_kappa_in, snowage_drdt0_in, &
snw_aging_table_in, snw_ssp_table_in )
!-----------------------------------------------------------------
! control settings
!-----------------------------------------------------------------
character(len=*), intent(in), optional :: &
argcheck_in ! optional argument checking, never, first, or always
!-----------------------------------------------------------------
! parameter constants
!-----------------------------------------------------------------
real (kind=dbl_kind), intent(in), optional :: &
secday_in, & !
puny_in, & !
bignum_in, & !
pi_in !
!-----------------------------------------------------------------
! densities
!-----------------------------------------------------------------
real (kind=dbl_kind), intent(in), optional :: &
rhos_in, & ! density of snow (kg/m^3)
rhoi_in, & ! density of ice (kg/m^3)
rhosi_in, & ! average sea ice density (kg/m2)
rhow_in, & ! density of seawater (kg/m^3)
rhofresh_in ! density of fresh water (kg/m^3)
!-----------------------------------------------------------------------
! Parameters for thermodynamics
!-----------------------------------------------------------------------
real (kind=dbl_kind), intent(in), optional :: &
floediam_in, & ! effective floe diameter for lateral melt (m)
hfrazilmin_in, & ! min thickness of new frazil ice (m)
cp_ice_in, & ! specific heat of fresh ice (J/kg/K)
cp_ocn_in, & ! specific heat of ocn (J/kg/K)
depressT_in, & ! Tf:brine salinity ratio (C/ppt)
viscosity_dyn_in, & ! dynamic viscosity of brine (kg/m/s)
tscale_pnd_drain_in,&! mushy macroscopic drainage timescale (days)
Tocnfrz_in, & ! freezing temp of seawater (C)
Tffresh_in, & ! freezing temp of fresh ice (K)
Lsub_in, & ! latent heat, sublimation freshwater (J/kg)
Lvap_in, & ! latent heat, vaporization freshwater (J/kg)
Timelt_in, & ! melting temperature, ice top surface (C)
Tsmelt_in, & ! melting temperature, snow top surface (C)
ice_ref_salinity_in, & ! (ppt)
kice_in, & ! thermal conductivity of fresh ice(W/m/deg)
ksno_in, & ! thermal conductivity of snow (W/m/deg)
hs_min_in, & ! min snow thickness for computing zTsn (m)
snowpatch_in, & ! parameter for fractional snow area (m)
saltmax_in, & ! max salinity at ice base for BL99 (ppt)
phi_init_in, & ! initial liquid fraction of frazil
min_salin_in, & ! threshold for brine pocket treatment
salt_loss_in, & ! fraction of salt retained in zsalinity
Tliquidus_max_in, & ! maximum liquidus temperature of mush (C)
dSin0_frazil_in ! bulk salinity reduction of newly formed frazil
integer (kind=int_kind), intent(in), optional :: &
ktherm_in ! type of thermodynamics
! -1 none
! 1 = Bitz and Lipscomb 1999
! 2 = mushy layer theory
character (len=*), intent(in), optional :: &
conduct_in, & ! 'MU71' or 'bubbly'
fbot_xfer_type_in, & ! transfer coefficient type for ice-ocean heat flux
cpl_frazil_in ! type of coupling for frazil ice
logical (kind=log_kind), intent(in), optional :: &
calc_Tsfc_in , &! if true, calculate surface temperature
! if false, Tsfc is computed elsewhere and
! atmos-ice fluxes are provided to CICE
update_ocn_f_in ! include fresh water and salt fluxes for frazil
real (kind=dbl_kind), intent(in), optional :: &
dts_b_in, & ! zsalinity timestep
hi_min_in, & ! minimum ice thickness allowed (m) for thermo
ustar_min_in ! minimum friction velocity for ice-ocean heat flux
! mushy thermo
real(kind=dbl_kind), intent(in), optional :: &
a_rapid_mode_in , & ! channel radius for rapid drainage mode (m)
Rac_rapid_mode_in , & ! critical Rayleigh number for rapid drainage mode
aspect_rapid_mode_in , & ! aspect ratio for rapid drainage mode (larger=wider)
dSdt_slow_mode_in , & ! slow mode drainage strength (m s-1 K-1)
phi_c_slow_mode_in , & ! liquid fraction porosity cutoff for slow mode
phi_i_mushy_in ! liquid fraction of congelation ice
character(len=*), intent(in), optional :: &
tfrz_option_in ! form of ocean freezing temperature
! 'minus1p8' = -1.8 C
! 'linear_salt' = -depressT * sss
! 'mushy' conforms with ktherm=2
character(len=*), intent(in), optional :: &
saltflux_option_in ! Salt flux computation
! 'constant' reference value of ice_ref_salinity
! 'prognostic' prognostic salt flux
!-----------------------------------------------------------------------
! Parameters for radiation
!-----------------------------------------------------------------------
real(kind=dbl_kind), intent(in), optional :: &
emissivity_in, & ! emissivity of snow and ice
albocn_in, & ! ocean albedo
vonkar_in, & ! von Karman constant
stefan_boltzmann_in, & ! W/m^2/K^4
kappav_in, & ! vis extnctn coef in ice, wvlngth<700nm (1/m)
hi_ssl_in, & ! ice surface scattering layer thickness (m)
hs_ssl_in, & ! visible, direct
awtvdr_in, & ! visible, direct ! for history and
awtidr_in, & ! near IR, direct ! diagnostics
awtvdf_in, & ! visible, diffuse
awtidf_in ! near IR, diffuse
character (len=*), intent(in), optional :: &
shortwave_in, & ! shortwave method, 'ccsm3' or 'dEdd' or 'dEdd_snicar_ad'
albedo_type_in ! albedo parameterization, 'ccsm3' or 'constant'
! shortwave='dEdd' overrides this parameter
! baseline albedos for ccsm3 shortwave, set in namelist
real (kind=dbl_kind), intent(in), optional :: &
albicev_in , & ! visible ice albedo for h > ahmax
albicei_in , & ! near-ir ice albedo for h > ahmax
albsnowv_in , & ! cold snow albedo, visible
albsnowi_in , & ! cold snow albedo, near IR
ahmax_in ! thickness above which ice albedo is constant (m)
! dEdd tuning parameters, set in namelist
real (kind=dbl_kind), intent(in), optional :: &
R_ice_in , & ! sea ice tuning parameter; +1 > 1sig increase in albedo
R_pnd_in , & ! ponded ice tuning parameter; +1 > 1sig increase in albedo
R_snw_in , & ! snow tuning parameter; +1 > ~.01 change in broadband albedo
dT_mlt_in , & ! change in temp for non-melt to melt snow grain
! radius change (C)
rsnw_mlt_in , & ! maximum melting snow grain radius (10^-6 m)
kalg_in ! algae absorption coefficient for 0.5 m thick layer
logical (kind=log_kind), intent(in), optional :: &
sw_redist_in ! redistribute shortwave
real (kind=dbl_kind), intent(in), optional :: &
sw_frac_in , & ! Fraction of internal shortwave moved to surface
sw_dtemp_in ! temperature difference from melting
!-----------------------------------------------------------------------
! Parameters for dynamics
!-----------------------------------------------------------------------
real(kind=dbl_kind), intent(in), optional :: &
Cf_in, & ! ratio of ridging work to PE change in ridging
Pstar_in, & ! constant in Hibler strength formula
Cstar_in, & ! constant in Hibler strength formula
dragio_in, & ! ice-ocn drag coefficient
thickness_ocn_layer1_in, & ! thickness of first ocean level (m)
iceruf_ocn_in, & ! under-ice roughness (m)
gravit_in, & ! gravitational acceleration (m/s^2)
iceruf_in ! ice surface roughness (m)
integer (kind=int_kind), intent(in), optional :: & ! defined in namelist
kstrength_in , & ! 0 for simple Hibler (1979) formulation
! 1 for Rothrock (1975) pressure formulation
krdg_partic_in, & ! 0 for Thorndike et al. (1975) formulation
! 1 for exponential participation function
krdg_redist_in ! 0 for Hibler (1980) formulation
! 1 for exponential redistribution function
real (kind=dbl_kind), intent(in), optional :: &
mu_rdg_in ! gives e-folding scale of ridged ice (m^.5)
! (krdg_redist = 1)
logical (kind=log_kind), intent(in), optional :: &
calc_dragio_in ! if true, calculate dragio from iceruf_ocn and thickness_ocn_layer1
!-----------------------------------------------------------------------
! Parameters for atmosphere
!-----------------------------------------------------------------------
real (kind=dbl_kind), intent(in), optional :: &
cp_air_in, & ! specific heat of air (J/kg/K)
cp_wv_in, & ! specific heat of water vapor (J/kg/K)
zvir_in, & ! rh2o/rair - 1.0
zref_in, & ! reference height for stability (m)
qqqice_in, & ! for qsat over ice
TTTice_in, & ! for qsat over ice
qqqocn_in, & ! for qsat over ocn
TTTocn_in ! for qsat over ocn
character (len=*), intent(in), optional :: &
atmbndy_in ! atmo boundary method, 'similarity', 'constant' or 'mixed'
logical (kind=log_kind), intent(in), optional :: &
calc_strair_in, & ! if true, calculate wind stress components
formdrag_in, & ! if true, calculate form drag
highfreq_in ! if true, use high frequency coupling
integer (kind=int_kind), intent(in), optional :: &
natmiter_in ! number of iterations for boundary layer calculations
! Flux convergence tolerance
real (kind=dbl_kind), intent(in), optional :: atmiter_conv_in
!-----------------------------------------------------------------------
! Parameters for the ice thickness distribution
!-----------------------------------------------------------------------
integer (kind=int_kind), intent(in), optional :: &
kitd_in , & ! type of itd conversions
! 0 = delta function
! 1 = linear remap
kcatbound_in ! 0 = old category boundary formula
! 1 = new formula giving round numbers
! 2 = WMO standard
! 3 = asymptotic formula
!-----------------------------------------------------------------------
! Parameters for the floe size distribution
!-----------------------------------------------------------------------
integer (kind=int_kind), intent(in), optional :: &
nfreq_in ! number of frequencies
real (kind=dbl_kind), intent(in), optional :: &
floeshape_in ! constant from Steele (unitless)
logical (kind=log_kind), intent(in), optional :: &
wave_spec_in ! if true, use wave forcing
character (len=*), intent(in), optional :: &
wave_spec_type_in ! type of wave spectrum forcing
!-----------------------------------------------------------------------
! Parameters for biogeochemistry
!-----------------------------------------------------------------------
character (len=*), intent(in), optional :: &
bgc_flux_type_in ! type of ocean-ice piston velocity
! 'constant', 'Jin2006'
logical (kind=log_kind), intent(in), optional :: &
z_tracers_in, & ! if .true., bgc or aerosol tracers are vertically resolved
scale_bgc_in, & ! if .true., initialize bgc tracers proportionally with salinity
solve_zbgc_in, & ! if .true., solve vertical biochemistry portion of code
dEdd_algae_in, & ! if .true., algal absorptionof Shortwave is computed in the
modal_aero_in, & ! if .true., use modal aerosol formulation in shortwave
conserv_check_in ! if .true., run conservation checks and abort if checks fail
logical (kind=log_kind), intent(in), optional :: &
skl_bgc_in, & ! if true, solve skeletal biochemistry
solve_zsal_in ! if true, update salinity profile from solve_S_dt
real (kind=dbl_kind), intent(in), optional :: &
grid_o_in , & ! for bottom flux
l_sk_in , & ! characteristic diffusive scale (zsalinity) (m)
initbio_frac_in, & ! fraction of ocean tracer concentration used to initialize tracer
phi_snow_in ! snow porosity at the ice/snow interface
real (kind=dbl_kind), intent(in), optional :: &
grid_oS_in , & ! for bottom flux (zsalinity)
l_skS_in ! 0.02 characteristic skeletal layer thickness (m) (zsalinity)
real (kind=dbl_kind), intent(in), optional :: &
fr_resp_in , & ! fraction of algal growth lost due to respiration
algal_vel_in , & ! 0.5 cm/d(m/s) Lavoie 2005 1.5 cm/day
R_dFe2dust_in , & ! g/g (3.5% content) Tagliabue 2009
dustFe_sol_in , & ! solubility fraction
T_max_in , & ! maximum temperature (C)
fsal_in , & ! Salinity limitation (ppt)
op_dep_min_in , & ! Light attenuates for optical depths exceeding min
fr_graze_s_in , & ! fraction of grazing spilled or slopped
fr_graze_e_in , & ! fraction of assimilation excreted
fr_mort2min_in , & ! fractionation of mortality to Am
fr_dFe_in , & ! fraction of remineralized nitrogen
! (in units of algal iron)
k_nitrif_in , & ! nitrification rate (1/day)
t_iron_conv_in , & ! desorption loss pFe to dFe (day)
max_loss_in , & ! restrict uptake to % of remaining value
max_dfe_doc1_in , & ! max ratio of dFe to saccharides in the ice
! (nM Fe/muM C)
fr_resp_s_in , & ! DMSPd fraction of respiration loss as DMSPd
y_sk_DMS_in , & ! fraction conversion given high yield
t_sk_conv_in , & ! Stefels conversion time (d)
t_sk_ox_in , & ! DMS oxidation time (d)
frazil_scav_in ! scavenging fraction or multiple in frazil ice
real (kind=dbl_kind), intent(in), optional :: &
sk_l_in, & ! skeletal layer thickness (m)
min_bgc_in ! fraction of ocean bgc concentration in surface melt
!-----------------------------------------------------------------------
! Parameters for melt ponds
!-----------------------------------------------------------------------
real (kind=dbl_kind), intent(in), optional :: &
hs0_in ! snow depth for transition to bare sea ice (m)
! level-ice ponds
character (len=*), intent(in), optional :: &
frzpnd_in ! pond refreezing parameterization
real (kind=dbl_kind), intent(in), optional :: &
dpscale_in, & ! alter e-folding time scale for flushing
rfracmin_in, & ! minimum retained fraction of meltwater
rfracmax_in, & ! maximum retained fraction of meltwater
pndaspect_in, & ! ratio of pond depth to pond fraction
hs1_in ! tapering parameter for snow on pond ice
! topo ponds
real (kind=dbl_kind), intent(in), optional :: &
hp1_in ! critical parameter for pond ice thickness
!-----------------------------------------------------------------------
! Parameters for snow redistribution, metamorphosis
!-----------------------------------------------------------------------
character (len=*), intent(in), optional :: &
snwredist_in, & ! type of snow redistribution
snw_aging_table_in ! snow aging lookup table
logical (kind=log_kind), intent(in), optional :: &
use_smliq_pnd_in, &! use liquid in snow for ponds
snwgrain_in ! snow metamorphosis
real (kind=dbl_kind), intent(in), optional :: &
rsnw_fall_in, & ! radius of new snow (10^-6 m)
rsnw_tmax_in, & ! maximum snow radius (10^-6 m)
rhosnew_in, & ! new snow density (kg/m^3)
rhosmin_in, & ! minimum snow density (kg/m^3)
rhosmax_in, & ! maximum snow density (kg/m^3)
windmin_in, & ! minimum wind speed to compact snow (m/s)
drhosdwind_in, & ! wind compaction factor (kg s/m^4)
snwlvlfac_in ! fractional increase in snow depth
integer (kind=int_kind), intent(in), optional :: &
isnw_T_in, & ! maxiumum temperature index
isnw_Tgrd_in, & ! maxiumum temperature gradient index
isnw_rhos_in ! maxiumum snow density index
real (kind=dbl_kind), dimension(:), intent(in), optional :: &
snowage_rhos_in, & ! snowage dimension data
snowage_Tgrd_in, & !
snowage_T_in !
real (kind=dbl_kind), dimension(:,:,:), intent(in), optional :: &
snowage_tau_in, & ! (10^-6 m)
snowage_kappa_in, &!
snowage_drdt0_in ! (10^-6 m/hr)
character (len=char_len), intent(in), optional :: &
snw_ssp_table_in ! lookup table: 'snicar' or 'test'
!autodocument_end
! local data
integer (kind=int_kind) :: &
dim1, dim2, dim3 ! array dimension sizes
character(len=*),parameter :: subname='(icepack_init_parameters)'
if (present(argcheck_in) ) argcheck = argcheck_in
if (present(puny_in) ) puny = puny_in
if (present(bignum_in) ) bignum = bignum_in
if (present(pi_in) ) pi = pi_in
if (present(rhos_in) ) rhos = rhos_in
if (present(rhoi_in) ) rhoi = rhoi_in
if (present(rhow_in) ) rhow = rhow_in
if (present(cp_air_in) ) cp_air = cp_air_in
if (present(emissivity_in) ) emissivity = emissivity_in
if (present(floediam_in) ) floediam = floediam_in
if (present(hfrazilmin_in) ) hfrazilmin = hfrazilmin_in
if (present(cp_ice_in) ) cp_ice = cp_ice_in
if (present(cp_ocn_in) ) cp_ocn = cp_ocn_in
if (present(depressT_in) ) depressT = depressT_in
if (present(dragio_in) ) dragio = dragio_in
if (present(iceruf_ocn_in) ) iceruf_ocn = iceruf_ocn_in
if (present(thickness_ocn_layer1_in) ) thickness_ocn_layer1 = thickness_ocn_layer1_in
if (present(calc_dragio_in) ) calc_dragio = calc_dragio_in
if (present(albocn_in) ) albocn = albocn_in
if (present(gravit_in) ) gravit = gravit_in
if (present(viscosity_dyn_in) ) viscosity_dyn = viscosity_dyn_in
if (present(tscale_pnd_drain_in) ) tscale_pnd_drain = tscale_pnd_drain_in
if (present(Tocnfrz_in) ) Tocnfrz = Tocnfrz_in
if (present(rhofresh_in) ) rhofresh = rhofresh_in
if (present(zvir_in) ) zvir = zvir_in
if (present(vonkar_in) ) vonkar = vonkar_in
if (present(cp_wv_in) ) cp_wv = cp_wv_in
if (present(stefan_boltzmann_in) ) stefan_boltzmann = stefan_boltzmann_in
if (present(Tffresh_in) ) Tffresh = Tffresh_in
if (present(Lsub_in) ) Lsub = Lsub_in
if (present(Lvap_in) ) Lvap = Lvap_in
if (present(Timelt_in) ) Timelt = Timelt_in
if (present(Tsmelt_in) ) Tsmelt = Tsmelt_in
if (present(ice_ref_salinity_in) ) ice_ref_salinity = ice_ref_salinity_in
if (present(iceruf_in) ) iceruf = iceruf_in
if (present(Cf_in) ) Cf = Cf_in
if (present(Pstar_in) ) Pstar = Pstar_in
if (present(Cstar_in) ) Cstar = Cstar_in
if (present(kappav_in) ) kappav = kappav_in
if (present(kice_in) ) kice = kice_in
if (present(ksno_in) ) ksno = ksno_in
if (present(zref_in) ) zref = zref_in
if (present(hs_min_in) ) hs_min = hs_min_in
if (present(snowpatch_in) ) snowpatch = snowpatch_in
if (present(rhosi_in) ) rhosi = rhosi_in
if (present(sk_l_in) ) sk_l = sk_l_in
if (present(saltmax_in) ) saltmax = saltmax_in
if (present(phi_init_in) ) phi_init = phi_init_in
if (present(min_salin_in) ) min_salin = min_salin_in
if (present(salt_loss_in) ) salt_loss = salt_loss_in
if (present(Tliquidus_max_in) ) Tliquidus_max = Tliquidus_max_in
if (present(min_bgc_in) ) min_bgc = min_bgc_in
if (present(dSin0_frazil_in) ) dSin0_frazil = dSin0_frazil_in
if (present(hi_ssl_in) ) hi_ssl = hi_ssl_in
if (present(hs_ssl_in) ) hs_ssl = hs_ssl_in
if (present(awtvdr_in) ) awtvdr = awtvdr_in
if (present(awtidr_in) ) awtidr = awtidr_in
if (present(awtvdf_in) ) awtvdf = awtvdf_in
if (present(awtidf_in) ) awtidf = awtidf_in
if (present(qqqice_in) ) qqqice = qqqice_in
if (present(TTTice_in) ) TTTice = TTTice_in
if (present(qqqocn_in) ) qqqocn = qqqocn_in
if (present(TTTocn_in) ) TTTocn = TTTocn_in
if (present(secday_in) ) secday = secday_in
if (present(ktherm_in) ) ktherm = ktherm_in
if (present(conduct_in) ) conduct = conduct_in
if (present(fbot_xfer_type_in) ) fbot_xfer_type = fbot_xfer_type_in
if (present(calc_Tsfc_in) ) calc_Tsfc = calc_Tsfc_in
if (present(cpl_frazil_in) ) cpl_frazil = cpl_frazil_in
if (present(update_ocn_f_in) ) update_ocn_f = update_ocn_f_in
if (present(dts_b_in) ) dts_b = dts_b_in
if (present(ustar_min_in) ) ustar_min = ustar_min_in
if (present(hi_min_in) ) hi_min = hi_min_in
if (present(a_rapid_mode_in) ) a_rapid_mode = a_rapid_mode_in
if (present(Rac_rapid_mode_in) ) Rac_rapid_mode = Rac_rapid_mode_in
if (present(aspect_rapid_mode_in) ) aspect_rapid_mode= aspect_rapid_mode_in
if (present(dSdt_slow_mode_in) ) dSdt_slow_mode = dSdt_slow_mode_in
if (present(phi_c_slow_mode_in) ) phi_c_slow_mode = phi_c_slow_mode_in
if (present(phi_i_mushy_in) ) phi_i_mushy = phi_i_mushy_in
if (present(shortwave_in) ) shortwave = shortwave_in
if (present(albedo_type_in) ) albedo_type = albedo_type_in
if (present(albicev_in) ) albicev = albicev_in
if (present(albicei_in) ) albicei = albicei_in
if (present(albsnowv_in) ) albsnowv = albsnowv_in
if (present(albsnowi_in) ) albsnowi = albsnowi_in
if (present(ahmax_in) ) ahmax = ahmax_in
if (present(R_ice_in) ) R_ice = R_ice_in
if (present(R_pnd_in) ) R_pnd = R_pnd_in
if (present(R_snw_in) ) R_snw = R_snw_in
if (present(dT_mlt_in) ) dT_mlt = dT_mlt_in
if (present(rsnw_mlt_in) ) rsnw_mlt = rsnw_mlt_in
if (present(kalg_in) ) kalg = kalg_in
if (present(kstrength_in) ) kstrength = kstrength_in
if (present(krdg_partic_in) ) krdg_partic = krdg_partic_in
if (present(krdg_redist_in) ) krdg_redist = krdg_redist_in
if (present(mu_rdg_in) ) mu_rdg = mu_rdg_in
if (present(atmbndy_in) ) atmbndy = atmbndy_in
if (present(calc_strair_in) ) calc_strair = calc_strair_in
if (present(formdrag_in) ) formdrag = formdrag_in
if (present(highfreq_in) ) highfreq = highfreq_in
if (present(natmiter_in) ) natmiter = natmiter_in
if (present(atmiter_conv_in) ) atmiter_conv = atmiter_conv_in
if (present(tfrz_option_in) ) tfrz_option = tfrz_option_in
if (present(saltflux_option_in) ) saltflux_option = saltflux_option_in
if (present(kitd_in) ) kitd = kitd_in
if (present(kcatbound_in) ) kcatbound = kcatbound_in
if (present(floeshape_in) ) floeshape = floeshape_in
if (present(wave_spec_in) ) wave_spec = wave_spec_in
if (present(wave_spec_type_in) ) wave_spec_type = wave_spec_type_in
if (present(nfreq_in) ) nfreq = nfreq_in
if (present(hs0_in) ) hs0 = hs0_in
if (present(frzpnd_in) ) frzpnd = frzpnd_in
if (present(dpscale_in) ) dpscale = dpscale_in
if (present(rfracmin_in) ) rfracmin = rfracmin_in
if (present(rfracmax_in) ) rfracmax = rfracmax_in
if (present(pndaspect_in) ) pndaspect = pndaspect_in
if (present(hs1_in) ) hs1 = hs1_in
if (present(hp1_in) ) hp1 = hp1_in
if (present(snwredist_in) ) snwredist = snwredist_in
if (present(snw_aging_table_in) ) snw_aging_table = snw_aging_table_in
if (present(snwgrain_in) ) snwgrain = snwgrain_in
if (present(use_smliq_pnd_in) ) use_smliq_pnd = use_smliq_pnd_in
if (present(rsnw_fall_in) ) rsnw_fall = rsnw_fall_in
if (present(rsnw_tmax_in) ) rsnw_tmax = rsnw_tmax_in
if (present(rhosnew_in) ) rhosnew = rhosnew_in
if (present(rhosmin_in) ) rhosmin = rhosmin_in
if (present(rhosmax_in) ) rhosmax = rhosmax_in
if (present(windmin_in) ) windmin = windmin_in
if (present(drhosdwind_in) ) drhosdwind = drhosdwind_in
if (present(snwlvlfac_in) ) snwlvlfac = snwlvlfac_in
!-------------------
! SNOW table
!-------------------
if (present(isnw_T_in) ) isnw_T = isnw_T_in
if (present(isnw_Tgrd_in) ) isnw_Tgrd = isnw_Tgrd_in
if (present(isnw_rhos_in) ) isnw_rhos = isnw_rhos_in
! check array sizes and re/allocate if necessary
if (present(snowage_rhos_in) ) then
if (size(snowage_rhos_in) /= isnw_rhos) then
call icepack_warnings_add(subname//' incorrect size of snowage_rhos_in')
call icepack_warnings_setabort(.true.,__FILE__,__LINE__)
elseif (.not.allocated(snowage_rhos)) then
allocate(snowage_rhos(isnw_rhos))
snowage_rhos = snowage_rhos_in
elseif (size(snowage_rhos) /= isnw_rhos) then
deallocate(snowage_rhos)
allocate(snowage_rhos(isnw_rhos))
snowage_rhos = snowage_rhos_in
else