Commit 08c3da38 authored by ldemaine's avatar ldemaine
Browse files

basic slope wind 2

parent 9ecc40dc
......@@ -1505,10 +1505,18 @@ c******************************
c 4.3.5 Computation of high precision wind
if (hireskey.eq.1) then
zref = 10000
if (zsurface.ge.zref) then
slopes_scale = 1
call get_slopes(dset,xlon,xlat,slopes_scale,zradius,
& theta_s,psy_s,ier)
if (zsurface.le.zref) then
temp_0=207
call slope_wind(dset,xlon,xlat,zsurface,z_0,theta_s,
& psy_s,temp,temp_0,zonwind,merwind,
& psy_s,tl,temp_0,ul,vl,
& old_zonwind,old_merwind,upslope_wind,crossslope_wind)
else
old_zonwind = zonwind
......@@ -1516,6 +1524,11 @@ c 4.3.5 Computation of high precision wind
upslope_wind = 0
crossslope_wind = 0
extvar(82) = upslope_wind
extvar(83) = crossslope_wind
extvar(84) = old_merwind
extvar(85) = old_zonwind
endif
endif
......@@ -2401,6 +2414,10 @@ c copy to output
zonwind=u
merwind=v
extvar(82) = upslope_wind
extvar(83) = crossslope_wind
extvar(84) = old_merwind
extvar(85) = old_zonwind
return
c Error handling : all the outputs are set to a missing data value
......@@ -7725,42 +7742,93 @@ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
parameter (degtorad=pi/180.0d0)
write(*,*) ''
write(*,*) '|-----------------------------------------|'
write(*,*) '| Input slope_wind |'
write(*,*) '|-----------------------------------------|'
write(*,*) '|'
write(*,*) '| xlon', xlon
write(*,*) '| xlat', xlat
write(*,*) '| zsurface', zsurface
write(*,*) '| zsurf_0', zsurf_0
write(*,*) '| theta_s', theta_s
write(*,*) '| psy_s', psy_s
write(*,*) '| temp', temp
write(*,*) '| temp_0', temp_0
write(*,*) '| zonwind', zonwind
write(*,*) '| merwind', merwind
write(*,*) '|'
write(*,*) '|-----------------------------------------|'
write(*,*) '|'
upslope_wind=0
crossslope_wind=0
! Computation of float terme
Float = g_0*(temp - temp_0)*cos(theta_s)/temp_0
Float = g_0*(temp - temp_0)*sin(theta_s*degtorad)/temp_0
write(*,*) '| Float', Float
upslope_wind=0
crossslope_wind=0
Cd = (k_vk/log(zsurface/zsurf_0))**2
write(*,*) '| Cd', Cd
do i=0,1000
do i=0,10
write(*,*)'|-|------------'
write(*,*)'| | i = ', i
write(*,*)'|-|------------'
uxu = merwind
& + upslope_wind*cos(psy_s)+crossslope_wind*sin(psy_s)
& + upslope_wind*cos(psy_s*degtorad)
& +crossslope_wind*sin(psy_s*degtorad)
write(*,*)'| | uxu = ', uxu
uyu = zonwind
& + upslope_wind*sin(psy_s)+crossslope_wind*cos(psy_s)
& + upslope_wind*sin(psy_s*degtorad)
& +crossslope_wind*cos(psy_s*degtorad)
write(*,*)'| | uyu = ', uyu
UU = sqrt( uxu**2 + uyu**2 )
write(*,*)'| | UU = ', uu
upslope_wind = Float*zsurface/(Cd*UU)
write(*,*) '| | Float*zsurface/(Cd*UU)',Float*zsurface/(Cd*UU)
write(*,*)'| | upslope_wind = ', upslope_wind
enddo
return
old_merwind = merwind
merwind = old_merwind
& + upslope_wind*cos(psy_s)+crossslope_wind*sin(psy_s)
& + upslope_wind*cos(psy_s*degtorad)
& +crossslope_wind*sin(psy_s*degtorad)
old_zonwind = zonwind
zonwind = old_zonwind
& + upslope_wind*sin(psy_s)+crossslope_wind*cos(psy_s)
& + upslope_wind*sin(psy_s*degtorad)
& +crossslope_wind*cos(psy_s*degtorad)
write(*,*) '|'
write(*,*) '|-----------------------------------------|'
write(*,*) '| Output slope_wind |'
write(*,*) '|-----------------------------------------|'
write(*,*) '|'
write(*,*) '| upslope_wind', upslope_wind
write(*,*) '| crossslope_wind', crossslope_wind
write(*,*) '| zonwind', zonwind
write(*,*) '| merwind', merwind
write(*,*) '| old_zonwind', old_zonwind
write(*,*) '| old_merwind', old_merwind
write(*,*) '|'
write(*,*) '|-----------------------------------------|'
write(*,*) ''
return
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