1 |
#include "CPP_OPTIONS.h" |
2 |
|
3 |
C !ROUTINE: ICE_EXTRASTART |
4 |
C !INTERFACE: |
5 |
SUBROUTINE ICE_EXTRASTART(i,j, bi, bj, myThid, qleft, |
6 |
& esurp,fresh,fsalt,Tf,Ta, compact ) |
7 |
C *==========================================================* |
8 |
C | S/R ICE_EXTRASTART |
9 |
C | o Check water temperature and start ice layer if |
10 |
C | appropriate. |
11 |
C *==========================================================* |
12 |
C \ev |
13 |
|
14 |
C !USES: |
15 |
IMPLICIT NONE |
16 |
C == Global variables == |
17 |
#include "SIZE.h" |
18 |
#include "DYNVARS.h" |
19 |
#include "EEPARAMS.h" |
20 |
#include "PARAMS.h" |
21 |
#include "GRID.h" |
22 |
cswdice -- add --- |
23 |
#ifdef ALLOW_THERM_SEAICE |
24 |
#include "ICE.h" |
25 |
#include "ICE_DIAGS.h" |
26 |
#include "BULKF_ICE_CONSTANTS.h" |
27 |
#endif |
28 |
cswdice -- end add --- |
29 |
|
30 |
C !INPUT/OUTPUT PARAMETERS: |
31 |
C == Routine Arguments == |
32 |
INTEGER bi,bj |
33 |
INTEGER myThid |
34 |
_RL esurp ! energy available for freezing |
35 |
_RL fresh ! fresh water flux |
36 |
_RL fsalt ! salt water flux |
37 |
_RL Tf ! freezing temperature |
38 |
_RL Ta ! air temperature |
39 |
_RL compact ! fraction of grid area covered in ice |
40 |
_RL qleft |
41 |
|
42 |
C !LOCAL VARIABLES: |
43 |
C == Local variables == |
44 |
INTEGER i,j |
45 |
_RL qi0av, hi0new,compact2, hice_old |
46 |
_RL qicen (2) ! ice enthalpy (J m-3) |
47 |
_RL hlyr ! individual ice layer thickness (m) |
48 |
_RL hnew(2) ! new ice layer thickness (m) |
49 |
_RL hi ! ice height |
50 |
_RL hs ! snow height |
51 |
|
52 |
#ifdef ALLOW_THERM_SEAICE |
53 |
|
54 |
hice_old=iceHeight(i,j,bi,bj) |
55 |
hi=iceHeight(i,j,bi,bj) |
56 |
hs=snowHeight(i,j,bi,bj) |
57 |
qicen(1)=Qice1(i,j,bi,bj) |
58 |
qicen(2)=Qice2(i,j,bi,bj) |
59 |
hnew(1)=0.d0 |
60 |
hnew(2)=0.d0 |
61 |
C start ice |
62 |
qi0av=-rhoi*Lfresh |
63 |
hi0new=-esurp*deltaTtracer/qi0av |
64 |
c redistribute ice over portion of cell if too thin |
65 |
if (hi0new.lt.hicemin) then |
66 |
compact2=(1.d0-compact)*hi0new/hicemin |
67 |
hi0new=hicemin |
68 |
else |
69 |
compact2=(1.d0-compact) |
70 |
endif |
71 |
if ((compact+compact2).gt.1.d0) then |
72 |
print*,'QQQQQQQQQ ice mask > 1, ice_extrastart' |
73 |
stop |
74 |
endif |
75 |
hi=(compact2*hi0new+compact*hi)/ |
76 |
& (compact+compact2) |
77 |
hs=(compact2*0.d0+compact*hs)/ |
78 |
& (compact+compact2) |
79 |
hlyr=hi/2 |
80 |
hnew(2)=hi-hice_old |
81 |
call new_layers_winton(hs,hi,hlyr,hnew,qicen) |
82 |
fresh=(compact2*(-(rhoi*hi0new)/deltaTtracer)+ |
83 |
& compact*fresh)/(compact+compact2) |
84 |
fsalt=(compact2*(-(rhoi*hi0new*saltice ) |
85 |
& /35.d0/deltaTtracer) + compact*fsalt)/ |
86 |
& (compact+compact2) |
87 |
qleft=(-compact2*esurp+compact*qleft)/(compact+compact2) |
88 |
iceMask(i,j,bi,bj)=compact+compact2 |
89 |
iceHeight(i,j,bi,bj)=hi |
90 |
snowHeight(i,j,bi,bj)=hs |
91 |
Qice1(i,j,bi,bj)=qicen(1) |
92 |
Qice2(i,j,bi,bj)=qicen(2) |
93 |
cBB |
94 |
cBB print*,'**** ice start **** i,j', i,j |
95 |
cBB print*,'qi1, qi2',Qice1(i,j,bi,bj), Qice2(i,j,bi,bj), Qi0av |
96 |
cBB print*,'hi, fresh',hi0new, fresh |
97 |
cBB print*,'*******************' |
98 |
cBB print*,' ' |
99 |
#endif |
100 |
|
101 |
RETURN |
102 |
END |