1 |
cheisey |
1.1 |
#include "CPP_OPTIONS.h" |
2 |
|
|
|
3 |
|
|
C !ROUTINE: ICE_FREEZE |
4 |
|
|
C !INTERFACE: |
5 |
|
|
SUBROUTINE ICE_FREEZE( bi, bj, iMin, iMax, jMin, jMax, |
6 |
|
|
I myThid ) |
7 |
|
|
C !DESCRIPTION: \bv |
8 |
|
|
C *==========================================================* |
9 |
|
|
C | S/R FREEZE |
10 |
|
|
C | o Check water temperature and limit range of temperature |
11 |
|
|
C | appropriately. |
12 |
|
|
C *==========================================================* |
13 |
|
|
C \ev |
14 |
|
|
|
15 |
|
|
C !USES: |
16 |
|
|
IMPLICIT NONE |
17 |
|
|
C == Global variables == |
18 |
|
|
#include "SIZE.h" |
19 |
|
|
#include "DYNVARS.h" |
20 |
|
|
#include "EEPARAMS.h" |
21 |
|
|
#include "PARAMS.h" |
22 |
|
|
#include "GRID.h" |
23 |
|
|
#include "FFIELDS.h" |
24 |
|
|
#include "ICE.h" |
25 |
|
|
#include "BULKF_ICE_CONSTANTS.h" |
26 |
|
|
#include "BULKF.h" |
27 |
|
|
|
28 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
29 |
|
|
C == Routine Arguments == |
30 |
|
|
INTEGER bi,bj,iMin,iMax,jMin,jMax |
31 |
|
|
INTEGER myThid |
32 |
|
|
|
33 |
|
|
C !LOCAL VARIABLES: |
34 |
|
|
C == Local variables == |
35 |
|
|
C Tfreezing :: Freezing threshold temperature. |
36 |
|
|
INTEGER i,j |
37 |
|
|
_RL Tf |
38 |
|
|
_RL frzmlt, ffresh,fsalt, compact |
39 |
|
|
_RL cphm |
40 |
|
|
|
41 |
|
|
C Check for water that should have frozen |
42 |
|
|
DO j=jMin,jMax |
43 |
|
|
DO i=iMin,iMax |
44 |
|
|
if (hFacC(i,j,1,bi,bj).gt.0.d0) then |
45 |
|
|
Tf=-mu_Tf*salt(i,j,1,bi,bj) |
46 |
|
|
IF (iceMask(i,j,bi,bj).eq.0.and. |
47 |
|
|
& gT(i,j,1,bi,bj) .LT. Tf) THEN |
48 |
|
|
fsalt=0.D0 |
49 |
|
|
ffresh=0.D0 |
50 |
|
|
compact=0.d0 |
51 |
|
|
cphm = cpwater*rhosw*drF(1)*hFacC(i,j,1,bi,bj) |
52 |
|
|
frzmlt = (Tf-gT(i,j,1,bi,bj))*cphm/deltaTtracer |
53 |
|
|
call ice_start(i,j,bi, bj, myThid, |
54 |
|
|
& frzmlt,ffresh,fsalt,Tf, compact) |
55 |
|
|
gT(i,j,1,bi,bj)=Tf |
56 |
|
|
cQQ problem here |
57 |
|
|
c if after calc_gs |
58 |
|
|
c gS(i,j,1,bi,bj)=gS(i,j,1,bi,bj)+ |
59 |
|
|
c & (ffresh-fsalt)/RHONIL |
60 |
|
|
c & *recip_dRf(1)*35.*deltaTtracer |
61 |
|
|
c if before calc_gs |
62 |
|
|
c Freshwater flux: |
63 |
|
|
ffresh=-(ffresh-fsalt)/RHONIL |
64 |
|
|
surfaceTendencyS(i,j,bi,bj) = |
65 |
|
|
& surfaceTendencyS(i,j,bi,bj) + |
66 |
|
|
& (ffresh)*recip_dRf(1)*35. |
67 |
|
|
ENDIF |
68 |
|
|
ENDIF |
69 |
|
|
ENDDO |
70 |
|
|
ENDDO |
71 |
|
|
|
72 |
|
|
RETURN |
73 |
|
|
END |
74 |
|
|
|