SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
dealloc_seafluxn.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_seaflux_n (CHS, SG, S)
7 ! #################################################################################
8 !
9 !!**** *DEALLOC_SEAFLUX_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 !! S. Belamari 03/2014 other _SEA_ variables
29 !! S. Senesi 09/2013 introduce sea-ice-cover ans sea-surface salinity
30 !!------------------------------------------------------------------
31 !
32 !
33 !
34 !
37 USE modd_seaflux_n, ONLY : seaflux_t
38 !
39 USE modi_gltools_dealloc
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 TYPE(ch_seaflux_t), INTENT(INOUT) :: chs
53 TYPE(seaflux_grid_t), INTENT(INOUT) :: sg
54 TYPE(seaflux_t), INTENT(INOUT) :: s
55 !
56 REAL(KIND=JPRB) :: zhook_handle
57 !
58 !-------------------------------------------------------------------------------------
59 !
60 IF (lhook) CALL dr_hook('DEALLOC_SEAFLUX_N',0,zhook_handle)
61 !
62 IF (ASSOCIATED(s%LCOVER )) DEALLOCATE(s%LCOVER )
63 IF (ASSOCIATED(s%XCOVER )) DEALLOCATE(s%XCOVER )
64 IF (ASSOCIATED(s%XZS )) DEALLOCATE(s%XZS )
65 IF (ASSOCIATED(s%XSST )) DEALLOCATE(s%XSST )
66 IF (ASSOCIATED(s%XSSS )) DEALLOCATE(s%XSSS )
67 IF (ASSOCIATED(s%XSIC )) DEALLOCATE(s%XSIC )
68 IF (ASSOCIATED(s%XFSIC )) DEALLOCATE(s%XFSIC )
69 IF (ASSOCIATED(s%XFSIT )) DEALLOCATE(s%XFSIT )
70 IF (ASSOCIATED(s%XZ0 )) DEALLOCATE(s%XZ0 )
71 IF (ASSOCIATED(s%XZ0H )) DEALLOCATE(s%XZ0H )
72 IF (ASSOCIATED(s%XSEABATHY)) DEALLOCATE(s%XSEABATHY)
73 IF (ASSOCIATED(s%XEMIS )) DEALLOCATE(s%XEMIS )
74 IF (ASSOCIATED(s%XDIR_ALB)) DEALLOCATE(s%XDIR_ALB)
75 IF (ASSOCIATED(s%XSCA_ALB)) DEALLOCATE(s%XSCA_ALB)
76 !
77 !-------------------------------------------------------------------------------------
78 !
79 IF (ASSOCIATED(sg%XGRID_PAR )) DEALLOCATE(sg%XGRID_PAR )
80 IF (ASSOCIATED(sg%XLAT )) DEALLOCATE(sg%XLAT )
81 IF (ASSOCIATED(sg%XLON )) DEALLOCATE(sg%XLON )
82 IF (ASSOCIATED(sg%XMESH_SIZE)) DEALLOCATE(sg%XMESH_SIZE)
83 !
84 !-------------------------------------------------------------------------------------
85 !
86 IF(ASSOCIATED(chs%XDEP)) DEALLOCATE(chs%XDEP)
87 IF(ASSOCIATED(chs%CCH_NAMES)) DEALLOCATE(chs%CCH_NAMES)
88 IF(ASSOCIATED(chs%SVS%CSV)) DEALLOCATE(chs%SVS%CSV)
89 !
90 !-------------------------------------------------------------------------------------
91 !
92 IF(ASSOCIATED(s%XCPL_SEA_WIND)) DEALLOCATE(s%XCPL_SEA_WIND)
93 IF(ASSOCIATED(s%XCPL_SEA_FWSU)) DEALLOCATE(s%XCPL_SEA_FWSU)
94 IF(ASSOCIATED(s%XCPL_SEA_FWSV)) DEALLOCATE(s%XCPL_SEA_FWSV)
95 IF(ASSOCIATED(s%XCPL_SEA_SNET)) DEALLOCATE(s%XCPL_SEA_SNET)
96 IF(ASSOCIATED(s%XCPL_SEA_HEAT)) DEALLOCATE(s%XCPL_SEA_HEAT)
97 IF(ASSOCIATED(s%XCPL_SEA_EVAP)) DEALLOCATE(s%XCPL_SEA_EVAP)
98 IF(ASSOCIATED(s%XCPL_SEA_RAIN)) DEALLOCATE(s%XCPL_SEA_RAIN)
99 IF(ASSOCIATED(s%XCPL_SEA_SNOW)) DEALLOCATE(s%XCPL_SEA_SNOW)
100 !
101 !-------------------------------------------------------------------------------------
102 !
103 IF (ASSOCIATED(s%TGLT%bat) .AND. s%CSEAICE_SCHEME=='GELATO' ) CALL gltools_dealloc(s%TGLT)
104 !
105 IF (lhook) CALL dr_hook('DEALLOC_SEAFLUX_N',1,zhook_handle)
106 !
107 !-------------------------------------------------------------------------------------
108 !
109 END SUBROUTINE dealloc_seaflux_n
110 
111 
subroutine gltools_dealloc(tpglt)
subroutine dealloc_seaflux_n(CHS, SG, S)