SURFEX v7.3
General documentation of Surfex
|
00001 ! ######### 00002 SUBROUTINE GET_MESH_DIM_LONLAT_REG(KGRID_PAR,KL,PGRID_PAR,PDX,PDY) 00003 ! ############################################################## 00004 ! 00005 !!**** *GET_MESH_DIM_LONLAT_REG* 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 MODD_CSTS, ONLY : XPI, XRADIUS 00032 ! 00033 USE MODE_GRIDTYPE_LONLAT_REG 00034 ! 00035 ! 00036 USE YOMHOOK ,ONLY : LHOOK, DR_HOOK 00037 USE PARKIND1 ,ONLY : JPRB 00038 ! 00039 IMPLICIT NONE 00040 ! 00041 !* 0.1 Declaration of arguments 00042 ! ------------------------ 00043 ! 00044 INTEGER, INTENT(IN) :: KGRID_PAR ! size of PGRID_PAR 00045 INTEGER, INTENT(IN) :: KL ! number of points 00046 REAL, DIMENSION(KGRID_PAR), INTENT(IN) :: PGRID_PAR ! grid parameters 00047 REAL, DIMENSION(KL), INTENT(OUT) :: PDX ! dimension in x dir. (meters) 00048 REAL, DIMENSION(KL), INTENT(OUT) :: PDY ! dimension in y dir. (meters) 00049 ! 00050 !* 0.2 Declaration of other local variables 00051 ! ------------------------------------ 00052 ! 00053 REAL, DIMENSION(KL) :: ZLAT ! latitude 00054 REAL, DIMENSION(KL) :: ZLON ! longitude 00055 REAL :: ZLONMIN ! minimum longitude (degrees) 00056 REAL :: ZLONMAX ! maximum longitude (degrees) 00057 REAL :: ZLATMIN ! minimum latitude (degrees) 00058 REAL :: ZLATMAX ! maximum latitude (degrees) 00059 INTEGER :: ILON ! number of points in longitude 00060 INTEGER :: ILAT ! number of points in latitude 00061 REAL(KIND=JPRB) :: ZHOOK_HANDLE 00062 00063 !---------------------------------------------------------------------------- 00064 ! 00065 !* 1. Get grid information 00066 ! -------------------- 00067 ! 00068 IF (LHOOK) CALL DR_HOOK('GET_MESH_DIM_LONLAT_REG',0,ZHOOK_HANDLE) 00069 CALL GET_GRIDTYPE_LONLAT_REG(PGRID_PAR,ZLONMIN,ZLONMAX, & 00070 ZLATMIN,ZLATMAX,ILON,ILAT,PLON=ZLON,PLAT=ZLAT ) 00071 ! 00072 !----------------------------------------------------------------------------- 00073 ! 00074 !* 2. Compute grid size 00075 ! ----------------- 00076 ! 00077 PDX(:) = (ZLONMAX-ZLONMIN)/FLOAT(ILON) * (XPI / 180.) * XRADIUS * COS(ZLAT(:)*XPI/180.) 00078 PDY(:) = (ZLATMAX-ZLATMIN)/FLOAT(ILAT) * (XPI / 180.) * XRADIUS 00079 IF (LHOOK) CALL DR_HOOK('GET_MESH_DIM_LONLAT_REG',1,ZHOOK_HANDLE) 00080 ! 00081 !------------------------------------------------------------------------------- 00082 ! 00083 END SUBROUTINE GET_MESH_DIM_LONLAT_REG