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