SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
ch_conversion_factor.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 ch_conversion_factor (CHN, &
7  hconversion,prhoa)
8 ! #######################################
9 !
10 !!**** *CH_CONVERSION_FACTOR
11 !!
12 !! PURPOSE
13 !! -------
14 ! Determines the correct conversion factor to produce emissions in
15 ! Molec/m2/s
16 !
17 !!** METHOD
18 !! ------
19 !!
20 !!
21 !! AUTHOR
22 !! ------
23 !! S.QUEGUINER
24 !!
25 !! MODIFICATIONS
26 !! -------------
27 !! Original 11/2011
28 !! A. Alias 07/2013 add MODI_ABOR1_SFX
29 !! M. Leriche 04/2014 correct conversion factor
30 !!-----------------------------------------------------------------------------
31 !
32 !* 0. DECLARATIONS
33 !
34 !
36 !
37 USE modd_csts, ONLY : xavogadro, xmd
38 USE modi_abor1_sfx
39 !
40 USE yomhook ,ONLY : lhook, dr_hook
41 USE parkind1 ,ONLY : jprb
42 !
43 !
44 IMPLICIT NONE
45 !
46 !* 0.1 declarations of arguments
47 !
48 !
49 TYPE(ch_emis_snap_t), INTENT(INOUT) :: chn
50 !
51  CHARACTER(LEN=3), INTENT(IN) :: hconversion ! Unit conversion code
52 REAL, DIMENSION(:),INTENT(IN) :: prhoa ! air density
53 !
54 !* 0.2 declarations of local variables
55 !
56 REAL(KIND=JPRB) :: zhook_handle
57 !-------------------------------------------------------------------------------
58 IF (lhook) CALL dr_hook('CH_CONVERSION_FACTOR',0,zhook_handle)
59 !
60 ! determine the conversion factor
61  chn%XCONVERSION(:) = 1.
62 SELECT CASE (hconversion)
63  CASE ('MIX') ! flux given ppp*m/s, conversion to molec/m2/s
64  chn%XCONVERSION(:) = xavogadro * prhoa(:) / xmd
65  CASE ('CON') ! flux given in molecules/cm2/s, conversion to molec/m2/s
66  chn%XCONVERSION(:) = 1e4
67  CASE ('MOL') ! flux given in microMol/m2/day, conversion to molec/m2/s
68  chn%XCONVERSION(:) = 1e-6 * xavogadro / 86400.
69  CASE default
70  CALL abor1_sfx('CH_BUILDEMISSN: UNKNOWN CONVERSION FACTOR')
71 END SELECT
72 !
73 IF (lhook) CALL dr_hook('CH_CONVERSION_FACTOR',1,zhook_handle)
74 !-------------------------------------------------------------------------------
75 !
76 END SUBROUTINE ch_conversion_factor
subroutine ch_conversion_factor(CHN, HCONVERSION, PRHOA)
subroutine abor1_sfx(YTEXT)
Definition: abor1_sfx.F90:6