WAVEWATCH III  beta 0.0.1
w3oacpmd Module Reference

Data Types

type  cpl_field
 

Functions/Subroutines

subroutine, public cpl_oasis_init (ID_LCOMM)
 
subroutine, public cpl_oasis_grid (LD_MASTER, ID_LCOMM)
 
subroutine, public cpl_oasis_define (NDSO, RCV_STR, SND_STR)
 
subroutine, public cpl_oasis_snd (ID_NB, ID_TIME, RDA_FIELD, LD_ACTION)
 
subroutine, public cpl_oasis_rcv (ID_NB, ID_TIME, RDA_FIELD, LD_ACTION)
 
subroutine, public cpl_oasis_finalize
 

Variables

integer, public il_nb_rcv
 
integer, public il_nb_snd
 
type(cpl_field), dimension(ip_maxfld), public rcv_fld
 
type(cpl_field), dimension(ip_maxfld), public snd_fld
 
integer, public id_oasis_time =0
 
logical, public cplt0
 

Function/Subroutine Documentation

◆ cpl_oasis_define()

subroutine, public w3oacpmd::cpl_oasis_define ( integer, intent(in)  NDSO,
character(len=1024), intent(in)  RCV_STR,
character(len=1024), intent(in)  SND_STR 
)

Definition at line 364 of file w3oacpmd.F90.

