1 | C $Id: oasis.F 486 2003-12-15 17:50:41Z fairhead $ |
---|
2 | C**** |
---|
3 | C |
---|
4 | C**** *INICMA* - Initialize coupled mode communication for atmosphere |
---|
5 | C and exchange some initial information with Oasis |
---|
6 | C |
---|
7 | C Input: |
---|
8 | C ----- |
---|
9 | C KASTP : total number of timesteps in atmospheric model |
---|
10 | C KEXCH : frequency of exchange (in time steps) |
---|
11 | C KSTEP : length of timestep (in seconds) |
---|
12 | C |
---|
13 | C ----------------------------------------------------------- |
---|
14 | C |
---|
15 | SUBROUTINE inicma(kastp,kexch,kstep,imjm) |
---|
16 | c |
---|
17 | c INCLUDE "param.h" |
---|
18 | c |
---|
19 | INTEGER kastp, kexch, kstep,imjm |
---|
20 | INTEGER iparal(3) |
---|
21 | INTEGER ifcpl, idt, info, imxtag, istep, jf |
---|
22 | c |
---|
23 | #include "param_cou.h" |
---|
24 | #include "inc_cpl.h" |
---|
25 | CHARACTER*3 cljobnam ! experiment name |
---|
26 | CHARACTER*6 clmodnam ! model name |
---|
27 | c EM: not used by Oasis2.4 |
---|
28 | CEM CHARACTER*6 clbid(2) ! for CLIM_Init call (not used) |
---|
29 | CEM ! must be dimensioned by the number of models |
---|
30 | CEM INTEGER nbid(2) ! for CLIM_Init call (not used) |
---|
31 | CEM ! must be dimensioned by the number of models |
---|
32 | CHARACTER*5 cloasis ! coupler name (Oasis) |
---|
33 | INTEGER imess(4) |
---|
34 | INTEGER getpid ! system functions |
---|
35 | INTEGER nuout |
---|
36 | CEM LOGICAL llmodel |
---|
37 | PARAMETER (nuout = 6) |
---|
38 | c |
---|
39 | #include "clim.h" |
---|
40 | #include "mpiclim.h" |
---|
41 | c |
---|
42 | #include "oasis.h" |
---|
43 | ! contains the name of communication technique. Here |
---|
44 | ! cchan=CLIM only is possible. |
---|
45 | c ! ctype=MPI2 |
---|
46 | c |
---|
47 | C ----------------------------------------------------------- |
---|
48 | C |
---|
49 | C* 1. Initializations |
---|
50 | C --------------- |
---|
51 | C |
---|
52 | WRITE(nuout,*) ' ' |
---|
53 | WRITE(nuout,*) ' ' |
---|
54 | WRITE(nuout,*) ' ROUTINE INICMA' |
---|
55 | WRITE(nuout,*) ' **************' |
---|
56 | WRITE(nuout,*) ' ' |
---|
57 | WRITE(nuout,*) ' ' |
---|
58 | c |
---|
59 | c Define the model name |
---|
60 | c |
---|
61 | clmodnam = 'lmdz.x' ! as in $NBMODEL in Cpl/Nam/namcouple.tmp |
---|
62 | c |
---|
63 | c Define the coupler name |
---|
64 | c |
---|
65 | cloasis = 'Oasis' ! always 'Oasis' as in the coupler |
---|
66 | c |
---|
67 | c |
---|
68 | c Define symbolic name for fields exchanged from atmos to coupler, |
---|
69 | c must be the same as (1) of the field definition in namcouple: |
---|
70 | c |
---|
71 | cl_writ(1)='COSHFICE' |
---|
72 | cl_writ(2)='COSHFOCE' |
---|
73 | cl_writ(3)='CONSFICE' |
---|
74 | cl_writ(4)='CONSFOCE' |
---|
75 | cl_writ(5)='CODFLXDT' |
---|
76 | c cl_writ(6)='COICTEMP' |
---|
77 | cl_writ(6)='COTFSICE' |
---|
78 | cl_writ(7)='COTFSOCE' |
---|
79 | cl_writ(8)='COTOLPSU' |
---|
80 | cl_writ(9)='COTOSPSU' |
---|
81 | cl_writ(10)='CORUNCOA' |
---|
82 | cl_writ(11)='CORIVFLU' |
---|
83 | cl_writ(12)='COCALVIN' |
---|
84 | c$$$ cl_writ(13)='COZOTAUX' |
---|
85 | c$$$ cl_writ(14)='COZOTAUV' |
---|
86 | c$$$ cl_writ(15)='COMETAUY' |
---|
87 | c$$$ cl_writ(16)='COMETAUU' |
---|
88 | cl_writ(13)='COTAUXXU' |
---|
89 | cl_writ(14)='COTAUYYU' |
---|
90 | cl_writ(15)='COTAUZZU' |
---|
91 | cl_writ(16)='COTAUXXV' |
---|
92 | cl_writ(17)='COTAUYYV' |
---|
93 | cl_writ(18)='COTAUZZV' |
---|
94 | c |
---|
95 | c Define files name for fields exchanged from atmos to coupler, |
---|
96 | c must be the same as (6) of the field definition in namcouple: |
---|
97 | c |
---|
98 | cl_f_writ(1)='flxatmos' |
---|
99 | cl_f_writ(2)='flxatmos' |
---|
100 | cl_f_writ(3)='flxatmos' |
---|
101 | cl_f_writ(4)='flxatmos' |
---|
102 | cl_f_writ(5)='flxatmos' |
---|
103 | cl_f_writ(6)='flxatmos' |
---|
104 | cl_f_writ(7)='flxatmos' |
---|
105 | cl_f_writ(8)='flxatmos' |
---|
106 | cl_f_writ(9)='flxatmos' |
---|
107 | cl_f_writ(10)='flxatmos' |
---|
108 | cl_f_writ(11)='flxatmos' |
---|
109 | cl_f_writ(12)='flxatmos' |
---|
110 | cl_f_writ(13)='flxatmos' |
---|
111 | cl_f_writ(14)='flxatmos' |
---|
112 | cl_f_writ(15)='flxatmos' |
---|
113 | cl_f_writ(16)='flxatmos' |
---|
114 | cl_f_writ(17)='flxatmos' |
---|
115 | cl_f_writ(18)='flxatmos' |
---|
116 | |
---|
117 | c |
---|
118 | c |
---|
119 | c Define symbolic name for fields exchanged from coupler to atmosphere, |
---|
120 | c must be the same as (2) of the field definition in namcouple: |
---|
121 | c |
---|
122 | cl_read(1)='SISUTESW' |
---|
123 | cl_read(2)='SIICECOV' |
---|
124 | cl_read(3)='SIICEALW' |
---|
125 | cl_read(4)='SIICTEMW' |
---|
126 | c |
---|
127 | c Define files names for fields exchanged from coupler to atmosphere, |
---|
128 | c must be the same as (7) of the field definition in namcouple: |
---|
129 | c |
---|
130 | cl_f_read(1)='sstatmos' |
---|
131 | cl_f_read(2)='sstatmos' |
---|
132 | cl_f_read(3)='sstatmos' |
---|
133 | cl_f_read(4)='sstatmos' |
---|
134 | c |
---|
135 | c |
---|
136 | c Define the number of processors involved in the coupling for |
---|
137 | c Oasis (=1) and each model (as last two INTEGER on $CHATYPE line |
---|
138 | c in the namcouple); they will be stored in a COMMON in mpiclim.h |
---|
139 | c (used for CLIM/MPI2 only) |
---|
140 | mpi_nproc(0)=1 |
---|
141 | mpi_nproc(1)=1 |
---|
142 | mpi_nproc(2)=1 |
---|
143 | c |
---|
144 | c Define infos to be sent initially to oasis |
---|
145 | c |
---|
146 | imess(1) = kastp ! total number of timesteps in atmospheric model |
---|
147 | imess(2) = kexch ! period of exchange (in time steps) |
---|
148 | imess(3) = kstep ! length of atmospheric timestep (in seconds) |
---|
149 | imess(4) = getpid() ! PID of atmospheric model |
---|
150 | c |
---|
151 | c Initialization and exchange of initial info in the CLIM technique |
---|
152 | c |
---|
153 | IF (cchan.eq.'CLIM') THEN |
---|
154 | c |
---|
155 | c Define the experiment name : |
---|
156 | c |
---|
157 | cljobnam = 'CLI' ! as $JOBNAM in namcouple |
---|
158 | c |
---|
159 | c Start the coupling |
---|
160 | c (see lib/clim/src/CLIM_Init for the definition of input parameters) |
---|
161 | c |
---|
162 | cEM clbid(1)=' ' |
---|
163 | cEM clbid(2)=' ' |
---|
164 | cEM nbid(1)=0 |
---|
165 | cEM nbid(2)=0 |
---|
166 | CEM llmodel=.true. |
---|
167 | c |
---|
168 | c Define the number of processors used by each model as in |
---|
169 | c $CHATYPE line of namcouple (used for CLIM/MPI2 only) |
---|
170 | mpi_totproc(1)=1 |
---|
171 | mpi_totproc(2)=1 |
---|
172 | c |
---|
173 | c Define names of each model as in $NBMODEL line of namcouple |
---|
174 | c (used for CLIM/MPI2 only) |
---|
175 | cmpi_modnam(1)='lmdz.x' |
---|
176 | cmpi_modnam(2)='opa.xx' |
---|
177 | c Start the coupling |
---|
178 | c |
---|
179 | CALL CLIM_Init ( cljobnam, clmodnam, 3, 7, |
---|
180 | * kastp, kexch, kstep, |
---|
181 | * 5, 3600, 3600, info ) |
---|
182 | c |
---|
183 | IF (info.ne.CLIM_Ok) THEN |
---|
184 | WRITE ( nuout, *) ' inicma : pb init clim ' |
---|
185 | WRITE ( nuout, *) ' error code is = ', info |
---|
186 | CALL halte('STOP in inicma') |
---|
187 | ELSE |
---|
188 | WRITE(nuout,*) 'inicma : init clim ok ' |
---|
189 | ENDIF |
---|
190 | c |
---|
191 | c For each coupling field, association of a port to its symbolic name |
---|
192 | c |
---|
193 | c -Define the parallel decomposition associated to the port of each |
---|
194 | c field; here no decomposition for all ports. |
---|
195 | iparal ( clim_strategy ) = clim_serial |
---|
196 | iparal ( clim_length ) = imjm |
---|
197 | iparal ( clim_offset ) = 0 |
---|
198 | c |
---|
199 | c -Loop on total number of coupler-to-atmosphere fields |
---|
200 | c (see lib/clim/src/CLIM_Define for the definition of input parameters) |
---|
201 | DO jf=1, jpfldo2a |
---|
202 | CALL CLIM_Define (cl_read(jf), clim_in , clim_double, iparal |
---|
203 | $ , info ) |
---|
204 | WRITE(nuout,*) 'inicma : clim define done for ',jf |
---|
205 | $ ,cl_read(jf) |
---|
206 | END DO |
---|
207 | c |
---|
208 | c -Loop on total number of atmosphere-to-coupler fields |
---|
209 | c (see lib/clim/src/CLIM_Define for the definition of input parameters) |
---|
210 | DO jf=1, jpflda2o1+jpflda2o2 |
---|
211 | CALL CLIM_Define (cl_writ(jf), clim_out , clim_double, |
---|
212 | $ iparal, info ) |
---|
213 | WRITE(nuout,*) 'inicma : clim define done for ',jf |
---|
214 | $ ,cl_writ(jf) |
---|
215 | END DO |
---|
216 | c |
---|
217 | WRITE(nuout,*) 'inicma : clim_define ok ' |
---|
218 | c |
---|
219 | c -Join a pvm group, wait for other programs and broadcast usefull |
---|
220 | c informations to Oasis and to the ocean (see lib/clim/src/CLIM_Start) |
---|
221 | CALL CLIM_Start ( imxtag, info ) |
---|
222 | IF (info.ne.clim_ok) THEN |
---|
223 | WRITE ( nuout, *) 'inicma : pb start clim ' |
---|
224 | WRITE ( nuout, *) ' error code is = ', info |
---|
225 | CALL halte('stop in inicma') |
---|
226 | ELSE |
---|
227 | WRITE ( nuout, *) 'inicma : start clim ok ' |
---|
228 | ENDIF |
---|
229 | c |
---|
230 | c -Get initial information from Oasis |
---|
231 | c (see lib/clim/src/CLIM_Stepi) |
---|
232 | CALL CLIM_Stepi (cloasis, istep, ifcpl, idt, info) |
---|
233 | IF (info .NE. clim_ok) THEN |
---|
234 | WRITE ( UNIT = nuout, FMT = *) |
---|
235 | $ ' warning : problem in getting step info ', |
---|
236 | $ 'from oasis ' |
---|
237 | WRITE (UNIT = nuout, FMT = *) |
---|
238 | $ ' ======= error code number = ', info |
---|
239 | ELSE |
---|
240 | WRITE (UNIT = nuout, FMT = *) |
---|
241 | $ ' got step information from oasis ' |
---|
242 | ENDIF |
---|
243 | WRITE ( nuout, *) ' number of tstep in oasis ', istep |
---|
244 | WRITE ( nuout, *) ' exchange frequency in oasis ', ifcpl |
---|
245 | WRITE ( nuout, *) ' length of tstep in oasis ', idt |
---|
246 | ENDIF |
---|
247 | |
---|
248 | RETURN |
---|
249 | END |
---|
250 | |
---|
251 | c $Id: oasis.F 486 2003-12-15 17:50:41Z fairhead $ |
---|
252 | SUBROUTINE fromcpl(kt, imjm, sst, gla, tice, albedo) |
---|
253 | c ====================================================================== |
---|
254 | c S. Valcke (02/99) adapted From L.Z.X Li: this subroutine reads the SST |
---|
255 | c and Sea-Ice provided by the coupler with the CLIM (PVM exchange messages) |
---|
256 | c technique. |
---|
257 | c====================================================================== |
---|
258 | IMPLICIT none |
---|
259 | INTEGER imjm, kt |
---|
260 | REAL sst(imjm) ! sea-surface-temperature |
---|
261 | REAL gla(imjm) ! sea-ice |
---|
262 | REAL tice(imjm) ! temp glace |
---|
263 | REAL albedo(imjm) ! albedo glace |
---|
264 | c |
---|
265 | INTEGER nuout ! listing output unit |
---|
266 | PARAMETER (nuout=6) |
---|
267 | c |
---|
268 | INTEGER nuread, ios, iflag, icpliter |
---|
269 | INTEGER info, jf |
---|
270 | c |
---|
271 | #include "clim.h" |
---|
272 | c |
---|
273 | #include "oasis.h" |
---|
274 | #include "param_cou.h" |
---|
275 | c |
---|
276 | #include "inc_cpl.h" |
---|
277 | c |
---|
278 | c |
---|
279 | WRITE (nuout,*) ' ' |
---|
280 | WRITE (nuout,*) 'Fromcpl: Reading fields from CPL, kt=',kt |
---|
281 | WRITE (nuout,*) ' ' |
---|
282 | CALL flush (nuout) |
---|
283 | |
---|
284 | |
---|
285 | IF (cchan.eq.'CLIM') THEN |
---|
286 | |
---|
287 | c |
---|
288 | c -Get interpolated oceanic fields from Oasis |
---|
289 | c |
---|
290 | DO jf=1,jpfldo2a |
---|
291 | IF (jf.eq.1) CALL CLIM_Import (cl_read(jf) , kt, sst, info) |
---|
292 | IF (jf.eq.2) CALL CLIM_Import (cl_read(jf) , kt, gla, info) |
---|
293 | IF (jf.eq.3) CALL CLIM_Import (cl_read(jf), kt,albedo, info) |
---|
294 | IF (jf.eq.4) CALL CLIM_Import (cl_read(jf) , kt, tice, info) |
---|
295 | IF ( info .NE. CLIM_Ok) THEN |
---|
296 | WRITE(nuout,*)'Pb in reading ', cl_read(jf), jf |
---|
297 | WRITE(nuout,*)'Couplage kt is = ',kt |
---|
298 | WRITE(nuout,*)'CLIM error code is = ', info |
---|
299 | CALL halte('STOP in fromcpl.F') |
---|
300 | ENDIF |
---|
301 | END DO |
---|
302 | |
---|
303 | ENDIF |
---|
304 | c |
---|
305 | RETURN |
---|
306 | END |
---|
307 | |
---|
308 | c $Id: oasis.F 486 2003-12-15 17:50:41Z fairhead $ |
---|
309 | SUBROUTINE intocpl(kt, imjm, fsolice, fsolwat, fnsolice, fnsolwat, |
---|
310 | $ fnsicedt, evice, evwat, lpre, spre, dirunoff, rivrunoff, |
---|
311 | $ calving, tauxx_u, tauyy_u, tauzz_u, tauxx_v, tauyy_v, tauzz_v |
---|
312 | $ , last) |
---|
313 | c ====================================================================== |
---|
314 | c S. Valcke (02/99) adapted From L.Z.X Li: this subroutine provides the |
---|
315 | c atmospheric coupling fields to the coupler with the CLIM (PVM exchange |
---|
316 | c messages) technique. |
---|
317 | c IF last time step, writes output fields to binary files. |
---|
318 | c ====================================================================== |
---|
319 | IMPLICIT NONE |
---|
320 | INTEGER kt, imjm |
---|
321 | c |
---|
322 | REAL fsolice(imjm) |
---|
323 | REAL fsolwat(imjm) |
---|
324 | REAL fnsolwat(imjm) |
---|
325 | REAL fnsolice(imjm) |
---|
326 | REAL fnsicedt(imjm) |
---|
327 | REAL evice(imjm) |
---|
328 | REAL evwat(imjm) |
---|
329 | REAL lpre(imjm) |
---|
330 | REAL spre(imjm) |
---|
331 | REAL dirunoff(imjm) |
---|
332 | REAL rivrunoff(imjm) |
---|
333 | REAL calving(imjm) |
---|
334 | c$$$ REAL tauxu(imjm) |
---|
335 | c$$$ REAL tauxv(imjm) |
---|
336 | c$$$ REAL tauyu(imjm) |
---|
337 | c$$$ REAL tauyv(imjm) |
---|
338 | REAL tauxx_u(imjm) |
---|
339 | REAL tauxx_v(imjm) |
---|
340 | REAL tauyy_u(imjm) |
---|
341 | REAL tauyy_v(imjm) |
---|
342 | REAL tauzz_u(imjm) |
---|
343 | REAL tauzz_v(imjm) |
---|
344 | LOGICAL last |
---|
345 | c |
---|
346 | INTEGER nuout |
---|
347 | PARAMETER (nuout = 6) |
---|
348 | c |
---|
349 | #include "clim.h" |
---|
350 | #include "param_cou.h" |
---|
351 | #include "inc_cpl.h" |
---|
352 | c |
---|
353 | CHARACTER*8 file_name(jpmaxfld) |
---|
354 | INTEGER max_file |
---|
355 | INTEGER file_unit_max, file_unit(jpmaxfld), |
---|
356 | $ file_unit_field(jpmaxfld) |
---|
357 | |
---|
358 | INTEGER icstep, info, jn, jf, ierror |
---|
359 | LOGICAL trouve |
---|
360 | c |
---|
361 | #include "oasis.h" |
---|
362 | c |
---|
363 | icstep=kt |
---|
364 | c |
---|
365 | WRITE(nuout,*) ' ' |
---|
366 | WRITE(nuout,*) 'Intocpl: sending fields to CPL, kt= ', kt |
---|
367 | WRITE(nuout,*) 'last ', last |
---|
368 | WRITE(nuout,*) |
---|
369 | |
---|
370 | IF (last) THEN |
---|
371 | c |
---|
372 | c -WRITE fields to binary files for coupler restart at last time step |
---|
373 | c |
---|
374 | c -initialisation and files opening |
---|
375 | c |
---|
376 | max_file=1 |
---|
377 | file_unit_max=99 |
---|
378 | c -keeps first file name |
---|
379 | file_name(max_file)=cl_f_writ(max_file) |
---|
380 | c -keeps first file unit |
---|
381 | file_unit(max_file)=file_unit_max |
---|
382 | c -decrements file unit maximum |
---|
383 | file_unit_max=file_unit_max-1 |
---|
384 | c -keeps file unit for field |
---|
385 | file_unit_field(1)=file_unit(max_file) |
---|
386 | c |
---|
387 | c -different files names counter |
---|
388 | c |
---|
389 | DO jf= 2, jpflda2o1 + jpflda2o2 |
---|
390 | trouve=.false. |
---|
391 | DO jn= 1, max_file |
---|
392 | IF (.not.trouve) THEN |
---|
393 | IF (cl_f_writ(jf).EQ.file_name(jn)) THEN |
---|
394 | c -keep file unit for field |
---|
395 | file_unit_field(jf)=file_unit(jn) |
---|
396 | trouve=.true. |
---|
397 | END IF |
---|
398 | END IF |
---|
399 | END DO |
---|
400 | IF (.not.trouve) then |
---|
401 | c -increment the number of different files |
---|
402 | max_file=max_file+1 |
---|
403 | c -keep file name |
---|
404 | file_name(max_file)=cl_f_writ(jf) |
---|
405 | c -keep file unit for file |
---|
406 | file_unit(max_file)=file_unit_max |
---|
407 | c -keep file unit for field |
---|
408 | file_unit_field(jf)=file_unit(max_file) |
---|
409 | c -decrement unit maximum number from 99 to 98, ... |
---|
410 | file_unit_max=file_unit_max-1 |
---|
411 | END IF |
---|
412 | END DO |
---|
413 | c |
---|
414 | DO jn=1, max_file |
---|
415 | OPEN (file_unit(jn), FILE=file_name(jn), FORM='UNFORMATTED') |
---|
416 | WRITE(*,*) 'Opening FILE ', file_unit(jn), ' ' |
---|
417 | $ , file_name(jn) |
---|
418 | REWIND(file_unit(jn)) |
---|
419 | END DO |
---|
420 | c |
---|
421 | c WRITE fields to files |
---|
422 | DO jf=1, jpflda2o1 + jpflda2o2 |
---|
423 | IF (jf.eq.1) |
---|
424 | $ CALL locwrite(cl_writ(jf),fsolice, imjm, |
---|
425 | $ file_unit_field(jf), ierror) |
---|
426 | IF (jf.eq.2) |
---|
427 | $ CALL locwrite(cl_writ(jf),fsolwat, imjm, |
---|
428 | $ file_unit_field(jf), ierror) |
---|
429 | IF (jf.eq.3) |
---|
430 | $ CALL locwrite(cl_writ(jf),fnsolice, imjm, |
---|
431 | $ file_unit_field(jf), ierror) |
---|
432 | IF (jf.eq.4) |
---|
433 | $ CALL locwrite(cl_writ(jf),fnsolwat, imjm, |
---|
434 | $ file_unit_field(jf), ierror) |
---|
435 | IF (jf.eq.5) |
---|
436 | $ CALL locwrite(cl_writ(jf),fnsicedt, imjm, |
---|
437 | $ file_unit_field(jf), ierror) |
---|
438 | c IF (jf.eq.6) |
---|
439 | c $ CALL locwrite(cl_writ(jf),ictemp, imjm, |
---|
440 | c $ file_unit_field(jf), ierror) |
---|
441 | IF (jf.eq.6) |
---|
442 | $ CALL locwrite(cl_writ(jf),evice, imjm, |
---|
443 | $ file_unit_field(jf), ierror) |
---|
444 | IF (jf.eq.7) |
---|
445 | $ CALL locwrite(cl_writ(jf),evwat, imjm, |
---|
446 | $ file_unit_field(jf), ierror) |
---|
447 | IF (jf.eq.8) |
---|
448 | $ CALL locwrite(cl_writ(jf),lpre, imjm, |
---|
449 | $ file_unit_field(jf), ierror) |
---|
450 | IF (jf.eq.9) |
---|
451 | $ CALL locwrite(cl_writ(jf),spre, imjm, |
---|
452 | $ file_unit_field(jf), ierror) |
---|
453 | IF (jf.eq.10) |
---|
454 | $ CALL locwrite(cl_writ(jf),dirunoff, imjm, |
---|
455 | $ file_unit_field(jf), ierror) |
---|
456 | IF (jf.eq.11) |
---|
457 | $ CALL locwrite(cl_writ(jf),rivrunoff, imjm, |
---|
458 | $ file_unit_field(jf), ierror) |
---|
459 | IF (jf.eq.12) |
---|
460 | $ CALL locwrite(cl_writ(jf),calving, imjm, |
---|
461 | $ file_unit_field(jf), ierror) |
---|
462 | c$$$ IF (jf.eq.13) |
---|
463 | c$$$ $ CALL locwrite(cl_writ(jf),tauxu, imjm, |
---|
464 | c$$$ $ file_unit_field(jf),ierror) |
---|
465 | c$$$ IF (jf.eq.1') |
---|
466 | c$$$ $ CALL locwrite(cl_writ(jf),tauxv, imjm, |
---|
467 | c$$$ $ file_unit_field(jf),ierror) |
---|
468 | c$$$ IF (jf.eq.15) |
---|
469 | c$$$ $ CALL locwrite(cl_writ(jf),tauyv, imjm, |
---|
470 | c$$$ $ file_unit_field(jf),ierror) |
---|
471 | c$$$ IF (jf.eq.16) |
---|
472 | c$$$ $ CALL locwrite(cl_writ(jf),tauyu, imjm, |
---|
473 | c$$$ $ file_unit_field(jf), ierror) |
---|
474 | IF (jf.eq.13) |
---|
475 | $ CALL locwrite(cl_writ(jf),tauxx_u, imjm, |
---|
476 | $ file_unit_field(jf),ierror) |
---|
477 | IF (jf.eq.14) |
---|
478 | $ CALL locwrite(cl_writ(jf),tauyy_u, imjm, |
---|
479 | $ file_unit_field(jf),ierror) |
---|
480 | IF (jf.eq.15) |
---|
481 | $ CALL locwrite(cl_writ(jf),tauzz_u, imjm, |
---|
482 | $ file_unit_field(jf),ierror) |
---|
483 | IF (jf.eq.16) |
---|
484 | $ CALL locwrite(cl_writ(jf),tauxx_v, imjm, |
---|
485 | $ file_unit_field(jf),ierror) |
---|
486 | IF (jf.eq.17) |
---|
487 | $ CALL locwrite(cl_writ(jf),tauyy_v, imjm, |
---|
488 | $ file_unit_field(jf),ierror) |
---|
489 | IF (jf.eq.18) |
---|
490 | $ CALL locwrite(cl_writ(jf),tauzz_v, imjm, |
---|
491 | $ file_unit_field(jf),ierror) |
---|
492 | END DO |
---|
493 | C |
---|
494 | C -simulate a FLUSH |
---|
495 | C |
---|
496 | DO jn=1, max_file |
---|
497 | CLOSE (file_unit(jn)) |
---|
498 | END DO |
---|
499 | C |
---|
500 | C |
---|
501 | IF(cchan.eq.'CLIM') THEN |
---|
502 | C |
---|
503 | C -inform PVM daemon that message exchange is finished |
---|
504 | C |
---|
505 | CALL CLIM_Quit (CLIM_ContPvm, info) |
---|
506 | IF (info .NE. CLIM_Ok) THEN |
---|
507 | WRITE (6, *) |
---|
508 | $ 'An error occured while leaving CLIM. Error = ', |
---|
509 | $ info |
---|
510 | ENDIF |
---|
511 | END IF |
---|
512 | RETURN |
---|
513 | END IF |
---|
514 | C |
---|
515 | IF(cchan.eq.'CLIM') THEN |
---|
516 | C |
---|
517 | C -Give atmospheric fields to Oasis |
---|
518 | C |
---|
519 | DO jn=1, jpflda2o1 + jpflda2o2 |
---|
520 | C |
---|
521 | IF (jn.eq.1) CALL CLIM_Export(cl_writ(jn), kt, fsolice, info) |
---|
522 | IF (jn.eq.2) CALL CLIM_Export(cl_writ(jn), kt, fsolwat, info) |
---|
523 | IF (jn.eq.3) CALL CLIM_Export(cl_writ(jn), kt, fnsolice, info) |
---|
524 | IF (jn.eq.4) CALL CLIM_Export(cl_writ(jn), kt, fnsolwat, info) |
---|
525 | IF (jn.eq.5) CALL CLIM_Export(cl_writ(jn), kt, fnsicedt, info) |
---|
526 | c IF (jn.eq.6) CALL CLIM_Export(cl_writ(jn), kt, ictemp, info) |
---|
527 | IF (jn.eq.6) CALL CLIM_Export(cl_writ(jn), kt, evice, info) |
---|
528 | IF (jn.eq.7) CALL CLIM_Export(cl_writ(jn), kt, evwat, info) |
---|
529 | IF (jn.eq.8) CALL CLIM_Export(cl_writ(jn), kt, lpre, info) |
---|
530 | IF (jn.eq.9) CALL CLIM_Export(cl_writ(jn), kt, spre, info) |
---|
531 | IF (jn.eq.10) CALL CLIM_Export(cl_writ(jn),kt,dirunoff, info) |
---|
532 | IF (jn.eq.11) CALL CLIM_Export(cl_writ(jn),kt,rivrunoff,info) |
---|
533 | IF (jn.eq.12) CALL CLIM_Export(cl_writ(jn),kt,calving,info) |
---|
534 | c$$$ IF (jn.eq.13) CALL CLIM_Export(cl_writ(jn), kt, tauxu, info) |
---|
535 | c$$$ IF (jn.eq.14) CALL CLIM_Export(cl_writ(jn), kt, tauxv, info) |
---|
536 | c$$$ IF (jn.eq.15) CALL CLIM_Export(cl_writ(jn), kt, tauyv, info) |
---|
537 | c$$$ IF (jn.eq.16) CALL CLIM_Export(cl_writ(jn), kt, tauyu, info) |
---|
538 | IF (jn.eq.13) CALL CLIM_Export(cl_writ(jn), kt, tauxx_u, info) |
---|
539 | IF (jn.eq.14) CALL CLIM_Export(cl_writ(jn), kt, tauyy_u, info) |
---|
540 | IF (jn.eq.15) CALL CLIM_Export(cl_writ(jn), kt, tauzz_u, info) |
---|
541 | IF (jn.eq.16) CALL CLIM_Export(cl_writ(jn), kt, tauxx_v, info) |
---|
542 | IF (jn.eq.17) CALL CLIM_Export(cl_writ(jn), kt, tauyy_v, info) |
---|
543 | IF (jn.eq.18) CALL CLIM_Export(cl_writ(jn), kt, tauzz_v, info) |
---|
544 | |
---|
545 | IF (info .NE. CLIM_Ok) THEN |
---|
546 | WRITE (nuout,*) 'STEP : Pb giving ',cl_writ(jn), ':',jn |
---|
547 | WRITE (nuout,*) ' at timestep = ', icstep,'kt = ',kt |
---|
548 | WRITE (nuout,*) 'Clim error code is = ',info |
---|
549 | CALL halte('STOP in intocpl ') |
---|
550 | ENDIF |
---|
551 | END DO |
---|
552 | ENDIF |
---|
553 | C |
---|
554 | RETURN |
---|
555 | END |
---|
556 | |
---|
557 | SUBROUTINE halte |
---|
558 | print *, 'Attention dans oasis.F, halte est non defini' |
---|
559 | RETURN |
---|
560 | END |
---|
561 | |
---|
562 | SUBROUTINE locread |
---|
563 | print *, 'Attention dans oasis.F, locread est non defini' |
---|
564 | RETURN |
---|
565 | END |
---|
566 | |
---|
567 | SUBROUTINE locwrite |
---|
568 | print *, 'Attention dans oasis.F, locwrite est non defini' |
---|
569 | RETURN |
---|
570 | END |
---|
571 | |
---|
572 | SUBROUTINE pipe_model_define |
---|
573 | print*,'Attention dans oasis.F, pipe_model_define est non defini' |
---|
574 | RETURN |
---|
575 | END |
---|
576 | |
---|
577 | SUBROUTINE pipe_model_stepi |
---|
578 | print*,'Attention dans oasis.F, pipe_model_stepi est non defini' |
---|
579 | RETURN |
---|
580 | END |
---|
581 | |
---|
582 | SUBROUTINE pipe_model_recv |
---|
583 | print *, 'Attention dans oasis.F, pipe_model_recv est non defini' |
---|
584 | RETURN |
---|
585 | END |
---|
586 | |
---|
587 | SUBROUTINE pipe_model_send |
---|
588 | print *, 'Attention dans oasis.F, pipe_model_send est non defini' |
---|
589 | RETURN |
---|
590 | END |
---|
591 | |
---|
592 | SUBROUTINE clim_stepi |
---|
593 | print *, 'Attention dans oasis.F, clim_stepi est non defini' |
---|
594 | RETURN |
---|
595 | END |
---|
596 | |
---|
597 | SUBROUTINE clim_start |
---|
598 | print *, 'Attention dans oasis.F, clim_start est non defini' |
---|
599 | RETURN |
---|
600 | END |
---|
601 | |
---|
602 | SUBROUTINE clim_import |
---|
603 | print *, 'Attention dans oasis.F, clim_import est non defini' |
---|
604 | RETURN |
---|
605 | END |
---|
606 | |
---|
607 | SUBROUTINE clim_export |
---|
608 | print *, 'Attention dans oasis.F, clim_export est non defini' |
---|
609 | RETURN |
---|
610 | END |
---|
611 | |
---|
612 | SUBROUTINE clim_init |
---|
613 | print *, 'Attention dans oasis.F, clim_init est non defini' |
---|
614 | RETURN |
---|
615 | END |
---|
616 | |
---|
617 | SUBROUTINE clim_define |
---|
618 | print *, 'Attention dans oasis.F, clim_define est non defini' |
---|
619 | RETURN |
---|
620 | END |
---|
621 | |
---|
622 | SUBROUTINE clim_quit |
---|
623 | print *, 'Attention dans oasis.F, clim_quit est non defini' |
---|
624 | RETURN |
---|
625 | END |
---|
626 | |
---|
627 | SUBROUTINE svipc_write |
---|
628 | print *, 'Attention dans oasis.F, svipc_write est non defini' |
---|
629 | RETURN |
---|
630 | END |
---|
631 | |
---|
632 | SUBROUTINE svipc_close |
---|
633 | print *, 'Attention dans oasis.F, svipc_close est non defini' |
---|
634 | RETURN |
---|
635 | END |
---|
636 | |
---|
637 | SUBROUTINE svipc_read |
---|
638 | print *, 'Attention dans oasis.F, svipc_read est non defini' |
---|
639 | RETURN |
---|
640 | END |
---|
641 | |
---|
642 | SUBROUTINE quitcpl |
---|
643 | print *, 'Attention dans oasis.F, quitcpl est non defini' |
---|
644 | RETURN |
---|
645 | END |
---|
646 | |
---|
647 | SUBROUTINE sipc_write_model |
---|
648 | print *, 'Attention dans oasis.F, sipc_write_model est non defini' |
---|
649 | RETURN |
---|
650 | END |
---|
651 | |
---|
652 | SUBROUTINE sipc_attach |
---|
653 | print *, 'Attention dans oasis.F, sipc_attach est non defini' |
---|
654 | RETURN |
---|
655 | END |
---|
656 | |
---|
657 | SUBROUTINE sipc_init_model |
---|
658 | print *, 'Attention dans oasis.F, sipc_init_model est non defini' |
---|
659 | RETURN |
---|
660 | END |
---|
661 | |
---|
662 | SUBROUTINE sipc_read_model |
---|
663 | print *, 'Attention dans oasis.F, sipc_read_model est non defini' |
---|
664 | RETURN |
---|
665 | END |
---|