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