SURFEX v8.1
General documentation of Surfex
refresh_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  SUBROUTINE refresh_pgdwork(HSUBROUTINE)
7 ! ##########################
8 !
9 !!**** *REFRESH_PGDWORK* ! refreshes arrays used in PGD work module
10 !
11 !! PURPOSE
12 !! -------
13 !!
14 !! METHOD
15 !! ------
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 09/2008
36 !!
37 !
39 !
40 USE modd_surf_par, ONLY : xundef
41 !
42 USE yomhook ,ONLY : lhook, dr_hook
43 USE parkind1 ,ONLY : jprb
44 !
45 IMPLICIT NONE
46 !
47 !----------------------------------------------------------------------------
48 !
49 !* 1. Cover array
50 ! -----------
51 !
52  CHARACTER(LEN=6), INTENT(IN) :: HSUBROUTINE ! Name of the subroutine to call
53 !
54 REAL(KIND=JPRB) :: ZHOOK_HANDLE
55 
56 IF (lhook) CALL dr_hook('REFRESH_PGDWORK',0,zhook_handle)
57 !----------------------------------------------------------------------------
58 !
59 !* 2. General arrays
60 ! --------------
61 !
62 IF (ALLOCATED(xall)) THEN
63  xall(:,:,:) = 0.
64 ENDIF
65 IF (ALLOCATED(xsumval)) THEN
66  xsumval(:,:)=0.
67 END IF
68 IF (ALLOCATED(xext_all)) THEN
69  xext_all(:,1)=-99999.
70  xext_all(:,2)=99999.
71 END IF
72 IF (ALLOCATED(nsize_all)) THEN
73  nsize_all(:,:)=0
74 END IF
75 !----------------------------------------------------------------------------
76 !
77 !* 3. Subgrid arrays
78 ! --------------
79 !
80 IF (ALLOCATED(xsso_all) .AND. ALLOCATED(nsso_all)) THEN
81  IF (hsubroutine=='A_OROG') THEN
82  xsso_all(:,:,:) = -xundef
83  ELSE
84  xsso_all(:,:,:) = 0.
85  ENDIF
86  nsso_all(:,:,:) = 0
87 ENDIF
88 IF (lhook) CALL dr_hook('REFRESH_PGDWORK',1,zhook_handle)
89 !
90 !----------------------------------------------------------------------------
91 !
92 END SUBROUTINE refresh_pgdwork
integer, dimension(:,:), allocatable nsize_all
real, dimension(:,:,:), allocatable xall
subroutine refresh_pgdwork(HSUBROUTINE)
real, parameter xundef
integer, dimension(:,:,:), allocatable nsso_all
integer, parameter jprb
Definition: parkind1.F90:32
real, dimension(:,:), allocatable xsumval
logical lhook
Definition: yomhook.F90:15
real, dimension(:,:,:), allocatable xsso_all
real, dimension(:,:), allocatable xext_all