SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
get_mesh_corner_gauss.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #######################################################################################
6  SUBROUTINE get_mesh_corner_gauss(KGRID_PAR,KL,KC,PGRID_PAR,PCORNER_LAT,PCORNER_LON)
7 ! #######################################################################################
8 !
9 !!**** *GET_MESH_CORNER_GAUSS* get the grid mesh where point (lat,lon) is located
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !! AUTHOR
15 !! ------
16 !!
17 !! B. Decharme Meteo-France
18 !!
19 !! MODIFICATION
20 !! ------------
21 !!
22 !! Original 10/2013
23 !!
24 !----------------------------------------------------------------------------
25 !
26 !* 0. DECLARATION
27 ! -----------
28 !
30 !
31 USE modi_abor1_sfx
32 !
33 USE yomhook ,ONLY : lhook, dr_hook
34 USE parkind1 ,ONLY : jprb
35 !
36 IMPLICIT NONE
37 !
38 !* 0.1 Declaration of arguments
39 ! ------------------------
40 !
41 INTEGER, INTENT(IN) :: kgrid_par ! size of PGRID_PAR
42 INTEGER, INTENT(IN) :: kl ! number of points
43 INTEGER, INTENT(IN) :: kc ! number of grid point corner
44 REAL, DIMENSION(KGRID_PAR), INTENT(IN) :: pgrid_par ! grid parameters
45 REAL, DIMENSION(KL,KC), INTENT(OUT) :: pcorner_lat ! Grid corner Latitude
46 REAL, DIMENSION(KL,KC), INTENT(OUT) :: pcorner_lon ! Grid corner Longitude
47 !
48 !* 0.2 Declaration of other local variables
49 ! ------------------------------------
50 !
51 INTEGER :: ini ! Number of point
52 !
53 REAL(KIND=JPRB) :: zhook_handle
54 !
55 !----------------------------------------------------------------------------
56 !
57 IF (lhook) CALL dr_hook('GET_MESH_CORNER_GAUSS',0,zhook_handle)
58 !
59 !* 1. Gets parameters of the projection
60 ! ---------------------------------
61 !
62  CALL get_gridtype_gauss(pgrid_par,kl=ini)
63 !
64 IF(kl/=ini)THEN
65  CALL abor1_sfx('GET_MESH_CORNER_GAUSS: WRONG NUMBER OF POINT')
66 ENDIF
67 !
68 !* 2. grid cell corner (counterclockwise sense)
69 ! -----------------------------------------
70 !
71 ! 4_______3
72 ! | |
73 ! | . |
74 ! | |
75 ! |_______|
76 ! 1 2
77 !
78  CALL get_gridtype_gauss(pgrid_par,ploninf=pcorner_lon(:,1), &
79  platinf=pcorner_lat(:,1), &
80  plonsup=pcorner_lon(:,3), &
81  platsup=pcorner_lat(:,3) )
82 !
83 pcorner_lon(:,2)=pcorner_lon(:,3)
84 pcorner_lat(:,2)=pcorner_lat(:,1)
85 !
86 pcorner_lon(:,4)=pcorner_lon(:,1)
87 pcorner_lat(:,4)=pcorner_lat(:,3)
88 !
89 IF (lhook) CALL dr_hook('GET_MESH_CORNER_GAUSS',1,zhook_handle)
90 !
91 !-------------------------------------------------------------------------------
92 END SUBROUTINE get_mesh_corner_gauss
subroutine get_mesh_corner_gauss(KGRID_PAR, KL, KC, PGRID_PAR, PCORNER_LAT, PCORNER_LON)
subroutine get_gridtype_gauss(PGRID_PAR, KNLATI, PLAPO, PLOPO, PCODIL, KNLOPA, KL, PLAT, PLON, PLAT_XY, PLON_XY, PMESH_SIZE, PLONINF, PLATINF, PLONSUP, PLATSUP)
subroutine abor1_sfx(YTEXT)
Definition: abor1_sfx.F90:6