SURFEX v7.3
General documentation of Surfex
 All Classes Files Functions Variables Typedefs
/home/dasprezs/EXPORT_v7_3/src/SURFEX/get_mesh_dim_conf_proj.F90
Go to the documentation of this file.
00001 !     #########
00002       SUBROUTINE GET_MESH_DIM_CONF_PROJ(KGRID_PAR,KL,PGRID_PAR,PDX,PDY)
00003 !     ##############################################################
00004 !
00005 !!**** *GET_MESH_DIM_CONF_PROJ* get the grid mesh dimensions
00006 !!
00007 !!    PURPOSE
00008 !!    -------
00009 !!
00010 !!    METHOD
00011 !!    ------
00012 !!   
00013 !!    REFERENCE
00014 !!    ---------
00015 !!
00016 !!    AUTHOR
00017 !!    ------
00018 !!
00019 !!    V. Masson         Meteo-France
00020 !!
00021 !!    MODIFICATION
00022 !!    ------------
00023 !!
00024 !!    Original    03/2004
00025 !!
00026 !----------------------------------------------------------------------------
00027 !
00028 !*    0.     DECLARATION
00029 !            -----------
00030 !
00031 USE MODE_GRIDTYPE_CONF_PROJ
00032 !
00033 !
00034 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
00035 USE PARKIND1  ,ONLY : JPRB
00036 !
00037 IMPLICIT NONE
00038 !
00039 !*    0.1    Declaration of arguments
00040 !            ------------------------
00041 !
00042 INTEGER,                         INTENT(IN)    :: KGRID_PAR ! size of PGRID_PAR
00043 INTEGER,                         INTENT(IN)    :: KL        ! number of points
00044 REAL,    DIMENSION(KGRID_PAR),   INTENT(IN)    :: PGRID_PAR ! grid parameters
00045 REAL,    DIMENSION(KL),          INTENT(OUT)   :: PDX       ! dimension in x dir. (meters)
00046 REAL,    DIMENSION(KL),          INTENT(OUT)   :: PDY       ! dimension in y dir. (meters)
00047 !
00048 !*    0.2    Declaration of other local variables
00049 !            ------------------------------------
00050 !
00051 REAL                :: ZLAT0    ! reference latitude
00052 REAL                :: ZLON0    ! reference longitude
00053 REAL                :: ZRPK     ! projection parameter 
00054 !                               !   K=1 : stereographic north pole
00055 !                               ! 0<K<1 : Lambert, north hemisphere
00056 !                               !   K=0 : Mercator
00057 !                               !-1<K<0 : Lambert, south hemisphere
00058 !                               !   K=-1: stereographic south pole
00059 REAL                :: ZBETA    ! angle between grid and reference longitude
00060 REAL                :: ZLATOR   ! latitude  of point of coordinates X=0, Y=0
00061 REAL                :: ZLONOR   ! longitude of point of coordinates X=0, Y=0
00062 REAL, DIMENSION(KL) :: ZX       ! X conformal coordinate
00063 REAL, DIMENSION(KL) :: ZY       ! Y conformal coordinate
00064 REAL, DIMENSION(KL) :: ZLAT     ! latitude
00065 REAL, DIMENSION(KL) :: ZLON     ! longitude
00066 REAL, DIMENSION(KL) :: ZMAP     ! map factor
00067 REAL(KIND=JPRB) :: ZHOOK_HANDLE
00068 
00069 !----------------------------------------------------------------------------
00070 !
00071 IF (LHOOK) CALL DR_HOOK('GET_MESH_DIM_CONF_PROJ',0,ZHOOK_HANDLE)
00072  CALL GET_GRIDTYPE_CONF_PROJ(PGRID_PAR,ZLAT0,ZLON0,ZRPK,ZBETA,&
00073                               ZLATOR,ZLONOR,                   &
00074                               PX=ZX,PY=ZY,PDX=PDX,PDY=PDY      )  
00075 !
00076 !---------------------------------------------------------------------------
00077 !
00078 !*       2.    Computation of latitude and longitude
00079 !              -------------------------------------
00080 !
00081  CALL LATLON_CONF_PROJ(ZLAT0,ZLON0,ZRPK,ZBETA,ZLATOR,ZLONOR,ZX,ZY,ZLAT,ZLON)
00082 !
00083 !-----------------------------------------------------------------------------
00084 !
00085 !*       3.    Compute grif size
00086 !              -----------------
00087 !
00088  CALL MAP_FACTOR_CONF_PROJ(ZLAT0,ZRPK,ZLAT,ZMAP)
00089 !
00090 PDX(:) = PDX(:) / ZMAP(:)
00091 PDY(:) = PDY(:) / ZMAP(:)
00092 IF (LHOOK) CALL DR_HOOK('GET_MESH_DIM_CONF_PROJ',1,ZHOOK_HANDLE)
00093 !
00094 !-------------------------------------------------------------------------------
00095 !
00096 END SUBROUTINE GET_MESH_DIM_CONF_PROJ