364  !/
365  !/ +-----------------------------------+
366  !/ | WAVEWATCH III NOAA/NCEP |
367  !/ | A. Thevenin |
368  !/ | V. Garnier |
369  !/ | M. Accensi |
370  !/ | FORTRAN 90 |
371  !/ | Last update : 08-Jun-2018 |
372  !/ +-----------------------------------+
373  !/
374  !/ Jul-2013 : Origination. ( version 4.18 )
375  !/ April-2016 : Add coupling for unstructured grids ( version 5.07 )
376  !/ (R. Baraille & J. Pianezze)
377  !/ April-2016 : Add comments (J. Pianezze) ( version 5.07 )
378  !/ 08-Jun-2018 : use INIT_GET_ISEA ( version 6.04 )
379  !/
380  ! 1. Purpose :
381  !
382  ! Partition definition and coupling fields declaration
383  !
384  ! 2. Method :
385  ! 3. Parameters :
386  !
387  ! Parameter list
388  ! ----------------------------------------------------------------
389  ! NDSO Int. I Id. of the output file
390  ! RCV_STR Char. I Name of receive fields
391  ! SND_STR Char. I Name of send fields
392  ! ----------------------------------------------------------------
393  !
394  ! 4. Subroutines used :
395  !
396  ! Name Type Module Description
397  ! ----------------------------------------------------------------
398  ! GET_LIST_EXCH_FIELD Subr. W3OACPMD List of the exchanged fields
399  ! ----------------------------------------------------------------
400  !
401  ! 5. Called by :
402  !
403  ! Name Type Module Description
404  ! ----------------------------------------------------------------
405  ! WW3_SHEL Prog. - Main program
406  ! ----------------------------------------------------------------
407  !
408  ! 6. Error messages :
409  ! 7. Remarks :
410  ! 8. Structure :
411  ! 9. Switches :
412  ! 10. Source code :
413  !
414  !/ ------------------------------------------------------------------- /
415  !
416  USE w3gdatmd, ONLY: nseal,nsea, nx, ny, mapsta, mapsf, gtype, &
418  USE w3odatmd, ONLY: naproc, iaproc
419  USE w3parall, ONLY : init_get_isea
420  !
421  !/ ------------------------------------------------------------------- /
422  !/ Parameter list
423  !/
424  INTEGER, INTENT(IN) :: NDSO
425  CHARACTER(LEN=1024), INTENT(IN) :: RCV_STR,SND_STR
426  !/
427  !/ ------------------------------------------------------------------- /
428  !/ Local parameters
429  !/
430  INTEGER :: IB_I,I
431  INTEGER :: IL_PART_ID ! PartitionID
432  INTEGER, ALLOCATABLE, DIMENSION(:) :: ILA_PARAL ! Description of the local partition in the global index space
433  INTEGER, DIMENSION(4) :: ILA_SHAPE ! Vector giving the min & max index for each dim of the fields
434  INTEGER, DIMENSION(2) :: ILA_VAR_NODIMS ! rank of fields & number of bundles (1 with OASIS3-MCT)
435  INTEGER :: ISEA, JSEA, IX, IY
436  INTEGER :: NHXW, NHXE, NHYS, NHYN ! size of the halo at the western, eastern, southern, northern boundaries
437  LOGICAL :: LL_MPI_FILE ! to check if there an mpi.txt file for domain decompasition
438  !/
439  !/ ------------------------------------------------------------------- /
440  !/ Executable part
441  !/
442  !
443  IF (gtype .EQ. rlgtype .OR. gtype .EQ. clgtype) THEN
444  !
445  ! 1.1. regular and curvilinear grids
446  ! ----------------------------------
447  nhxw = 1 ; nhxe = nx ; nhys = 1 ; nhyn = ny
448  nhxw = nhxw - 1
449  nhxe = nx - nhxe
450  nhys = nhys - 1
451  nhyn = ny - nhyn
452  !
453  ALLOCATE(ila_paral(2+nseal*2))
454  !
455  ! * Define the partition : OASIS ORANGE partition
456  ila_paral(1) = 3
457  !
458  ! * total number of segments of the global domain
459  ila_paral(2) = nseal
460  !
461  DO jsea=1, nseal
462  CALL init_get_isea(isea,jsea)
463 
464  ix = mapsf(isea,1)
465  iy = mapsf(isea,2)
466  ila_paral(jsea*2+1) = (iy - nhyn -1)*(nx - nhxe - nhxw) + (ix - nhxw - 1)
467  ila_paral(jsea*2+2) = 1
468  END DO
469 #ifdef W3_SMC
470  ELSE IF( gtype .EQ. smctype ) THEN
471  !
472  ! 1.2. SMC grids
473  ! ----------------------------------
474  ALLOCATE(ila_paral(2+nseal))
475  !
476  ! * Define the partition : OASIS POINTS partition
477  ila_paral(1) = 4
478  !
479  ! * total number of segments of the global domain
480  ila_paral(2) = nseal
481  !
482  DO jsea=1, nseal
483  ila_paral(jsea+2) = iaproc + (jsea-1)*naproc
484  ENDDO
485 #endif
486  !
487  ELSE
488  !
489  ! 1.3. Unstructured grids
490  ! ----------------------------------
491  WRITE(*,*) 'TO BE VERIFIED FOR UNSTRUCTURED GRIDS'
492  stop
493  !
494  DO jsea=1,nseal
495  ila_paral(jsea*2+1) = (iaproc-1) + (jsea-1)*naproc
496  ila_paral(jsea*2+2) = 1
497  END DO
498  !
499  ENDIF
500  !
501  ! 2. Partition definition
502  ! ----------------------------------
503  CALL oasis_def_partition(il_part_id, ila_paral,il_err,nnodes)
504  IF(il_err /= 0) THEN
505  CALL oasis_abort(il_compid, 'CPL_OASIS_DEFINE', 'Problem during oasis_def_partition')
506  ENDIF
507  !
508  ! 3. Coupling fields declaration
509  ! ----------------------------------
510  ila_shape(:) = (/1, nseal, 1, 1 /)
511  !
512  ila_var_nodims(1) = 2 ! rank of fields array
513  ila_var_nodims(2) = 1 ! always 1 with OASIS3-MCT 2.0
514  !
515  CALL get_list_exch_field(ndso, rcv_fld, snd_fld, il_nb_rcv, il_nb_snd, rcv_str, snd_str)
516  !
517  ! 3.1 Send coupling fields
518  ! ----------------------------------
519  DO ib_i = 1, il_nb_snd
520  CALL oasis_def_var (snd_fld(ib_i)%IL_FIELD_ID &
521  & , snd_fld(ib_i)%CL_FIELD_NAME &
522  & , il_part_id &
523  & , ila_var_nodims &
524  & , oasis_out &
525  & , ila_shape &
526  & , oasis_real &
527  & , il_err )
528 
529  IF (il_err /= 0) THEN
530  CALL oasis_abort(il_compid, 'CPL_OASIS_DEFINE', 'Problem during oasis_def_var')
531  ENDIF
532  ENDDO
533  !
534  ! 3.2 Received coupling fields
535  ! ----------------------------------
536  DO ib_i = 1, il_nb_rcv
537  CALL oasis_def_var (rcv_fld(ib_i)%IL_FIELD_ID &
538  & , rcv_fld(ib_i)%CL_FIELD_NAME &
539  & , il_part_id &
540  & , ila_var_nodims &
541  & , oasis_in &
542  & , ila_shape &
543  & , oasis_real &
544  & , il_err )
545  !
546  IF (il_err /= 0) THEN
547  CALL oasis_abort(il_compid, 'CPL_OASIS_DEFINE', 'Problem during oasis_def_var')
548  ENDIF
549  ENDDO
550  !
551  ! 4. End of definition phase
552  ! ----------------------------------
553  CALL oasis_enddef(il_err)
554 
555  IF (il_err /= 0) THEN
556  CALL oasis_abort(il_compid, 'CPL_OASIS_DEFINE', 'Problem during oasis_enddef')
557  ENDIF
558  !
559  !/ ------------------------------------------------------------------- /

