/[MITgcm]/MITgcm/pkg/thsice/thsice_get_ocean.F
ViewVC logotype

Contents of /MITgcm/pkg/thsice/thsice_get_ocean.F

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


Revision 1.2 - (show annotations) (download)
Mon Apr 1 18:18:15 2013 UTC (11 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64g
Changes since 1.1: +31 -4 lines
account for ice velocity (ocean relative velocity) in turbulent heat flux
at the base of the ice.

1 C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_get_ocean.F,v 1.1 2013/03/30 18:38:50 jmc Exp $
2 C $Name: $
3
4 #include "THSICE_OPTIONS.h"
5 #ifdef ALLOW_SEAICE
6 # include "SEAICE_OPTIONS.h"
7 #endif /* ALLOW_SEAICE */
8
9 CBOP
10 C !ROUTINE: THSICE_GET_OCEAN
11 C !INTERFACE:
12 SUBROUTINE THSICE_GET_OCEAN(
13 I bi, bj, myTime, myIter, myThid )
14 C !DESCRIPTION: \bv
15 C *==========================================================*
16 C | S/R THSICE_GET_OCEAN
17 C | o Get mixed layer properties from ocean main
18 C | variables (surface level) and store them
19 C | into this package local mixed-layer arrays
20 C *==========================================================*
21
22 C !USES:
23 IMPLICIT NONE
24
25 C === Global variables ===
26 #include "SIZE.h"
27 #include "EEPARAMS.h"
28 #include "PARAMS.h"
29 #include "GRID.h"
30 #include "SURFACE.h"
31 #include "DYNVARS.h"
32 c#include "THSICE_PARAMS.h"
33 #include "THSICE_SIZE.h"
34 #include "THSICE_VARS.h"
35 #ifdef ALLOW_SEAICE
36 # include "SEAICE_SIZE.h"
37 # include "SEAICE.h"
38 #endif /* ALLOW_SEAICE */
39
40 C !INPUT/OUTPUT PARAMETERS:
41 C === Routine arguments ===
42 C bi, bj :: Tile indices
43 C myTime :: Current time in simulation (s)
44 C myIter :: Current iteration number
45 C myThid :: My Thread Id. number
46 INTEGER bi, bj
47 _RL myTime
48 INTEGER myIter
49 INTEGER myThid
50 CEOP
51
52 #ifdef ALLOW_THSICE
53 C !LOCAL VARIABLES:
54 C === Local variables ===
55 INTEGER i,j
56 INTEGER ks
57 #ifdef ALLOW_SEAICE
58 _RL uRel1, uRel2, vRel1, vRel2
59 #endif /* ALLOW_SEAICE */
60
61 C-- Mixed layer thickness: take the 1rst layer
62 ks = 1
63 #ifdef NONLIN_FRSURF
64 IF ( staggerTimeStep .AND. nonlinFreeSurf.GT.0 ) THEN
65 IF ( select_rStar.GT.0 ) THEN
66 DO j=1-OLy,sNy+OLy
67 DO i=1-OLx,sNx+OLx
68 hOceMxL(i,j,bi,bj) = drF(ks)*h0FacC(i,j,ks,bi,bj)
69 & *rStarFacC(i,j,bi,bj)
70 ENDDO
71 ENDDO
72 ELSE
73 DO j=1-OLy,sNy+OLy
74 DO i=1-OLx,sNx+OLx
75 IF ( kSurfC(i,j,bi,bj).EQ.1 ) THEN
76 hOceMxL(i,j,bi,bj) = drF(ks)*hFac_surfC(i,j,bi,bj)
77 ELSE
78 hOceMxL(i,j,bi,bj) = drF(ks)*hFacC(i,j,ks,bi,bj)
79 ENDIF
80 ENDDO
81 ENDDO
82 ENDIF
83 ELSE
84 #else /* ndef NONLIN_FRSURF */
85 IF (.TRUE.) THEN
86 #endif /* NONLIN_FRSURF */
87 DO j=1-OLy,sNy+OLy
88 DO i=1-OLx,sNx+OLx
89 hOceMxL(i,j,bi,bj) = drF(ks)*hFacC(i,j,ks,bi,bj)
90 ENDDO
91 ENDDO
92 ENDIF
93
94 DO j=1-OLy,sNy+OLy
95 DO i=1-OLx,sNx+OLx
96 tOceMxL(i,j,bi,bj) = theta(i,j,ks,bi,bj)
97 sOceMxL(i,j,bi,bj) = salt (i,j,ks,bi,bj)
98 v2ocMxL(i,j,bi,bj) = 0. _d 0
99 icFrwAtm(i,j,bi,bj) = 0. _d 0
100 icFlxAtm(i,j,bi,bj) = 0. _d 0
101 icFlxSW (i,j,bi,bj) = 0. _d 0
102 snowPrc (i,j,bi,bj) = 0. _d 0
103 siceAlb (i,j,bi,bj) = 0. _d 0
104 ENDDO
105 ENDDO
106 IF ( .NOT.useSEAICE ) THEN
107 DO j=1-OLy,sNy+OLy-1
108 DO i=1-OLx,sNx+OLx-1
109 v2ocMxL(i,j,bi,bj) =
110 & ( uVel(i,j,ks,bi,bj) * uVel(i,j,ks,bi,bj)
111 & + uVel(i+1,j,ks,bi,bj)*uVel(i+1,j,ks,bi,bj)
112 & + vVel(i,j+1,ks,bi,bj)*vVel(i,j+1,ks,bi,bj)
113 & + vVel(i,j,ks,bi,bj) * vVel(i,j,ks,bi,bj)
114 & )*0.5 _d 0
115 ENDDO
116 ENDDO
117 #ifdef ALLOW_SEAICE
118 ELSE
119 DO j=1-OLy,sNy+OLy-1
120 DO i=1-OLx,sNx+OLx-1
121 uRel1 = uVel( i, j,ks,bi,bj)-uIce( i, j,bi,bj)
122 uRel2 = uVel(i+1,j,ks,bi,bj)-uIce(i+1,j,bi,bj)
123 vRel1 = vVel(i, j, ks,bi,bj)-vIce(i, j, bi,bj)
124 vRel2 = vVel(i,j+1,ks,bi,bj)-vIce(i,j+1,bi,bj)
125 v2ocMxL(i,j,bi,bj) =
126 & ( ( uRel1*uRel1 + uRel2*uRel2 )
127 & + ( vRel1*vRel1 + vRel2*vRel2 )
128 & )*0.5 _d 0
129 ENDDO
130 ENDDO
131 #endif /* ALLOW_SEAICE */
132 ENDIF
133
134 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
135 #endif /*ALLOW_THSICE*/
136
137 RETURN
138 END

  ViewVC Help
Powered by ViewVC 1.1.22