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_CNRS_2014/NEMOGCM/NEMO/OPA_SRC/SBC – NEMO

source: branches/2014/dev_CNRS_2014/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90 @ 4901

Last change on this file since 4901 was 4901, checked in by cetlod, 9 years ago

2014/dev_CNRS_2014 : merge the 3rd branch onto dev_CNRS_2014, see ticket #1415

  • Property svn:keywords set to Id
File size: 22.8 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, PARAMETER ::   nmaxfld=40        ! Maximum number of coupling fields
64   INTEGER, PARAMETER ::   nmaxcat=5    ! Maximum number of coupling fields
65   INTEGER, 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$
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      DO ji = 1, krcv
231         IF ( srcv(ji)%laction ) THEN
232           
233            IF( srcv(ji)%nct > nmaxcat ) THEN
234               CALL oasis_abort ( ncomp_id, 'cpl_define', 'Number of categories of '//   &
235                  &              TRIM(srcv(ji)%clname)//' is larger than nmaxcat, increase nmaxcat' )
236               RETURN
237            ENDIF
238           
239            DO jc = 1, srcv(ji)%nct
240               DO jm = 1, kcplmodel
241                 
242                  IF ( srcv(ji)%nct .GT. 1 ) THEN
243                     WRITE(cli2,'(i2.2)') jc
244                     zclname = TRIM(srcv(ji)%clname)//'_cat'//cli2
245                  ELSE
246                     zclname = srcv(ji)%clname
247                  ENDIF
248                  IF ( kcplmodel  > 1 ) THEN
249                     WRITE(cli2,'(i2.2)') jm
250                     zclname = 'model'//cli2//'_'//TRIM(zclname)
251                  ENDIF
252#if defined key_agrif
253                  IF( agrif_fixed() /= 0 ) THEN
254                     zclname=TRIM(Agrif_CFixed())//'_'//TRIM(zclname)
255                  END IF
256#endif
257                  IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_In
258                  CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part   , (/ 2, 0 /),   &
259                     &                OASIS_In           , ishape , OASIS_REAL, nerror )
260                  IF ( nerror /= OASIS_Ok ) THEN
261                     WRITE(numout,*) 'Failed to define transient ', ji, jc, jm, " "//TRIM(zclname)
262                     CALL oasis_abort ( srcv(ji)%nid(jc,jm), 'cpl_define', 'Failure in oasis_def_var' )
263                  ENDIF
264                  IF( ln_ctl .AND. srcv(ji)%nid(jc,jm) /= -1 ) WRITE(numout,*) "variable defined in the namcouple"
265                  IF( ln_ctl .AND. srcv(ji)%nid(jc,jm) == -1 ) WRITE(numout,*) "variable NOT defined in the namcouple"
266
267               END DO
268            END DO
269         ENDIF
270      END DO
271     
272      !------------------------------------------------------------------
273      ! End of definition phase
274      !------------------------------------------------------------------
275     
276      CALL oasis_enddef(nerror)
277      IF( nerror /= OASIS_Ok )   CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef')
278      !
279   END SUBROUTINE cpl_define
280   
281   
282   SUBROUTINE cpl_snd( kid, kstep, pdata, kinfo )
283      !!---------------------------------------------------------------------
284      !!              ***  ROUTINE cpl_snd  ***
285      !!
286      !! ** Purpose : - At each coupling time-step,this routine sends fields
287      !!      like sst or ice cover to the coupler or remote application.
288      !!----------------------------------------------------------------------
289      INTEGER                   , INTENT(in   ) ::   kid       ! variable index in the array
290      INTEGER                   , INTENT(  out) ::   kinfo     ! OASIS3 info argument
291      INTEGER                   , INTENT(in   ) ::   kstep     ! ocean time-step in seconds
292      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pdata
293      !!
294      INTEGER                                   ::   jc,jm     ! local loop index
295      !!--------------------------------------------------------------------
296      !
297      ! snd data to OASIS3
298      !
299      DO jc = 1, ssnd(kid)%nct
300         DO jm = 1, ssnd(kid)%ncplmodel
301       
302            IF( ssnd(kid)%nid(jc,jm) /= -1 ) THEN
303               CALL oasis_put ( ssnd(kid)%nid(jc,jm), kstep, pdata(nldi:nlei, nldj:nlej,jc), kinfo )
304               
305               IF ( ln_ctl ) THEN       
306                  IF ( kinfo == OASIS_Sent     .OR. kinfo == OASIS_ToRest .OR.   &
307                     & kinfo == OASIS_SentOut  .OR. kinfo == OASIS_ToRestOut ) THEN
308                     WRITE(numout,*) '****************'
309                     WRITE(numout,*) 'oasis_put: Outgoing ', ssnd(kid)%clname
310                     WRITE(numout,*) 'oasis_put: ivarid ', ssnd(kid)%nid(jc,jm)
311                     WRITE(numout,*) 'oasis_put:  kstep ', kstep
312                     WRITE(numout,*) 'oasis_put:   info ', kinfo
313                     WRITE(numout,*) '     - Minimum value is ', MINVAL(pdata(:,:,jc))
314                     WRITE(numout,*) '     - Maximum value is ', MAXVAL(pdata(:,:,jc))
315                     WRITE(numout,*) '     -     Sum value is ', SUM(pdata(:,:,jc))
316                     WRITE(numout,*) '****************'
317                  ENDIF
318               ENDIF
319               
320            ENDIF
321           
322         ENDDO
323      ENDDO
324      !
325    END SUBROUTINE cpl_snd
326
327
328   SUBROUTINE cpl_rcv( kid, kstep, pdata, pmask, kinfo )
329      !!---------------------------------------------------------------------
330      !!              ***  ROUTINE cpl_rcv  ***
331      !!
332      !! ** Purpose : - At each coupling time-step,this routine receives fields
333      !!      like stresses and fluxes from the coupler or remote application.
334      !!----------------------------------------------------------------------
335      INTEGER                   , INTENT(in   ) ::   kid       ! variable index in the array
336      INTEGER                   , INTENT(in   ) ::   kstep     ! ocean time-step in seconds
337      REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   pdata     ! IN to keep the value if nothing is done
338      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pmask     ! coupling mask
339      INTEGER                   , INTENT(  out) ::   kinfo     ! OASIS3 info argument
340      !!
341      INTEGER                                   ::   jc,jm     ! local loop index
342      LOGICAL                                   ::   llaction, llfisrt
343      !!--------------------------------------------------------------------
344      !
345      ! receive local data from OASIS3 on every process
346      !
347      kinfo = OASIS_idle
348      !
349      DO jc = 1, srcv(kid)%nct
350         llfisrt = .TRUE.
351
352         DO jm = 1, srcv(kid)%ncplmodel
353
354            IF( srcv(kid)%nid(jc,jm) /= -1 ) THEN
355
356               CALL oasis_get ( srcv(kid)%nid(jc,jm), kstep, exfld, kinfo )         
357               
358               llaction =  kinfo == OASIS_Recvd   .OR. kinfo == OASIS_FromRest .OR.   &
359                  &        kinfo == OASIS_RecvOut .OR. kinfo == OASIS_FromRestOut
360               
361               IF ( ln_ctl )   WRITE(numout,*) "llaction, kinfo, kstep, ivarid: " , llaction, kinfo, kstep, srcv(kid)%nid(jc,jm)
362               
363               IF ( llaction ) THEN
364                 
365                  kinfo = OASIS_Rcv
366                  IF( llfisrt ) THEN
367                     pdata(nldi:nlei,nldj:nlej,jc) =                                 exfld(:,:) * pmask(nldi:nlei,nldj:nlej,jm)
368                     llfisrt = .FALSE.
369                  ELSE
370                     pdata(nldi:nlei,nldj:nlej,jc) = pdata(nldi:nlei,nldj:nlej,jc) + exfld(:,:) * pmask(nldi:nlei,nldj:nlej,jm)
371                  ENDIF
372                 
373                  IF ( ln_ctl ) THEN       
374                     WRITE(numout,*) '****************'
375                     WRITE(numout,*) 'oasis_get: Incoming ', srcv(kid)%clname
376                     WRITE(numout,*) 'oasis_get: ivarid '  , srcv(kid)%nid(jc,jm)
377                     WRITE(numout,*) 'oasis_get:   kstep', kstep
378                     WRITE(numout,*) 'oasis_get:   info ', kinfo
379                     WRITE(numout,*) '     - Minimum value is ', MINVAL(pdata(:,:,jc))
380                     WRITE(numout,*) '     - Maximum value is ', MAXVAL(pdata(:,:,jc))
381                     WRITE(numout,*) '     -     Sum value is ', SUM(pdata(:,:,jc))
382                     WRITE(numout,*) '****************'
383                  ENDIF
384                 
385               ENDIF
386               
387            ENDIF
388           
389         ENDDO
390
391         !--- Fill the overlap areas and extra hallows (mpp)
392         !--- check periodicity conditions (all cases)
393         IF( .not. llfisrt )   CALL lbc_lnk( pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn )   
394 
395      ENDDO
396      !
397   END SUBROUTINE cpl_rcv
398
399
400   INTEGER FUNCTION cpl_freq( kid ) 
401      !!---------------------------------------------------------------------
402      !!              ***  ROUTINE cpl_freq  ***
403      !!
404      !! ** Purpose : - send back the coupling frequency for a particular field
405      !!----------------------------------------------------------------------
406      INTEGER,INTENT(in) ::   kid   ! variable index
407      !!
408      INTEGER :: info
409      !!----------------------------------------------------------------------
410      CALL oasis_get_freqs(kid, 1, cpl_freq, info)
411      !
412   END FUNCTION cpl_freq
413
414
415   SUBROUTINE cpl_finalize
416      !!---------------------------------------------------------------------
417      !!              ***  ROUTINE cpl_finalize  ***
418      !!
419      !! ** Purpose : - Finalizes the coupling. If MPI_init has not been
420      !!      called explicitly before cpl_init it will also close
421      !!      MPI communication.
422      !!----------------------------------------------------------------------
423      !
424      DEALLOCATE( exfld )
425      IF (nstop == 0) THEN
426         CALL oasis_terminate( nerror )         
427      ELSE
428         CALL oasis_abort( ncomp_id, "cpl_finalize", "NEMO ABORT STOP" )
429      ENDIF       
430      !
431   END SUBROUTINE cpl_finalize
432
433#if ! defined key_oasis3
434
435   !!----------------------------------------------------------------------
436   !!   No OASIS Library          OASIS3 Dummy module...
437   !!----------------------------------------------------------------------
438
439   SUBROUTINE oasis_init_comp(k1,cd1,k2)
440      CHARACTER(*), INTENT(in   ) ::  cd1
441      INTEGER     , INTENT(  out) ::  k1,k2
442      k1 = -1 ; k2 = -1
443      WRITE(numout,*) 'oasis_init_comp: Error you sould not be there...', cd1
444   END SUBROUTINE oasis_init_comp
445
446   SUBROUTINE oasis_abort(k1,cd1,cd2)
447      INTEGER     , INTENT(in   ) ::  k1
448      CHARACTER(*), INTENT(in   ) ::  cd1,cd2
449      WRITE(numout,*) 'oasis_abort: Error you sould not be there...', cd1, cd2
450   END SUBROUTINE oasis_abort
451
452   SUBROUTINE oasis_get_localcomm(k1,k2)
453      INTEGER     , INTENT(  out) ::  k1,k2
454      k1 = -1 ; k2 = -1
455      WRITE(numout,*) 'oasis_get_localcomm: Error you sould not be there...'
456   END SUBROUTINE oasis_get_localcomm
457
458   SUBROUTINE oasis_def_partition(k1,k2,k3)
459      INTEGER     , INTENT(  out) ::  k1,k3
460      INTEGER     , INTENT(in   ) ::  k2(5)
461      k1 = k2(1) ; k3 = k2(5)
462      WRITE(numout,*) 'oasis_def_partition: Error you sould not be there...'
463   END SUBROUTINE oasis_def_partition
464
465   SUBROUTINE oasis_def_var(k1,cd1,k2,k3,k4,k5,k6,k7)
466      CHARACTER(*), INTENT(in   ) ::  cd1
467      INTEGER     , INTENT(in   ) ::  k2,k3(2),k4,k5(2,2),k6
468      INTEGER     , INTENT(  out) ::  k1,k7
469      k1 = -1 ; k7 = -1
470      WRITE(numout,*) 'oasis_def_var: Error you sould not be there...', cd1
471   END SUBROUTINE oasis_def_var
472
473   SUBROUTINE oasis_enddef(k1)
474      INTEGER     , INTENT(  out) ::  k1
475      k1 = -1
476      WRITE(numout,*) 'oasis_enddef: Error you sould not be there...'
477   END SUBROUTINE oasis_enddef
478 
479   SUBROUTINE oasis_put(k1,k2,p1,k3)
480      REAL(wp), DIMENSION(:,:), INTENT(in   ) ::  p1
481      INTEGER                 , INTENT(in   ) ::  k1,k2
482      INTEGER                 , INTENT(  out) ::  k3
483      k3 = -1
484      WRITE(numout,*) 'oasis_put: Error you sould not be there...'
485   END SUBROUTINE oasis_put
486
487   SUBROUTINE oasis_get(k1,k2,p1,k3)
488      REAL(wp), DIMENSION(:,:), INTENT(  out) ::  p1
489      INTEGER                 , INTENT(in   ) ::  k1,k2
490      INTEGER                 , INTENT(  out) ::  k3
491      p1(1,1) = -1. ; k3 = -1
492      WRITE(numout,*) 'oasis_get: Error you sould not be there...'
493   END SUBROUTINE oasis_get
494
495   SUBROUTINE oasis_get_freqs(k1,k2,k3,k4)
496      INTEGER     , INTENT(in   ) ::  k1,k2
497      INTEGER     , INTENT(  out) ::  k3,k4
498      k3 = k1 ; k4 = k2
499      WRITE(numout,*) 'oasis_get_freqs: Error you sould not be there...'
500   END SUBROUTINE oasis_get_freqs
501
502   SUBROUTINE oasis_terminate(k1)
503      INTEGER     , INTENT(  out) ::  k1
504      k1 = -1
505      WRITE(numout,*) 'oasis_terminate: Error you sould not be there...'
506   END SUBROUTINE oasis_terminate
507   
508#endif
509
510   !!=====================================================================
511END MODULE cpl_oasis3
Note: See TracBrowser for help on using the repository browser.