References w3gdatmd::clgtype, w3gdatmd::gtype, w3odatmd::iaproc, il_nb_rcv, il_nb_snd, w3parall::init_get_isea(), w3gdatmd::mapsf, w3gdatmd::mapsta, w3odatmd::naproc, w3gdatmd::nsea, w3gdatmd::nseal, w3gdatmd::nx, w3gdatmd::ny, rcv_fld, w3gdatmd::rlgtype, w3gdatmd::smctype, snd_fld, and w3gdatmd::ungtype.

Referenced by w3shel().

◆ cpl_oasis_finalize()

subroutine, public w3oacpmd::cpl_oasis_finalize

Definition at line 705 of file w3oacpmd.F90.

705  !/
706  !/ +-----------------------------------+
707  !/ | WAVEWATCH III NOAA/NCEP |
708  !/ | A. Thevenin |
709  !/ | FORTRAN 90 |
710  !/ | Last update : April-2016 |
711  !/ +-----------------------------------+
712  !/
713  !/ Jul-2013 : Origination. ( version 4.18 )
714  !/ April-2016 : Add comments (J. Pianezze) ( version 5.07 )
715  !/
716  ! 1. Purpose :
717  !
718  ! Terminate the coupling
719  !
720  ! 2. Method :
721  ! 3. Parameters :
722  ! 4. Subroutines used :
723  ! 5. Called by :
724  !
725  ! Name Type Module Description
726  ! ----------------------------------------------------------------
727  ! WW3_SHEL Prog. - Main program
728  ! ----------------------------------------------------------------
729  !
730  ! 6. Error messages :
731  ! 7. Remarks :
732  ! 8. Structure :
733  ! 9. Switches :
734  ! 10. Source code :
735  !
736  !/ ------------------------------------------------------------------- /
737  !/ Executable part
738  !/
739  CALL oasis_terminate(il_err)
740  !
741  IF (il_err /= 0) THEN
742  CALL oasis_abort(il_compid, 'CPL_OASIS_FINALIZE', 'Problem during oasis_terminate')
743  ENDIF
744  !
745  !/ ------------------------------------------------------------------- /

References w3servmd::strsplit().

Referenced by w3shel().

◆ cpl_oasis_grid()

subroutine, public w3oacpmd::cpl_oasis_grid ( logical, intent(in)  LD_MASTER,
integer, intent(in)  ID_LCOMM 
)

Definition at line 155 of file w3oacpmd.F90.

