SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
write_pgd_tebn.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_pgd_teb_n (DTCO, DGU, U, TM, GDM, GRM, &
7  hprogram)
8 ! ####################################
9 !
10 !!**** *WRITE_PGD_TEB_n* - routine to write pgd 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 !! B. Decharme *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 05/2011
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 !
44 USE modd_surf_atm_n, ONLY : surf_atm_t
45 USE modd_surfex_n, ONLY : teb_model_t
48 !
49 USE modi_init_io_surf_n
50 USE modi_writesurf_pgd_teb_n
51 USE modi_end_io_surf_n
52 USE modi_goto_wrapper_teb_patch
53 !
54 USE yomhook ,ONLY : lhook, dr_hook
55 USE parkind1 ,ONLY : jprb
56 !
57 IMPLICIT NONE
58 !
59 !* 0.1 Declarations of arguments
60 ! -------------------------
61 !
62 !
63 TYPE(data_cover_t), INTENT(INOUT) :: dtco
64 TYPE(diag_surf_atm_t), INTENT(INOUT) :: dgu
65 TYPE(surf_atm_t), INTENT(INOUT) :: u
66 TYPE(teb_model_t), INTENT(INOUT) :: tm
67 TYPE(teb_garden_model_t), INTENT(INOUT) :: gdm
68 TYPE(teb_greenroof_model_t), INTENT(INOUT) :: grm
69 !
70  CHARACTER(LEN=6), INTENT(IN) :: hprogram ! program calling surf. schemes
71 REAL(KIND=JPRB) :: zhook_handle
72 ! ! 'ALL' : all fields are written
73 !
74 !* 0.2 Declarations of local variables
75 ! -------------------------------
76 !
77 !-------------------------------------------------------------------------------
78 !
79 !
80 ! Initialisation for IO
81 !
82 IF (lhook) CALL dr_hook('WRITE_PGD_TEB_N',0,zhook_handle)
83  CALL init_io_surf_n(dtco, dgu, u, &
84  hprogram,'TOWN ','TEB ','WRITE')
85 !
86 !* 1. Selection of surface scheme
87 ! ---------------------------
88 !
89  CALL goto_wrapper_teb_patch(tm%B, tm%DGCT, tm%DGMT, tm%T, &
90  gdm%TGD, gdm%TGDPE, grm%TGR, grm%TGRPE, 1)
91  CALL writesurf_pgd_teb_n(dgu, u, tm, gdm, grm, &
92  hprogram)
93 !
94 !-------------------------------------------------------------------------------
95 !
96 ! End of IO
97 !
98  CALL end_io_surf_n(hprogram)
99 IF (lhook) CALL dr_hook('WRITE_PGD_TEB_N',1,zhook_handle)
100 !
101 END SUBROUTINE write_pgd_teb_n
subroutine init_io_surf_n(DTCO, DGU, U, HPROGRAM, HMASK, HSCHEME, HACTION)
subroutine writesurf_pgd_teb_n(DGU, U, TM, GDM, GRM, HPROGRAM)
subroutine goto_wrapper_teb_patch(B, DGCT, DGMT, T, TGD, TGDPE, TGR, TGRPE, KTO_PATCH)
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:6
subroutine write_pgd_teb_n(DTCO, DGU, U, TM, GDM, GRM, HPROGRAM)