SURFEX v8.1
General documentation of Surfex
write_inland_watern.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_inland_water_n (DTCO, HSELECT, U, WM, FM, HPROGRAM,HWRITE)
7 ! ####################################
8 !
9 !!**** *WRITE_INLAND_WATER_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 !-------------------------------------------------------------------------------
36 !
37 !* 0. DECLARATIONS
38 ! ------------
39 !
40 !
41 USE modd_surfex_n, ONLY : flake_model_t
43 !
45 USE modd_surf_atm_n, ONLY : surf_atm_t
46 !
47 USE modi_write_watflux_n
48 USE modi_write_flake_n
49 !
50 !
51 USE yomhook ,ONLY : lhook, dr_hook
52 USE parkind1 ,ONLY : jprb
53 !
54 IMPLICIT NONE
55 !
56 !* 0.1 Declarations of arguments
57 ! -------------------------
58 !
59 !
60 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
61  CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: HSELECT
62 TYPE(surf_atm_t), INTENT(INOUT) :: U
63 TYPE(watflux_model_t), INTENT(INOUT) :: WM
64 TYPE(flake_model_t), INTENT(INOUT) :: FM
65 !
66  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes
67  CHARACTER(LEN=3), INTENT(IN) :: HWRITE ! 'PREP' : does not write SBL XUNDEF fields
68 ! ! 'ALL' : all fields are written
69 !* 0.2 Declarations of local variables
70 ! -------------------------------
71 !
72 REAL(KIND=JPRB) :: ZHOOK_HANDLE
73 !-------------------------------------------------------------------------------
74 !
75 !* 1. Selection of surface scheme
76 ! ---------------------------
77 !
78 IF (lhook) CALL dr_hook('WRITE_INLAND_WATER_N',0,zhook_handle)
79 IF (u%CWATER=='WATFLX') THEN
80  CALL write_watflux_n(dtco, hselect, u, wm, hprogram,hwrite)
81 ELSE IF (u%CWATER=='FLAKE ') THEN
82  CALL write_flake_n(dtco, hselect, u, fm, hprogram,hwrite)
83 END IF
84 IF (lhook) CALL dr_hook('WRITE_INLAND_WATER_N',1,zhook_handle)
85 !
86 !-------------------------------------------------------------------------------
87 !
88 END SUBROUTINE write_inland_water_n
subroutine write_watflux_n(DTCO, HSELECT, U, WM, HPROGRAM, HWRITE)
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15
subroutine write_flake_n(DTCO, HSELECT, U, FM, HPROGRAM, HWRITE)
Definition: write_flaken.F90:7
subroutine write_inland_water_n(DTCO, HSELECT, U, WM, FM, HPROGRA