New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
cpl_oasis3.F90 in branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/SBC – NEMO

source: branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90 @ 5231

Last change on this file since 5231 was 5231, checked in by davestorkey, 9 years ago

Svn keywords deactivated using "svn propdel" in
branch 2014/dev_r4650_UKMO11_restart_functionality.

File size: 23.1 KB
Line 
1MODULE cpl_oasis3
2   !!======================================================================
3   !!                    ***  MODULE cpl_oasis  ***
4   !! Coupled O/A : coupled ocean-atmosphere case using OASIS3-MCT
5   !!=====================================================================
6   !! History :   
7   !!   9.0  !  04-06  (R. Redler, NEC Laboratories Europe, Germany) Original code
8   !!   " "  !  04-11  (R. Redler, NEC Laboratories Europe; N. Keenlyside, W. Park, IFM-GEOMAR, Germany) revision
9   !!   " "  !  04-11  (V. Gayler, MPI M&D) Grid writing
10   !!   " "  !  05-08  (R. Redler, W. Park) frld initialization, paral(2) revision
11   !!   " "  !  05-09  (R. Redler) extended to allow for communication over root only
12   !!   " "  !  06-01  (W. Park) modification of physical part
13   !!   " "  !  06-02  (R. Redler, W. Park) buffer array fix for root exchange
14   !!   3.4  !  11-11  (C. Harris) Changes to allow mutiple category fields
15   !!----------------------------------------------------------------------
16   !!----------------------------------------------------------------------
17   !!   'key_oasis3'                    coupled Ocean/Atmosphere via OASIS3
18   !!----------------------------------------------------------------------
19   !!   cpl_init     : initialization of coupled mode communication
20   !!   cpl_define   : definition of grid and fields
21   !!   cpl_snd     : snd out fields in coupled mode
22   !!   cpl_rcv     : receive fields in coupled mode
23   !!   cpl_finalize : finalize the coupled mode communication
24   !!----------------------------------------------------------------------
25#if defined key_oasis3
26   USE mod_oasis                    ! OASIS3-MCT module
27#endif
28   USE par_oce                      ! ocean parameters
29   USE dom_oce                      ! ocean space and time domain
30   USE in_out_manager               ! I/O manager
31   USE lbclnk                       ! ocean lateral boundary conditions (or mpp link)
32
33   IMPLICIT NONE
34   PRIVATE
35
36   PUBLIC   cpl_init
37   PUBLIC   cpl_define
38   PUBLIC   cpl_snd
39   PUBLIC   cpl_rcv
40   PUBLIC   cpl_freq
41   PUBLIC   cpl_finalize
42
43   INTEGER, PUBLIC            ::   OASIS_Rcv  = 1    !: return code if received field
44   INTEGER, PUBLIC            ::   OASIS_idle = 0    !: return code if nothing done by oasis
45   INTEGER                    ::   ncomp_id          ! id returned by oasis_init_comp
46   INTEGER                    ::   nerror            ! return error code
47#if ! defined key_oasis3
48   ! OASIS Variables not used. defined only for compilation purpose
49   INTEGER                    ::   OASIS_Out         = -1
50   INTEGER                    ::   OASIS_REAL        = -1
51   INTEGER                    ::   OASIS_Ok          = -1
52   INTEGER                    ::   OASIS_In          = -1
53   INTEGER                    ::   OASIS_Sent        = -1
54   INTEGER                    ::   OASIS_SentOut     = -1
55   INTEGER                    ::   OASIS_ToRest      = -1
56   INTEGER                    ::   OASIS_ToRestOut   = -1
57   INTEGER                    ::   OASIS_Recvd       = -1
58   INTEGER                    ::   OASIS_RecvOut     = -1
59   INTEGER                    ::   OASIS_FromRest    = -1
60   INTEGER                    ::   OASIS_FromRestOut = -1
61#endif
62
63   INTEGER, PUBLIC, PARAMETER ::   nmaxfld=40        ! Maximum number of coupling fields
64   INTEGER, PUBLIC, PARAMETER ::   nmaxcat=5    ! Maximum number of coupling fields
65   INTEGER, PUBLIC, PARAMETER ::   nmaxcpl=5    ! Maximum number of coupling fields
66   
67   TYPE, PUBLIC ::   FLD_CPL               !: Type for coupling field information
68      LOGICAL               ::   laction   ! To be coupled or not
69      CHARACTER(len = 8)    ::   clname    ! Name of the coupling field   
70      CHARACTER(len = 1)    ::   clgrid    ! Grid type 
71      REAL(wp)              ::   nsgn      ! Control of the sign change
72      INTEGER, DIMENSION(nmaxcat,nmaxcpl) ::   nid   ! Id of the field (no more than 9 categories and 9 extrena models)
73      INTEGER               ::   nct       ! Number of categories in field
74      INTEGER               ::   ncplmodel ! Maximum number of models to/from which this variable may be sent/received
75   END TYPE FLD_CPL
76
77   TYPE(FLD_CPL), DIMENSION(nmaxfld), PUBLIC ::   srcv, ssnd   !: Coupling fields
78
79   REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   exfld   ! Temporary buffer for receiving
80
81   !!----------------------------------------------------------------------
82   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
83   !! $Id: cpl_oasis3.F90 5208 2015-04-13 13:08:59Z davestorkey $
84   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
85   !!----------------------------------------------------------------------
86CONTAINS
87
88   SUBROUTINE cpl_init( kl_comm )
89      !!-------------------------------------------------------------------
90      !!             ***  ROUTINE cpl_init  ***
91      !!
92      !! ** Purpose :   Initialize coupled mode communication for ocean
93      !!    exchange between AGCM, OGCM and COUPLER. (OASIS3 software)
94      !!
95      !! ** Method  :   OASIS3 MPI communication
96      !!--------------------------------------------------------------------
97      INTEGER, INTENT(out) ::   kl_comm   ! local communicator of the model
98      !!--------------------------------------------------------------------
99
100      ! WARNING: No write in numout in this routine
101      !============================================
102
103      !------------------------------------------------------------------
104      ! 1st Initialize the OASIS system for the application
105      !------------------------------------------------------------------
106      CALL oasis_init_comp ( ncomp_id, 'oceanx', nerror )
107      IF ( nerror /= OASIS_Ok ) &
108         CALL oasis_abort (ncomp_id, 'cpl_init', 'Failure in oasis_init_comp')
109
110      !------------------------------------------------------------------
111      ! 3rd Get an MPI communicator for OPA local communication
112      !------------------------------------------------------------------
113
114      CALL oasis_get_localcomm ( kl_comm, nerror )
115      IF ( nerror /= OASIS_Ok ) &
116         CALL oasis_abort (ncomp_id, 'cpl_init','Failure in oasis_get_localcomm' )
117      !
118   END SUBROUTINE cpl_init
119
120
121   SUBROUTINE cpl_define( krcv, ksnd, kcplmodel )
122      !!-------------------------------------------------------------------
123      !!             ***  ROUTINE cpl_define  ***
124      !!
125      !! ** Purpose :   Define grid and field information for ocean
126      !!    exchange between AGCM, OGCM and COUPLER. (OASIS3 software)
127      !!
128      !! ** Method  :   OASIS3 MPI communication
129      !!--------------------------------------------------------------------
130      INTEGER, INTENT(in) ::   krcv, ksnd     ! Number of received and sent coupling fields
131      INTEGER, INTENT(in) ::   kcplmodel      ! Maximum number of models to/from which NEMO is potentialy sending/receiving data
132      !
133      INTEGER :: id_part
134      INTEGER :: paral(5)       ! OASIS3 box partition
135      INTEGER :: ishape(2,2)    ! shape of arrays passed to PSMILe
136      INTEGER :: ji,jc,jm       ! local loop indicees
137      CHARACTER(LEN=64) :: zclname
138      CHARACTER(LEN=2) :: cli2
139      !!--------------------------------------------------------------------
140
141      IF(lwp) WRITE(numout,*)
142      IF(lwp) WRITE(numout,*) 'cpl_define : initialization in coupled ocean/atmosphere case'
143      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~'
144      IF(lwp) WRITE(numout,*)
145
146      IF( kcplmodel > nmaxcpl ) THEN
147         CALL oasis_abort ( ncomp_id, 'cpl_define', 'kcplmodel is larger than nmaxcpl, increase nmaxcpl')   ;   RETURN
148      ENDIF
149      !
150      ! ... Define the shape for the area that excludes the halo
151      !     For serial configuration (key_mpp_mpi not being active)
152      !     nl* is set to the global values 1 and jp*glo.
153      !
154      ishape(:,1) = (/ 1, nlei-nldi+1 /)
155      ishape(:,2) = (/ 1, nlej-nldj+1 /)
156      !
157      ! ... Allocate memory for data exchange
158      !
159      ALLOCATE(exfld(nlei-nldi+1, nlej-nldj+1), stat = nerror)
160      IF( nerror > 0 ) THEN
161         CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in allocating exfld')   ;   RETURN
162      ENDIF
163      !
164      ! -----------------------------------------------------------------
165      ! ... Define the partition
166      ! -----------------------------------------------------------------
167     
168      paral(1) = 2                                              ! box partitioning
169      paral(2) = jpiglo * (nldj-1+njmpp-1) + (nldi-1+nimpp-1)   ! NEMO lower left corner global offset   
170      paral(3) = nlei-nldi+1                                    ! local extent in i
171      paral(4) = nlej-nldj+1                                    ! local extent in j
172      paral(5) = jpiglo                                         ! global extent in x
173     
174      IF( ln_ctl ) THEN
175         WRITE(numout,*) ' multiexchg: paral (1:5)', paral
176         WRITE(numout,*) ' multiexchg: jpi, jpj =', jpi, jpj
177         WRITE(numout,*) ' multiexchg: nldi, nlei, nimpp =', nldi, nlei, nimpp
178         WRITE(numout,*) ' multiexchg: nldj, nlej, njmpp =', nldj, nlej, njmpp
179      ENDIF
180     
181      CALL oasis_def_partition ( id_part, paral, nerror )
182      !
183      ! ... Announce send variables.
184      !
185      ssnd(:)%ncplmodel = kcplmodel
186      !
187      DO ji = 1, ksnd
188         IF ( ssnd(ji)%laction ) THEN
189
190            IF( ssnd(ji)%nct > nmaxcat ) THEN
191               CALL oasis_abort ( ncomp_id, 'cpl_define', 'Number of categories of '//   &
192                  &              TRIM(ssnd(ji)%clname)//' is larger than nmaxcat, increase nmaxcat' )
193               RETURN
194            ENDIF
195           
196            DO jc = 1, ssnd(ji)%nct
197               DO jm = 1, kcplmodel
198
199                  IF ( ssnd(ji)%nct .GT. 1 ) THEN
200                     WRITE(cli2,'(i2.2)') jc
201                     zclname = TRIM(ssnd(ji)%clname)//'_cat'//cli2
202                  ELSE
203                     zclname = ssnd(ji)%clname
204                  ENDIF
205                  IF ( kcplmodel  > 1 ) THEN
206                     WRITE(cli2,'(i2.2)') jm
207                     zclname = 'model'//cli2//'_'//TRIM(zclname)
208                  ENDIF
209#if defined key_agrif
210                  IF( agrif_fixed() /= 0 ) THEN
211                     zclname=TRIM(Agrif_CFixed())//'_'//TRIM(zclname)
212                  END IF
213#endif
214                  IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_Out
215                  CALL oasis_def_var (ssnd(ji)%nid(jc,jm), zclname, id_part   , (/ 2, 0 /),   &
216                     &                OASIS_Out          , ishape , OASIS_REAL, nerror )
217                  IF ( nerror /= OASIS_Ok ) THEN
218                     WRITE(numout,*) 'Failed to define transient ', ji, jc, jm, " "//TRIM(zclname)
219                     CALL oasis_abort ( ssnd(ji)%nid(jc,jm), 'cpl_define', 'Failure in oasis_def_var' )
220                  ENDIF
221                  IF( ln_ctl .AND. ssnd(ji)%nid(jc,jm) /= -1 ) WRITE(numout,*) "variable defined in the namcouple"
222                  IF( ln_ctl .AND. ssnd(ji)%nid(jc,jm) == -1 ) WRITE(numout,*) "variable NOT defined in the namcouple"
223               END DO
224            END DO
225         ENDIF
226      END DO
227      !
228      ! ... Announce received variables.
229      !
230      srcv(:)%ncplmodel = kcplmodel
231      !
232      DO ji = 1, krcv
233         IF ( srcv(ji)%laction ) THEN
234           
235            IF( srcv(ji)%nct > nmaxcat ) THEN
236               CALL oasis_abort ( ncomp_id, 'cpl_define', 'Number of categories of '//   &
237                  &              TRIM(srcv(ji)%clname)//' is larger than nmaxcat, increase nmaxcat' )
238               RETURN
239            ENDIF
240           
241            DO jc = 1, srcv(ji)%nct
242               DO jm = 1, kcplmodel
243                 
244                  IF ( srcv(ji)%nct .GT. 1 ) THEN
245                     WRITE(cli2,'(i2.2)') jc
246                     zclname = TRIM(srcv(ji)%clname)//'_cat'//cli2
247                  ELSE
248                     zclname = srcv(ji)%clname
249                  ENDIF
250                  IF ( kcplmodel  > 1 ) THEN
251                     WRITE(cli2,'(i2.2)') jm
252                     zclname = 'model'//cli2//'_'//TRIM(zclname)
253                  ENDIF
254#if defined key_agrif
255                  IF( agrif_fixed() /= 0 ) THEN
256                     zclname=TRIM(Agrif_CFixed())//'_'//TRIM(zclname)
257                  END IF
258#endif
259                  IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_In
260                  CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part   , (/ 2, 0 /),   &
261                     &                OASIS_In           , ishape , OASIS_REAL, nerror )
262                  IF ( nerror /= OASIS_Ok ) THEN
263                     WRITE(numout,*) 'Failed to define transient ', ji, jc, jm, " "//TRIM(zclname)
264                     CALL oasis_abort ( srcv(ji)%nid(jc,jm), 'cpl_define', 'Failure in oasis_def_var' )
265                  ENDIF
266                  IF( ln_ctl .AND. srcv(ji)%nid(jc,jm) /= -1 ) WRITE(numout,*) "variable defined in the namcouple"
267                  IF( ln_ctl .AND. srcv(ji)%nid(jc,jm) == -1 ) WRITE(numout,*) "variable NOT defined in the namcouple"
268
269               END DO
270            END DO
271         ENDIF
272      END DO
273     
274      !------------------------------------------------------------------
275      ! End of definition phase
276      !------------------------------------------------------------------
277     
278      CALL oasis_enddef(nerror)
279      IF( nerror /= OASIS_Ok )   CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef')
280      !
281   END SUBROUTINE cpl_define
282   
283   
284   SUBROUTINE cpl_snd( kid, kstep, pdata, kinfo )
285      !!---------------------------------------------------------------------
286      !!              ***  ROUTINE cpl_snd  ***
287      !!
288      !! ** Purpose : - At each coupling time-step,this routine sends fields
289      !!      like sst or ice cover to the coupler or remote application.
290      !!----------------------------------------------------------------------
291      INTEGER                   , INTENT(in   ) ::   kid       ! variable index in the array
292      INTEGER                   , INTENT(  out) ::   kinfo     ! OASIS3 info argument
293      INTEGER                   , INTENT(in   ) ::   kstep     ! ocean time-step in seconds
294      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pdata
295      !!
296      INTEGER                                   ::   jc,jm     ! local loop index
297      !!--------------------------------------------------------------------
298      !
299      ! snd data to OASIS3
300      !
301      DO jc = 1, ssnd(kid)%nct
302         DO jm = 1, ssnd(kid)%ncplmodel
303       
304            IF( ssnd(kid)%nid(jc,jm) /= -1 ) THEN
305               CALL oasis_put ( ssnd(kid)%nid(jc,jm), kstep, pdata(nldi:nlei, nldj:nlej,jc), kinfo )
306               
307               IF ( ln_ctl ) THEN       
308                  IF ( kinfo == OASIS_Sent     .OR. kinfo == OASIS_ToRest .OR.   &
309                     & kinfo == OASIS_SentOut  .OR. kinfo == OASIS_ToRestOut ) THEN
310                     WRITE(numout,*) '****************'
311                     WRITE(numout,*) 'oasis_put: Outgoing ', ssnd(kid)%clname
312                     WRITE(numout,*) 'oasis_put: ivarid ', ssnd(kid)%nid(jc,jm)
313                     WRITE(numout,*) 'oasis_put:  kstep ', kstep
314                     WRITE(numout,*) 'oasis_put:   info ', kinfo
315                     WRITE(numout,*) '     - Minimum value is ', MINVAL(pdata(:,:,jc))
316                     WRITE(numout,*) '     - Maximum value is ', MAXVAL(pdata(:,:,jc))
317                     WRITE(numout,*) '     -     Sum value is ', SUM(pdata(:,:,jc))
318                     WRITE(numout,*) '****************'
319                  ENDIF
320               ENDIF
321               
322            ENDIF
323           
324         ENDDO
325      ENDDO
326      !
327    END SUBROUTINE cpl_snd
328
329
330   SUBROUTINE cpl_rcv( kid, kstep, pdata, pmask, kinfo )
331      !!---------------------------------------------------------------------
332      !!              ***  ROUTINE cpl_rcv  ***
333      !!
334      !! ** Purpose : - At each coupling time-step,this routine receives fields
335      !!      like stresses and fluxes from the coupler or remote application.
336      !!----------------------------------------------------------------------
337      INTEGER                   , INTENT(in   ) ::   kid       ! variable index in the array
338      INTEGER                   , INTENT(in   ) ::   kstep     ! ocean time-step in seconds
339      REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   pdata     ! IN to keep the value if nothing is done
340      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pmask     ! coupling mask
341      INTEGER                   , INTENT(  out) ::   kinfo     ! OASIS3 info argument
342      !!
343      INTEGER                                   ::   jc,jm     ! local loop index
344      LOGICAL                                   ::   llaction, llfisrt
345      !!--------------------------------------------------------------------
346      !
347      ! receive local data from OASIS3 on every process
348      !
349      kinfo = OASIS_idle
350      !
351      DO jc = 1, srcv(kid)%nct
352         llfisrt = .TRUE.
353
354         DO jm = 1, srcv(kid)%ncplmodel
355
356            IF( srcv(kid)%nid(jc,jm) /= -1 ) THEN
357
358               CALL oasis_get ( srcv(kid)%nid(jc,jm), kstep, exfld, kinfo )         
359               
360               llaction =  kinfo == OASIS_Recvd   .OR. kinfo == OASIS_FromRest .OR.   &
361                  &        kinfo == OASIS_RecvOut .OR. kinfo == OASIS_FromRestOut
362               
363               IF ( ln_ctl )   WRITE(numout,*) "llaction, kinfo, kstep, ivarid: " , llaction, kinfo, kstep, srcv(kid)%nid(jc,jm)
364               
365               IF ( llaction ) THEN
366                 
367                  kinfo = OASIS_Rcv
368                  IF( llfisrt ) THEN
369                     pdata(nldi:nlei,nldj:nlej,jc) =                                 exfld(:,:) * pmask(nldi:nlei,nldj:nlej,jm)
370                     llfisrt = .FALSE.
371                  ELSE
372                     pdata(nldi:nlei,nldj:nlej,jc) = pdata(nldi:nlei,nldj:nlej,jc) + exfld(:,:) * pmask(nldi:nlei,nldj:nlej,jm)
373                  ENDIF
374                 
375                  IF ( ln_ctl ) THEN       
376                     WRITE(numout,*) '****************'
377                     WRITE(numout,*) 'oasis_get: Incoming ', srcv(kid)%clname
378                     WRITE(numout,*) 'oasis_get: ivarid '  , srcv(kid)%nid(jc,jm)
379                     WRITE(numout,*) 'oasis_get:   kstep', kstep
380                     WRITE(numout,*) 'oasis_get:   info ', kinfo
381                     WRITE(numout,*) '     - Minimum value is ', MINVAL(pdata(:,:,jc))
382                     WRITE(numout,*) '     - Maximum value is ', MAXVAL(pdata(:,:,jc))
383                     WRITE(numout,*) '     -     Sum value is ', SUM(pdata(:,:,jc))
384                     WRITE(numout,*) '****************'
385                  ENDIF
386                 
387               ENDIF
388               
389            ENDIF
390           
391         ENDDO
392
393         !--- Fill the overlap areas and extra hallows (mpp)
394         !--- check periodicity conditions (all cases)
395         IF( .not. llfisrt )   CALL lbc_lnk( pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn )   
396 
397      ENDDO
398      !
399   END SUBROUTINE cpl_rcv
400
401
402   INTEGER FUNCTION cpl_freq( kid ) 
403      !!---------------------------------------------------------------------
404      !!              ***  ROUTINE cpl_freq  ***
405      !!
406      !! ** Purpose : - send back the coupling frequency for a particular field
407      !!----------------------------------------------------------------------
408      INTEGER,INTENT(in) ::   kid   ! variable index
409      !!
410      INTEGER               :: info
411      INTEGER, DIMENSION(1) :: itmp
412      !!----------------------------------------------------------------------
413      CALL oasis_get_freqs(kid, 1, itmp, info)
414      cpl_freq = itmp(1)
415      !
416   END FUNCTION cpl_freq
417
418
419   SUBROUTINE cpl_finalize
420      !!---------------------------------------------------------------------
421      !!              ***  ROUTINE cpl_finalize  ***
422      !!
423      !! ** Purpose : - Finalizes the coupling. If MPI_init has not been
424      !!      called explicitly before cpl_init it will also close
425      !!      MPI communication.
426      !!----------------------------------------------------------------------
427      !
428      DEALLOCATE( exfld )
429      IF (nstop == 0) THEN
430         CALL oasis_terminate( nerror )         
431      ELSE
432         CALL oasis_abort( ncomp_id, "cpl_finalize", "NEMO ABORT STOP" )
433      ENDIF       
434      !
435   END SUBROUTINE cpl_finalize
436
437#if ! defined key_oasis3
438
439   !!----------------------------------------------------------------------
440   !!   No OASIS Library          OASIS3 Dummy module...
441   !!----------------------------------------------------------------------
442
443   SUBROUTINE oasis_init_comp(k1,cd1,k2)
444      CHARACTER(*), INTENT(in   ) ::  cd1
445      INTEGER     , INTENT(  out) ::  k1,k2
446      k1 = -1 ; k2 = -1
447      WRITE(numout,*) 'oasis_init_comp: Error you sould not be there...', cd1
448   END SUBROUTINE oasis_init_comp
449
450   SUBROUTINE oasis_abort(k1,cd1,cd2)
451      INTEGER     , INTENT(in   ) ::  k1
452      CHARACTER(*), INTENT(in   ) ::  cd1,cd2
453      WRITE(numout,*) 'oasis_abort: Error you sould not be there...', cd1, cd2
454   END SUBROUTINE oasis_abort
455
456   SUBROUTINE oasis_get_localcomm(k1,k2)
457      INTEGER     , INTENT(  out) ::  k1,k2
458      k1 = -1 ; k2 = -1
459      WRITE(numout,*) 'oasis_get_localcomm: Error you sould not be there...'
460   END SUBROUTINE oasis_get_localcomm
461
462   SUBROUTINE oasis_def_partition(k1,k2,k3)
463      INTEGER     , INTENT(  out) ::  k1,k3
464      INTEGER     , INTENT(in   ) ::  k2(5)
465      k1 = k2(1) ; k3 = k2(5)
466      WRITE(numout,*) 'oasis_def_partition: Error you sould not be there...'
467   END SUBROUTINE oasis_def_partition
468
469   SUBROUTINE oasis_def_var(k1,cd1,k2,k3,k4,k5,k6,k7)
470      CHARACTER(*), INTENT(in   ) ::  cd1
471      INTEGER     , INTENT(in   ) ::  k2,k3(2),k4,k5(2,2),k6
472      INTEGER     , INTENT(  out) ::  k1,k7
473      k1 = -1 ; k7 = -1
474      WRITE(numout,*) 'oasis_def_var: Error you sould not be there...', cd1
475   END SUBROUTINE oasis_def_var
476
477   SUBROUTINE oasis_enddef(k1)
478      INTEGER     , INTENT(  out) ::  k1
479      k1 = -1
480      WRITE(numout,*) 'oasis_enddef: Error you sould not be there...'
481   END SUBROUTINE oasis_enddef
482 
483   SUBROUTINE oasis_put(k1,k2,p1,k3)
484      REAL(wp), DIMENSION(:,:), INTENT(in   ) ::  p1
485      INTEGER                 , INTENT(in   ) ::  k1,k2
486      INTEGER                 , INTENT(  out) ::  k3
487      k3 = -1
488      WRITE(numout,*) 'oasis_put: Error you sould not be there...'
489   END SUBROUTINE oasis_put
490
491   SUBROUTINE oasis_get(k1,k2,p1,k3)
492      REAL(wp), DIMENSION(:,:), INTENT(  out) ::  p1
493      INTEGER                 , INTENT(in   ) ::  k1,k2
494      INTEGER                 , INTENT(  out) ::  k3
495      p1(1,1) = -1. ; k3 = -1
496      WRITE(numout,*) 'oasis_get: Error you sould not be there...'
497   END SUBROUTINE oasis_get
498
499   SUBROUTINE oasis_get_freqs(k1,k2,k3,k4)
500      INTEGER              , INTENT(in   ) ::  k1,k2
501      INTEGER, DIMENSION(1), INTENT(  out) ::  k3
502      INTEGER              , INTENT(  out) ::  k4
503      k3(1) = k1 ; k4 = k2
504      WRITE(numout,*) 'oasis_get_freqs: Error you sould not be there...'
505   END SUBROUTINE oasis_get_freqs
506
507   SUBROUTINE oasis_terminate(k1)
508      INTEGER     , INTENT(  out) ::  k1
509      k1 = -1
510      WRITE(numout,*) 'oasis_terminate: Error you sould not be there...'
511   END SUBROUTINE oasis_terminate
512   
513#endif
514
515   !!=====================================================================
516END MODULE cpl_oasis3
Note: See TracBrowser for help on using the repository browser.