SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
mode_sltmbl.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 MODULE mode_sltmbl
6 
7  !PURPOSE:
8  !Take input from ISBA land surface model and
9  !calculate a salt flux which is consistent with the input.
10 
11  !THEORY:
12  !Based on Marticorena/Bergametti, 1995 and Zender et al 2003 (JGR)
13 
14  !CODE HISTORY
15  !Code is a modified version of dstmbl.F90 in the DEAD model
16  !Original version was downloaded from the DEAD homepage
17  !http://salt.ess.uci.edu/dead/ on January 10th 2005
18 
19  !AUTHOR (or rather "code modifyer")
20  !Alf Grini <alf.grini@cnrm.meteo.fr>
21 
22 !
23  USE yomhook ,ONLY : lhook, dr_hook
24  USE parkind1 ,ONLY : jprb
25 !
26  implicit none
27  public
28 
29 contains
30 
31  subroutine saltflux_get( &
32  pustar, &!I [m/s] Wind friction speed
33  prhoa, &!I [kg/m3] air density at 2m height
34  pwg, &!I [m3/m3] volumetric water content
35  pz0, &!I [m] roughness length of surface
36  pwsat, &!I [m3 m-3] saturation liquid water content
37  pclay, &!I [frc] mass fraction clay
38  psand, &!I [frc] mass fraction sand
39  pwind10m, &!I [m/s] wind at 10m altitude
40  psfslt, &!O [kg/m2/sec] Vertical salt flux
41  ksize &!I [nbr] number of points for calculation
42  )
43 
44 
45  implicit none
46 
47  !INPUT, set their dimensions to their passed lengths or to KSIZE ?
48  integer, intent(in) :: ksize ![nbr] length of passed arrays
49  real, intent(in), dimension(KSIZE) :: pustar ![m/s] wind friction speed
50  real, intent(in), dimension(KSIZE) :: prhoa ![kg/m3] air density
51  real, intent(in), dimension(KSIZE) :: pclay ![frc] mass fraction clay
52  real, intent(in), dimension(KSIZE) :: psand ![frc] mass fraction sand
53  real, intent(in), dimension(KSIZE) :: pwg ![m3 m-3] volumetric water fraction
54  real, intent(in), dimension(KSIZE) :: pwsat ![m3 m-3] saturation water content
55  real, intent(in), dimension(KSIZE) :: pz0 ![m] surface roughness length
56  real, intent(in), dimension(KSIZE) :: pwind10m ![m/s] wind at 10m altitude
57 
58  !OUTPUT the flux of salt
59  real, intent(out), dimension(KSIZE) :: psfslt ! [kg m-2 s-1] Output flux of atmospheric salt
60 
61 !!!!!!!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&!!!!!!
62 
63 !#ifdef AlG01
64 ! real,parameter::flx_mss_fdg_fct=28. ! [frc] Global mass flux tuning factor (a posteriori)
65 !#else
66 ! real,parameter::flx_mss_fdg_fct=7.0e-4 ! [frc] Global mass flux tuning factor (a posteriori)
67 ! real,parameter::flx_mss_fdg_fct=21.0e-4 ! [frc] Global mass flux tuning factor (a posteriori)
68  real,parameter::flx_mss_fdg_fct=18.0e-4 ! [frc] Global mass flux tuning factor (a posteriori)
69 !#endif
70  real,parameter::hgt_rfr=10.0 ! [m] Reference height for mobilization processes
71  real,parameter::hgt_zpd_mbl=0.0 ! [m] Zero plane displacement for erodible surfaces
72  real,parameter::rgh_mmn_mbl=100.0e-6 ! [m] Roughness length momentum for erodible surfaces MaB95 p. 16420, GMB98 p. 6205
73  ! fxm: rgh_mmn_smt set to 33.3e-6 um, MaB95 p. 16426 recommend 10.0e-6
74  real,parameter::rgh_mmn_smt=33.3e-6 ! [m] Smooth roughness length MaB95 p. 16426, MaB97 p. 4392, GMB98 p. 6207
75  real,parameter::wnd_min_mbl=1.0 ! [m s-1] Minimum windspeed used for mobilization
76  real,parameter::wnd_frc_rsl=0.95d0 ! [frc] Fraction of wind PDF to resolve
77 
78  !Define local variables:
79  logical,allocatable :: flg_mbl(:) ![frc] Mobilization candidate flag
80  real, allocatable :: frc_thr_ncr_drg(:) ![frc] fraction by which drag partitioning increases threshold wind
81  real, allocatable :: frc_thr_ncr_wtr(:) ![frc] Fraction by which soil wetness increases threshold wind
82  real, allocatable :: gwc_sfc(:) ![kg/kg] Gravimetric water content
83  real, allocatable :: wnd_frc_thr_slt(:) ![m/s] Threshold wind friction speed when all effects taken into account
84  real, allocatable :: wnd_frc_slt(:) ![m/s] wind friction speed after modified for saltation feedbacks
85  real, allocatable :: flx_mss_hrz_slt_ttl_wbn(:) ![kg m-1 s-1] Vertically integrated horizontal saltation soil flux for a wind bin
86  real, allocatable :: flx_mss_vrt_dst_ttl_wbn(:) ![kg m-2 s-1]
87  real, allocatable :: wnd_rfr_thr_slt(:) ![m s-1] Threshold wind speed at reference level
88  real, allocatable :: mbl_bsn_fct(:) ![frc] enhancement factor for grid cells with higher erodibility
89  real, allocatable :: dst_slt_flx_rat_ttl(:) ![m-1] ratio of vertical to horizontal flux (alpha in several papers)
90  real, allocatable :: zclay(:) ![frc] dummy for fraction of clay
91 
92  integer :: i !Counter for number of points (used in loops)
93  REAL(KIND=JPRB) :: zhook_handle
94 
95  !Allocate the local variables
96  IF (lhook) CALL dr_hook('MODE_SLTMBL:SALTFLUX_GET',0,zhook_handle)
97  allocate (flg_mbl(ksize))
98  allocate (frc_thr_ncr_drg(ksize))
99  allocate (frc_thr_ncr_wtr(ksize))
100  allocate (gwc_sfc(ksize))
101  allocate (wnd_frc_thr_slt(ksize))
102  allocate (wnd_frc_slt(ksize))
103  allocate (flx_mss_hrz_slt_ttl_wbn(ksize))
104  allocate (flx_mss_vrt_dst_ttl_wbn(ksize))
105  allocate (wnd_rfr_thr_slt(ksize))
106  allocate (mbl_bsn_fct(ksize))
107  allocate (dst_slt_flx_rat_ttl(ksize))
108  allocate (zclay(ksize))
109 
110  !Initialize mobilization candidate flag
111  flg_mbl(:)=.true.
112 
113  !Initialize vertical salt flux
114  flx_mss_vrt_dst_ttl_wbn(:)=0.d0
115 
116  !fxm: Get erodibility limitation factor, use something connected to amount of sand
117  !Discuss with Valery Masson
118  mbl_bsn_fct(:)=psand(:)
119 
120  ! Factor by which surface roughness increases threshold friction velocity
121  !++grini: fxm: USE WHOLE ARRAY OF Z0 INSTEAD OF ONLY RGH_MMN_MBL AS IN OLD CODE
122 
123 
124  !Free memory for allocated local variables
125  deallocate (flg_mbl)
126  deallocate (frc_thr_ncr_drg)
127  deallocate (frc_thr_ncr_wtr)
128  deallocate (gwc_sfc)
129  deallocate (wnd_frc_thr_slt)
130  deallocate (wnd_frc_slt)
131  deallocate (flx_mss_hrz_slt_ttl_wbn)
132  deallocate (flx_mss_vrt_dst_ttl_wbn)
133  deallocate (wnd_rfr_thr_slt)
134  deallocate (mbl_bsn_fct)
135  deallocate (dst_slt_flx_rat_ttl)
136  deallocate (zclay)
137  IF (lhook) CALL dr_hook('MODE_SLTMBL:SALTFLUX_GET',1,zhook_handle)
138 
139  end subroutine saltflux_get
140 
141 END MODULE mode_sltmbl
subroutine saltflux_get(PUSTAR, PRHOA, PWG, PZ0, PWSAT, PCLAY, PSAND, PWIND10M, PSFSLT, KSIZE)
Definition: mode_sltmbl.F90:31