The TELEMAC-MASCARET system  trunk
xy_tomawac.f
Go to the documentation of this file.
1 ! *********************
2  SUBROUTINE xy_tomawac
3 ! *********************
4 !
5  &( spec )
6 !
7 !***********************************************************************
8 ! ARTEMIS V7P2 Feb 2017
9 !***********************************************************************
10 !
11 !brief READS IN THE COORDINATES OF THE OUTER MODEL GRID NODES.
12 !
13 !history N.DURAND (HRW)
14 !+ March 2001
15 !+
16 !+ Original version (applied to COWADIS)
17 !
18 !history N.DURAND (HRW)
19 !+ Feb 2017
20 !+ V7P2
21 !+ Revisited to use the hermes module
22 !
23 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 !| SPEC |<->| SPECTRUM STRUCTURE
25 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 !
27  USE bief
29 !
31  IMPLICIT NONE
32 !
33 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
34 !
35  TYPE(spectrum) , INTENT(INOUT) :: SPEC
36 !
37 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
38 !
39  INTEGER :: IERR, I
40  INTEGER :: NFIC1, TYP1, NPOIN1
41 !
42  DOUBLE PRECISION,ALLOCATABLE :: X1(:),Y1(:)
43 !
44  CHARACTER(LEN=8) :: FFORMAT1
45 !
46 !-----------------------------------------------------------------------
47 !
48 ! FOR THE OUTER TOMAWAC MODEL
49  nfic1 = art_files(wacres)%LU
50  fformat1 = art_files(wacres)%FMT
51  typ1 = triangle_elt_type
52 !
53 !-----------------------------------------------------------------------
54 !
55 ! NUMBER OF NODES IN THE TOMAWAC OUTER MESH
56 !
57  CALL get_mesh_npoin(fformat1,nfic1,typ1,npoin1,ierr)
58  CALL check_call(ierr,'XY_TOMAWAC:GET_MESH_NPOIN')
59 ! IF(DEBUG.GT.0) WRITE(LU,*) 'XY_TOMAWAC:NPOIN_OUTER:',NPOIN1
60 !
61 ! COORDINATES
62 !
63  ALLOCATE(x1(npoin1),stat=ierr)
64  CALL check_allocate(ierr,'XY_TOMAWAC:X1')
65  ALLOCATE(y1(npoin1),stat=ierr)
66  CALL check_allocate(ierr,'XY_TOMAWAC:Y1')
67  CALL get_mesh_coord(fformat1,nfic1,1,2,npoin1,x1,ierr)
68  CALL check_call(ierr, 'XY_TOMAWAC:GET_MESH_COORD:X_OUTER')
69  CALL get_mesh_coord(fformat1,nfic1,2,2,npoin1,y1,ierr)
70  CALL check_call(ierr, 'XY_TOMAWAC:GET_MESH_COORD:Y_OUTER')
71 !
72 ! X AND Y FOR EACH SPECTRUM/POINT IN SPEC
73 !
74  DO i=1,spec%N
75  spec%XOUTER(i) = x1(spec%NOUTER(i))
76  spec%YOUTER(i) = y1(spec%NOUTER(i))
77  ENDDO
78 ! IF(DEBUG.GT.0) WRITE(LU,*)
79 ! & 'XY_TOMAWAC:SPEC%XOUTER:',SPEC%XOUTER
80 ! IF(DEBUG.GT.0) WRITE(LU,*)
81 ! & 'XY_TOMAWAC:SPEC%YOUTER:',SPEC%YOUTER
82 !
83  DEALLOCATE(x1,y1)
84 !
85 !-----------------------------------------------------------------------
86 !
87  RETURN
88  END
subroutine get_mesh_npoin(FFORMAT, FID, TYP_ELEM, NPOIN, IERR)
Definition: get_mesh_npoin.f:7
integer, parameter triangle_elt_type
subroutine xy_tomawac(SPEC)
Definition: xy_tomawac.f:7
type(bief_file), dimension(maxlu_art), target art_files
subroutine get_mesh_coord(FFORMAT, FID, JDIM, NDIM, NPOIN, COORD, IERR)
Definition: get_mesh_coord.f:7
Definition: bief.f:3