Commit 9ecc40dc authored by ldemaine's avatar ldemaine
Browse files

ajout vent de pente « simpliste »

parent e9bd0bd6
......@@ -46,8 +46,7 @@ c 2.3 05/09/00
c 2.2 23/03/00
c
c Authors:
c =======
c v5.0 Implemented new scenarios and possibility to select which
c ======= c v5.0 Implemented new scenarios and possibility to select which
c extra variables will be computed -- EM
c v4.3 Implemented improved large scale perturbations model -- EM
c v4.2 Changed argument list; implemented high resolution and altitude-wise
......@@ -504,13 +503,19 @@ c intermediate variables for large scale (EOF) density perturbation
integer flag_ini_profi ! flag of initialization in profi()
c Slopes,irradiance
c Slopes,irradiance
real Ftot
real slopes_scale
real theta_s, psy_s
real distance
c Hires wind
real temp_0
real old_zonwind
real old_merwind
real upslope_wind
real crossslope_wind
real zref
......@@ -1497,6 +1502,23 @@ c******************************
endif
endif ! of if (perturkey.eq.5)
c 4.3.5 Computation of high precision wind
if (hireskey.eq.1) then
zref = 10000
if (zsurface.ge.zref) then
call slope_wind(dset,xlon,xlat,zsurface,z_0,theta_s,
& psy_s,temp,temp_0,zonwind,merwind,
& old_zonwind,old_merwind,upslope_wind,crossslope_wind)
else
old_zonwind = zonwind
old_merwind = merwind
upslope_wind = 0
crossslope_wind = 0
endif
endif
c 4.4 Store atmospheric fields (pressure, temperature, density, winds)
c (re-)compute atmospheric pressure
pl=ps*(sigma(levlow)+(sigma(levhi)-sigma(levlow))*levweight(2))
......@@ -7454,6 +7476,7 @@ c$$$ double_hA, double_hB, double_hC = hA, hB, hC
return
end
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine get_irradiance(dset, longitude, latitude, loct, ls,
& Ftot_0,solzenang,marsau,zradius,taudust,col_h2oice,theta_s,
......@@ -7651,3 +7674,93 @@ c$$$ write(*,*) 'Ftot:', F
return
end
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine slope_wind(dset,xlon,xlat,zsurface,zsurf_0,theta_s,
& psy_s,temp,temp_0,zonwind,merwind,old_zonwind,old_merwind,
& upslope_wind,crossslope_wind)
implicit none
include "constants_mcd.inc"
! Inputs
character*(*),intent(in) :: dset ! Path to MCD datafiles
real,intent(in) :: xlon
real,intent(in) :: xlat
real,intent(in) :: zsurface
real,intent(in) :: zsurf_0
real,intent(in) :: theta_s
real,intent(in) :: psy_s
real,intent(in) :: temp
real,intent(in) :: temp_0
real,intent(inout) :: zonwind
real,intent(inout) :: merwind
real,intent(out) :: old_zonwind
real,intent(out) :: old_merwind
real,intent(out) :: upslope_wind
real,intent(out) :: crossslope_wind
real :: Float
real :: UU
real :: Cd
integer :: i
real :: uxu
real :: uyu
real :: k_vk,g_0
parameter (k_vk=0.4)
parameter (g_0=3.72)
real pi,degtorad
parameter (pi=3.14159265358979d0)
parameter (degtorad=pi/180.0d0)
! Computation of float terme
Float = g_0*(temp - temp_0)*cos(theta_s)/temp_0
upslope_wind=0
crossslope_wind=0
Cd = (k_vk/log(zsurface/zsurf_0))**2
do i=0,10
uxu = merwind
& + upslope_wind*cos(psy_s)+crossslope_wind*sin(psy_s)
uyu = zonwind
& + upslope_wind*sin(psy_s)+crossslope_wind*cos(psy_s)
UU = sqrt( uxu**2 + uyu**2 )
upslope_wind = Float*zsurface/(Cd*UU)
enddo
return
old_merwind = merwind
merwind = old_merwind
& + upslope_wind*cos(psy_s)+crossslope_wind*sin(psy_s)
old_zonwind = zonwind
zonwind = old_zonwind
& + upslope_wind*sin(psy_s)+crossslope_wind*cos(psy_s)
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment