Commit a28298d9 authored by Ignacio Pisso's avatar Ignacio Pisso
Browse files

Files of 3.3.1 as in flexpart.eu tarball flexpart-wrf3.3.1.tar.gz

parent d5239641
......@@ -582,7 +582,7 @@
! wp=(rw*wp+rannumb(nrand+i)*sqrt(1.-rw**2)*sigw &
! +tlw*(1.-rw)*(dsigw2dz+rhoaux*sigw**2))*real(icbt)
! delz=wp*dtf
! endif
! endif
!************ CBL scheme integrated in FLEXPART: added by mc **********!
if (turbswitch) then
if (dtftlw.lt..5) then
......@@ -789,7 +789,7 @@
endif
endif
enddo
enddo
if (cblflag.ne.1) nrand=nrand+i !------>>>>>>>>>>>>>>>> modified by mc for accounting of different increment of nrand in cbl flag
! if (nombre.eq.103) print*,'usig 3',usig
......@@ -878,7 +878,7 @@
! if (mod(abs(itime),3600).ne.0) dump=.true.
!c print*,'itime',itime,3600,mod(abs(itime),3600),dump
!!!! CHANGE
!!!****************** NEW test for THE WELL MIXED CRITERION by mc ***************
!!!****************** NEW test for THE WELL MIXED CRITERION by mc ***************
!$OMP CRITICAL
!if (zt.lt.h) then
! i_well=int(zt/h*num_lvl*1.)+1 !per fare il test qui devo considerare OMP and MPI...
......
......@@ -17,32 +17,32 @@
!* *
!* You should have received a copy of the GNU General Public License *
!* along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. *
!***********************************************************************
!***********************************************************************
subroutine cbl(wp,zp,ust,wst,h,rhoa,rhograd,sigmaw,dsigmawdz,tlw,ptot,Q,phi,ath,bth,ol,flagrein)
! i i i i i i i i i i o o o o o o i i/o
! i i i i i i i i i i o o o o o o i i/o
!=============== well mixed formulation of CBL skewed vertical profiles following LHH 1996 with profile of w3 from lHB 2000 ========
!=============== LHH formulation has been modified to account for variable density profiles and backward in time or forward in time simulations ========
!=============== by Massimo Cassiani ( mc ), NILU, 2012-2013, reference to Cassiani et al. 2013 (to be submitted...) ========
!=======================================================================================================================================================
!======================================================================================================
! wp: particle velocity
! zp: particle position
! ust: velcotiy scale
! wst: convective velcotiy scale
! h: boundary layer top
! rhoa: air density
! rhograd: air densiy vertical gradient
! sigmaw: turbulent flutuation of vertical velocity standard deviation
! dsigmawdz: derivative of above
! tlw: local lagrangina time scale
!=======================================================================================================================================================
!======================================================================================================
! wp: particle velocity
! zp: particle position
! ust: velcotiy scale
! wst: convective velcotiy scale
! h: boundary layer top
! rhoa: air density
! rhograd: air densiy vertical gradient
! sigmaw: turbulent flutuation of vertical velocity standard deviation
! dsigmawdz: derivative of above
! tlw: local lagrangina time scale
! ptot: pdf value for the particle velocity in drift coefficient, see Cassiani et al. 2013, not used
! Q: part of drift coefficient, not used
! phi: part of drift coeffcient, not used
! ath: drift coefficient, used
! bth: diffusion coeffcient, sued
! ol: Obukhov lenght
! flagrein: set accordingly to conditon below if 1 then re-initialize particle velocity
! Q: part of drift coefficient, not used
! phi: part of drift coeffcient, not used
! ath: drift coefficient, used
! bth: diffusion coeffcient, sued
! ol: Obukhov lenght
! flagrein: set accordingly to conditon below if 1 then re-initialize particle velocity
!======================================================================================================
use par_mod, only:pi
use com_mod, only:ldirect
......@@ -109,10 +109,10 @@
timedir=ldirect !direction of time forward (1) or backward(-1)
!========================= assign z ==============================
z=(zp/h)
z=(zp/h)
transition=1.
!if (ol.lt.-50) transition=((sin(((ol+100.)/100.)*pi))-1.)/2.
!if (ol.lt.-50) transition=((sin(((ol+100.)/100.)*pi))-1.)/2.
if (-h/ol.lt.15) transition=((sin((((-h/ol)+10.)/10.)*pi)))/2.+0.5 !transition fucntion to smoohtly
!========================= secondo moment of vertical velocity =====================
!!! w2=1.4*(z**1.5*(1.-z))**(2./3.)
......@@ -233,8 +233,8 @@
sigmawb2=sigmawb*sigmawb
pa=(usurad2p*(1./sigmawa))*(exp(-(0.5*((deltawa/sigmawa)**2.))))
pb=(usurad2p*(1./sigmawb))*(exp(-(0.5*((deltawb/sigmawb)**2.))))
pb=(usurad2p*(1./sigmawb))*(exp(-(0.5*((deltawb/sigmawb)**2.))))
if (abs(deltawa).gt.10.*sigmawa.and.abs(deltawb).gt.10.*sigmawb) flagrein=1 !added control flag for re-initialization of velocity
! if (abs(deltawa).gt.6.*sigmawa.and.abs(deltawb).gt.6.*sigmawb) flagrein=1 !added control flag for re-initialization of velocity
......
......@@ -18,8 +18,8 @@
!* *
!* You should have received a copy of the GNU General Public License *
!* along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. *
!***********************************************************************
!C--- adapted from press et al. 1992 numerial recipes in Fortran by Massimo Cassiani to jse RANLUX as uniform random number generator
!***********************************************************************
!C--- adapted from press et al. 1992 numerial recipes in Fortran by Massimo Cassiani to jse RANLUX as uniform random number generator
FUNCTION gasdevlux()
USE luxury
INTEGER idum
......
......@@ -18,19 +18,19 @@
!* *
!* You should have received a copy of the GNU General Public License *
!* along with FLEXPART. If not, see <http://www.gnu.org/licenses/>. *
!***********************************************************************
!***********************************************************************
subroutine initialize_cbl_vel(idum,zp,ust,wst,h,sigmaw,wp,dcas,dcas1,ol)
! i/o i i i i i o i i i
! idum: for random number but not usednot used
! zp: particle psition
! ust: velocity scale, not used
! wst: ocnvective velcotiy scale
! sigmaW: standard deviaiton of vertical velocity
! wp: particle velocity
! dcas: for random number
! dcas1: for random number
! i/o i i i i i o i i i
! idum: for random number but not usednot used
! zp: particle psition
! ust: velocity scale, not used
! wst: ocnvective velcotiy scale
! sigmaW: standard deviaiton of vertical velocity
! wp: particle velocity
! dcas: for random number
! dcas1: for random number
! ol: Obukhov lenght
!=============== initilization of particle velcoity based on CBL skewed vertical profiles and formulation of LHH 1996 with profile of w3 from lHB 2000 ==================
!=============== by Massimo Cassiani ( mc ), NILU, 2012-2013, reference to Cassiani et al. 2013.. ==================
......@@ -62,17 +62,17 @@
ath, &
bth, &
wb,wa
real timedir
real timedir
real ol, transition
!---------------------------------------------------------------------------
!timedir=dble(ldirect) !direction of time forward (1) or backward(-1)
timedir=ldirect !time direction forward (1) or backward(-1)
z=zp/h !hn is the boundarylayer top
transition=1.
if (-h/ol.lt.15) transition=((sin((((-h/ol)+10.)/10.)*pi)))/2.+0.5 !transtion from near neutral to unstable
transition=1.
if (-h/ol.lt.15) transition=((sin((((-h/ol)+10.)/10.)*pi)))/2.+0.5 !transtion from near neutral to unstable
!w2=(1.7*(z*(1.-0.7*z)*(1.-z))**(2./3.))*(wst**2)
w2=sigmaw*sigmaw
......@@ -80,16 +80,16 @@
w3=(((1.2*z*((1.-z)**(3./2.)))+eps)*wst**3)*transition
skew=w3/(w2**1.5)
skew2=skew*skew
radw2=sqrt(w2) !sigmaw
radw2=sqrt(w2) !sigmaw
if (skew.ne.0) then
fluarw=costluar4*skew**0.333333333333333
fluarw2=fluarw*fluarw
rluarw=(1.+fluarw2)**3.*skew2/((3.+fluarw2)**2.*fluarw2) !-> r
xluarw=rluarw**0.5 !(1.+fluarw2)**1.5*skew/((3.+fluarw2)*fluarw) !----> r^1/2
xluarw=rluarw**0.5 !(1.+fluarw2)**1.5*skew/((3.+fluarw2)*fluarw) !----> r^1/2
else
fluarw=0.
fluarw2=0.
fluarw2=0.
rluarw=0.
xluarw=0.
end if
......
......@@ -2,7 +2,7 @@
!* Copyright 2012,2013 *
!* Jerome Brioude, Delia Arnold, Jerome Fast,
!* Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa *
!* Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann
!* Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann
!* M. Cassiani
!* *
!* This file is part of FLEXPART WRF *
......
This diff is collapsed.
......@@ -68,7 +68,7 @@
wb,wa
real timedir
real ol,transition
!---------------------------------------------------------------------------
!---------------------------------------------------------------------------
! print*,'INSIDE INIT',zp,ust,wst,h,sigmaw,wp,nrand
! wpold=wp
nrand=nrand+1
......
Supports Markdown
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