SURFEX v8.1
General documentation of Surfex
write_diag_ch_aggr.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_diag_ch_aggr_n (DTCO, HSELECT, U, CHE, HPROGRAM)
7 ! #################################
8 !
9 !!**** *WRITE_DIAG_CH_AGGR_n* - writes surface chemical emissions diagnostics
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !!
19 !! REFERENCE
20 !! ---------
21 !!
22 !!
23 !! AUTHOR
24 !! ------
25 !! V. Masson & S. Queguiner *Meteo France*
26 !!
27 !! MODIFICATIONS
28 !! -------------
29 !! Original 01/2012
30 !!-------------------------------------------------------------------------------
31 !
32 !* 0. DECLARATIONS
33 ! ------------
34 !
35 !
37 USE modd_surf_atm_n, ONLY : surf_atm_t
39 !
40 USE modd_csts, ONLY : xavogadro
41 USE modi_init_io_surf_n
43 USE modi_end_io_surf_n
44 !
45 !
46 USE yomhook ,ONLY : lhook, dr_hook
47 USE parkind1 ,ONLY : jprb
48 !
49 IMPLICIT NONE
50 !
51 !* 0.1 Declarations of arguments
52 ! -------------------------
53 !
54 !
55 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
56  CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: HSELECT
57 TYPE(surf_atm_t), INTENT(INOUT) :: U
58 TYPE(ch_emis_field_t), INTENT(INOUT) :: CHE
59 !
60  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling
61 !
62 !* 0.2 Declarations of local variables
63 ! -------------------------------
64 !
65 
66 INTEGER :: IRESP ! IRESP : return-code if a problem appears
67  CHARACTER(LEN=12) :: YRECFM ! Name of the article to be read
68  CHARACTER(LEN=100):: YCOMMENT ! Comment string
69 !
70 INTEGER :: JSPEC
71 REAL(KIND=JPRB) :: ZHOOK_HANDLE
72 !
73 !-------------------------------------------------------------------------------
74 !
75 ! Initialisation for IO
76 !
77 IF (lhook) CALL dr_hook('WRITE_DIAG_CH_AGGR_n',0,zhook_handle)
78  CALL init_io_surf_n(dtco, u, hprogram,'FULL ','SURF ','WRITE','SURF_ATM_DIAGNOSTICS.OUT.nc')
79 !
80 !-------------------------------------------------------------------------------
81 !
82 ! Writes Emissions of all species
83 !
84 DO jspec=1,SIZE(che%TSEMISS)
85  yrecfm = "E_"//trim(che%TSEMISS(jspec)%CNAME)
86  ycomment = "Emission data at time t (ppm*m/s)"
87  CALL write_surf(hselect,hprogram,yrecfm,che%TSEMISS(jspec)%XEMISDATA,iresp,hcomment=ycomment,&
88  hnam_dim="Temporal_emiss")
89 END DO
90 !
91 !-------------------------------------------------------------------------------
92 !
93 ! End of IO
94 !
95  CALL end_io_surf_n(hprogram)
96 IF (lhook) CALL dr_hook('WRITE_DIAG_CH_AGGR_n',1,zhook_handle)
97 !
98 !
99 END SUBROUTINE write_diag_ch_aggr_n
static const char * trim(const char *name, int *n)
Definition: drhook.c:2383
subroutine write_diag_ch_aggr_n(DTCO, HSELECT, U, CHE, 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 init_io_surf_n(DTCO, U, HPROGRAM, HMASK, HSCHEME, HACTION
real, save xavogadro
Definition: modd_csts.F90:52