SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
pt_by_pt_treatment.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 pt_by_pt_treatment (USS, &
7  kluout,plat,plon,pvalue,hsubroutine,knblines,pnodata)
8 ! ###################################################################
9 !
10 !!**** *PT_BY_PT_TREATMENT*
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !! METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !! AUTHOR
28 !! ------
29 !!
30 !! V. Masson Meteo-France
31 !!
32 !! MODIFICATION
33 !! ------------
34 !!
35 !! Original 12/09/95
36 !! 27/03/96 (V. Masson) modify the arguments for the call of
37 !! interpolation subroutine
38 !! 06/2009 (B. Decharme) call Topographic index statistics calculation
39 !----------------------------------------------------------------------------
40 !
41 !* 0. DECLARATION
42 ! -----------
43 !
44 !
45 !
47 !
48 USE modi_average1_cover
49 USE modi_average1_orography
50 USE modi_average1_cti
51 USE modi_average1_ldb
52 USE modi_average1_mesh
53 !
54 !
55 USE yomhook ,ONLY : lhook, dr_hook
56 USE parkind1 ,ONLY : jprb
57 !
58 IMPLICIT NONE
59 !
60 !* 0.1 Declaration of arguments
61 ! ------------------------
62 !
63 !
64 TYPE(surf_atm_sso_t), INTENT(INOUT) :: uss
65 !
66 INTEGER, INTENT(IN) :: kluout
67 REAL,DIMENSION(:), INTENT(IN) :: plat
68 REAL,DIMENSION(:), INTENT(IN) :: plon
69 REAL,DIMENSION(:), INTENT(IN) :: pvalue
70  CHARACTER(LEN=6), INTENT(IN) :: hsubroutine ! Name of the subroutine to call
71 INTEGER, OPTIONAL, INTENT(IN) :: knblines
72 REAL, OPTIONAL, INTENT(IN) :: pnodata
73 REAL(KIND=JPRB) :: zhook_handle
74 !
75 !
76 !* 0.2 Declaration of local variables
77 ! ------------------------------
78 !
79 INTEGER :: inblines
80 !----------------------------------------------------------------------------
81 !
82  IF (lhook) CALL dr_hook('PT_BY_PT_TREATMENT',0,zhook_handle)
83  inblines = 1
84  IF (present(knblines)) inblines = knblines
85 
86  SELECT CASE (hsubroutine)
87 
88  CASE ('A_COVR')
89  IF (present(pnodata)) THEN
90  CALL average1_cover(kluout,inblines,plat,plon,pvalue,pnodata)
91  ELSE
92  CALL average1_cover(kluout,inblines,plat,plon,pvalue)
93  ENDIF
94 
95  CASE ('A_OROG')
96  IF (present(pnodata)) THEN
97  CALL average1_orography(uss, &
98  kluout,inblines,plat,plon,pvalue,pnodata)
99  ELSE
100  CALL average1_orography(uss, &
101  kluout,inblines,plat,plon,pvalue)
102  ENDIF
103 
104  CASE ('A_CTI ')
105  IF (present(pnodata)) THEN
106  CALL average1_cti(kluout,inblines,plat,plon,pvalue,pnodata)
107  ELSE
108  CALL average1_cti(kluout,inblines,plat,plon,pvalue)
109  ENDIF
110 
111  CASE ('A_LDBD')
112  IF (present(pnodata)) THEN
113  CALL average1_ldb(kluout,inblines,plat,plon,pvalue,'D',pnodata)
114  ELSE
115  CALL average1_ldb(kluout,inblines,plat,plon,pvalue,'D')
116  ENDIF
117 
118  CASE ('A_LDBS')
119  IF (present(pnodata)) THEN
120  CALL average1_ldb(kluout,inblines,plat,plon,pvalue,'S',pnodata)
121  ELSE
122  CALL average1_ldb(kluout,inblines,plat,plon,pvalue,'S')
123  ENDIF
124 
125  CASE ('A_MESH')
126  IF (present(pnodata)) THEN
127  CALL average1_mesh(kluout,inblines,plat,plon,pvalue,pnodata)
128  ELSE
129  CALL average1_mesh(kluout,inblines,plat,plon,pvalue)
130  ENDIF
131 
132  END SELECT
133 IF (lhook) CALL dr_hook('PT_BY_PT_TREATMENT',1,zhook_handle)
134 !
135 !-------------------------------------------------------------------------------
136 !
137 END SUBROUTINE pt_by_pt_treatment
subroutine average1_ldb(KLUOUT, KNBLINES, PLAT, PLON, PVALUE, HTYPE, PNODATA)
Definition: average1_ldb.F90:6
subroutine pt_by_pt_treatment(USS, KLUOUT, PLAT, PLON, PVALUE, HSUBROUTINE, KNBLINES, PNODATA)
subroutine average1_orography(USS, KLUOUT, KNBLINES, PLAT, PLON, PVALUE, PNODATA)
subroutine average1_mesh(KLUOUT, KNBLINES, PLAT, PLON, PVALUE, PNODATA)
subroutine average1_cti(KLUOUT, KNBLINES, PLAT, PLON, PVALUE, PNODATA)
Definition: average1_cti.F90:6
subroutine average1_cover(KLUOUT, KNBLINES, PLAT, PLON, PVALUE, PNODATA)