SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
get_mesh_dim_conf_proj.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_dim_conf_proj(KGRID_PAR,KL,PGRID_PAR,PDX,PDY)
7 ! ##############################################################
8 !
9 !!**** *GET_MESH_DIM_CONF_PROJ* get the grid mesh dimensions
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !! METHOD
15 !! ------
16 !!
17 !! REFERENCE
18 !! ---------
19 !!
20 !! AUTHOR
21 !! ------
22 !!
23 !! V. Masson Meteo-France
24 !!
25 !! MODIFICATION
26 !! ------------
27 !!
28 !! Original 03/2004
29 !!
30 !----------------------------------------------------------------------------
31 !
32 !* 0. DECLARATION
33 ! -----------
34 !
36 !
37 !
38 USE yomhook ,ONLY : lhook, dr_hook
39 USE parkind1 ,ONLY : jprb
40 !
41 IMPLICIT NONE
42 !
43 !* 0.1 Declaration of arguments
44 ! ------------------------
45 !
46 INTEGER, INTENT(IN) :: kgrid_par ! size of PGRID_PAR
47 INTEGER, INTENT(IN) :: kl ! number of points
48 REAL, DIMENSION(KGRID_PAR), INTENT(IN) :: pgrid_par ! grid parameters
49 REAL, DIMENSION(KL), INTENT(OUT) :: pdx ! dimension in x dir. (meters)
50 REAL, DIMENSION(KL), INTENT(OUT) :: pdy ! dimension in y dir. (meters)
51 !
52 !* 0.2 Declaration of other local variables
53 ! ------------------------------------
54 !
55 REAL :: zlat0 ! reference latitude
56 REAL :: zlon0 ! reference longitude
57 REAL :: zrpk ! projection parameter
58 ! ! K=1 : stereographic north pole
59 ! ! 0<K<1 : Lambert, north hemisphere
60 ! ! K=0 : Mercator
61 ! !-1<K<0 : Lambert, south hemisphere
62 ! ! K=-1: stereographic south pole
63 REAL :: zbeta ! angle between grid and reference longitude
64 REAL :: zlator ! latitude of point of coordinates X=0, Y=0
65 REAL :: zlonor ! longitude of point of coordinates X=0, Y=0
66 REAL, DIMENSION(KL) :: zx ! X conformal coordinate
67 REAL, DIMENSION(KL) :: zy ! Y conformal coordinate
68 REAL, DIMENSION(KL) :: zlat ! latitude
69 REAL, DIMENSION(KL) :: zlon ! longitude
70 REAL, DIMENSION(KL) :: zmap ! map factor
71 REAL(KIND=JPRB) :: zhook_handle
72 
73 !----------------------------------------------------------------------------
74 !
75 IF (lhook) CALL dr_hook('GET_MESH_DIM_CONF_PROJ',0,zhook_handle)
76  CALL get_gridtype_conf_proj(pgrid_par,zlat0,zlon0,zrpk,zbeta,&
77  zlator,zlonor, &
78  px=zx,py=zy,pdx=pdx,pdy=pdy )
79 !
80 !---------------------------------------------------------------------------
81 !
82 !* 2. Computation of latitude and longitude
83 ! -------------------------------------
84 !
85  CALL latlon_conf_proj(zlat0,zlon0,zrpk,zbeta,zlator,zlonor,zx,zy,zlat,zlon)
86 !
87 !-----------------------------------------------------------------------------
88 !
89 !* 3. Compute grif size
90 ! -----------------
91 !
92  CALL map_factor_conf_proj(zlat0,zrpk,zlat,zmap)
93 !
94 pdx(:) = pdx(:) / zmap(:)
95 pdy(:) = pdy(:) / zmap(:)
96 IF (lhook) CALL dr_hook('GET_MESH_DIM_CONF_PROJ',1,zhook_handle)
97 !
98 !-------------------------------------------------------------------------------
99 !
100 END SUBROUTINE get_mesh_dim_conf_proj
subroutine map_factor_conf_proj(PLAT0, PRPK, PLAT, PMAP)
subroutine latlon_conf_proj(PLAT0, PLON0, PRPK, PBETA, PLATOR, PLONOR, PX, PY, PLAT, PLON)
subroutine get_mesh_dim_conf_proj(KGRID_PAR, KL, PGRID_PAR, PDX, PDY)
subroutine get_gridtype_conf_proj(PGRID_PAR, PLAT0, PLON0, PRPK, PBETA, PLATOR, PLONOR, KIMAX, KJMAX, PX, PY, PDX, PDY, KL)