SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
modd_pgdwork.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  MODULE modd_pgdwork
7 ! ###################
8 !
9 !!**** *MODD_PGDWORK* - declaration of work arrays and variables
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!
15 !!** IMPLICIT ARGUMENTS
16 !! ------------------
17 !! None
18 !!
19 !! REFERENCE
20 !! ---------
21 !!
22 !! AUTHOR
23 !! ------
24 !! V. Masson *Meteo France*
25 !!
26 !! MODIFICATIONS
27 !! -------------
28 !! Original 12/09/95
29 !! 15/03/96 orographic filter parameter
30 !! 25/07/97 directional z0 computations
31 !! 15/03/99 add XSUMCOVER
32 !! 03/2004 externalization
33 !! 01/2012 add aggregation with the MAJORITY rule
34 !-------------------------------------------------------------------------------
35 !
36 !* 0. DECLARATIONS
37 ! ------------
38 !
39 IMPLICIT NONE
40 !
41 !* 0.1 summation variables
42 ! -------------------
43 !
44 REAL, DIMENSION(:), ALLOCATABLE :: XSUMVAL
45  ! Sum of data in each mesh
46 REAL, DIMENSION(:), ALLOCATABLE :: XSUMVAL2
47  ! Sum of square data in each mesh
48 REAL, DIMENSION(:), ALLOCATABLE :: XSUMVAL3
49  ! Sum of cube data in each mesh
50 REAL, DIMENSION(:,:), ALLOCATABLE :: XSUMCOVER
51  ! Sum of each cover type data in each mesh
52 REAL, DIMENSION(:,:), ALLOCATABLE :: XTNG
53  ! for flake
54 INTEGER, DIMENSION(:), ALLOCATABLE:: NSIZE
55 ! ! Number of points inside each mesh of the domain
56 !
57  CHARACTER(LEN=3) :: CATYPE = 'ARI'
58 ! ! Type of averaging:
59 ! ! 'ARI' : arithmetic
60 ! ! 'INV' : inverse
61 ! ! 'CDN' : neutral CD
62 !
63 !* 0.2 variables for SSO computations
64 ! ------------------------------
65 !
66 REAL, DIMENSION(:,:,:), ALLOCATABLE :: XSSQO ! mean of orography in a
67 ! ! SSO subgrid square from
68 ! ! ZMAXSSQ averaged values
69 ! ! 1st dim: NSSO (x direc.)
70 ! ! 2st dim: NSSO (y direc.)
71 ! ! 3nd dim: number of grid meshes
72 LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: LSSQO ! presence of data in a SSO
73 ! ! subgrid square
74 INTEGER :: NSSO ! number of SSO subgrid squares
75 ! ! in each direction in grid mesh
76 !
77 !* 0.3 variables for topographic index statistics computations
78 ! -------------------------------------------------------
79 !
80 REAL, DIMENSION(:), ALLOCATABLE :: XMIN_WORK
81 REAL, DIMENSION(:), ALLOCATABLE :: XMAX_WORK
82 REAL, DIMENSION(:), ALLOCATABLE :: XMEAN_WORK
83 REAL, DIMENSION(:), ALLOCATABLE :: XSTD_WORK
84 REAL, DIMENSION(:), ALLOCATABLE :: XSKEW_WORK
85 !
86 !
87 !* 0.4 Variables for the Majority aggregation rule
88 ! -------------------------------------------
89 !
90 INTEGER, PARAMETER :: JPVALMAX=20 ! Maximum number of different values
91 ! ! in each grid mesh
92 INTEGER, DIMENSION(:), ALLOCATABLE :: NVALNBR
93 ! ! number of different values
94 ! ! in each grid mesh
95 INTEGER, DIMENSION(:,:), ALLOCATABLE :: NVALCOUNT
96 ! ! Number of times each value has been
97 ! ! counted in each grid mesh
98 REAL, DIMENSION(:,:), ALLOCATABLE :: XVALLIST
99 ! ! List of Values encountered in each grid mesh
100 !-------------------------------------------------------------------------------
101 !
102 END MODULE modd_pgdwork