SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
dealloc_flaken.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 dealloc_flake_n (CHF, FG, F)
7 ! #################################################################################
8 !
9 !!**** *DEALLOC_FLAKE_n * - Deallocate all arrays
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !!** METHOD
15 !! ------
16 !!
17 !! REFERENCE
18 !! ---------
19 !!
20 !!
21 !! AUTHOR
22 !! ------
23 !! V. Masson
24 !!
25 !! MODIFICATIONS
26 !! -------------
27 !! Original 01/2004
28 !! Modified 04/2013, P. Le Moigne: FLake chemistry and XZ0
29 !!------------------------------------------------------------------
30 !
31 
32 !
33 
34 
35 !
36 !
37 USE modd_ch_flake_n, ONLY : ch_flake_t
39 USE modd_flake_n, ONLY : flake_t
40 !
41 USE yomhook ,ONLY : lhook, dr_hook
42 USE parkind1 ,ONLY : jprb
43 !
44 IMPLICIT NONE
45 !
46 !* 0.1 declarations of arguments
47 !
48 !
49 !* 0.2 declarations of local variables
50 !
51 !-------------------------------------------------------------------------------------
52 !
53 
54 !
55 TYPE(ch_flake_t), INTENT(INOUT) :: chf
56 TYPE(flake_grid_t), INTENT(INOUT) :: fg
57 TYPE(flake_t), INTENT(INOUT) :: f
58 !
59 REAL(KIND=JPRB) :: zhook_handle
60 
61 IF (lhook) CALL dr_hook('DEALLOC_FLAKE_N',0,zhook_handle)
62 IF (ASSOCIATED(f%LCOVER )) DEALLOCATE(f%LCOVER )
63 IF (ASSOCIATED(f%XCOVER )) DEALLOCATE(f%XCOVER )
64 IF (ASSOCIATED(f%XZS )) DEALLOCATE(f%XZS )
65 IF (ASSOCIATED(f%XEMIS )) DEALLOCATE(f%XEMIS )
66 IF (ASSOCIATED(f%XWATER_DEPTH )) DEALLOCATE(f%XWATER_DEPTH )
67 IF (ASSOCIATED(f%XWATER_FETCH )) DEALLOCATE(f%XWATER_FETCH )
68 IF (ASSOCIATED(f%XT_BS )) DEALLOCATE(f%XT_BS )
69 IF (ASSOCIATED(f%XDEPTH_BS )) DEALLOCATE(f%XDEPTH_BS )
70 IF (ASSOCIATED(f%XCORIO )) DEALLOCATE(f%XCORIO )
71 IF (ASSOCIATED(f%XDIR_ALB )) DEALLOCATE(f%XDIR_ALB )
72 IF (ASSOCIATED(f%XSCA_ALB )) DEALLOCATE(f%XSCA_ALB )
73 IF (ASSOCIATED(f%XICE_ALB )) DEALLOCATE(f%XICE_ALB )
74 IF (ASSOCIATED(f%XSNOW_ALB )) DEALLOCATE(f%XSNOW_ALB )
75 IF (ASSOCIATED(f%XEXTCOEF_WATER)) DEALLOCATE(f%XEXTCOEF_WATER)
76 IF (ASSOCIATED(f%XEXTCOEF_ICE )) DEALLOCATE(f%XEXTCOEF_ICE )
77 IF (ASSOCIATED(f%XEXTCOEF_SNOW )) DEALLOCATE(f%XEXTCOEF_SNOW )
78 IF (ASSOCIATED(f%XT_SNOW )) DEALLOCATE(f%XT_SNOW )
79 IF (ASSOCIATED(f%XT_ICE )) DEALLOCATE(f%XT_ICE )
80 IF (ASSOCIATED(f%XT_MNW )) DEALLOCATE(f%XT_MNW )
81 IF (ASSOCIATED(f%XT_WML )) DEALLOCATE(f%XT_WML )
82 IF (ASSOCIATED(f%XT_BOT )) DEALLOCATE(f%XT_BOT )
83 IF (ASSOCIATED(f%XT_B1 )) DEALLOCATE(f%XT_B1 )
84 IF (ASSOCIATED(f%XCT )) DEALLOCATE(f%XCT )
85 IF (ASSOCIATED(f%XH_SNOW )) DEALLOCATE(f%XH_SNOW )
86 IF (ASSOCIATED(f%XH_ICE )) DEALLOCATE(f%XH_ICE )
87 IF (ASSOCIATED(f%XH_ML )) DEALLOCATE(f%XH_ML )
88 IF (ASSOCIATED(f%XH_B1 )) DEALLOCATE(f%XH_B1 )
89 IF (ASSOCIATED(f%XTS )) DEALLOCATE(f%XTS )
90 IF (ASSOCIATED(f%XZ0 )) DEALLOCATE(f%XZ0 )
91 !
92 !-------------------------------------------------------------------------------------
93 !
94 IF (ASSOCIATED(fg%XGRID_PAR )) DEALLOCATE(fg%XGRID_PAR )
95 IF (ASSOCIATED(fg%XLAT )) DEALLOCATE(fg%XLAT )
96 IF (ASSOCIATED(fg%XLON )) DEALLOCATE(fg%XLON )
97 IF (ASSOCIATED(fg%XMESH_SIZE)) DEALLOCATE(fg%XMESH_SIZE)
98 !
99 !-------------------------------------------------------------------------------------
100 !
101 IF(ASSOCIATED(chf%XDEP)) DEALLOCATE(chf%XDEP)
102 IF(ASSOCIATED(chf%CCH_NAMES)) DEALLOCATE(chf%CCH_NAMES)
103 IF(ASSOCIATED(chf%SVF%CSV)) DEALLOCATE(chf%SVF%CSV)
104 IF (lhook) CALL dr_hook('DEALLOC_FLAKE_N',1,zhook_handle)
105 !
106 !-------------------------------------------------------------------------------------
107 !
108 END SUBROUTINE dealloc_flake_n
109 
110 
subroutine dealloc_flake_n(CHF, FG, F)