1 |
#include "CPP_OPTIONS.h" |
2 |
|
3 |
C !ROUTINE: ICE_START |
4 |
C !INTERFACE: |
5 |
SUBROUTINE ICE_START(i,j, bi, bj, myThid, |
6 |
& esurp,fresh,fsalt,Tf, compact ) |
7 |
C *==========================================================* |
8 |
C | S/R ICE_START |
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 compact ! fraction of grid area covered in ice |
39 |
|
40 |
C !LOCAL VARIABLES: |
41 |
C == Local variables == |
42 |
INTEGER i,j |
43 |
_RL qi0av, hi0new |
44 |
|
45 |
#ifdef ALLOW_THERM_SEAICE |
46 |
|
47 |
C start ice |
48 |
compact=0.d0 |
49 |
qi0av=-rhoi*Lfresh |
50 |
hi0new=-esurp*deltaTtracer/qi0av |
51 |
c redistribute ice over portion of cell if too thin |
52 |
if (hi0new.lt.hicemin) then |
53 |
compact=hi0new/hicemin |
54 |
iceHeight(i,j,bi,bj)=hicemin |
55 |
else |
56 |
compact=1.d0 |
57 |
iceHeight(i,j,bi,bj)=hi0new |
58 |
endif |
59 |
c theta(i,j,1,bi,bj)=Tf |
60 |
Tsrf(i,j,bi,bj)=Tf |
61 |
Tice1(i,j,bi,bj)=Tf |
62 |
Tice2(i,j,bi,bj)=Tf |
63 |
cQQ Qice1(i,j,bi,bj)=qi0av |
64 |
cQQ Qice2(i,j,bi,bj)=qi0av |
65 |
Qice1(i,j,bi,bj) = -cpwater*Tmlt1 + |
66 |
& cpice *(Tmlt1-Tice1(i,j,bi,bj)) + |
67 |
$ Lfresh*(1.-Tmlt1/Tice1(i,j,bi,bj)) |
68 |
Qice2(i,j,bi,bj) = -cpice *Tice2(i,j,bi,bj) + Lfresh |
69 |
fresh=-(rhoi*iceheight(i,j,bi,bj))/deltaTtracer |
70 |
cQQ fsalt=-(rhoi*iceheight(i,j,bi,bj)*saltice ) |
71 |
cQQ & *0.001/deltaTtracer |
72 |
fsalt=-(rhoi*iceheight(i,j,bi,bj)*saltice ) |
73 |
& /35/deltaTtracer |
74 |
iceMask(i,j,bi,bj)=compact |
75 |
cBB |
76 |
cBB print*,'**** ice start **** i,j', i,j |
77 |
cBB print*,'qi1, qi2',Qice1(i,j,bi,bj), Qice2(i,j,bi,bj), Qi0av |
78 |
cBB print*,'hi, fresh',hi0new, fresh |
79 |
cBB print*,'*******************' |
80 |
cBB print*,' ' |
81 |
#endif |
82 |
|
83 |
RETURN |
84 |
END |