WaterSip: Difference between revisions
Line 308: | Line 308: | ||
====Parameter set Variables==== | ====Parameter set Variables==== | ||
The parameters in this category allow to include or exclude specific variables from the output files. | |||
- '''sourcesBoundaryLayer (boolean):''' | - '''sourcesBoundaryLayer (boolean):''' |
Revision as of 16:43, 8 November 2016
About WaterSip
WaterSip is a diagnostic software tool that identifies source, transport and arrival properties of atmospheric water vapour. It implements the moisture source diagnostic of Sodemann et al. (2008) for input data from either FLEXPART particle output or Lagranto trajectories.
Running the WaterSip diagnostic
The current version of WaterSip is V3.0.0. It is advised to create a link to the binary file of WaterSip in you /home/$USER/bin or project directory:
mkdir ~/bin ln -s /Data/gfi/met_backup/progs/WaterSip_tool/WaterSip3 ~/bin
Adding ~/bin
to your path will make execution of WaterSip more comfortable. To start a diagnostic run, WaterSip needs to be called from the command line. This version reads one single input file during startup which contains all parameter settings required to execute a run (the examples below assume that you are in a working directory and WaterSip3 is at a location in your $PATH environment variable):
WaterSip3 <WATERSIP_parameter_file>
Input file conversion from V2
The input file format, described below, is quite different in V3 than in previous versions. To facilite transition from V2.x input files, there is an option execute WaterSip3 with the option -c to convert to the new V3 input file format:
WaterSip3 -c <WATERSIP_V2_parameter_file>
This will create a new file named <WATERSIP_V2_parameter_file>V3 at the current directory. It is recommended to double check and edit the settings in the converted file before starting a simulation.
Parallelization
WaterSip3 has been parallelized with OpenMP, which can significantly speed up calculation time. The number of processors to be used is specified in the input file (see below).
If WaterSip3 is to be executed on the queue (this is imperative for all runs except for short tests), the following wrapper script can be used to start a run using 4 cores for parallel processing:
# start with sbatch NAME_OF_THIS_FILE directly on machine #SBATCH --job-name=WaterSip3 #SBATCH --workdir=/tmp/ #SBATCH --partition=priority #SBATCH --output=WaterSip_job.%j.out #SBATCH --error=WaterSip_job.%j.err #SBATCH --mail-type=END #SBATCH --ntasks=1 #SBATCH --cpus-per-task=4 cd /Data/gfi/met_backup/progs/WaterSip_tool/src3.0 srun WaterSip3 INPUT_WATERSIP_global_1993
Input file options
The WaterSip input file is a text file with options that are specified for different option groups. Option groups are identified by square brackets (e.g. [Case]
). There are 7 option groups which can appear in random order in the input file:
- Case: general settings related to the case to be extracted
- Grids: specification of different output grids
- Diagnostrics: parameters of the moisture diagnostic
- Output: general output settings
- Variables: selection of output variables
- Flexpart: options specific to runs using FLEXPART particle output
- Lagranto: options specific to runs using Lagranto trajectories
Parameter set Case
The settings in this parameter category describe the basic conditions of the diagnostic run.
- caseName (string): identifier for the run, prepended to all output files.
caseName = global_201002_relative
- inputDir (string): search path of the input files. The inputDir string ends with a placeholder for the files to be read in. For FLEXPART this will be either shortposit_ or partposit_. For Lagranto this will commonly be lsl_. The %s placeholder is completed by the currently read in date at runtime.
inputDir = /Volumes/Data/global/shortposit_%s
- outputDir (string): path where the output files will be created.
outputDir = /Volumes/Data/global/output/
- startDate (date string): inital date of the run, fixed format YYYYMMDD-HHMMSS. Start date is latest date of the run which moves backward in time.
startDate = 20100228-180000
- endDate (date string): final date of the run, fixed format YYYYMMDD-HHMMSS. End date is earliest date of the run.
endDate = 20100211-000000
- timeStep (integer): time step in hours between particles or trajectory output times. (typical values 6, 3, or 1 (hours))
timeStep = 6
- trajPoints (integer): number of trajectory points to be considered in a trajectory. For 5-day trajectories with a 6 hour time step, 5x4+1=21 trajPoints should be selected.
trajPoints = 21
- minTrajPoints (integer): minimum length of trajectories to be included in analysis. Parameter is only relevant for Lagranto simulations with uneven trajectory length.
minTrajPoints = 0
- sectorizeRegion (integer): region set used to divide moisture sources into different sectors (see Sectorization)
sectorizeRegion = 0
- filterBoxFile (string): path to the text file describing geographic boxes used to filter air parcels during transport (see Box filters).
filterBoxFile = /home/hso039/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste
- filterIndex (integer): used line from the filterBoxFile to select/deselect trajectories
filterIndex = -1
- orographyFile (string): path to the orography file used to select arrival based on underying topography, using the ETOPO2 topography. File in netcdf format.
orographyFile = "/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/etopo5.nc"
- lsmFile (string): path to the file with global land-sea-mask, currently from ERA-Interim data. Domain must be global but is in principle arbitrary. File in netcdf format.
lsmFile = "/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/ERA_sea_mask_inv.nc"
- maskFile (string): path to file with an arrival selection
maskFile = " "
- useMask (boolean): use mask file (0=no, 1=yes).
useMask = 0
- ompThreads (integer): number of threads to be used with OpenMP parallelisation if compiled with flag -fopenmp (1=no parallelisation, >1 parallelisation activated.)
ompThreads = 1
- showStats (boolean): print statistics about particle processing to the command line (0=off, 1=on).
showStats = 0
Parameter set Grids
The parameters in this category specify the different output grids and the gridding method
- arrivalGridMinLon (float): minimum longitude of arrival (target region) grid box. Trajectories are traced backward from the arrival grid. Integrated source, transport and arrival parameters are put on the arrival grid, weighted by precipitation or water vapour of arriving air parcels.
arrivalGridMinLon = -180
- arrivalGridMaxLon (float): maximum longitude of arrival (target region) grid box
arrivalGridMaxLon = 180
- arrivalGridMinLat (float): minimum latitude of arrival (target region) grid box
arrivalGridMinLat = -90
- arrivalGridMaxLat (float): minimum latitude of arrival (target region) grid box
arrivalGridMaxLat = 90
- arrivalGridDx (float): longitude increment of arrival (target region) grid
arrivalGridDx = 1
- arrivalGridDy (float): latitude increment of arrival (target region) grid
arrivalGridDy = 1
- arrivalGridRadius (float): gridding radius for information from arriving trajectories
arrivalGridRadius = 200
- sourceGridMinLon (float): minimum longitude of moisture source grid box
sourceGridMinLon = -180
- sourceGridMaxLon (float): maximum longitude of moisture source grid box
sourceGridMaxLon = 180
- sourceGridMinLat (float): minimum latitude of moisture source grid box
sourceGridMinLat = -90
- sourceGridMaxLat (float): maximum latitude of moisture source grid box
sourceGridMaxLat = 90
- sourceGridDx (float): longitude increment of moisture source grid box
sourceGridDx = 1
- sourceGridDy (float): latitude increment of moisture source grid box
sourceGridDy = 1
- sourceGridRadius (float): longitude increment of moisture source grid box
sourceGridRadius = 200
- griddingType (integer): select gridding algorithm (1: fast and simple gridding, 2: improved but slower gridding)
griddingType = 2
Parameter set Diagnostics
The parameters in this category control the way how the diagnostic works, and which trajectories should be considered in the run.
- uptakeThreshold (float): Threshold value for specific humidity increases per time step in air parcels to be considered as due to physical processes (evaporation), in g per kg. If the parameter reativeThresholds is set to true, the uptakeThreshold is specified as percent increase relative to the current specific humidity of an air parcel. Value is positive because of an air-parcel relative perspective. Default absolute values are 0.1 to 0.2 for 3h and 6h time steps.
uptakeThreshold = 0.2
- precipThreshold (float): Threshold value for specific humidity decreases per time step in air parcels to be considered as due to physical processes (precipitation), in g per kg. Value is negative because of an air-parcel relative perspective. If the parameter reativeThresholds is set to true, the uptakeThreshold is specified as percent increase relative to the current specific humidity of an air parcel. Then the value is positive. Default absolute values are -0.1 to -0.2 for 3h and 6h time steps.
precipThreshold = -0.2
- relativeThreshold (boolean):
relativeThreshold = 1
- arrivalPrecipMin (float): Threshold value to consider precipitation events with a specific humidity decrease larger than the value given by arrivalPrecipMin
. Units are g per kg when relativeThresholds is set to false, and fractional specific humidity decrease otherwise. For consistency, it is recommended to set the values for precipitationThreshold
and arrivalPrecipMin
to the same number.
arrivalPrecipMin = -0.2
- arrivalPrecipMax (float): Threshold value to consider precipitation events with a specific humidity decrease of up to the value given by arrivalprecipMin
. Units are g per kg when relativeThresholds is set to false, and fractional specific humidity decrease otherwise. To include all precipitation events with a 6h time step, a value of -100.0 or lower can be chosen if relativeThresholds
is set to false, or a value of 1.0 otherwise. The combination of the arrivalPrecipMin/Max
parameters allows to focus on heavy and weak precipitation events only.
arrivalPrecipMax = -100.0
- arrivalRHMin (float): Threshold value to consider precipitation events when relative humidity at the arrival location is larger than the value given by arrivalRHMin
. Units are %. Large-scale condensation can be assumed to occur above 80% relative humidity, to include convective cloud processes a lower threshold value may be required.
arrivalRHMin = 80
- arrivalRHMax (float): Threshold value to consider precipitation events when relative humidity at the arrival location is less than the value given by arrivalRHMax
. Units are %. This parameter in combination with arrivalRHMin
can be used to focus on condensation/no condensation cases when the parameter analyzeVapour
is set to true.
arrivalRHMax = 110
- arrivalOroMin (float): Threshold value to consider only arrival locations where the ETOPO2 topography exceeds the given value (in m). Use negative value to include all global locations, including ocean areas, Bangladesh and Death Valley.
arrivalOroMin = -100
- arrivalOroMax (float): Threshold value to consider only arrival locations where the ETOPO2 topography does not exceed the given value (in m). In combination with arrivalOroMin
, regions with a complex shape but common elevation can be selected easily.
arrivalOroMax = 12000
- arrivalAltMin (float): Threshold value to consider only arrival locations where the air parcels are above at the given altitude (in m above sea level).
arrivalAltMin = -100
- arrivalAltMax (float): Threshold value to consider only arrival locations where the air parcels are below the given altitude (in m above sea level). The parameters arrivalAltMin/Max
can be used to conduct vertically stratified analyses.
arrivalAltMax = 12000
- blhScale (float): Scaling factor to decide for air parcels to be close enough to the boundary layer to consider moisture increases to evaporation to be likely due to surface evaporation below. A factor of 1.5 will assign all moisture increases within 1.5x the current boundary layer height to the category 'moisture sources boundary-layer', all others to the category 'moisture sources free troposphere'. Default value is 1.5.
blhScale = 1.5
- analyzeVapour (boolean): Parameter allowing to consider all air parcels that precipitate according to the precipitationThreshold
and arrivalRHMin/Max
parameters (0: false), or all parameters irrespective of arrival precipitation (1: true). If set to false, the weighting of source, transport and arrival properties is done using the precipitation estimate calculated from the specific humidity change during arrival. Otherwise, the weight is provided by the arrival specific humidity. When analyzeVapour is set to true, many more particles are considered, and the arrivalRHMin/Max
parameters may need adjustment.
analyzeVapour = 0
- assignToUptake (boolean): Parameter determining the assignment of moisture uptake events to arrival time (0: disabled) or to uptake time step grid (1: enabled). The effect of this parameter will most clearly be visible on stepwise and daily output files. It can be used to relate evaporation events to the concurrent meteorological situation.
assignToUptake = 0
- forwardProjectionMode (integer): Parameter determining how the Lagrangian forward projection of moisture source and moisture transport properties are calculated (1: only consider boundary-layer moisture uptakes, 2: only consider free-troposphere uptakes, 3: consider both uptakes in combination). The default value is 3 (both, boundary layer and free-troposphere uptakes).
forwardProjectionMode = 3
Parameter set Output
The parameters in this category determine which output files should be created.
- stepFile (boolean): write parameters on grid and series files for each time step
stepFile = 1
- dayFile (boolean): write parameters on grid and series files averaged/accumulated for each day
dayFile = 1
- monthFile (boolean): write parameters on grid and series files averaged/accumulated for each month
monthFile = 1
- yearFile (boolean): write parameters on grid and series files averaged/accumulated for each year
yearFile = 1
- allFile (boolean): write parameters on grid and series files averaged/accumulated for all time steps
allFile = 1
- staticFields (boolean): write static fields (land-sea mask and topography) onto grid files
staticFields = 1
- saveTraj (integer): write particle trajectories to traj files at each time step (1) or each month (2). Option 0 disables trajectory output.
saveTraj = 0
- skipTraj (boolean): write every nth trajectory to reduce traj file size (0 or 1:disabled, >=2: stride size)
skipTraj = 0
- saveHistogram (boolean): write histogram for selected parameters to a histogram file (0: disabled, 1:enabled)
saveHistogram = 0
- saveMean (boolean): write means, minimum, maximum and standard deviation to mean file. This is duplicate information with the series files but available for historical reasons. The option will be removed in a forthcoming version (0: disabled, 1:enabled).
saveMean = 0
Parameter set Variables
The parameters in this category allow to include or exclude specific variables from the output files.
- sourcesBoundaryLayer (boolean):
sourcesBoundaryLayer = 1
- sourcesFreeTroposphere (boolean):
sourcesFreeTroposphere = 1
- evaporationMinusPrecipitation (boolean):
evaporationMinusPrecipitation = 1
- moistureTransport (boolean):
moistureTransport = 1
- trajectoryLocations (boolean):
trajectoryLocations = 1
- precipitationEstimate (boolean):
precipitationEstimate = 1
- sourceLongitude (boolean):
sourceLongitude = 1
- sourceLatitude (boolean):
sourceLatitude = 1
- convectionCount (boolean):
convectionCount = 0
- convectionHeight (boolean):
convectionHeight = 0
- landFraction (boolean):
landFraction = 1
- boundaryLayerFraction (boolean):
boundaryLayerFraction = 1
- freeTroposphereFraction (boolean):
freeTroposphereFraction = 1
- combinedFraction (boolean):
combinedFraction = 0
- transportTime (boolean):
transportTime = 1
- sourceSkinTemperature (boolean):
sourceSkinTemperature = 1
- sourceSpecificHumidity (boolean):
sourceSpecificHumidity = 0
- transportDistance (boolean):
transportDistance = 1
- sourceDistance (boolean):
sourceDistance = 1
- source2mTemperature (boolean):
source2mTemperature = 0
- sourceDeuteriumExcess (boolean):
sourceDeuteriumExcess = 1
- transportTemperature (boolean):
transportTemperature = 1
- transportPressure (boolean):
transportPressure = 1
- condensationTemperature (boolean):
condensationTemperature = 1
- arrivalTemperature (boolean):
arrivalTemperature = 1
- arrivalPressure (boolean):
arrivalPressure = 1
- arrival2mTemperature (boolean):
arrival2mTemperature = 0
- arrivalSkinTemperature (boolean):
arrivalSkinTemperature = 1
Parameter set Flexpart
- inputFormat (integer): file format of FLEXPART particle position output files. 0: regional long output format, 1: global analysis data output format, 2: regional short format, 3: global reanalysis data short format
inputFormat = 3
- maxPart (integer): number of particles contained in a single FLEXPART partposit or shortposit file
maxPart = 5000000
- partMass (float): atmospheric mass represented by each particle in kilogramms. Parameter is written out by specific version of FLEXPART to create WaterSip output data.
partMass = 1.01943e+12
- partStride (integer): number of particles to skip during processing to speed up calculations (1: use every particle, >=2: use every 2nd particle, etc).
partStride = 10
- allowReenter (boolean): needs to be enabled for global simulations, and disabled for regional domain-filling runs to avoid double accounting of air parcels (0: disabled, 1: enabled).
allowReenter = 1
Full example for a FLEXPART run input file:
[Case] caseName = global_201002_final_relativex inputDir = /Volumes/Data_B/flexpart/global/shortposit_%s outputDir=/Volumes/Data_B/watersip/global_201002_V3/ startDate = 20100228-180000 endDate = 20100211-000000 timeStep = 6 sectorizeRegion = 0 filterBoxFile = /home/hso039/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste filterIndex = -1 orographyFile = "/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/etopo5.nc" lsmFile = "/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/ERA_sea_mask_inv.nc" maskFile = " " useMask = 0 trajPoints = 41 minTrajPoints = 0 ompThreads = 1 showStats = 0 [Grids] arrivalGridMinLon = -180 arrivalGridMaxLon = 180 arrivalGridMinLat = -90 arrivalGridMaxLat = 90 arrivalGridDx = 1 arrivalGridDy = 1 arrivalGridRadius = 200 sourceGridMinLon = -180 sourceGridMaxLon = 180 sourceGridMinLat = -90 sourceGridMaxLat = 90 sourceGridDx = 1 sourceGridDy = 1 sourceGridRadius = 200 griddingType = 2 [Diagnostics] uptakeThreshold = 0.05 precipThreshold = 0.05 blhScale = 1.5 arrivalPrecipMin = 0.05 arrivalPrecipMax = 1.0 arrivalRHMin = 80 arrivalRHMax = 110 arrivalOroMin = -100 arrivalOroMax = 12000 arrivalAltMin = -100 arrivalAltMax = 12000 analyzeVapour = 0 assignToUptake = 0 forwardProjectionMode = 3 relativeThreshold = 1 [Output] stepFile = 1 dayFile = 1 monthFile = 1 yearFile = 1 allFile = 1 staticFields = 1 saveTraj = 0 skipTraj = 0 saveHistogram = 0 saveMean = 0 [Variables] sourcesBoundaryLayer = 1 sourcesFreeTroposphere = 1 evaporationMinusPrecipitation = 1 moistureTransport = 1 trajectoryLocations = 1 precipitationEstimate = 1 sourceLongitude = 1 sourceLatitude = 1 convectionCount = 0 convectionHeight = 0 landFraction = 1 boundaryLayerFraction = 1 freeTroposphereFraction = 1 combinedFraction = 0 transportTime = 1 sourceSkinTemperature = 1 sourceSpecificHumidity = 0 transportDistance = 1 sourceDistance = 1 source2mTemperature = 0 sourceDeuteriumExcess = 1 transportTemperature = 1 transportPressure = 1 condensationTemperature = 1 arrivalTemperature = 1 arrivalPressure = 1 arrival2mTemperature = 0 arrivalSkinTemperature = 1 [Flexpart] inputFormat = 3 maxPart = 5000000 partMass = 1.01943e+12 partStride = 10 allowReenter = 1