SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
latlon_gridtype_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 latlon_gridtype_gauss(KGRID_PAR,KL,PGRID_PAR,PLAT,PLON,PMESH_SIZE,PDIR)
7 !#########################################################################
8 !
9 !!**** *LATLON_GRIDTYPE_GAUSS* - routine to get the horizontal geographic fields
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!** METHOD
15 !! ------
16 !!
17 !! EXTERNAL
18 !! --------
19 !!
20 !! IMPLICIT ARGUMENTS
21 !! ------------------
22 !!
23 !! REFERENCE
24 !! ---------
25 !!
26 !! AUTHOR
27 !! ------
28 !! V. Masson *Meteo France*
29 !!
30 !! MODIFICATIONS
31 !! -------------
32 !! Original 01/2004
33 !! F. Taillefer 11/2007 correct estimation of the grid meshes
34 !
35 !-------------------------------------------------------------------------------
36 !
37 !* 0. DECLARATIONS
38 ! ------------
39 !
41 !
42 USE modd_csts, ONLY : xradius, xpi
43 !
44 !
45 USE yomhook ,ONLY : lhook, dr_hook
46 USE parkind1 ,ONLY : jprb
47 !
48 IMPLICIT NONE
49 !
50 !* 0.1 Declarations of arguments
51 ! -------------------------
52 !
53 INTEGER, INTENT(IN) :: kgrid_par ! size of PGRID_PAR
54 INTEGER, INTENT(IN) :: kl ! number of points
55 REAL, DIMENSION(KGRID_PAR), INTENT(IN) :: pgrid_par ! parameters defining this grid
56 REAL, DIMENSION(KL), INTENT(OUT) :: plat ! latitude (degrees)
57 REAL, DIMENSION(KL), INTENT(OUT) :: plon ! longitude (degrees)
58 REAL, DIMENSION(KL), INTENT(OUT) :: pmesh_size ! mesh size (m2)
59 REAL, DIMENSION(KL), INTENT(OUT) :: pdir ! direction of main grid Y axis (deg. from N, clockwise)
60 REAL(KIND=JPRB) :: zhook_handle
61 !
62 !* 0.2 Declarations of local variables
63 ! -------------------------------
64 !
65 !---------------------------------------------------------------------------
66 !
67 !* 1. get grid component
68 ! ------------------
69 !
70 IF (lhook) CALL dr_hook('LATLON_GRIDTYPE_GAUSS',0,zhook_handle)
71  CALL get_gridtype_gauss(pgrid_par,plat=plat,plon=plon,pmesh_size=pmesh_size)
72 !
73 !-----------------------------------------------------------------------------
74 !
75 !* 2. Direction of Y axis (from North) for each grid point (degrees)
76 ! ----------------------------------------------------
77 !
78 !* the following formulae is given for clockwise angles.
79 !
80 !A COMPLETER
81 !
82 pdir(:) = 0.
83 IF (lhook) CALL dr_hook('LATLON_GRIDTYPE_GAUSS',1,zhook_handle)
84 !
85 !WHERE (PDIR(:) <0.) PDIR = PDIR + 360.
86 !WHERE (PDIR(:) >=360.) PDIR = PDIR - 360.
87 !
88 !---------------------------------------------------------------------------
89 !
90 END SUBROUTINE latlon_gridtype_gauss
subroutine latlon_gridtype_gauss(KGRID_PAR, KL, PGRID_PAR, PLAT, PLON, PMESH_SIZE, PDIR)
subroutine get_gridtype_gauss(PGRID_PAR, KNLATI, PLAPO, PLOPO, PCODIL, KNLOPA, KL, PLAT, PLON, PLAT_XY, PLON_XY, PMESH_SIZE, PLONINF, PLATINF, PLONSUP, PLATSUP)