155  !/
156  !/ +-----------------------------------+
157  !/ | WAVEWATCH III NOAA/NCEP |
158  !/ | A. Thevenin |
159  !/ | V. Garnier |
160  !/ | M. Accensi |
161  !/ | FORTRAN 90 |
162  !/ | Last update : April-2016 |
163  !/ +-----------------------------------+
164  !/
165  !/ Jul-2013 : Origination. ( version 4.18 )
166  !/ April-2016 : Add comments (J. Pianezze) ( version 5.07 )
167  !/ Sept-2016 : Correct bug MPI (J. Pianezze) ( version 5.12 )
168  !/
169  ! 1. Purpose :
170  !
171  ! Grid data file definition
172  !
173  ! 2. Method :
174  ! 3. Parameters :
175  !
176  ! Parameter list
177  ! ----------------------------------------------------------------
178  ! LD_MASTER Bool. I Flag to know the master process
179  ! ID_LCOMM Int. I MPI communicator
180  ! ----------------------------------------------------------------
181  !
182  ! 4. Subroutines used :
183  ! 5. Called by :
184  !
185  ! Name Type Module Description
186  ! ----------------------------------------------------------------
187  ! WW3_SHEL Prog. - Main program
188  ! ----------------------------------------------------------------
189  !
190  ! 6. Error messages :
191  ! 7. Remarks :
192  ! 8. Structure :
193  ! 9. Switches :
194  ! 10. Source code :
195  !
196  !/ ------------------------------------------------------------------- /
197  !
198  USE constants, ONLY: radius, dera
199  USE w3gdatmd, ONLY: nx, ny, flagll, xgrd, ygrd, mapsta, &
200  & hpfac, hqfac, gtype, &
202 #ifdef W3_SMC
203  USE w3gdatmd, ONLY: nsea, x0, y0, mrfct, sx, sy, ijkcel
204 #endif
205 #ifdef W3_MPI
206  include "mpif.h"
207 #endif
208  !
209  !/ ------------------------------------------------------------------- /
210  !/ Parameter list
211  !/
212  LOGICAL, INTENT(IN) :: LD_MASTER ! MASTER process or not
213  INTEGER, INTENT(IN) :: ID_LCOMM ! Model local communicator
214  !
215  !/ ------------------------------------------------------------------- /
216  !/ Local parameters
217  !/
218  INTEGER, ALLOCATABLE :: MASK(:,:)
219  INTEGER :: I, IX, IY, NXW, NXE, NYS, NYN, INODE, IERR_MPI
220  REAL, ALLOCATABLE :: LON(:,:),LAT(:,:),AREA(:,:), &
221  CORLON(:,:,:),CORLAT(:,:,:)
222  REAL :: FACTOR
223 #ifdef W3_SMC
224  REAL :: DLON, DLAT
225 #endif
226  !/ ------------------------------------------------------------------- /
227  !
228  IF (ld_master) THEN
229  !
230  !
231  ! 0. Create grids file
232  ! --------------------------------
233  CALL oasis_start_grids_writing(ierr_mpi)
234  !
235  ! 1. Get the lat/lon/corners,areas and masks
236  ! -------------------------------------------
237  IF (gtype .EQ. rlgtype .OR. gtype .EQ. clgtype) THEN
238  !
239  IF (flagll) THEN
240  factor = 1.
241  ELSE
242  factor = 1. / (radius * dera)
243  END IF
244  !
245  ! 1.1. regular and curvilinear grids
246  ! ----------------------------------
247  nnodes = nx*ny
248  nxw=1
249  nxe=nx
250  nys=1
251  nyn=ny
252  !
253  ! lat/lon
254  ALLOCATE ( lon(nnodes,1), lat(nnodes,1) )
255  i = 0
256  DO iy = nys, nyn
257  DO ix = nxw, nxe
258  i = i+1
259  lon(i,1)=xgrd(iy,ix)*factor
260  lat(i,1)=ygrd(iy,ix)*factor
261  END DO
262  END DO
263  !
264  ! areas, corners
265  ALLOCATE ( area(nnodes,1), corlon(nnodes,1,4), corlat(nnodes,1,4) )
266  i = 0
267  DO iy = nys, nyn
268  DO ix = nxw, nxe
269  i = i+1
270  corlon(i,1,1)=lon(i,1)+hpfac(iy,ix)/2.*factor
271  corlon(i,1,2)=lon(i,1)-hpfac(iy,ix)/2.*factor
272  corlon(i,1,3)=lon(i,1)-hpfac(iy,ix)/2.*factor
273  corlon(i,1,4)=lon(i,1)+hpfac(iy,ix)/2.*factor
274  corlat(i,1,1)=lat(i,1)+hqfac(iy,ix)/2.*factor
275  corlat(i,1,2)=lat(i,1)+hqfac(iy,ix)/2.*factor
276  corlat(i,1,3)=lat(i,1)-hqfac(iy,ix)/2.*factor
277  corlat(i,1,4)=lat(i,1)-hqfac(iy,ix)/2.*factor
278  area(i,1)=hpfac(iy,ix)*hqfac(iy,ix)
279  END DO
280  END DO
281  !
282  ! Model grid mask
283  ALLOCATE ( mask(nnodes,1) )
284  i = 0
285  DO iy = nys, nyn
286  DO ix = nxw, nxe
287  i = i+1
288  ! Get the mask : 0 - sea / 1 - open boundary cells (the land is already excluded)
289  IF ((mapsta(iy,ix) .EQ. 1)) THEN
290  mask(i,1) = 0
291  ELSE
292  mask(i,1) = 1
293  END IF
294  END DO
295  END DO
296 #ifdef W3_SMC
297  ELSE IF( gtype .EQ. smctype ) THEN
298  !
299  ! 1.2. SMC grids
300  ! ----------------------------------
301  nnodes = nsea
302  !
303  ! Calculate the smallest grid cell increments depending on the number of SMC levels
304  dlon = sx / mrfct
305  dlat = sy / mrfct
306  !
307  ALLOCATE ( lon(nnodes,1), lat(nnodes,1) )
308  ALLOCATE ( area(nnodes,1), corlon(nnodes,1,4), corlat(nnodes,1,4) )
309  ALLOCATE ( mask(nnodes,1) )
310  DO i=1, nnodes
311  ! lat/lon
312  lon(i,1) = x0 + (ijkcel(1,i) + ijkcel(3,i)*0.5)*dlon
313  lat(i,1) = y0 + (ijkcel(2,i) + ijkcel(4,i)*0.5)*dlat
314  ! corners
315  corlon(i,1,1) = x0 + ijkcel(1,i)*dlon
316  corlon(i,1,2) = x0 + (ijkcel(1,i) + ijkcel(3,i))*dlon
317  corlon(i,1,3) = corlon(i,1,2)
318  corlon(i,1,4) = corlon(i,1,1)
319  corlat(i,1,1) = y0 + ijkcel(2,i)*dlat
320  corlat(i,1,2)=corlat(i,1,1)
321  corlat(i,1,3) = y0 + (ijkcel(2,i) + ijkcel(4,i))*dlat
322  corlat(i,1,4)=corlat(i,1,3)
323  ! areas
324  area(i,1) = 0.25 * ijkcel(3,i)*dlon * ijkcel(4,i)*dlat
325  ! Model grid mask
326  mask(i,1) = 1
327  ENDDO
328 #endif
329  !
330  ELSE
331  !
332  ! 1.3. Unstructured grids
333  ! ----------------------------------
334  WRITE(*,*) 'TO BE IMPLEMENT FOR UNSTRUCTURED GRIDS'
335  stop
336  END IF
337  !
338  CALL oasis_write_grid('ww3t',nnodes,1,lon,lat)
339  CALL oasis_write_corner('ww3t',nnodes,1,4,corlon,corlat)
340  CALL oasis_write_area('ww3t',nnodes,1,area)
341  CALL oasis_write_mask('ww3t',nnodes,1,mask)
342  !
343  ! 2. Terminate grid writing
344  ! -------------------------
345  CALL oasis_terminate_grids_writing()
346  !
347  DEALLOCATE(lon)
348  DEALLOCATE(lat)
349  DEALLOCATE(corlon)
350  DEALLOCATE(corlat)
351  DEALLOCATE(area)
352  DEALLOCATE(mask)
353  !
354  ENDIF
355  !
356 #ifdef W3_MPI
357  CALL mpi_bcast(nnodes,1,mpi_integer,0,id_lcomm,ierr_mpi)
358 #endif
359  !
360  !/ ------------------------------------------------------------------- /

