SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
detect_field.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 detect_field(HPROGRAM,PFIELD,OITSHERE)
7 ! ################################################
8 !
9 !!**** *DETECT_FIELD* - generic routine to check is a field is non-zero
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !
15 !!** METHOD
16 !! ------
17 !!
18 !!
19 !!
20 !! EXTERNAL
21 !! --------
22 !!
23 !!
24 !! IMPLICIT ARGUMENTS
25 !! ------------------
26 !!
27 !! REFERENCE
28 !! ---------
29 !!
30 !!
31 !!
32 !! AUTHOR
33 !! ------
34 !! S.Malardel * Meteo France *
35 !!
36 !! MODIFICATIONS
37 !! -------------
38 !! Original 02/2003
39 !-----------------------------------------------------------------------------
40 !
41 !* 0. DECLARATIONS
42 !
43 !
44 #ifdef SFX_MNH
45 USE modi_detect_field_mnh
46 #endif
47 !
48 !
49 USE yomhook ,ONLY : lhook, dr_hook
50 USE parkind1 ,ONLY : jprb
51 !
52 IMPLICIT NONE
53 !
54 !* 0.1 declarations of arguments
55 !
56  CHARACTER (LEN=6), INTENT(IN) :: hprogram ! program
57 !
58 REAL, DIMENSION(:,:), INTENT(IN)::pfield ! array containing the data field
59 !
60 LOGICAL , INTENT(OUT) :: oitshere ! T --> PFIELD is non zero somewhere
61 REAL(KIND=JPRB) :: zhook_handle
62 !
63 !
64 !* 0.2 declarations of local variables
65 !
66 !
67 !-------------------------------------------------------------------------------
68 !-------------------------------------------------------------------------------
69 !
70 IF (lhook) CALL dr_hook('DETECT_FIELD',0,zhook_handle)
71 IF (hprogram=='MESONH') THEN
72 !
73 #ifdef SFX_MNH
74  CALL detect_field_mnh(hprogram,SIZE(pfield,1),SIZE(pfield,2),pfield,oitshere)
75 #endif
76 !
77 ELSEIF (hprogram=='OFFLIN' .OR. hprogram=='ASCII ' .OR. hprogram=='TEXTE ' &
78  .OR. hprogram=='FA ' .OR. hprogram=='BINARY' .OR. hprogram=='LFI ' &
79  .OR. hprogram=='NC ' ) THEN
80 !
81  oitshere = .true.
82 !
83 ELSEIF (hprogram=='AROME ') THEN
84 !
85 #ifdef SFX_ARO
86  CALL detect_field_aro(hprogram,SIZE(pfield,1),SIZE(pfield,2),pfield,oitshere)
87 #endif
88 !
89 ENDIF
90 IF (lhook) CALL dr_hook('DETECT_FIELD',1,zhook_handle)
91 !
92 !-------------------------------------------------------------------------------
93 !
94 END SUBROUTINE detect_field
subroutine detect_field(HPROGRAM, PFIELD, OITSHERE)
Definition: detect_field.F90:6