/[MITgcm]/MITgcm/model/src/freeze_interior.F
ViewVC logotype

Annotation of /MITgcm/model/src/freeze_interior.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Thu Apr 21 15:31:04 2011 UTC (13 years, 1 month ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint62z, checkpoint62x, checkpoint62w, checkpoint62y, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c
Changes since 1.1: +2 -2 lines
adding freeze_interior.f to model_ad_diff.list

1 dimitri 1.2 C $Header: /u/gcmpack/MITgcm/model/src/freeze_interior.F,v 1.1 2011/04/20 13:45:14 dimitri Exp $
2 dimitri 1.1 C $Name: $
3    
4     #include "PACKAGES_CONFIG.h"
5     #include "CPP_OPTIONS.h"
6    
7     CBOP
8     C !ROUTINE: FREEZE_INTERIOR
9     C !INTERFACE:
10     SUBROUTINE FREEZE_INTERIOR( myTime, myIter, myThid )
11     C !DESCRIPTION: \bv
12     C *==========================================================*
13     C | S/R FREEZE_INTERIOR
14     C | o Check water temperature and if colder than freezing
15     C | point bring excess negative heat to the surface.
16     C *==========================================================*
17     C \ev
18    
19     C !USES:
20     IMPLICIT NONE
21     C == Global variables ==
22     #include "SIZE.h"
23     #include "EEPARAMS.h"
24     #include "PARAMS.h"
25     #include "DYNVARS.h"
26     #include "GRID.h"
27     #include "FFIELDS.h"
28    
29     C !INPUT/OUTPUT PARAMETERS:
30     C == Routine Arguments ==
31     C myTime - Current time in simulation
32     C myIter - Current iteration number in simulation
33     C myThid :: Thread no. that called this routine.
34     _RL myTime
35     INTEGER myIter
36     INTEGER myThid
37    
38     C !LOCAL VARIABLES:
39     C == Local variables ==
40     C Tfreezing :: Freezing threshold temperature.
41     INTEGER bi,bj,i,j,k,kTop
42     _RL Tfreezing, Tresid, pLoc, sLoc, tLoc
43 dimitri 1.2 _RL a0, a1, a2, b
44 dimitri 1.1 PARAMETER( a0 = -0.0575 _d 0 )
45     PARAMETER( a1 = 1.710523 _d -3 )
46     PARAMETER( a2 = -2.154996 _d -4 )
47     PARAMETER( b = -7.53 _d -4 )
48    
49     _RL SW_TEMP
50     EXTERNAL SW_TEMP
51    
52     CEOP
53    
54     C Check for water below freezing point.
55     DO bj=myByLo(myThid),myByHi(myThid)
56     DO bi=myBxLo(myThid),myBxHi(myThid)
57     DO k = 2, Nr
58     DO j=1-OLy,sNy+OLy
59     DO i=1-OLx,sNx+OLx
60     IF ( maskC(i,j,k-1,bi,bj) .NE. 0. _d 0 .AND.
61     & maskC(i,j,k, bi,bj) .NE. 0. _d 0 ) THEN
62    
63     pLoc = ABS(RC(k))
64     sLoc = MAX(salt(i,j,k,bi,bj), 0. _d 0)
65     tLoc = SW_TEMP(sLoc,theta(i,j,k,bi,bj),pLoc,0. _d 0)
66    
67     C Freezing point of seawater
68     C REFERENCE: UNESCO TECH. PAPERS IN THE MARINE SCIENCE NO. 28. 1978
69     C EIGHTH REPORT JPOTS
70     C ANNEX 6 FREEZING POINT OF SEAWATER F.J. MILLERO PP.29-35.
71     C
72     C UNITS:
73     C PRESSURE P DECIBARS
74     C SALINITY S PSS-78
75     C TEMPERATURE TF DEGREES CELSIUS
76     C FREEZING PT.
77     C************************************************************
78     C CHECKVALUE: TF= -2.588567 DEG. C FOR S=40.0, P=500. DECIBARS
79     Tfreezing = (a0 + a1*sqrt(sLoc) + a2*sLoc) * sLoc + b*pLoc
80    
81     IF (tLoc .LT. Tfreezing) THEN
82     C Move the negative heat to surface level.
83     kTop = kSurfC(i,j,bi,bj)
84     Tresid = Tfreezing - tloc
85     theta(i,j,k,bi,bj) = theta(i,j,k,bi,bj) + Tresid
86     theta(i,j,kTop,bi,bj) = theta(i,j,kTop,bi,bj) -
87     & Tresid * hFacC(i,j,k,bi,bj) * dRf(k) *
88     & recip_hFacC(i,j,kTop,bi,bj) * recip_drF(kTop)
89     ENDIF
90    
91     ENDIF
92     ENDDO
93     ENDDO
94     ENDDO
95     ENDDO
96     ENDDO
97    
98     RETURN
99     END

  ViewVC Help
Powered by ViewVC 1.1.22