/[MITgcm]/MITgcm/pkg/dic/dic_fields_load.F
ViewVC logotype

Contents of /MITgcm/pkg/dic/dic_fields_load.F

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


Revision 1.4 - (show annotations) (download)
Thu Oct 9 04:19:19 2003 UTC (20 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51o_pre, checkpoint51n_pre, checkpoint51l_post, checkpoint51q_post, checkpoint51o_post, checkpoint51p_post, checkpoint51i_post, checkpoint51l_pre, checkpoint51n_post, checkpoint51m_post
Branch point for: tg2-branch, checkpoint51n_branch
Changes since 1.3: +1 -1 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 #include "DIC_OPTIONS.h"
2 #include "GCHEM_OPTIONS.h"
3
4 CStartOfInterFace
5 SUBROUTINE DIC_FIELDS_LOAD (
6 I myIter,myTime,myThid)
7
8 C /==========================================================\
9 C | SUBROUTINE DIC_FIELDS_LOAD i |
10 C | o Read in fields needed for CO2 fluxterms |
11 C |==========================================================|
12 IMPLICIT NONE
13
14 C == GLobal variables ==
15 #include "SIZE.h"
16 #include "DYNVARS.h"
17 #include "EEPARAMS.h"
18 #include "PARAMS.h"
19 #include "GRID.h"
20 #include "PTRACERS.h"
21 #include "GCHEM.h"
22 #include "DIC_ABIOTIC.h"
23 #ifdef DIC_BIOTIC
24 #include "DIC_BIOTIC.h"
25 #include "DIC_LOAD.h"
26 #endif
27
28 C == Routine arguments ==
29 INTEGER myIter
30 _RL myTime
31 INTEGER myThid
32
33 #ifdef ALLOW_PTRACERS
34 C == Local variables ==
35 INTEGER bi,bj,i,j,intime0,intime1
36 _RL aWght,bWght,rdt
37 INTEGER nForcingPeriods,Imytm,Ifprd,Ifcyc,Iftm
38 c
39 C First call requires that we initialize everything to zero for safety
40 IF (myIter .EQ. nIter0) THEN
41 CALL LEF_ZERO( wspeed0,myThid )
42 CALL LEF_ZERO( wspeed1,myThid )
43 CALL LEF_ZERO( atmosp0,myThid )
44 CALL LEF_ZERO( atmosp1,myThid )
45 CALL LEF_ZERO( silica0,myThid )
46 CALL LEF_ZERO( silica1,myThid )
47 CALL LEF_ZERO( ice0,myThid )
48 CALL LEF_ZERO( ice1,myThid )
49 #ifdef ALLOW_FE
50 CALL LEF_ZERO( feinput0,myThid )
51 CALL LEF_ZERO( feinput1,myThid )
52 #endif
53 ENDIF
54 c
55 IF ( periodicExternalForcing ) THEN
56
57
58 C Now calculate whether it is time to update the forcing arrays
59 rdt=1. _d 0 / deltaTclock
60 nForcingPeriods=
61 & int(externForcingCycle/externForcingPeriod+0.5)
62 cswd QQ change for placement of chem forcing (ie. after timestep)
63 Imytm=int((myTime-deltaTclock)*rdt+0.5)
64 Ifprd=int(externForcingPeriod*rdt+0.5)
65 Ifcyc=int(externForcingCycle*rdt+0.5)
66 Iftm=mod( Imytm+Ifcyc-Ifprd/2 ,Ifcyc)
67
68
69 intime0=int(Iftm/Ifprd)
70 intime1=mod(intime0+1,nForcingPeriods)
71 aWght=float( Iftm-Ifprd*intime0 )/float( Ifprd )
72 bWght=1.-aWght
73
74 intime0=intime0+1
75 intime1=intime1+1
76
77
78 IF (
79 & Iftm-Ifprd*(intime0-1).EQ. 0
80 & .OR. myIter .EQ. nIter0
81 & ) THEN
82
83
84 _BEGIN_MASTER(myThid)
85
86 C If the above condition is met then we need to read in
87 C data for the period ahead and the period behind myTime.
88 WRITE(*,*)
89 & 'S/R EXTERNAL_FIELDS_LOAD: Reading new dic data',
90 & myTime,myIter
91
92 IF ( WindFile .NE. ' ' ) THEN
93 CALL READ_REC_XY_RS( WindFile,wspeed0,intime0,
94 & myIter,myThid )
95 CALL READ_REC_XY_RS( WindFile,wspeed1,intime1,
96 & myIter,myThid )
97 ENDIF
98 IF ( AtmospFile .NE. ' ' ) THEN
99 CALL READ_REC_XY_RS( AtmospFile,atmosp0,intime0,
100 & myIter,myThid )
101 CALL READ_REC_XY_RS( AtmospFile,atmosp1,intime1,
102 & myIter,myThid )
103 ENDIF
104 IF ( SilicaFile .NE. ' ' ) THEN
105 CALL READ_REC_XY_RS( SilicaFile,silica0,intime0,
106 & myIter,myThid )
107 CALL READ_REC_XY_RS( SilicaFile,silica1,intime1,
108 & myIter,myThid )
109 ENDIF
110 IF ( IceFile .NE. ' ' ) THEN
111 CALL READ_REC_XY_RS( IceFile,ice0,intime0,
112 & myIter,myThid )
113 CALL READ_REC_XY_RS( IceFile,ice1,intime1,
114 & myIter,myThid )
115 ENDIF
116 #ifdef ALLOW_FE
117 IF ( IronFile .NE. ' ' ) THEN
118 CALL READ_REC_XY_RS( IronFile,feinput0,intime0,
119 & myIter,myThid )
120 CALL READ_REC_XY_RS( IronFile,feinput1,intime1,
121 & myIter,myThid )
122 ENDIF
123 #endif
124
125
126 _END_MASTER(myThid)
127 C
128 _EXCH_XY_R4(wspeed0, myThid )
129 _EXCH_XY_R4(wspeed1, myThid )
130 _EXCH_XY_R4(atmosp0, myThid )
131 _EXCH_XY_R4(atmosp1, myThid )
132 _EXCH_XY_R4(silica0, myThid )
133 _EXCH_XY_R4(silica1, myThid )
134 _EXCH_XY_R4(ice0, myThid )
135 _EXCH_XY_R4(ice1, myThid )
136 #ifdef ALLOW_FE
137 _EXCH_XY_R4(feinput0, myThid )
138 _EXCH_XY_R4(feinput1, myThid )
139 #endif
140
141 C
142 ENDIF
143
144 DO bj = myByLo(myThid), myByHi(myThid)
145 DO bi = myBxLo(myThid), myBxHi(myThid)
146 DO j=1-Oly,sNy+Oly
147 DO i=1-Olx,sNx+Olx
148 IF ( WindFile .NE. ' ' ) THEN
149 WIND(i,j,bi,bj) = bWght*wspeed0(i,j,bi,bj)
150 & +aWght*wspeed1(i,j,bi,bj)
151 ELSE
152 WIND(i,j,bi,bj) = 5.d0*maskC(i,j,1,bi,bj)
153 ENDIF
154 c calculate piston velocity
155 c QQ: note - we should have wind speed variance in here
156 c QQ also need to check units, and conversion factors
157 pisvel(i,j,bi,bj) =0.337*wind(i,j,bi,bj)**2/3.6d5 !QQQQ
158 IF ( AtmospFile .NE. ' ' ) THEN
159 ATMOSP(i,j,bi,bj) = bWght*atmosp0(i,j,bi,bj)
160 & +aWght*atmosp1(i,j,bi,bj)
161 ELSE
162 ATMOSP(i,j,bi,bj) =1.d0*maskC(i,j,1,bi,bj)
163 ENDIF
164 IF ( SilicaFile .NE. ' ' ) THEN
165 SILICA(i,j,bi,bj) = bWght*silica0(i,j,bi,bj)
166 & +aWght*silica1(i,j,bi,bj)
167 ELSE
168 SILICA(i,j,bi,bj) =7.6838e-3*maskC(i,j,1,bi,bj)
169 ENDIF
170 IF ( IceFile .NE. ' ' ) THEN
171 FIce(i,j,bi,bj) = bWght*ice0(i,j,bi,bj)
172 & +aWght*ice1(i,j,bi,bj)
173 ELSE
174 FIce(i,j,bi,bj) =0.d0
175 ENDIF
176 if (FIce(i,j,bi,bj).lt.1d-2) then
177 FIce(i,j,bi,bj) = 0.d0
178 endif
179 #ifdef ALLOW_FE
180 IF ( IronFile .NE. ' ' ) THEN
181 InputFe(i,j,bi,bj) = bWght*feinput0(i,j,bi,bj)
182 & +aWght*feinput1(i,j,bi,bj)
183 ELSE
184 InputFe(i,j,bi,bj) = 0.d0*maskC(i,j,1,bi,bj)
185 ENDIF
186 #endif
187 ENDDO
188 ENDDO
189 ENDDO
190 ENDDO
191
192 C endif for periodicForcing
193 ENDIF
194
195 #endif
196 RETURN
197 END

  ViewVC Help
Powered by ViewVC 1.1.22