References w3gdatmd::clgtype, constants::dera, w3gdatmd::flagll, w3gdatmd::gtype, w3gdatmd::hpfac, w3gdatmd::hqfac, w3gdatmd::ijkcel, include(), w3gdatmd::mapsta, w3gdatmd::mrfct, w3gdatmd::nsea, w3gdatmd::nx, w3gdatmd::ny, constants::radius, w3gdatmd::rlgtype, w3gdatmd::smctype, w3gdatmd::sx, w3gdatmd::sy, w3gdatmd::ungtype, w3gdatmd::x0, w3gdatmd::xgrd, w3gdatmd::y0, and w3gdatmd::ygrd.

Referenced by w3shel().

◆ cpl_oasis_init()

subroutine, public w3oacpmd::cpl_oasis_init ( integer, intent(out)  ID_LCOMM)

Definition at line 93 of file w3oacpmd.F90.

93  !/
94  !/ +-----------------------------------+
95  !/ | WAVEWATCH III NOAA/NCEP |
96  !/ | A. Thevenin |
97  !/ | FORTRAN 90 |
98  !/ | Last update : April-2016 |
99  !/ +-----------------------------------+
100  !/
101  !/ Jul-2013 : Origination. ( version 4.18 )
102  !/ April-2016 : Add comments (J. Pianezze) ( version 5.07 )
103  !/
104  ! 1. Purpose :
105  !
106  ! Initialize the coupling
107  !
108  ! 2. Method :
109  ! 3. Parameters :
110  !
111  ! Parameter list
112  ! ----------------------------------------------------------------
113  ! ID_LCOMM Int. O MPI communicator
114  ! ----------------------------------------------------------------
115  !
116  ! 4. Subroutines used :
117  !
118  ! 5. Called by :
119  !
120  ! Name Type Module Description
121  ! ----------------------------------------------------------------
122  ! WW3_SHEL Prog. - Main program
123  ! ----------------------------------------------------------------
124  !
125  ! 6. Error messages :
126  ! 7. Remarks :
127  ! 8. Structure :
128  ! 9. Switches :
129  ! 10. Source code :
130  !
131  !/ ------------------------------------------------------------------- /
132  !
133  ! * Argument
134  INTEGER, INTENT(OUT) :: ID_LCOMM ! Model local communicator
135  !
136  !----------------------------------------------------------------------
137  ! * Executable part
138  !
139  !! Initialize the coupling
140  CALL oasis_init_comp(il_compid, cl_model_name, il_err)
141  IF (il_err /= 0) THEN
142  CALL oasis_abort(il_compid, 'CPL_OASIS_INIT', 'Problem during oasis_init_comp')
143  ENDIF
144  !
145  !! Get the value of a local MPI communicator to be used by WW3 for its internal parallelisation
146  CALL oasis_get_localcomm(id_lcomm, il_err)
147  IF (il_err /= 0) THEN
148  CALL oasis_abort(il_compid, 'CPL_OASIS_INIT', 'Problem during oasis_get_localcomm')
149  ENDIF
150  !
151  !/ ------------------------------------------------------------------- /

