SURFEX v8.1
General documentation of Surfex
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, HSELECT, OSNOWDIMNC, U, IM, NDST, HPROGRAM, HWRITE, OLAND_USE)
7 ! ####################################
8 !
9 !!**** *WRITE_ISBA_n* - routine to write surface variables in their respective files
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!** METHOD
15 !! ------
16 !!
17 !! EXTERNAL
18 !! --------
19 !!
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !!
28 !! AUTHOR
29 !! ------
30 !! V. Masson *Meteo France*
31 !!
32 !! MODIFICATIONS
33 !! -------------
34 !! Original 01/2003
35 !! B. Decharme 07/2011 : Suppress pgd output
36 ! B. Decharme 07/2011 : land_use key for writing semi-prognostic variables
37 !-------------------------------------------------------------------------------
38 !
39 !* 0. DECLARATIONS
40 ! ------------
41 !
42 !
44 USE modd_surf_atm_n, ONLY : surf_atm_t
45 USE modd_surfex_n, ONLY : isba_model_t
46 USE modd_dst_n, ONLY : dst_np_t
47 !
49 USE modi_writesurf_isba_n
50 USE modi_writesurf_isba_conf_n
51 USE modi_writesurf_sbl_n
52 !
53 USE modi_end_io_surf_n
54 USE modi_init_io_surf_n
55 !
56 USE yomhook ,ONLY : lhook, dr_hook
57 USE parkind1 ,ONLY : jprb
58 !
59 IMPLICIT NONE
60 !
61 !* 0.1 Declarations of arguments
62 ! -------------------------
63 !
64 !
65 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
66  CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: HSELECT
67 LOGICAL, INTENT(IN) :: OSNOWDIMNC
68 TYPE(surf_atm_t), INTENT(INOUT) :: U
69 TYPE(isba_model_t), INTENT(INOUT) :: IM
70 TYPE(dst_np_t), INTENT(INOUT) :: NDST
71 !
72  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes
73  CHARACTER(LEN=3), INTENT(IN) :: HWRITE ! 'PREP' : does not write SBL XUNDEF fields
74 ! ! 'ALL' : all fields are written
75 LOGICAL, INTENT(IN) :: OLAND_USE !
76 !
77 !* 0.2 Declarations of local variables
78 ! -------------------------------
79 !
80 REAL(KIND=JPRB) :: ZHOOK_HANDLE
81 !-------------------------------------------------------------------------------
82 !
83 ! Initialisation for IO
84 !
85 IF (lhook) CALL dr_hook('WRITE_ISBA_N',0,zhook_handle)
86 !
87 !* 1. Selection of surface scheme
88 ! ---------------------------
89 !
90  CALL writesurf_isba_conf_n(im%CHI, im%ID%DE, im%ID%O, im%ID%DM, im%O, hprogram)
91 !
92  CALL init_io_surf_n(dtco, u, hprogram,'NATURE','ISBA ','WRITE','ISBA_PROGNOSTIC.OUT.nc')
93 !
94  CALL writesurf_isba_n(hselect, osnowdimnc, im%CHI, ndst, im%O, im%S, im%NP, im%NPE, &
95  u%NSIZE_NATURE, hprogram,oland_use)
96 !
97 IF ((.NOT.lnowrite_canopy).OR.SIZE(hselect)>0) THEN
98  CALL writesurf_sbl_n(hselect, im%O%LCANOPY, im%SB, hprogram, hwrite, "NATURE")
99 ENDIF
100 !
101  CALL end_io_surf_n(hprogram)
102 !
103 IF (lhook) CALL dr_hook('WRITE_ISBA_N',1,zhook_handle)
104 !
105 END SUBROUTINE write_isba_n
subroutine writesurf_isba_conf_n(CHI, DE, DGO, DMI, IO, HPROGRAM)
integer, parameter jprb
Definition: parkind1.F90:32
subroutine end_io_surf_n(HPROGRAM)
Definition: end_io_surfn.F90:7
logical lhook
Definition: yomhook.F90:15
subroutine writesurf_sbl_n(HSELECT, OSBL, SB, HPROGRAM, HWRITE, H
subroutine writesurf_isba_n(HSELECT, OSNOWDIMNC, CHI, NDST, IO, S, NP, NPE, KI, HPROGRAM, OLAND_U
subroutine write_isba_n(DTCO, HSELECT, OSNOWDIMNC, U, IM, NDST, H
Definition: write_isban.F90:7
subroutine init_io_surf_n(DTCO, U, HPROGRAM, HMASK, HSCHEME, HACTION