SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
write_isban.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 write_isba_n (DTCO, DGU, U, IM, DST, &
7  hprogram,hwrite,oland_use)
8 ! ####################################
9 !
10 !!**** *WRITE_ISBA_n* - routine to write surface variables in their respective files
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !!
22 !! IMPLICIT ARGUMENTS
23 !! ------------------
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !!
29 !! AUTHOR
30 !! ------
31 !! V. Masson *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 01/2003
36 !! B. Decharme 07/2011 : Suppress pgd output
37 ! B. Decharme 07/2011 : land_use key for writing semi-prognostic variables
38 !-------------------------------------------------------------------------------
39 !
40 !* 0. DECLARATIONS
41 ! ------------
42 !
43 !
46 USE modd_surf_atm_n, ONLY : surf_atm_t
47 USE modd_surfex_n, ONLY : isba_model_t
48 USE modd_dst_n, ONLY : dst_t
49 !
50 USE modd_write_surf_atm, ONLY : lnowrite_canopy
51 USE modi_init_io_surf_n
52 USE modi_writesurf_isba_n
53 USE modi_writesurf_isba_conf_n
54 USE modi_end_io_surf_n
55 USE modi_writesurf_isba_canopy_n
56 !
57 !
58 USE yomhook ,ONLY : lhook, dr_hook
59 USE parkind1 ,ONLY : jprb
60 !
61 IMPLICIT NONE
62 !
63 !* 0.1 Declarations of arguments
64 ! -------------------------
65 !
66 !
67 TYPE(data_cover_t), INTENT(INOUT) :: dtco
68 TYPE(diag_surf_atm_t), INTENT(INOUT) :: dgu
69 TYPE(surf_atm_t), INTENT(INOUT) :: u
70 TYPE(isba_model_t), INTENT(INOUT) :: im
71 TYPE(dst_t), INTENT(INOUT) :: dst
72 !
73  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling surf. schemes
74  CHARACTER(LEN=3), INTENT(IN) :: hwrite ! 'PREP' : does not write SBL XUNDEF fields
75 ! ! 'ALL' : all fields are written
76 LOGICAL, INTENT(IN) :: oland_use !
77 !
78 !* 0.2 Declarations of local variables
79 ! -------------------------------
80 !
81 REAL(KIND=JPRB) :: zhook_handle
82 !-------------------------------------------------------------------------------
83 !
84 ! Initialisation for IO
85 !
86 IF (lhook) CALL dr_hook('WRITE_ISBA_N',0,zhook_handle)
87  CALL init_io_surf_n(dtco, dgu, u, &
88  hprogram,'NATURE','ISBA ','WRITE')
89 !
90 !* 1. Selection of surface scheme
91 ! ---------------------------
92 !
93  CALL writesurf_isba_conf_n(im%CHI, im%DGEI, im%DGI, im%DGMI, im%I, &
94  hprogram)
95  CALL writesurf_isba_n(dgu, u, &
96  im%CHI, dst, im%I, &
97  hprogram,oland_use)
98 !
99 IF ((.NOT.lnowrite_canopy).OR.dgu%LSELECT) CALL writesurf_isba_canopy_n(dgu, u, &
100  im%ICP, im%I, &
101  hprogram,hwrite)
102 !
103 !-------------------------------------------------------------------------------
104 !
105 ! End of IO
106 !
107  CALL end_io_surf_n(hprogram)
108 IF (lhook) CALL dr_hook('WRITE_ISBA_N',1,zhook_handle)
109 !
110 END SUBROUTINE write_isba_n
subroutine init_io_surf_n(DTCO, DGU, U, HPROGRAM, HMASK, HSCHEME, HACTION)
subroutine writesurf_isba_conf_n(CHI, DGEI, DGI, DGMI, I, HPROGRAM)
subroutine writesurf_isba_n(DGU, U, CHI, DST, I, HPROGRAM, OLAND_USE)
subroutine write_isba_n(DTCO, DGU, U, IM, DST, HPROGRAM, HWRITE, OLAND_USE)
Definition: write_isban.F90:6
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:6
subroutine writesurf_isba_canopy_n(DGU, U, ICP, I, HPROGRAM, HWRITE)