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