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