Commit a65a84c0 authored by ldemaine's avatar ldemaine
Browse files

fix de z_0 et de la pression

parent bc66f86a
......@@ -1524,7 +1524,7 @@ c 4.3.5 Computation of high precision wind
call slope_wind(dset,xlon,xlat,zsurface,zradius,z_0,
& tl,temp_gcm,tsurf,pl,p_pgcm,ps_hr,
& tl,temp_gcm,tsurf,pl,sigma,ps_hr,
& levhi,levlow,sheight,
& utime,itimint,wl,wh,
& ul,vl,old_zonwind,old_merwind,
......@@ -7985,7 +7985,7 @@ c$$$ close(1)
! CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
subroutine slope_wind(dset,xlon,xlat,zsurface,zradius,zsurf_0,
& temp,temp_gcm,tsurf,Pl,p_pgcm,ps_hr,
& temp,temp_gcm,tsurf,Pl,sigma,ps_hr,
& levhi,levlow,sheight,
& utime,itimint,wl,wh,
& zonwind,merwind,old_zonwind,old_merwind,
......@@ -8014,7 +8014,7 @@ c$$$ close(1)
real,intent(in) :: Pl
real,intent(in) :: temp_gcm(dimlevs)
real,intent(in) :: tsurf
real,intent(in) :: p_pgcm(dimlevs),ps_hr
real,intent(in) :: sigma(dimlevs),ps_hr
c$$$ !inutile pour le moment car temp déjà un imput
c$$$ real,intent(in) :: levweight(2)
integer,intent(in) :: levhi
......@@ -8036,6 +8036,8 @@ c$$$ real,intent(in) :: pratio
real,intent(out) :: crossslope_wind
integer :: ier ! need intent(out)
real :: p_gcm(dimlevs)
real :: theta_s
real :: psy_s
real :: slopes_scale = 1
......@@ -8075,6 +8077,7 @@ c$$$
parameter (pi=3.14159265358979d0)
parameter (degtorad=pi/180.0d0)
p_gcm = ps_hr*sigma
write(*,*) ' '
write(*,*) '|--------------------------------------------------|'
......@@ -8090,6 +8093,8 @@ c$$$
write(*,*) '| temp, tsurf:', temp, tsurf
write(*,*) '| temp_gcm:', temp_gcm
write(*,*) '| sheight:', sheight
write(*,*) '| sigma', sigma
write(*,*) '| p_gcm', p_gcm
write(*,*) '|--------------------------------------------------|'
write(*,*) '| '
......@@ -8220,7 +8225,7 @@ c$$$ ! TODO: cas où l'altitude est inférieure à la première maille de mcd
! Calcul de la première valeur de K (K(1))
call vdif_k(sheight(1),0.,U_gcm(1),0.,V_gcm(1),0.,
& Temp_gcm(1),tsurf,p_pgcm(1),ps_hr,ps_hr,
& Temp_gcm(1),tsurf,p_gcm(1),ps_hr,ps_hr,
& zsurf_0,pKv(1))
write(*,*) '| | | pKv(1):', pKv(1)
write(*,*) '| | |'
......@@ -8233,7 +8238,7 @@ c$$$ ! TODO: cas où l'altitude est inférieure à la première maille de mcd
& U_gcm(2), U_gcm(1),
& V_gcm(2), V_gcm(1),
& Temp_gcm(2), Temp_gcm(1),
& P_pgcm(2), P_pgcm(1), ps_hr,
& p_gcm(2), p_gcm(1), ps_hr,
& zsurf_0,
& pKv_loc)
......@@ -8266,7 +8271,7 @@ c$$$ ! TODO: cas où l'altitude est inférieure à la première maille de mcd
& U_gcm(it), U_gcm(it-1),
& V_gcm(it),V_gcm(it-1),
& Temp_gcm(it), Temp_gcm(it-1),
& P_pgcm(it), P_pgcm(it-1), ps_hr,
& p_gcm(it), p_gcm(it-1), ps_hr,
& zsurf_0,pKv(it))
Flotation = g_0*(temp_gcm(it)-temp_0)
......@@ -8307,7 +8312,7 @@ c$$$ ! TODO: cas où l'altitude est inférieure à la première maille de mcd
& merwind, U_gcm(levlow),
& zonwind, V_gcm(levlow),
& temp, Temp_gcm(levlow),
& Pl, P_pgcm(levlow), ps_hr,
& Pl, p_gcm(levlow), ps_hr,
& zsurf_0,
& pKv_loc)
......@@ -8356,16 +8361,19 @@ c$$$ ! TODO: cas où l'altitude est inférieure à la première maille de mcd
& V_hi,V_low,
& temp_hi,temp_low,
& P_hi,P_low,Psurf,
& z_0,
& zsurf_0,
& pKv)
implicit none
include "constants_mcd.inc"
real,intent(in) :: z_hi,z_low
real,intent(in) :: U_hi,U_low
real,intent(in) :: V_hi,V_low
real,intent(in) :: Temp_low,Temp_hi
real,intent(in) :: P_hi,P_low
real,intent(in) :: Psurf
real,intent(in) :: z_0
real,intent(in) :: zsurf_0
real,intent(out) :: pKv
......@@ -8390,10 +8398,14 @@ c$$$ ! TODO: cas où l'altitude est inférieure à la première maille de mcd
write(*,*) ' > ********************************************'
write(*,*) ' > Input vdif_k'
write(*,*) ' > ********************************************'
write(*,*) ' > z_0, z_hi, z_low, U_low, U_hi, V_low, V_hi:',
& z_0, z_hi, z_low, U_low, U_hi, V_low, V_hi
write(*,*) ' > temp_low, Temp_hi, P_low, P_hi, Psurf:',
& temp_low, Temp_hi, P_low, P_hi, Psurf
write(*,*) ' > z_0, z_hi, z_low:',
& zsurf_0, z_hi, z_low
write(*,*) ' > U_low, U_hi, V_low, V_hi:',
& U_low, U_hi, V_low, V_hi
write(*,*) ' > temp_low, Temp_hi:',
& temp_low, Temp_hi
write(*,*) ' > P_low, P_hi, Psurf:',
& P_low, P_hi, Psurf
write(*,*) ' >'
lmixmin = 30.
......@@ -8417,16 +8429,16 @@ c$$$ ! TODO: cas où l'altitude est inférieure à la première maille de mcd
T_pot_low=Temp_low*(Psurf/P_low)**rcp
T_pot_mid = (T_pot_hi + T_pot_low)/2.
dT_pot_dz = (T_pot_hi - T_pot_low)/zdz
write(*,*) ' > T_pot_hi, T_pot_low, T_pot_mid, dT_pot_dz',
write(*,*) ' > T_pot_hi, T_pot_low, T_pot_mid, dT_pot_dz:',
& T_pot_hi, T_pot_low, T_pot_mid, dT_pot_dz
write(*,*) ' >'
write(*,*) ' >'
write(*,*) ' > zdvodz2', zdvodz2
write(*,*) ' > zdvodz2:', zdvodz2
write(*,*) ' > lmix', lmix
write(*,*) ' >'
write(*,*) ' > dT_pot_dz', dT_pot_dz
write(*,*) ' > g_0', g_0
write(*,*) ' > dT_pot_dz:', dT_pot_dz
write(*,*) ' > g_0:', g_0
write(*,*) ' >'
if(zdvodz2.lt.1.e-5) then
......@@ -8434,13 +8446,13 @@ c$$$ ! TODO: cas où l'altitude est inférieure à la première maille de mcd
else
Ri = g_0 * dT_pot_dz /(T_pot_mid*zdvodz2)
write(*,*) ' > * Ri', Ri
write(*,*) ' > 1 - 2.5 Ri', 1.-2.5*Ri
write(*,*) ' > * Ri:', Ri
write(*,*) ' > 1 - 2.5 Ri:', 1.-2.5*Ri
write(*,*) ' >'
pKv = lmix*sqrt(max(lmix**2*zdvodz2*(1-2.5*Ri),emin_turb))
endif
write(*,*) ' > pKv', pKv
write(*,*) ' > pKv:', pKv
write(*,*) ' > ********************************************'
return
......
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