SURFEX v8.1
General documentation of Surfex
init_output_oln.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 init_output_ol_n (YSC)
7 ! ######################
8 !
9 !!**** *INIT_OUTPUT_OL* Keep in memory the netcdf ID of the output files
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !!
15 !!** IMPLICIT ARGUMENTS
16 !! ------------------
17 !! None
18 !!
19 !! REFERENCE
20 !! ---------
21 !!
22 !! AUTHOR
23 !! ------
24 !! F. Habets *Meteo France*
25 !!
26 !! MODIFICATIONS
27 !! -------------
28 !! modified 05/04 by P. LeMoigne *Meteo France*
29 !! modified 06/10 by S. Faroux *Meteo France*
30 !!=================================================================
31 !
32 !* 0. DECLARATIONS
33 ! ------------
34 !
35 USE modd_surfex_n, ONLY : surfex_t
36 !
37 USE modd_surfex_mpi, ONLY : nrank, npio
38 !
39 USE modi_init_outfn_flake_n
40 USE modi_init_outfn_isba_n
41 USE modi_init_outfn_sea_n
42 USE modi_init_outfn_surf_atm_n
43 USE modi_init_outfn_teb_n
44 USE modi_init_outfn_water_n
45 !
46 USE modd_surfex_mpi, ONLY : wlog_mpi
47 !
48 USE yomhook ,ONLY : lhook, dr_hook
49 USE parkind1 ,ONLY : jprb
50 !
51 IMPLICIT NONE
52 !
53 !
54 TYPE(surfex_t), INTENT(INOUT) :: YSC
55 !
56 !
57 INTEGER :: IRET
58 INTEGER :: ILUOUT
59 REAL(KIND=JPRB) :: ZHOOK_HANDLE
60 !------------------------------------------------------------------------------
61 IF (lhook) CALL dr_hook('INIT_OUTPUT_OL_N',0,zhook_handle)
62 !
63 iluout = 0
64 !
65 IF (nrank==npio) THEN
66  !
67  CALL init_outfn_surf_atm_n(ysc%DUO, ysc%UG, ysc%U, ysc%CHE, ysc%CHU, ysc%SV, ysc%DUO%CSELECT, "NC ",iluout)
68  !
69  IF (ysc%U%NDIM_NATURE>0) THEN
70  IF (ysc%U%CNATURE=='ISBA '.OR.ysc%U%CNATURE=='TSZ0 ') THEN
71  CALL init_outfn_isba_n(ysc%IM, ysc%UG, ysc%U, ysc%DUO%CSELECT, ysc%DUO%LSNOWDIMNC, "NC ",iluout)
72  ENDIF
73  ENDIF
74  !
75  IF (ysc%U%NDIM_SEA>0) THEN
76  IF (ysc%U%CSEA=='SEAFLX') THEN
77  CALL init_outfn_sea_n(ysc%SM, ysc%UG, ysc%U, ysc%DUO%CSELECT, "NC ",iluout)
78  ENDIF
79  ENDIF
80  !
81  IF (ysc%U%NDIM_WATER>0) THEN
82  IF (ysc%U%CWATER=='WATFLX') CALL init_outfn_water_n(ysc%WM, ysc%UG, ysc%U, ysc%DUO%CSELECT, "NC ",iluout)
83  IF (ysc%U%CWATER=='FLAKE ') CALL init_outfn_flake_n(ysc%FM, ysc%UG, ysc%U, ysc%DUO%CSELECT, "NC ",iluout)
84  ENDIF
85  !
86  IF (ysc%U%NDIM_TOWN>0) THEN
87  IF (ysc%U%CTOWN=='TEB ') THEN
88  CALL init_outfn_teb_n(ysc%TM, ysc%GDM, ysc%GRM, ysc%UG, ysc%U, ysc%DUO%CSELECT, "NC ",iluout)
89  ENDIF
90  ENDIF
91  !
92 ENDIF
93 !
94 !------------------------------------------------------------------------------
95 IF (lhook) CALL dr_hook('INIT_OUTPUT_OL_N',1,zhook_handle)
96 !------------------------------------------------------------------------------
97 !
98 END SUBROUTINE init_output_ol_n
subroutine init_outfn_sea_n(SM, UG, U, HSELECT, HPROGRAM, KLUOUT)
subroutine init_output_ol_n(YSC)
subroutine init_outfn_flake_n(FM, UG, U, HSELECT, HPROGRAM, KLUOUT)
subroutine init_outfn_water_n(WM, UG, U, HSELECT, HPROGRAM, KLUOUT)
subroutine init_outfn_surf_atm_n(DGO, UG, U, CHE, CHU, SV, HSELECT, HPROGRAM, KLUOUT)
subroutine init_outfn_teb_n(TM, GDM, GRM, UG, U, HSELECT, HPROGRAM, KLUOUT)
integer, parameter jprb
Definition: parkind1.F90:32
subroutine init_outfn_isba_n(IM, UG, U, HSELECT, OSNOWDIMNC, HPROGRAM, KLUOUT)
logical lhook
Definition: yomhook.F90:15
subroutine wlog_mpi(HLOG, PLOG, KLOG, KLOG2, OLOG)