SURFEX v8.1
General documentation of Surfex
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 ! to get same results in parallel mode (if results differ, change XPREC to a
42 ! lower value)
43 REAL, PARAMETER :: xprec = 1.0e+8
44 !
45 !* 0.1 summation variables
46 ! -------------------
47 !
48 REAL, DIMENSION(:,:), ALLOCATABLE :: xsumval
49  ! Sum of data in each mesh
50 !
51 REAL, DIMENSION(:,:), ALLOCATABLE :: xext_all
52  ! Sum of square data in each mesh
53 !
54 REAL, DIMENSION(:,:,:), ALLOCATABLE :: xall
55  ! Sum of each cover type data in each mesh
56 !
57 REAL, DIMENSION(:,:,:), ALLOCATABLE :: xsso_all
58  ! Sum of each cover type data in each mesh
59 !
60 INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: nsso_all
61  ! Sum of each cover type data in each mesh
62 !
63 INTEGER, DIMENSION(:,:), ALLOCATABLE:: nsize
64 ! ! Number of points inside each mesh of the domain
65 INTEGER, DIMENSION(:,:), ALLOCATABLE:: nsize_all
66 ! ! Number of points inside each mesh of the domain
67 !
68  CHARACTER(LEN=3) :: catype = 'ARI'
69 ! ! Type of averaging:
70 ! ! 'ARI' : arithmetic
71 ! ! 'INV' : inverse
72 ! ! 'CDN' : neutral CD
73 !
74 !* 0.2 variables for SSO computations
75 ! ------------------------------
76 !
77 REAL, DIMENSION(:,:,:), ALLOCATABLE :: xssqo ! mean of orography in a
78 ! ! SSO subgrid square from
79 ! ! ZMAXSSQ averaged values
80 ! ! 1st dim: NSSO (x direc.)
81 ! ! 2st dim: NSSO (y direc.)
82 ! ! 3nd dim: number of grid meshes
83 LOGICAL, DIMENSION(:,:,:), ALLOCATABLE :: lssqo ! presence of data in a SSO
84 ! ! subgrid square
85 INTEGER :: nsso ! number of SSO subgrid squares
86 ! ! in each direction in grid mesh
87 !
88 !* 0.3 variables for topographic index statistics computations
89 ! -------------------------------------------------------
90 !
91 REAL, DIMENSION(:), ALLOCATABLE :: xmin_work
92 REAL, DIMENSION(:), ALLOCATABLE :: xmax_work
93 REAL, DIMENSION(:), ALLOCATABLE :: xmean_work
94 REAL, DIMENSION(:), ALLOCATABLE :: xstd_work
95 REAL, DIMENSION(:), ALLOCATABLE :: xskew_work
96 !
97 !
98 !* 0.4 Variables for the Majority aggregation rule
99 ! -------------------------------------------
100 !
101 INTEGER, PARAMETER :: jpvalmax=20 ! Maximum number of different values
102 ! ! in each grid mesh
103 INTEGER, DIMENSION(:,:), ALLOCATABLE :: nvalnbr
104 ! ! number of different values
105 ! ! in each grid mesh
106 INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: nvalcount
107 ! ! Number of times each value has been
108 ! ! counted in each grid mesh
109 REAL, DIMENSION(:,:,:), ALLOCATABLE :: xvallist
110 ! ! List of Values encountered in each grid mesh
111 !-------------------------------------------------------------------------------
112 !
113 END MODULE modd_pgdwork
real, dimension(:,:,:), allocatable xvallist
character(len=3) catype
integer, dimension(:,:), allocatable nsize_all
real, parameter xprec
real, dimension(:,:,:), allocatable xall
real, dimension(:), allocatable xmax_work
logical, dimension(:,:,:), allocatable lssqo
integer, dimension(:,:,:), allocatable nsso_all
integer, dimension(:,:), allocatable nvalnbr
real, dimension(:,:), allocatable xsumval
real, dimension(:), allocatable xmean_work
real, dimension(:,:,:), allocatable xssqo
real, dimension(:), allocatable xskew_work
integer, dimension(:,:), allocatable nsize
integer, dimension(:,:,:), allocatable nvalcount
real, dimension(:,:,:), allocatable xsso_all
real, dimension(:,:), allocatable xext_all
real, dimension(:), allocatable xmin_work
integer, parameter jpvalmax
real, dimension(:), allocatable xstd_work