The TELEMAC-MASCARET system  trunk
api_interface.f
Go to the documentation of this file.
1 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 !
5  MODULE api_interface
6 !
9  USE api_run_t2d
12  USE api_run_t3d
15  USE api_run_sis
18  USE api_run_art
21  USE api_run_wac
22  USE api_coupling
23  USE declarations_partel, par_code => code
24  USE bief_def,ONLY:ex_ncsize=>ncsize
26 
27  IMPLICIT NONE
28  INTEGER, EXTERNAL :: global_to_local_point
29  INTEGER, PARAMETER :: str_len = 250
30 !
31  CONTAINS
32 !
33 !***********************************************************************
34 ! PARTEL/GRETEL
35 !***********************************************************************
36 !
37  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53  SUBROUTINE run_partel(CODE,NAMEINP, NAMECLI, NPARTS, PMETHOD,
54  & FFORMAT,NAMESEC, NAMEZFI,NAMESEU, IERR)
55 !
56 !
57  CHARACTER(LEN=3), INTENT(IN) :: CODE
58  INTEGER, INTENT(OUT):: IERR
59  CHARACTER(LEN=250), INTENT(IN) :: NAMEINP
60  CHARACTER(LEN=250), INTENT(IN) :: NAMECLI
61  INTEGER, INTENT(IN) :: NPARTS
62  INTEGER, INTENT(IN) :: PMETHOD
63  CHARACTER(LEN=8), INTENT(INOUT) :: FFORMAT
64  CHARACTER(LEN=250), INTENT(IN) :: NAMESEC
65  CHARACTER(LEN=250), INTENT(IN) :: NAMEZFI
66  CHARACTER(LEN=250), INTENT(IN) :: NAMESEU
67 !
68  INTEGER :: TMP_LU
69 !
70  ierr = 0
71  par_code = code
72  ! PARTEL might change lu value
73  tmp_lu = lu
74  ! If ask for writing in a log file
75  IF(.NOT. std_output) THEN
76  CALL get_free_id(lu)
77  OPEN(unit=lu,file='PARTEL_'//trim(nameinp)//'.LOG',
78  & form='FORMATTED', status='UNKNOWN')
79  ENDIF
80  ! The partitioning is done sequentially
81  ! PARITIONING THE GEOMETRY FILE
82  CALL partel(nameinp, namecli, nparts, pmethod, fformat,
83  & namesec, namezfi, nameseu)
84  IF(partel_concat) THEN
85  WRITE(lu,*) 'PARTEL-CONCAT NOT HANDLED BY API'
86  CALL plante(1)
87  stop
88  ENDIF
89  IF(.NOT. std_output) THEN
90  CLOSE(lu)
91  ENDIF
92  lu=tmp_lu
93 !
94  END SUBROUTINE run_partel
95 !
96 !
97 !
98  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111  SUBROUTINE run_parres(CODE,NAMEGEO, NAMEINP, NPARTS, GEOFORMAT,
112  & INPFORMAT,IERR)
113 !
114  CHARACTER(LEN=3), INTENT(IN) :: CODE
115  INTEGER, INTENT(OUT):: IERR
116  CHARACTER(LEN=250), INTENT(IN) :: NAMEGEO
117  CHARACTER(LEN=250), INTENT(IN) :: NAMEINP
118  INTEGER, INTENT(IN) :: NPARTS
119  CHARACTER(LEN=8), INTENT(INOUT) :: GEOFORMAT
120  CHARACTER(LEN=8), INTENT(INOUT) :: INPFORMAT
121 !
122  INTEGER :: TMP_LU
123 !
124  ierr = 0
125  par_code = code
126  tmp_lu = lu
127  IF(.NOT. std_output) THEN
128  CALL get_free_id(lu)
129  OPEN(unit=lu,file='PARTEL_'//trim(nameinp)//'.LOG',
130  & form='FORMATTED', status='UNKNOWN')
131  ENDIF
132  ! The partitioning is done sequentially
133  ! PARITIONING THE GEOMETRY FILE
134  CALL parres(namegeo, nameinp, nparts, geoformat,inpformat)
135  IF(.NOT. std_output) THEN
136  CLOSE(lu)
137  ENDIF
138  lu = tmp_lu
139 !
140  END SUBROUTINE run_parres
141 !
142 !
143  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157  SUBROUTINE run_gretel(CODE,GEO,GEOFORMAT,BND,RES,RESFORMAT,NPROC,
158  & NPLAN_RES,METHOD)
159 !
160  CHARACTER(LEN=3), INTENT(IN) :: CODE
161  CHARACTER(LEN=250), INTENT(IN) :: GEO
162  CHARACTER(LEN=250), INTENT(IN) :: RES
163  CHARACTER(LEN=250), INTENT(IN) :: BND
164  CHARACTER(LEN=8), INTENT(INOUT) :: GEOFORMAT,RESFORMAT
165  INTEGER, INTENT(IN) :: NPROC
166  INTEGER, INTENT(INOUT) :: NPLAN_RES
167  INTEGER, INTENT(IN) :: METHOD
168 !
169  INTEGER :: TMP_LU
170 !
171  tmp_lu = lu
172  IF(.NOT. std_output) THEN
173  CALL get_free_id(lu)
174  OPEN(unit=lu,file='GRETEL_'//trim(res)//'.LOG',
175  & form='FORMATTED', status='UNKNOWN')
176  ENDIF
177  ! The partitioning is done sequentially
178  ! PARITIONING THE GEOMETRY FILE
179  CALL gretel_autop(geo,geoformat,bnd,res,resformat,nproc,
180  & nplan_res,method)
181  IF(.NOT. std_output) THEN
182  CLOSE(lu)
183  ENDIF
184  lu = tmp_lu
185 
186  END SUBROUTINE run_gretel
187  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
189  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
194  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195  SUBROUTINE check_instance(ID, TAG, IERR)
196  INTEGER, INTENT(IN) :: ID
197  CHARACTER(LEN=3), INTENT(IN) :: TAG
198  INTEGER, INTENT(OUT) :: IERR
199 !
200  IF (tag == 'T2D') THEN
201  CALL check_instance_t2d(id,ierr)
202  ELSE IF (tag == 'T3D') THEN
203  CALL check_instance_t3d(id,ierr)
204  ELSE IF (tag == 'SIS') THEN
205  CALL check_instance_sis(id,ierr)
206  ELSE IF (tag == 'ART') THEN
207  CALL check_instance_art(id,ierr)
208  ELSE IF (tag == 'WAC') THEN
209  CALL check_instance_wac(id,ierr)
210  ELSE
211  ierr = unknown_module
212  ENDIF
213 !
214  END SUBROUTINE
215 !
216 !***********************************************************************
217 ! Get/set
218 !***********************************************************************
219 !
220  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
222  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
233  SUBROUTINE get_double_array
234  & (id, tag, varname, valeur, dim1, ierr, block_index)
235 !
236  INTEGER, INTENT(IN) :: ID
237  CHARACTER(LEN=3), INTENT(IN) :: TAG
238  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
239  INTEGER, INTENT(IN) :: DIM1
240  DOUBLE PRECISION, DIMENSION(DIM1), INTENT(INOUT) :: VALEUR
241  INTEGER, INTENT(OUT) :: IERR
242  INTEGER, OPTIONAL, INTENT(IN) :: BLOCK_INDEX
243 !
244  CALL check_instance(id,tag,ierr)
245  IF(ierr.NE.0) RETURN
246 !
247 
248  IF (tag == 'T2D') THEN
249  IF(PRESENT(block_index))THEN
251  & instance_list_t2d(id), varname, valeur, dim1,
252  & ierr, block_index)
253  ELSE
255  & instance_list_t2d(id), varname, valeur, dim1,
256  & ierr)
257  ENDIF
258  ELSE IF (tag == 'T3D') THEN
259  IF(PRESENT(block_index))THEN
261  & instance_list_t3d(id), varname, valeur, dim1,
262  & ierr, block_index)
263  ELSE
265  & instance_list_t3d(id), varname, valeur, dim1,
266  & ierr)
267  ENDIF
268  ELSE IF (tag == 'SIS') THEN
269  IF(PRESENT(block_index))THEN
271  & instance_list_sis(id), varname, valeur, dim1,
272  & ierr, block_index)
273  ELSE
275  & instance_list_sis(id), varname, valeur, dim1,
276  & ierr)
277  ENDIF
278  ELSE IF (tag == 'ART') THEN
279  IF(PRESENT(block_index))THEN
281  & instance_list_art(id), varname, valeur, dim1,
282  & ierr, block_index)
283  ELSE
285  & instance_list_art(id), varname, valeur, dim1,
286  & ierr)
287  ENDIF
288  ELSE IF (tag == 'WAC') THEN
289  IF(PRESENT(block_index))THEN
291  & instance_list_wac(id), varname, valeur, dim1,
292  & ierr, block_index)
293  ELSE
295  & instance_list_wac(id), varname, valeur, dim1,
296  & ierr)
297  ENDIF
298  ELSE
299  ierr = unknown_module
300  RETURN
301  ENDIF
302 !
303  END SUBROUTINE get_double_array
304  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
306  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
316  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
317  SUBROUTINE set_double_array
318  & (id, tag, varname, valeur, dim1, ierr, block_index)
319 !
320  INTEGER, INTENT(IN) :: ID
321  CHARACTER(LEN=3), INTENT(IN) :: TAG
322  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
323  INTEGER, INTENT(IN) :: DIM1
324  DOUBLE PRECISION, DIMENSION(DIM1), INTENT(IN) :: VALEUR
325  INTEGER, INTENT(OUT) :: IERR
326  INTEGER, OPTIONAL, INTENT(IN) :: BLOCK_INDEX
327 !
328  CALL check_instance(id,tag,ierr)
329  IF(ierr.NE.0) RETURN
330 !
331  IF (tag == 'T2D') THEN
332  IF(PRESENT(block_index))THEN
334  & instance_list_t2d(id), varname, valeur, dim1,
335  & ierr, block_index)
336  ELSE
338  & instance_list_t2d(id), varname, valeur, dim1,
339  & ierr)
340  END IF
341  ELSE IF (tag == 'T3D') THEN
342  IF(PRESENT(block_index))THEN
344  & instance_list_t3d(id), varname, valeur, dim1,
345  & ierr, block_index)
346  ELSE
348  & instance_list_t3d(id), varname, valeur, dim1,
349  & ierr)
350  END IF
351  ELSE IF (tag == 'SIS') THEN
352  IF(PRESENT(block_index))THEN
354  & instance_list_sis(id), varname, valeur, dim1,
355  & ierr, block_index)
356  ELSE
358  & instance_list_sis(id), varname, valeur, dim1,
359  & ierr)
360  END IF
361  ELSE IF (tag == 'ART') THEN
362  IF(PRESENT(block_index))THEN
364  & instance_list_art(id), varname, valeur, dim1,
365  & ierr, block_index)
366  ELSE
368  & instance_list_art(id), varname, valeur, dim1,
369  & ierr)
370  END IF
371  ELSE IF (tag == 'WAC') THEN
372  IF(PRESENT(block_index))THEN
374  & instance_list_wac(id), varname, valeur, dim1,
375  & ierr, block_index)
376  ELSE
378  & instance_list_wac(id), varname, valeur, dim1,
379  & ierr)
380  END IF
381  ELSE
382  ierr = unknown_module
383  RETURN
384  ENDIF
385 !
386  END SUBROUTINE set_double_array
387  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
389  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
397  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
398  SUBROUTINE get_integer_array
399  & (id, tag, varname, valeur, dim1, ierr)
400 !
401  INTEGER, INTENT(IN) :: ID
402  CHARACTER(LEN=3), INTENT(IN) :: TAG
403  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
404  INTEGER, INTENT(IN) :: DIM1
405  INTEGER, DIMENSION(DIM1), INTENT(INOUT) :: VALEUR
406  INTEGER, INTENT(OUT) :: IERR
407 !
408  CALL check_instance(id,tag,ierr)
409  IF(ierr.NE.0) RETURN
410 !
411  IF (tag == 'T2D') THEN
413  & instance_list_t2d(id), varname, valeur, dim1,
414  & ierr)
415  ELSE IF (tag == 'T3D') THEN
417  & instance_list_t3d(id), varname, valeur, dim1,
418  & ierr)
419  ELSE IF (tag == 'SIS') THEN
421  & instance_list_sis(id), varname, valeur, dim1,
422  & ierr)
423  ELSE IF (tag == 'ART') THEN
425  & instance_list_art(id), varname, valeur, dim1,
426  & ierr)
427  ELSE IF (tag == 'WAC') THEN
429  & instance_list_wac(id), varname, valeur, dim1,
430  & ierr)
431  ELSE
432  ierr = unknown_module
433  RETURN
434  ENDIF
435 !
436  END SUBROUTINE get_integer_array
437  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
439  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
447  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
448  SUBROUTINE set_integer_array
449  & (id, tag, varname, valeur, dim1, ierr)
450 !
451  INTEGER, INTENT(IN) :: ID
452  CHARACTER(LEN=3), INTENT(IN) :: TAG
453  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
454  INTEGER, INTENT(IN) :: DIM1
455  INTEGER, DIMENSION(DIM1), INTENT(IN) :: VALEUR
456  INTEGER, INTENT(OUT) :: IERR
457 !
458  CALL check_instance(id,tag,ierr)
459  IF(ierr.NE.0) RETURN
460 !
461  IF (tag == 'T2D') THEN
463  & instance_list_t2d(id), varname, valeur, dim1,
464  & ierr)
465  ELSE IF (tag == 'T3D') THEN
467  & instance_list_t3d(id), varname, valeur, dim1,
468  & ierr)
469  ELSE IF (tag == 'SIS') THEN
471  & instance_list_sis(id), varname, valeur, dim1,
472  & ierr)
473  ELSE IF (tag == 'ART') THEN
475  & instance_list_art(id), varname, valeur, dim1,
476  & ierr)
477  ELSE IF (tag == 'WAC') THEN
479  & instance_list_wac(id), varname, valeur, dim1,
480  & ierr)
481  ELSE
482  ierr = unknown_module
483  RETURN
484  ENDIF
485 !
486  END SUBROUTINE set_integer_array
487  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
489  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
499  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
500  SUBROUTINE get_double
501  & (id, tag, varname, valeur, index1, index2, index3, ierr)
502 !
503  INTEGER, INTENT(IN) :: ID
504  CHARACTER(LEN=3), INTENT(IN) :: TAG
505  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
506  DOUBLE PRECISION, INTENT(OUT) :: VALEUR
507  INTEGER, INTENT(INOUT) :: INDEX1
508  INTEGER, INTENT(INOUT) :: INDEX2
509  INTEGER, INTENT(INOUT) :: INDEX3
510  INTEGER, INTENT(OUT) :: IERR
511 !
512  CALL check_instance(id,tag,ierr)
513  IF(ierr.NE.0) RETURN
514 !
515  valeur = 0.d0
516  IF (tag == 'T2D') THEN
517  CALL get_double_t2d_d(instance_list_t2d(id), varname, valeur,
518  & index1, index2, index3, ierr)
519  ELSE IF (tag == 'T3D') THEN
520  CALL get_double_t3d_d(instance_list_t3d(id), varname, valeur,
521  & index1, index2, index3, ierr)
522  ELSE IF (tag == 'SIS') THEN
523  CALL get_double_sis_d(instance_list_sis(id), varname, valeur,
524  & index1, index2, index3, ierr)
525  ELSE IF (tag == 'ART') THEN
526  CALL get_double_art_d(instance_list_art(id), varname, valeur,
527  & index1, index2, index3, ierr)
528  ELSE IF (tag == 'WAC') THEN
529  CALL get_double_wac_d(instance_list_wac(id), varname, valeur,
530  & index1, index2, index3, ierr)
531  ELSE
532  ierr = unknown_module
533  RETURN
534  ENDIF
535 !
536  END SUBROUTINE get_double
537 !
538  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
540  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
550  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
551  SUBROUTINE set_double
552  & (id, tag, varname, valeur, index1, index2, index3, ierr)
553 !
554  INTEGER, INTENT(IN) :: ID
555  CHARACTER(LEN=3), INTENT(IN) :: TAG
556  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
557  DOUBLE PRECISION, INTENT(IN) :: VALEUR
558  INTEGER, INTENT(IN) :: INDEX1
559  INTEGER, INTENT(IN) :: INDEX2
560  INTEGER, INTENT(IN) :: INDEX3
561  INTEGER, INTENT(OUT) :: IERR
562 !
563  CALL check_instance(id,tag,ierr)
564  IF(ierr.NE.0) RETURN
565 !
566  IF (tag == 'T2D') THEN
567  CALL set_double_t2d_d(instance_list_t2d(id), varname, valeur,
568  & index1,index2, index3, ierr)
569  ELSE IF (tag == 'T3D') THEN
570  CALL set_double_t3d_d(instance_list_t3d(id), varname, valeur,
571  & index1,index2, index3, ierr)
572  ELSE IF (tag == 'SIS') THEN
573  CALL set_double_sis_d(instance_list_sis(id), varname, valeur,
574  & index1,index2, index3, ierr)
575  ELSE IF (tag == 'ART') THEN
576  CALL set_double_art_d(instance_list_art(id), varname, valeur,
577  & index1,index2, index3, ierr)
578  ELSE IF (tag == 'WAC') THEN
579  CALL set_double_wac_d(instance_list_wac(id), varname, valeur,
580  & index1,index2, index3, ierr)
581  ELSE
582  ierr = unknown_module
583  RETURN
584  ENDIF
585 !
586  END SUBROUTINE set_double
587 !
588  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
590  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
600  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
601  SUBROUTINE get_integer(ID, TAG, VARNAME, VALEUR,
602  & INDEX1, INDEX2, INDEX3, IERR)
603 !
604  INTEGER, INTENT(IN) :: ID
605  CHARACTER(LEN=3), INTENT(IN) :: TAG
606  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
607  INTEGER, INTENT(OUT) :: VALEUR
608  INTEGER, INTENT(IN) :: INDEX1
609  INTEGER, INTENT(IN) :: INDEX2
610  INTEGER, INTENT(IN) :: INDEX3
611  INTEGER, INTENT(OUT) :: IERR
612 !
613  CALL check_instance(id,tag,ierr)
614  IF(ierr.NE.0) RETURN
615 !
616  IF (tag == 'T2D') THEN
617  CALL get_integer_t2d_d(instance_list_t2d(id), varname, valeur,
618  & index1, index2, index3, ierr)
619  ELSE IF (tag == 'T3D') THEN
620  CALL get_integer_t3d_d(instance_list_t3d(id), varname, valeur,
621  & index1, index2, index3, ierr)
622  ELSE IF (tag == 'SIS') THEN
623  CALL get_integer_sis_d(instance_list_sis(id), varname, valeur,
624  & index1, index2, index3, ierr)
625  ELSE IF (tag == 'ART') THEN
626  CALL get_integer_art_d(instance_list_art(id), varname, valeur,
627  & index1, index2, index3, ierr)
628  ELSE IF (tag == 'WAC') THEN
629  CALL get_integer_wac_d(instance_list_wac(id), varname, valeur,
630  & index1, index2, index3, ierr)
631  ELSE
632  ierr = unknown_module
633  RETURN
634  ENDIF
635 !
636  END SUBROUTINE get_integer
637 !
638  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
640  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
650  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
651  SUBROUTINE set_integer(ID, TAG, VARNAME, VALEUR,
652  & INDEX1, INDEX2, INDEX3, IERR)
653 !
654  INTEGER, INTENT(IN) :: ID
655  CHARACTER(LEN=3), INTENT(IN) :: TAG
656  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
657  INTEGER, INTENT(IN) :: VALEUR
658  INTEGER, INTENT(IN) :: INDEX1
659  INTEGER, INTENT(IN) :: INDEX2
660  INTEGER, INTENT(IN) :: INDEX3
661  INTEGER, INTENT(OUT) :: IERR
662 !
663  CALL check_instance(id,tag,ierr)
664  IF(ierr.NE.0) RETURN
665 !
666  IF (tag == 'T2D') THEN
667  CALL set_integer_t2d_d(instance_list_t2d(id), varname, valeur,
668  & index1, index2, index3, ierr)
669  ELSE IF (tag == 'T3D') THEN
670  CALL set_integer_t3d_d(instance_list_t3d(id), varname, valeur,
671  & index1, index2, index3, ierr)
672  ELSE IF (tag == 'SIS') THEN
673  CALL set_integer_sis_d(instance_list_sis(id), varname, valeur,
674  & index1, index2, index3, ierr)
675  ELSE IF (tag == 'ART') THEN
676  CALL set_integer_art_d(instance_list_art(id), varname, valeur,
677  & index1, index2, index3, ierr)
678  ELSE IF (tag == 'WAC') THEN
679  CALL set_integer_wac_d(instance_list_wac(id), varname, valeur,
680  & index1, index2, index3, ierr)
681  ELSE
682  ierr = unknown_module
683  RETURN
684  ENDIF
685 !
686  END SUBROUTINE set_integer
687 !
688  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
690  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
700  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
701  SUBROUTINE get_string(ID, TAG, VARNAME, VALEUR,
702  & VALUELEN, INDEX1, INDEX2, IERR)
703 !
704  INTEGER, INTENT(IN) :: ID
705  CHARACTER(LEN=3), INTENT(IN) :: TAG
706  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
707  INTEGER, INTENT(IN) :: VALUELEN
708  INTEGER, INTENT(IN) :: INDEX1
709  INTEGER, INTENT(IN) :: INDEX2
710  ! Harcoded 250 forced by intel (otherwise get string does not
711  ! work...)
712  CHARACTER(LEN=250), INTENT(OUT) :: VALEUR
713  INTEGER, INTENT(OUT) :: IERR
714 !
715  ! Temporary array with a good length
716  CHARACTER :: TMP(valuelen)
717  INTEGER I
718  CALL check_instance(id,tag,ierr)
719  IF(ierr.NE.0) RETURN
720 !
721  valeur = repeat(' ', 250)
722 
723  IF (tag == 'T2D') THEN
724  CALL get_string_t2d_d(instance_list_t2d(id),varname, tmp,
725  & valuelen, index1, index2, ierr)
726  ELSE IF (tag == 'T3D') THEN
727  CALL get_string_t3d_d(instance_list_t3d(id),varname, tmp,
728  & valuelen, index1, index2, ierr)
729  ELSE IF (tag == 'SIS') THEN
730  CALL get_string_sis_d(instance_list_sis(id),varname, tmp,
731  & valuelen, index1, index2, ierr)
732  ELSE IF (tag == 'ART') THEN
733  CALL get_string_art_d(instance_list_art(id),varname, tmp,
734  & valuelen, index1, index2, ierr)
735  ELSE IF (tag == 'WAC') THEN
736  CALL get_string_wac_d(instance_list_wac(id),varname, tmp,
737  & valuelen, index1, index2, ierr)
738  ELSE
739  ierr = unknown_module
740  RETURN
741  ENDIF
742  DO i=1,valuelen
743  valeur(i:i) = tmp(i)
744  ENDDO
745 !
746  END SUBROUTINE get_string
747 !
748  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
750  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
760  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
761  SUBROUTINE set_string(ID, TAG, VARNAME, VALEUR,
762  & VALUELEN, INDEX1, INDEX2, IERR)
763 !
764  INTEGER, INTENT(IN) :: ID
765  CHARACTER(LEN=3), INTENT(IN) :: TAG
766  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
767  INTEGER, INTENT(IN) :: VALUELEN
768  INTEGER, INTENT(IN) :: INDEX1
769  INTEGER, INTENT(IN) :: INDEX2
770  CHARACTER, INTENT(IN) :: VALEUR(valuelen)
771  INTEGER, INTENT(OUT) :: IERR
772 !
773  CALL check_instance(id,tag,ierr)
774  IF(ierr.NE.0) RETURN
775 !
776  IF (tag == 'T2D') THEN
777  CALL set_string_t2d_d(instance_list_t2d(id), varname, valeur,
778  & valuelen, index1, index2, ierr)
779  ELSE IF (tag == 'T3D') THEN
780  CALL set_string_t3d_d(instance_list_t3d(id), varname, valeur,
781  & valuelen, index1, index2, ierr)
782  ELSE IF (tag == 'SIS') THEN
783  CALL set_string_sis_d(instance_list_sis(id), varname, valeur,
784  & valuelen, index1, index2, ierr)
785  ELSE IF (tag == 'ART') THEN
786  CALL set_string_art_d(instance_list_art(id), varname, valeur,
787  & valuelen, index1, index2, ierr)
788  ELSE IF (tag == 'WAC') THEN
789  CALL set_string_wac_d(instance_list_wac(id), varname, valeur,
790  & valuelen, index1, index2, ierr)
791  ELSE
792  ierr = unknown_module
793  RETURN
794  ENDIF
795 !
796  END SUBROUTINE set_string
797 !
798  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
800  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
810  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
811  SUBROUTINE get_boolean
812  & (id, tag, varname, valeur, index1, index2, index3, ierr)
813 !
814  INTEGER, INTENT(IN) :: ID
815  CHARACTER(LEN=3), INTENT(IN) :: TAG
816  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
817  INTEGER, INTENT(OUT) :: VALEUR
818  INTEGER, INTENT(IN) :: INDEX1
819  INTEGER, INTENT(IN) :: INDEX2
820  INTEGER, INTENT(IN) :: INDEX3
821  INTEGER, INTENT(OUT) :: IERR
822 !
823  CALL check_instance(id,tag,ierr)
824  IF(ierr.NE.0) RETURN
825 !
826  IF (tag == 'T2D') THEN
827  CALL get_boolean_t2d_d(instance_list_t2d(id), varname, valeur,
828  & index1, index2, index3, ierr)
829  ELSE IF (tag == 'T3D') THEN
830  CALL get_boolean_t3d_d(instance_list_t3d(id), varname, valeur,
831  & index1, index2, index3, ierr)
832  ELSE IF (tag == 'SIS') THEN
833  CALL get_boolean_sis_d(instance_list_sis(id), varname, valeur,
834  & index1, index2, index3, ierr)
835  ELSE IF (tag == 'ART') THEN
836  CALL get_boolean_art_d(instance_list_art(id), varname, valeur,
837  & index1, index2, index3, ierr)
838  ELSE IF (tag == 'WAC') THEN
839  CALL get_boolean_wac_d(instance_list_wac(id), varname, valeur,
840  & index1, index2, index3, ierr)
841  ELSE
842  ierr = unknown_module
843  RETURN
844  ENDIF
845 !
846  END SUBROUTINE get_boolean
847 !
848  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
850  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
860  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
861  SUBROUTINE set_boolean
862  & (id, tag, varname, valeur, index1, index2, index3, ierr)
863 !
864  INTEGER, INTENT(IN) :: ID
865  CHARACTER(LEN=3), INTENT(IN) :: TAG
866  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
867  INTEGER, INTENT(IN) :: VALEUR
868  INTEGER, INTENT(IN) :: INDEX1
869  INTEGER, INTENT(IN) :: INDEX2
870  INTEGER, INTENT(IN) :: INDEX3
871  INTEGER, INTENT(OUT) :: IERR
872 !
873  CALL check_instance(id,tag,ierr)
874  IF(ierr.NE.0) RETURN
875 !
876  IF (tag == 'T2D') THEN
877  CALL set_boolean_t2d_d(instance_list_t2d(id), varname, valeur,
878  & index1, index2, index3, ierr)
879  ELSE IF (tag == 'T3D') THEN
880  CALL set_boolean_t3d_d(instance_list_t3d(id), varname, valeur,
881  & index1, index2, index3, ierr)
882  ELSE IF (tag == 'SIS') THEN
883  CALL set_boolean_sis_d(instance_list_sis(id), varname, valeur,
884  & index1, index2, index3, ierr)
885  ELSE IF (tag == 'ART') THEN
886  CALL set_boolean_art_d(instance_list_art(id), varname, valeur,
887  & index1, index2, index3, ierr)
888  ELSE IF (tag == 'WAC') THEN
889  CALL set_boolean_wac_d(instance_list_wac(id), varname, valeur,
890  & index1, index2, index3, ierr)
891  ELSE
892  ierr = unknown_module
893  RETURN
894  ENDIF
895 !
896  END SUBROUTINE set_boolean
897 !
898  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
900  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
916  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
917  SUBROUTINE get_var_type
918  & (tag, varname, vartype, readonly, ndim,ient,jent,kent,
919  & getpos,setpos,ierr)
920  CHARACTER(LEN=3), INTENT(IN) :: TAG
921  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
922  CHARACTER(LEN=T2D_TYPE_LEN), INTENT(OUT) :: VARTYPE
923  LOGICAL, INTENT(OUT) :: READONLY
924  INTEGER, INTENT(OUT) :: NDIM
925  INTEGER, INTENT(OUT) :: IERR
926  INTEGER, INTENT(OUT) :: IENT
927  INTEGER, INTENT(OUT) :: JENT
928  INTEGER, INTENT(OUT) :: KENT
929  INTEGER, INTENT(OUT) :: GETPOS
930  INTEGER, INTENT(OUT) :: SETPOS
931 !
932  IF (tag == 'T2D') THEN
933  CALL get_var_type_t2d_d
934  & (varname, vartype, readonly, ndim,ient,jent,kent,
935  & getpos, setpos, ierr)
936  ELSE IF (tag == 'T3D') THEN
937  CALL get_var_type_t3d_d
938  & (varname, vartype, readonly, ndim,ient,jent,kent,
939  & getpos, setpos, ierr)
940  ELSE IF (tag == 'SIS') THEN
941  CALL get_var_type_sis_d
942  & (varname, vartype, readonly, ndim,ient,jent,kent,
943  & getpos, setpos, ierr)
944  ELSE IF (tag == 'ART') THEN
945  CALL get_var_type_art_d
946  & (varname, vartype, readonly, ndim,ient,jent,kent,
947  & getpos, setpos, ierr)
948  ELSE IF (tag == 'WAC') THEN
949  CALL get_var_type_wac_d
950  & (varname, vartype, readonly, ndim,ient,jent,kent,
951  & getpos, setpos, ierr)
952  ELSE
953  ierr = unknown_module
954  RETURN
955  ENDIF
956  END SUBROUTINE get_var_type
957 !
958  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
960  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
969  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
970  SUBROUTINE get_var_size(ID, TAG, VARNAME, DIM1, DIM2, DIM3, IERR)
971  INTEGER, INTENT(IN) :: ID
972  CHARACTER(LEN=3), INTENT(IN) :: TAG
973  CHARACTER(LEN=T2D_VAR_LEN), INTENT(IN) :: VARNAME
974  INTEGER, INTENT(OUT) :: DIM1
975  INTEGER, INTENT(OUT) :: DIM2
976  INTEGER, INTENT(OUT) :: DIM3
977  INTEGER, INTENT(OUT) :: IERR
978 !
979  CALL check_instance(id,tag,ierr)
980  IF(ierr.NE.0) RETURN
981 !
982  IF (tag == 'T2D') THEN
983  CALL get_var_size_t2d_d(instance_list_t2d(id), varname,
984  & dim1, dim2, dim3, ierr)
985  ELSE IF (tag == 'T3D') THEN
986  CALL get_var_size_t3d_d(instance_list_t3d(id), varname,
987  & dim1, dim2, dim3, ierr)
988  ELSE IF (tag == 'SIS') THEN
989  CALL get_var_size_sis_d(instance_list_sis(id), varname,
990  & dim1, dim2, dim3, ierr)
991  ELSE IF (tag == 'ART') THEN
992  CALL get_var_size_art_d(instance_list_art(id), varname,
993  & dim1, dim2, dim3, ierr)
994  ELSE IF (tag == 'WAC') THEN
995  CALL get_var_size_wac_d(instance_list_wac(id), varname,
996  & dim1, dim2, dim3, ierr)
997  ELSE
998  ierr = unknown_module
999  RETURN
1000  ENDIF
1001 !
1002  END SUBROUTINE get_var_size
1003 !
1004  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1006  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1012  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1013  SUBROUTINE get_var_list(TAG, VARNAME, VARINFO, IERR)
1014 !
1015  CHARACTER(LEN=3), INTENT(IN) :: TAG
1016  CHARACTER(LEN=T2D_VAR_LEN), INTENT(INOUT) :: VARNAME(*)
1017  CHARACTER(LEN=T2D_INFO_LEN), INTENT(INOUT) :: VARINFO(*)
1018  INTEGER, INTENT(OUT) :: IERR
1019 !
1020  INTEGER I
1021 
1022  ierr = 0
1023  IF (tag == 'T2D') THEN
1024  DO i=1,nb_var_t2d
1025  varname(i) = vname_t2d(i)
1026  varinfo(i) = vinfo_t2d(i)
1027  ENDDO
1028  ELSE IF (tag == 'T3D') THEN
1029  DO i=1,nb_var_t3d
1030  varname(i) = vname_t3d(i)
1031  varinfo(i) = vinfo_t3d(i)
1032  ENDDO
1033  ELSE IF (tag == 'SIS') THEN
1034  DO i=1,nb_var_sis
1035  varname(i) = vname_sis(i)
1036  varinfo(i) = vinfo_sis(i)
1037  ENDDO
1038  ELSE IF (tag == 'ART') THEN
1039  DO i=1,nb_var_art
1040  varname(i) = vname_art(i)
1041  varinfo(i) = vinfo_art(i)
1042  ENDDO
1043  ELSE IF (tag == 'WAC') THEN
1044  DO i=1,nb_var_wac
1045  varname(i) = vname_wac(i)
1046  varinfo(i) = vinfo_wac(i)
1047  ENDDO
1048  ELSE
1049  ierr = unknown_module
1050  RETURN
1051  ENDIF
1052 !
1053  END SUBROUTINE
1054 !
1055  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1057  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1062  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1063  SUBROUTINE get_error_message(ID,TAG,IERR,MESS)
1064  INTEGER, INTENT(IN) :: ID
1065  CHARACTER(LEN=3), INTENT(IN) :: TAG
1066  INTEGER, INTENT(IN) :: IERR
1067  CHARACTER(LEN=ERROR_MESS_LEN), INTENT(OUT) :: MESS
1068 !
1069  CHARACTER(LEN=T2D_INFO_LEN) :: INST_MESS
1070  CHARACTER(LEN=50) :: ERR_TYPE
1071  INTEGER :: IERR2
1072 !
1073  CALL check_instance(id,tag,ierr2)
1074  IF(ierr2.NE.0) THEN
1075  mess = trim(err_mess)
1076  ELSE
1077  IF (tag == 'T2D') THEN
1078  CALL get_instance_error_t2d(id,inst_mess)
1079  ELSE IF (tag == 'T3D') THEN
1080  CALL get_instance_error_t3d(id,inst_mess)
1081  ELSE IF (tag == 'SIS') THEN
1082  CALL get_instance_error_sis(id,inst_mess)
1083  ELSE IF (tag == 'ART') THEN
1084  CALL get_instance_error_art(id,inst_mess)
1085  ELSE IF (tag == 'WAC') THEN
1086  CALL get_instance_error_wac(id,inst_mess)
1087  ELSE
1088  RETURN
1089  ENDIF
1090  CALL get_error_type(ierr,err_type)
1091  mess = trim(err_type) // '\n' // inst_mess
1092  ENDIF
1093 !
1094  END SUBROUTINE get_error_message
1095 
1096 !
1097 !***********************************************************************
1098 ! TELEMAC2D
1099 !***********************************************************************
1100 !
1101 !
1102 ! EXECUTION FUNCTIONS
1103 !
1104  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1106  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1113  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1114  SUBROUTINE run_set_config_t2d(ID,LU,LNG,COMM,IERR)
1115 !
1116  INTEGER, INTENT(OUT) :: ID
1117  INTEGER, INTENT(IN) :: LU, LNG, COMM
1118  INTEGER, INTENT(OUT) :: IERR
1119 !
1120  INTEGER :: EXEC_POS
1121 !
1122  CALL create_instance_t2d(id,ierr)
1123  IF(ierr.NE.0) RETURN
1124 !
1125  exec_pos = instance_list_t2d(id)%MYPOSITION
1126  CALL check_call_position(exec_pos,'RUN_SET_CONFIG_T2D',
1127  & no_position,
1128  & run_read_case_pos,ierr)
1129  IF(ierr.NE.0) RETURN
1130 !
1131  instance_list_t2d(id)%MYPOSITION = run_set_config_pos
1132 !
1133  CALL run_set_config_t2d_d(instance_list_t2d(id),lu,lng,
1134  & comm,lu.NE.0,ierr)
1135  IF(ierr.NE.0) RETURN
1136  CALL set_var_list_t2d_d(ierr)
1137 !
1138  END SUBROUTINE run_set_config_t2d
1139 !
1140  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1142  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1146  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1147  SUBROUTINE cpl_init(ID,IERR)
1148 !
1149  INTEGER, INTENT(IN) :: ID
1150  INTEGER, INTENT(OUT) :: IERR
1151 !
1152  ierr = 0
1153  CALL check_instance_t2d(id,ierr)
1154  IF(ierr.NE.0) RETURN
1155 
1156  CALL cpl_init_t2d(id,ierr)
1157 
1158  END SUBROUTINE cpl_init
1159  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1161  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1170  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1171  SUBROUTINE run_read_case_t2d(ID,CAS_FILE, DICO_FILE,INIT,IERR,
1172  & GAIA_CAS,GAIA_DICO)
1173 !
1174  INTEGER, INTENT(IN) :: ID
1175  CHARACTER(LEN=250), INTENT(IN) :: CAS_FILE
1176  CHARACTER(LEN=250), INTENT(IN) :: DICO_FILE
1177  LOGICAL, INTENT(IN) :: INIT
1178  INTEGER, INTENT(OUT) :: IERR
1179  CHARACTER(LEN=250), INTENT(IN) :: GAIA_CAS
1180  CHARACTER(LEN=250), INTENT(IN) :: GAIA_DICO
1181 !
1182  INTEGER :: EXEC_POS
1183 !
1184  CALL check_instance_t2d(id,ierr)
1185  IF(ierr.NE.0) RETURN
1186 !
1187  exec_pos = instance_list_t2d(id)%MYPOSITION
1188  CALL check_call_position(exec_pos,'RUN_READ_CASE_T2D',
1189  & run_set_config_pos,
1190  & run_allocation_pos,ierr)
1191  IF(ierr.NE.0) RETURN
1192 !
1193  instance_list_t2d(id)%MYPOSITION = run_read_case_pos
1194 !
1195  CALL run_read_case_t2d_d(instance_list_t2d(id),cas_file,
1196  & dico_file, init, ierr,
1197  & gaia_cas,
1198  & gaia_dico)
1199 !
1200  END SUBROUTINE run_read_case_t2d
1201 !
1202  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1204  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1208  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1209  SUBROUTINE run_allocation_t2d(ID,IERR)
1210 !
1211  INTEGER, INTENT(IN) :: ID
1212  INTEGER, INTENT(OUT) :: IERR
1213 !
1214  INTEGER :: EXEC_POS
1215 !
1216  CALL check_instance_t2d(id,ierr)
1217  IF(ierr.NE.0) RETURN
1218 !
1219  exec_pos = instance_list_t2d(id)%MYPOSITION
1220  CALL check_call_position(exec_pos,'RUN_ALLOCATION_T2D',
1221  & run_read_case_pos,
1222  & run_init_pos,ierr)
1223  IF(ierr.NE.0) RETURN
1224  instance_list_t2d(id)%MYPOSITION = run_allocation_pos
1225 !
1227 !
1228  END SUBROUTINE run_allocation_t2d
1229 !
1230  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1232  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1237  SUBROUTINE run_init_t2d(ID,IERR)
1238 !
1239  INTEGER, INTENT(IN) :: ID
1240  INTEGER, INTENT(OUT) :: IERR
1241 !
1242  INTEGER :: EXEC_POS
1243 !
1244  CALL check_instance_t2d(id,ierr)
1245  IF(ierr.NE.0) RETURN
1246 !
1247  exec_pos = instance_list_t2d(id)%MYPOSITION
1248  CALL check_call_position(exec_pos,'RUN_INIT_T2D',
1249  & run_allocation_pos,
1250  & run_timestep_pos,ierr)
1251  instance_list_t2d(id)%MYPOSITION = run_init_pos
1252 !
1253  CALL run_init_t2d_d(instance_list_t2d(id),ierr)
1254  END SUBROUTINE run_init_t2d
1255 !
1256  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1258  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1262  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1263  SUBROUTINE run_timestep_t2d(ID,IERR)
1264 !
1265  INTEGER, INTENT(IN) :: ID
1266  INTEGER, INTENT(OUT) :: IERR
1267 !
1268  CALL run_timestep_compute_t2d(id, ierr)
1269  CALL run_timestep_res_t2d(id, ierr)
1270 !
1271  END SUBROUTINE run_timestep_t2d
1272 !
1273  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1275  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1279  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1280  SUBROUTINE run_timestep_compute_t2d(ID,IERR)
1281 !
1282  INTEGER, INTENT(IN) :: ID
1283  INTEGER, INTENT(OUT) :: IERR
1284 !
1285  INTEGER :: EXEC_POS
1286 !
1287  CALL check_instance_t2d(id,ierr)
1288  IF(ierr.NE.0) RETURN
1289 !
1290  exec_pos = instance_list_t2d(id)%MYPOSITION
1291  CALL check_call_position(exec_pos,'RUN_TIMESTEP_T2D',
1292  & run_init_pos,run_finalize_pos,ierr)
1293  IF(ierr.NE.0) RETURN
1294 !
1296 !
1297  END SUBROUTINE run_timestep_compute_t2d
1298 !
1299  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1301  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1305  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1306  SUBROUTINE run_timestep_res_t2d(ID,IERR)
1307 !
1308  INTEGER, INTENT(IN) :: ID
1309  INTEGER, INTENT(OUT) :: IERR
1310 !
1311  INTEGER :: EXEC_POS
1312 !
1313  CALL check_instance_t2d(id,ierr)
1314  IF(ierr.NE.0) RETURN
1315 !
1316  exec_pos = instance_list_t2d(id)%MYPOSITION
1317  CALL check_call_position(exec_pos,'RUN_TIMESTEP_T2D',
1318  & run_init_pos,run_finalize_pos,ierr)
1319  IF(ierr.NE.0) RETURN
1320  instance_list_t2d(id)%MYPOSITION = run_timestep_pos
1321 !
1323 !
1324  END SUBROUTINE run_timestep_res_t2d
1325  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1327  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1331  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1332  SUBROUTINE run_finalize_t2d(ID,IERR)
1333 !
1334  INTEGER :: EXEC_POS
1335 !
1336  INTEGER, INTENT(IN) :: ID
1337  INTEGER, INTENT(OUT) :: IERR
1338 !
1339  CALL check_instance_t2d(id,ierr)
1340  IF(ierr.NE.0) RETURN
1341 !
1342  exec_pos = instance_list_t2d(id)%MYPOSITION
1343  CALL check_call_position(exec_pos,'RUN_FINALIZE_T2D',
1344  & run_timestep_pos,no_position,ierr)
1345  IF(ierr.NE.0) RETURN
1346  instance_list_t2d(id)%MYPOSITION = run_finalize_pos
1347 !
1348  CALL run_finalize_t2d_d(instance_list_t2d(id),ierr)
1349  IF(ierr.NE.0) RETURN
1350  CALL delete_instance_t2d(id,ierr)
1351  DEALLOCATE(vname_t2d)
1352  DEALLOCATE(vinfo_t2d)
1353 !
1354  END SUBROUTINE run_finalize_t2d
1355 !
1356 !***********************************************************************
1357 ! TELEMAC3D
1358 !***********************************************************************
1359 !
1360 !
1361 ! EXECUTION FUNCTIONS
1362 !
1363  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1365  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1372  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1373  SUBROUTINE run_set_config_t3d(ID,LU,LNG,COMM,IERR)
1374 !
1375  INTEGER, INTENT(OUT) :: ID
1376  INTEGER, INTENT(IN) :: LU, LNG, COMM
1377  INTEGER, INTENT(OUT) :: IERR
1378 !
1379  INTEGER :: EXEC_POS
1380 !
1381  CALL create_instance_t3d(id,ierr)
1382  IF(ierr.NE.0) RETURN
1383 !
1384  exec_pos = instance_list_t3d(id)%MYPOSITION
1385  CALL check_call_position(exec_pos,'RUN_SET_CONFIG_T3D',
1386  & no_position,
1387  & run_read_case_pos,ierr)
1388  IF(ierr.NE.0) RETURN
1389 !
1390  instance_list_t3d(id)%MYPOSITION = run_set_config_pos
1391 !
1392  CALL run_set_config_t3d_d(instance_list_t3d(id),lu,lng,
1393  & comm,lu.NE.0,ierr)
1394  IF(ierr.NE.0) RETURN
1395  CALL set_var_list_t3d_d(ierr)
1396 !
1397  END SUBROUTINE run_set_config_t3d
1398 !
1399  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1401  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1412  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1413  SUBROUTINE run_read_case_t3d(ID,CAS_FILE, DICO_FILE, INIT, IERR,
1414  & WAQ_CAS_FILE, WAQ_DICO_FILE,
1415  & GAIA_CAS_FILE, GAIA_DICO_FILE)
1416 !
1417  INTEGER, INTENT(IN) :: ID
1418  CHARACTER(LEN=250), INTENT(IN) :: CAS_FILE
1419  CHARACTER(LEN=250), INTENT(IN) :: DICO_FILE
1420  LOGICAL, INTENT(IN) :: INIT
1421  INTEGER, INTENT(OUT) :: IERR
1422  CHARACTER(LEN=250), INTENT(IN) :: WAQ_CAS_FILE
1423  CHARACTER(LEN=250), INTENT(IN) :: WAQ_DICO_FILE
1424  CHARACTER(LEN=250), INTENT(IN) :: GAIA_CAS_FILE
1425  CHARACTER(LEN=250), INTENT(IN) :: GAIA_DICO_FILE
1426 !
1427  INTEGER :: EXEC_POS
1428 !
1429  CALL check_instance_t3d(id,ierr)
1430  IF(ierr.NE.0) RETURN
1431 !
1432  exec_pos = instance_list_t3d(id)%MYPOSITION
1433  CALL check_call_position(exec_pos,'RUN_READ_CASE_T3D',
1434  & run_set_config_pos,
1435  & run_allocation_pos,ierr)
1436  IF(ierr.NE.0) RETURN
1437 !
1438  instance_list_t3d(id)%MYPOSITION = run_read_case_pos
1439 !
1440  CALL run_read_case_t3d_d(instance_list_t3d(id),cas_file,
1441  & dico_file, init, ierr,
1442  & waq_cas_file, waq_dico_file,
1443  & gaia_cas_file, gaia_dico_file)
1444 !
1445  END SUBROUTINE run_read_case_t3d
1446 !
1447  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1449  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1453  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1454  SUBROUTINE run_allocation_t3d(ID,IERR)
1455 !
1456  INTEGER, INTENT(IN) :: ID
1457  INTEGER, INTENT(OUT) :: IERR
1458 !
1459  INTEGER :: EXEC_POS
1460 !
1461  CALL check_instance_t3d(id,ierr)
1462  IF(ierr.NE.0) RETURN
1463 !
1464  exec_pos = instance_list_t3d(id)%MYPOSITION
1465  CALL check_call_position(exec_pos,'RUN_ALLOCATION_T3D',
1466  & run_read_case_pos,
1467  & run_init_pos,ierr)
1468  IF(ierr.NE.0) RETURN
1469  instance_list_t3d(id)%MYPOSITION = run_allocation_pos
1470 !
1472 !
1473  END SUBROUTINE run_allocation_t3d
1474 !
1475  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1477  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1481  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1482  SUBROUTINE run_init_t3d(ID,IERR)
1483 !
1484  INTEGER, INTENT(IN) :: ID
1485  INTEGER, INTENT(OUT) :: IERR
1486 !
1487  INTEGER :: EXEC_POS
1488 !
1489  CALL check_instance_t3d(id,ierr)
1490  IF(ierr.NE.0) RETURN
1491 !
1492  exec_pos = instance_list_t3d(id)%MYPOSITION
1493  CALL check_call_position(exec_pos,'RUN_INIT_T3D',
1494  & run_allocation_pos,
1495  & run_timestep_pos,ierr)
1496  instance_list_t3d(id)%MYPOSITION = run_init_pos
1497 !
1498  CALL run_init_t3d_d(instance_list_t3d(id),ierr)
1499  END SUBROUTINE run_init_t3d
1500 !
1501  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1503  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1507  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1508  SUBROUTINE run_timestep_t3d(ID,IERR)
1509 !
1510  INTEGER, INTENT(IN) :: ID
1511  INTEGER, INTENT(OUT) :: IERR
1512 !
1513  INTEGER :: EXEC_POS
1514 !
1515  CALL check_instance_t3d(id,ierr)
1516  IF(ierr.NE.0) RETURN
1517 !
1518  exec_pos = instance_list_t3d(id)%MYPOSITION
1519  CALL check_call_position(exec_pos,'RUN_TIMESTEP_T3D',
1520  & run_init_pos,run_finalize_pos,ierr)
1521  IF(ierr.NE.0) RETURN
1522  instance_list_t3d(id)%MYPOSITION = run_timestep_pos
1523 !
1524  CALL run_timestep_t3d_d(instance_list_t3d(id),ierr)
1525 !
1526  END SUBROUTINE run_timestep_t3d
1527 !
1528  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1530  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1534  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1535  SUBROUTINE run_finalize_t3d(ID,IERR)
1536 !
1537  INTEGER :: EXEC_POS
1538 !
1539  INTEGER, INTENT(IN) :: ID
1540  INTEGER, INTENT(OUT) :: IERR
1541 !
1542  CALL check_instance_t3d(id,ierr)
1543  IF(ierr.NE.0) RETURN
1544 !
1545  exec_pos = instance_list_t3d(id)%MYPOSITION
1546  CALL check_call_position(exec_pos,'RUN_FINALIZE_T3D',
1547  & run_timestep_pos,no_position,ierr)
1548  IF(ierr.NE.0) RETURN
1549  instance_list_t3d(id)%MYPOSITION = run_finalize_pos
1550 !
1551  CALL run_finalize_t3d_d(instance_list_t3d(id),ierr)
1552  IF(ierr.NE.0) RETURN
1553  CALL delete_instance_t3d(id,ierr)
1554  DEALLOCATE(vname_t3d)
1555  DEALLOCATE(vinfo_t3d)
1556 !
1557  END SUBROUTINE run_finalize_t3d
1558 !
1559 !***********************************************************************
1560 ! SISYPHE
1561 !***********************************************************************
1562 !
1563 ! EXECUTION FUNCTIONS
1564 !
1565  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1567  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1574  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1575  SUBROUTINE run_set_config_sis(ID,LU,LNG,COMM,IERR)
1576 !
1577  INTEGER, INTENT(OUT) :: ID
1578  INTEGER, INTENT(IN) :: LU, LNG,COMM
1579  INTEGER, INTENT(OUT) :: IERR
1580 !
1581  INTEGER :: EXEC_POS
1582 !
1583  CALL create_instance_sis(id,ierr)
1584  IF(ierr.NE.0) RETURN
1585 !
1586  exec_pos = instance_list_sis(id)%MYPOSITION
1587  CALL check_call_position(exec_pos,'RUN_SET_CONFIG_SIS',
1588  & no_position,
1589  & run_read_case_pos,ierr)
1590  IF(ierr.NE.0) RETURN
1591 !
1592  instance_list_sis(id)%MYPOSITION = run_set_config_pos
1593 !
1594  CALL run_set_config_sis_d(instance_list_sis(id),lu,lng,comm,
1595  & lu.NE.0,ierr)
1596  CALL set_var_list_sis_d(ierr)
1597 !
1598  END SUBROUTINE run_set_config_sis
1599 !
1600  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1602  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1610  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1611  SUBROUTINE run_read_case_sis(ID,CODE,CAS_FILE, DICO_FILE, INIT,
1612  & IERR)
1613 !
1614  INTEGER, INTENT(IN) :: ID
1615  CHARACTER(LEN=24), INTENT(IN) :: CODE
1616  CHARACTER(LEN=250), INTENT(IN) :: CAS_FILE
1617  CHARACTER(LEN=250), INTENT(IN) :: DICO_FILE
1618  LOGICAL, INTENT(IN) :: INIT
1619  INTEGER, INTENT(OUT) :: IERR
1620 !
1621  INTEGER :: EXEC_POS
1622 !
1623  CALL check_instance_sis(id,ierr)
1624  IF(ierr.NE.0) RETURN
1625 !
1626  exec_pos = instance_list_sis(id)%MYPOSITION
1627  CALL check_call_position(exec_pos,'RUN_READ_CASE_SIS',
1628  & run_set_config_pos,
1629  & run_allocation_pos,ierr)
1630  IF(ierr.NE.0) RETURN
1631 !
1632  instance_list_sis(id)%MYPOSITION = run_read_case_pos
1633 !
1634  CALL run_read_case_sis_d(instance_list_sis(id),code,cas_file,
1635  & dico_file, init, ierr)
1636 !
1637  END SUBROUTINE run_read_case_sis
1638 !
1639  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1641  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1645  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1646  SUBROUTINE run_allocation_sis(ID,IERR)
1647 !
1648  INTEGER, INTENT(IN) :: ID
1649  INTEGER, INTENT(OUT) :: IERR
1650 !
1651  INTEGER :: EXEC_POS
1652 !
1653  CALL check_instance_sis(id,ierr)
1654  IF(ierr.NE.0) RETURN
1655 !
1656  exec_pos = instance_list_sis(id)%MYPOSITION
1657  CALL check_call_position(exec_pos,'RUN_ALLOCATION_SIS',
1658  & run_read_case_pos,
1659  & run_init_pos,ierr)
1660  IF(ierr.NE.0) RETURN
1661  instance_list_sis(id)%MYPOSITION = run_allocation_pos
1662 !
1664 !
1665  END SUBROUTINE run_allocation_sis
1666 !
1667  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1669  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1673  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1674  SUBROUTINE run_init_sis(ID,IERR)
1675 !
1676  INTEGER, INTENT(IN) :: ID
1677  INTEGER, INTENT(OUT) :: IERR
1678 !
1679  INTEGER :: EXEC_POS
1680 !
1681  CALL check_instance_sis(id,ierr)
1682  IF(ierr.NE.0) RETURN
1683 !
1684  exec_pos = instance_list_sis(id)%MYPOSITION
1685  CALL check_call_position(exec_pos,'RUN_INIT_SIS',
1686  & run_allocation_pos,
1687  & run_timestep_pos,ierr)
1688  instance_list_sis(id)%MYPOSITION = run_init_pos
1689 !
1690  CALL run_init_sis_d(instance_list_sis(id),ierr)
1691  END SUBROUTINE run_init_sis
1692 !
1693  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1695  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1699  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1700  SUBROUTINE run_timestep_sis(ID,IERR)
1701 !
1702  INTEGER, INTENT(IN) :: ID
1703  INTEGER, INTENT(OUT) :: IERR
1704 !
1705  INTEGER :: EXEC_POS
1706 !
1707  CALL check_instance_sis(id,ierr)
1708  IF(ierr.NE.0) RETURN
1709 !
1710  exec_pos = instance_list_sis(id)%MYPOSITION
1711  CALL check_call_position(exec_pos,'RUN_TIMESTEP_SIS',
1712  & run_init_pos,run_finalize_pos,ierr)
1713  IF(ierr.NE.0) RETURN
1714  instance_list_sis(id)%MYPOSITION = run_timestep_pos
1715 !
1716  CALL run_timestep_sis_d(instance_list_sis(id),ierr)
1717 !
1718  END SUBROUTINE run_timestep_sis
1719 !
1720  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1722  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1726  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1727  SUBROUTINE run_finalize_sis(ID,IERR)
1728 !
1729  INTEGER :: EXEC_POS
1730 !
1731  INTEGER, INTENT(IN) :: ID
1732  INTEGER, INTENT(OUT) :: IERR
1733 !
1734  CALL check_instance_sis(id,ierr)
1735  IF(ierr.NE.0) RETURN
1736 !
1737  exec_pos = instance_list_sis(id)%MYPOSITION
1738  CALL check_call_position(exec_pos,'RUN_FINALIZE_SIS',
1739  & run_timestep_pos,no_position,ierr)
1740  IF(ierr.NE.0) RETURN
1741  instance_list_sis(id)%MYPOSITION = run_finalize_pos
1742 !
1743  CALL run_finalize_sis_d(instance_list_sis(id),ierr)
1744  IF(ierr.NE.0) RETURN
1745  CALL delete_instance_sis(id,ierr)
1746 !
1747  END SUBROUTINE run_finalize_sis
1748 !
1749 !***********************************************************************
1750 ! COUPLING T2D_SIS
1751 !***********************************************************************
1752 !
1753  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1755  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1760  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1761 !
1762  SUBROUTINE save_charr_susp(ID_T2D, ID_SIS,IERR)
1763 !
1764  INTEGER, INTENT(IN) :: ID_T2D
1765  INTEGER, INTENT(IN) :: ID_SIS
1766  INTEGER, INTENT(OUT) :: IERR
1767 !
1768  ierr = 0
1769  CALL check_instance_t2d(id_t2d,ierr)
1770  IF(ierr.NE.0) RETURN
1771  CALL check_instance_sis(id_sis,ierr)
1772  IF(ierr.NE.0) RETURN
1773 
1775  & instance_list_t2d(id_t2d), ierr)
1776 
1777  END SUBROUTINE save_charr_susp
1778 
1779 
1780  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1782  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1791  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1792 !
1793  SUBROUTINE charr_or_susp(ID_T2D, ID_SIS, CHARR_SUSP, IERR)
1794 !
1795  INTEGER, INTENT(IN) :: ID_T2D
1796  INTEGER, INTENT(IN) :: ID_SIS
1797  INTEGER, INTENT(OUT) :: CHARR_SUSP
1798  INTEGER, INTENT(OUT) :: IERR
1799 !
1800  ierr = 0
1801  CALL check_instance_t2d(id_t2d,ierr)
1802  IF(ierr.NE.0) RETURN
1803  CALL check_instance_sis(id_sis,ierr)
1804  IF(ierr.NE.0) RETURN
1805 
1806  CALL charr_or_susp_cpl(instance_list_sis(id_sis),
1807  & instance_list_t2d(id_t2d),
1808  & charr_susp,ierr)
1809 
1810  END SUBROUTINE charr_or_susp
1811 
1812 
1813 
1814  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1816  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1825  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1826  SUBROUTINE set_var_sis(ID_T2D,ID_SIS, CALL_TYPE,IERR)
1827 !
1828  INTEGER, INTENT(IN) :: ID_T2D
1829  INTEGER, INTENT(IN) :: ID_SIS
1830  INTEGER, INTENT(IN) :: CALL_TYPE
1831  INTEGER, INTENT(OUT) :: IERR
1832 !
1833  ierr = 0
1834  CALL check_instance_t2d(id_t2d,ierr)
1835  IF(ierr.NE.0) RETURN
1836  CALL check_instance_sis(id_sis,ierr)
1837  IF(ierr.NE.0) RETURN
1838 
1839  CALL set_var_sis_cpl(instance_list_t2d(id_t2d), call_type,
1840  & instance_list_sis(id_sis),ierr)
1841 
1842  END SUBROUTINE set_var_sis
1843 
1844  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1846  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1851  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1852  SUBROUTINE set_var_t2d(ID_T2D, ID_SIS, IERR)
1853 !
1854  INTEGER, INTENT(IN) :: ID_T2D
1855  INTEGER, INTENT(IN) :: ID_SIS
1856  INTEGER, INTENT(OUT) :: IERR
1857 !
1858  ierr = 0
1859  CALL check_instance_t2d(id_t2d,ierr)
1860  IF(ierr.NE.0) RETURN
1861  CALL check_instance_sis(id_sis,ierr)
1862  IF(ierr.NE.0) RETURN
1863 
1864  CALL set_var_t2d_cpl(instance_list_sis(id_sis),
1865  & instance_list_t2d(id_t2d),ierr)
1866 
1867  END SUBROUTINE set_var_t2d
1868 !
1869 !***********************************************************************
1870 ! ARTEMIS
1871 !***********************************************************************
1872 !
1873 !
1874 ! EXECUTION FUNCTIONS
1875 !
1876  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1878  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1885  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1886  SUBROUTINE run_set_config_art(ID,LU,LNG,COMM,IERR)
1887 !
1888  INTEGER, INTENT(OUT) :: ID
1889  INTEGER, INTENT(IN) :: LU, LNG, COMM
1890  INTEGER, INTENT(OUT) :: IERR
1891 !
1892  INTEGER :: EXEC_POS
1893 !
1894  CALL create_instance_art(id,ierr)
1895  IF(ierr.NE.0) RETURN
1896 !
1897  exec_pos = instance_list_art(id)%MYPOSITION
1898  CALL check_call_position(exec_pos,'RUN_SET_CONFIG_ART',
1899  & no_position,
1900  & run_read_case_pos,ierr)
1901  IF(ierr.NE.0) RETURN
1902 !
1903  instance_list_art(id)%MYPOSITION = run_set_config_pos
1904 !
1905  CALL run_set_config_art_d(instance_list_art(id),lu,lng,
1906  & comm,lu.NE.0,ierr)
1907  IF(ierr.NE.0) RETURN
1908  CALL set_var_list_art_d(ierr)
1909 !
1910  END SUBROUTINE run_set_config_art
1911 !
1912  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1914  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1921  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1922  SUBROUTINE run_read_case_art(ID,CAS_FILE, DICO_FILE, INIT,IERR)
1923 !
1924  INTEGER, INTENT(IN) :: ID
1925  CHARACTER(LEN=250), INTENT(IN) :: CAS_FILE
1926  CHARACTER(LEN=250), INTENT(IN) :: DICO_FILE
1927  LOGICAL, INTENT(IN) :: INIT
1928  INTEGER, INTENT(OUT) :: IERR
1929 !
1930  INTEGER :: EXEC_POS
1931 !
1932  CALL check_instance_art(id,ierr)
1933  IF(ierr.NE.0) RETURN
1934 !
1935  exec_pos = instance_list_art(id)%MYPOSITION
1936  CALL check_call_position(exec_pos,'RUN_READ_CASE_ART',
1937  & run_set_config_pos,
1938  & run_allocation_pos,ierr)
1939  IF(ierr.NE.0) RETURN
1940 !
1941  instance_list_art(id)%MYPOSITION = run_read_case_pos
1942 !
1943  CALL run_read_case_art_d(instance_list_art(id),cas_file,
1944  & dico_file, init, ierr)
1945 !
1946  END SUBROUTINE run_read_case_art
1947 !
1948  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1950  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1954  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1955  SUBROUTINE run_allocation_art(ID,IERR)
1956 !
1957  INTEGER, INTENT(IN) :: ID
1958  INTEGER, INTENT(OUT) :: IERR
1959 !
1960  INTEGER :: EXEC_POS
1961 !
1962  CALL check_instance_art(id,ierr)
1963  IF(ierr.NE.0) RETURN
1964 !
1965  exec_pos = instance_list_art(id)%MYPOSITION
1966  CALL check_call_position(exec_pos,'RUN_ALLOCATION_ART',
1967  & run_read_case_pos,
1968  & run_init_pos,ierr)
1969  IF(ierr.NE.0) RETURN
1970  instance_list_art(id)%MYPOSITION = run_allocation_pos
1971 !
1973 !
1974  END SUBROUTINE run_allocation_art
1975 !
1976  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1978  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1982  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1983  SUBROUTINE run_init_art(ID,IERR)
1984 !
1985  INTEGER, INTENT(IN) :: ID
1986  INTEGER, INTENT(OUT) :: IERR
1987 !
1988  INTEGER :: EXEC_POS
1989 !
1990  CALL check_instance_art(id,ierr)
1991  IF(ierr.NE.0) RETURN
1992 !
1993  exec_pos = instance_list_art(id)%MYPOSITION
1994  CALL check_call_position(exec_pos,'RUN_INIT_ART',
1995  & run_allocation_pos,
1996  & run_timestep_pos,ierr)
1997  instance_list_art(id)%MYPOSITION = run_init_pos
1998 !
1999  CALL run_init_art_d(instance_list_art(id),ierr)
2000  END SUBROUTINE run_init_art
2001 !
2002  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2004  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009  SUBROUTINE run_timestep_art(ID,IERR)
2010 !
2011  INTEGER, INTENT(IN) :: ID
2012  INTEGER, INTENT(OUT) :: IERR
2013 !
2014  INTEGER :: EXEC_POS
2015 !
2016  CALL check_instance_art(id,ierr)
2017  IF(ierr.NE.0) RETURN
2018 !
2019  exec_pos = instance_list_art(id)%MYPOSITION
2020  CALL check_call_position(exec_pos,'RUN_TIMESTEP_ART',
2021  & run_init_pos,run_finalize_pos,ierr)
2022  IF(ierr.NE.0) RETURN
2023  instance_list_art(id)%MYPOSITION = run_timestep_pos
2024 !
2025  CALL run_timestep_art_d(instance_list_art(id),ierr)
2026 !
2027  END SUBROUTINE run_timestep_art
2028 !
2029  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2031  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2035  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2036  SUBROUTINE run_finalize_art(ID,IERR)
2037 !
2038  INTEGER :: EXEC_POS
2039 !
2040  INTEGER, INTENT(IN) :: ID
2041  INTEGER, INTENT(OUT) :: IERR
2042 !
2043  CALL check_instance_art(id,ierr)
2044  IF(ierr.NE.0) RETURN
2045 !
2046  exec_pos = instance_list_art(id)%MYPOSITION
2047  CALL check_call_position(exec_pos,'RUN_FINALIZE_ART',
2048  & run_timestep_pos,no_position,ierr)
2049  IF(ierr.NE.0) RETURN
2050  instance_list_art(id)%MYPOSITION = run_finalize_pos
2051 !
2052  CALL run_finalize_art_d(instance_list_art(id),ierr)
2053  IF(ierr.NE.0) RETURN
2054  CALL delete_instance_art(id,ierr)
2055  DEALLOCATE(vname_art)
2056  DEALLOCATE(vinfo_art)
2057 !
2058  END SUBROUTINE run_finalize_art
2059 !
2060 !***********************************************************************
2061 ! tomawac
2062 !***********************************************************************
2063 !
2064 !
2065 ! EXECUTION FUNCTIONS
2066 !
2067  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2069  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2076  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2077  SUBROUTINE run_set_config_wac(ID,LU,LNG,COMM,IERR)
2078 !
2079  INTEGER, INTENT(OUT) :: ID
2080  INTEGER, INTENT(IN) :: LU, LNG, COMM
2081  INTEGER, INTENT(OUT) :: IERR
2082 !
2083  INTEGER :: EXEC_POS
2084 !
2085  CALL create_instance_wac(id,ierr)
2086  IF(ierr.NE.0) RETURN
2087 !
2088  exec_pos = instance_list_wac(id)%MYPOSITION
2089  CALL check_call_position(exec_pos,'RUN_SET_CONFIG_WAC',
2090  & no_position,
2091  & run_read_case_pos,ierr)
2092  IF(ierr.NE.0) RETURN
2093 !
2094  instance_list_wac(id)%MYPOSITION = run_set_config_pos
2095 !
2096  CALL run_set_config_wac_d(instance_list_wac(id),lu,lng,
2097  & comm,lu.NE.0,ierr)
2098  IF(ierr.NE.0) RETURN
2099  CALL set_var_list_wac_d(ierr)
2100 !
2101  END SUBROUTINE run_set_config_wac
2102 !
2103  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2105  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2112  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2113  SUBROUTINE run_read_case_wac(ID,CAS_FILE, DICO_FILE, INIT,IERR)
2114 !
2115  INTEGER, INTENT(IN) :: ID
2116  CHARACTER(LEN=250), INTENT(IN) :: CAS_FILE
2117  CHARACTER(LEN=250), INTENT(IN) :: DICO_FILE
2118  LOGICAL, INTENT(IN) :: INIT
2119  INTEGER, INTENT(OUT) :: IERR
2120 !
2121  INTEGER :: EXEC_POS
2122 !
2123  CALL check_instance_wac(id,ierr)
2124  IF(ierr.NE.0) RETURN
2125 !
2126  exec_pos = instance_list_wac(id)%MYPOSITION
2127  CALL check_call_position(exec_pos,'RUN_READ_CASE_WAC',
2128  & run_set_config_pos,
2129  & run_allocation_pos,ierr)
2130  IF(ierr.NE.0) RETURN
2131 !
2132  instance_list_wac(id)%MYPOSITION = run_read_case_pos
2133 !
2134  CALL run_read_case_wac_d(instance_list_wac(id),cas_file,
2135  & dico_file, init,ierr)
2136 !
2137  END SUBROUTINE run_read_case_wac
2138 !
2139  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2141  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2145  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2146  SUBROUTINE run_allocation_wac(ID,IERR)
2147 !
2148  INTEGER, INTENT(IN) :: ID
2149  INTEGER, INTENT(OUT) :: IERR
2150 !
2151  INTEGER :: EXEC_POS
2152 !
2153  CALL check_instance_wac(id,ierr)
2154  IF(ierr.NE.0) RETURN
2155 !
2156  exec_pos = instance_list_wac(id)%MYPOSITION
2157  CALL check_call_position(exec_pos,'RUN_ALLOCATION_WAC',
2158  & run_read_case_pos,
2159  & run_init_pos,ierr)
2160  IF(ierr.NE.0) RETURN
2161  instance_list_wac(id)%MYPOSITION = run_allocation_pos
2162 !
2164 !
2165  END SUBROUTINE run_allocation_wac
2166 !
2167  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2169  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2173  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2174  SUBROUTINE run_init_wac(ID,IERR)
2175 !
2176  INTEGER, INTENT(IN) :: ID
2177  INTEGER, INTENT(OUT) :: IERR
2178 !
2179  INTEGER :: EXEC_POS
2180 !
2181  CALL check_instance_wac(id,ierr)
2182  IF(ierr.NE.0) RETURN
2183 !
2184  exec_pos = instance_list_wac(id)%MYPOSITION
2185  CALL check_call_position(exec_pos,'RUN_INIT_WAC',
2186  & run_allocation_pos,
2187  & run_timestep_pos,ierr)
2188  instance_list_wac(id)%MYPOSITION = run_init_pos
2189 !
2190  CALL run_init_wac_d(instance_list_wac(id),ierr)
2191  END SUBROUTINE run_init_wac
2192 !
2193  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2195  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2199  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2200  SUBROUTINE run_timestep_wac(ID,IERR)
2201 !
2202  INTEGER, INTENT(IN) :: ID
2203  INTEGER, INTENT(OUT) :: IERR
2204 !
2205  INTEGER :: EXEC_POS
2206 !
2207  CALL check_instance_wac(id,ierr)
2208  IF(ierr.NE.0) RETURN
2209 !
2210  exec_pos = instance_list_wac(id)%MYPOSITION
2211  CALL check_call_position(exec_pos,'RUN_TIMESTEP_WAC',
2212  & run_init_pos,run_finalize_pos,ierr)
2213  IF(ierr.NE.0) RETURN
2214  instance_list_wac(id)%MYPOSITION = run_timestep_pos
2215 !
2216  CALL run_timestep_wac_d(instance_list_wac(id),ierr)
2217 !
2218  END SUBROUTINE run_timestep_wac
2219 !
2220  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2222  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2226  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2227  SUBROUTINE run_finalize_wac(ID,IERR)
2228 !
2229  INTEGER :: EXEC_POS
2230 !
2231  INTEGER, INTENT(IN) :: ID
2232  INTEGER, INTENT(OUT) :: IERR
2233 !
2234  CALL check_instance_wac(id,ierr)
2235  IF(ierr.NE.0) RETURN
2236 !
2237  exec_pos = instance_list_wac(id)%MYPOSITION
2238  CALL check_call_position(exec_pos,'RUN_FINALIZE_WAC',
2239  & run_timestep_pos,no_position,ierr)
2240  IF(ierr.NE.0) RETURN
2241  instance_list_wac(id)%MYPOSITION = run_finalize_pos
2242 !
2243  CALL run_finalize_wac_d(instance_list_wac(id),ierr)
2244  IF(ierr.NE.0) RETURN
2245  CALL delete_instance_wac(id,ierr)
2246  DEALLOCATE(vname_wac)
2247  DEALLOCATE(vinfo_wac)
2248 !
2249  END SUBROUTINE run_finalize_wac
2250 !
2251 !***********************************************************************
2252 ! T2D/SIS
2253 !***********************************************************************
2254 !
2255  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2257  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2262  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2263  SUBROUTINE run_timestep_sis_cpl(ID_T2D, ID_SIS, IERR)
2264  INTEGER, INTENT(IN) :: ID_T2D, ID_SIS
2265  INTEGER, INTENT(OUT) :: IERR
2266 
2267  INTEGER CHARR_SUSP
2268  TYPE(instance_t2d) :: T2D
2269 
2270 
2271  ierr = 0
2272  CALL check_instance_t2d(id_t2d,ierr)
2273  IF(ierr.NE.0) RETURN
2274  CALL check_instance_sis(id_sis,ierr)
2275  IF(ierr.NE.0) RETURN
2276 
2277  t2d = instance_list_t2d(id_t2d)
2278 
2279  CALL preres_telemac2d()
2280  IF(t2d%LEO.AND.t2d%EQUA(1:15).NE.'SAINT-VENANT VF') THEN
2281  t2d%COMPLEO = t2d%COMPLEO-1
2282  ENDIF
2283 
2284  CALL charr_or_susp(id_t2d, id_sis, charr_susp, ierr)
2285  IF(charr_susp.EQ.1.OR.charr_susp.EQ.3) THEN
2286  CALL set_var_sis(id_t2d, id_sis, 1, ierr)
2287  CALL run_timestep_sis(id_sis,ierr)
2288  END IF
2289  IF(charr_susp.EQ.2.OR.charr_susp.EQ.3) THEN
2290  CALL set_var_sis(id_t2d, id_sis, 2, ierr)
2291  CALL run_timestep_sis(id_sis,ierr)
2292  END IF
2293  CALL set_var_t2d(id_t2d, id_sis, ierr)
2294 
2295  END SUBROUTINE run_timestep_sis_cpl
2296 !
2297 !***********************************************************************
2298 ! TOOLS
2299 !***********************************************************************
2300 !
2301  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2303  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2318  !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2319  SUBROUTINE identify_liq_bnd(
2320  & IKLES, DIM_MESH, NPTFR, NPOIN, NELEM2,
2321  & LIUBOR, LIHBOR, NBOR, COORD,
2322  & NELBOR, IFABOR, KP1BOR, NUMLIQ, LISTIN)
2323 !
2327  USE bief, ONLY: ncsize
2328 !
2329  IMPLICIT NONE
2330 !
2331  INTEGER, INTENT(IN) :: DIM_MESH, NPOIN
2332  INTEGER, INTENT(IN) :: NPTFR, NELEM2
2333  INTEGER, INTENT(INOUT) :: NBOR(nptfr)
2334  DOUBLE PRECISION, INTENT(IN) :: COORD(npoin*2)
2335  INTEGER, INTENT(IN) :: IKLES(nelem2*3)
2336  INTEGER, INTENT(IN) :: LIUBOR(nptfr), LIHBOR(nptfr)
2337  INTEGER, INTENT(OUT) :: NELBOR(nptfr),
2338  & kp1bor(nptfr,2), ifabor(nelem2,3), numliq(nptfr)
2339  LOGICAL, INTENT(IN) :: LISTIN
2340 !
2341  CHARACTER(LEN=PATH_LEN) :: NAMEINP
2342  INTEGER, ALLOCATABLE :: IKLE(:,:)
2343  INTEGER, ALLOCATABLE :: LNELBOR(:),
2344  & lkp1bor(:,:), lifabor(:,:), lnumliq(:)
2345  INTEGER :: LNPTFR, LNELEM2
2346 
2347  nameinp = repeat(' ', path_len)
2348  lu = 6
2349  lng = 2
2350  ! SET NCSIZE TO 1 TO USE VOISIN AND READ_MESH_INFO IN SERIAL MODE
2351  ncsize = 1
2352  lnptfr = nptfr
2353  lnelem2 = nelem2
2354 
2356  & nameinp, ikle, ikles, lkp1bor, lnumliq, dim_mesh, npoin,
2357  & lnptfr, npoin, lnelem2, lnelbor, liubor, lihbor, nbor,
2358  & lifabor, coord, listin)
2359 
2360  nelbor = lnelbor
2361  kp1bor = lkp1bor
2362  ifabor = lifabor
2363  numliq = lnumliq
2364 
2365  DEALLOCATE(ikle)
2366  DEALLOCATE(lnelbor)
2367  DEALLOCATE(lkp1bor)
2368  DEALLOCATE(lifabor)
2369  DEALLOCATE(lnumliq)
2370 
2371 
2372  END SUBROUTINE identify_liq_bnd
2373 
2374  END MODULE api_interface
subroutine save_charr_susp(ID_T2D, ID_SIS, IERR)
subroutine get_boolean_sis_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine, public set_var_sis_cpl(INST_T2D, CALL_TYPE, INST_SIS, IERR)
Definition: api_coupling.f:110
subroutine, public run_read_case_sis_d(INST, CODE1, CAS_FILE, DICO_FILE, INIT, IERR)
Definition: api_run_sis.f:86
subroutine get_boolean_t3d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine get_integer_array_sis_d(INST, VARNAME, VALEUR, DIM1, IERR)
type(instance_sis), dimension(:), pointer, public instance_list_sis
subroutine run_allocation_sis(ID, IERR)
subroutine run_init_sis(ID, IERR)
subroutine, public run_init_sis_d(INST, IERR)
Definition: api_run_sis.f:146
subroutine set_var_list_t2d_d(IERR)
subroutine run_timestep_wac(ID, IERR)
subroutine get_double(ID, TAG, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
character(len=sis_var_len), dimension(:), allocatable vname_sis
List of variable names.
subroutine, public run_allocation_sis_d(INST, IERR)
Definition: api_run_sis.f:122
subroutine run_init_t3d(ID, IERR)
subroutine get_integer_array_art_d(INST, VARNAME, VALEUR, DIM1, IERR)
integer, parameter nb_var_t2d
The maximum number of variables.
subroutine, public run_set_config_art_d(INST, U_LU, U_LNG, U_COMM, U_STD_OUTPUT, IERR)
Definition: api_run_art.f:54
type(instance_wac), dimension(:), pointer, public instance_list_wac
subroutine get_boolean(ID, TAG, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
integer, parameter nb_var_art
The maximum number of variable.
subroutine, public delete_instance_art(ID, IERR)
subroutine set_integer_array_sis_d(INST, VARNAME, VALEUR, DIM1, IERR)
subroutine run_gretel(CODE, GEO, GEOFORMAT, BND, RES, RESFORMAT, NPROC, NPLAN_RES, METHOD)
subroutine, public run_allocation_t3d_d(INST, IERR)
Definition: api_run_t3d.f:183
subroutine get_var_type_t3d_d(VARNAME, VARTYPE, READONLY, NDIM, IENT, JENT, KENT, GETPOS, SETPOS, IERR)
subroutine get_integer(ID, TAG, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine get_var_type_art_d(VARNAME, VARTYPE, READONLY, NDIM, IENT, JENT, KENT, GETPOS, SETPOS, IERR)
subroutine, public check_instance_t3d(ID, IERR)
subroutine, public run_set_config_wac_d(INST, U_LU, U_LNG, U_COMM, U_STD_OUTPUT, IERR)
Definition: api_run_wac.f:54
subroutine set_string_sis_d(INST, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
subroutine, public run_timestep_art_d(INST, IERR)
Definition: api_run_art.f:170
subroutine get_var_size_t2d_d(INST, VARNAME, DIM1, DIM2, DIM3, IERR)
subroutine, public cpl_init_t2d(ID, IERR)
subroutine parres(NAMEGEO, NAMEINP, NPARTS, GEOFORMAT, INPFORMAT)
Definition: parres.f:6
subroutine set_integer_wac_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine set_string_t3d_d(INST, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
subroutine set_integer_t2d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
type(instance_t3d), dimension(:), pointer, public instance_list_t3d
subroutine run_init_wac(ID, IERR)
subroutine, public get_instance_error_t2d(ID, MESS)
subroutine, public run_timestep_t3d_d(INST, IERR)
Definition: api_run_t3d.f:272
subroutine run_finalize_t2d(ID, IERR)
subroutine, public delete_instance_sis(ID, IERR)
subroutine get_boolean_wac_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine run_init_art(ID, IERR)
subroutine set_integer(ID, TAG, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine, public run_set_config_sis_d(INST, U_LU, U_LNG, U_COMM, U_STD_OUTPUT, IERR)
Definition: api_run_sis.f:56
subroutine, public run_allocation_t2d_d(INST, IERR)
Definition: api_run_t2d.f:146
subroutine run_timestep_res_t2d(ID, IERR)
subroutine run_read_case_t3d(ID, CAS_FILE, DICO_FILE, INIT, IERR, WAQ_CAS_FILE, WAQ_DICO_FILE, GAIA_CAS_FILE, GAIA_DICO_FILE)
subroutine partel(NAMEINP, NAMECLI, NPARTS, PMETHOD, FFORMAT, NAMESEC, NAMEZFI, NAMESEU)
Definition: partel.F:7
subroutine set_double_t2d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine set_integer_array_wac_d(INST, VARNAME, VALEUR, DIM1, IERR)
subroutine get_integer_t3d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine, public run_finalize_art_d(INST, IERR)
Definition: api_run_art.f:188
subroutine run_timestep_sis(ID, IERR)
subroutine, public create_instance_wac(ID, IERR)
subroutine numbering_open_boundaries(NAMEINP, IKLE, IKLES, KP1BOR, NUMLIQ, DIM_MESH, NPOIN2, NPTFR, NPOIN, NELEM2, NELBOR, LIUBOR, LIHBOR, NBOR, IFABOR, F, LISTIN)
subroutine set_double_array_t2d_d(INST, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine get_double_wac_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine set_double_wac_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine set_integer_art_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine, public run_finalize_sis_d(INST, IERR)
Definition: api_run_sis.f:219
subroutine, public delete_instance_t2d(ID, IERR)
subroutine, public create_instance_t3d(ID, IERR)
subroutine, public create_instance_art(ID, IERR)
character(len=art_info_len), dimension(:), allocatable vinfo_art
List of variable info.
subroutine get_double_array(ID, TAG, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
integer, parameter nb_var_t3d
The maximum number of variable.
subroutine check_instance(ID, TAG, IERR)
subroutine run_read_case_wac(ID, CAS_FILE, DICO_FILE, INIT, IERR)
subroutine, public create_instance_t2d(ID, IERR)
subroutine run_finalize_art(ID, IERR)
subroutine set_string_art_d(INST, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
subroutine get_error_message(ID, TAG, IERR, MESS)
subroutine get_boolean_t2d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine set_boolean_wac_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine set_string_t2d_d(INST, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
subroutine get_var_size_t3d_d(INST, VARNAME, DIM1, DIM2, DIM3, IERR)
subroutine, public run_finalize_t2d_d(INST, IERR)
Definition: api_run_t2d.f:268
character(len=t3d_var_len), dimension(:), allocatable vname_t3d
List of variable names.
character(len=200), dimension(:), allocatable vinfo_t2d
List of variable info.
subroutine set_double_sis_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine run_timestep_compute_t2d(ID, IERR)
subroutine set_integer_t3d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine get_integer_art_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine get_var_size_wac_d(INST, VARNAME, DIM1, DIM2, DIM3, IERR)
subroutine get_double_array_wac_d(INST, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine, public run_allocation_wac_d(INST, IERR)
Definition: api_run_wac.f:120
integer, external global_to_local_point
Definition: api_interface.f:29
subroutine get_var_type(TAG, VARNAME, VARTYPE, READONLY, NDIM, IENT, JENT, KENT, GETPOS, SETPOS, IERR)
integer ncsize
Definition: bief_def.f:49
subroutine gretel_autop(GEO, GEOFORMAT, BND, RES, RESFORMAT, NPROC, NPLAN_RES, METHOD)
Definition: gretel_autop.f:6
type(instance_t2d), dimension(:), pointer, public instance_list_t2d
subroutine run_read_case_sis(ID, CODE, CAS_FILE, DICO_FILE, INIT, IERR)
subroutine set_boolean_sis_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine set_integer_sis_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine set_double_array_wac_d(INST, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine set_double_t3d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine get_string_t3d_d(INST, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
subroutine get_string_t2d_d(INST, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
subroutine set_double_art_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine cpl_init(ID, IERR)
subroutine get_var_type_wac_d(VARNAME, VARTYPE, READONLY, NDIM, IENT, JENT, KENT, GETPOS, SETPOS, IERR)
subroutine set_var_list_t3d_d(IERR)
subroutine, public run_set_config_t2d_d(INST, U_LU, U_LNG, U_COMM, U_STD_OUTPUT, IERR)
Definition: api_run_t2d.f:63
subroutine, public run_read_case_t2d_d(INST, CAS_FILE, DICO_FILE, INIT, IERR, GAIA_CAS, GAIA_DICO)
Definition: api_run_t2d.f:93
subroutine run_read_case_art(ID, CAS_FILE, DICO_FILE, INIT, IERR)
subroutine run_finalize_t3d(ID, IERR)
character(len=wac_info_len), dimension(:), allocatable vinfo_wac
List of variable info.
subroutine get_integer_array_wac_d(INST, VARNAME, VALEUR, DIM1, IERR)
subroutine get_string_wac_d(INST, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
subroutine, public run_init_t2d_d(INST, IERR)
Definition: api_run_t2d.f:190
character(len=24), parameter code
Definition: api_run_sis.f:24
subroutine set_integer_array_t3d_d(INST, VARNAME, VALEUR, DIM1, IERR)
subroutine, public run_timestep_res_t2d_d(INST, IERR)
Definition: api_run_t2d.f:230
subroutine, public create_instance_sis(ID, IERR)
subroutine get_double_t2d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine, public run_init_t3d_d(INST, IERR)
Definition: api_run_t3d.f:252
subroutine run_init_t2d(ID, IERR)
character(len=t3d_info_len), dimension(:), allocatable vinfo_t3d
List of variable info.
subroutine set_string(ID, TAG, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
integer, parameter nb_var_wac
The maximum number of variable.
subroutine get_double_sis_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
character(len=art_var_len), dimension(:), allocatable vname_art
List of variable names.
subroutine set_boolean_t3d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine run_set_config_t2d(ID, LU, LNG, COMM, IERR)
subroutine set_double_array_t3d_d(INST, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine get_var_type_t2d_d(VARNAME, VARTYPE, READONLY, NDIM, IENT, JENT, KENT, GETPOS, SETPOS, IERR)
character(len=40), dimension(:), allocatable vname_t2d
List of variable names.
subroutine charr_or_susp(ID_T2D, ID_SIS, CHARR_SUSP, IERR)
subroutine run_allocation_t3d(ID, IERR)
subroutine run_allocation_t2d(ID, IERR)
subroutine, public run_init_art_d(INST, IERR)
Definition: api_run_art.f:150
subroutine set_var_list_sis_d(IERR)
subroutine set_var_sis(ID_T2D, ID_SIS, CALL_TYPE, IERR)
subroutine set_double(ID, TAG, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine get_double_t3d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine run_timestep_art(ID, IERR)
subroutine set_boolean(ID, TAG, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine run_set_config_art(ID, LU, LNG, COMM, IERR)
subroutine, public run_finalize_t3d_d(INST, IERR)
Definition: api_run_t3d.f:291
subroutine set_integer_array_t2d_d(INST, VARNAME, VALEUR, DIM1, IERR)
subroutine, public charr_or_susp_cpl(INST_SIS, INST_T2D, CHARR_SUSP, IERR)
Definition: api_coupling.f:61
subroutine, public check_instance_art(ID, IERR)
subroutine run_finalize_sis(ID, IERR)
subroutine get_integer_sis_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine get_double_array_art_d(INST, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine set_var_list_wac_d(IERR)
subroutine, public run_read_case_wac_d(INST, CAS_FILE, DICO_FILE, INIT, IERR)
Definition: api_run_wac.f:81
subroutine get_double_array_t3d_d(INST, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine set_var_t2d(ID_T2D, ID_SIS, IERR)
subroutine get_var_size_sis_d(INST, VARNAME, DIM1, DIM2, DIM3, IERR)
subroutine, public run_read_case_t3d_d(INST, CAS_FILE, DICO_FILE, INIT, IERR, WAQ_CAS_FILE, WAQ_DICO_FILE, GAIA_CAS_FILE, GAIA_DICO_FILE)
Definition: api_run_t3d.f:96
subroutine, public run_init_wac_d(INST, IERR)
Definition: api_run_wac.f:153
subroutine preres_telemac2d
subroutine, public run_timestep_compute_t2d_d(INST, IERR)
Definition: api_run_t2d.f:212
type(instance_art), dimension(:), pointer, public instance_list_art
subroutine run_timestep_t2d(ID, IERR)
subroutine, public check_instance_wac(ID, IERR)
subroutine run_parres(CODE, NAMEGEO, NAMEINP, NPARTS, GEOFORMAT, INPFORMAT, IERR)
subroutine get_string(ID, TAG, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
subroutine run_partel(CODE, NAMEINP, NAMECLI, NPARTS, PMETHOD, FFORMAT, NAMESEC, NAMEZFI, NAMESEU, IERR)
Definition: api_interface.f:56
subroutine get_var_list(TAG, VARNAME, VARINFO, IERR)
subroutine get_integer_t2d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine, public delete_instance_t3d(ID, IERR)
subroutine get_string_sis_d(INST, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
subroutine, public get_instance_error_art(ID, MESS)
subroutine, public get_instance_error_t3d(ID, MESS)
subroutine get_var_size_art_d(INST, VARNAME, DIM1, DIM2, DIM3, IERR)
subroutine get_double_array_sis_d(INST, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine, public save_charr_susp_cpl(INST_SIS, INST_T2D, IERR)
Definition: api_coupling.f:35
subroutine run_allocation_art(ID, IERR)
subroutine, public get_instance_error_wac(ID, MESS)
subroutine get_double_array_t2d_d(INST, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine set_integer_array_art_d(INST, VARNAME, VALEUR, DIM1, IERR)
subroutine set_double_array(ID, TAG, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine set_double_array_art_d(INST, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine, public check_instance_sis(ID, IERR)
subroutine get_boolean_art_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine run_set_config_wac(ID, LU, LNG, COMM, IERR)
subroutine get_var_type_sis_d(VARNAME, VARTYPE, READONLY, NDIM, IENT, JENT, KENT, GETPOS, SETPOS, IERR)
subroutine set_var_list_art_d(IERR)
subroutine run_allocation_wac(ID, IERR)
integer, parameter str_len
Definition: api_interface.f:30
subroutine, public delete_instance_wac(ID, IERR)
character(len=sis_info_len), dimension(:), allocatable vinfo_sis
List of variable info.
subroutine get_integer_array(ID, TAG, VARNAME, VALEUR, DIM1, IERR)
subroutine identify_liq_bnd(IKLES, DIM_MESH, NPTFR, NPOIN, NELEM2, LIUBOR, LIHBOR, NBOR, COORD, NELBOR, IFABOR, KP1BOR, NUMLIQ, LISTIN)
integer, parameter path_len
subroutine, public set_var_t2d_cpl(INST_SIS, INST_T2D, IERR)
Definition: api_coupling.f:209
subroutine run_set_config_t3d(ID, LU, LNG, COMM, IERR)
subroutine set_boolean_t2d_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine get_integer_wac_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine run_read_case_t2d(ID, CAS_FILE, DICO_FILE, INIT, IERR, GAIA_CAS, GAIA_DICO)
subroutine get_integer_array_t2d_d(INST, VARNAME, VALEUR, DIM1, IERR)
subroutine, public run_set_config_t3d_d(INST, U_LU, U_LNG, U_COMM, U_STD_OUTPUT, IERR)
Definition: api_run_t3d.f:63
subroutine get_string_art_d(INST, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
character(len=wac_var_len), dimension(:), allocatable vname_wac
List of variable names.
subroutine set_boolean_art_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine set_double_array_sis_d(INST, VARNAME, VALEUR, DIM1, IERR, BLOCK_INDEX)
subroutine, public run_finalize_wac_d(INST, IERR)
Definition: api_run_wac.f:195
subroutine get_double_art_d(INST, VARNAME, VALEUR, INDEX1, INDEX2, INDEX3, IERR)
subroutine run_finalize_wac(ID, IERR)
subroutine run_set_config_sis(ID, LU, LNG, COMM, IERR)
subroutine set_string_wac_d(INST, VARNAME, VALEUR, VALUELEN, INDEX1, INDEX2, IERR)
subroutine set_integer_array(ID, TAG, VARNAME, VALEUR, DIM1, IERR)
subroutine, public run_read_case_art_d(INST, CAS_FILE, DICO_FILE, INIT, IERR)
Definition: api_run_art.f:81
subroutine get_integer_array_t3d_d(INST, VARNAME, VALEUR, DIM1, IERR)
subroutine run_timestep_sis_cpl(ID_T2D, ID_SIS, IERR)
subroutine, public run_timestep_sis_d(INST, IERR)
Definition: api_run_sis.f:179
subroutine, public get_instance_error_sis(ID, MESS)
subroutine get_var_size(ID, TAG, VARNAME, DIM1, DIM2, DIM3, IERR)
integer, parameter nb_var_sis
The maximum number of variable.
subroutine, public check_instance_t2d(ID, IERR)
subroutine, public run_allocation_art_d(INST, IERR)
Definition: api_run_art.f:121
subroutine, public run_timestep_wac_d(INST, IERR)
Definition: api_run_wac.f:175
subroutine run_timestep_t3d(ID, IERR)
Definition: bief.f:3