Referenced by w3shel().

◆ cpl_oasis_rcv()

subroutine, public w3oacpmd::cpl_oasis_rcv ( integer, intent(in)  ID_NB,
integer, intent(in)  ID_TIME,
real(kind=8), dimension(:,:), intent(out)  RDA_FIELD,
logical, intent(out)  LD_ACTION 
)

Definition at line 634 of file w3oacpmd.F90.

634  !/
635  !/ +-----------------------------------+
636  !/ | WAVEWATCH III NOAA/NCEP |
637  !/ | A. Thevenin |
638  !/ | FORTRAN 90 |
639  !/ | Last update : April-2016 |
640  !/ +-----------------------------------+
641  !/
642  !/ Jul-2013 : Origination. ( version 4.18 )
643  !/ April-2016 : Add comments (J. Pianezze) ( version 5.07 )
644  !/
645  ! 1. Purpose :
646  !
647  ! In the model time step loop, each process receives its parts of the coupling field
648  !
649  ! 2. Method :
650  ! 3. Parameters :
651  !
652  ! Parameter list
653  ! ----------------------------------------------------------------
654  ! ID_NB Int. I Number of the field to be received
655  ! ID_TIME Int. I Ocean time-step in seconds
656  ! RDA_FIELD Real I Coupling field array to be received
657  ! LD_ACTION Bool. O Action performed
658  ! ----------------------------------------------------------------
659  !
660  ! 4. Subroutines used :
661  ! 5. Called by :
662  !
663  ! Name Type Module Description
664  ! ----------------------------------------------------------------
665  ! RCV_FIELDS_FROM_ATMOS Subr. W3AGCMMD Receive fields from atmos. model
666  ! RCV_FIELDS_FROM_OCEAN Subr. W3OGCMMD Receive fields from ocean model
667  ! RCV_FIELDS_FROM_ICE Subr. W3IGCMMD Receive fields from ice model
668  ! ----------------------------------------------------------------
669  !
670  ! 6. Error messages :
671  ! 7. Remarks :
672  ! 8. Structure :
673  ! 9. Switches :
674  ! 10. Source code :
675  !
676  !/ ------------------------------------------------------------------- /
677  !/ Parameter list
678  !/
679  INTEGER, INTENT(IN) :: ID_NB ! Number of the field to be received
680  INTEGER, INTENT(IN) :: ID_TIME ! Ocean time-step in seconds
681  REAL(KIND=8), dimension(:,:), INTENT(OUT) :: rda_field ! Coupling field array to be received
682  LOGICAL, INTENT(OUT) :: LD_ACTION ! Action performed
683  !/
684  !/ ------------------------------------------------------------------- /
685  !/ Local parameters
686  !/
687  INTEGER :: IL_INFO ! OASIS3-MCT info argument
688  !/
689  !/ ------------------------------------------------------------------- /
690  !/ Executable part
691  !/
692  CALL oasis_get ( rcv_fld(id_nb)%IL_FIELD_ID &
693  & , id_time &
694  & , rda_field &
695  & , il_info &
696  & )
697  !
698  ld_action = il_info == oasis_recvd .OR. il_info == oasis_fromrest .OR. &
699  & il_info == oasis_recvout .OR. il_info == oasis_fromrestout
700  !
701  !/ ------------------------------------------------------------------- /

