2
3
4
5
6
7
8
9
10
11
12
13
20
21 implicit none
22
23
24
25 logical, intent(in) :: Lwrite
26
27 integer, intent(in) :: model, inp, out
28
29
30
31 integer :: Npts, Nval, ng, status
32#ifdef AVERAGES
33 integer :: nf, ns
34#endif
35 integer :: tile, LBi, UBi, LBj, UBj
36
37 real(r8) :: Rvalue(1)
38 real(r8), dimension(200) :: Rval
39
40 character (len=40) :: KeyWord
41 character (len=256) :: line
42 character (len=256), dimension(200) :: Cval
43
44 character (len=*), parameter :: MyFile = &
45 & __FILE__
46
47
48
49
50
51#ifdef DISTRIBUTE
53#else
54 tile=0
55#endif
61 END DO
62
64
65
66
67
68
69 DO WHILE (.true.)
70 READ (inp,'(a)',err=10,END=20) line
72 IF (status.gt.0) THEN
73 SELECT CASE (trim(keyword))
74 CASE ('nEVP')
76 CASE ('AirRho')
78 CASE ('IceRho')
80 CASE ('SnowDryRho')
82 CASE ('SnowWetRho')
84 CASE ('Cd_ai')
86 CASE ('Cd_io')
88 CASE ('Astrength')
90 CASE ('zetaMin')
92 CASE ('zetaMax')
94 CASE ('ellip_sq')
96 CASE ('min_ai')
98 CASE ('max_ai')
100 CASE ('min_hi')
102 CASE ('max_hmelt')
104 CASE ('stressAng')
108 END DO
109 CASE ('ice_emiss')
110 npts=
load_r(nval, rval, 1, rvalue)
112 CASE ('spec_heat_air')
113 npts=
load_r(nval, rval, 1, rvalue)
115 CASE ('trans_coeff')
116 npts=
load_r(nval, rval, 1, rvalue)
118 CASE ('sublimation')
119 npts=
load_r(nval, rval, 1, rvalue)
121 CASE ('Hout(idUice)')
123 IF (
master)
WRITE (out,80)
'idUice'
125 RETURN
126 END IF
128 CASE ('Hout(idVice)')
130 IF (
master)
WRITE (out,80)
'idVice'
132 RETURN
133 END IF
135 CASE ('Hout(idUiER)')
137 IF (
master)
WRITE (out,80)
'idUiER'
139 RETURN
140 END IF
142 CASE ('Hout(idViNR)')
144 IF (
master)
WRITE (out,80)
'idViNR'
146 RETURN
147 END IF
149 CASE ('Hout(idAice)')
151 IF (
master)
WRITE (out,80)
'idAice'
153 RETURN
154 END IF
156 CASE ('Hout(idIage)')
158 IF (
master)
WRITE (out,80)
'idIage'
160 RETURN
161 END IF
163 CASE ('Hout(idHice)')
165 IF (
master)
WRITE (out,80)
'idHice'
167 RETURN
168 END IF
170 CASE ('Hout(idHmel)')
172 IF (
master)
WRITE (out,80)
'idHmel'
174 RETURN
175 END IF
177 CASE ('Hout(idHsno)')
179 IF (
master)
WRITE (out,80)
'idHsno'
181 RETURN
182 END IF
184 CASE ('Hout(idTice)')
186 IF (
master)
WRITE (out,80)
'idTice'
188 RETURN
189 END IF
191 CASE ('Hout(idISxx)')
193 IF (
master)
WRITE (out,80)
'idISxx'
195 RETURN
196 END IF
198 CASE ('Hout(idISxy)')
200 IF (
master)
WRITE (out,80)
'idISxy'
202 RETURN
203 END IF
205 CASE ('Hout(idISyy)')
207 IF (
master)
WRITE (out,80)
'idISyy'
209 RETURN
210 END IF
212 CASE ('Hout(idIsst)')
214 IF (
master)
WRITE (out,80)
'idIsst'
216 RETURN
217 END IF
219 CASE ('Hout(idIOmf)')
221 IF (
master)
WRITE (out,80)
'idIOmf'
223 RETURN
224 END IF
226 CASE ('Hout(idIOfv)')
228 IF (
master)
WRITE (out,80)
'idIOfv'
230 RETURN
231 END IF
233 CASE ('Hout(idIOmt)')
235 IF (
master)
WRITE (out,80)
'idIOmt'
237 RETURN
238 END IF
240 CASE ('Hout(idS0mk)')
242 IF (
master)
WRITE (out,80)
'idS0mk'
244 RETURN
245 END IF
247 CASE ('Hout(idT0mk)')
249 IF (
master)
WRITE (out,80)
'idT0mk'
251 RETURN
252 END IF
254 CASE ('Hout(idWdiv)')
256 IF (
master)
WRITE (out,80)
'idWdiv'
258 RETURN
259 END IF
261 CASE ('Hout(idW_fr)')
263 IF (
master)
WRITE (out,80)
'idW_fr'
265 RETURN
266 END IF
268 CASE ('Hout(idW_ai)')
270 IF (
master)
WRITE (out,80)
'idW_ai'
272 RETURN
273 END IF
275 CASE ('Hout(idW_ao)')
277 IF (
master)
WRITE (out,80)
'idW_ao'
279 RETURN
280 END IF
282 CASE ('Hout(idW_io)')
284 IF (
master)
WRITE (out,80)
'idW_io'
286 RETURN
287 END IF
289 CASE ('Hout(idW_ro)')
291 IF (
master)
WRITE (out,80)
'idW_ro'
293 RETURN
294 END IF
296 CASE ('Qout(idUice)')
298 CASE ('Qout(idVice)')
300 CASE ('Qout(idUiER)')
302 CASE ('Qout(idViNR)')
304 CASE ('Qout(idAice)')
306 CASE ('Qout(idIage)')
308 CASE ('Qout(idHice)')
310 CASE ('Qout(idHmel)')
312 CASE ('Qout(idHsno)')
314 CASE ('Qout(idTice)')
316 CASE ('Qout(idISxx)')
318 CASE ('Qout(idISxy)')
320 CASE ('Qout(idISyy)')
322 CASE ('Qout(idIsst)')
324 CASE ('Qout(idIOmf)')
326 CASE ('Qout(idIOfv)')
328 CASE ('Qout(idIOmt)')
330 CASE ('Qout(idS0mk)')
332 CASE ('Qout(idT0mk)')
334 CASE ('Qout(idWdiv)')
336 CASE ('Qout(idW_fr)')
338 CASE ('Qout(idW_ai)')
340 CASE ('Qout(idW_ao)')
342 CASE ('Qout(idW_io)')
344 CASE ('Qout(idW_ro)')
346#ifdef AVERAGES
347 CASE ('Aout(idUice)')
349 CASE ('Aout(idVice)')
351 CASE ('Aout(idUiER)')
353 CASE ('Aout(idViNR)')
355 CASE ('Aout(idAice)')
357 CASE ('Aout(idHice)')
359 CASE ('Aout(idHmel)')
361 CASE ('Aout(idHsno)')
363 CASE ('Aout(idTice)')
365 CASE ('Aout(idISxx)')
367 CASE ('Aout(idISxy)')
369 CASE ('Aout(idISyy)')
371 CASE ('Aout(idIsst)')
373 CASE ('Aout(idIOmf)')
375 CASE ('Aout(idIOfv)')
377 CASE ('Aout(idIOmt)')
379 CASE ('Aout(idIage)')
381 CASE ('Aout(idS0mk)')
383 CASE ('Aout(idT0mk)')
385 CASE ('Aout(idWdiv)')
387 CASE ('Aout(idW_fr)')
389 CASE ('Aout(idW_ai)')
391 CASE ('Aout(idW_ao)')
393 CASE ('Aout(idW_io)')
395 CASE ('Aout(idW_ro)')
397#endif
398 END SELECT
399 END IF
400 END DO
401 10
IF (
master)
WRITE (out,30) line
403 RETURN
404 20 CLOSE (inp)
405
406
407
410 END DO
411
412
413
414
415
416 IF (lwrite) THEN
418 WRITE (out,40) ng
419 WRITE (out,50)
nevp(ng),
'nEVP', &
420 & 'Number of elastic steps per plastic step in EVP.'
421 WRITE (out,60)
airrho(ng),
'AirRho', &
422 & 'Air density (kg/m3).'
423 WRITE (out,60)
icerho(ng),
'IceRho', &
424 & 'Density of sea ice (kg/m3).'
425 WRITE (out,60)
snowdryrho(ng),
'SnowDryRho', &
426 & 'Dry snow density (kg/m3).'
427 WRITE (out,60)
snowwetrho(ng),
'SnowWetRho', &
428 & 'Wet snow density (kg/m3).'
429 WRITE (out,60)
cd_ai(ng),
'Cd_ai', &
430 & 'Air-Ice drag coefficient (nondimensional).'
431 WRITE (out,60)
cd_io(ng),
'Cd_io', &
432 & 'Ice-Ocean drag coefficient (nondimensional).'
433 WRITE (out,60)
astrength(ng),
'Astrength', &
434 & 'Ice strength exponential weighting (nondimensional).'
435 WRITE (out,60)
zetamin(ng),
'zetaMin', &
436 & 'Minimum ice shear strength (N/m2) limiter.'
437 WRITE (out,60)
zetamax(ng),
'zetaMax', &
438 & 'Maximum ice shear strength (N/m2) limiter.'
439 WRITE (out,60)
ellip_sq(ng),
'ellip_sq', &
440 & 'Ellipticity squared of yield curve (nondimensional).'
441 WRITE (out,60)
min_ai(ng),
'min_ai', &
442 & 'Minimum ice concentration (nondimensional) limiter.'
443 WRITE (out,60)
max_ai(ng),
'max_ai', &
444 & 'Maximum ice concentration (nondimensional) limiter.'
445 WRITE (out,60)
min_hi(ng),
'min_hi', &
446 & 'Minimum average ice thickness (m) limiter.'
447 WRITE (out,60)
max_hmelt(ng),
'max_hmelt', &
448 & 'Maximum surface melt water thickness (m) limiter.'
450 & 'Turning angle for ice-water drag (degrees).'
452 & 'Ice emissivity (nondimensional).'
454 & 'Specific heat of air (J/kg/K).'
456 & 'Heat transfer coefficient (nondimensional).'
458 & 'Latent heat of sublimation (J/kg).'
459
461 & 'Hout(idUice)', &
462 & 'Write out ice U-velocity component.'
464 & 'Hout(idVice)', &
465 & 'Write out ice V-velocity component.'
467 & 'Hout(idUiER)', &
468 & 'Write out ice Eastward velocity component at RHO-points.'
470 & 'Hout(idViNR)', &
471 & 'Write out ice Northward velocity component at RHO-points.'
473 & 'Hout(idAice)', &
474 & 'Write out ice concentration (fractional area coverage).'
476 & 'Hout(idIage)', &
477 & 'Write out age of ice.'
479 & 'Hout(idHice)', &
480 & 'Write out average ice thickness (ice mass per area).'
482 & 'Hout(idHmel)', &
483 & 'Write out melt pond water thickness on ice.'
485 & 'Hout(idHsno)', &
486 & 'Write out average snow coverage thickness.'
488 & 'Hout(idTice)', &
489 & 'Write out interior ice temperature.'
491 & 'Hout(idISxx)', &
492 & 'Write out internal ice stress tensor, xx-component.'
494 & 'Hout(idISxy)', &
495 & 'Write out internal ice stress tensor, xy-component.'
497 & 'Hout(idISyy)', &
498 & 'Write out internal ice stress tensor, yy-component.'
500 & 'Hout(idIsst)', &
501 & 'Write out ice/snow surface temperature.'
503 & 'Hout(idIOmf)', &
504 & 'Write out ice-ocean mass flux.'
506 & 'Hout(idIOfv)', &
507 & 'Write out ice-ocean friction velocity.'
509 & 'Hout(idIOmt)', &
510 & 'Write out ice-ocean momentum transfer coefficient.'
512 & 'Hout(idS0mk)', &
513 & 'Write out salinity of molecular sublayer under ice.'
515 & 'Hout(idT0mk)', &
516 & 'Write out temperature of molecular sublayer under ice.'
518 & 'Hout(idWdiv)', &
519 & 'Write out rate of ice divergence.'
521 & 'Hout(idW_fr)', &
522 & 'Write out rate of ice accretion by frazil ice growth.'
524 & 'Hout(idW_ai)', &
525 & 'Write out rate of melt/freeze at air/ice interface.'
527 & 'Hout(idW_ao)', &
528 & 'Write out rate of melt/freeze at air/ocean interface.'
530 & 'Hout(idW_io)', &
531 & 'Write out rate of melt/freeze at ice/ocean interface.'
533 & 'Hout(idW_ro)', &
534 & 'Write out rate of melt/freeze runoff into ocean.'
535
537 & 'Qout(idUice)', &
538 & 'Write out ice U-velocity component.'
540 & 'Qout(idVice)', &
541 & 'Write out ice V-velocity component.'
543 & 'Qout(idUiER)', &
544 & 'Write out ice Eastward velocity component at RHO-points.'
546 & 'Qout(idViNR)', &
547 & 'Write out ice Northward velocity component at RHO-points.'
549 & 'Qout(idAice)', &
550 & 'Write out ice concentration (fractional area coverage).'
552 & 'Qout(idIage)', &
553 & 'Write out age of ice.'
555 & 'Qout(idHice)', &
556 & 'Write out average ice thickness (ice mass per area).'
558 & 'Qout(idHmel)', &
559 & 'Write out surface melt water thickness on ice.'
561 & 'Qout(idHsno)', &
562 & 'Write out average snow coverage thickness.'
564 & 'Qout(idTice)', &
565 & 'Write out interior ice temperature.'
567 & 'Qout(idISxx)', &
568 & 'Write out internal ice stress tensor, xx-component.'
570 & 'Qout(idISxy)', &
571 & 'Write out internal ice stress tensor, xy-component.'
573 & 'Qout(idISyy)', &
574 & 'Write out internal ice stress tensor, yy-component.'
576 & 'Qout(idIsst)', &
577 & 'Write out ice/snow surface temperature.'
579 & 'Qout(idIOmf)', &
580 & 'Write out ice-ocean mass flux.'
582 & 'Qout(idIOfv)', &
583 & 'Write out ice-ocean friction velocity.'
585 & 'Qout(idIOmt)', &
586 & 'Write out ice-ocean momentum transfer coefficient.'
588 & 'Qout(idS0mk)', &
589 & 'Write out salinity of molecular sublayer under ice.'
591 & 'Qout(idT0mk)', &
592 & 'Write out temperature of molecular sublayer under ice.'
594 & 'Qout(idWdiv)', &
595 & 'Write out rate of ice divergence.'
597 & 'Qout(idW_fr)', &
598 & 'Write out rate of ice accretion by frazil ice growth.'
600 & 'Qout(idW_ai)', &
601 & 'Write out rate of melt/freeze at air/ice interface.'
603 & 'Qout(idW_ao)', &
604 & 'Write out rate of melt/freeze at air/ocean interface.'
606 & 'Qout(idW_io)', &
607 & 'Write out rate of melt/freeze at ice/ocean interface.'
609 & 'Qout(idW_ro)', &
610 & 'Write out rate of melt/freeze runoff into ocean.'
611#ifdef AVERAGES
612
614 & 'Aout(idUice)', &
615 & 'Write out ice U-velocity component.'
617 & 'Aout(idVice)', &
618 & 'Write out ice V-velocity component.'
620 & 'Aout(idUiER)', &
621 & 'Write out ice Eastward velocity component at RHO-points.'
623 & 'Aout(idViNR)', &
624 & 'Write out ice Northward velocity component at RHO-points.'
626 & 'Aout(idAice)', &
627 & 'Write out ice concentration (fractional area coverage).'
629 & 'Aout(idIage)', &
630 & 'Write out age of ice.'
632 & 'Aout(idHice)', &
633 & 'Write out average ice thickness (ice mass per area).'
635 & 'Aout(idHmel)', &
636 & 'Write out surface melt water thickness on ice.'
638 & 'Aout(idHsno)', &
639 & 'Write out average snow coverage thickness.'
641 & 'Aout(idTice)', &
642 & 'Write out interior ice temperature.'
644 & 'Aout(idISxx)', &
645 & 'Write out internal ice stress tensor, xx-component.'
647 & 'Aout(idISxy)', &
648 & 'Write out internal ice stress tensor, xy-component.'
650 & 'Aout(idISyy)', &
651 & 'Write out internal ice stress tensor, yy-component.'
653 & 'Aout(idIsst)', &
654 & 'Write out ice/snow surface temperature.'
656 & 'Aout(idIOmf)', &
657 & 'Write out ice-ocean mass flux.'
659 & 'Aout(idIOfv)', &
660 & 'Write out ice-ocean friction velocity.'
662 & 'Aout(idIOmt)', &
663 & 'Write out ice-ocean momentum transfer coefficient.'
665 & 'Aout(idS0mk)', &
666 & 'Write out salinity of molecular sublayer under ice.'
668 & 'Aout(idT0mk)', &
669 & 'Write out temperature of molecular sublayer under ice.'
671 & 'Aout(idWdiv)', &
672 & 'Write out rate of ice divergence.'
674 & 'Aout(idW_fr)', &
675 & 'Write out rate of ice accretion by frazil ice growth.'
677 & 'Aout(idW_ai)', &
678 & 'Write out rate of melt/freeze at air/ice interface.'
680 & 'Aout(idW_ao)', &
681 & 'Write out rate of melt/freeze at air/ocean interface.'
683 & 'Aout(idW_io)', &
684 & 'Write out rate of melt/freeze at ice/ocean interface.'
686 & 'Aout(idW_ro)', &
687 & 'Write out rate of melt/freeze runoff into ocean.'
688#endif
689 END DO
690 END IF
691
692#ifdef AVERAGES
693
694
695
696
697
700
703 IF (
ifice(nf).gt.0)
THEN
706 END IF
707 END IF
708 END DO
709
711 IF (
isice(ns).gt.0)
THEN
714 END IF
715 END IF
716 END DO
717 END DO
718#endif
719
720 30 FORMAT (/,' READ_IcePar - Error while processing line: ',/,a)
721 40 FORMAT (/,/,' Ice Parameters, Grid: ',i2.2, &
722 & /, ' ========================',/)
723 50 FORMAT (1x,i10,2x,a,t32,a)
724 60 FORMAT (1p,e11.4,2x,a,t32,a)
725 70 FORMAT (10x,l1,2x,a,t32,a)
726 80 FORMAT (/,' READ_IcePar - variable index not yet loaded, ', a)
727
728 RETURN
integer function decode_line(line_text, keyword, nval, cval, rval)
integer, dimension(:), allocatable dtice
real(r8), dimension(:), allocatable min_hi
real(r8), dimension(:), allocatable ellip_sq
integer, dimension(nicef) ifice
real(r8), dimension(:), allocatable airrho
real(r8), dimension(:), allocatable icerho
real(r8), dimension(:), allocatable zetamax
real(r8), dimension(:), allocatable zetamin
real(r8), dimension(:), allocatable snowwetrho
integer, dimension(:), allocatable nevp
real(r8), dimension(:), allocatable snowdryrho
real(r8), dimension(:), allocatable max_hmelt
real(r8), dimension(:), allocatable min_ai
integer, dimension(nices) isice
real(r8), dimension(:), allocatable max_ai
real(r8), dimension(:), allocatable cd_io
real(r8), dimension(:), allocatable astrength
subroutine, public allocate_ice(ng, lbi, ubi, lbj, ubj, ice_kernel)
logical, dimension(:,:), allocatable licesavg
logical, dimension(:,:), allocatable licefavg
real(r8), dimension(:), allocatable stressang
real(r8), dimension(:), allocatable cd_ai
logical, dimension(:,:), allocatable hout
logical, dimension(:,:), allocatable qout
logical, dimension(:,:), allocatable aout
type(t_bounds), dimension(:), allocatable bounds
real(dp), dimension(:), allocatable dt
real(dp), parameter deg2rad
real(dp), parameter rad2deg