Commit 4138764d authored by Sabine's avatar Sabine
Browse files

Merge remote-tracking branch 'refs/remotes/origin/dev' into dev

parents 03adec6e 759df5f2
This diff is collapsed.
#!/bin/bash
# Ignacio Pisso, May 2017
# Changes 2018-2019
echo CREATE A NEW FLEXPART DISTRIBUTION
......@@ -42,17 +43,13 @@ if [ -d $tarball_tmp ]; then
fi
# start packing
## needs in addition to the git repo ANCILLARY git repos
# VERIFY THESE RESOURCES EXIST BEFORE PACKING DISTRIBUTION
#1 OH file OH_variables.bin || OH_variables=../flexin/OH_FIELDS/OH_variables.bin
#2 flex_extract || flex_extract=../flex_extract_v7.0.4/
#3 flex_read_fortran from ../flex_read_matlab/export_basic TODO: add functions to ../flex_read_matlab/export/
# flex_read_matlab_src=../flex_read_matlab/export_basic
#4 tests/examples ../flex_tests_examples/examples3/*
#5
#6
#4 tests/examples ../flex_tests_examples/examples/*
......@@ -68,7 +65,6 @@ echo
# patnames
echo ---------------------------------------------------------
echo ')' copy pathnames
#cp pathnames_distribution $tarball_tmp/pathnames
cp pathnames $tarball_tmp/pathnames
echo ---------------------------------------------------------
......@@ -80,26 +76,24 @@ echo ')' copy src/
mkdir $tarball_tmp/src
cp src/*.f90 $tarball_tmp/src
cp -r src/gributils $tarball_tmp/src
# echo '3)' copy makefile
cp src/makefile $tarball_tmp/src
#cp src/makefile.gfs $tarball_tmp/src
echo ---------------------------------------------------------
cp LICENSE $tarball_tmp/LICENSE_GPLv3
cp src/flexpart_license.txt $tarball_tmp/src
echo
# options dir
echo ---------------------------------------------------------
echo ')' copy options/
echo ---------------------------------------------------------
# (for the distribution they work with the defult flex_ecmwf test winds)
#cp -r options_flex_ecmwf_EA $tarball_tmp/options
mkdir $tarball_tmp/options
user_input_files="AGECLASSES COMMAND IGBP_int1.dat OUTGRID OUTGRID_NEST RECEPTORS RELEASES surfdata.t surfdepo.t"
for i in $user_input_files
do
echo $i
cp -r options/$i $tarball_tmp/options
#echo copy $i to $tarball_tmp/options
done
mkdir $tarball_tmp/options/SPECIES
cp options/SPECIES/SPECIES* $tarball_tmp/options/SPECIES/
......@@ -122,7 +116,6 @@ echo
# AVAILABLE
echo ---------------------------------------------------------
echo ')' copy AVAILABLE
#cp AVAILABLE_flex_ecmwf_EA $tarball_tmp/AVAILABLE
cp AVAILABLE $tarball_tmp/AVAILABLE
echo ---------------------------------------------------------
......@@ -143,16 +136,7 @@ echo ---------------------------------------------------------
echo ')' preprocess/
mkdir $tarball_tmp/preprocess
echo -----------------flex_extract-------------------
#echo '6)' mkdir $tarball_tmp/flex_extract [a separate repository]
#mkdir $tarball_tmp/preprocess
#mkdir $tarball_tmp/preprocess/flex_ecmwf
mkdir $tarball_tmp/preprocess/flex_extract
#echo '7) add ECMWF retrieve routines (change EA wind files for latest source code)'
#mkdir $tarball_tmp/preprocess/flex_extract
#mkdir $tarball_tmp/preprocess/flex_extract/work
#cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_ecmwf/
#cp -r flex_ecmwf_src/* $tarball_tmp/preprocess/flex_extract/
## cp -r flex_extract/work/EA* $tarball_tmp/preprocess/flex_extract/work
flex_extract=../flex_extract_v7.0.4/
echo include flex_extract v7.0.4 b7c1c04a204c91e53759ef590504bf52dfaece64
echo from $flex_extract [use git modules?] IP 3/2018
......@@ -166,12 +150,6 @@ echo ---------------------------------------------------------
echo AVAILABLE generation scripts?
echo ---------------------------------------------------------
#echo '10)' cp example generating scripts [a separate repository]
#echo moved below
#mkdir $tarball_tmp/examples
#cp -r examples/*.sh $tarball_tmp/examples/
#cp -r examples/Makefile $tarball_tmp/examples/
echo
# postprocess
......@@ -182,8 +160,6 @@ postprocess=postprocess
mkdir $tarball_tmp/$postprocess
echo -----------------flex_read_fortran-------------------
flex_read_fortran_src=$postprocess/flex_read_fortran/
#echo ')' directory for reading routines
#echo '12)' add fortran reading routines [a separate repository]
mkdir $tarball_tmp/$postprocess/flex_read_fortran
cp $postprocess/flex_read_fortran/*.f $tarball_tmp/$postprocess/flex_read_fortran
cp $postprocess/flex_read_fortran/*.f90 $tarball_tmp/$postprocess/flex_read_fortran
......@@ -195,47 +171,24 @@ flex_read_matlab_src=../flex_read_matlab/export_basic
mkdir $tarball_tmp/$postprocess/flex_read_matlab
cp -r $flex_read_matlab_src/* $tarball_tmp/$postprocess/flex_read_matlab
echo flex_read_fortran from $flex_read_matlab_src # NOT copied
# add matlab reading routines
#mkdir $tarball_tmp/postprocess/flex_read_matlab
#cp postprocess/flex_read_matlab/*.m $tarball_tmp/postprocess/flex_read_matlab
echo ---------------------------------------------------------
echo
echo ---------------------------------------------------------
echo ')' tests/
###############################################################
#echo '13) tests'
mkdir $tarball_tmp/tests
#echo -----------------flex_read_fortran-------------------
#echo 'b) ./tests/flex_read_fortran/'
#echo fixme
#mkdir $tarball_tmp/tests/flex_read_fortran
#cp tests/flex_read_fortran/test_read_default.sh $tarball_tmp/tests/flex_read_fortran
###############################################################
echo ----------------- examples -------------------
#echo ') ./tests/examples/'
mkdir $tarball_tmp/tests/examples
#echo ') scripts'
#cp -r ./tests/examples/*.sh $tarball_tmp/tests/examples/
#echo ') makefile'
#cp -r ./tests/examples/Makefile $tarball_tmp/tests/examples/
# echo USAGE: ~/repos/flexpart/tests/examples'$' make run
cp -r ../flex_tests_examples/examples3/* $tarball_tmp/tests/examples/
cp -r ../flex_tests_examples/examples/* $tarball_tmp/tests/examples/
echo ----------------- examples_reference -------------------
cp -r ./tests/examples_reference $tarball_tmp/tests/
###############################################################
# echo -----------------postprocess examples-------------------
echo -----------------read examples-------------------
#echo '13 c) ./tests/read_examples/'
mkdir $tarball_tmp/tests/read_examples
cp tests/read_examples/declare_examples $tarball_tmp/tests/read_examples/
......@@ -248,63 +201,36 @@ cp tests/read_examples/set_examples_all $tarball_tmp/tests/read_examples/
cp tests/read_examples/set_examples_3.sh $tarball_tmp/tests/read_examples/
cp tests/read_examples/read_headers.sh $tarball_tmp/tests/read_examples/
cp tests/read_examples/read_examples_output.txt $tarball_tmp/tests/ #read_examples/
# echo USAGE ~/repos/flexpart/tests/read_examples'$'./read_grids.sh
###############################################################
echo ------------compare examples-------------------
#echo tests/compare_examples.sh
mkdir $tarball_tmp/tests/compare_examples
#mkdir $tarball_tmp/tests/compare_examples
#cp tests/compare_examples/compare_grids.sh $tarball_tmp/tests/compare_examples
#cp tests/compare_grids.sh $tarball_tmp/tests/
cp tests/compare_examples/*.sh $tarball_tmp/tests/compare_examples
cp tests/compare_examples/compare_grids_output.txt $tarball_tmp/tests/ #compare_examples
# list of examples with units
#cp tests/declare_examples $tarball_tmp/tests/
echo
# ~/repos/flexpart/tests$./compare_grids.sh
#echo mkdir $tarball_tmp/tests/examples2/
#echo cp tests/examples2/setup.sh $tarball_tmp/tests/examples2/
# echo --repeat examples-------------------
# echo FIXME
###############################################################
#echo -----------------ctbto-------------------
# mkdir $tarball_tmp/tests/ctbto
# cp -r tests/NILU/test_1 $tarball_tmp/tests/
# cp -r tests/default_cases $tarball_tmp/tests/
echo ---------------------------------------------------------
echo create tarball
#tar cvf $tarball $tarball_tmp
#tar cf $tarball $tarball_tmp
#cd
cd $targetdir
tar cf $distribution_name.tar $distribution_name
pwd
echo tarball $tarball complete
echo exported untarred files in $tarball_tmp
echo verify:
echo cp -r preprocess/flex_extract/work $tarball_tmp/preprocess/flex_extract/
echo cd $tarball_tmp/src
echo $HOME/repos/flexpart/src/make_in_laptop.sh
echo cd .. ';' ./src/FLEXPART
echo cd postprocess/flex_read_fortran
echo make test
echo max: 0.115784094 mean: 4.70877676E-05
#echo cd $tarball_tmp/tests/examples ';' make run
echo e.g.: max: 0.115784094 mean: 4.70877676E-05
echo cd ../../tests/examples ';' make run
#echo cd $tarball_tmp/tests/read_examples
echo cd ../read_examples
echo ./read_examples.sh
echo ./read_examples.sh '>' ../read_examples_output.txt
......@@ -314,69 +240,3 @@ echo ./compare_grids.sh '>' ../compare_grids_output.txt
echo e.g. tar --append --file=$tarball_tmp/ ../compare_grids_output.txt ../read_examples_output.txt
exit
#return
###############################################################
# obtain $FLEXHOME (and set)
#1 cd $FLEXHOME/src
#2 compile
#
#[laptop] source /Users/ignacio/repos/flexpart/src/make_in_laptop.sh
# [njord] make
# ->created executable (FLEXPART)
#3 execute in src (absolute paths)
#
#[laptop] cp /Users/ignacio/repos/flexpart/src/pathnames .
#[njord] FIXME
#
# mkdir output
# ./FLEXPART
# ->created output in output/
#4 read output
# cd $FLEXHOME/postprocess/flex_read_fortran/
# make
# -> printheader* printgrid* flex_read_compare2*
#/postprocess/flex_read_fortran$./printheader ../../src/output/
#/postprocess/flex_read_fortran$./printgrid ../../src/output/ conc
# -> output in stdout (max: 11122924.0 sum: 90330784.0)
#5 execute in $FLEXHOME
# cd $FLEXHOME
# get winds
#[laptop] cp -r ~/repos/flex_winds/work/ ./preprocess/flex_extract/
#[njord] curl https://folk.nilu.no/~ignacio/FLEXPART/EA120101.tar --output EA120101.tar ; tar -xvf EA120101.tar ; mv flex_extract/work preprocess/flex_extract/ ; rmdir flex_extract
# src/FLEXPART
# -> output in $FLEXHOME/output/
#6 read output
# postprocess/flex_read_fortran/printheader output/
# postprocess/flex_read_fortran/printgrid output/ conc
# -> output in stdout ( max: 11578738.0 sum: 104058720.)
#7 gnererate examples
# cd $FLEXHOME/tests/examples
#make run
#make examples
#make batch
#./run_batch_cl.sh
#make (set_default_example.sh)
#tests/examples$../../src/FLEXPART
#output
#8 read examples:
#cd $FLEXHOME/tests/read_examples
# ./read_headers.sh
# ./read_grids.sh
#9 compare examples with reference
......@@ -20,12 +20,12 @@
IOUT= 1, ! Output type: [1]mass 2]pptv 3]1&2 4]plume 5]1&4, +8 for NetCDF output
IPOUT= 0, ! Particle position output: 0]no 1]every output 2]only at end 3]time averaged
LSUBGRID= 0, ! Increase of ABL heights due to sub-grid scale orographic variations;[0]off 1]on
LCONVECTION= 1, ! Switch for convection parameterization;0]off [1]on
LAGESPECTRA= 0, ! Switch for calculation of age spectra (needs AGECLASSES);[0]off 1]on
LCONVECTION= 1, ! Switch for convection parameterization;0]off [1]on
LAGESPECTRA= 0, ! Switch for calculation of age spectra (needs AGECLASSES);[0]off 1]on
IPIN= 0, ! Warm start from particle dump (needs previous partposit_end file); [0]no 1]yes
IOUTPUTFOREACHRELEASE= 1, ! Separate output fields for each location in the RELEASE file; [0]no 1]yes
IFLUX= 0, ! Output of mass fluxes through output grid box boundaries
MDOMAINFILL= 0, ! Switch for domain-filling, if limited-area particles generated at boundary
MDOMAINFILL= 0, ! Switch for domain-filling, if limited-area particles generated at boundary
IND_SOURCE= 1, ! Unit to be used at the source ; [1]mass 2]mass mixing ratio
IND_RECEPTOR= 1, ! Unit to be used at the receptor; [1]mass 2]mass mixing ratio 3]wet depo. 4]dry depo.
MQUASILAG= 0, ! Quasi-Lagrangian mode to track individual numbered particles
......
......@@ -18,44 +18,44 @@ WET DEPOSITION
Below-cloud scavenging
- Gases:
A and B are the parameters for below-cloud scavenging defined by Eq. scavenging coefficient = A x precipitation-rate^B
A and B are the parameters for below-cloud scavenging defined by Eq. scavenging coefficient = A x precipitation-rate^B
If you migrate from FLEXPART version 9.2 and below this is equal to A and B as it was.
- Particles:
A "rain collection efficiency"
B "snow collection efficiency" are both defined by Equations 46-47.
Suggested values for particle scavenging are A=1.0,B=1.0.
Using values A=0.2 and B=0.2 will give results close to the old scavenging scheme of FLEXPART version 9.2 and below.
A "rain collection efficiency"
B "snow collection efficiency" are both defined by Equations 46-47.
Suggested values for particle scavenging are A=1.0,B=1.0.
Using values A=0.2 and B=0.2 will give results close to the old scavenging scheme of FLEXPART version 9.2 and below.
In-cloud scavenging
- Gases:
Is switched on if Ai or Bi are given greater than 0
If you migrate from FLEXPART version 9.2 and below this is equal to Ai and Bi should be set to 1
- Particles:
Ai ("Cloud Condensation Nuclei (CCN) efficiency")
Bi ("Ice Nuclei (IN) efficiency") are both from Eq. 51.
Suggested values for particle scavenging are Ai=0.9 and Bi=0.1.
Using values Ai=0.9 and Bi=0.9 should give results cto the old scavenging scheme of FLEXPART version 9.2 and below.
Ai ("Cloud Condensation Nuclei (CCN) efficiency")
Bi ("Ice Nuclei (IN) efficiency") are both from Eq. 51.
Suggested values for particle scavenging are Ai=0.9 and Bi=0.1.
Using values Ai=0.9 and Bi=0.9 should give results cto the old scavenging scheme of FLEXPART version 9.2 and below.
---------------------------------------------------------------------------------------------------------------------------
DRY DEPOSITION
- Gases:
D is the diffusivity of water vapor and
D_i is the diffusivity of the species,
H is the effective Henry’s constant,
f0 varies between 0 and 1 and gives the reactivity of a species relative to that of ozone. For non-reactive species f0 is 0, for slightly reactive it is 0.1 and for highly reactive it is 1.
Dry deposition of gases is switched off by negative D.
D is the diffusivity of water vapor and
D_i is the diffusivity of the species,
H is the effective Henry’s constant,
f0 varies between 0 and 1 and gives the reactivity of a species relative to that of ozone. For non-reactive species f0 is 0, for slightly reactive it is 0.1 and for highly reactive it is 1.
Dry deposition of gases is switched off by negative D.
- Particles:
rho specifies the density of the substance,
dquer its mean diameter
dsig the measure of variation.
If no detailed information for deposition velocity calculation is available, a constant deposition velocity vd [cm s-1] can be used.
Dry deposition of particles is switched off by negative rho.
rho specifies the density of the substance,
dquer its mean diameter
dsig the measure of variation.
If no detailed information for deposition velocity calculation is available, a constant deposition velocity vd [cm s-1] can be used.
Dry deposition of particles is switched off by negative rho.
---------------------------------------------------------------------------------------------------------------------------
OH REACTION:
can be turned on by giving parameter C [cm^3/molecule/sec]], D [K] and N [no unit] positive values, defined by Eq. 39.
OH reaction is switched off by negative C.
can be turned on by giving parameter C [cm^3/molecule/sec]], D [K] and N [no unit] positive values, defined by Eq. 39.
OH reaction is switched off by negative C.
---------------------------------------------------------------------------------------------------------------------------
Optionally emission variation information
can be added at the end of the file, defined as following: Since FLEXPART version 6.0, emission factors can be defined that change the temporal variation of particle releases. This is useful, for instance,
can be added at the end of the file, defined as following: Since FLEXPART version 6.0, emission factors can be defined that change the temporal variation of particle releases. This is useful, for instance,
to simulate the typical daily and weekly cycle of anthropogenic emissions. The emission factors are given in the file of the
corresponding species SPECIES_nnn, where nnn is the species number defined in file RELEASES. If no emission variation
information is given, emission rates for species nnn are taken as constant. Release rates can vary with the hour of the day
......
&SPECIES_PARAMS
PSPECIES="TRACER", ! Tracer name
/
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
program flexpart
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
program flexpart
!*****************************************************************************
......@@ -69,7 +72,7 @@ program flexpart
! FLEXPART version string
flexversion_major = '10' ! Major version number, also used for species file names
flexversion='Ver. '//trim(flexversion_major)//'.2beta MPI (2017-08-01)'
flexversion='Ver '//trim(flexversion_major)//'.4 MPI (2019-11-12)'
verbosity=0
! Read the pathnames where input/output files are stored
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine advance(itime,nrelpoint,ldt,up,vp,wp, &
usigold,vsigold,wsigold,nstop,xt,yt,zt,prob,icbt)
! i i i/oi/oi/o
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine assignland
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine boundcond_domainfill(itime,loutend)
! i i
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine boundcond_domainfill(itime,loutend)
! i i
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine calcfluxes(nage,jpart,xold,yold,zold)
! i i i i i
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine calcmatrix(lconv,delt,cbmf,metdata_format)
! o i o
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine calcpar(n,uuh,vvh,pvh,metdata_format)
! i i i o
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine calcpar_nests(n,uuhn,vvhn,pvhn,metdata_format)
! i i i o
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine calcpv(n,uuh,vvh,pvh)
! i i i o
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine calcpv_nests(l,n,uuhn,vvhn,pvhn)
! i i i i o
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine caldate(juldate,yyyymmdd,hhmiss)
! i o o
!*****************************************************************************
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
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 i o
......@@ -105,7 +108,7 @@ subroutine cbl(wp,zp,ust,wst,h,rhoa,rhograd,sigmaw,dsigmawdz,tlw,ptot,Q,phi,ath,
radw2=w2**0.5
dradw2=0.5*w2**(-0.5)*dw2
!costluar4=0.66667 ! costante da LHH
fluarw=costluar4*(cuberoot(skew)) !skew**(1./3.)
fluarw=costluar4*(cuberoot(skew)) !skew**(1./3.)
fluarw2=fluarw*fluarw
if (skew.ne.0) then
......@@ -183,7 +186,7 @@ subroutine cbl(wp,zp,ust,wst,h,rhoa,rhograd,sigmaw,dsigmawdz,tlw,ptot,Q,phi,ath,
pa=(usurad2p*(1./sigmawa))*(exp(-(0.5*((deltawa/sigmawa)**2.))))
pb=(usurad2p*(1./sigmawb))*(exp(-(0.5*((deltawb/sigmawb)**2.))))
ptot=dens*aluarw*pa+dens*bluarw*pb
aperfa=deltawa*usurad2/sigmawa
......
! SPDX-FileCopyrightText: FLEXPART 1998-2019, see flexpart_license.txt
! SPDX-License-Identifier: GPL-3.0-or-later
subroutine centerofmass(xl,yl,n,xcenter,ycenter)
! i i i o o
!*****************************************************************************
......
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