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

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

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


Revision 1.8 - (show annotations) (download)
Wed Apr 4 01:55:45 2007 UTC (17 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58y_post
Changes since 1.7: +24 -13 lines
- Masking of ocean mixed layer depth : done here, instead of in aim_aim2sioce.F
- remove dFdT (not used).

1 C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_ini_vars.F,v 1.7 2006/06/25 22:35:17 jmc Exp $
2 C $Name: $
3
4 #include "THSICE_OPTIONS.h"
5 #ifdef ALLOW_AIM
6 # include "AIM_OPTIONS.h"
7 #endif
8
9 CBOP
10 C !ROUTINE: THSICE_INI_VARS
11 C !INTERFACE:
12 SUBROUTINE THSICE_INI_VARS( myThid )
13
14 C !DESCRIPTION: \bv
15 C *==========================================================*
16 C | S/R THSICE_INI_VARS
17 C | o initialize THermo_SeaICE variables
18 C *==========================================================*
19 C \ev
20
21 C !USES:
22 IMPLICIT NONE
23
24 C === Global variables ===
25 #include "SIZE.h"
26 #include "EEPARAMS.h"
27 #include "PARAMS.h"
28 #include "FFIELDS.h"
29 #include "THSICE_PARAMS.h"
30 #include "THSICE_VARS.h"
31 #ifdef ALLOW_AIM
32 # include "AIM_FFIELDS.h"
33 #endif
34
35 C !INPUT/OUTPUT PARAMETERS:
36 C == Routine arguments ==
37 C myThid :: My Thread Id. number
38 INTEGER myThid
39 CEOP
40
41 #ifdef ALLOW_THSICE
42 C == Local variables ==
43 C bi,bj :: Loop counters
44 C i,j :: Loop counters
45 INTEGER bi, bj
46 INTEGER i, j
47 INTEGER prec
48 c CHARACTER*(MAX_LEN_FNAM) fn
49 _RL v2Loc
50
51
52 c set up ice arrays to zero if starting ice
53 DO bj = myByLo(myThid), myByHi(myThid)
54 DO bi = myBxLo(myThid), myBxHi(myThid)
55 C- state variables :
56 DO j=1-OLy,sNy+OLy
57 DO i=1-OLx,sNx+OLx
58 iceMask(i,j,bi,bj) = 0. _d 0
59 iceHeight(i,j,bi,bj)= 0. _d 0
60 snowHeight(i,j,bi,bj)=0. _d 0
61 Tsrf(i,j,bi,bj) = 0. _d 0
62 Tice1(i,j,bi,bj) = 0. _d 0
63 Tice2(i,j,bi,bj) = 0. _d 0
64 Qice1(i,j,bi,bj) = 0. _d 0
65 Qice2(i,j,bi,bj) = 0. _d 0
66 snowAge(i,j,bi,bj) = 0. _d 0
67 ENDDO
68 ENDDO
69 C- fluxes :
70 DO j=1-OLy,sNy+OLy
71 DO i=1-OLx,sNx+OLx
72 sHeating(i,j,bi,bj) = 0. _d 0
73 flxCndBt(i,j,bi,bj) = 0. _d 0
74 snowPrc(i,j,bi,bj) = 0. _d 0
75 siceAlb(i,j,bi,bj) = 0. _d 0
76 icFlxSW (i,j,bi,bj) = 0. _d 0
77 icFlxAtm(i,j,bi,bj) = 0. _d 0
78 icFrwAtm(i,j,bi,bj) = 0. _d 0
79 ENDDO
80 ENDDO
81 C- oceanic mixed layer state :
82 v2Loc = vMxL_default*vMxL_default
83 DO j=1-OLy,sNy+OLy
84 DO i=1-OLx,sNx+OLx
85 hOceMxL(i,j,bi,bj) = hMxL_default
86 tOceMxL(i,j,bi,bj) = 0. _d 0
87 sOceMxL(i,j,bi,bj) = sMxL_default
88 v2ocMxL(i,j,bi,bj) = v2Loc
89 ENDDO
90 ENDDO
91 #ifdef ALLOW_AIM
92 IF ( useAIM ) THEN
93 C- Mask mixed layer depth : depth is used in thsice slab_ocean
94 C and this mask is used in thsice_advdiff and if coupled
95 DO j=1-OLy,sNy+OLy
96 DO i=1-OLx,sNx+OLx
97 IF ( aim_landFr(i,j,bi,bj).EQ.1. _d 0 )
98 & hOceMxL(i,j,bi,bj) = 0.
99 ENDDO
100 ENDDO
101 ENDIF
102 #endif /* ALLOW_AIM */
103 ENDDO
104 ENDDO
105
106 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
107
108 IF ( startIceModel.LE.0 .AND. nIter0.NE.0 ) THEN
109 C-- Read ice pickup fields
110 _BARRIER
111 prec=precFloat64
112 CALL THSICE_READ_PICKUP( prec, nIter0, myThid )
113
114 ELSE
115 C-- Read initial conditions:
116 _BEGIN_MASTER( myThid )
117 IF ( thSIceFract_InitFile .NE. ' ' ) THEN
118 CALL READ_REC_XY_RL(thSIceFract_InitFile,iceMask,1,0,myThid)
119 ENDIF
120 IF ( thSIceThick_InitFile .NE. ' ' ) THEN
121 CALL READ_REC_XY_RL(thSIceThick_InitFile,iceHeight,1,0,myThid)
122 ENDIF
123 IF ( thSIceSnowH_InitFile .NE. ' ' ) THEN
124 CALL READ_REC_XY_RL(thSIceSnowH_InitFile,snowHeight,1,0,myThid)
125 ENDIF
126 IF ( thSIceSnowA_InitFile .NE. ' ' ) THEN
127 CALL READ_REC_XY_RL(thSIceSnowA_InitFile,snowAge,1,0,myThid)
128 ENDIF
129 IF ( thSIceEnthp_InitFile .NE. ' ' ) THEN
130 CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice1,1,0,myThid)
131 CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice2,2,0,myThid)
132 ENDIF
133 IF ( thSIceTsurf_InitFile .NE. ' ' ) THEN
134 CALL READ_REC_XY_RS(thSIceTsurf_InitFile,Tsrf,1,0,myThid)
135 ENDIF
136 _END_MASTER(myThid)
137 ENDIF
138
139 _EXCH_XY_R8(iceMask,myThid)
140 _EXCH_XY_R8(iceHeight, myThid)
141 _EXCH_XY_R8(snowHeight,myThid)
142 _EXCH_XY_R8(Tsrf, myThid)
143 _EXCH_XY_R8(Tice1, myThid)
144 _EXCH_XY_R8(Tice2, myThid)
145 _EXCH_XY_R8(Qice1, myThid)
146 _EXCH_XY_R8(Qice2, myThid)
147 _EXCH_XY_R8(snowAge,myThid)
148
149 #ifdef ATMOSPHERIC_LOADING
150 C-- Initialise Sea-Ice Loading for SeaIce-Dynamics :
151 IF ( useSEAICE ) THEN
152 DO bj = myByLo(myThid), myByHi(myThid)
153 DO bi = myBxLo(myThid), myBxHi(myThid)
154 DO j=1-OLy,sNy+OLy
155 DO i=1-OLx,sNx+OLx
156 sIceLoad(i,j,bi,bj) = ( snowHeight(i,j,bi,bj)*rhos
157 & + iceHeight(i,j,bi,bj)*rhoi
158 & )*iceMask(i,j,bi,bj)
159 ENDDO
160 ENDDO
161 ENDDO
162 ENDDO
163 ENDIF
164 #endif /* ATMOSPHERIC_LOADING */
165
166 #endif /* ALLOW_THSICE */
167
168 RETURN
169 END

  ViewVC Help
Powered by ViewVC 1.1.22