References rcv_fld.

Referenced by w3agcmmd::rcv_fields_from_atmos(), w3igcmmd::rcv_fields_from_ice(), and w3ogcmmd::rcv_fields_from_ocean().

◆ cpl_oasis_snd()

subroutine, public w3oacpmd::cpl_oasis_snd ( integer, intent(in)  ID_NB,
integer, intent(in)  ID_TIME,
real(kind=8), dimension(:,:), intent(in)  RDA_FIELD,
logical, intent(out)  LD_ACTION 
)

Definition at line 563 of file w3oacpmd.F90.

563  !/
564  !/ +-----------------------------------+
565  !/ | WAVEWATCH III NOAA/NCEP |
566  !/ | A. Thevenin |
567  !/ | FORTRAN 90 |
568  !/ | Last update : April-2016 |
569  !/ +-----------------------------------+
570  !/
571  !/ Jul-2013 : Origination. ( version 4.18 )
572  !/ April-2016 : Add comments (J. Pianezze) ( version 5.07 )
573  !/
574  ! 1. Purpose :
575  !
576  ! In the model time step loop, each process sends its parts of the coupling field
577  !
578  ! 2. Method :
579  ! 3. Parameters :
580  !
581  ! Parameter list
582  ! ----------------------------------------------------------------
583  ! ID_NB Int. I Number of the field to be send
584  ! ID_TIME Int. I Atmosphere time-step in seconds
585  ! RDA_FIELD Real I Coupling field array to be send
586  ! LD_ACTION Bool. O Action performed
587  ! ----------------------------------------------------------------
588  !
589  ! 4. Subroutines used :
590  ! 5. Called by :
591  !
592  ! Name Type Module Description
593  ! ----------------------------------------------------------------
594  ! SND_FIELDS_TO_ATMOS Subr. W3AGCMMD Send fields to atmos. model
595  ! SND_FIELDS_TO_OCEAN Subr. W3OGCMMD Send fields to ocean model
596  ! SND_FIELDS_TO_ICE Subr. W3IGCMMD Send fields to ice model
597  ! ----------------------------------------------------------------
598  !
599  ! 6. Error messages :
600  ! 7. Remarks :
601  ! 8. Structure :
602  ! 9. Switches :
603  ! 10. Source code :
604  !
605  !/ ------------------------------------------------------------------- /
606  !/ Parameter list
607  !/
608  INTEGER, INTENT(IN) :: ID_NB ! Number of the field to be send
609  INTEGER, INTENT(IN) :: ID_TIME ! Atmosphere time-step in seconds
610  REAL(KIND=8), dimension(:,:), INTENT(IN) :: rda_field ! Coupling field array to be send
611  LOGICAL, INTENT(OUT) :: LD_ACTION ! Action performed
612  !/
613  !/ ------------------------------------------------------------------- /
614  !/ Local parameters
615  !/
616  INTEGER :: IL_INFO ! OASIS3-MCT info argument
617  !/
618  !/ ------------------------------------------------------------------- /
619  !/ Executable part
620  !/
621  CALL oasis_put ( snd_fld(id_nb)%IL_FIELD_ID &
622  & , id_time &
623  & , rda_field &
624  & , il_info &
625  & )
626 
627  ld_action = il_info == oasis_sent .OR. il_info == oasis_torest .OR. &
628  & il_info == oasis_sentout .OR. il_info == oasis_torestout
629 
630  !/ ------------------------------------------------------------------- /

References snd_fld.

Referenced by w3agcmmd::snd_fields_to_atmos(), w3igcmmd::snd_fields_to_ice(), and w3ogcmmd::snd_fields_to_ocean().

Variable Documentation

◆ cplt0

logical, public w3oacpmd::cplt0

Definition at line 80 of file w3oacpmd.F90.

80  LOGICAL, PUBLIC :: CPLT0 ! Flag for coupling at T+0

Referenced by w3fldsmd::w3fldg(), w3shel(), and w3wavemd::w3wave().

◆ id_oasis_time

integer, public w3oacpmd::id_oasis_time =0

◆ il_nb_rcv

integer, public w3oacpmd::il_nb_rcv

Definition at line 67 of file w3oacpmd.F90.

67  INTEGER, PUBLIC :: IL_NB_RCV, IL_NB_SND ! Number of coupling fields

Referenced by cpl_oasis_define(), w3agcmmd::rcv_fields_from_atmos(), w3igcmmd::rcv_fields_from_ice(), and w3ogcmmd::rcv_fields_from_ocean().

◆ il_nb_snd

integer, public w3oacpmd::il_nb_snd

◆ rcv_fld

type(cpl_field), dimension(ip_maxfld), public w3oacpmd::rcv_fld

Definition at line 76 of file w3oacpmd.F90.

76  TYPE(CPL_FIELD), DIMENSION(IP_MAXFLD), PUBLIC :: RCV_FLD, SND_FLD ! Coupling fields

Referenced by cpl_oasis_define(), cpl_oasis_rcv(), w3agcmmd::rcv_fields_from_atmos(), w3igcmmd::rcv_fields_from_ice(), and w3ogcmmd::rcv_fields_from_ocean().

◆ snd_fld

type(cpl_field), dimension(ip_maxfld), public w3oacpmd::snd_fld
w3gdatmd::nseal
integer, pointer nseal
Definition: w3gdatmd.F90:1097
include
cmake src_list cmake include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_switches.cmake) check_switches("$
Definition: CMakeLists.txt:15
w3gdatmd::ygrd
double precision, dimension(:,:), pointer ygrd
Definition: w3gdatmd.F90:1205
constants::dera
real, parameter dera
DERA Conversion factor from degrees to radians.
Definition: constants.F90:77
w3gdatmd::ungtype
integer, parameter ungtype
Definition: w3gdatmd.F90:626
w3gdatmd::mrfct
integer, pointer mrfct
Definition: w3gdatmd.F90:1167
w3gdatmd::rlgtype
integer, parameter rlgtype
Definition: w3gdatmd.F90:624
w3oacpmd::snd_fld
type(cpl_field), dimension(ip_maxfld), public snd_fld
Definition: w3oacpmd.F90:76
w3gdatmd::xgrd
double precision, dimension(:,:), pointer xgrd
Definition: w3gdatmd.F90:1205
w3gdatmd::sy
real, pointer sy
Definition: w3gdatmd.F90:1183
w3odatmd::iaproc
integer, pointer iaproc
Definition: w3odatmd.F90:457
w3oacpmd::il_nb_snd
integer, public il_nb_snd
Definition: w3oacpmd.F90:67
w3gdatmd::hqfac
real, dimension(:,:), pointer hqfac
Definition: w3gdatmd.F90:1212
w3gdatmd::nsea
integer, pointer nsea
Definition: w3gdatmd.F90:1097
w3gdatmd::clgtype
integer, parameter clgtype
Definition: w3gdatmd.F90:625
w3odatmd
Definition: w3odatmd.F90:3
w3gdatmd::mapsf
integer, dimension(:,:), pointer mapsf
Definition: w3gdatmd.F90:1163
w3odatmd::naproc
integer, pointer naproc
Definition: w3odatmd.F90:457
w3gdatmd::smctype
integer, parameter smctype
Definition: w3gdatmd.F90:627
constants::radius
real, parameter radius
RADIUS Radius of the earth (m).
Definition: constants.F90:79
w3gdatmd::ijkcel
integer, dimension(:,:), pointer ijkcel
Definition: w3gdatmd.F90:1170
w3gdatmd::gtype
integer, pointer gtype
Definition: w3gdatmd.F90:1094
w3gdatmd::hpfac
real, dimension(:,:), pointer hpfac
Definition: w3gdatmd.F90:1211
w3gdatmd::sx
real, pointer sx
Definition: w3gdatmd.F90:1183
constants
Define some much-used constants for global use (all defined as PARAMETER).
Definition: constants.F90:20
w3gdatmd
Definition: w3gdatmd.F90:16
w3parall
Parallel routines for implicit solver.
Definition: w3parall.F90:22
w3gdatmd::mapsta
integer, dimension(:,:), pointer mapsta
Definition: w3gdatmd.F90:1163
w3parall::init_get_isea
subroutine init_get_isea(ISEA, JSEA)
Set ISEA for all schemes.
Definition: w3parall.F90:1398
w3gdatmd::flagll
logical, pointer flagll
Definition: w3gdatmd.F90:1219