<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://gfi.wiki.uib.no/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hso039</id>
	<title>gfi - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://gfi.wiki.uib.no/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hso039"/>
	<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/Special:Contributions/Hso039"/>
	<updated>2026-11-09T19:54:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=The_GFI_computing_system&amp;diff=2026</id>
		<title>The GFI computing system</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=The_GFI_computing_system&amp;diff=2026"/>
		<updated>2026-03-23T10:35:47Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Geophysical Institute uses a department compute server cluster  named &amp;quot;cyclone&amp;quot;. Cyclone consists of three separate compute nodes organized in a cluster which access the same centralized network storage. Two of the nodes are for regular computational tasks, and one is set up with a GPU to enable use for machine learning (ML) applications. The new cyclones replace the older system &#039;&amp;quot;cyclone.hpc.uib.no&amp;quot;, acquired in Summer 2018, which at the time of writing this documentation is still accessible as well (14.03.2026).&lt;br /&gt;
&lt;br /&gt;
The server cluster is maintained by  [https://www.uib.no/en/brita UiB ITA] and compute resources are located in  [https://nrec.no NREC] as virtual servers, currently running Linux, Rocky 8&lt;br /&gt;
&lt;br /&gt;
All users of the cyclones should subscribe to the mailing list [linux@gfi.uib.no] to receive updates about maintenance downtime etc. &lt;br /&gt;
&lt;br /&gt;
Please notify the UiB support [https://hjelp.uib.no https://hjelp.uib.no] in any case of problems or questions. And please be accurate to mark your support request with some ref. to  &amp;quot;Group of scientific computing&amp;quot; - and with all necessary details for UiB support to decode your issue description.&lt;br /&gt;
&lt;br /&gt;
In the following, you will find:&lt;br /&gt;
&lt;br /&gt;
==Users and intended use==&lt;br /&gt;
&lt;br /&gt;
The intended users at GFI for the cyclones are:&lt;br /&gt;
&lt;br /&gt;
* MSc students for course and thesis work.&lt;br /&gt;
&lt;br /&gt;
* PhD students and PostDocs for scientific work.&lt;br /&gt;
&lt;br /&gt;
* all other researchers and technical staff for data analysis, data storage, and routine computations.&lt;br /&gt;
The cyclone compute system has been set up to enable users to perform smaller-scale data analysis work in a low-threshold environment. This means that there is no queue system for resource allocation. Users can use the system interactively, running applications with a GUI, or via Linux shell etc.&lt;br /&gt;
&lt;br /&gt;
All users share the same resources, without having to deal with a queue system. This requires users to excert discipline when using resources to prevent system instability due to too heavy load.&lt;br /&gt;
&lt;br /&gt;
Common use cases include data analysis connected to the shared data files in the storage environment, model simulations lasting up to several days, and tests of larger-scale computations before taking those to the national computation infrastructures NRIS.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Users should be able to use the system in interactive use (click and point, typing) and in batch use (using shell scripts). Typical tasks are data analysis, plotting. GFI will also run routine  data processing of observations and forecasts on this system.&lt;br /&gt;
&lt;br /&gt;
Therefore, we required the system to be or have&lt;br /&gt;
&lt;br /&gt;
* low threshold access (easy to use)&lt;br /&gt;
&lt;br /&gt;
* interactive use&lt;br /&gt;
&lt;br /&gt;
* safe usage (against unintentional overuse)&lt;br /&gt;
&lt;br /&gt;
* optimized for serial I/O (as is typical for post-processing tasks)&lt;br /&gt;
&lt;br /&gt;
* single-node parallelization jobs&lt;br /&gt;
&lt;br /&gt;
* lifetime of 5-7 years&lt;br /&gt;
&lt;br /&gt;
== System characteristics and good user practice ==&lt;br /&gt;
&lt;br /&gt;
The system has been created as a low threshold, multi-user system. Resources are limited, and shared among all users. This implies that users need to have an overview over which resources they are using.&lt;br /&gt;
&lt;br /&gt;
Users are expected to read and relate to the &amp;quot;MOTD&amp;quot; message at ssh-login. This monitors computer load and memory consumption. Please follow server load during login period - top/htop and free (&#039;free -h -t&#039;) utilities. Do not initiate another heavy compute process on multiple cores if the compute node already runs heavy on load or memory consumption, then rather check the alternate server.&lt;br /&gt;
&lt;br /&gt;
The system characteristics, and the good user practice that follows along with these, are as follows:&lt;br /&gt;
&lt;br /&gt;
* There is (currently) no queue system on any of the &amp;quot;cyclones&amp;quot;. Computational tasks are started immediately.&lt;br /&gt;
&lt;br /&gt;
* Computational tasks will be terminated if users log out. To keep jobs running while logged out, start jobs in the background using the  linux commands &#039;tmux&#039;, &#039;screen&#039; or &#039;nohup&#039;.&lt;br /&gt;
&lt;br /&gt;
* There is a resource limitation per user. Each session can use up to 8 out of the 64 CPU cores. In addition, each session can allocate up to 120 GB of memory. This is meant to prevent individual users from accidentally bringing down the system.&lt;br /&gt;
&lt;br /&gt;
* Software packages are activated using &amp;lt;nowiki&amp;gt;&#039;&#039;&#039;&amp;lt;/nowiki&amp;gt;module load&amp;lt;nowiki&amp;gt;&#039;&#039;&#039;&amp;lt;/nowiki&amp;gt; command. Use &#039;module spider &amp;lt;software&amp;gt;&#039; to find available software. The available software stack is identical on all cyclones.&lt;br /&gt;
&lt;br /&gt;
* Users have access to a home directory, a work storage, and long-term project and shared resource storage. The same storage environment is connected to all of the cyclones. Use the work storage for all non-permanent input/output. Files on the work environment are deleted after 60 days. Use NIRD for long-term storage of larger output.&lt;br /&gt;
&lt;br /&gt;
* The system is maintained by the experts from UiB&#039;s HPC group. There is bi-weekly maintenance planned, typically on Wednesdays. Sometimes this will involve a reboot of the system. Plan longer jobs so that they don&#039;t get interrupted or interfere with maintenance scheduling.&lt;br /&gt;
* Subscribe to the mailing list [linux@gfi.uib.no](&amp;lt;nowiki&amp;gt;mailto:linux@gfi.uib.no&amp;lt;/nowiki&amp;gt;) to receive updates about problems and maintenance&lt;br /&gt;
&lt;br /&gt;
== Storage environment ==&lt;br /&gt;
&lt;br /&gt;
GFI&amp;amp;SKD have a disposal of approx 450TB network storage quotas from UiB ITA(May 2024). This storage is all organized via ITA standard NetApp solution and distributed towards cyclones servers, GFI&amp;amp;SKD Windows clients, MacOS clients and Linux clients. The storage is also available for GFI&amp;amp;SKD users connecting from UiB-vpn.&lt;br /&gt;
&lt;br /&gt;
*The GFI&amp;amp;SKD storage is organized into larger shared areas for model data, more limited group and project areas, areas for individual users and common areas for short time storage. The different storage areas are in general maintained via ITA backup procedures and governed by group or individual storage quotas. &lt;br /&gt;
&lt;br /&gt;
* GFI&amp;amp;SKD storage is organized in two main folders:&lt;br /&gt;
    Linux: /Data/gfi   - Win11/Mac: \\klient.uib.no\felles\matnat\gfi    and&lt;br /&gt;
&lt;br /&gt;
    Linux: /Data/skd   - Win11/Mac: \\klient.uib.no\felles\matnat\skd&lt;br /&gt;
&lt;br /&gt;
== Computational resources ==&lt;br /&gt;
&lt;br /&gt;
The compute system is separated into three separate nodes. Two nodes (cyclone1 and cyclone2) are dedicated to computing tasks without GPU use. A third node is dedicated for GPU applications (cyclone 3). In detail, the specifications of the 3 compute nodes are:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cyclone 1 - CPU applications (cyclone1.gfi.uib.no):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
    AMD EPYC Processor, 64 physical cores and 512 GB memory per node, 2.3 GHz - no GPU&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cyclone 2 - CPU applications (cyclone2.gfi.uib.no):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
    AMD EPYC Processor, 64 physical cores and 512 GB memory per node, 2.3 GHz - no GPU&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cyclone 3 - GPU applications (cyclone3.gfi.uib.no):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
    Intel CPU, 16 physical cores, 128 GB memory&lt;br /&gt;
&lt;br /&gt;
    1 NVIDIA GPU, L40S-24Q, 24 GB GPU memory&lt;br /&gt;
&lt;br /&gt;
== GPU acceleration ==&lt;br /&gt;
&lt;br /&gt;
One of the cyclones (cyclone3) is equipped with an advanced Graphics Processing Units (GPUs) of type NVIDIA L40S-24Q, and is reserved for GPU application usage only. The GPU is shared between all users on the system. &lt;br /&gt;
&lt;br /&gt;
The GPU usage can be monitored using the command: &amp;quot;nvidia-smi&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Programming on this GPU is done using CUDA.&lt;br /&gt;
&lt;br /&gt;
Modules are available for programming with CUDA.&lt;br /&gt;
&lt;br /&gt;
Python users can load module PyTorch&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=The_GFI_computing_system&amp;diff=2025</id>
		<title>The GFI computing system</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=The_GFI_computing_system&amp;diff=2025"/>
		<updated>2026-03-23T10:32:57Z</updated>

		<summary type="html">&lt;p&gt;Hso039: spelling errors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Geophysical Institute uses a department compute server cluster  named &amp;quot;cyclone&amp;quot;. Cyclone consists of three separate compute nodes organized in a cluster which access the same centralized network storage. Two of the nodes are for regular computational tasks, and one is set up with a GPU to enable use for machine learning (ML) applications. The new cyclones replace the older system &#039;&amp;quot;cyclone.hpc.uib.no&amp;quot;, acquired in Summer 2018, which at the time of writing this documentation is still accessible as well (14.03.2026).&lt;br /&gt;
&lt;br /&gt;
The server cluster is maintained by  [https://www.uib.no/en/brita UiB ITA] and compute resources are located in  [https://nrec.no NREC] as virtual servers, currently running Linux, Rocky 8&lt;br /&gt;
&lt;br /&gt;
All users of the cyclones should subscribe to the mailing list [linux@gfi.uib.no] to receive updates about maintenance downtime etc. &lt;br /&gt;
&lt;br /&gt;
Please notify the UiB support [https://hjelp.uib.no https://hjelp.uib.no] in any case of problems or questions. And please be accurate to mark your support request with some ref. to  &amp;quot;Group of scientific computing&amp;quot; - and with all necessary details for UiB support to decode your issue description.&lt;br /&gt;
&lt;br /&gt;
In the following, you will find:&lt;br /&gt;
&lt;br /&gt;
==Users and intended use==&lt;br /&gt;
&lt;br /&gt;
The intended users at GFI for the cyclones are:&lt;br /&gt;
&lt;br /&gt;
* MSc students for course and thesis work.&lt;br /&gt;
&lt;br /&gt;
* PhD students and PostDocs for scientific work.&lt;br /&gt;
&lt;br /&gt;
* all other researchers and technical staff for data analysis, data storage, and routine computations.&lt;br /&gt;
The cyclone compute system has been set up to enable users to perform smaller-scale data analysis work in a low-threshold environment. This means that there is now queue system for resource allocation. Users can use the system interactively, running applications with a GUI, or via Linux shell etc.&lt;br /&gt;
&lt;br /&gt;
All users share the same resources, without having to deal with a queue system. This requires users to excert discipline when using resources to prevent system instability due to too heavy load.&lt;br /&gt;
&lt;br /&gt;
Common use cases include data analysis connected to the shared data files in the storage environment, model simulations lasting up to several days, and tests of larger-scale computations before taking those to the national computation infrastructures NRIS.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
Users should be able to use the system in interactive use (click and point, typing) and in batch use (using shell scripts). Typical tasks are data analysis, plotting. GFI will also run routine  data processing of observations and forecasts on this system.&lt;br /&gt;
&lt;br /&gt;
Therefore, we required the system to be or have&lt;br /&gt;
&lt;br /&gt;
* low threshold access (easy to use)&lt;br /&gt;
&lt;br /&gt;
* interactive use&lt;br /&gt;
&lt;br /&gt;
* safe usage (against unintentional overuse)&lt;br /&gt;
&lt;br /&gt;
* optimized for serial I/O (as is typical for post-processing tasks)&lt;br /&gt;
&lt;br /&gt;
* single-node parallelization jobs&lt;br /&gt;
&lt;br /&gt;
* lifetime of 5-7 years&lt;br /&gt;
&lt;br /&gt;
== System characteristics and good user practice ==&lt;br /&gt;
&lt;br /&gt;
The system has been created as a low threshold, multi-user system. Resources are limited, and shared among all users. This implies that users need to have an overview over which resources they are using.&lt;br /&gt;
&lt;br /&gt;
Users are expected to read and relate to the &amp;quot;MOTD&amp;quot; message at ssh-login. This monitor computer load and memory consumption. Please follow server load during login period - top/htop and free (&#039;free -h -t&#039;) utilities. Do not initiate another heavy compute process on multiple cores if the compute node already runs heavy on load or memory consumption, then rather check the alternate server.&lt;br /&gt;
&lt;br /&gt;
The system characteristics, and the good user practice that follows along with these, are as follows:&lt;br /&gt;
&lt;br /&gt;
* There is (currently) no queue system on any of the &amp;quot;cyclones&amp;quot;. Computational tasks are started immediately.&lt;br /&gt;
&lt;br /&gt;
* Computational tasks will be terminated if users log out. To keep jobs running while logged out, start jobs in the background using the  linux commands &#039;tmux&#039;, &#039;screen&#039; or &#039;nohup&#039;.&lt;br /&gt;
&lt;br /&gt;
* There is resource limitation per user. Each session can use up to 8 out of the 64 CPU cores. In addition, each session can allocate up to 120 GB of memory. This is meant to prevent individual users from accidentally bringing down the system.&lt;br /&gt;
&lt;br /&gt;
* Software packages are activated using &amp;lt;nowiki&amp;gt;&#039;&#039;&#039;&amp;lt;/nowiki&amp;gt;module load&amp;lt;nowiki&amp;gt;&#039;&#039;&#039;&amp;lt;/nowiki&amp;gt; command. Use &#039;module spider &amp;lt;software&amp;gt;&#039; to find available software. The available software stack is identical on all cyclones.&lt;br /&gt;
&lt;br /&gt;
* Users have access to a home directory, a work storage, and long-term project and shared resource storage. The same storage environments is connected to all of the cyclones. Use the work storage for all non-permanent input/output. Files on the work environment are deleted after 60 days. Use NIRD for long-term storage of larger output.&lt;br /&gt;
&lt;br /&gt;
* The system is maintained by the experts from UiB&#039;s HPC group. There is bi-weekly maintenance planned, typically on Wednesdays. Sometimes this will involve a reboot of the system. Plan longer jobs that they don&#039;t get interrupted or interfere with maintenance scheduling.&lt;br /&gt;
* Subscribe to the mailing list [linux@gfi.uib.no](&amp;lt;nowiki&amp;gt;mailto:linux@gfi.uib.no&amp;lt;/nowiki&amp;gt;) to receive updates about problems and maintenance&lt;br /&gt;
&lt;br /&gt;
== Storage environment ==&lt;br /&gt;
&lt;br /&gt;
GFI&amp;amp;SKD have a disposal of approx 450TB network storage quotas from UiB ITA(May 2024). This storage is all organized via ITA standard NetApp solution and distributed towards cyclones servers, GFI&amp;amp;SKD Windows clients, Macos clients and Linux clients. The storage is also available for GFI&amp;amp;SKD users connecting from UiB-vpn.&lt;br /&gt;
&lt;br /&gt;
*The GFI&amp;amp;SKD storage is organized into larger shared areas for model data, more limited group and project areas, areas for individual users and common areas for short time storage. The different storage areas are in general maintained via ITA backup procedures and governed by group or individual storage quotas. &lt;br /&gt;
&lt;br /&gt;
* GFI&amp;amp;SKD storage is organized in two main folders:&lt;br /&gt;
    Linux: /Data/gfi   - Win11/Mac: \\klient.uib.no\felles\matnat\gfi    and&lt;br /&gt;
&lt;br /&gt;
    Linux: /Data/skd   - Win11/Mac: \\klient.uib.no\felles\matnat\skd&lt;br /&gt;
&lt;br /&gt;
== Computational resources ==&lt;br /&gt;
&lt;br /&gt;
The compute system is separated into three separate nodes. Two nodes (cyclone1 and cyclone2) are dedicated to computing tasks without GPU use. A third node is dedicated for GPU applications (cyclone 3). In detail, the specifications of the 3 compute nodes are:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cyclone 1 - CPU applications (cyclone1.gfi.uib.no):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
    AMD EPYC Processor, 64 physical cores and 512 GB memory per node, 2.3 GHz - no GPU&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cyclone 2 - CPU applications (cyclone2.gfi.uib.no):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
    AMD EPYC Processor, 64 physical cores and 512 GB memory per node, 2.3 GHz - no GPU&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cyclone 3 - GPU applications (cyclone3.gfi.uib.no):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
    Intel CPU, 16 physical cores, 128 GB memory&lt;br /&gt;
&lt;br /&gt;
    1 NVIDIA GPU, L40S-24Q, 24 GB GPU memory&lt;br /&gt;
&lt;br /&gt;
== GPU acceleration ==&lt;br /&gt;
&lt;br /&gt;
One of the cyclones (cyclone3) is equipped with an advanced Graphics Processing Units (GPUs) of type NVIDIA L40S-24Q, and is reserved for GPU application usage only. The GPU is shared between all users on the system. &lt;br /&gt;
&lt;br /&gt;
The GPU usage can be monitored using the command: &amp;quot;nvidia-smi&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Programming on this GPU is done using CUDA.&lt;br /&gt;
&lt;br /&gt;
Modules are available for programming with CUDA.&lt;br /&gt;
&lt;br /&gt;
Python users can load module PyTorch&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Using_cyclone&amp;diff=1832</id>
		<title>Using cyclone</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Using_cyclone&amp;diff=1832"/>
		<updated>2024-11-06T10:50:01Z</updated>

		<summary type="html">&lt;p&gt;Hso039: updates to new storage locations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Connection and first steps ==&lt;br /&gt;
&lt;br /&gt;
Use ssh to connect&lt;br /&gt;
&amp;lt;pre&amp;gt;ssh -Y &amp;lt;username&amp;gt;@cyclone.hpc.uib.no&amp;lt;/pre&amp;gt;&lt;br /&gt;
or just simply:&lt;br /&gt;
&amp;lt;pre&amp;gt;ssh -Y cyclone.hpc.uib.no&amp;lt;/pre&amp;gt;&lt;br /&gt;
if you&#039;re connecting from a computer where you are logged in under the same name. When you are connecting for the first time, you will be asked to verify a signature. Reply &amp;quot;yes&amp;quot; to this question.&lt;br /&gt;
&lt;br /&gt;
=== Home directories ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cyclone.hpc.uib.no&amp;lt;/code&amp;gt; shares home directories with the new hexagon cluster. These home directories are separate from your standard UiB home directory. The contents of your home directories will not be synced, so you will manually need to transfer your scripts to the new system.&lt;br /&gt;
&lt;br /&gt;
Please be aware that your local home directory is not expected to exceed 30GB at any time - even in periods when sys.adms. do not practice quotas. If you need to store larger amount of data, please plan for using the GFI&amp;amp;SKD storage - also decribed in this wiki.&lt;br /&gt;
&lt;br /&gt;
To monitor your home directory size, you can use these commands from cyclone command shell:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;du -sh ~/  &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or to include more details on both dot files/directories and non-hidden home directory subfolders:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd; du -sh .[^.]* *&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Monitoring your homefolder quota, you can run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lfs quota -hp $(id -u) /shared/ &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or just&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lfs quota -hp $(id -u) $HOME &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How to access software ===&lt;br /&gt;
&lt;br /&gt;
In contrast to the old skd-cyclone, most scientific software is only available through software modules. Modules need to be loaded manually before the respective software can be used. We use software modules, because they provide are a clean and handy way to offer conflicting software or software versions: Instead of updating software and potentially breaking user scripts and programs new software is then made available in parallel to those that require it.&lt;br /&gt;
&lt;br /&gt;
=== Start-up scripts ===&lt;br /&gt;
&lt;br /&gt;
It might be handy to automatically load modules for software that you use frequently every time you login to cyclone. To accomplish that for bash, there are two relevant files, &amp;lt;code&amp;gt;$HOME/.bashrc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$HOME/.bash_profile&amp;lt;/code&amp;gt; . &amp;lt;code&amp;gt;.bash_profile&amp;lt;/code&amp;gt; should contain things that need to be defined at login time only, like &amp;lt;code&amp;gt;PATH&amp;lt;/code&amp;gt; and other environment variables, startup programs, etc. You just need things once, not in every shell you open. In most cases, you also need the things from &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; in your login shell. That&#039;s why &amp;lt;code&amp;gt;.bash_profile&amp;lt;/code&amp;gt; sources &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; as well, but .bashrc doesn&#039;t usually source &amp;lt;code&amp;gt;.bash_profile&amp;lt;/code&amp;gt;. In contrast, &amp;lt;code&amp;gt;.bashrc&amp;lt;/code&amp;gt; should typically contain things you want to set in every shell you open, like aliases, functions, etc. These are per shell session items that are not inherited from environment ([https://unix.stackexchange.com/questions/346336/why-have-both-bash-profile-and-bashrc source and detailed explanation]).&lt;br /&gt;
&lt;br /&gt;
==== An example &amp;lt;code&amp;gt;.bash_profile&amp;lt;/code&amp;gt; for inspiration ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;module load cdo/1.6.9&lt;br /&gt;
module load ncarg/6.3.0-login&lt;br /&gt;
&lt;br /&gt;
alias rm=&amp;quot;rm -i&amp;quot;&lt;br /&gt;
alias cp=&amp;quot;cp -i&amp;quot;&lt;br /&gt;
alias erai=&amp;quot;cd /Data/skd/share/Reanalysis/ERA_INTERIM/6HOURLY/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if [ -f ~/.bashrc ]; then&lt;br /&gt;
   . ~/.bashrc&lt;br /&gt;
fi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== An example &amp;lt;code&amp;gt;.bash_profile&amp;lt;/code&amp;gt; for inspiration ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;alias rm=&amp;quot;rm -i&amp;quot;&lt;br /&gt;
alias cp=&amp;quot;cp -i&amp;quot;&lt;br /&gt;
alias erai=&amp;quot;cd /Data/skd/share/Reanalysis/ERA_INTERIM/6HOURLY/&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Available software ==&lt;br /&gt;
&lt;br /&gt;
Below is a list of frequently used software and which module to load on the new cyclone. Relevant module names are printed like for &amp;lt;code&amp;gt;matlab/2015b&amp;lt;/code&amp;gt;. Modules can be loaded by &amp;lt;code&amp;gt;module load &amp;lt;module name&amp;gt;&amp;lt;/code&amp;gt;, and unloaded &amp;lt;code&amp;gt;module unload &amp;lt;module name&amp;gt;&amp;lt;/code&amp;gt;. [[Using modules on cyclone|More details on the module system]].&lt;br /&gt;
&lt;br /&gt;
To list all available modules, use the command&lt;br /&gt;
&amp;lt;pre&amp;gt;module avail&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hexagon-specific modules are now no longer listed and available on cyclone. All packages listed with this command should work, so please report to &amp;lt;code&amp;gt;support@hpc.uib.no&amp;lt;/code&amp;gt; if they do not.&lt;br /&gt;
&lt;br /&gt;
=== Data analysis and plotting ===&lt;br /&gt;
&lt;br /&gt;
* CDO&lt;br /&gt;
*: &amp;lt;code&amp;gt;CDO&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CDO/1.9.5-foss-2018b&amp;lt;/code&amp;gt;&lt;br /&gt;
* Dynlib&lt;br /&gt;
*: See temporary solution for python. Requires in addition &amp;lt;code&amp;gt;OpenBLAS/0.3.1-GCC-7.3.0-2.30&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaLAPACK/2.0.2-gompi-2018b-OpenBLAS-0.3.1&amp;lt;/code&amp;gt;.&lt;br /&gt;
* ghostview&lt;br /&gt;
*: &#039;&#039;&amp;lt;no module required&amp;gt;&#039;&#039;&lt;br /&gt;
* grads&lt;br /&gt;
*: &#039;&#039;&amp;lt;no module required&amp;gt;&#039;&#039;&lt;br /&gt;
* Matlab&lt;br /&gt;
*: &amp;lt;code&amp;gt;Matlab&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Matlab/2018a&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Matlab/2012a&amp;lt;/code&amp;gt;&lt;br /&gt;
* ncdump and other netCDF utilities&lt;br /&gt;
*: &amp;lt;code&amp;gt;netCDF&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;netCDF/4.6.1-foss-2018b&amp;lt;/code&amp;gt;&lt;br /&gt;
* NCL&lt;br /&gt;
*: &amp;lt;code&amp;gt;NCL&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;NCL/6.5.0&amp;lt;/code&amp;gt;&lt;br /&gt;
* nco&lt;br /&gt;
*: &amp;lt;code&amp;gt;NCO&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;NCO/4.7.4-foss-2018b&amp;lt;/code&amp;gt;&lt;br /&gt;
* ncview&lt;br /&gt;
*: &amp;lt;code&amp;gt;ncview&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ncview/2.1.7-foss-2018b&amp;lt;/code&amp;gt;. Load only when needed! The package is currently known to break some GUI programs like gedit and gvim. &lt;br /&gt;
* python, plus selection of scientific packages&lt;br /&gt;
*: &#039;&#039;First&#039;&#039; choose and load the python module for the python version that you want to use, either &amp;lt;code&amp;gt;Python/2.7.15-foss-2018b&amp;lt;/code&amp;gt; for python 2.7.15, or &amp;lt;code&amp;gt;Python/3.7.0-foss-2018b&amp;lt;/code&amp;gt; for python 3.7.0.&lt;br /&gt;
*: &#039;&#039;Then&#039;&#039;, as a temporary solution, many scientific python packages are installed in the following virtual environments:&lt;br /&gt;
*: &amp;lt;code&amp;gt;source /Data/gfi/users/local/share/virtualenv/dynpie2/bin/activate&amp;lt;/code&amp;gt; for python 2.7.15. &lt;br /&gt;
*: &amp;lt;code&amp;gt;source /Data/gfi/users/local/share/virtualenv/dynpie3-2021a/bin/activate&amp;lt;/code&amp;gt; for python 3.7.0.&lt;br /&gt;
*: For the pygrib module, &amp;lt;code&amp;gt;ecCodes/2.7.3-foss-2018b&amp;lt;/code&amp;gt; is required in addition.&lt;br /&gt;
* R&lt;br /&gt;
*: &#039;&#039;&amp;lt;no module required&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Text editors ===&lt;br /&gt;
&lt;br /&gt;
* emacs&lt;br /&gt;
*: Is installed globally, but requires &amp;lt;code&amp;gt;util-linux/2.32-GCCcore-7.3.0&amp;lt;/code&amp;gt; to work.&lt;br /&gt;
* gedit&lt;br /&gt;
*: &#039;&#039;&amp;lt;no module required&amp;gt;&#039;&#039;&lt;br /&gt;
* gvim&lt;br /&gt;
*: &#039;&#039;&amp;lt;no module required&amp;gt;&#039;&#039;&lt;br /&gt;
* vi(m)&lt;br /&gt;
*: &#039;&#039;&amp;lt;no module required&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Compilers and libraries ===&lt;br /&gt;
&lt;br /&gt;
* blas&lt;br /&gt;
*: &amp;lt;code&amp;gt;OpenBLAS/0.3.1-GCC-7.3.0-2.30&amp;lt;/code&amp;gt;. &#039;&#039;&#039;Note&#039;&#039;&#039;: The library is called &amp;lt;code&amp;gt;libopenblas&amp;lt;/code&amp;gt;, so you&#039;ll need to compile with &amp;lt;code&amp;gt;-lopenblas&amp;lt;/code&amp;gt;. &lt;br /&gt;
* eccodes (replacement for grib_api)&lt;br /&gt;
*: &amp;lt;code&amp;gt;ecCodes/2.7.3-foss-2018b&amp;lt;/code&amp;gt;&lt;br /&gt;
* gcc, gfortran&lt;br /&gt;
*: &amp;lt;code&amp;gt;GCC&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;GCC/7.3.0-2.30&amp;lt;/code&amp;gt;&lt;br /&gt;
* grib_api&lt;br /&gt;
*: &amp;lt;code&amp;gt;grib_api/1.24.0-foss-2018b&amp;lt;/code&amp;gt;&lt;br /&gt;
* HDF5 libraries&lt;br /&gt;
*: &amp;lt;code&amp;gt;HDF5/1.10.2-foss-2018b&amp;lt;/code&amp;gt;&lt;br /&gt;
* lapack&lt;br /&gt;
*: &amp;lt;code&amp;gt;ScaLAPACK/2.0.2-gompi-2018b-OpenBLAS-0.3.1&amp;lt;/code&amp;gt;. &#039;&#039;&#039;Note&#039;&#039;&#039;: The library is called &amp;lt;code&amp;gt;libscalapack&amp;lt;/code&amp;gt;, so you&#039;ll need to compile with &amp;lt;code&amp;gt;-lscalapack&amp;lt;/code&amp;gt;. &lt;br /&gt;
* MPI&lt;br /&gt;
*: &amp;lt;code&amp;gt;OpenMPI/3.1.1-GCC-7.3.0-2.30&amp;lt;/code&amp;gt;&lt;br /&gt;
* netcdf&lt;br /&gt;
*: For C-libaries: &amp;lt;code&amp;gt;netCDF/4.6.1-foss-2018b&amp;lt;/code&amp;gt;, &lt;br /&gt;
*: For Fortran-libraries &amp;lt;code&amp;gt;netCDF-Fortran/4.4.4-foss-2018b&amp;lt;/code&amp;gt;, compile with option &amp;lt;code&amp;gt;-I/shared/apps/netCDF-Fortran/4.4.4-foss-2018b/include&amp;lt;/code&amp;gt;&lt;br /&gt;
* proj&lt;br /&gt;
*: &amp;lt;code&amp;gt;PROJ/5.0.0-foss-2018b&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Jupyter &amp;amp; Jupyterhub ===&lt;br /&gt;
&lt;br /&gt;
Here is a step by step guide to setup and use Jupyter based on the &amp;lt;code&amp;gt;dynpie3&amp;lt;/code&amp;gt; environment.&lt;br /&gt;
&lt;br /&gt;
[[File:Get started cyclone.pdf|thumb|Step by step guide for Jupyter on cyclone]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Accessing the data from your own machines ==&lt;br /&gt;
&lt;br /&gt;
Note: From your personal machines you will need to be connected to the UiB VPN to be able to mount the following network drives. &lt;br /&gt;
&lt;br /&gt;
On MacOS you can mount folders through &amp;lt;code&amp;gt;Finder &amp;gt; Go &amp;gt; Connect to Server ...&amp;lt;/code&amp;gt;. In the dialogue window that pops up, enter&lt;br /&gt;
&amp;lt;pre&amp;gt;smb://uib.no;&amp;lt;user name&amp;gt;@klient.uib.no/FELLES/MATNAT/GFI&amp;lt;/pre&amp;gt;&lt;br /&gt;
as the &#039;&#039;&#039;Server Address&#039;&#039;&#039;. You might want to replace &amp;lt;code&amp;gt;gfi&amp;lt;/code&amp;gt; by &amp;lt;code&amp;gt;skd&amp;lt;/code&amp;gt; to access the skd disks if that is your primary affiliation.&lt;br /&gt;
On Ubuntu this is very similar: &amp;lt;code&amp;gt;Files &amp;gt; Go &amp;gt; Enter Location ...&amp;lt;/code&amp;gt;. Enter the address: &amp;lt;pre&amp;gt;smb://uib.no;&amp;lt;user name&amp;gt;@klient.uib.no/FELLES/MATNAT/GFI&amp;lt;/pre&amp;gt; and enter your password in the next pop-up window, while keeping &amp;quot;UiB&amp;quot; in the &amp;quot;Domain&amp;quot; field.&lt;br /&gt;
Alternatively you can mount the network drive with sshfs to a dedicated directory using &amp;lt;code&amp;gt;sshfs&amp;lt;/code&amp;gt; (install with &amp;lt;code&amp;gt;sudo apt install sshfs&amp;lt;/code&amp;gt;):&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/cyclone_gfi&lt;br /&gt;
From UiB network: sshfs -o follow_symlinks &amp;lt;user name&amp;gt;@cyclone.hpc.uib.no:/gfi/ ~/cyclone_gfi/&lt;br /&gt;
From ext. networks: sshfs -o follow_symlinks &amp;lt;user name&amp;gt;@sync.uib.no:/gfi/ ~/cyclone_gfi/&lt;br /&gt;
Unmount with: fusermount -u ~/cyclone_gfi&amp;lt;/pre&amp;gt;&lt;br /&gt;
On Windows you can mount by navigating to &amp;lt;code&amp;gt;File Explorer &amp;gt; Map network drive&amp;lt;/code&amp;gt; and enter &amp;lt;code&amp;gt;\\leo.hpc.uib.no\gfi&amp;lt;/code&amp;gt;. Make sure to enable &amp;lt;code&amp;gt;Connect using different credentials&amp;lt;/code&amp;gt; and fill in &amp;lt;code&amp;gt;&amp;lt;user name&amp;gt;@uib.no&amp;lt;/code&amp;gt; and your PW.&lt;br /&gt;
&lt;br /&gt;
== Displaying GUIs on your screen ==&lt;br /&gt;
&lt;br /&gt;
The ssh-login command at the top of this wiki enables trusted X11 forwarding (the &amp;lt;code&amp;gt;-Y&amp;lt;/code&amp;gt; option), which allows you to display Graphical User Interfaces (GUIs) on your screen. This way you may be able to run software on a high performance system in a more userfriendly way than by just operating via the terminal. To make this work properly you may have to edit the ssh configuration file (&amp;lt;code&amp;gt;/etc/ssh/ssh_config&amp;lt;/code&amp;gt; on linux systems) by adding or uncommenting the following two lines: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;X11Forwarding yes&lt;br /&gt;
ForwardX11Trusted yes&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editing this file requires superuser priviliges so you may have to ask the IT department for support. For Mac the solution should be pretty similar, windows requires additional software like PuTTY (for establishing an ssh-connection) and an XServer (e.g. VcXsrv).&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1578</id>
		<title>WaterSip</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1578"/>
		<updated>2022-03-07T11:10:29Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===About WaterSip===&lt;br /&gt;
&lt;br /&gt;
WaterSip is a diagnostic software tool that identifies source, transport and arrival properties of atmospheric water vapour based on airmass backward trajectories. As a prerequisite, the backward trajectories for the analysis are to be obtained from a trajectory calculation tool, such as FLEXPART [[http://www.flexpart.eu]] or Lagranto [[http://www.lagranto.iac.ethz.ch]]. Moisture sources are then identified from changes in specific humidity interpolated to the air parcel trajectory per time step. The changes in specific humidity at each time step are set in relation with the current humidity of the air parcel. This allows to estimate the quantitative contribution of moisture to the air parcel at a specific location, a so-called moisture accounting. WaterSip identifies and aggregates further properties of the moisture source and during the moisture transport, such as temperature, pressure, latitude etc. The moisture source diagnostic is described in detail in [[Sodemann et al. (2008)]]. Publications using the WaterSip diagnostic are listed in section [[Bibliography]].&lt;br /&gt;
&lt;br /&gt;
===Working principle===&lt;br /&gt;
&lt;br /&gt;
Explanation from Sodemann et al. 2008a&lt;br /&gt;
&lt;br /&gt;
Image from Läderach and Sodemann, 2016 or Sodemann et al., 2008a&lt;br /&gt;
&lt;br /&gt;
Moisture source information&lt;br /&gt;
&lt;br /&gt;
- Accounted fraction fa, fb, fa+fb&lt;br /&gt;
- adding below and above boundary layer or not, when&lt;br /&gt;
- choosing threshold values for Arctic and other regions&lt;br /&gt;
- identifying moisture transport&lt;br /&gt;
&lt;br /&gt;
Arrival information and Lagrangian forward projections&lt;br /&gt;
&lt;br /&gt;
- arrival parameters&lt;br /&gt;
- transport parameters&lt;br /&gt;
- source parameters&lt;br /&gt;
- averaging by contribution and amount&lt;br /&gt;
&lt;br /&gt;
Series information&lt;br /&gt;
&lt;br /&gt;
- sectorization (Sodemann and Zubler, 2010; definition table, code changes)&lt;br /&gt;
- weighted averaging: The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and deviding by the total precipitation.&lt;br /&gt;
&lt;br /&gt;
Averaged properties&lt;br /&gt;
&lt;br /&gt;
- histogram example and modification (code below)&lt;br /&gt;
&lt;br /&gt;
Trajectories&lt;br /&gt;
&lt;br /&gt;
- plotting/reading example (code below)&lt;br /&gt;
&lt;br /&gt;
Uncertainties&lt;br /&gt;
&lt;br /&gt;
===Example setups===&lt;br /&gt;
&lt;br /&gt;
Three examples with different purposes&lt;br /&gt;
&lt;br /&gt;
====Water vapour====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
====Extratropical precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
 &lt;br /&gt;
====High latitude precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
===Version history===&lt;br /&gt;
&lt;br /&gt;
Version 2.1&lt;br /&gt;
&lt;br /&gt;
Version 2.2&lt;br /&gt;
&lt;br /&gt;
Version 2.3&lt;br /&gt;
&lt;br /&gt;
Version 2.4&lt;br /&gt;
&lt;br /&gt;
Version 2.5&lt;br /&gt;
&lt;br /&gt;
Version 2.8&lt;br /&gt;
&lt;br /&gt;
Version 2.8.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9&lt;br /&gt;
&lt;br /&gt;
Version 2.9.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9.2&lt;br /&gt;
&lt;br /&gt;
Version 2.9.3&lt;br /&gt;
&lt;br /&gt;
Version 2.9.4&lt;br /&gt;
&lt;br /&gt;
Version 3.0.8&lt;br /&gt;
&lt;br /&gt;
Version 3.1&lt;br /&gt;
&lt;br /&gt;
The current version of WaterSip is V3.1.0. &lt;br /&gt;
&lt;br /&gt;
===Running the WaterSip diagnostic===&lt;br /&gt;
&lt;br /&gt;
It is advised to create a link to the binary file of WaterSip in your /home/$USER/bin or project directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/bin&lt;br /&gt;
ln -s /Data/gfi/projects/isomet/progs/WaterSip_tool/WaterSip3 ~/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load netCDF-C++&lt;br /&gt;
WaterSip3 &amp;lt;WATERSIP_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the UiB hpc environment requires the above &#039;module load&#039; command to be executed first.&lt;br /&gt;
&lt;br /&gt;
On cyclone.hpc.uib.no, a run script is available that makes repeated similar runs easier to manage. Only essential parameters have to be changed, such as the target coordinates and case name. These will then be replaced on a template INPUT_WATERSIP file, and then WaterSip will be started. The script and an input file template can be copied like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/run_watersip_template_Bergen_2018.sh .&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/INPUT_WATERSIP_template_Bergen_2018 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Input file conversion from V2====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WaterSip3 -c &amp;lt;WATERSIP_V2_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a new file named &amp;lt;WATERSIP_V2_parameter_file&amp;gt;V3 at the current directory. It is recommended to double check and edit the settings in the converted file before starting a simulation.&lt;br /&gt;
&lt;br /&gt;
====Parallelization====&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
If WaterSip3 is to be executed on a queue system (not applicable to cyclone.hpc.uib.no), the following wrapper script can be used to start a run using 4 cores for parallel processing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# start with sbatch NAME_OF_THIS_FILE directly on machine&lt;br /&gt;
&lt;br /&gt;
#SBATCH --job-name=WaterSip3&lt;br /&gt;
#SBATCH --workdir=/tmp/&lt;br /&gt;
#SBATCH --partition=priority&lt;br /&gt;
#SBATCH --output=WaterSip_job.%j.out&lt;br /&gt;
#SBATCH --error=WaterSip_job.%j.err&lt;br /&gt;
#SBATCH --mail-type=END&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --cpus-per-task=4&lt;br /&gt;
&lt;br /&gt;
srun ./WaterSip3 INPUT_WATERSIP_global_1993&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating mask files====&lt;br /&gt;
&lt;br /&gt;
WaterSip allows to define target regions not only by coordinates, but also by mask files. This is a short introduction to creating a mask for use with WaterSip.&lt;br /&gt;
&lt;br /&gt;
The procedure described here  uses python to create the netcdf file with the mask, and CDO to change the netcdf file format such that it can be read in by watersip.&lt;br /&gt;
&lt;br /&gt;
Required python packages [tested version]: numpy [1.19.1], shapely [1.6.4.post1], netCDF4 [1.5.3] and if loading from a csv, pandas [1.1.3]&lt;br /&gt;
&lt;br /&gt;
Optional packages (for plotting): matplotlib [3.3.1], cartopy [0.16.0]&lt;br /&gt;
&lt;br /&gt;
[[File:watersip_mask-guide_cut.png|400px]]&lt;br /&gt;
Figure: Example for Scandinavia&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Basic principle:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using shapely’s .contains and .touches methods on a polygon with a point in vectorized version (taking a list of points instead of just one point for speed). &lt;br /&gt;
This enables more interactive editing on a grid spacing of 0.25x0.25 degree (1M grid points).&lt;br /&gt;
After calculation, the script performs a boolean OR operation on the two masks to get the combined of inner and edge points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mask_inner=shapely.vectorized.contains(geom, x, y) # - for interior points&lt;br /&gt;
mask_edge=shapely.vectorized.touches(geom, x, y) #- for edge points&lt;br /&gt;
mask_full=mask_inner|mask_edge # | is boolean OR bitwise (elementwise) operator.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
list of coordinates of pairs of lat, lon defining the nodes of the polygon mask.&lt;br /&gt;
&lt;br /&gt;
global meshgrid with a given resolution&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Output:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Boolean mask of False and True in the shape of the meshgrid lat-lon&lt;br /&gt;
&lt;br /&gt;
After using python script, convert to a netCDF format readable by WaterSip by using the command below in a terminal where you newly created mask file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cdo -f nc2 copy mask-from-python.nc mask-to-watersip.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For reference, and instructions on how to load political, and other, geometries straight from NaturalEarth dataset, go to&lt;br /&gt;
[[https://gist.github.com/pelson/9785576]]&lt;br /&gt;
&lt;br /&gt;
[[MaskCode|Python program code available here|]]&lt;br /&gt;
&lt;br /&gt;
=== Input file options ===&lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;code&amp;gt;[Case]&amp;lt;/code&amp;gt;). There are 7 option groups which can appear in random order in the input file:&lt;br /&gt;
&lt;br /&gt;
*Case: general settings related to the case to be extracted&lt;br /&gt;
*Grids: specification of different output grids&lt;br /&gt;
*Diagnostrics: parameters of the moisture diagnostic&lt;br /&gt;
*Output: general output settings&lt;br /&gt;
*Variables: selection of output variables&lt;br /&gt;
*Flexpart: options specific to runs using FLEXPART particle output&lt;br /&gt;
*Lagranto: options specific to runs using Lagranto trajectories&lt;br /&gt;
&lt;br /&gt;
====Parameter set Case====&lt;br /&gt;
&lt;br /&gt;
The settings in this parameter category describe the basic conditions of the diagnostic run.&lt;br /&gt;
&lt;br /&gt;
;caseName (string)&lt;br /&gt;
: identifier for the run, prepended to all output files. Example: &amp;lt;code&amp;gt;caseName = global_201002_relative&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;inputDir (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;inputDir = /Volumes/Data/global/shortposit_%s&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;outputDir (string)&lt;br /&gt;
: path where the output files will be created. Example: &amp;lt;code&amp;gt;outputDir = /Volumes/Data/global/output/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;startDate (date string)&lt;br /&gt;
: inital date of the run, fixed format YYYYMMDD-HHMMSS. Start date is latest date of the run which moves backward in time. Example: &amp;lt;code&amp;gt;startDate = 20100228-180000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;endDate (date string)&lt;br /&gt;
: final date of the run, fixed format YYYYMMDD-HHMMSS. End date is earliest date of the run. Example: &amp;lt;code&amp;gt;endDate = 20100211-000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;timeStep (integer)&lt;br /&gt;
: time step in hours between particles or trajectory output times. (typical values 6, 3, or 1 (hours)). Example: &amp;lt;code&amp;gt;timeStep = 6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajPoints (integer)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;trajPoints = 21&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;minTrajPoints (integer)&lt;br /&gt;
: minimum length of trajectories to be included in analysis. Parameter is only relevant for Lagranto simulations with uneven trajectory length. Example: &amp;lt;code&amp;gt;minTrajPoints = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sectorizeRegion (integer)&lt;br /&gt;
: region set used to divide moisture sources into different sectors (see [[#sectorization]]). Example: &amp;lt;code&amp;gt;sectorizeRegion = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterBoxFile (string)&lt;br /&gt;
: path to the text file describing geographic boxes used to filter air parcels during transport (see [[#box filters]]). Example: &amp;lt;code&amp;gt;filterBoxFile = /home/hso039/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterIndex (integer)&lt;br /&gt;
: used line from the filterBoxFile to select/deselect trajectories. Example: &amp;lt;code&amp;gt;filterIndex = -1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;orographyFile (string)&lt;br /&gt;
: path to the orography file used to select arrival based on underying topography, using the ETOPO2 topography. File in netcdf format. Example: &amp;lt;code&amp;gt;orographyFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/etopo5.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;lsmFile (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;lsmFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maskFile (string)&lt;br /&gt;
: path to file with an arrival selection. Example: &amp;lt;code&amp;gt;maskFile = &amp;quot; &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;useMask (boolean)&lt;br /&gt;
: use mask file (0=no, 1=yes). Example: &amp;lt;code&amp;gt;useMask = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;ompThreads (integer)&lt;br /&gt;
: number of threads to be used with OpenMP parallelisation if compiled with flag -fopenmp (1=no parallelisation, &amp;gt;1 parallelisation activated.). Example: &amp;lt;code&amp;gt;ompThreads = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;showStats (boolean)&lt;br /&gt;
: print statistics about particle processing to the command line (0=off, 1=on). Example: &amp;lt;code&amp;gt;showStats = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Grids====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category specify the different output grids and the gridding method&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLon (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLon (float)&lt;br /&gt;
: maximum longitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalgridmaxlon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMaxLat = 90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDx (float)&lt;br /&gt;
: longitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDy (float)&lt;br /&gt;
: latitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridRadius (float)&lt;br /&gt;
: gridding radius for information from arriving trajectories. Example: &amp;lt;code&amp;gt;arrivalGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLon (float)&lt;br /&gt;
: minimum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLon (float)&lt;br /&gt;
: maximum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLat (float)&lt;br /&gt;
: minimum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLat (float)&lt;br /&gt;
: maximum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLat = 90&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;sourceGridDx (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridDy (float)&lt;br /&gt;
: latitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridRadius (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;griddingType (integer)&lt;br /&gt;
: select [[#gridding algorithm]] (1: fast and simple gridding, 2: improved but slower gridding). Example: &amp;lt;code&amp;gt;griddingType = 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Diagnostics====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category control the way how the diagnostic works, and which trajectories should be considered in the run.&lt;br /&gt;
&lt;br /&gt;
;uptakeThreshold (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;uptakeThreshold = 0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipThreshold (float)&lt;br /&gt;
: 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 precipThreshold is specified as percent decrease relative to the current specific humidity of an air parcel. Then the value is negative. Default absolute values are -0.1 to -0.2 for 3h and 6h time steps. Example: &amp;lt;code&amp;gt;precipThreshold = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;relativeThreshold (boolean)&lt;br /&gt;
: determines whether absolute threshold values or relative threshold values are specified (0: absolute, 1: relative threshold values). Example: &amp;lt;code&amp;gt;relativeThreshold = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease larger than the value given by &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt; to the same number. Example: &amp;lt;code&amp;gt;arrivalPrecipMin = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease of up to the value given by &amp;lt;code&amp;gt;arrivalprecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;relativeThresholds&amp;lt;/code&amp;gt; is set to false, or a value of 1.0 otherwise. The combination of the &amp;lt;code&amp;gt;arrivalPrecipMin/Max&amp;lt;/code&amp;gt; parameters allows to focus on heavy and weak precipitation events only. Example: &amp;lt;code&amp;gt;arrivalPrecipMax = -100.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is larger than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt;. 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. Example: &amp;lt;code&amp;gt;arrivalRHMin = 80&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is less than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt;. Units are %. This parameter in combination with &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; can be used to focus on condensation/no condensation cases when the parameter &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is set to true. Example: &amp;lt;code&amp;gt;arrivalRHMax = 110&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMin (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalOroMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the ETOPO2 topography does not exceed the given value (in m). In combination with . Example: &amp;lt;code&amp;gt;arrivalOroMin&amp;lt;/code&amp;gt;, regions with a complex shape but common elevation can be selected easily. Example: &amp;lt;code&amp;gt;arrivalOroMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMin (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are above at the given altitude (in m above sea level). Example: &amp;lt;code&amp;gt;arrivalAltMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are below the given altitude (in m above sea level). The parameters &amp;lt;code&amp;gt;arrivalAltMin/Max&amp;lt;/code&amp;gt; can be used to conduct vertically stratified analyses.Example: &amp;lt;code&amp;gt;arrivalAltMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;blhScale (float)&lt;br /&gt;
: 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 &#039;moisture sources boundary-layer&#039;, all others to the category &#039;moisture sources free troposphere&#039;. Default value is 1.5. Example: &amp;lt;code&amp;gt;blhScale = 1.5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;analyzeVapour (boolean)&lt;br /&gt;
: Parameter allowing to analyze vapour origin instead of precipitation origin. Setting this parameter to true considers all air parcels during arrival, not just the ones that precipitate according to the precipitation threshold. If set to true, the &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalRHMin/Max&amp;lt;/code&amp;gt; parameters also need modification. Typically, one will set the &amp;lt;code&amp;gt;precipitation threshold&amp;lt;/code&amp;gt; to a small or even positive number, and the &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; to 0 and &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt; to 110 to include all arriving trajectories. It is often preferrable then to set the &amp;lt;code&amp;gt;arrivalAltMax&amp;lt;/code&amp;gt; to values of around 1000m for surface station measurements, for example. If &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is 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. Example: &amp;lt;code&amp;gt;analyzeVapour = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;assignToUptake (boolean)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;assignToUptake = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;forwardProjectionMode (integer)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;forwardProjectionMode = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Output====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category determine which output files should be created.&lt;br /&gt;
&lt;br /&gt;
;stepFile (boolean)&lt;br /&gt;
: write parameters on [[#Grid files]] and [[#Series files]] for each time step. Example: &amp;lt;code&amp;gt;stepFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;dayFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each day. Example: &amp;lt;code&amp;gt;dayFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;monthFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each month. Example: &amp;lt;code&amp;gt;monthFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;yearFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each year. Example: &amp;lt;code&amp;gt;yearFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;allFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for all time steps. Example: &amp;lt;code&amp;gt;allFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;staticFields (boolean)&lt;br /&gt;
: write static fields (land-sea mask and topography) onto grid files. Example: &amp;lt;code&amp;gt;staticFields = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveTraj (integer)&lt;br /&gt;
: write particle trajectories to [[#Trajectory files]] at each time step (1) or each month (2). Option 0 disables trajectory output. Example: &amp;lt;code&amp;gt;saveTraj = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;skipTraj (boolean)&lt;br /&gt;
: write every nth trajectory to reduce traj file size (1:disabled, &amp;gt;=2: stride size). Example: &amp;lt;code&amp;gt;skipTraj = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveHistogram (boolean)&lt;br /&gt;
: write histogram for selected parameters to a [[#Histogram files]] (0: disabled, 1:enabled). Example: &amp;lt;code&amp;gt;saveHistogram = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveMean (boolean)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;saveMean = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Variables====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category allow to include or exclude specific variables from the output files. Setting the output for unused variables to 0 (disabled) will speed up computation time, reduce the memory footprint, and reduce the output file size. Only parameters that are really required from a run should therefore selected as enabled.&lt;br /&gt;
&lt;br /&gt;
;sourcesBoundaryLayer (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the boundary layer to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesBoundaryLayer = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourcesFreeTroposphere (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the free troposphere to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesFreeTroposphere = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;evaporationMinusPrecipitation (boolean)&lt;br /&gt;
: write unweighted evaporation minus precipitation along entire trajectory length to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;evaporationMinusPrecipitation = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;moistureTransport (boolean)&lt;br /&gt;
: write weighted moisture transport along trajectories to grid and series output files (0: disabled, 1: enabled). Units are mm. Example: &amp;lt;code&amp;gt;moistureTransport = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajectoryLocations (boolean)&lt;br /&gt;
: write trajectory locations to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Example: &amp;lt;code&amp;gt;trajectoryLocations = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipitationEstimate (boolean)&lt;br /&gt;
: write precipitation estimate at arrival to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;precipitationEstimate = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLongitude (boolean)&lt;br /&gt;
: write weighted moisture source longitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees longitude. Example: &amp;lt;code&amp;gt;sourceLongitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLatitude (boolean)&lt;br /&gt;
: write moisture source latitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees latitude. Example: &amp;lt;code&amp;gt;sourceLatitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionCount (boolean)&lt;br /&gt;
: write convection count projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Convection count can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionCount is not on the ERA-Interim climatology run. The counter is increased each time the particles passes the convection scheme upwards. Example: &amp;lt;code&amp;gt;convectionCount = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionHeight (boolean)&lt;br /&gt;
: write convection height projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Convection height can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionHeight is not on the ERA-Interim climatology run. The value gives an average height of vertical displacement when the particles passes the convection scheme. Example: &amp;lt;code&amp;gt;convectionHeight = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;landFraction (boolean)&lt;br /&gt;
: write fraction of moisture sources over land projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;landFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;boundaryLayerFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;boundaryLayerFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;freeTroposphereFraction (boolean)&lt;br /&gt;
: write accounted fraction of free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;freeTroposphereFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;combinedFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer and free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). This is the sum of the two previous variables. Example: &amp;lt;code&amp;gt;combinedFraction = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTime (boolean)&lt;br /&gt;
: write moisture transport time projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are hours. Example: &amp;lt;code&amp;gt;transportTime = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSpecificHumidity (boolean)&lt;br /&gt;
: write surface specific humidity at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are g per kg. Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSpecificHumidity = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportDistance (boolean)&lt;br /&gt;
: write transport distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Transport distance is the length of the actual travel path along the trajectories from moisture source to the arrival region. Example: &amp;lt;code&amp;gt;transportDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDistance (boolean)&lt;br /&gt;
: write source distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Source distance is the shortest distance between the moisture source and the arrival region. Example: &amp;lt;code&amp;gt;sourceDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;source2mTemperature (boolean)&lt;br /&gt;
: write 2m temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;source2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDeuteriumExcess (boolean)&lt;br /&gt;
: write deuterium excess projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are permil. Deuterium excess is calculated from the relative humidity with respect to SST and the relationship from Pfahl and Sodemann (2014). Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceDeuteriumExcess = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperature during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;transportTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportPressure (boolean)&lt;br /&gt;
: write moisture-weighted pressure during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;transportPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;condensationTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperatures where RH&amp;lt;sub&amp;gt;liquid&amp;lt;/sub&amp;gt; exceeds 80% to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;condensationTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalTemperature (boolean)&lt;br /&gt;
: write temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;arrivalTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPressure (boolean)&lt;br /&gt;
: write pressure during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;arrivalPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrival2mTemperature (boolean)&lt;br /&gt;
: write temperature at 2m during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that 2m temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrival2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrivalSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Flexpart====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
;inputFormat (integer)&lt;br /&gt;
: 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/NorESM data short format, 4: global reanalysis data long format, 5 regional reanalysis/NorESM data short format. Example: &amp;lt;code&amp;gt;inputFormat = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maxPart (integer)&lt;br /&gt;
: number of particles contained in a single FLEXPART partposit or shortposit file. Example: &amp;lt;code&amp;gt;maxPart = 5000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partMass (float)&lt;br /&gt;
: atmospheric mass represented by each particle in kilogramms. Parameter is written out by specific version of FLEXPART to create WaterSip output data. Example: &amp;lt;code&amp;gt;partMass = 1.01943e+12&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partStride (integer)&lt;br /&gt;
: number of particles to skip during processing to speed up calculations (1: use every particle, &amp;gt;=2: use every 2nd particle, etc). Example: &amp;lt;code&amp;gt;partStride = 10&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;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). Example: &amp;lt;code&amp;gt;allowReenter = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Lagranto====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
;partMass (float)&lt;br /&gt;
: atmospheric mass represented by each particle in kilogramms. The value for partMass depends on how the trajectories are arriving. They should be arriving on a regular starting grid (fixed horizontal distance), and fixed vertical distance (in delta p). Then one can calculate the value for partMass as dx*dy*dp with dx and dy in km, and dp in Pa. Internally, this number will then be multiplied with 1e6/g to obtain kg. (In a later version, this will change this so one directly specifies the partMass in kg). Example: &amp;lt;code&amp;gt;partMass = 1.01943e+12&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Full example for a FLEXPART run input file:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Case]&lt;br /&gt;
caseName = global_201002_final_relativex&lt;br /&gt;
inputDir = /home/data/flexpart/global/shortposit_%s&lt;br /&gt;
outputDir=/home/data/watersip/global_201002_V3/&lt;br /&gt;
startDate = 20100228-180000&lt;br /&gt;
endDate = 20100211-000000&lt;br /&gt;
timeStep = 6&lt;br /&gt;
sectorizeRegion = 0&lt;br /&gt;
filterBoxFile = /home/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&lt;br /&gt;
filterIndex = -1&lt;br /&gt;
orographyFile = &amp;quot;/home/projects/WaterSip_tool/etopo5.nc&amp;quot;&lt;br /&gt;
lsmFile = &amp;quot;/home/projects/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&lt;br /&gt;
maskFile = &amp;quot; &amp;quot;&lt;br /&gt;
useMask = 0&lt;br /&gt;
trajPoints = 41&lt;br /&gt;
minTrajPoints = 0&lt;br /&gt;
ompThreads = 1&lt;br /&gt;
showStats = 0&lt;br /&gt;
&lt;br /&gt;
[Grids]&lt;br /&gt;
arrivalGridMinLon = -180&lt;br /&gt;
arrivalGridMaxLon = 180&lt;br /&gt;
arrivalGridMinLat = -90&lt;br /&gt;
arrivalGridMaxLat = 90&lt;br /&gt;
arrivalGridDx = 1&lt;br /&gt;
arrivalGridDy = 1&lt;br /&gt;
arrivalGridRadius = 200&lt;br /&gt;
sourceGridMinLon = -180&lt;br /&gt;
sourceGridMaxLon = 180&lt;br /&gt;
sourceGridMinLat = -90&lt;br /&gt;
sourceGridMaxLat = 90&lt;br /&gt;
sourceGridDx = 1&lt;br /&gt;
sourceGridDy = 1&lt;br /&gt;
sourceGridRadius = 200&lt;br /&gt;
griddingType = 2&lt;br /&gt;
&lt;br /&gt;
[Diagnostics]&lt;br /&gt;
uptakeThreshold = 0.05&lt;br /&gt;
precipThreshold = 0.05&lt;br /&gt;
blhScale = 1.5&lt;br /&gt;
arrivalPrecipMin = 0.05&lt;br /&gt;
arrivalPrecipMax = 1.0&lt;br /&gt;
arrivalRHMin = 80&lt;br /&gt;
arrivalRHMax = 110&lt;br /&gt;
arrivalOroMin = -100&lt;br /&gt;
arrivalOroMax = 12000&lt;br /&gt;
arrivalAltMin = -100&lt;br /&gt;
arrivalAltMax = 12000&lt;br /&gt;
analyzeVapour = 0&lt;br /&gt;
assignToUptake = 0&lt;br /&gt;
forwardProjectionMode = 3&lt;br /&gt;
relativeThreshold = 1&lt;br /&gt;
&lt;br /&gt;
[Output]&lt;br /&gt;
stepFile = 1&lt;br /&gt;
dayFile = 1&lt;br /&gt;
monthFile = 1&lt;br /&gt;
yearFile = 1&lt;br /&gt;
allFile = 1&lt;br /&gt;
staticFields = 1&lt;br /&gt;
saveTraj = 0&lt;br /&gt;
skipTraj = 0&lt;br /&gt;
saveHistogram = 0&lt;br /&gt;
saveMean = 0&lt;br /&gt;
&lt;br /&gt;
[Variables]&lt;br /&gt;
sourcesBoundaryLayer = 1&lt;br /&gt;
sourcesFreeTroposphere = 1&lt;br /&gt;
evaporationMinusPrecipitation = 1&lt;br /&gt;
moistureTransport = 1&lt;br /&gt;
trajectoryLocations = 1&lt;br /&gt;
precipitationEstimate = 1&lt;br /&gt;
sourceLongitude = 1&lt;br /&gt;
sourceLatitude = 1&lt;br /&gt;
convectionCount = 0&lt;br /&gt;
convectionHeight = 0&lt;br /&gt;
landFraction = 1&lt;br /&gt;
boundaryLayerFraction = 1&lt;br /&gt;
freeTroposphereFraction = 1&lt;br /&gt;
combinedFraction = 0&lt;br /&gt;
transportTime = 1&lt;br /&gt;
sourceSkinTemperature = 1&lt;br /&gt;
sourceSpecificHumidity = 0&lt;br /&gt;
transportDistance = 1&lt;br /&gt;
sourceDistance = 1&lt;br /&gt;
source2mTemperature = 0&lt;br /&gt;
sourceDeuteriumExcess = 1&lt;br /&gt;
transportTemperature = 1&lt;br /&gt;
transportPressure = 1&lt;br /&gt;
condensationTemperature = 1&lt;br /&gt;
arrivalTemperature = 1&lt;br /&gt;
arrivalPressure = 1&lt;br /&gt;
arrival2mTemperature = 0&lt;br /&gt;
arrivalSkinTemperature = 1&lt;br /&gt;
&lt;br /&gt;
[Flexpart]&lt;br /&gt;
inputFormat = 3&lt;br /&gt;
maxPart = 5000000&lt;br /&gt;
partMass = 1.01943e+12&lt;br /&gt;
partStride = 10&lt;br /&gt;
allowReenter = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Output file formats===&lt;br /&gt;
&lt;br /&gt;
The results from the WaterSip diagnostic are written to a set of output files in different format. The main output files are created in netCDF with detailed metadata information, including the parameter settings of the run for automated documentation. The creation of different output files can be adapted by parameter settings in parameter set *Output* and the contained variables with settings in parameter set *Variables*. Spatial fields at different time intervals are written to so-called grid files in [[netCDF]] format, time series of averaged quantities at different time intervals are written to so-called Series files in netCDF format, histograms of selected quantities identified during the processing for each time step and each trajectory are written to Histogram files in ASCII format, and trajectories are written to Trajectory files in either the binary format traj or the Lagranto ASCII format. Earlier versions than V3 reported output in so-called Mean files in an ASCII format. That format is documented here but no longer in use in current versions of WaterSip.&lt;br /&gt;
&lt;br /&gt;
The time unit has changed in Version 3.1. Previously, the unit was set to &amp;quot;days since 0000-01-02 00:00:00&amp;quot; to allow matlab-compatible values for time that could directly be utilized with the datenum() commands. In order to confirm to netCDF-CF standards, where no calendar year 0000 exists, the time unit is now &amp;quot;days since 0001-01-01 00:00:00&amp;quot;. This provides the ability to open and visualize netCDF output files directly with tools such as ncview and panoply. To convert the time values into a matlab datenum compatible value, the following commands have to be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ncid=netcdf.open(filename,&amp;quot;noclobber&amp;quot;);&lt;br /&gt;
tim=(float)netcdf.getVar(ncid,&amp;quot;time&amp;quot;);&lt;br /&gt;
tim=tim-datenum(1,0,1);&lt;br /&gt;
datestr(tim)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table below summarizes the available output files:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Content !! Format !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| Grid files || Spatial properties of moisture sources and arrival regios || netCDF || CASE_grd_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Series files || Mean/min/max/std of regionally and globally averaged moisture source and arrival region properties || netCDF || CASE_ser_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Histogram files || Histograms of quantities identified for each timestep along each trajectory || ASCII || CASE_hst_steps&lt;br /&gt;
|-&lt;br /&gt;
| Trajectory files || Trajectories for identified precipitation events || ASCII/binary traj || CASE_DATE.traj/CASE_DATE_lsl&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Grid files====&lt;br /&gt;
&lt;br /&gt;
Grid file variables are separated into immediate source and transport variables, typically on a coarser, global grid, and arrival and forward-projected variables on the (typically finer-scale) arrival grid. The grid settings are determined by the corresponding parameters in parameter set *Grid*. All variables are of type float, and the fill value (netCDF property _FillValue) is -999.99. The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and dividing by the total precipitation (as described above).&lt;br /&gt;
&lt;br /&gt;
**Moisture source and transport properties**&lt;br /&gt;
&lt;br /&gt;
Variables related to immediate moisture source and transport properties (not forward projected) have dimension of variables time, global_latitude, global_longitude, as defined by input file parameters *sourceGridMinLon,sourceGridMaxLon, sourceGridMinLat, sourceGridMaxLat, sourceGridDx, sourceGridDy, sourceGridRadius*.&lt;br /&gt;
&lt;br /&gt;
The moisture sources are contained in the variables &amp;quot;moisture_uptakes_boundary_layer&amp;quot; and &amp;quot;moisture_uptakes_free_troposphere&amp;quot;. The &amp;quot;moisture_transport&amp;quot; variable is a gridded map of the water vapour traced to the target region, and can help you identify transport pathways (weighted by humidity). The &amp;quot;trajectory_location&amp;quot; is a gridded map of all trajectory points, regardless of the air parcel humidity. In most current analyses, it is recommended to sum the two moisture_uptake_xx variables, except when one wants to distinguish the influence from convection on the moisture source diagnostic.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer || E_s^BL || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere || E_s^FT || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation || E-P || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport || Q_t || mm ||  text &lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location || N_t || counts km^-2 || text &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Arrival properties and Lagrangian forward projections**&lt;br /&gt;
&lt;br /&gt;
The variables contained in these files have the dimensions time (days since 0001-01-01 00:00:00), latitude (degrees_north), and longitude (degrees_east) as defined by input file parameters *arrivalGridMinLon, arrivalGridMaxLon, arrivalGridMinLat, arrivalGridMaxLat, arrivalGridDx, arrivalGridDy, arrival | source | text |GridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Unit !! Property !! Description &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate || PE || mm day^-1 or mm step^-1 || arrival || precipitation at arrival location estimated from change in specific humidity during last time step &lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature || T_a || K || arrival || PE-weighted temperature at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure || p_a || hPa || arrival || PE-weighted pressure at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature || SKT_a || K || arrival || PE-weighted SKT below trajectory location during arrival &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer || f_BL || fraction || arrival || fractional contribution of BL moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere || f_FT || fraction || arrival || fractional contribution of FT moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_lifetime || \tau_t || h || transport || contribution and precipitation-weighted precipitation life time &lt;br /&gt;
|-&lt;br /&gt;
| transport_distance || \Delta_t || km || transport || contribution and precipitation-weighted transport distance along trajectory &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature || T_t || K || transport || contribution and precipitation-weighted temperature during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure || p_t || hPa || transport || contribution and precipitation-weighted pressure during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature || T_c || K || transport || contribution and precipitation-weighted temperature when RH&amp;gt;80% during transport &lt;br /&gt;
|-&lt;br /&gt;
| source_longitude || \lambda_s || degrees_east || source || contribution and precipitation-weighted latitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_latitude || \phi_s || degrees_north || source || contribution and precipitation-weighted longitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| land_fraction || f_l || fraction || source || contribution and precipitation-weighted fraction of moisture sources over land &lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature || SKT_s || K || source || contribution and precipitation-weighted SKT at the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_distance || \Delta_s || km || source || contribution and precipitation-weighted direct distance between the moisture source and arrival location &lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess || d_s || permil || source || contribution and precipitation-weighted estimate of deuterium excess at the source from RH and T using the Pfahl and Sodemann (2013) relation &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Global attributes**&lt;br /&gt;
&lt;br /&gt;
The netCDF grid files contain a range of essential parameters as global attributes. These parameters allow to fully characterise the result of the WaterSip run as required for the interpretation of the results. A number of run parameters are omitted, that concern logistical settings, or that are self-evident from the content of the the output files. The table below gives an example for a WaterSip run:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Example !! Type &lt;br /&gt;
|-&lt;br /&gt;
| startDate || &amp;quot;2010-02-28 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| endingDate || &amp;quot;2010-01-11 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| analysisRegion || &amp;quot;NEEM&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| maxPart || 5000001  || int&lt;br /&gt;
|-&lt;br /&gt;
| caseName || &amp;quot;global_201002_V3_stride&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| trajPoints || 61  || int&lt;br /&gt;
|-&lt;br /&gt;
| timeStep || 6  || in float&lt;br /&gt;
|-&lt;br /&gt;
| partMass || 2.03885996E12  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| dryLevel || 0.01  || float&lt;br /&gt;
|-&lt;br /&gt;
| blhScale || 1.5  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMin || 80.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMax || 110.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| uptakeThreshold || 0.2  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| precipThreshold || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMin || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMax || -120.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| anaVapour || 0  || int&lt;br /&gt;
|-&lt;br /&gt;
| filterIndex || -1  || int&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Series files====&lt;br /&gt;
&lt;br /&gt;
The netCDF series files contain two sets of information. The so-called sectorization output provides time series of the moisture source information seperated into relative contributions from predefined geographical areas. Furthermore, the series files contains weighted averages and further statistical properties of all quantities in the grid files. &lt;br /&gt;
&lt;br /&gt;
**Sectorisation output**&lt;br /&gt;
&lt;br /&gt;
A set of sectorisations is chosen by the parameter *sectorizeRegion*. The currently available options are listed in the table below. New sectorisations can be defined by changing the code in routine &amp;lt;code&amp;gt;Sectors.cpp/Sectors.h&amp;lt;/code&amp;gt;. This requires defining a new name and new decision tree that provides a unique number for any lat/lon value between -180E to 180E and -90 to 90N. See comments in the code.&lt;br /&gt;
&lt;br /&gt;
For each of the predefined areas, the relative contributions are subdivided into land and sea covered areas. Time series of the contributions are of dimension time and sector. Thereby, the sector numbers correspond to the sector numbers defined in the program code. The area of the sectors is calculated automatically within WaterSip. As noted above for the grid files, the time unit has been changed starting from Version 3.1.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol !! Unit !! Description&lt;br /&gt;
|-&lt;br /&gt;
| time || t || days since 0001-01-01 00:00:00 || text&lt;br /&gt;
|-&lt;br /&gt;
| sector || s || sector number || text&lt;br /&gt;
|-&lt;br /&gt;
| sector_area || A_s || km^2 || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_boundary_layer || f_l^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_boundary_layer || f_s^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_free_troposphere || f_l^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_free_troposphere || f_s^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_trajectory_location || f_l^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_trajectory_location || f_s^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_transport || f_l^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_transport || f_s^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_evaporation_minus_precipitation || f_l^EP || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_evaporation_minus_precipitation | f_s^EP | percent | text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Time-series output**&lt;br /&gt;
&lt;br /&gt;
For immediate quantities, a time series of the total field sum is recorded in the series file. In order to obtain an area average, one needs to divide the sum by the surface of the earth (x km^2). The unit for moisture uptakes, E-P and precipitation estimate is mm step^-1 for step series files, and mm 24h^-1 for all other averaging series files. In addition to sums, the files contain time series of the minimum, maximum and standard deviation of the grid field at each time instance. For all forward-projected and arrival quantities, the average rather than the sum is calculated on the arrival grid locations. When averaging from step output to larger time intervals, the quantities are weighted with the corresponding PE at each grid point. &lt;br /&gt;
&lt;br /&gt;
In addition, series files contain the same set of global attributes as described in Grid files to enable interpretation without additional documentation of the run setup.&lt;br /&gt;
&lt;br /&gt;
*Immediate quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_min || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_sum || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_max || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_min || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_sum || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_max || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Arrival and forward-projected quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_min || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_avg || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_max || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_min || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_avg || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_max || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_min || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_avg || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_max || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_min || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_avg || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_max || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_avg || x  || K &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_max || x || K&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Histogram files====&lt;br /&gt;
&lt;br /&gt;
* Bounds freq (1 to n categories), (1 to m variables)&lt;br /&gt;
* Main variables time, dq, conv&lt;br /&gt;
* where to implement&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20.71   46.56   8.1351e+05  -1.0000e+00&lt;br /&gt;
21.22   45.90   1.1314e+06  -1.0000e+00&lt;br /&gt;
22.03   45.24   4.1929e+05  -1.0000e+00&lt;br /&gt;
21.19   45.35   1.0639e+06  -1.0000e+00&lt;br /&gt;
20.71   46.50   5.0963e+05  -1.0000e+00&lt;br /&gt;
21.07   47.51   2.8182e+05  -1.0000e+00&lt;br /&gt;
21.71   48.67   9.3088e+05  -1.0000e+00&lt;br /&gt;
22.14   51.47   2.3634e+05  -1.0000e+00&lt;br /&gt;
22.14   52.49   8.0048e+05  -1.0000e+00&lt;br /&gt;
22.34   53.76   7.3297e+05  -1.0000e+00&lt;br /&gt;
23.17   54.41   4.1516e+05  -1.0000e+00&lt;br /&gt;
23.56   54.54   2.7414e+05  -1.0000e+00&lt;br /&gt;
24.39   54.55   5.0017e+05  -1.0000e+00&lt;br /&gt;
26.89   54.42   2.8215e+05  -1.0000e+00&lt;br /&gt;
28.18   54.40   3.9987e+05  -1.0000e+00&lt;br /&gt;
29.80   54.25   3.6020e+05  -1.0000e+00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Trajectory files====&lt;br /&gt;
&lt;br /&gt;
**LSL format**&lt;br /&gt;
&lt;br /&gt;
* As documented elsewhere&lt;br /&gt;
* only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Traj format**&lt;br /&gt;
&lt;br /&gt;
* Binary format, only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
* reading in and plotting traj files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mean file====&lt;br /&gt;
&lt;br /&gt;
Legacy format, global_201002_V3_avg_steps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20100228_00 13795.603  0.001 7994.128  0.001 722561152.000 1977998.875   -0.081   -3.124    0.007  -0.080  -1.347   0.003   0.181   0.000   0.001   0.711   0.006   0.001   0.242   0.000   0.001 -999.990 -999.990 -999.990  -83.283 -340.404    0.153  288.231  242.846    0.050 -999.990 -999.990 -999.990   2828.54    120.41      7.50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Annotated bibliography===&lt;br /&gt;
&lt;br /&gt;
There are to date (Oct 2019) 25 publications involving the WaterSip method in one way or another. The versatility of WaterSip ranges from weather events to climatological studies, and from process understanding to paleoclimate proxy interpretation. This documentation can only provide initial guidance in applying WaterSip to new research plans. The annotated bibliography below provides an overview over the relevant studies, ordered by topic and the respective climatic zone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Topic !! Time perspective !! Climate zone !! Region !! Reference&lt;br /&gt;
|-&lt;br /&gt;
| Method description || - || High latitudes || Greenland || Sodemann et al., 2008a&lt;br /&gt;
|-&lt;br /&gt;
| Precipitation extremes || Climatology || Subtropics || Mediterranean || Winschall et al., 2014a&lt;br /&gt;
|-&lt;br /&gt;
| Method evaluation || Weather event || Subtropics || Mediterranean || Winschall et al., 2014b&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime of precipitation || Climatology || Global || Global || Läderach and Sodemann, 2016&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || High latitudes || Greenland || Sodemann et al., 2008b&lt;br /&gt;
|-&lt;br /&gt;
| Climate characteristics || Climatology || Mid latitudes || Europe || Sodemann and Zubler, 2010&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Tropics || Belize || Kenneth et al., &lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Mid latitudes || China || Baker et al., Luetscher et al. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
* Thurnherr, I., Kozachek, A., Graf, P., Weng, Y., Bolshiyanov, D., Landwehr, S., Pfahl, S., Schmale, J., Sodemann, H., Steen-Larsen, H. C., Toffoli, A., Wernli, H., and Aemisegger, F., 2019: Meridional and vertical variations of the water vapour isotopic composition in the marine boundary layer over the Atlantic and Southern Ocean, Atmos. Chem. Phys. Discuss., doi: 10.5194/acp-2019-782.&lt;br /&gt;
* Fremme, A. and Sodemann, H., 2019: The role of land and ocean evaporation on the variability of precipitation in the Yangtze River valley, Hydrol. Earth Syst. Sci., 23, 2525–2540, doi: 10.5194/hess-23-2525-2019. &lt;br /&gt;
* Huang, R, Zhu, H, Liang, E., Grießinger, J, Wernicke, J., Yu, W., Hochreuther, P., Risi, C., Zeng, Y., Fremme, A., Sodemann, H., Bräuning, A., 2019: Temperature signals in tree-ring oxygen isotope series from the northern slope of the Himalaya, EPSL 506: 455-465. &lt;br /&gt;
* Buizert, Christo; Sigl, Michael; Severi, Mirko; Markle, Bradley; Wettstein, Justin; McConnell, J; Pedro, Joel; Sodemann, H.; Goto-Azuma, Kumiko; Kawamura, Kenji; Fujita, Shuji; Motoyama, Hideaki; Hirabayashi, Motohiro; Uemura, Ryu; Stenni, Barbara; Parrenin, Frederic; He, Feng; Fudge, T.J.; Steig, Eric J., 2018: Abrupt ice-age shifts in southern westerly winds and Antarctic climate forced from the north, Nature 563: 681-685.&lt;br /&gt;
* Bohlinger, P., Sorteberg, A., Liu, C., Rasmussen, R., Sodemann, H., Ogawa, F., 2018: Multiscale characteristics of an extreme precipitation event over Nepal. QJRMS:1-18, doi:10.1002/qj.3418. &lt;br /&gt;
* Bohlinger, P., Sorteberg, A., and Sodemann, H., 2017: Synoptic conditions and moisture sources actuating extreme precipitation in Nepal. Journal of Geophysical Research: Atmospheres, 122, 12,653–12,671. https://doi.org/10.1002/2017JD027543.&lt;br /&gt;
* Blazina, T., A. Läderach, G. D. Jones, H. Sodemann, H. Wernli, J. W. Kirchner and L. H. E. Winkel, 2016: Marine primary productivity as a potential source of selenium and other trace elements in atmospheric deposition, Environ. Sci. Technol. 2017, 51, 108−118, doi: 10.1021/acs.est.6b03063.&lt;br /&gt;
* Läderach, A. andSodemann, H., 2016: A revised picture of the atmospheric moisture residence time, Geophys. Res. Lett., 43, doi:10.1002/2015GL067449.&lt;br /&gt;
* Baker, A., Sodemann, H., Baldini, J. U. L., Breitenbach, S. F. M., Johnson, K. R., van Hunen, J., and Pingzhong, Z., 2015: Seasonality of westerly moisture transport in the East Asian Summer Monsoon and its implications for interpreting precipitation d18O, J. Geophys. Res., 120,  doi:10.1002/2014JD022919.&lt;br /&gt;
* Steen-Larsen, H. C., Sveinbjörnsdottir, A. E., Jonsson, T., Ritter, F., Bonne, J.-L., Masson-Delmotte, V., Sodemann, H., Blunier, T., Dahl-Jensen, D., Vinther, B. M., 2015: Moisture sources and synoptic to seasonal variability of North Atlantic water vapor isotopic composition, J. Geophys. Res., 120, 5757–5774, doi:10.1002/ 2015JD023234.&lt;br /&gt;
* Bonne, J.-L., Steen-Larsen, H. C., Risi, C., Werner, M., Sodemann, H., Lacour, J.-L., Fettweis, X., Cesana, G., Delmotte, M., Cattani, O., Vallelonga, P., Kjær, H. A., Clerbaux, C., Sveinbjörnsdóttir, A. E., and Masson-Delmotte, V., 2015: The summer 2012 Greenland heat wave: In situ and remote sensing observations of water vapor isotopic composition during an atmospheric river event, J. Geophys. Res., 120, 2970-2989, doi:10.1002/2014JD022602.&lt;br /&gt;
* Luetscher, M., Boch, R., Sodemann, H., Spoetl, C., Cheng, H., Edwards, R. L., Frisia, S., Hof, F., Mueller, W., 2015: North Atlantic storm track changes during the Last Glacial Maximum recorded by Alpine speleothems, Nature Comm. 6: 6344, doi:10.1038/ncomms7344.&lt;br /&gt;
* Winschall, A., Sodemann, H.,Pfahl, S. and Wernli, H., 2014: How important is intensified evaporation for Mediterranean precipitation extremes?, J. Geophys. Res., 119: 5240–5256, doi:10.1002/2013JD021175&lt;br /&gt;
* Winschall, A., Pfahl, S., Sodemann, H.and Wernli, H.. 2014. Comparison of Eulerian and Lagrangian moisture source diagnostics - the flood event in eastern Europe in May 2010, Atmos. Chem. Phys. 14: 6605–6619, doi:10.5194/acp-14-6605-2014.&lt;br /&gt;
* Aemisegger, F., Pfahl, S., Sodemann, H., Lehner, I., Seneviratne, S. I., and Wernli, H., 2014: Deuterium excess as a proxy for continental moisture recycling and plant transpiration, Atmos. Chem. Phys., 14: 4029–4054, doi:10.5194/acp-14-4029-2014.&lt;br /&gt;
* Bonne, J. L., Masson-Delmotte, V., Cattani, O., Delmotte, M., Risi, C., Sodemann, H., and Steen-Larsen, H. C., 2014:The isotopic composition of water vapour and precipitation in Ivittuut, southern Greenland, Atmos. Chem. Phys. 14: 4419–4439, doi:10.5194/acp-14-4419-2014.&lt;br /&gt;
* Wang, Y., Sodemann, H., Hou, S., Masson-Delmotte, V. Jouzel, J. and Pang, H., 2013: Snow accumulation and its moisture origin over Dome Argus, Antarctica. Clim. Dyn., 40:731-742, doi: 10.1007/s00382-012-1398-9.&lt;br /&gt;
* Martius, O., Sodemann, H., Joos, H., Pfahl, S., Winschall, A., Croci-Maspoli, M., Graf, M., Madonna, E., Mueller, B., Schemm, S., Sedlacek, J., Sprenger, M. and Wernli, H., 2012: The role of upper-level dynamics and surface processes for the Pakistan flood in July 2010. Quart. J. Royal Meteorol. Soc., published online, doi: 10.1002/qj.2082.&lt;br /&gt;
* Kennett, D. J., Breitenbach, S. F. M., Aquino, V. V., Asmerom, Y., Awe, J., Baldini, J. U. L., Bartlein, P., Culleton, B. J., Ebert, C., Jazwa, C., Macri, M. J., Marwan, N., Polyak, V., Prufer, K. M., Ridley, H. E., Sodemann, H., Winterhalder, B. and Haug, G. H., 2012: Development and Disintegration of Maya Political Systems in Response to Climate Change. Science, 338: 788-791, doi: 10.1126/science.1226299.&lt;br /&gt;
* Winkler, R., Landais, A., Sodemann, H., Dümbgen, L., Priéa, F., Masson-Delmotte, V., Stenni, B., and Jouzel, J., 2012: Deglaciation records of 17O-excess in East Antarctica: reliable reconstruction of oceanic relative humidity from coastal sites. Clim. Past 8, 1-16.&lt;br /&gt;
* Masson-Delmotte, V., Buiron, D., Ekaykin, A., Frezzotti, M., Gallée, H., Jouzel, J., Krinner, G., Landais, A., Motoyama, A., Oerter, H., Pol, K., Pollard, D., Ritz, C., Schlosser, E., Sime, L. C., Sodemann, H., Stenni, B., Uemura R., and Vimeux, F., 2011: A comparison of the present and last interglacial periods in six Antarctic ice cores Clim. Past, 7, 397-423. &lt;br /&gt;
* Sodemann, H.and Zubler, E., 2010: Seasonality and inter-annual variability of the moisture sources for Alpine precipitation during 1995-2002, Int. J. Climatol., 30: 947-961, doi:10.1002/joc.1932.&lt;br /&gt;
* Sodemann, H., and Stohl, A., 2009: Asymmetries in the moisture origin of Antarctic precipitation, Geophys. Res. Lett., 36, L22803, doi:10.1029/2009GL040242.&lt;br /&gt;
* Sodemann, H., Masson-Delmotte, V., Schwierz, C., Vinther, B. M. and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Part II: Effects of North Atlantic Oscillation variability on stable isotopes in precipitation, J. Geophys. Res., 113, D12111, doi:10.1029/2007JD009416.&lt;br /&gt;
* Sodemann, H., Schwierz, C., and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Lagrangian moisture diagnostic and North Atlantic Oscillation influence, J. Geophys. Res.,113, D03107, doi:10.1029/2007JD008503.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=FaVaCal_-_FARLAB_water_vapour_isotope_calibration_processor&amp;diff=1449</id>
		<title>FaVaCal - FARLAB water vapour isotope calibration processor</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=FaVaCal_-_FARLAB_water_vapour_isotope_calibration_processor&amp;diff=1449"/>
		<updated>2021-02-09T20:39:38Z</updated>

		<summary type="html">&lt;p&gt;Hso039: Created page with &amp;quot;&amp;lt;h3&amp;gt;FaVaCal (FARLAB Vapour Calibration Routines) Documentation&amp;lt;/h3&amp;gt;  Version 1.1 (24.08.2019)  &amp;#039;&amp;#039;&amp;#039;Harald Sodemann, Geophysical Institute, University of Bergen, Norway&amp;#039;&amp;#039;&amp;#039;   &amp;lt;h4...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h3&amp;gt;FaVaCal (FARLAB Vapour Calibration Routines) Documentation&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Version 1.1 (24.08.2019)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Harald Sodemann, Geophysical Institute, University of Bergen, Norway&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Purpose &amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FaVaCal has been created to provide a standard routine for the calibration of water vapour measurements from Picarro L2130-i/L2140-i analyzers in use at FARLAB. The primary application is to indentify calibrations obtained from the SDM module. However, it is also possible to perform calibration with other methods. There is support for manual injections into the Picarro Vapourizer, or for self-defined calibrations obtained by other means. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FaVaCal provides an overview of the data processing as HTML report, including quality flags and instrument parameters. The main result are data files with calibrated measurements in netCDF format. The data files contain quality flags and  provide different averaging times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FaVaCal consists of a set of routines written in Matlab. It should be straightforward to translate these routines into other languages, such as python, if necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Installation &amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The FaVaCal code is hosted at the [git.app.uib.no:farlab-codes/farlab_vapour.git FaVaCal git repository]. Download or clone to a local directory to use FaVaCal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the GFI linux system, FaVaCal is installed at &amp;lt;code&amp;gt;/Data/gfi/scratch/metdata/scripts/FARLAB/matlab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Files and structure &amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FaVaCal is operated by defining a run file that creates a set of matlab variables (structures), and then calls the main FaVaCal routine. The name of this routine can be chosen by the user. Typical names in use at FARLAB are e.g. &amp;lt;code&amp;gt;FaVaCal_SNOWPACE_Finse_run01.m&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The files included in FaVaCal are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; FaVaCal_report.m : Create the output directory, call required subroutines in sequence, and produce the HTML report.&lt;br /&gt;
&lt;br /&gt;
; FaVaCal_calibrations.m : Identify calibrations from SDM or manual injections, quality control, plot, and save as structure in file &amp;lt;run&amp;gt;_calibrations.mat&lt;br /&gt;
&lt;br /&gt;
; FaVaCal_calibrate.m : Perform quality control of vapour data, calibration, time averaging, daily and overview plots, and netCDF output.&lt;br /&gt;
&lt;br /&gt;
; FARLAB_standards.m : A file containing information about the available calibration standards. This file is shared with the FLIIMP project.&lt;br /&gt;
&lt;br /&gt;
; FARLAB_vapour_data.m : Routine to read in vapour data for a given time range. The vapour data are in raw netCDF format, which is obtained from a python conversion routine &amp;lt;code&amp;gt;FARLAB_Picarro_dat2nc.py&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Usage &amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FaVaCal consists of a set of routines written in Matlab. Before running the calibration, the user needs to create a run file that defines a set of matlab variables. These matlab variables contain all the settings required to perform the calibration, as explained below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; General working principle &amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FaVaCal then proceeds to identify the calibrations from the raw data files, performs quality control of the identified calibrations, and creates overview figures for each calibration. The result of the calibrations is saved as a matlab file in the output folder, named &amp;lt;code&amp;gt;FARLAB_HKDS2038_calibrations.mat&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thereafter, the vapour data are calibrated one day at a time. For each day, the nearest 2 (default value) valid calibrations are identified, averaged, and used for calibration. Quality codes, flagging and filtering is performed on the native time resolution data (see below). The data is then averaged to 1s, 10s, 30s, 1min and 1h time resolution, and all resolutions are saved into one netCDF data file. Overview plots of the calibrated data and instrument parameters are created for each day and the entire calibration period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, a HTML report is created that summarizes the calibration run, and includes the overview figures and a table of all calibrations (see below). Additionally, a method description is included, as well as recommendations for acknowledgements in scientific publications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Calibration period identification &amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The entire calibration period was first processed for calibration periods with the SDM. The SDM was equipped with two bags, one each filled with standard DI ( -7.78 permil δ18O and δD -50.38 permil) and GSM1 (-33.07 permil in δ18O and -262.95 permil in δD). Typically, standards were applied to the analyzer 1-2 times in a 24 h period. Dry air was supplied from a synthetic air cylinder, or from a drierite patron.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Calibration periods were identified for each day as periods when the valve mask switches to 6, which is the case during SDM calibration. Then for each calibration period, the median value of humidity, δ18O and δD are obtained. To identify bursting bubbles and other variations that are generally due to deficiencies of the SDM vapour stream generator, values where that deviate by more than 0.5 permil in δ18O or 4.0 permil in δD are discarded. The remaining data for each period are then averaged and the standard deviation calculated. Each calibration is then assigned with quality flags according to the following criteria:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Unknown standard, bit 1, value 1: Median value can not be matched with an expected value for a standard.&lt;br /&gt;
* Humidity range, bit 2, value 2: Humidity below 17000 ppmv or above 23000 ppmv.&lt;br /&gt;
* Humidity variation, bit 3, value 4: Standard deviation of humidity larger than 500 ppmv.&lt;br /&gt;
* Isotope variation, bit 4, value 8: Isotope variability above 0.5 permil for δ18O or above 5.0 permil for δD.&lt;br /&gt;
* Bubble bursting, bit 5, value 16: Humidity disturbances with max(H2O) exceeding 23000 ppmv.&lt;br /&gt;
* Low data fraction, bit 6, value 32: More than 60.0&amp;amp;perc; of data removed from calibration period.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Quality flags and data calibration &amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, the vapour measurements are calibrated using calibrations of sufficient quality. For each calendar day in the period, data was calibrated using the two nearest available calibrations with sufficient quality within the entire calibration period. Sufficient quality is defined as quality flags 1, 2 and 6 not set. Quality flags 3, 4 and 5 increase uncertainty, but do not invalidate a calibration period. Calibration of offset and slope onto the VSMOW2-SLAP2 scale with FARLAB laboratory standards DI and GSM1 follows the recommendations of IAEA (2010).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For quality control of the vapour data, time periods of instrument parameter ranges outside of specifications are flagged and, if applicable, deleted. Each data point is assigned a vapour quality flag according to the following criteria:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Calibration period, bit 1, value 1: ValveMask is 0, flagged but not deleted.&lt;br /&gt;
* Low humidity, bit 2, value 2: Mixing ratio of H2O below 200 ppmv.&lt;br /&gt;
* Spike in δ18O, bit 3, value 4: deviation of δ18O to previous value exceeds 400.0 permil.&lt;br /&gt;
* Spike in d-excess, bit 4, value 8: deviation of d-excess to previous value exceeds 100.0 permil.&lt;br /&gt;
* Low cavity temperature, bit 5, value 16: Cavity temperature below 79.9 deg C (typically during warmup). 1500s after a low cavity temperature event are removed to allow for instrument stabilisation.&lt;br /&gt;
* Specified event, bit 6, value 32: Event specified in event list occurred.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thereafter, calibrated data are averaged over specific time periods, using a running averaging window of 1s, 10s, 1min, 10min and 1h. Averaged values of the isotope parameters and key instrument parameters are then written to a netCDF file. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Input file format&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input file format consists of 3 sets of variable definitions as matlab structures. These are explained in detail below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h5&amp;gt;Run settings&amp;lt;/h5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The run settings cover a identifying name (project), time period (startdate, enddate), the instrument serial number (instrument), input path for the raw files (inpath), the output path directory (outpath). Furthermore, the date of report generation (reportDate), the name and contact email of the operator (person who performs calibration: operator, operatorContact) and the customer (owner of the dataset: customer, contact) are provided.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
% run settings&lt;br /&gt;
settings.project=&#039;IGP2018_ship&#039;;&lt;br /&gt;
settings.startdate=datenum(&#039;2018-02-25&#039;);&lt;br /&gt;
settings.enddate=datenum(&#039;2018-03-22&#039;);&lt;br /&gt;
settings.instrument=&#039;HKDS2038&#039;;&lt;br /&gt;
settings.outpath=&#039;/Data/gfi/projects/farlab/Instruments/calibrated&#039;;&lt;br /&gt;
settings.inpath=&#039;/Data/gfi/scratch/metdata/FARLAB/%s/raw&#039;;&lt;br /&gt;
settings.reportDate=now;&lt;br /&gt;
settings.operator=&#039;Harald Sodemann&#039;;&lt;br /&gt;
settings.operatorContact=&#039;harald.sodemann@uib.no&#039;;&lt;br /&gt;
settings.customer=&#039;Harald Sodemann&#039;;&lt;br /&gt;
settings.contact=&#039;harald.sodemann@uib.no&#039;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calibration settings control how the calibration is performed. The calibration routine automatically searches for either SDM calibrations or manual injections, using the Picarro&#039;s ValveMode flag. The standards  used for each calibration (standardNames) are identified automatically from the definitions for different laboratory standard calibrations, set in the file FARLAB_standard.m (calset). The latest FARLAB calibration is currently 3. For each day, a given number of nearest calibrations is selected and averaged during calibration (ncals). If calibrations need to be specified manually, the automatic identification needs to be deactivated (replace=-1). In that case, additional calibration information can be provided that is included at the beginning of section 4 of the calibration report.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
% calibration settings&lt;br /&gt;
settings.calset=4; % which FARLAB calibration set to load (4: Iceland standards)&lt;br /&gt;
settings.standardNames={&#039;GV&#039;;&#039;NEEM&#039;};&lt;br /&gt;
settings.ncals=4; % number of calibrations required for processing&lt;br /&gt;
settings.replace=-1; % replace exisiting calibrations file or use existing one, -1 for manual mode&lt;br /&gt;
% additional text for calibration method section&lt;br /&gt;
settings.calinfo=&#039;Calibration was performed using manual injections of standard liquids. The description below needs to be considered as of similar principle, but regarding manual injections&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The automatic detection of calibrations, and quality control of the these, is controlled by a set of calibration parameters. This is organised as a sub-structure of the structure settings. 6 quality flags are set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# unknown standard, automatic standard name detection failed&lt;br /&gt;
# mean humidity outside the specified range (qmin,qmax)&lt;br /&gt;
# humidity standard deviation above threshold (qstd)&lt;br /&gt;
# isotope parameter standard deviation above threshold (O18std, H2std)&lt;br /&gt;
# humidity maximum above threshold (bubble detection, qmax)&lt;br /&gt;
# deleted fraction above threshold (delfrac)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quality flag of either 1,2 or 5 being set will result in not using the calibration run for data calibration. The minimum duration for SDM calibrations is typically 600s, whereas manual injections have a minimum length of 180s (minlen).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
% parameters to flag/quality code during calibration detection&lt;br /&gt;
settings.calparams.qmin=15000;&lt;br /&gt;
settings.calparams.qmax=25000;&lt;br /&gt;
settings.calparams.qstd=500;&lt;br /&gt;
settings.calparams.O18std=0.5;&lt;br /&gt;
settings.calparams.H2std=5.0;&lt;br /&gt;
settings.calparams.delfrac=60.0;&lt;br /&gt;
settings.calparams.minlen=180; % minimum length of a calibration&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A different set of quality flags is defined for the data outside calibration periods. 5 quality flags are set during this processing step:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Calibration period (from automatic calibration identification)&lt;br /&gt;
# Low humidity (qmin)&lt;br /&gt;
# Spike in O-18 during a measuring interval (O18spike)&lt;br /&gt;
# Spike in d-excess during a measuring interval (dspike)&lt;br /&gt;
# Low cavity temperature (ctlow). A time period is removed after the temperature low to remove the overshoot heating (ctcut).&lt;br /&gt;
# Event period (see below)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
% parameters to flag/quality code during data processing&lt;br /&gt;
settings.qcparams.qmin=200;&lt;br /&gt;
settings.qcparams.O18spike=400;&lt;br /&gt;
settings.qcparams.dspike=100;&lt;br /&gt;
settings.qcparams.ctlow=79.5;&lt;br /&gt;
settings.qcparams.ctcut=750;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h5&amp;gt;Calibrations (Optional section)&amp;lt;/h5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively to the automatic identification of calibration periods, manual calibrations can be specified. In this case, the parameter settings.replace must be set to -1, and settings.calibrations must be defined as exemplified below. It can be useful to manually specify calibrations to test the effect of calibration parameters, or if a bubbler or other external device is used in the calibration process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example below, 2 calibration runs are specified (run), with two different standards each (standard), with specified time segments (starts,ends), and quality codes (quality). The mean and standard deviations of humidity (H2O, H2O_SD), of O-18 (d18O, d18O_SD), of dD (dD, dD_SD) and d-excess (d, d_SD) are specified for each segment. The minimum and maximum water concentration (minH2O, maxH2O), a minimum humidity (dryValue) and the deleted data fraction are also specified manually (delFrac). Even if there is no figure for the calibration periods (figstr is set to empty), the parameter must be provided.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
% manually create calibrations&lt;br /&gt;
settings.calibrations=[];&lt;br /&gt;
settings.calibrations.starts=[datenum(2018,3,22,14,42,56),datenum(2018,3,22,15,3,3),datenum(2018,3,22,21,25,28),datenum(2018,3,22,21,45,34)];&lt;br /&gt;
settings.calibrations.ends=[datenum(2018,3,22,15,2,0),datenum(2018,3,22,15,23,6),datenum(2018,3,22,21,45,28),datenum(2018,3,22,22,5,34)];&lt;br /&gt;
settings.calibrations.run=[1 2 1 2];&lt;br /&gt;
settings.calibrations.standard=[1 1 2 2];&lt;br /&gt;
settings.calibrations.quality=[0 0 0 0];&lt;br /&gt;
settings.calibrations.H2O=[24800 24965 25510 25037];&lt;br /&gt;
settings.calibrations.H2O_SD=[157 151 164 165];&lt;br /&gt;
settings.calibrations.dD=[-266.301 -266.641 -45.354 -45.106];&lt;br /&gt;
settings.calibrations.dD_SD=[0.658 0.625 0.776 0.700];&lt;br /&gt;
settings.calibrations.d18O=[-36.202 -36.208 -10.928 -10.902];&lt;br /&gt;
settings.calibrations.d18O_SD=[0.124 0.103 0.134 0.140];&lt;br /&gt;
settings.calibrations.d=[23.315 23.279 41.07 42.110 ];&lt;br /&gt;
settings.calibrations.d_SD=[1 1 1 1];&lt;br /&gt;
settings.calibrations.minH2O=[24800 24965 25510 25037];&lt;br /&gt;
settings.calibrations.maxH2O=[24800 24965 25510 25037];&lt;br /&gt;
settings.calibrations.dryValue=[0 0 0 0];&lt;br /&gt;
settings.calibrations.delFrac=[0 0 0 0];&lt;br /&gt;
settings.calibrations.figstr=cell(4,1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h5&amp;gt;Event specification&amp;lt;/h5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Special event periods can be specified, that are either only indicated in the calibration plots (mode 0), or that lead to the deletion of the respective data period from the calibrated files (mode -1). Each event consists of a start date, end date, description string, and the mode identifier. Events are included with the parameter settings.event. The events are included as an own quality flag, and listed with numbers in the data report (Table 2) and respective overview figures (Fig. 1 and 2).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
% create special events to note (mode 0) or to delete (mode -1)&lt;br /&gt;
event{1}={datenum(2018,2,25,0,0,0),datenum(2018,2,25,20,30,0),&#039;Instrument installed&#039;,0};&lt;br /&gt;
event{2}={datenum(2018,2,26,14,0,0),datenum(2018,2,26,15,30,0),&#039;Dry air&#039;,-1};&lt;br /&gt;
event{3}={datenum(2018,2,26,18,10,0),datenum(2018,2,26,20,45,0),&#039;Dry air&#039;,-1};&lt;br /&gt;
event{4}={datenum(2018,2,27,11,20,0),datenum(2018,2,27,11,45,0),&#039;Dry air&#039;,-1};&lt;br /&gt;
event{5}={datenum(2018,2,27,12,10,0),datenum(2018,2,27,13,10,0),&#039;Dry air&#039;,-1};&lt;br /&gt;
event{6}={datenum(2018,2,28,19,10,0),datenum(2018,2,28,19,40,0),&#039;Dry air&#039;,-1};&lt;br /&gt;
event{7}={datenum(2018,3,6,23,0,0),datenum(2018,3,6,23,15,0),&#039;Dry air&#039;,-1};&lt;br /&gt;
event{8}={datenum(2018,3,9,16,0,0),datenum(2018,3,9,17,0,0),&#039;Breathing test?&#039;,0};&lt;br /&gt;
event{9}={datenum(2018,3,22,12,10,0),datenum(2018,3,22,13,0,0),&#039;Dry air&#039;,-1};&lt;br /&gt;
event{10}={datenum(2018,3,22,10,0,0),datenum(2018,3,22,11,0,0),&#039;Breathing test&#039;,0};&lt;br /&gt;
event{11}={datenum(2018,3,22,23,0,0),datenum(2018,3,22,23,59,59),&#039;Instrument deinstalled&#039;,-1};&lt;br /&gt;
settings.event=event;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h5&amp;gt;Metadata for netCDF files&amp;lt;/h5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The metadata to be included in each daily netCDF data file includes essential parameters for ownership, contact, location, time period, instrumentation, reference, and further comments, as exemplified below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
% provide metadata as parameter&lt;br /&gt;
metadata.email=&#039;harald.sodemann@uib.no&#039;;&lt;br /&gt;
metadata.contact=&#039;Harald Sodemann&#039;;&lt;br /&gt;
metadata.version=&#039;1.0&#039;;&lt;br /&gt;
metadata.latitude=&#039;66.38 deg N&#039;;&lt;br /&gt;
metadata.longitude=&#039;5.33 deg W&#039;;&lt;br /&gt;
metadata.elevation=&#039;34.0 m a.s.l.&#039;;&lt;br /&gt;
metadata.location_name=&#039;R/V Alliance, Measurement container, boat deck&#039;;&lt;br /&gt;
metadata.created=datestr(now);&lt;br /&gt;
metadata.serial_number=settings.instrument;&lt;br /&gt;
metadata.instrument=&#039;Picarro L2140-i&#039;;&lt;br /&gt;
metadata.institution=&#039;Geophysical Institute, University of Bergen, Norway&#039;;&lt;br /&gt;
metadata.title=&#039;IGP campaign 2018, stable isotope measurements of water vapour on R/V Alliance&#039;;&lt;br /&gt;
metadata.comment=&#039;Picarro L2140-i installed in met container with heated inlet 3m above&#039;;&lt;br /&gt;
metadata.references=&#039;Renfrew et al., 2019, BAMS&#039;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The final statement in the run file must be the call to the FaVaCal_report() routine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
% call the calibration routine with all parameters&lt;br /&gt;
FARLAB_vapour_dataset(settings,metadata);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Report and output directory &amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FaVaCal summarizes the calibration result in a comprehensive calibration report. The report is rendered from the figures and data produced during calibration identification and the data calibration. The sections and figures of the report are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Summary&lt;br /&gt;
# Calibrated data&lt;br /&gt;
#* Figure 1: Overview over measurement period (1 minute averages)&lt;br /&gt;
#* Figure 2: Daily overview figures showing 10 second averages (black) with standard deviation (grey)).&lt;br /&gt;
# Acknowledgement section for publications&lt;br /&gt;
# Method description for publications&lt;br /&gt;
# Instrument stability&lt;br /&gt;
#* Figure 3: Overview over instrument status during entire calibration period.&lt;br /&gt;
# Calibration overview&lt;br /&gt;
#* Table 1: Calibrations summary.&lt;br /&gt;
# Preprocessing and corrections&lt;br /&gt;
#* Table 2: Event log.&lt;br /&gt;
# Appendix: Figures for all calibrations&lt;br /&gt;
#* Figure 6: Details for each calibration. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The report is located as index.html in the FaVaCal output directory. The output directory is placed at the location specified in the run settings file. In addition, there is a folder for the calibrated netCDF data files, and the figures produced during the calibration run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
INTAROS2018-HKDS2038_20180731_20190823&lt;br /&gt;
    calibrations.mat - matlab data file with identified or specified calibrations&lt;br /&gt;
    img - folder with image files in png format&lt;br /&gt;
    index.html -  report in HTML format&lt;br /&gt;
    calibrated - folder with calibrated data files in netCDF format&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt; Output netCDF file format&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
FaVaCal produces netCDF data files with the calibrated data. The metadata are included from the specifications in the run setup file, according to user input. In addition, information about the chosen calibrations and processing is included. Variables in the data files include the raw data (if requested), as well as various time resolutions. Only a few essential instrument parameters (Cavity temperature, Cavity pressure, Warm box temperature) are included from the raw data files. The quality flag is retained at the native time resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;Metadata&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
// global attributes:&lt;br /&gt;
		:email = &amp;quot;harald.sodemann@uib.no&amp;quot; ;&lt;br /&gt;
		:contact = &amp;quot;Harald Sodemann&amp;quot; ;&lt;br /&gt;
		:version = &amp;quot;1.0&amp;quot; ;&lt;br /&gt;
		:latitude = &amp;quot;60.38 deg N&amp;quot; ;&lt;br /&gt;
		:longitude = &amp;quot;5.33 deg E&amp;quot; ;&lt;br /&gt;
		:elevation = &amp;quot;34.0 m a.s.l.&amp;quot; ;&lt;br /&gt;
		:location_name = &amp;quot;KV Svalbard&amp;quot; ;&lt;br /&gt;
		:created = &amp;quot;23-Aug-2019 13:49:34&amp;quot; ;&lt;br /&gt;
		:serial_number = &amp;quot;HKDS2038&amp;quot; ;&lt;br /&gt;
		:instrument = &amp;quot;Picarro L2140-i&amp;quot; ;&lt;br /&gt;
		:institution = &amp;quot;Geophysical Institute, University of Bergen, Norway&amp;quot; ;&lt;br /&gt;
		:title = &amp;quot;Stable isotope measurements of water vapour in Bergen&amp;quot; ;&lt;br /&gt;
		:comment = &amp;quot;Picarro L2140-i installed on board KV Svalbard during the INTAROS cruise&amp;quot; ;&lt;br /&gt;
		:references = &amp;quot;&amp;quot; ;&lt;br /&gt;
		:calibration\ standard\ 1 = &amp;quot;DI (d18O:  -7.33 permil, dD:  -49.95 permil)&amp;quot; ;&lt;br /&gt;
		:calibration\ 1\ for\ standard\ 1 = &amp;quot;31-Jul-2018 10:28:16 (d18O:  -7.38 permil, dD: -49.80 permil)&amp;quot; ;&lt;br /&gt;
		:calibration\ 2\ for\ standard\ 1 = &amp;quot;02-Aug-2018 06:32:46 (d18O:  -7.28 permil, dD: -50.10 permil)&amp;quot; ;&lt;br /&gt;
		:calibration\ standard\ 2 = &amp;quot;GSM1 (d18O: -32.43 permil, dD: -263.49 permil)&amp;quot; ;&lt;br /&gt;
		:calibration\ 1\ for\ standard\ 2 = &amp;quot;31-Jul-2018 09:47:50 (d18O: -32.45 permil, dD:-263.50 permil)&amp;quot; ;&lt;br /&gt;
		:calibration\ 2\ for\ standard\ 2 = &amp;quot;02-Aug-2018 05:52:22 (d18O: -32.41 permil, dD:-263.48 permil)&amp;quot; ;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h5&amp;gt;Water isotope variables&amp;lt;/h5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
netcdf FARLAB_HKDS2038_cal_V1_20180731 {&lt;br /&gt;
    dimensions:&lt;br /&gt;
	time_1s = 219764 ;&lt;br /&gt;
	time_10s = 8640 ;&lt;br /&gt;
	time_1min = 1440 ;&lt;br /&gt;
	time_10min = 144 ;&lt;br /&gt;
	time_1h = 24 ;&lt;br /&gt;
    variables:&lt;br /&gt;
	double time_1s(time_1s) ;&lt;br /&gt;
		time_1s:units = &amp;quot;days since 0001-01-01 00:00:00&amp;quot; ;&lt;br /&gt;
		time_1s:long_name = &amp;quot;time_1s&amp;quot; ;&lt;br /&gt;
	float delta_18O_1s(time_1s) ;&lt;br /&gt;
		delta_18O_1s:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_18O_1s:_FillValue = -999.99f ;&lt;br /&gt;
		delta_18O_1s:long\ name = &amp;quot;Oxygen-18&amp;quot; ;&lt;br /&gt;
	float delta_D_1s(time_1s) ;&lt;br /&gt;
		delta_D_1s:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_D_1s:missing_data = -999.99f ;&lt;br /&gt;
		delta_D_1s:long\ name = &amp;quot;Deuterium&amp;quot; ;&lt;br /&gt;
	float d_1s(time_1s) ;&lt;br /&gt;
		d_1s:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		d_1s:_FillValue = -999.99f ;&lt;br /&gt;
		d_1s:long\ name = &amp;quot;Deuterium excess&amp;quot; ;&lt;br /&gt;
	float q_1s(time_1s) ;&lt;br /&gt;
		q_1s:units = &amp;quot;g kg-1&amp;quot; ;&lt;br /&gt;
		q_1s:_FillValue = -999.99f ;&lt;br /&gt;
		q_1s:long\ name = &amp;quot;Specific humidity&amp;quot; ;&lt;br /&gt;
	double time_10s(time_10s) ;&lt;br /&gt;
		time_10s:units = &amp;quot;days since 0001-01-01 00:00:00&amp;quot; ;&lt;br /&gt;
		time_10s:long_name = &amp;quot;time_10s&amp;quot; ;&lt;br /&gt;
	float delta_18O_10s(time_10s) ;&lt;br /&gt;
		delta_18O_10s:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_18O_10s:_FillValue = -999.99f ;&lt;br /&gt;
		delta_18O_10s:long\ name = &amp;quot;Oxygen-18&amp;quot; ;&lt;br /&gt;
	float delta_D_10s(time_10s) ;&lt;br /&gt;
		delta_D_10s:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_D_10s:missing_data = -999.99f ;&lt;br /&gt;
		delta_D_10s:long\ name = &amp;quot;Deuterium&amp;quot; ;&lt;br /&gt;
	float d_10s(time_10s) ;&lt;br /&gt;
		d_10s:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		d_10s:_FillValue = -999.99f ;&lt;br /&gt;
		d_10s:long\ name = &amp;quot;Deuterium excess&amp;quot; ;&lt;br /&gt;
	float q_10s(time_10s) ;&lt;br /&gt;
		q_10s:units = &amp;quot;g kg-1&amp;quot; ;&lt;br /&gt;
		q_10s:_FillValue = -999.99f ;&lt;br /&gt;
		q_10s:long\ name = &amp;quot;Specific humidity&amp;quot; ;&lt;br /&gt;
	float delta_18O_10s_SD(time_10s) ;&lt;br /&gt;
		delta_18O_10s_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_18O_10s_SD:_FillValue = -999.99f ;&lt;br /&gt;
		delta_18O_10s_SD:long\ name = &amp;quot;standard deviation of Oxygen-18&amp;quot; ;&lt;br /&gt;
	float delta_D_10s_SD(time_10s) ;&lt;br /&gt;
		delta_D_10s_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_D_10s_SD:_FillValue = -999.99f ;&lt;br /&gt;
		delta_D_10s_SD:long\ name = &amp;quot;standard deviation of Deuterium&amp;quot; ;&lt;br /&gt;
	float d_10s_SD(time_10s) ;&lt;br /&gt;
		d_10s_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		d_10s_SD:_FillValue = -999.99f ;&lt;br /&gt;
		d_10s_SD:long\ name = &amp;quot;standard deviation of Deuterium excess&amp;quot; ;&lt;br /&gt;
	float q_10s_SD(time_10s) ;&lt;br /&gt;
		q_10s_SD:units = &amp;quot;g kg-1&amp;quot; ;&lt;br /&gt;
		q_10s_SD:long\ name = &amp;quot;standard deviation of specific humidity&amp;quot; ;&lt;br /&gt;
		q_10s_SD:_FillValue = -999.99f ;&lt;br /&gt;
	double time_1min(time_1min) ;&lt;br /&gt;
		time_1min:units = &amp;quot;days since 0001-01-01 00:00:00&amp;quot; ;&lt;br /&gt;
		time_1min:long_name = &amp;quot;time_1min&amp;quot; ;&lt;br /&gt;
	float delta_18O_1min(time_1min) ;&lt;br /&gt;
		delta_18O_1min:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_18O_1min:_FillValue = -999.99f ;&lt;br /&gt;
		delta_18O_1min:long\ name = &amp;quot;Oxygen-18&amp;quot; ;&lt;br /&gt;
	float delta_D_1min(time_1min) ;&lt;br /&gt;
		delta_D_1min:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_D_1min:missing_data = -999.99f ;&lt;br /&gt;
		delta_D_1min:long\ name = &amp;quot;Deuterium&amp;quot; ;&lt;br /&gt;
	float d_1min(time_1min) ;&lt;br /&gt;
		d_1min:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		d_1min:_FillValue = -999.99f ;&lt;br /&gt;
		d_1min:long\ name = &amp;quot;Deuterium excess&amp;quot; ;&lt;br /&gt;
	float q_1min(time_1min) ;&lt;br /&gt;
		q_1min:units = &amp;quot;g kg-1&amp;quot; ;&lt;br /&gt;
		q_1min:_FillValue = -999.99f ;&lt;br /&gt;
		q_1min:long\ name = &amp;quot;Specific humidity&amp;quot; ;&lt;br /&gt;
	float delta_18O_1min_SD(time_1min) ;&lt;br /&gt;
		delta_18O_1min_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_18O_1min_SD:_FillValue = -999.99f ;&lt;br /&gt;
		delta_18O_1min_SD:long\ name = &amp;quot;standard deviation of Oxygen-18&amp;quot; ;&lt;br /&gt;
	float delta_D_1min_SD(time_1min) ;&lt;br /&gt;
		delta_D_1min_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_D_1min_SD:_FillValue = -999.99f ;&lt;br /&gt;
		delta_D_1min_SD:long\ name = &amp;quot;standard deviation of Deuterium&amp;quot; ;&lt;br /&gt;
	float d_1min_SD(time_1min) ;&lt;br /&gt;
		d_1min_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		d_1min_SD:_FillValue = -999.99f ;&lt;br /&gt;
		d_1min_SD:long\ name = &amp;quot;standard deviation of Deuterium excess&amp;quot; ;&lt;br /&gt;
	float q_1min_SD(time_1min) ;&lt;br /&gt;
		q_1min_SD:units = &amp;quot;g kg-1&amp;quot; ;&lt;br /&gt;
		q_1min_SD:long\ name = &amp;quot;standard deviation of specific humidity&amp;quot; ;&lt;br /&gt;
		q_1min_SD:_FillValue = -999.99f ;&lt;br /&gt;
	double time_10min(time_10min) ;&lt;br /&gt;
		time_10min:units = &amp;quot;days since 0001-01-01 00:00:00&amp;quot; ;&lt;br /&gt;
		time_10min:long_name = &amp;quot;time_10min&amp;quot; ;&lt;br /&gt;
	float delta_18O_10min(time_10min) ;&lt;br /&gt;
		delta_18O_10min:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_18O_10min:_FillValue = -999.99f ;&lt;br /&gt;
		delta_18O_10min:long\ name = &amp;quot;Oxygen-18&amp;quot; ;&lt;br /&gt;
	float delta_D_10min(time_10min) ;&lt;br /&gt;
		delta_D_10min:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_D_10min:missing_data = -999.99f ;&lt;br /&gt;
		delta_D_10min:long\ name = &amp;quot;Deuterium&amp;quot; ;&lt;br /&gt;
	float d_10min(time_10min) ;&lt;br /&gt;
		d_10min:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		d_10min:_FillValue = -999.99f ;&lt;br /&gt;
		d_10min:long\ name = &amp;quot;Deuterium excess&amp;quot; ;&lt;br /&gt;
	float q_10min(time_10min) ;&lt;br /&gt;
		q_10min:units = &amp;quot;g kg-1&amp;quot; ;&lt;br /&gt;
		q_10min:_FillValue = -999.99f ;&lt;br /&gt;
		q_10min:long\ name = &amp;quot;Specific humidity&amp;quot; ;&lt;br /&gt;
	float delta_18O_10min_SD(time_10min) ;&lt;br /&gt;
		delta_18O_10min_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_18O_10min_SD:_FillValue = -999.99f ;&lt;br /&gt;
		delta_18O_10min_SD:long\ name = &amp;quot;standard deviation of Oxygen-18&amp;quot; ;&lt;br /&gt;
	float delta_D_10min_SD(time_10min) ;&lt;br /&gt;
		delta_D_10min_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_D_10min_SD:_FillValue = -999.99f ;&lt;br /&gt;
		delta_D_10min_SD:long\ name = &amp;quot;standard deviation of Deuterium&amp;quot; ;&lt;br /&gt;
	float d_10min_SD(time_10min) ;&lt;br /&gt;
		d_10min_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		d_10min_SD:_FillValue = -999.99f ;&lt;br /&gt;
		d_10min_SD:long\ name = &amp;quot;standard deviation of Deuterium excess&amp;quot; ;&lt;br /&gt;
	float q_10min_SD(time_10min) ;&lt;br /&gt;
		q_10min_SD:units = &amp;quot;g kg-1&amp;quot; ;&lt;br /&gt;
		q_10min_SD:long\ name = &amp;quot;standard deviation of specific humidity&amp;quot; ;&lt;br /&gt;
		q_10min_SD:_FillValue = -999.99f ;&lt;br /&gt;
	double time_1h(time_1h) ;&lt;br /&gt;
		time_1h:units = &amp;quot;days since 0001-01-01 00:00:00&amp;quot; ;&lt;br /&gt;
		time_1h:long_name = &amp;quot;time_1h&amp;quot; ;&lt;br /&gt;
	float delta_18O_1h(time_1h) ;&lt;br /&gt;
		delta_18O_1h:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_18O_1h:_FillValue = -999.99f ;&lt;br /&gt;
		delta_18O_1h:long\ name = &amp;quot;Oxygen-18&amp;quot; ;&lt;br /&gt;
	float delta_D_1h(time_1h) ;&lt;br /&gt;
		delta_D_1h:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_D_1h:missing_data = -999.99f ;&lt;br /&gt;
		delta_D_1h:long\ name = &amp;quot;Deuterium&amp;quot; ;&lt;br /&gt;
	float d_1h(time_1h) ;&lt;br /&gt;
		d_1h:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		d_1h:_FillValue = -999.99f ;&lt;br /&gt;
		d_1h:long\ name = &amp;quot;Deuterium excess&amp;quot; ;&lt;br /&gt;
	float q_1h(time_1h) ;&lt;br /&gt;
		q_1h:units = &amp;quot;g kg-1&amp;quot; ;&lt;br /&gt;
		q_1h:_FillValue = -999.99f ;&lt;br /&gt;
		q_1h:long\ name = &amp;quot;Specific humidity&amp;quot; ;&lt;br /&gt;
	float delta_18O_1h_SD(time_1h) ;&lt;br /&gt;
		delta_18O_1h_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_18O_1h_SD:_FillValue = -999.99f ;&lt;br /&gt;
		delta_18O_1h_SD:long\ name = &amp;quot;standard deviation of Oxygen-18&amp;quot; ;&lt;br /&gt;
	float delta_D_1h_SD(time_1h) ;&lt;br /&gt;
		delta_D_1h_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		delta_D_1h_SD:_FillValue = -999.99f ;&lt;br /&gt;
		delta_D_1h_SD:long\ name = &amp;quot;standard deviation of Deuterium&amp;quot; ;&lt;br /&gt;
	float d_1h_SD(time_1h) ;&lt;br /&gt;
		d_1h_SD:units = &amp;quot;permil&amp;quot; ;&lt;br /&gt;
		d_1h_SD:_FillValue = -999.99f ;&lt;br /&gt;
		d_1h_SD:long\ name = &amp;quot;standard deviation of Deuterium excess&amp;quot; ;&lt;br /&gt;
	float q_1h_SD(time_1h) ;&lt;br /&gt;
		q_1h_SD:units = &amp;quot;g kg-1&amp;quot; ;&lt;br /&gt;
		q_1h_SD:long\ name = &amp;quot;standard deviation of specific humidity&amp;quot; ;&lt;br /&gt;
		q_1h_SD:_FillValue = -999.99f ;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h5&amp;gt;Instrument parameters&amp;lt;/h5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;background-color: Gainsboro&amp;quot;&amp;gt;&lt;br /&gt;
float Tc_1s(time_1s) ;&lt;br /&gt;
		Tc_1s:units = &amp;quot;deg C&amp;quot; ;&lt;br /&gt;
		Tc_1s:_FillValue = -999.99f ;&lt;br /&gt;
		Tc_1s:long\ name = &amp;quot;Cavity temperature&amp;quot; ;&lt;br /&gt;
	float pc_1s(time_1s) ;&lt;br /&gt;
		pc_1s:units = &amp;quot;Torr&amp;quot; ;&lt;br /&gt;
		pc_1s:_FillValue = -999.99f ;&lt;br /&gt;
		pc_1s:long\ name = &amp;quot;Cavity pressure&amp;quot; ;&lt;br /&gt;
	float Twb_1s(time_1s) ;&lt;br /&gt;
		Twb_1s:units = &amp;quot;deg C&amp;quot; ;&lt;br /&gt;
		Twb_1s:_FillValue = -999.99f ;&lt;br /&gt;
		Twb_1s:long\ name = &amp;quot;Warm box temperature&amp;quot; ;&lt;br /&gt;
	float flag_1s(time_1s) ;&lt;br /&gt;
		flag_1s:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
		flag_1s:_FillValue = -999.99f ;&lt;br /&gt;
		flag_1s:long\ name = &amp;quot;Quality flag&amp;quot; ;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Rayleigh_model&amp;diff=1448</id>
		<title>Rayleigh model</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Rayleigh_model&amp;diff=1448"/>
		<updated>2021-01-26T20:26:40Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
The Rayleigh distillation model describes the evolution of a multiple-phase system in which one phase is continuously removed to the other phase through fractional distillation. Despite its simplicity, it is a powerful framework to describe in particular the isotopic enrichment or depletion as material moves between reservoirs in an equilibrium fractionation process. &lt;br /&gt;
&lt;br /&gt;
== Model description ==&lt;br /&gt;
&lt;br /&gt;
The system applying the Rayleigh equation is often an open system, from which the newly formed phase is immediately removed. For example, the evaporation of natural water bodies, and the formation of precipitation that immediately leaves the system, can be regarded as examples for open systems. However, with some modifications, Rayleigh models can be also applied to other systems. One such system is a closed system (or two-phase equilibrium model; Gat, (1996)), where the material removed from one reservoir accumulates in a second reservoir in such a manner that isotopic equilibrium is maintained between the two reservoirs. An example for this would be the condensation of vapour to droplets in a cloud, without formation and removal of precipitation.&lt;br /&gt;
&lt;br /&gt;
The isotopic enrichment or depletion by the Rayleigh process for both open and closed systems can be mathematically obtained by different approaches (Fig. 1). The Rayleigh equations that are used to describe the isotopic evolution of the remaining reservoir under different conditions are summarized in Table 1. The isotope ratio of the accumulated removal can be derived using mass conservation of rare isotopes remaining in the reservoir, and the removed component: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; fR_\text{remain} + (1-f)R_\text{remove,acc} = R_0 &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
In the case of condensation involving both liquid and solid phases, the accumulation is a combination of the removed mass fraction of both phases. First, following the equation above, the total liquid removal is calculated as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; R_\text{l,acc} = (R_0-fR_v)/(1-f) &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Then, we consider a separated Rayleigh process by only taking into account of the ongoing formation of the solid phase. Following the same reasoning as above, the isotope ratio of the accumulated solid removal is calculated by &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; f_iR_\text{i,v} + (1-f_i)R_\text{i,acc} = R_\text{v0} &amp;lt;/math&amp;gt;, &lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;R_\text{v0}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_\text{i,v}&amp;lt;/math&amp;gt; are the isotope ratio of the remaining vapour at the start and the calculating point of the solid condensation stage, respectively, and &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt; the fraction of remaining vapour within the solid condensation stage. Finally and again, using mass conservation of the rare isotopes, we obtain the isotope ratio of the total accumulation of the removal by &amp;lt;math&amp;gt; (1-ff_i)R_\text{acc} = (1-f)R_\text{l,acc} + f(1-f_i)R_\text{i,acc} &amp;lt;/math&amp;gt;. Corresponding examples of the calculated isotopic evolution profiles are shown in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Rayleigh_model_box_sketch_v2.png|thumb|800px|&#039;&#039;&#039;&#039;&#039;Figure 1&#039;&#039;&#039;&#039;&#039; Schematic presentation of the mathematical approaches of the Rayleigh model in open system &#039;&#039;&#039;(a, b)&#039;&#039;&#039; and closed system &#039;&#039;&#039;(c)&#039;&#039;&#039;. Adapted from Gat &#039;&#039;et al&#039;&#039; (2001). &#039;&#039;&#039;(a)&#039;&#039;&#039; From a reservoir containing &#039;&#039;N&#039;&#039; abundant isotopologues (e.g. H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt;O) and &#039;&#039;N&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; rare isotopologues (e.g. H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O or HD&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt;O) small amounts of both species, &#039;&#039;dN&#039;&#039; and &#039;&#039;dN&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; respectively, are being removed under equilibrium fractionation conditions: &amp;lt;math&amp;gt; dN_i/dN = αR &amp;lt;/math&amp;gt;. &lt;br /&gt;
&#039;&#039;&#039;(b)&#039;&#039;&#039; The changing isotopic composition of the reservoir is calculated from a mass balance consideration for the rare isotopologues: &amp;lt;math&amp;gt; RN = (R-dR)(N-dN) + αRdN &amp;lt;/math&amp;gt;. &lt;br /&gt;
&#039;&#039;&#039;(c)&#039;&#039;&#039; In closed system, the changing isotopic composition of the reservoir can be calculated from a mass balance consideration for the rare isotopologues: &amp;lt;math&amp;gt; R_0N_0 = R(N_0-dN) + αRdN &amp;lt;/math&amp;gt;, with the remaining fraction &amp;lt;math&amp;gt; f = (N_0-dN)/N_0 &amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rayleigh_model_plot_v2_CG.png|thumb|800px|&#039;&#039;&#039;&#039;&#039;Figure 2&#039;&#039;&#039;&#039;&#039; Isotopic change during &#039;&#039;&#039;(a), (c)&#039;&#039;&#039; Rayleigh evaporation, and &#039;&#039;&#039;(b), (d)&#039;&#039;&#039; Rayleigh condensation. Rayleigh evaporation occurs here at 20 °C (thus a constant fractionation factor) for initial liquid compositions of δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -10 ‰ and δD = -70 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰), in open system with unsaturated (RH = 75 %; black) or saturated (grey) environment, and closed system (blue). In addition, the result of C--G evaporation model (i.e. open system including feedback from a &amp;quot;free atmosphere&amp;quot; which has fixed isotope compositions of δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -13 ‰ and δD = -94 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰) and a fixed relative humidity (RH = 75 %)) is also presented (red). Rayleigh condensation occurs here under continuous cooling (thus also a contentiously changing fractionation factor) from T = 20 °C and RH = 75 %. The initial vapour compositions are δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -13 ‰ and δD = -94 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰). For the condensation to ice below 0 °C, two cases are presented. The saturation case (grey) is a classical Rayleigh process where ice crystals from from vapour under equilibrium conditions, using the saturation pressure over ice (&#039;&#039;e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;). The supersaturation case (black) takes into account the supersaturation over ice, where the ambient vapour pressure is &#039;&#039;e&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; = S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;*e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;. &#039;&#039;S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; is the defined saturation ratio, as &#039;&#039;e&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;/e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;, and here takes the form &#039;&#039;S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; = 1-0.004T&#039;&#039; after Risi &#039;&#039;et al&#039;&#039; (2010a). In this case, the fractionation factor combining equilibrium and kinetic effects given by Jouzel &amp;amp; Merlivat (1984) is used. The equations used in this figure can be found in Table 1.]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ &#039;&#039;Table 1&#039;&#039; Rayleigh equations to calculate isotopic evolution of the remaining reservoir under different conditions. The transport resistance is here assumed to be purely due to diffusion (i.e.  &amp;lt;math&amp;gt;\rho \propto D^{-1} &amp;lt;/math&amp;gt;).  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Conditions&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; colspan=&amp;quot;2&amp;quot;| Equation (&#039;&#039;R&#039;&#039; and &#039;&#039;δ&#039;&#039; notation)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Fractionation factor used&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;4&amp;quot;| Evaporation&lt;br /&gt;
| open system saturated&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{vl}&amp;lt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| open system undersaturated&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \frac{1}{\alpha_k \alpha_{lv}} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{lv}&amp;gt;1 &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; \alpha_k = \frac{D}{D&#039;}(1-h)+h &amp;gt; 1 &amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt; h = \frac{e_v}{e_l} &amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| closed system&lt;br /&gt;
| &amp;lt;math&amp;gt; R = \frac{R_0}{f+\alpha(1-f)} &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \delta = \frac{1+\delta_0}{f+\alpha(1-f)}-1 &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{vl}&amp;lt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| C--G model&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{\alpha-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \delta = (1+\delta_0)f^{\alpha-1}-1 &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \frac{\alpha_{vl}-h\frac{R_a}{R_l}}{(1-h)\frac{D}{D&#039;}} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{vl} &amp;lt; 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;2&amp;quot;| Condensation&lt;br /&gt;
| saturation over ice&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{sv}&amp;gt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supersaturation over ice&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \alpha_k \alpha_{sv} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{sv}&amp;gt;1 &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; \alpha_k = \frac{S_i}{\alpha_s \frac{D}{D&#039;}(S_i-1)+1} &amp;lt; 1 &amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt; S_i = \frac{e_v}{e_i} &amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Model codes in MATLAB ==&lt;br /&gt;
&lt;br /&gt;
=== Rayleigh evaporation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% rayleigh_evaporation.m&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Description:&lt;br /&gt;
% simple Rayleigh evaporation model, after Stern and Blisniuk, 2002&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% input variables: T0 (Kelvin), d18O0 (permil), d2H0 (permil);&lt;br /&gt;
%                  system: closed system = 0, open system = 1, C--G model = 2; &lt;br /&gt;
%                  optional: relative humidity (default = 1), d18Oa (permil), d2Ha (permil)&lt;br /&gt;
% run example: rayleigh_evaporation(20+273.15,-10,-70,1,0.75)&lt;br /&gt;
%              rayleigh_evaporation(20+273.15,-10,-70,1)&lt;br /&gt;
%              rayleigh_evaporation(20+273.15,-10,-70,2)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% HS, Do 12 Dez 2013 15:43:28 CET&lt;br /&gt;
% YW, structured and included the case of kinetic effect &lt;br /&gt;
% and the case of C--G model, 29 Aug 2020&lt;br /&gt;
%--------------------------------&lt;br /&gt;
&lt;br /&gt;
function data = rayleigh_evaporation(T0,d18O0,d2H0,system,h,d18Oa,d2Ha)&lt;br /&gt;
&lt;br /&gt;
% %% dubugging&lt;br /&gt;
% T0 = 20+273.15;&lt;br /&gt;
% d18O0 = -10; % close to Bergen precipitation average&lt;br /&gt;
% d2H0 = -70;&lt;br /&gt;
% system = 1;&lt;br /&gt;
% h = 0.75;&lt;br /&gt;
&lt;br /&gt;
%% fractionation factors&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Majoube, M., 1971a: Fractionnement en oxyg`ene-18 entre la glace et la vapeur d’eau. J.&lt;br /&gt;
% Chim. Phys., 68, 625–636.&lt;br /&gt;
&lt;br /&gt;
% Majoube, M., 1971b: Fractionnement en oxyg`ene 18 et deut ́erium entre l’eau et sa vapeur. J. Chim.&lt;br /&gt;
% Phys., 68, 1423–1436.&lt;br /&gt;
&lt;br /&gt;
% Merlivat, L. and G. Nief, 1967: Fractionnement isotopique lors des changements d‘ ́etat&lt;br /&gt;
% solide-vapeur et liquide-vapeur de l’eau `a des temp ́eratures inf ́erieures a ` 0 ◦ C. Tellus,&lt;br /&gt;
% 19, 122–127.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
    function d = a2H(T) % T in K&lt;br /&gt;
        d = 1/exp(24.844e3/(T^2)-76.248/T+52.612e-3); % Majoube 1971b, R_vapour/R_liquid &amp;lt; 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    function d = a18O(T) % T in K&lt;br /&gt;
        d = 1/exp(1137/(T^2)-0.4156/T-0.0020667); % Majoube 1971b, R_vapour/R_liquid &amp;lt; 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
%% initialization&lt;br /&gt;
% isotope ratios of VSMOW reference water&lt;br /&gt;
R2std = 155.76e-6;&lt;br /&gt;
R18std = 2005.20e-6;&lt;br /&gt;
% initial isotope ratio&lt;br /&gt;
R18O0 = (d18O0/1000+1)*R18std;&lt;br /&gt;
R2H0 = (d2H0/1000+1)*R2std;&lt;br /&gt;
% relative humidity&lt;br /&gt;
if ~exist(&#039;h&#039;,&#039;var&#039;)&lt;br /&gt;
    h = 1;&lt;br /&gt;
end&lt;br /&gt;
% isotope composition of &amp;quot;free atmosphere&amp;quot;&lt;br /&gt;
% if not existing, default it to the equilibrium vapour of global average precipitation &lt;br /&gt;
if ~exist(&#039;d18Oa&#039;,&#039;var&#039;)&lt;br /&gt;
    d18Oa = -13;  &lt;br /&gt;
end&lt;br /&gt;
if ~exist(&#039;d2Ha&#039;,&#039;var&#039;)&lt;br /&gt;
    d2Ha = -94;  &lt;br /&gt;
end&lt;br /&gt;
R18Oa = (d18Oa/1000+1)*R18std;&lt;br /&gt;
R2Ha = (d2Ha/1000+1)*R2std;&lt;br /&gt;
&lt;br /&gt;
% % ouput variables&lt;br /&gt;
% data.T = [];&lt;br /&gt;
% data.f = [];&lt;br /&gt;
% data.d18Ov = [];&lt;br /&gt;
% data.d18Ol = [];&lt;br /&gt;
% data.d2Hv = [];&lt;br /&gt;
% data.d2Hl = [];&lt;br /&gt;
% data.dxsv = [];&lt;br /&gt;
% data.dxsl = [];&lt;br /&gt;
% data.d18Ov_acc = [];&lt;br /&gt;
% data.d2Hv_acc = [];&lt;br /&gt;
% data.dxsv_acc = [];&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (0) in closed system (material maintained under two-phase equilibrium)&lt;br /&gt;
% i.e., the material removed stays in the closed system and stays in equilibrium with the reservoir&lt;br /&gt;
if system == 0&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an closed system (material maintained under two-phase equilibrium) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    i = 1;   % iteration steps&lt;br /&gt;
    for f = 1:-0.02:0 % remaining liquid fraction&lt;br /&gt;
        % isotope ratio of remaining liquid&lt;br /&gt;
        R18Ol = R18O0/(a18O(T0) - f*(a18O(T0)-1)); % Gat1996&lt;br /&gt;
        R2Hl = R2H0/(a2H(T0) - f*(a2H(T0)-1));     % Gat1996&lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*a18O(T0)-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*a2H(T0)-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        % (3) delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = d18Ov;&lt;br /&gt;
        d2Hv_acc = d2Hv;&lt;br /&gt;
        dxsv_acc = dxsv;&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
        &lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (1) in an open system (material is immediately removed)&lt;br /&gt;
if system == 1&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    i = 1; % iteration steps&lt;br /&gt;
    n = 1; % turbulent exponent in D^n, [0 1], controls the ratio of diffusive transport over turbulent transport of water molecules (Pfahl and Wernli, 2009)&lt;br /&gt;
    for f = 1:-0.02:0 % remaining liquid fraction&lt;br /&gt;
       &lt;br /&gt;
        % modified Rayleigh evaporation model including kinectic effct&lt;br /&gt;
        % during the vapour formation at undersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
        % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
        % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
        % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
        D18 = 0.9723;  % D&#039;/D&lt;br /&gt;
        D2 = 0.9755;   % D&#039;/D&lt;br /&gt;
        ak_18O = 1/(1/D18^n*(1-h)+h);&lt;br /&gt;
        ak_2H = 1/(1/D2^n*(1-h)+h);&lt;br /&gt;
        aeff_18O = a18O(T0) * ak_18O;&lt;br /&gt;
        aeff_2H = a2H(T0) * ak_2H;&lt;br /&gt;
        &lt;br /&gt;
        % isotope ratio of remaining liquid&lt;br /&gt;
        R18Ol = R18O0*f^(aeff_18O-1);&lt;br /&gt;
        R2Hl = R2H0*f^(aeff_2H-1);&lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        &lt;br /&gt;
        % (3) isotope ratio of the accumulated removed vapour&lt;br /&gt;
        R18Ov_acc = R18O0*(1-f^aeff_18O)/(1-f); % Mook 2001, Page 38&lt;br /&gt;
        R2Hv_acc = R2H0*(1-f^aeff_2H)/(1-f);&lt;br /&gt;
        % delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
        d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
        dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
%         % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
%         % mass conservation of rare isotopes between the reservoir and formed removal: f*Rl+(1-f)*Rv_acc=R0,&lt;br /&gt;
%         % after rearranging, we have: Rv_acc=(R0-f*Rl)/(1-f)&lt;br /&gt;
%         R18Ov_acc2 = (R18O0-f*R18Ol)/(1-f);&lt;br /&gt;
%         R2Hv_acc2 = (R2H0-f*R2Hl)/(1-f);&lt;br /&gt;
%         data.d18Ov_acc2(i) = (R18Ov_acc2/R18std-1)*1000;&lt;br /&gt;
%         data.d2Hv_acc2(i) = (R2Hv_acc2/R2std-1)*1000;&lt;br /&gt;
%         data.dxsv_acc2(i) = data.d2Hv_acc2(i)-8*data.d18Ov_acc2(i);&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
&lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (2) in a &amp;quot;free atmosphere&amp;quot; of fixed humidity and isotope composition (C--G model)&lt;br /&gt;
if system == 2&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    % turbulent exponent in D^n, [0 1], controls the ratio of diffusive transport over turbulent transport of water molecules (Pfahl and Wernli, 2009)&lt;br /&gt;
    % n~0.5 for an open water body under natural conditions, n~0.58 for a falling raindrop (Stewart1975), n~1 for soils and leaves &lt;br /&gt;
    n = 1; &lt;br /&gt;
    df = 0.02;&lt;br /&gt;
    i = 1;   % iteration steps&lt;br /&gt;
    &lt;br /&gt;
    for f = 1:-df:0 % remaining liquid fraction&lt;br /&gt;
&lt;br /&gt;
        % modified Rayleigh evaporation model including kinectic effct&lt;br /&gt;
        % during the vapour formation at undersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
        % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
        % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
        % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
        D18 = 0.9723;  % D&#039;/D&lt;br /&gt;
        D2 = 0.9755;   % D&#039;/D&lt;br /&gt;
        if i==1&lt;br /&gt;
            aeff_18O = (a18O(T0) - h*R18Oa/R18O0) / ((1-h)*1/D18^n);&lt;br /&gt;
            aeff_2H = (a2H(T0) - h*R2Ha/R2H0) / ((1-h)*1/D2^n);&lt;br /&gt;
            % isotope ratio of remaining liquid&lt;br /&gt;
            f1 = 1;&lt;br /&gt;
            R18Ol = R18O0*f1^(aeff_18O-1);&lt;br /&gt;
            R2Hl = R2H0*f1^(aeff_2H-1);&lt;br /&gt;
        else&lt;br /&gt;
            aeff_18O = (a18O(T0) - h*R18Oa/data.R18Ol(i-1)) / ((1-h)*1/D18^n);&lt;br /&gt;
            aeff_2H = (a2H(T0) - h*R2Ha/data.R2Hl(i-1)) / ((1-h)*1/D2^n);&lt;br /&gt;
            % isotope ratio of remaining liquid&lt;br /&gt;
            f1 = 1-df; % fraction remaining relative to previous stage&lt;br /&gt;
            R18Ol = data.R18Ol(i-1)*f1^(aeff_18O-1);&lt;br /&gt;
            R2Hl = data.R2Hl(i-1)*f1^(aeff_2H-1);&lt;br /&gt;
        end&lt;br /&gt;
       &lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        &lt;br /&gt;
%         % (3) isotope ratio of the accumulated removed vapour&lt;br /&gt;
%         R18Ov_acc = R18O0*(1-f^aeff_18O)/(1-f); % Mook 2001, Page 38&lt;br /&gt;
%         R2Hv_acc = R2H0*(1-f^aeff_2H)/(1-f);&lt;br /&gt;
%         % delta value of the accumulated removed vapour&lt;br /&gt;
%         d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
%         d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
%         dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
        % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
        % mass conservation of rare isotopes between the reservoir and formed removal: f*Rl+(1-f)*Rv_acc=R0,&lt;br /&gt;
        % after rearranging, we have: Rv_acc=(R0-f*Rl)/(1-f)&lt;br /&gt;
        R18Ov_acc = (R18O0-f*R18Ol)/(1-f);&lt;br /&gt;
        R2Hv_acc = (R2H0-f*R2Hl)/(1-f);&lt;br /&gt;
        % delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
        d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
        dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
        &lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
        &lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
% fin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rayleigh condensation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% rayleigh_condensation.m&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Description:&lt;br /&gt;
% - simple Rayleigh condensation model, after Stern and Blisniuk, 2002&lt;br /&gt;
% - temperature dependent fractionation factor varies at each step during cooling process&lt;br /&gt;
%   (1) isobaric cooling: e.g., air parcel advects to cold regions&lt;br /&gt;
%   (2) or pseudoadiabatic cooling: e.g., updraft or lift of surface air parcel&lt;br /&gt;
% - therefore, the isotope ratio is calculated as: R(n+1) = R(n)(q(n+1)/q(n))^(a-1)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% input variables: T0 (Kelvin), RH0 (%), d18O0 (permil), d2H0 (permil),&lt;br /&gt;
%                  sice: saturation conditions over ice when temperature &amp;lt;0 degree&lt;br /&gt;
%                        &amp;gt; 1: using the constant supersaturation given as sice;&lt;br /&gt;
%                        = 1: meaning alpha_k = 1, thus no supersaturation;&lt;br /&gt;
%                        = 0: using formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
% run example: rayleigh_condensation(20+273.15,0.75,-13,-94,0)&lt;br /&gt;
%              rayleigh_condensation(20+273.15,0.75,-13,-94,1)&lt;br /&gt;
%              rayleigh_condensation(20+273.15,0.75,-13,-94,1.2)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% HS, Do 12 Dez 2013 15:43:28 CET&lt;br /&gt;
% YW, structured and included kinetic effect, 29 Aug 2020&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% YW, 26 Mar 2020&lt;br /&gt;
% limitation:&lt;br /&gt;
% Rayleigh condensation model only reflects the process of water vapor removing&lt;br /&gt;
% and ignores: mixing of air masses, cloud water-vapor isotope exchange,&lt;br /&gt;
% subcloud droplet evaporation, and radiative cooling or heating.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
&lt;br /&gt;
function data = rayleigh_condensation(T0,RH0,d18O0,d2H0,sice)&lt;br /&gt;
&lt;br /&gt;
% %% for debugging&lt;br /&gt;
% T0 = 20+273.15;&lt;br /&gt;
% RH0 = 0.75; % Craig-Gordon, 1965 (Fig. 15)&lt;br /&gt;
% d18O0 = -13;&lt;br /&gt;
% d2H0 = -94;&lt;br /&gt;
% sice = 0;&lt;br /&gt;
&lt;br /&gt;
% RH0 = 0.91;  % 20161207 AR event at Bergen&lt;br /&gt;
% d18O0 = -12.5;&lt;br /&gt;
% d2H0 = -100;&lt;br /&gt;
&lt;br /&gt;
%% functions adopted&lt;br /&gt;
% fractionation factors&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Majoube, M., 1971a: Fractionnement en oxyg`ene-18 entre la glace et la vapeur d’eau. J.&lt;br /&gt;
% Chim. Phys., 68, 625–636.&lt;br /&gt;
&lt;br /&gt;
% Majoube, M., 1971b: Fractionnement en oxyg`ene 18 et deut ́erium entre l’eau et sa vapeur. J. Chim.&lt;br /&gt;
% Phys., 68, 1423–1436.&lt;br /&gt;
&lt;br /&gt;
% Merlivat, L. and G. Nief, 1967: Fractionnement isotopique lors des changements d‘ ́etat&lt;br /&gt;
% solide-vapeur et liquide-vapeur de l’eau `a des temp ́eratures inf ́erieures a ` 0 °C. Tellus,&lt;br /&gt;
% 19, 122–127.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
    function d = a2H(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15 % above 0 celsius&lt;br /&gt;
            d = exp(24.844e3/(T^2)-76.248/T+52.612e-3); % Majoube 1971b, R_liquid/R_vapour &amp;gt; 1&lt;br /&gt;
        else&lt;br /&gt;
            d = exp(16289./T.^2 - 0.0945);   % Merlivat &amp;amp; Nief 1967, R_solid/R_vapour &amp;gt; 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    function d = a18O(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15 % above 0 celsius&lt;br /&gt;
            d = exp(1137/(T^2)-0.4156/T-0.0020667); % Majoube 1971b, R_liquid/R_vapour &amp;gt; 1&lt;br /&gt;
        else&lt;br /&gt;
            d = exp(11.839./T - 0.028224); % Majoube 1971a, R_solid/R_vapour &amp;gt; 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% supersaturation with respect to ice&lt;br /&gt;
% Si = 1 − λT, with λ = 0.004. From Graf 2017 dissertation, page 53, Fig 3.1&lt;br /&gt;
% (as in Risi et al., 2010b, after Jouzel and Merlivat 1984.)&lt;br /&gt;
% Risi, C., S. Bony, F. Vimeux, and J. Jouzel, 2010b: Water-stable isotopes in the LMDZ4&lt;br /&gt;
% general circulation model: Model evaluation for present-day and past climates and&lt;br /&gt;
% applications to climatic interpretations of tropical isotopic records.&lt;br /&gt;
% sice: &amp;gt; 1: using the constant supersaturation given here;&lt;br /&gt;
%       = 1: meaning alpha_k = 1, thus no supersaturation;&lt;br /&gt;
%       = 0: using formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
    function s = si(T)&lt;br /&gt;
        if sice &amp;gt;= 1&lt;br /&gt;
            s = sice;&lt;br /&gt;
        else  % elseif sice == 0&lt;br /&gt;
            s = 1-0.004*(T-273.15);&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% vapour saturation pressure&lt;br /&gt;
    function es = esat(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15&lt;br /&gt;
            % es = 611*exp((17.27*T)/(273+T)); % T in celsius&lt;br /&gt;
            es = 611*exp(17.27*(T-273.15)/T); % T in Kelvin&lt;br /&gt;
        else&lt;br /&gt;
            % Saturation vapour pressure over ice (Murphy and Koop, 2005) for T &amp;gt; 110 K:&lt;br /&gt;
            es_ice = exp(9.550426 - 5723.265/T + 3.53068*log(T) - 0.00728332*T);&lt;br /&gt;
            % the actual saturation vapour pressure&lt;br /&gt;
            es = es_ice * si(T);&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% saturated vapour mixing ratio&lt;br /&gt;
    function ws = wsat(es,p)&lt;br /&gt;
        ws = 0.622*es/(p-es);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% pressure at height of z&lt;br /&gt;
    function p = pressure(z)&lt;br /&gt;
        p0 = 101325; % Pa&lt;br /&gt;
        z0 = 8000;   % m scale height&lt;br /&gt;
        p = p0*exp(-z/z0);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% moist adiabatic lapse rate [Curry and Webster,1999] (cited after Stern and Blisniuk, 2002)&lt;br /&gt;
    function lr = gamma(ws,T) % T in Kelvin&lt;br /&gt;
        % physical constants&lt;br /&gt;
        g = 9.80665;     % m/s^2  the gravitational acceleration&lt;br /&gt;
        Cpd = 1.00464e3; % J/kg/K the specific heat capacity of dry air at constant pressure&lt;br /&gt;
        L = 2.5104e6;    % J/kg   the latent heat of vaporization or sublimation&lt;br /&gt;
        Rd = 287.04;     % J/kg/K the specific gas constant for dry air&lt;br /&gt;
        lr = g/Cpd*(1+L*ws/Rd/T)/(1+0.622*L*L*ws/Rd/Cpd/T/T); % [°C/m]&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
%% initialization&lt;br /&gt;
% isotope ratios of VSMOW reference water&lt;br /&gt;
R2std = 155.76e-6;&lt;br /&gt;
R18std = 2005.20e-6;&lt;br /&gt;
% initial isotope ratio&lt;br /&gt;
R18O0 = (d18O0/1000+1)*R18std;&lt;br /&gt;
R2H0 = (d2H0/1000+1)*R2std;&lt;br /&gt;
dxs0 = R2H0-8*R18O0;&lt;br /&gt;
&lt;br /&gt;
% initial conditions&lt;br /&gt;
f = 1.0;  % remaining vapour fractionation&lt;br /&gt;
z = 0.0;  % elevation&lt;br /&gt;
p = pressure(z);&lt;br /&gt;
w0 = RH0*wsat(esat(T0),p); % kg/kg&lt;br /&gt;
% convert water mixing ratio unit&lt;br /&gt;
md = 28.97; % [g/mol] dry air molar mass&lt;br /&gt;
mv = 18.02; % [g/mol] water vapour molar mass&lt;br /&gt;
wconc0 = w0*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
rh = RH0;&lt;br /&gt;
dt = 0.5;  % temperature step&lt;br /&gt;
T = T0+dt;&lt;br /&gt;
&lt;br /&gt;
%% for the circumstance of isobaric cooling&lt;br /&gt;
%% (1) cool to saturation&lt;br /&gt;
fprintf(&#039;Rayleigh condensation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
fprintf(&#039;   T (°C)   d18Ov     d2Hv     dxsv       rh        f WConc[ppmv] \n&#039;);&lt;br /&gt;
n = 1;  % iteration number&lt;br /&gt;
while rh &amp;lt; 0.99&lt;br /&gt;
    T = T-dt; % decrease temperature by dt °C at each iteration&lt;br /&gt;
    ws = wsat(esat(T),p); % saturated water mixing ratio at each iteration&lt;br /&gt;
    rh = w0/ws;                 % RH at each iteration&lt;br /&gt;
    wconc = wconc0; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18O0,d2H0,dxs0,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18O0;&lt;br /&gt;
    data.R2H(n) = R2H0;&lt;br /&gt;
    data.d18O(n) = d18O0;&lt;br /&gt;
    data.dD(n) = d2H0;&lt;br /&gt;
    data.dxs(n) = d2H0-8*d18O0;&lt;br /&gt;
    data.d18Oc(n) = NaN; % condensate&lt;br /&gt;
    data.d2Hc(n) = NaN;&lt;br /&gt;
    data.dxsc(n) = NaN;&lt;br /&gt;
    data.d18O_acc(n) = NaN; % accumulated condensate (liquid+solid)&lt;br /&gt;
    data.d2H_acc(n) = NaN;&lt;br /&gt;
    data.dxs_acc(n) = NaN;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;Reached saturation now\n&#039;);&lt;br /&gt;
&lt;br /&gt;
ws0 = w0;&lt;br /&gt;
&lt;br /&gt;
%% (2) continue to cool and form liquid condensate&lt;br /&gt;
while T &amp;gt; 273.15 % isobaric cooling with condensation to 0 °C&lt;br /&gt;
    T = T-dt; % decrease temperature by dt °C at each iteration&lt;br /&gt;
    ws = wsat(esat(T),p); % saturated water mixing ratio at each iteration&lt;br /&gt;
    wconc = ws*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    f = ws/ws0;&lt;br /&gt;
    &lt;br /&gt;
    if n == 1&lt;br /&gt;
        f1 = ws/ws0;&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = R18O0*f1^(a18O(T)-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = R2H0*f1^(a2H(T)-1);&lt;br /&gt;
    else&lt;br /&gt;
        f1 = wconc/data.Wconc(n-1); % q(n)/q(n-1)&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = data.R18O(n-1)*f1^(a18O(T)-1);  % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = data.R2H(n-1)*f1^(a2H(T)-1);&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    % (1) delta value of remaining vapour&lt;br /&gt;
    d18Ov = (R18Ov/R18std-1)*1000;&lt;br /&gt;
    d2Hv = (R2Hv/R2std-1)*1000;&lt;br /&gt;
    dxsv = d2Hv - 8*d18Ov;&lt;br /&gt;
    &lt;br /&gt;
    % (2) delta value of the instantaneously removed condensate (in equilibrium with the current remaining vapour)&lt;br /&gt;
    d18Oc = ((d18Ov/1000+1)*a18O(T)-1)*1000;&lt;br /&gt;
    d2Hc = ((d2Hv/1000+1)*a2H(T)-1)*1000;&lt;br /&gt;
    dxsc = d2Hc-8*d18Oc;&lt;br /&gt;
    &lt;br /&gt;
    % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
    % mass conservation of rare isotopes between the reservoir and formed removal: f*Rv + (1-f)*Rl_acc = R0,&lt;br /&gt;
    % after rearranging, we have: Rl_acc = (R0-f*Rv)/(1-f)&lt;br /&gt;
    R18Ol_acc = (R18O0-f*R18Ov)/(1-f);&lt;br /&gt;
    R2Hl_acc = (R2H0-f*R2Hv)/(1-f);&lt;br /&gt;
    d18Ol_acc = (R18Ol_acc/R18std-1)*1000;&lt;br /&gt;
    d2Hl_acc = (R2Hl_acc/R2std-1)*1000;&lt;br /&gt;
    dxsl_acc = d2Hl_acc-8*d18Ol_acc;&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18Ov,d2Hv,dxsv,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18Ov;&lt;br /&gt;
    data.R2H(n) = R2Hv;&lt;br /&gt;
    data.d18O(n) = d18Ov;&lt;br /&gt;
    data.dD(n) = d2Hv;&lt;br /&gt;
    data.dxs(n) = dxsv;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.d18Oc(n) = d18Oc;&lt;br /&gt;
    data.d2Hc(n) = d2Hc;&lt;br /&gt;
    data.dxsc(n) = dxsc;&lt;br /&gt;
    data.d18O_acc(n) = d18Ol_acc;&lt;br /&gt;
    data.d2H_acc(n) = d2Hl_acc;&lt;br /&gt;
    data.dxs_acc(n) = dxsl_acc;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;Have cooled to 0 celcius now \n&#039;);&lt;br /&gt;
&lt;br /&gt;
ws0_ice = ws;&lt;br /&gt;
R18O0 = R18Ov;&lt;br /&gt;
R2H0 = R2Hv;&lt;br /&gt;
f0 = f;&lt;br /&gt;
&lt;br /&gt;
%% (3) continue to cool and form solid condensate&lt;br /&gt;
% considering mixed-phase cloud: subsaturated over liquid droplets and supersaturated over ice crystals&lt;br /&gt;
&lt;br /&gt;
% closure assumption: liquid droplets --&amp;gt; evaporate to vapour --&amp;gt; deposite on ice crystals&lt;br /&gt;
% therefore: when T&amp;lt;0 celsius, the reduced fraction of vapour is due to its deposit on ice crystals with a fractionation&lt;br /&gt;
% factor alpha_eff = alpha_eq*alpha_k taking into account the kinetic effct under the supersaturation condition.&lt;br /&gt;
% i.e.: we start a new Rayleigh condensation model starting with the remaining vapour&lt;br /&gt;
% after the liquid condensation stage above, and use the new factionation factor alpha_eff&lt;br /&gt;
&lt;br /&gt;
while T &amp;gt; -60+273.15&lt;br /&gt;
    T = T-dt;&lt;br /&gt;
    ws = wsat(esat(T),p);&lt;br /&gt;
    wconc = ws*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    f = ws/ws0;      % the total fraction of remaining vapour through all stages&lt;br /&gt;
    fi = ws/ws0_ice; % the fraction of remaing vapour in the ice condensation stage only&lt;br /&gt;
        &lt;br /&gt;
    % modified Rayleigh condensation model including kinectic effct&lt;br /&gt;
    % during the ice formation at supersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
    % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
    % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
    % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
    ak_18O = si(T)/(a18O(T)*1/0.9723*(si(T)-1) + 1);&lt;br /&gt;
    ak_2H = si(T)/(a2H(T)*1/0.9755*(si(T)-1) + 1);&lt;br /&gt;
    aeff_18O = a18O(T) * ak_18O;&lt;br /&gt;
    aeff_2H = a2H(T) * ak_2H;&lt;br /&gt;
    &lt;br /&gt;
    if n == 1&lt;br /&gt;
        f1 = ws/ws0;&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = R18O0*f1^(aeff_18O-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = R2H0*f1^(aeff_2H-1);&lt;br /&gt;
    else&lt;br /&gt;
        f1 = wconc/data.Wconc(n-1); % q(n)/q(n-1)&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = data.R18O(n-1)*f1^(aeff_18O-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1), and Jouzel and Merlivat, 1984&lt;br /&gt;
        R2Hv = data.R2H(n-1)*f1^(aeff_2H-1);&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    % (1) delta value of remaining vapour&lt;br /&gt;
    d18Ov = (R18Ov/R18std-1)*1000;&lt;br /&gt;
    d2Hv = (R2Hv/R2std-1)*1000;&lt;br /&gt;
    dxsv = d2Hv - 8*d18Ov;&lt;br /&gt;
    &lt;br /&gt;
    % (2) delta value of the instantaneously removed condensate (in equilibrium with the current remaining vapour)&lt;br /&gt;
    d18Oc = ((d18Ov/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
    d2Hc = ((d2Hv/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
    dxsc = d2Hc-8*d18Oc;&lt;br /&gt;
    &lt;br /&gt;
    % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
    % (i) mass conservation of rare isotopes between the reservoir and formed removal:&lt;br /&gt;
    % fi*Rv + (1-fi)*Ri_acc = Rv0,&lt;br /&gt;
    % where fi is the fraction of remaining vapour in the ice condensation stage, and&lt;br /&gt;
    % Rv0 is the isotope ratio of the remaining vapour after liquid condensation stage&lt;br /&gt;
    % after rearranging, we have: Ri_acc = (Rv0-fi*Rv)/(1-fi)&lt;br /&gt;
    R18Oi_acc = (R18O0-fi*R18Ov)/(1-fi);&lt;br /&gt;
    R2Hi_acc = (R2H0-fi*R2H0)/(1-fi);&lt;br /&gt;
    %         d18Oi_acc = (R18Oi_acc/R18std-1)*1000;&lt;br /&gt;
    %         d2Hi_acc = (R2Hi_acc/R2std-1)*1000;&lt;br /&gt;
    %         dxsi_acc = d2Hi_acc-8*d18Oi_acc;&lt;br /&gt;
    % (ii) the total accumulation is sum of the liquid (1-f0) and solid condensate (f0*(1-fi))&lt;br /&gt;
    % (1-f0*fi)*R_acc = (1-f0)*Rl_acc + (f0*(1-fi))*Ri_acc&lt;br /&gt;
    R18O_acc = ((1-f0)*R18Ol_acc + (f0*(1-fi))*R18Oi_acc)/(1-f0*fi);&lt;br /&gt;
    R2H_acc = ((1-f0)*R2Hl_acc + (f0*(1-fi))*R2Hi_acc)/(1-f0*fi);&lt;br /&gt;
    d18O_acc = (R18O_acc/R18std-1)*1000;&lt;br /&gt;
    d2H_acc = (R2H_acc/R2std-1)*1000;&lt;br /&gt;
    dxs_acc = d2H_acc-8*d18O_acc;&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18Ov,d2Hv,dxsv,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18Ov;&lt;br /&gt;
    data.R2H(n) = R2Hv;&lt;br /&gt;
    data.d18O(n) = d18Ov;&lt;br /&gt;
    data.dD(n) = d2Hv;&lt;br /&gt;
    data.dxs(n) = dxsv;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.d18Oc(n) = d18Oc;&lt;br /&gt;
    data.d2Hc(n) = d2Hc;&lt;br /&gt;
    data.dxsc(n) = dxsc;&lt;br /&gt;
    data.d18O_acc(n) = d18O_acc;&lt;br /&gt;
    data.d2H_acc(n) = d2H_acc;&lt;br /&gt;
    data.dxs_acc(n) = dxs_acc;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% for the circumstance of pseudoadiabatic cooling&lt;br /&gt;
% - establish the relationship between T and z&lt;br /&gt;
z = 0;&lt;br /&gt;
p = pressure(z);&lt;br /&gt;
n = 1;&lt;br /&gt;
for T = T0:-dt:-60+273.15&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.z(n) = z;&lt;br /&gt;
    data.p(n) = p;&lt;br /&gt;
    % the elevation change&lt;br /&gt;
    ws = wsat(esat(T),p);&lt;br /&gt;
    lr = gamma(ws,T); % lapse rate&lt;br /&gt;
    dz = dt/lr;   % dt = lr*dz&lt;br /&gt;
    % the new elevation and pressure&lt;br /&gt;
    z = z+dz;&lt;br /&gt;
    p = pressure(z);&lt;br /&gt;
    data.lr(n) = lr;   &lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
% fin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of usage ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Generate the desired data sets&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%% create data sets&lt;br /&gt;
% Rayleigh evaporation&lt;br /&gt;
T0 = 20+273.15;&lt;br /&gt;
d18O0 = -10; % close to Bergen precipitation average&lt;br /&gt;
d2H0 = -70;&lt;br /&gt;
h = 0.75; % relative humidity&lt;br /&gt;
de_ok = rayleigh_evaporation(T0,d18O0,d2H0,1,h); % in an open system, unsaturated (including kinetic effect)&lt;br /&gt;
de_oe = rayleigh_evaporation(T0,d18O0,d2H0,1);   % in an open system, saturated (equilibrium)&lt;br /&gt;
de_cl = rayleigh_evaporation(T0,d18O0,d2H0,0);   % in a closed system&lt;br /&gt;
de_CG = rayleigh_evaporation(T0,d18O0,d2H0,2,h); % C--G model&lt;br /&gt;
&lt;br /&gt;
% Rayleigh condensation&lt;br /&gt;
T0 = 20+273.15;&lt;br /&gt;
RH0 = 0.75; % Craig-Gordon, 1965 (Fig. 15)&lt;br /&gt;
d18O0 = -13;&lt;br /&gt;
d2H0 = -94;&lt;br /&gt;
% &amp;gt; 1: using the constant supersaturation given as sice;&lt;br /&gt;
% = 1: &lt;br /&gt;
% = 0: &lt;br /&gt;
dc_ln = rayleigh_condensation(T0,RH0,d18O0,d2H0,0);   % using linear formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
dc_no = rayleigh_condensation(T0,RH0,d18O0,d2H0,1);   % meaning alpha_k = 1, thus no supersaturation, e = e_ice&lt;br /&gt;
dc_11 = rayleigh_condensation(T0,RH0,d18O0,d2H0,1.1); % using the constant supersaturation as given&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Plot Rayleigh evaporation and condensation profiles.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As an example, Fig. 2 is created using the data sets generated from the above step and using the plotting codes from below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%% plot Rayleigh evaporation and condensation model&lt;br /&gt;
fs = 14;&lt;br /&gt;
&lt;br /&gt;
clear h&lt;br /&gt;
figure&lt;br /&gt;
set(gcf,&#039;color&#039;,&#039;white&#039;,&#039;position&#039;,[0 0 1200 1150],&#039;PaperPositionMode&#039;,&#039;auto&#039;);&lt;br /&gt;
% left_color = [0 0 0]; % black&lt;br /&gt;
% right_color = [0 0.4470 0.7410]; % blueish % blue [0 0 1];&lt;br /&gt;
% set(gcf,&#039;defaultAxesColorOrder&#039;,[left_color; right_color]);&lt;br /&gt;
&lt;br /&gt;
% Rayleigh evaporation&lt;br /&gt;
h(1) = subplot(2,2,1);&lt;br /&gt;
% set(h(1),&#039;Position&#039;, [0.1 0.56 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pe(1) = plot(de_ok.f,de_ok.d18Ol,&#039;k-&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(2) = plot(de_ok.f,de_ok.d18Ov,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(3) = plot(de_ok.f,de_ok.d18Ov_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(4) = plot(de_oe.f,de_oe.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); %&#039;color&#039;,[0.3010 0.7450 0.9330],&lt;br /&gt;
pe(5) = plot(de_oe.f,de_oe.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(6) = plot(de_oe.f,de_oe.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(7) = plot(de_cl.f,de_cl.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
pe(8) = plot(de_cl.f,de_cl.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(9) = plot(de_cl.f,de_cl.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(10) = plot(de_CG.f,de_CG.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2); &lt;br /&gt;
pe(11) = plot(de_CG.f,de_CG.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(12) = plot(de_CG.f,de_CG.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(h(1),[-30 40]);&lt;br /&gt;
xlabel(&#039;Residual water fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
ylabel([&#039;\delta^{18}O / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
lgd1 = legend(h(1),pe(1:3),&#039;residual water&#039;,&#039;instant vapour&#039;,&#039;total vapour removed&#039;,&#039;Location&#039;,&#039;northwest&#039;);&lt;br /&gt;
lgd1_pos = lgd1.Position;&lt;br /&gt;
lgd1.FontSize = fs;&lt;br /&gt;
% lgd1.Visible = &#039;off&#039;;&lt;br /&gt;
% 2nd axes&lt;br /&gt;
a2 = axes(&#039;position&#039;,get(h(1),&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
% lgd2 = legend(a2,pe(4:6),&#039;residual water&#039;,&#039;instant vapour&#039;,&#039;total vapour removed&#039;,&#039;Location&#039;,&#039;northwest&#039;);&lt;br /&gt;
% lgd2.FontSize = fs;&lt;br /&gt;
lgd2 = legend(a2,pe(4:6),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd2_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.58 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd2,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd2_pos);&lt;br /&gt;
% 3rd axes&lt;br /&gt;
a3 = axes(&#039;position&#039;,get(gca,&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
lgd3 = legend(a3,pe(7:9),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd3_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.79 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd3,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd3_pos);&lt;br /&gt;
% % 4th axes&lt;br /&gt;
a4 = axes(&#039;position&#039;,get(gca,&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
lgd4 = legend(a4,pe(10:12),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd4_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.88 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd4,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd4_pos);&lt;br /&gt;
% add text&lt;br /&gt;
text(h(1),0.41,8.5,&#039;open&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,30)&lt;br /&gt;
text(h(1),0.30,13.2,&#039;(unsaturated)&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,53)&lt;br /&gt;
text(h(1),0.60,-3,&#039;open&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,15,&#039;color&#039;,[0.6 0.6 0.6])&lt;br /&gt;
text(h(1),0.48,-0.5,&#039;(saturated)&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,20,&#039;color&#039;,[0.6 0.6 0.6])&lt;br /&gt;
text(h(1),0.75,-10,&#039;closed&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,7,&#039;Color&#039;,[0.3010 0.7450 0.9330])&lt;br /&gt;
text(h(1),0.8,1.5,&#039;C-G model&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;FontSize&#039;,fs,&#039;Rotation&#039;,15)&lt;br /&gt;
&lt;br /&gt;
h(3) = subplot(2,2,3);&lt;br /&gt;
% set(h(3),&#039;Position&#039;, [0.1 0.1 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
plot(de_ok.f,de_ok.dxsl,&#039;k-&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_ok.f,de_ok.dxsv,&#039;k--&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_ok.f,de_ok.dxsv_acc,&#039;k:&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsl,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsv,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsl,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsv,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsl,&#039;-&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsv,&#039;--&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
ylim(h(3),[-60 70]);&lt;br /&gt;
set(h(3),&#039;ytick&#039;,-60:20:65);&lt;br /&gt;
xlabel(&#039;Residual water fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
ylabel([&#039;\itd / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
&lt;br /&gt;
% Rayleigh condensation&lt;br /&gt;
h(4) = subplot(2,2,4);&lt;br /&gt;
% set(h(4),&#039;Position&#039;, [0.56 0.1 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pc(4) = plot(dc_no.Wconc,dc_no.dxsc,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); &lt;br /&gt;
pc(5) = plot(dc_no.Wconc,dc_no.dxs,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pc(6) = plot(dc_no.Wconc,dc_no.dxs_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);  &lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;Water mixing ratio / ppmv&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,2000:3000:16000);&lt;br /&gt;
ylabel([&#039;\itd / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
% 2nd axis&lt;br /&gt;
ax1_pos = get(gca,&#039;position&#039;); % position of first axes&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos,&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YAxisLocation&#039;,&#039;right&#039;,&#039;Color&#039;,&#039;none&#039;,&#039;YTickLabel&#039;,&#039;&#039;,&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
hold on&lt;br /&gt;
pc(1) = plot(dc_ln.f,dc_ln.dxsc,&#039;k-&#039;,&#039;linewidth&#039;,2); % [0.3010 0.7450 0.9330]&lt;br /&gt;
pc(2) = plot(dc_ln.f,dc_ln.dxs,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pc(3) = plot(dc_ln.f,dc_ln.dxs_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
% pc(7) = plot(dc_11.f,dc_11.dxsc,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(8) = plot(dc_11.f,dc_11.dxs,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(9) = plot(dc_11.f,dc_11.dxs_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;Residual vapour fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
% 3rd axis&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos+[0 0 0 -ax1_pos(4)],&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YColor&#039;,&#039;w&#039;,&#039;YTick&#039;,[],&#039;Color&#039;,&#039;none&#039;,&#039;TickDir&#039;,&#039;out&#039;,&#039;FontSize&#039;,fs); &lt;br /&gt;
hold on&lt;br /&gt;
pc(7) = plot(dc_ln.Wconc,20*ones(size(dc_ln.Wconc)),&#039;k-&#039;); % [0.3010 0.7450 0.9330]&lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;T / °C&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,[dc_ln.Wconc(81) dc_ln.Wconc(61:-10:11)],&#039;XTickLabel&#039;,[-20 -10:5:15])&lt;br /&gt;
&lt;br /&gt;
h(2) = subplot(2,2,2);&lt;br /&gt;
% set(h(2),&#039;Position&#039;, [0.56 0.56 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pc(4) = plot(dc_no.Wconc,dc_no.d18Oc,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); % [0 0.4470 0.7410]&lt;br /&gt;
pc(5) = plot(dc_no.Wconc,dc_no.d18O,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pc(6) = plot(dc_no.Wconc,dc_no.d18O_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);  &lt;br /&gt;
ylim(h(2),[-60 -2]);&lt;br /&gt;
xlabel(&#039;Water mixing ratio / ppmv&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,2000:3000:16000);&lt;br /&gt;
ylabel([&#039;\delta^{18}O / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
% 2nd axis&lt;br /&gt;
ax1_pos = get(gca,&#039;position&#039;); % position of first axes&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos,&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YAxisLocation&#039;,&#039;right&#039;,&#039;Color&#039;,&#039;none&#039;,&#039;YTickLabel&#039;,&#039;&#039;,&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
hold on&lt;br /&gt;
pc(1) = plot(dc_ln.f,dc_ln.d18Oc,&#039;k-&#039;,&#039;linewidth&#039;,2); % [0.3010 0.7450 0.9330]&lt;br /&gt;
pc(2) = plot(dc_ln.f,dc_ln.d18O,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pc(3) = plot(dc_ln.f,dc_ln.d18O_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
% pc(7) = plot(dc_11.f,dc_11.d18Oc,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(8) = plot(dc_11.f,dc_11.d18O,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(9) = plot(dc_11.f,dc_11.d18O_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(gca,[-60 -2]);&lt;br /&gt;
xlabel(&#039;Residual vapour fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
lg = legend(h(2),pc(1:3),&#039;instant liquid/ice&#039;,&#039;residual vapour&#039;,&#039;total liquid/ice removed&#039;);&lt;br /&gt;
% lg = legend(h(2),pc(4:6),&#039;instant liquid/ice&#039;,&#039;residual vapour&#039;,&#039;total liquid/ice removed&#039;);&lt;br /&gt;
set(lg,&#039;Position&#039;,[0.69 0.66 0.20 0.06],&#039;FontSize&#039;,fs);&lt;br /&gt;
lg_pos = lg.Position;&lt;br /&gt;
% 3rd axis&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos+[0 -ax1_pos(4)*0.2 0 -ax1_pos(4)*0.8],&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YColor&#039;,&#039;w&#039;,&#039;YTick&#039;,[],&#039;Color&#039;,&#039;none&#039;); &lt;br /&gt;
hold on&lt;br /&gt;
pc(7) = plot(dc_ln.Wconc,-2+zeros(size(dc_ln.d18Oc)),&#039;k-&#039;); % [0.3010 0.7450 0.9330]&lt;br /&gt;
ylim(gca,[-60 -2]);&lt;br /&gt;
xlabel(&#039;T / °C&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,[dc_ln.Wconc(81) dc_ln.Wconc(61:-10:11)],&#039;XTickLabel&#039;,[-20 -10:5:15],&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
lg2 = legend(gca,pc(4:6),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;east&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lg2_pos = lg_pos+[-lg_pos(3)*0.405 +lg_pos(4)*0.02 0 lg_pos(4)*0.117]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lg2,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lg2_pos);&lt;br /&gt;
% add text&lt;br /&gt;
text(h(2),1300,-36,&#039;super&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,65)&lt;br /&gt;
text(h(2),2150,-27.5,&#039;saturation&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,50)&lt;br /&gt;
text(h(2),1200,-25,&#039;saturation&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,50,&#039;Color&#039;,0.6*[1 1 1])&lt;br /&gt;
&lt;br /&gt;
set([h(1) h(3)],&#039;XDir&#039;,&#039;reverse&#039;,&#039;box&#039;,&#039;on&#039;);&lt;br /&gt;
set(h(:),&#039;color&#039;,&#039;none&#039;,&#039;FontSize&#039;,fs,&#039;tickdir&#039;,&#039;out&#039;); % ,&#039;YAxisLocation&#039;,&#039;left&#039;,&#039;ticklength&#039;,[0 0],&#039;ygrid&#039;,&#039;on&#039;,&#039;xgrid&#039;,&#039;on&#039;&lt;br /&gt;
&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.05 0.96 0.02 0.02],&#039;String&#039;,&#039;(a)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.49 0.96 0.02 0.02],&#039;String&#039;,&#039;(b)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.05 0.48 0.02 0.02],&#039;String&#039;,&#039;(c)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.49 0.48 0.02 0.02],&#039;String&#039;,&#039;(d)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
&lt;br /&gt;
% print(&#039;-depsc&#039;,&#039;-r300&#039;,&#039;/scratch/home/figs/thesis/Rayleigh_model_plot&#039;);&lt;br /&gt;
% print(&#039;-dpng&#039;,&#039;-r300&#039;,&#039;/scratch/home/figs/thesis/Rayleigh_model_plot&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Rayleigh_model&amp;diff=1447</id>
		<title>Rayleigh model</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Rayleigh_model&amp;diff=1447"/>
		<updated>2021-01-26T20:25:44Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
The Rayleigh distillation model describes the evolution of a multiple-phase system in which one phase is continuously removed to the other phase through fractional distillation. Despite its simplicity, it is a powerful framework to describe in particular the isotopic enrichment or depletion as material moves between reservoirs in an equilibrium fractionation process. &lt;br /&gt;
&lt;br /&gt;
== Model description ==&lt;br /&gt;
&lt;br /&gt;
The system applying the Rayleigh equation is often an open system, from which the newly formed phase is immediately removed. For example, the evaporation of natural water bodies, and the formation of precipitation that immediately leaves the system, can be regarded as examples for open systems. However, with some modifications, Rayleigh models can be also applied to other systems. One such system is a closed system (or two-phase equilibrium model; Gat, (1996)), where the material removed from one reservoir accumulates in a second reservoir in such a manner that isotopic equilibrium is maintained between the two reservoirs. An example for this would be the condensation of vapour to droplets in a cloud, without formation and removal of precipitation.&lt;br /&gt;
&lt;br /&gt;
The isotopic enrichment or depletion by the Rayleigh process for both open and closed systems can be mathematically obtained by different approaches (Fig. 1). The Rayleigh equations that are used to describe the isotopic evolution of the remaining reservoir under different conditions are summarized in Table 1. The isotope ratio of the accumulated removal can be derived using mass conservation of rare isotopes remaining in the reservoir, and the removed component: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; fR_\text{remain} + (1-f)R_\text{remove,acc} = R_0 &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
In the case of condensation involving both liquid and solid phases, the accumulation is a combination of the removed mass fraction of both phases. First, following the equation above, the total liquid removal is calculated as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; R_\text{l,acc} = (R_0-fR_v)/(1-f) &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Then, we consider a separated Rayleigh process by only taking into account of the ongoing formation of the solid phase. Following the same reasoning as above, the isotope ratio of the accumulated solid removal is calculated by &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; f_iR_\text{i,v} + (1-f_i)R_\text{i,acc} = R_\text{v0} &amp;lt;/math&amp;gt;, &lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;R_\text{v0}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_\text{i,v}&amp;lt;/math&amp;gt; are the isotope ratio of the remaining vapour at the start and the calculating point of the solid condensation stage, respectively, and &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt; the fraction of remaining vapour within the solid condensation stage. Finally and again, using mass conservation of the rare isotopes, we obtain the isotope ratio of the total accumulation of the removal by &amp;lt;math&amp;gt; (1-ff_i)R_\text{acc} = (1-f)R_\text{l,acc} + f(1-f_i)R_\text{i,acc} &amp;lt;/math&amp;gt;. Corresponding examples of the calculated isotopic evolution profiles are shown in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Rayleigh_model_box_sketch_v2.png|thumb|800px|&#039;&#039;&#039;&#039;&#039;Figure 1&#039;&#039;&#039;&#039;&#039; Schematic presentation of the mathematical approaches of the Rayleigh model in open system &#039;&#039;&#039;(a, b)&#039;&#039;&#039; and closed system &#039;&#039;&#039;(c)&#039;&#039;&#039;. Adapted from Gat &#039;&#039;et al&#039;&#039; (2001). &lt;br /&gt;
&#039;&#039;&#039;(a)&#039;&#039;&#039; From a reservoir containing &#039;&#039;N&#039;&#039; abundant isotopologues (e.g. H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt;O) and &#039;&#039;N&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; rare isotopologues (e.g. H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O or HD&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt;O) small amounts of both species, &#039;&#039;dN&#039;&#039; and &#039;&#039;dN&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; respectively, are being removed under equilibrium fractionation conditions: &amp;lt;math&amp;gt; dN_i/dN = αR &amp;lt;/math&amp;gt;. &lt;br /&gt;
&#039;&#039;&#039;(b)&#039;&#039;&#039; The changing isotopic composition of the reservoir is calculated from a mass balance consideration for the rare isotopologues: &amp;lt;math&amp;gt; RN = (R-dR)(N-dN) + αRdN &amp;lt;/math&amp;gt;. &lt;br /&gt;
&#039;&#039;&#039;(c)&#039;&#039;&#039; In closed system, the changing isotopic composition of the reservoir can be calculated from a mass balance consideration for the rare isotopologues: &amp;lt;math&amp;gt; R_0N_0 = R(N_0-dN) + αRdN &amp;lt;/math&amp;gt;, with the remaining fraction &amp;lt;math&amp;gt; f = (N_0-dN)/N_0 &amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rayleigh_model_plot_v2_CG.png|thumb|800px|&#039;&#039;&#039;&#039;&#039;Figure 2&#039;&#039;&#039;&#039;&#039; Isotopic change during &#039;&#039;&#039;(a), (c)&#039;&#039;&#039; Rayleigh evaporation, and &#039;&#039;&#039;(b), (d)&#039;&#039;&#039; Rayleigh condensation. &lt;br /&gt;
&lt;br /&gt;
Rayleigh evaporation occurs here at 20 °C (thus a constant fractionation factor) for initial liquid compositions of δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -10 ‰ and δD = -70 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰), in open system with unsaturated (RH = 75 %; black) or saturated (grey) environment, and closed system (blue). In addition, the result of C--G evaporation model (i.e. open system including feedback from a &amp;quot;free atmosphere&amp;quot; which has fixed isotope compositions of δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -13 ‰ and δD = -94 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰) and a fixed relative humidity (RH = 75 %)) is also presented (red). &lt;br /&gt;
&lt;br /&gt;
Rayleigh condensation occurs here under continuous cooling (thus also a contentiously changing fractionation factor) from T = 20 °C and RH = 75 %. The initial vapour compositions are δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -13 ‰ and δD = -94 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰). For the condensation to ice below 0 °C, two cases are presented. The saturation case (grey) is a classical Rayleigh process where ice crystals from from vapour under equilibrium conditions, using the saturation pressure over ice (&#039;&#039;e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;). The supersaturation case (black) takes into account the supersaturation over ice, where the ambient vapour pressure is &#039;&#039;e&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; = S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;*e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;. &#039;&#039;S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; is the defined saturation ratio, as &#039;&#039;e&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;/e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;, and here takes the form &#039;&#039;S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; = 1-0.004T&#039;&#039; after Risi &#039;&#039;et al&#039;&#039; (2010a). In this case, the fractionation factor combining equilibrium and kinetic effects given by Jouzel &amp;amp; Merlivat (1984) is used.&lt;br /&gt;
&lt;br /&gt;
The equations used in this figure can be found in Table 1.]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ &#039;&#039;Table 1&#039;&#039; Rayleigh equations to calculate isotopic evolution of the remaining reservoir under different conditions. The transport resistance is here assumed to be purely due to diffusion (i.e.  &amp;lt;math&amp;gt;\rho \propto D^{-1} &amp;lt;/math&amp;gt;).  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Conditions&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; colspan=&amp;quot;2&amp;quot;| Equation (&#039;&#039;R&#039;&#039; and &#039;&#039;δ&#039;&#039; notation)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Fractionation factor used&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;4&amp;quot;| Evaporation&lt;br /&gt;
| open system saturated&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{vl}&amp;lt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| open system undersaturated&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \frac{1}{\alpha_k \alpha_{lv}} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{lv}&amp;gt;1 &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; \alpha_k = \frac{D}{D&#039;}(1-h)+h &amp;gt; 1 &amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt; h = \frac{e_v}{e_l} &amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| closed system&lt;br /&gt;
| &amp;lt;math&amp;gt; R = \frac{R_0}{f+\alpha(1-f)} &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \delta = \frac{1+\delta_0}{f+\alpha(1-f)}-1 &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{vl}&amp;lt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| C--G model&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{\alpha-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \delta = (1+\delta_0)f^{\alpha-1}-1 &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \frac{\alpha_{vl}-h\frac{R_a}{R_l}}{(1-h)\frac{D}{D&#039;}} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{vl} &amp;lt; 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;2&amp;quot;| Condensation&lt;br /&gt;
| saturation over ice&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{sv}&amp;gt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supersaturation over ice&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \alpha_k \alpha_{sv} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{sv}&amp;gt;1 &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; \alpha_k = \frac{S_i}{\alpha_s \frac{D}{D&#039;}(S_i-1)+1} &amp;lt; 1 &amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt; S_i = \frac{e_v}{e_i} &amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Model codes in MATLAB ==&lt;br /&gt;
&lt;br /&gt;
=== Rayleigh evaporation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% rayleigh_evaporation.m&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Description:&lt;br /&gt;
% simple Rayleigh evaporation model, after Stern and Blisniuk, 2002&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% input variables: T0 (Kelvin), d18O0 (permil), d2H0 (permil);&lt;br /&gt;
%                  system: closed system = 0, open system = 1, C--G model = 2; &lt;br /&gt;
%                  optional: relative humidity (default = 1), d18Oa (permil), d2Ha (permil)&lt;br /&gt;
% run example: rayleigh_evaporation(20+273.15,-10,-70,1,0.75)&lt;br /&gt;
%              rayleigh_evaporation(20+273.15,-10,-70,1)&lt;br /&gt;
%              rayleigh_evaporation(20+273.15,-10,-70,2)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% HS, Do 12 Dez 2013 15:43:28 CET&lt;br /&gt;
% YW, structured and included the case of kinetic effect &lt;br /&gt;
% and the case of C--G model, 29 Aug 2020&lt;br /&gt;
%--------------------------------&lt;br /&gt;
&lt;br /&gt;
function data = rayleigh_evaporation(T0,d18O0,d2H0,system,h,d18Oa,d2Ha)&lt;br /&gt;
&lt;br /&gt;
% %% dubugging&lt;br /&gt;
% T0 = 20+273.15;&lt;br /&gt;
% d18O0 = -10; % close to Bergen precipitation average&lt;br /&gt;
% d2H0 = -70;&lt;br /&gt;
% system = 1;&lt;br /&gt;
% h = 0.75;&lt;br /&gt;
&lt;br /&gt;
%% fractionation factors&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Majoube, M., 1971a: Fractionnement en oxyg`ene-18 entre la glace et la vapeur d’eau. J.&lt;br /&gt;
% Chim. Phys., 68, 625–636.&lt;br /&gt;
&lt;br /&gt;
% Majoube, M., 1971b: Fractionnement en oxyg`ene 18 et deut ́erium entre l’eau et sa vapeur. J. Chim.&lt;br /&gt;
% Phys., 68, 1423–1436.&lt;br /&gt;
&lt;br /&gt;
% Merlivat, L. and G. Nief, 1967: Fractionnement isotopique lors des changements d‘ ́etat&lt;br /&gt;
% solide-vapeur et liquide-vapeur de l’eau `a des temp ́eratures inf ́erieures a ` 0 ◦ C. Tellus,&lt;br /&gt;
% 19, 122–127.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
    function d = a2H(T) % T in K&lt;br /&gt;
        d = 1/exp(24.844e3/(T^2)-76.248/T+52.612e-3); % Majoube 1971b, R_vapour/R_liquid &amp;lt; 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    function d = a18O(T) % T in K&lt;br /&gt;
        d = 1/exp(1137/(T^2)-0.4156/T-0.0020667); % Majoube 1971b, R_vapour/R_liquid &amp;lt; 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
%% initialization&lt;br /&gt;
% isotope ratios of VSMOW reference water&lt;br /&gt;
R2std = 155.76e-6;&lt;br /&gt;
R18std = 2005.20e-6;&lt;br /&gt;
% initial isotope ratio&lt;br /&gt;
R18O0 = (d18O0/1000+1)*R18std;&lt;br /&gt;
R2H0 = (d2H0/1000+1)*R2std;&lt;br /&gt;
% relative humidity&lt;br /&gt;
if ~exist(&#039;h&#039;,&#039;var&#039;)&lt;br /&gt;
    h = 1;&lt;br /&gt;
end&lt;br /&gt;
% isotope composition of &amp;quot;free atmosphere&amp;quot;&lt;br /&gt;
% if not existing, default it to the equilibrium vapour of global average precipitation &lt;br /&gt;
if ~exist(&#039;d18Oa&#039;,&#039;var&#039;)&lt;br /&gt;
    d18Oa = -13;  &lt;br /&gt;
end&lt;br /&gt;
if ~exist(&#039;d2Ha&#039;,&#039;var&#039;)&lt;br /&gt;
    d2Ha = -94;  &lt;br /&gt;
end&lt;br /&gt;
R18Oa = (d18Oa/1000+1)*R18std;&lt;br /&gt;
R2Ha = (d2Ha/1000+1)*R2std;&lt;br /&gt;
&lt;br /&gt;
% % ouput variables&lt;br /&gt;
% data.T = [];&lt;br /&gt;
% data.f = [];&lt;br /&gt;
% data.d18Ov = [];&lt;br /&gt;
% data.d18Ol = [];&lt;br /&gt;
% data.d2Hv = [];&lt;br /&gt;
% data.d2Hl = [];&lt;br /&gt;
% data.dxsv = [];&lt;br /&gt;
% data.dxsl = [];&lt;br /&gt;
% data.d18Ov_acc = [];&lt;br /&gt;
% data.d2Hv_acc = [];&lt;br /&gt;
% data.dxsv_acc = [];&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (0) in closed system (material maintained under two-phase equilibrium)&lt;br /&gt;
% i.e., the material removed stays in the closed system and stays in equilibrium with the reservoir&lt;br /&gt;
if system == 0&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an closed system (material maintained under two-phase equilibrium) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    i = 1;   % iteration steps&lt;br /&gt;
    for f = 1:-0.02:0 % remaining liquid fraction&lt;br /&gt;
        % isotope ratio of remaining liquid&lt;br /&gt;
        R18Ol = R18O0/(a18O(T0) - f*(a18O(T0)-1)); % Gat1996&lt;br /&gt;
        R2Hl = R2H0/(a2H(T0) - f*(a2H(T0)-1));     % Gat1996&lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*a18O(T0)-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*a2H(T0)-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        % (3) delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = d18Ov;&lt;br /&gt;
        d2Hv_acc = d2Hv;&lt;br /&gt;
        dxsv_acc = dxsv;&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
        &lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (1) in an open system (material is immediately removed)&lt;br /&gt;
if system == 1&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    i = 1; % iteration steps&lt;br /&gt;
    n = 1; % turbulent exponent in D^n, [0 1], controls the ratio of diffusive transport over turbulent transport of water molecules (Pfahl and Wernli, 2009)&lt;br /&gt;
    for f = 1:-0.02:0 % remaining liquid fraction&lt;br /&gt;
       &lt;br /&gt;
        % modified Rayleigh evaporation model including kinectic effct&lt;br /&gt;
        % during the vapour formation at undersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
        % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
        % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
        % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
        D18 = 0.9723;  % D&#039;/D&lt;br /&gt;
        D2 = 0.9755;   % D&#039;/D&lt;br /&gt;
        ak_18O = 1/(1/D18^n*(1-h)+h);&lt;br /&gt;
        ak_2H = 1/(1/D2^n*(1-h)+h);&lt;br /&gt;
        aeff_18O = a18O(T0) * ak_18O;&lt;br /&gt;
        aeff_2H = a2H(T0) * ak_2H;&lt;br /&gt;
        &lt;br /&gt;
        % isotope ratio of remaining liquid&lt;br /&gt;
        R18Ol = R18O0*f^(aeff_18O-1);&lt;br /&gt;
        R2Hl = R2H0*f^(aeff_2H-1);&lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        &lt;br /&gt;
        % (3) isotope ratio of the accumulated removed vapour&lt;br /&gt;
        R18Ov_acc = R18O0*(1-f^aeff_18O)/(1-f); % Mook 2001, Page 38&lt;br /&gt;
        R2Hv_acc = R2H0*(1-f^aeff_2H)/(1-f);&lt;br /&gt;
        % delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
        d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
        dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
%         % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
%         % mass conservation of rare isotopes between the reservoir and formed removal: f*Rl+(1-f)*Rv_acc=R0,&lt;br /&gt;
%         % after rearranging, we have: Rv_acc=(R0-f*Rl)/(1-f)&lt;br /&gt;
%         R18Ov_acc2 = (R18O0-f*R18Ol)/(1-f);&lt;br /&gt;
%         R2Hv_acc2 = (R2H0-f*R2Hl)/(1-f);&lt;br /&gt;
%         data.d18Ov_acc2(i) = (R18Ov_acc2/R18std-1)*1000;&lt;br /&gt;
%         data.d2Hv_acc2(i) = (R2Hv_acc2/R2std-1)*1000;&lt;br /&gt;
%         data.dxsv_acc2(i) = data.d2Hv_acc2(i)-8*data.d18Ov_acc2(i);&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
&lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (2) in a &amp;quot;free atmosphere&amp;quot; of fixed humidity and isotope composition (C--G model)&lt;br /&gt;
if system == 2&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    % turbulent exponent in D^n, [0 1], controls the ratio of diffusive transport over turbulent transport of water molecules (Pfahl and Wernli, 2009)&lt;br /&gt;
    % n~0.5 for an open water body under natural conditions, n~0.58 for a falling raindrop (Stewart1975), n~1 for soils and leaves &lt;br /&gt;
    n = 1; &lt;br /&gt;
    df = 0.02;&lt;br /&gt;
    i = 1;   % iteration steps&lt;br /&gt;
    &lt;br /&gt;
    for f = 1:-df:0 % remaining liquid fraction&lt;br /&gt;
&lt;br /&gt;
        % modified Rayleigh evaporation model including kinectic effct&lt;br /&gt;
        % during the vapour formation at undersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
        % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
        % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
        % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
        D18 = 0.9723;  % D&#039;/D&lt;br /&gt;
        D2 = 0.9755;   % D&#039;/D&lt;br /&gt;
        if i==1&lt;br /&gt;
            aeff_18O = (a18O(T0) - h*R18Oa/R18O0) / ((1-h)*1/D18^n);&lt;br /&gt;
            aeff_2H = (a2H(T0) - h*R2Ha/R2H0) / ((1-h)*1/D2^n);&lt;br /&gt;
            % isotope ratio of remaining liquid&lt;br /&gt;
            f1 = 1;&lt;br /&gt;
            R18Ol = R18O0*f1^(aeff_18O-1);&lt;br /&gt;
            R2Hl = R2H0*f1^(aeff_2H-1);&lt;br /&gt;
        else&lt;br /&gt;
            aeff_18O = (a18O(T0) - h*R18Oa/data.R18Ol(i-1)) / ((1-h)*1/D18^n);&lt;br /&gt;
            aeff_2H = (a2H(T0) - h*R2Ha/data.R2Hl(i-1)) / ((1-h)*1/D2^n);&lt;br /&gt;
            % isotope ratio of remaining liquid&lt;br /&gt;
            f1 = 1-df; % fraction remaining relative to previous stage&lt;br /&gt;
            R18Ol = data.R18Ol(i-1)*f1^(aeff_18O-1);&lt;br /&gt;
            R2Hl = data.R2Hl(i-1)*f1^(aeff_2H-1);&lt;br /&gt;
        end&lt;br /&gt;
       &lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        &lt;br /&gt;
%         % (3) isotope ratio of the accumulated removed vapour&lt;br /&gt;
%         R18Ov_acc = R18O0*(1-f^aeff_18O)/(1-f); % Mook 2001, Page 38&lt;br /&gt;
%         R2Hv_acc = R2H0*(1-f^aeff_2H)/(1-f);&lt;br /&gt;
%         % delta value of the accumulated removed vapour&lt;br /&gt;
%         d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
%         d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
%         dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
        % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
        % mass conservation of rare isotopes between the reservoir and formed removal: f*Rl+(1-f)*Rv_acc=R0,&lt;br /&gt;
        % after rearranging, we have: Rv_acc=(R0-f*Rl)/(1-f)&lt;br /&gt;
        R18Ov_acc = (R18O0-f*R18Ol)/(1-f);&lt;br /&gt;
        R2Hv_acc = (R2H0-f*R2Hl)/(1-f);&lt;br /&gt;
        % delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
        d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
        dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
        &lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
        &lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
% fin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rayleigh condensation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% rayleigh_condensation.m&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Description:&lt;br /&gt;
% - simple Rayleigh condensation model, after Stern and Blisniuk, 2002&lt;br /&gt;
% - temperature dependent fractionation factor varies at each step during cooling process&lt;br /&gt;
%   (1) isobaric cooling: e.g., air parcel advects to cold regions&lt;br /&gt;
%   (2) or pseudoadiabatic cooling: e.g., updraft or lift of surface air parcel&lt;br /&gt;
% - therefore, the isotope ratio is calculated as: R(n+1) = R(n)(q(n+1)/q(n))^(a-1)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% input variables: T0 (Kelvin), RH0 (%), d18O0 (permil), d2H0 (permil),&lt;br /&gt;
%                  sice: saturation conditions over ice when temperature &amp;lt;0 degree&lt;br /&gt;
%                        &amp;gt; 1: using the constant supersaturation given as sice;&lt;br /&gt;
%                        = 1: meaning alpha_k = 1, thus no supersaturation;&lt;br /&gt;
%                        = 0: using formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
% run example: rayleigh_condensation(20+273.15,0.75,-13,-94,0)&lt;br /&gt;
%              rayleigh_condensation(20+273.15,0.75,-13,-94,1)&lt;br /&gt;
%              rayleigh_condensation(20+273.15,0.75,-13,-94,1.2)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% HS, Do 12 Dez 2013 15:43:28 CET&lt;br /&gt;
% YW, structured and included kinetic effect, 29 Aug 2020&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% YW, 26 Mar 2020&lt;br /&gt;
% limitation:&lt;br /&gt;
% Rayleigh condensation model only reflects the process of water vapor removing&lt;br /&gt;
% and ignores: mixing of air masses, cloud water-vapor isotope exchange,&lt;br /&gt;
% subcloud droplet evaporation, and radiative cooling or heating.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
&lt;br /&gt;
function data = rayleigh_condensation(T0,RH0,d18O0,d2H0,sice)&lt;br /&gt;
&lt;br /&gt;
% %% for debugging&lt;br /&gt;
% T0 = 20+273.15;&lt;br /&gt;
% RH0 = 0.75; % Craig-Gordon, 1965 (Fig. 15)&lt;br /&gt;
% d18O0 = -13;&lt;br /&gt;
% d2H0 = -94;&lt;br /&gt;
% sice = 0;&lt;br /&gt;
&lt;br /&gt;
% RH0 = 0.91;  % 20161207 AR event at Bergen&lt;br /&gt;
% d18O0 = -12.5;&lt;br /&gt;
% d2H0 = -100;&lt;br /&gt;
&lt;br /&gt;
%% functions adopted&lt;br /&gt;
% fractionation factors&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Majoube, M., 1971a: Fractionnement en oxyg`ene-18 entre la glace et la vapeur d’eau. J.&lt;br /&gt;
% Chim. Phys., 68, 625–636.&lt;br /&gt;
&lt;br /&gt;
% Majoube, M., 1971b: Fractionnement en oxyg`ene 18 et deut ́erium entre l’eau et sa vapeur. J. Chim.&lt;br /&gt;
% Phys., 68, 1423–1436.&lt;br /&gt;
&lt;br /&gt;
% Merlivat, L. and G. Nief, 1967: Fractionnement isotopique lors des changements d‘ ́etat&lt;br /&gt;
% solide-vapeur et liquide-vapeur de l’eau `a des temp ́eratures inf ́erieures a ` 0 °C. Tellus,&lt;br /&gt;
% 19, 122–127.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
    function d = a2H(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15 % above 0 celsius&lt;br /&gt;
            d = exp(24.844e3/(T^2)-76.248/T+52.612e-3); % Majoube 1971b, R_liquid/R_vapour &amp;gt; 1&lt;br /&gt;
        else&lt;br /&gt;
            d = exp(16289./T.^2 - 0.0945);   % Merlivat &amp;amp; Nief 1967, R_solid/R_vapour &amp;gt; 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    function d = a18O(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15 % above 0 celsius&lt;br /&gt;
            d = exp(1137/(T^2)-0.4156/T-0.0020667); % Majoube 1971b, R_liquid/R_vapour &amp;gt; 1&lt;br /&gt;
        else&lt;br /&gt;
            d = exp(11.839./T - 0.028224); % Majoube 1971a, R_solid/R_vapour &amp;gt; 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% supersaturation with respect to ice&lt;br /&gt;
% Si = 1 − λT, with λ = 0.004. From Graf 2017 dissertation, page 53, Fig 3.1&lt;br /&gt;
% (as in Risi et al., 2010b, after Jouzel and Merlivat 1984.)&lt;br /&gt;
% Risi, C., S. Bony, F. Vimeux, and J. Jouzel, 2010b: Water-stable isotopes in the LMDZ4&lt;br /&gt;
% general circulation model: Model evaluation for present-day and past climates and&lt;br /&gt;
% applications to climatic interpretations of tropical isotopic records.&lt;br /&gt;
% sice: &amp;gt; 1: using the constant supersaturation given here;&lt;br /&gt;
%       = 1: meaning alpha_k = 1, thus no supersaturation;&lt;br /&gt;
%       = 0: using formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
    function s = si(T)&lt;br /&gt;
        if sice &amp;gt;= 1&lt;br /&gt;
            s = sice;&lt;br /&gt;
        else  % elseif sice == 0&lt;br /&gt;
            s = 1-0.004*(T-273.15);&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% vapour saturation pressure&lt;br /&gt;
    function es = esat(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15&lt;br /&gt;
            % es = 611*exp((17.27*T)/(273+T)); % T in celsius&lt;br /&gt;
            es = 611*exp(17.27*(T-273.15)/T); % T in Kelvin&lt;br /&gt;
        else&lt;br /&gt;
            % Saturation vapour pressure over ice (Murphy and Koop, 2005) for T &amp;gt; 110 K:&lt;br /&gt;
            es_ice = exp(9.550426 - 5723.265/T + 3.53068*log(T) - 0.00728332*T);&lt;br /&gt;
            % the actual saturation vapour pressure&lt;br /&gt;
            es = es_ice * si(T);&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% saturated vapour mixing ratio&lt;br /&gt;
    function ws = wsat(es,p)&lt;br /&gt;
        ws = 0.622*es/(p-es);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% pressure at height of z&lt;br /&gt;
    function p = pressure(z)&lt;br /&gt;
        p0 = 101325; % Pa&lt;br /&gt;
        z0 = 8000;   % m scale height&lt;br /&gt;
        p = p0*exp(-z/z0);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% moist adiabatic lapse rate [Curry and Webster,1999] (cited after Stern and Blisniuk, 2002)&lt;br /&gt;
    function lr = gamma(ws,T) % T in Kelvin&lt;br /&gt;
        % physical constants&lt;br /&gt;
        g = 9.80665;     % m/s^2  the gravitational acceleration&lt;br /&gt;
        Cpd = 1.00464e3; % J/kg/K the specific heat capacity of dry air at constant pressure&lt;br /&gt;
        L = 2.5104e6;    % J/kg   the latent heat of vaporization or sublimation&lt;br /&gt;
        Rd = 287.04;     % J/kg/K the specific gas constant for dry air&lt;br /&gt;
        lr = g/Cpd*(1+L*ws/Rd/T)/(1+0.622*L*L*ws/Rd/Cpd/T/T); % [°C/m]&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
%% initialization&lt;br /&gt;
% isotope ratios of VSMOW reference water&lt;br /&gt;
R2std = 155.76e-6;&lt;br /&gt;
R18std = 2005.20e-6;&lt;br /&gt;
% initial isotope ratio&lt;br /&gt;
R18O0 = (d18O0/1000+1)*R18std;&lt;br /&gt;
R2H0 = (d2H0/1000+1)*R2std;&lt;br /&gt;
dxs0 = R2H0-8*R18O0;&lt;br /&gt;
&lt;br /&gt;
% initial conditions&lt;br /&gt;
f = 1.0;  % remaining vapour fractionation&lt;br /&gt;
z = 0.0;  % elevation&lt;br /&gt;
p = pressure(z);&lt;br /&gt;
w0 = RH0*wsat(esat(T0),p); % kg/kg&lt;br /&gt;
% convert water mixing ratio unit&lt;br /&gt;
md = 28.97; % [g/mol] dry air molar mass&lt;br /&gt;
mv = 18.02; % [g/mol] water vapour molar mass&lt;br /&gt;
wconc0 = w0*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
rh = RH0;&lt;br /&gt;
dt = 0.5;  % temperature step&lt;br /&gt;
T = T0+dt;&lt;br /&gt;
&lt;br /&gt;
%% for the circumstance of isobaric cooling&lt;br /&gt;
%% (1) cool to saturation&lt;br /&gt;
fprintf(&#039;Rayleigh condensation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
fprintf(&#039;   T (°C)   d18Ov     d2Hv     dxsv       rh        f WConc[ppmv] \n&#039;);&lt;br /&gt;
n = 1;  % iteration number&lt;br /&gt;
while rh &amp;lt; 0.99&lt;br /&gt;
    T = T-dt; % decrease temperature by dt °C at each iteration&lt;br /&gt;
    ws = wsat(esat(T),p); % saturated water mixing ratio at each iteration&lt;br /&gt;
    rh = w0/ws;                 % RH at each iteration&lt;br /&gt;
    wconc = wconc0; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18O0,d2H0,dxs0,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18O0;&lt;br /&gt;
    data.R2H(n) = R2H0;&lt;br /&gt;
    data.d18O(n) = d18O0;&lt;br /&gt;
    data.dD(n) = d2H0;&lt;br /&gt;
    data.dxs(n) = d2H0-8*d18O0;&lt;br /&gt;
    data.d18Oc(n) = NaN; % condensate&lt;br /&gt;
    data.d2Hc(n) = NaN;&lt;br /&gt;
    data.dxsc(n) = NaN;&lt;br /&gt;
    data.d18O_acc(n) = NaN; % accumulated condensate (liquid+solid)&lt;br /&gt;
    data.d2H_acc(n) = NaN;&lt;br /&gt;
    data.dxs_acc(n) = NaN;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;Reached saturation now\n&#039;);&lt;br /&gt;
&lt;br /&gt;
ws0 = w0;&lt;br /&gt;
&lt;br /&gt;
%% (2) continue to cool and form liquid condensate&lt;br /&gt;
while T &amp;gt; 273.15 % isobaric cooling with condensation to 0 °C&lt;br /&gt;
    T = T-dt; % decrease temperature by dt °C at each iteration&lt;br /&gt;
    ws = wsat(esat(T),p); % saturated water mixing ratio at each iteration&lt;br /&gt;
    wconc = ws*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    f = ws/ws0;&lt;br /&gt;
    &lt;br /&gt;
    if n == 1&lt;br /&gt;
        f1 = ws/ws0;&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = R18O0*f1^(a18O(T)-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = R2H0*f1^(a2H(T)-1);&lt;br /&gt;
    else&lt;br /&gt;
        f1 = wconc/data.Wconc(n-1); % q(n)/q(n-1)&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = data.R18O(n-1)*f1^(a18O(T)-1);  % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = data.R2H(n-1)*f1^(a2H(T)-1);&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    % (1) delta value of remaining vapour&lt;br /&gt;
    d18Ov = (R18Ov/R18std-1)*1000;&lt;br /&gt;
    d2Hv = (R2Hv/R2std-1)*1000;&lt;br /&gt;
    dxsv = d2Hv - 8*d18Ov;&lt;br /&gt;
    &lt;br /&gt;
    % (2) delta value of the instantaneously removed condensate (in equilibrium with the current remaining vapour)&lt;br /&gt;
    d18Oc = ((d18Ov/1000+1)*a18O(T)-1)*1000;&lt;br /&gt;
    d2Hc = ((d2Hv/1000+1)*a2H(T)-1)*1000;&lt;br /&gt;
    dxsc = d2Hc-8*d18Oc;&lt;br /&gt;
    &lt;br /&gt;
    % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
    % mass conservation of rare isotopes between the reservoir and formed removal: f*Rv + (1-f)*Rl_acc = R0,&lt;br /&gt;
    % after rearranging, we have: Rl_acc = (R0-f*Rv)/(1-f)&lt;br /&gt;
    R18Ol_acc = (R18O0-f*R18Ov)/(1-f);&lt;br /&gt;
    R2Hl_acc = (R2H0-f*R2Hv)/(1-f);&lt;br /&gt;
    d18Ol_acc = (R18Ol_acc/R18std-1)*1000;&lt;br /&gt;
    d2Hl_acc = (R2Hl_acc/R2std-1)*1000;&lt;br /&gt;
    dxsl_acc = d2Hl_acc-8*d18Ol_acc;&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18Ov,d2Hv,dxsv,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18Ov;&lt;br /&gt;
    data.R2H(n) = R2Hv;&lt;br /&gt;
    data.d18O(n) = d18Ov;&lt;br /&gt;
    data.dD(n) = d2Hv;&lt;br /&gt;
    data.dxs(n) = dxsv;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.d18Oc(n) = d18Oc;&lt;br /&gt;
    data.d2Hc(n) = d2Hc;&lt;br /&gt;
    data.dxsc(n) = dxsc;&lt;br /&gt;
    data.d18O_acc(n) = d18Ol_acc;&lt;br /&gt;
    data.d2H_acc(n) = d2Hl_acc;&lt;br /&gt;
    data.dxs_acc(n) = dxsl_acc;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;Have cooled to 0 celcius now \n&#039;);&lt;br /&gt;
&lt;br /&gt;
ws0_ice = ws;&lt;br /&gt;
R18O0 = R18Ov;&lt;br /&gt;
R2H0 = R2Hv;&lt;br /&gt;
f0 = f;&lt;br /&gt;
&lt;br /&gt;
%% (3) continue to cool and form solid condensate&lt;br /&gt;
% considering mixed-phase cloud: subsaturated over liquid droplets and supersaturated over ice crystals&lt;br /&gt;
&lt;br /&gt;
% closure assumption: liquid droplets --&amp;gt; evaporate to vapour --&amp;gt; deposite on ice crystals&lt;br /&gt;
% therefore: when T&amp;lt;0 celsius, the reduced fraction of vapour is due to its deposit on ice crystals with a fractionation&lt;br /&gt;
% factor alpha_eff = alpha_eq*alpha_k taking into account the kinetic effct under the supersaturation condition.&lt;br /&gt;
% i.e.: we start a new Rayleigh condensation model starting with the remaining vapour&lt;br /&gt;
% after the liquid condensation stage above, and use the new factionation factor alpha_eff&lt;br /&gt;
&lt;br /&gt;
while T &amp;gt; -60+273.15&lt;br /&gt;
    T = T-dt;&lt;br /&gt;
    ws = wsat(esat(T),p);&lt;br /&gt;
    wconc = ws*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    f = ws/ws0;      % the total fraction of remaining vapour through all stages&lt;br /&gt;
    fi = ws/ws0_ice; % the fraction of remaing vapour in the ice condensation stage only&lt;br /&gt;
        &lt;br /&gt;
    % modified Rayleigh condensation model including kinectic effct&lt;br /&gt;
    % during the ice formation at supersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
    % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
    % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
    % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
    ak_18O = si(T)/(a18O(T)*1/0.9723*(si(T)-1) + 1);&lt;br /&gt;
    ak_2H = si(T)/(a2H(T)*1/0.9755*(si(T)-1) + 1);&lt;br /&gt;
    aeff_18O = a18O(T) * ak_18O;&lt;br /&gt;
    aeff_2H = a2H(T) * ak_2H;&lt;br /&gt;
    &lt;br /&gt;
    if n == 1&lt;br /&gt;
        f1 = ws/ws0;&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = R18O0*f1^(aeff_18O-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = R2H0*f1^(aeff_2H-1);&lt;br /&gt;
    else&lt;br /&gt;
        f1 = wconc/data.Wconc(n-1); % q(n)/q(n-1)&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = data.R18O(n-1)*f1^(aeff_18O-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1), and Jouzel and Merlivat, 1984&lt;br /&gt;
        R2Hv = data.R2H(n-1)*f1^(aeff_2H-1);&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    % (1) delta value of remaining vapour&lt;br /&gt;
    d18Ov = (R18Ov/R18std-1)*1000;&lt;br /&gt;
    d2Hv = (R2Hv/R2std-1)*1000;&lt;br /&gt;
    dxsv = d2Hv - 8*d18Ov;&lt;br /&gt;
    &lt;br /&gt;
    % (2) delta value of the instantaneously removed condensate (in equilibrium with the current remaining vapour)&lt;br /&gt;
    d18Oc = ((d18Ov/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
    d2Hc = ((d2Hv/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
    dxsc = d2Hc-8*d18Oc;&lt;br /&gt;
    &lt;br /&gt;
    % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
    % (i) mass conservation of rare isotopes between the reservoir and formed removal:&lt;br /&gt;
    % fi*Rv + (1-fi)*Ri_acc = Rv0,&lt;br /&gt;
    % where fi is the fraction of remaining vapour in the ice condensation stage, and&lt;br /&gt;
    % Rv0 is the isotope ratio of the remaining vapour after liquid condensation stage&lt;br /&gt;
    % after rearranging, we have: Ri_acc = (Rv0-fi*Rv)/(1-fi)&lt;br /&gt;
    R18Oi_acc = (R18O0-fi*R18Ov)/(1-fi);&lt;br /&gt;
    R2Hi_acc = (R2H0-fi*R2H0)/(1-fi);&lt;br /&gt;
    %         d18Oi_acc = (R18Oi_acc/R18std-1)*1000;&lt;br /&gt;
    %         d2Hi_acc = (R2Hi_acc/R2std-1)*1000;&lt;br /&gt;
    %         dxsi_acc = d2Hi_acc-8*d18Oi_acc;&lt;br /&gt;
    % (ii) the total accumulation is sum of the liquid (1-f0) and solid condensate (f0*(1-fi))&lt;br /&gt;
    % (1-f0*fi)*R_acc = (1-f0)*Rl_acc + (f0*(1-fi))*Ri_acc&lt;br /&gt;
    R18O_acc = ((1-f0)*R18Ol_acc + (f0*(1-fi))*R18Oi_acc)/(1-f0*fi);&lt;br /&gt;
    R2H_acc = ((1-f0)*R2Hl_acc + (f0*(1-fi))*R2Hi_acc)/(1-f0*fi);&lt;br /&gt;
    d18O_acc = (R18O_acc/R18std-1)*1000;&lt;br /&gt;
    d2H_acc = (R2H_acc/R2std-1)*1000;&lt;br /&gt;
    dxs_acc = d2H_acc-8*d18O_acc;&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18Ov,d2Hv,dxsv,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18Ov;&lt;br /&gt;
    data.R2H(n) = R2Hv;&lt;br /&gt;
    data.d18O(n) = d18Ov;&lt;br /&gt;
    data.dD(n) = d2Hv;&lt;br /&gt;
    data.dxs(n) = dxsv;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.d18Oc(n) = d18Oc;&lt;br /&gt;
    data.d2Hc(n) = d2Hc;&lt;br /&gt;
    data.dxsc(n) = dxsc;&lt;br /&gt;
    data.d18O_acc(n) = d18O_acc;&lt;br /&gt;
    data.d2H_acc(n) = d2H_acc;&lt;br /&gt;
    data.dxs_acc(n) = dxs_acc;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% for the circumstance of pseudoadiabatic cooling&lt;br /&gt;
% - establish the relationship between T and z&lt;br /&gt;
z = 0;&lt;br /&gt;
p = pressure(z);&lt;br /&gt;
n = 1;&lt;br /&gt;
for T = T0:-dt:-60+273.15&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.z(n) = z;&lt;br /&gt;
    data.p(n) = p;&lt;br /&gt;
    % the elevation change&lt;br /&gt;
    ws = wsat(esat(T),p);&lt;br /&gt;
    lr = gamma(ws,T); % lapse rate&lt;br /&gt;
    dz = dt/lr;   % dt = lr*dz&lt;br /&gt;
    % the new elevation and pressure&lt;br /&gt;
    z = z+dz;&lt;br /&gt;
    p = pressure(z);&lt;br /&gt;
    data.lr(n) = lr;   &lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
% fin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of usage ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Generate the desired data sets&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%% create data sets&lt;br /&gt;
% Rayleigh evaporation&lt;br /&gt;
T0 = 20+273.15;&lt;br /&gt;
d18O0 = -10; % close to Bergen precipitation average&lt;br /&gt;
d2H0 = -70;&lt;br /&gt;
h = 0.75; % relative humidity&lt;br /&gt;
de_ok = rayleigh_evaporation(T0,d18O0,d2H0,1,h); % in an open system, unsaturated (including kinetic effect)&lt;br /&gt;
de_oe = rayleigh_evaporation(T0,d18O0,d2H0,1);   % in an open system, saturated (equilibrium)&lt;br /&gt;
de_cl = rayleigh_evaporation(T0,d18O0,d2H0,0);   % in a closed system&lt;br /&gt;
de_CG = rayleigh_evaporation(T0,d18O0,d2H0,2,h); % C--G model&lt;br /&gt;
&lt;br /&gt;
% Rayleigh condensation&lt;br /&gt;
T0 = 20+273.15;&lt;br /&gt;
RH0 = 0.75; % Craig-Gordon, 1965 (Fig. 15)&lt;br /&gt;
d18O0 = -13;&lt;br /&gt;
d2H0 = -94;&lt;br /&gt;
% &amp;gt; 1: using the constant supersaturation given as sice;&lt;br /&gt;
% = 1: &lt;br /&gt;
% = 0: &lt;br /&gt;
dc_ln = rayleigh_condensation(T0,RH0,d18O0,d2H0,0);   % using linear formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
dc_no = rayleigh_condensation(T0,RH0,d18O0,d2H0,1);   % meaning alpha_k = 1, thus no supersaturation, e = e_ice&lt;br /&gt;
dc_11 = rayleigh_condensation(T0,RH0,d18O0,d2H0,1.1); % using the constant supersaturation as given&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Plot Rayleigh evaporation and condensation profiles.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As an example, Fig. 2 is created using the data sets generated from the above step and using the plotting codes from below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%% plot Rayleigh evaporation and condensation model&lt;br /&gt;
fs = 14;&lt;br /&gt;
&lt;br /&gt;
clear h&lt;br /&gt;
figure&lt;br /&gt;
set(gcf,&#039;color&#039;,&#039;white&#039;,&#039;position&#039;,[0 0 1200 1150],&#039;PaperPositionMode&#039;,&#039;auto&#039;);&lt;br /&gt;
% left_color = [0 0 0]; % black&lt;br /&gt;
% right_color = [0 0.4470 0.7410]; % blueish % blue [0 0 1];&lt;br /&gt;
% set(gcf,&#039;defaultAxesColorOrder&#039;,[left_color; right_color]);&lt;br /&gt;
&lt;br /&gt;
% Rayleigh evaporation&lt;br /&gt;
h(1) = subplot(2,2,1);&lt;br /&gt;
% set(h(1),&#039;Position&#039;, [0.1 0.56 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pe(1) = plot(de_ok.f,de_ok.d18Ol,&#039;k-&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(2) = plot(de_ok.f,de_ok.d18Ov,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(3) = plot(de_ok.f,de_ok.d18Ov_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(4) = plot(de_oe.f,de_oe.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); %&#039;color&#039;,[0.3010 0.7450 0.9330],&lt;br /&gt;
pe(5) = plot(de_oe.f,de_oe.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(6) = plot(de_oe.f,de_oe.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(7) = plot(de_cl.f,de_cl.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
pe(8) = plot(de_cl.f,de_cl.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(9) = plot(de_cl.f,de_cl.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(10) = plot(de_CG.f,de_CG.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2); &lt;br /&gt;
pe(11) = plot(de_CG.f,de_CG.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(12) = plot(de_CG.f,de_CG.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(h(1),[-30 40]);&lt;br /&gt;
xlabel(&#039;Residual water fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
ylabel([&#039;\delta^{18}O / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
lgd1 = legend(h(1),pe(1:3),&#039;residual water&#039;,&#039;instant vapour&#039;,&#039;total vapour removed&#039;,&#039;Location&#039;,&#039;northwest&#039;);&lt;br /&gt;
lgd1_pos = lgd1.Position;&lt;br /&gt;
lgd1.FontSize = fs;&lt;br /&gt;
% lgd1.Visible = &#039;off&#039;;&lt;br /&gt;
% 2nd axes&lt;br /&gt;
a2 = axes(&#039;position&#039;,get(h(1),&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
% lgd2 = legend(a2,pe(4:6),&#039;residual water&#039;,&#039;instant vapour&#039;,&#039;total vapour removed&#039;,&#039;Location&#039;,&#039;northwest&#039;);&lt;br /&gt;
% lgd2.FontSize = fs;&lt;br /&gt;
lgd2 = legend(a2,pe(4:6),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd2_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.58 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd2,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd2_pos);&lt;br /&gt;
% 3rd axes&lt;br /&gt;
a3 = axes(&#039;position&#039;,get(gca,&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
lgd3 = legend(a3,pe(7:9),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd3_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.79 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd3,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd3_pos);&lt;br /&gt;
% % 4th axes&lt;br /&gt;
a4 = axes(&#039;position&#039;,get(gca,&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
lgd4 = legend(a4,pe(10:12),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd4_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.88 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd4,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd4_pos);&lt;br /&gt;
% add text&lt;br /&gt;
text(h(1),0.41,8.5,&#039;open&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,30)&lt;br /&gt;
text(h(1),0.30,13.2,&#039;(unsaturated)&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,53)&lt;br /&gt;
text(h(1),0.60,-3,&#039;open&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,15,&#039;color&#039;,[0.6 0.6 0.6])&lt;br /&gt;
text(h(1),0.48,-0.5,&#039;(saturated)&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,20,&#039;color&#039;,[0.6 0.6 0.6])&lt;br /&gt;
text(h(1),0.75,-10,&#039;closed&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,7,&#039;Color&#039;,[0.3010 0.7450 0.9330])&lt;br /&gt;
text(h(1),0.8,1.5,&#039;C-G model&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;FontSize&#039;,fs,&#039;Rotation&#039;,15)&lt;br /&gt;
&lt;br /&gt;
h(3) = subplot(2,2,3);&lt;br /&gt;
% set(h(3),&#039;Position&#039;, [0.1 0.1 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
plot(de_ok.f,de_ok.dxsl,&#039;k-&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_ok.f,de_ok.dxsv,&#039;k--&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_ok.f,de_ok.dxsv_acc,&#039;k:&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsl,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsv,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsl,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsv,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsl,&#039;-&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsv,&#039;--&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
ylim(h(3),[-60 70]);&lt;br /&gt;
set(h(3),&#039;ytick&#039;,-60:20:65);&lt;br /&gt;
xlabel(&#039;Residual water fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
ylabel([&#039;\itd / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
&lt;br /&gt;
% Rayleigh condensation&lt;br /&gt;
h(4) = subplot(2,2,4);&lt;br /&gt;
% set(h(4),&#039;Position&#039;, [0.56 0.1 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pc(4) = plot(dc_no.Wconc,dc_no.dxsc,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); &lt;br /&gt;
pc(5) = plot(dc_no.Wconc,dc_no.dxs,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pc(6) = plot(dc_no.Wconc,dc_no.dxs_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);  &lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;Water mixing ratio / ppmv&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,2000:3000:16000);&lt;br /&gt;
ylabel([&#039;\itd / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
% 2nd axis&lt;br /&gt;
ax1_pos = get(gca,&#039;position&#039;); % position of first axes&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos,&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YAxisLocation&#039;,&#039;right&#039;,&#039;Color&#039;,&#039;none&#039;,&#039;YTickLabel&#039;,&#039;&#039;,&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
hold on&lt;br /&gt;
pc(1) = plot(dc_ln.f,dc_ln.dxsc,&#039;k-&#039;,&#039;linewidth&#039;,2); % [0.3010 0.7450 0.9330]&lt;br /&gt;
pc(2) = plot(dc_ln.f,dc_ln.dxs,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pc(3) = plot(dc_ln.f,dc_ln.dxs_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
% pc(7) = plot(dc_11.f,dc_11.dxsc,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(8) = plot(dc_11.f,dc_11.dxs,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(9) = plot(dc_11.f,dc_11.dxs_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;Residual vapour fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
% 3rd axis&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos+[0 0 0 -ax1_pos(4)],&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YColor&#039;,&#039;w&#039;,&#039;YTick&#039;,[],&#039;Color&#039;,&#039;none&#039;,&#039;TickDir&#039;,&#039;out&#039;,&#039;FontSize&#039;,fs); &lt;br /&gt;
hold on&lt;br /&gt;
pc(7) = plot(dc_ln.Wconc,20*ones(size(dc_ln.Wconc)),&#039;k-&#039;); % [0.3010 0.7450 0.9330]&lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;T / °C&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,[dc_ln.Wconc(81) dc_ln.Wconc(61:-10:11)],&#039;XTickLabel&#039;,[-20 -10:5:15])&lt;br /&gt;
&lt;br /&gt;
h(2) = subplot(2,2,2);&lt;br /&gt;
% set(h(2),&#039;Position&#039;, [0.56 0.56 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pc(4) = plot(dc_no.Wconc,dc_no.d18Oc,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); % [0 0.4470 0.7410]&lt;br /&gt;
pc(5) = plot(dc_no.Wconc,dc_no.d18O,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pc(6) = plot(dc_no.Wconc,dc_no.d18O_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);  &lt;br /&gt;
ylim(h(2),[-60 -2]);&lt;br /&gt;
xlabel(&#039;Water mixing ratio / ppmv&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,2000:3000:16000);&lt;br /&gt;
ylabel([&#039;\delta^{18}O / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
% 2nd axis&lt;br /&gt;
ax1_pos = get(gca,&#039;position&#039;); % position of first axes&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos,&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YAxisLocation&#039;,&#039;right&#039;,&#039;Color&#039;,&#039;none&#039;,&#039;YTickLabel&#039;,&#039;&#039;,&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
hold on&lt;br /&gt;
pc(1) = plot(dc_ln.f,dc_ln.d18Oc,&#039;k-&#039;,&#039;linewidth&#039;,2); % [0.3010 0.7450 0.9330]&lt;br /&gt;
pc(2) = plot(dc_ln.f,dc_ln.d18O,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pc(3) = plot(dc_ln.f,dc_ln.d18O_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
% pc(7) = plot(dc_11.f,dc_11.d18Oc,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(8) = plot(dc_11.f,dc_11.d18O,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(9) = plot(dc_11.f,dc_11.d18O_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(gca,[-60 -2]);&lt;br /&gt;
xlabel(&#039;Residual vapour fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
lg = legend(h(2),pc(1:3),&#039;instant liquid/ice&#039;,&#039;residual vapour&#039;,&#039;total liquid/ice removed&#039;);&lt;br /&gt;
% lg = legend(h(2),pc(4:6),&#039;instant liquid/ice&#039;,&#039;residual vapour&#039;,&#039;total liquid/ice removed&#039;);&lt;br /&gt;
set(lg,&#039;Position&#039;,[0.69 0.66 0.20 0.06],&#039;FontSize&#039;,fs);&lt;br /&gt;
lg_pos = lg.Position;&lt;br /&gt;
% 3rd axis&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos+[0 -ax1_pos(4)*0.2 0 -ax1_pos(4)*0.8],&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YColor&#039;,&#039;w&#039;,&#039;YTick&#039;,[],&#039;Color&#039;,&#039;none&#039;); &lt;br /&gt;
hold on&lt;br /&gt;
pc(7) = plot(dc_ln.Wconc,-2+zeros(size(dc_ln.d18Oc)),&#039;k-&#039;); % [0.3010 0.7450 0.9330]&lt;br /&gt;
ylim(gca,[-60 -2]);&lt;br /&gt;
xlabel(&#039;T / °C&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,[dc_ln.Wconc(81) dc_ln.Wconc(61:-10:11)],&#039;XTickLabel&#039;,[-20 -10:5:15],&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
lg2 = legend(gca,pc(4:6),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;east&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lg2_pos = lg_pos+[-lg_pos(3)*0.405 +lg_pos(4)*0.02 0 lg_pos(4)*0.117]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lg2,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lg2_pos);&lt;br /&gt;
% add text&lt;br /&gt;
text(h(2),1300,-36,&#039;super&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,65)&lt;br /&gt;
text(h(2),2150,-27.5,&#039;saturation&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,50)&lt;br /&gt;
text(h(2),1200,-25,&#039;saturation&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,50,&#039;Color&#039;,0.6*[1 1 1])&lt;br /&gt;
&lt;br /&gt;
set([h(1) h(3)],&#039;XDir&#039;,&#039;reverse&#039;,&#039;box&#039;,&#039;on&#039;);&lt;br /&gt;
set(h(:),&#039;color&#039;,&#039;none&#039;,&#039;FontSize&#039;,fs,&#039;tickdir&#039;,&#039;out&#039;); % ,&#039;YAxisLocation&#039;,&#039;left&#039;,&#039;ticklength&#039;,[0 0],&#039;ygrid&#039;,&#039;on&#039;,&#039;xgrid&#039;,&#039;on&#039;&lt;br /&gt;
&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.05 0.96 0.02 0.02],&#039;String&#039;,&#039;(a)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.49 0.96 0.02 0.02],&#039;String&#039;,&#039;(b)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.05 0.48 0.02 0.02],&#039;String&#039;,&#039;(c)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.49 0.48 0.02 0.02],&#039;String&#039;,&#039;(d)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
&lt;br /&gt;
% print(&#039;-depsc&#039;,&#039;-r300&#039;,&#039;/scratch/home/figs/thesis/Rayleigh_model_plot&#039;);&lt;br /&gt;
% print(&#039;-dpng&#039;,&#039;-r300&#039;,&#039;/scratch/home/figs/thesis/Rayleigh_model_plot&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Rayleigh_model&amp;diff=1446</id>
		<title>Rayleigh model</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Rayleigh_model&amp;diff=1446"/>
		<updated>2021-01-26T20:25:00Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
The Rayleigh distillation model describes the evolution of a multiple-phase system in which one phase is continuously removed to the other phase through fractional distillation. Despite its simplicity, it is a powerful framework to describe in particular the isotopic enrichment or depletion as material moves between reservoirs in an equilibrium fractionation process. &lt;br /&gt;
&lt;br /&gt;
== Model description ==&lt;br /&gt;
&lt;br /&gt;
The system applying the Rayleigh equation is often an open system, from which the newly formed phase is immediately removed. For example, the evaporation of natural water bodies, and the formation of precipitation that immediately leaves the system, can be regarded as examples for open systems. However, with some modifications, Rayleigh models can be also applied to other systems. One such system is a closed system (or two-phase equilibrium model; Gat, (1996)), where the material removed from one reservoir accumulates in a second reservoir in such a manner that isotopic equilibrium is maintained between the two reservoirs. An example for this would be the condensation of vapour to droplets in a cloud, without formation and removal of precipitation.&lt;br /&gt;
&lt;br /&gt;
The isotopic enrichment or depletion by the Rayleigh process for both open and closed systems can be mathematically obtained by different approaches (Fig. 1). The Rayleigh equations that are used to describe the isotopic evolution of the remaining reservoir under different conditions are summarized in Table 1. The isotope ratio of the accumulated removal can be derived using mass conservation of rare isotopes remaining in the reservoir, and the removed component: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; fR_\text{remain} + (1-f)R_\text{remove,acc} = R_0 &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
In the case of condensation involving both liquid and solid phases, the accumulation is a combination of the removed mass fraction of both phases. First, following the equation above, the total liquid removal is calculated as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; R_\text{l,acc} = (R_0-fR_v)/(1-f) &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Then, we consider a separated Rayleigh process by only taking into account of the ongoing formation of the solid phase. Following the same reasoning as above, the isotope ratio of the accumulated solid removal is calculated by &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; f_iR_\text{i,v} + (1-f_i)R_\text{i,acc} = R_\text{v0} &amp;lt;/math&amp;gt;, &lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;R_\text{v0}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_\text{i,v}&amp;lt;/math&amp;gt; are the isotope ratio of the remaining vapour at the start and the calculating point of the solid condensation stage, respectively, and &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt; the fraction of remaining vapour within the solid condensation stage. Finally and again, using mass conservation of the rare isotopes, we obtain the isotope ratio of the total accumulation of the removal by &amp;lt;math&amp;gt; (1-ff_i)R_\text{acc} = (1-f)R_\text{l,acc} + f(1-f_i)R_\text{i,acc} &amp;lt;/math&amp;gt;. Corresponding examples of the calculated isotopic evolution profiles are shown in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ &#039;&#039;Table 1&#039;&#039; Rayleigh equations to calculate isotopic evolution of the remaining reservoir under different conditions. The transport resistance is here assumed to be purely due to diffusion (i.e.  &amp;lt;math&amp;gt;\rho \propto D^{-1} &amp;lt;/math&amp;gt;).  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Conditions&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; colspan=&amp;quot;2&amp;quot;| Equation (&#039;&#039;R&#039;&#039; and &#039;&#039;δ&#039;&#039; notation)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Fractionation factor used&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;4&amp;quot;| Evaporation&lt;br /&gt;
| open system saturated&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{vl}&amp;lt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| open system undersaturated&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \frac{1}{\alpha_k \alpha_{lv}} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{lv}&amp;gt;1 &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; \alpha_k = \frac{D}{D&#039;}(1-h)+h &amp;gt; 1 &amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt; h = \frac{e_v}{e_l} &amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| closed system&lt;br /&gt;
| &amp;lt;math&amp;gt; R = \frac{R_0}{f+\alpha(1-f)} &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \delta = \frac{1+\delta_0}{f+\alpha(1-f)}-1 &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{vl}&amp;lt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| C--G model&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{\alpha-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \delta = (1+\delta_0)f^{\alpha-1}-1 &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \frac{\alpha_{vl}-h\frac{R_a}{R_l}}{(1-h)\frac{D}{D&#039;}} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{vl} &amp;lt; 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;2&amp;quot;| Condensation&lt;br /&gt;
| saturation over ice&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{sv}&amp;gt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supersaturation over ice&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \alpha_k \alpha_{sv} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{sv}&amp;gt;1 &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; \alpha_k = \frac{S_i}{\alpha_s \frac{D}{D&#039;}(S_i-1)+1} &amp;lt; 1 &amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt; S_i = \frac{e_v}{e_i} &amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rayleigh_model_box_sketch_v2.png|thumb|800px|&#039;&#039;&#039;&#039;&#039;Figure 1&#039;&#039;&#039;&#039;&#039; Schematic presentation of the mathematical approaches of the Rayleigh model in open system &#039;&#039;&#039;(a, b)&#039;&#039;&#039; and closed system &#039;&#039;&#039;(c)&#039;&#039;&#039;. Adapted from Gat &#039;&#039;et al&#039;&#039; (2001). &lt;br /&gt;
&#039;&#039;&#039;(a)&#039;&#039;&#039; From a reservoir containing &#039;&#039;N&#039;&#039; abundant isotopologues (e.g. H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt;O) and &#039;&#039;N&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; rare isotopologues (e.g. H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O or HD&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt;O) small amounts of both species, &#039;&#039;dN&#039;&#039; and &#039;&#039;dN&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; respectively, are being removed under equilibrium fractionation conditions: &amp;lt;math&amp;gt; dN_i/dN = αR &amp;lt;/math&amp;gt;. &lt;br /&gt;
&#039;&#039;&#039;(b)&#039;&#039;&#039; The changing isotopic composition of the reservoir is calculated from a mass balance consideration for the rare isotopologues: &amp;lt;math&amp;gt; RN = (R-dR)(N-dN) + αRdN &amp;lt;/math&amp;gt;. &lt;br /&gt;
&#039;&#039;&#039;(c)&#039;&#039;&#039; In closed system, the changing isotopic composition of the reservoir can be calculated from a mass balance consideration for the rare isotopologues: &amp;lt;math&amp;gt; R_0N_0 = R(N_0-dN) + αRdN &amp;lt;/math&amp;gt;, with the remaining fraction &amp;lt;math&amp;gt; f = (N_0-dN)/N_0 &amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rayleigh_model_plot_v2_CG.png|thumb|800px|&#039;&#039;&#039;&#039;&#039;Figure 2&#039;&#039;&#039;&#039;&#039; Isotopic change during &#039;&#039;&#039;(a), (c)&#039;&#039;&#039; Rayleigh evaporation, and &#039;&#039;&#039;(b), (d)&#039;&#039;&#039; Rayleigh condensation. &lt;br /&gt;
&lt;br /&gt;
Rayleigh evaporation occurs here at 20 °C (thus a constant fractionation factor) for initial liquid compositions of δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -10 ‰ and δD = -70 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰), in open system with unsaturated (RH = 75 %; black) or saturated (grey) environment, and closed system (blue). In addition, the result of C--G evaporation model (i.e. open system including feedback from a &amp;quot;free atmosphere&amp;quot; which has fixed isotope compositions of δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -13 ‰ and δD = -94 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰) and a fixed relative humidity (RH = 75 %)) is also presented (red). &lt;br /&gt;
&lt;br /&gt;
Rayleigh condensation occurs here under continuous cooling (thus also a contentiously changing fractionation factor) from T = 20 °C and RH = 75 %. The initial vapour compositions are δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -13 ‰ and δD = -94 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰). For the condensation to ice below 0 °C, two cases are presented. The saturation case (grey) is a classical Rayleigh process where ice crystals from from vapour under equilibrium conditions, using the saturation pressure over ice (&#039;&#039;e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;). The supersaturation case (black) takes into account the supersaturation over ice, where the ambient vapour pressure is &#039;&#039;e&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; = S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;*e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;. &#039;&#039;S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; is the defined saturation ratio, as &#039;&#039;e&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;/e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;, and here takes the form &#039;&#039;S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; = 1-0.004T&#039;&#039; after Risi &#039;&#039;et al&#039;&#039; (2010a). In this case, the fractionation factor combining equilibrium and kinetic effects given by Jouzel &amp;amp; Merlivat (1984) is used.&lt;br /&gt;
 &lt;br /&gt;
The equations used in this figure can be found in Table 1.]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Model codes in MATLAB ==&lt;br /&gt;
&lt;br /&gt;
=== Rayleigh evaporation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% rayleigh_evaporation.m&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Description:&lt;br /&gt;
% simple Rayleigh evaporation model, after Stern and Blisniuk, 2002&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% input variables: T0 (Kelvin), d18O0 (permil), d2H0 (permil);&lt;br /&gt;
%                  system: closed system = 0, open system = 1, C--G model = 2; &lt;br /&gt;
%                  optional: relative humidity (default = 1), d18Oa (permil), d2Ha (permil)&lt;br /&gt;
% run example: rayleigh_evaporation(20+273.15,-10,-70,1,0.75)&lt;br /&gt;
%              rayleigh_evaporation(20+273.15,-10,-70,1)&lt;br /&gt;
%              rayleigh_evaporation(20+273.15,-10,-70,2)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% HS, Do 12 Dez 2013 15:43:28 CET&lt;br /&gt;
% YW, structured and included the case of kinetic effect &lt;br /&gt;
% and the case of C--G model, 29 Aug 2020&lt;br /&gt;
%--------------------------------&lt;br /&gt;
&lt;br /&gt;
function data = rayleigh_evaporation(T0,d18O0,d2H0,system,h,d18Oa,d2Ha)&lt;br /&gt;
&lt;br /&gt;
% %% dubugging&lt;br /&gt;
% T0 = 20+273.15;&lt;br /&gt;
% d18O0 = -10; % close to Bergen precipitation average&lt;br /&gt;
% d2H0 = -70;&lt;br /&gt;
% system = 1;&lt;br /&gt;
% h = 0.75;&lt;br /&gt;
&lt;br /&gt;
%% fractionation factors&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Majoube, M., 1971a: Fractionnement en oxyg`ene-18 entre la glace et la vapeur d’eau. J.&lt;br /&gt;
% Chim. Phys., 68, 625–636.&lt;br /&gt;
&lt;br /&gt;
% Majoube, M., 1971b: Fractionnement en oxyg`ene 18 et deut ́erium entre l’eau et sa vapeur. J. Chim.&lt;br /&gt;
% Phys., 68, 1423–1436.&lt;br /&gt;
&lt;br /&gt;
% Merlivat, L. and G. Nief, 1967: Fractionnement isotopique lors des changements d‘ ́etat&lt;br /&gt;
% solide-vapeur et liquide-vapeur de l’eau `a des temp ́eratures inf ́erieures a ` 0 ◦ C. Tellus,&lt;br /&gt;
% 19, 122–127.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
    function d = a2H(T) % T in K&lt;br /&gt;
        d = 1/exp(24.844e3/(T^2)-76.248/T+52.612e-3); % Majoube 1971b, R_vapour/R_liquid &amp;lt; 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    function d = a18O(T) % T in K&lt;br /&gt;
        d = 1/exp(1137/(T^2)-0.4156/T-0.0020667); % Majoube 1971b, R_vapour/R_liquid &amp;lt; 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
%% initialization&lt;br /&gt;
% isotope ratios of VSMOW reference water&lt;br /&gt;
R2std = 155.76e-6;&lt;br /&gt;
R18std = 2005.20e-6;&lt;br /&gt;
% initial isotope ratio&lt;br /&gt;
R18O0 = (d18O0/1000+1)*R18std;&lt;br /&gt;
R2H0 = (d2H0/1000+1)*R2std;&lt;br /&gt;
% relative humidity&lt;br /&gt;
if ~exist(&#039;h&#039;,&#039;var&#039;)&lt;br /&gt;
    h = 1;&lt;br /&gt;
end&lt;br /&gt;
% isotope composition of &amp;quot;free atmosphere&amp;quot;&lt;br /&gt;
% if not existing, default it to the equilibrium vapour of global average precipitation &lt;br /&gt;
if ~exist(&#039;d18Oa&#039;,&#039;var&#039;)&lt;br /&gt;
    d18Oa = -13;  &lt;br /&gt;
end&lt;br /&gt;
if ~exist(&#039;d2Ha&#039;,&#039;var&#039;)&lt;br /&gt;
    d2Ha = -94;  &lt;br /&gt;
end&lt;br /&gt;
R18Oa = (d18Oa/1000+1)*R18std;&lt;br /&gt;
R2Ha = (d2Ha/1000+1)*R2std;&lt;br /&gt;
&lt;br /&gt;
% % ouput variables&lt;br /&gt;
% data.T = [];&lt;br /&gt;
% data.f = [];&lt;br /&gt;
% data.d18Ov = [];&lt;br /&gt;
% data.d18Ol = [];&lt;br /&gt;
% data.d2Hv = [];&lt;br /&gt;
% data.d2Hl = [];&lt;br /&gt;
% data.dxsv = [];&lt;br /&gt;
% data.dxsl = [];&lt;br /&gt;
% data.d18Ov_acc = [];&lt;br /&gt;
% data.d2Hv_acc = [];&lt;br /&gt;
% data.dxsv_acc = [];&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (0) in closed system (material maintained under two-phase equilibrium)&lt;br /&gt;
% i.e., the material removed stays in the closed system and stays in equilibrium with the reservoir&lt;br /&gt;
if system == 0&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an closed system (material maintained under two-phase equilibrium) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    i = 1;   % iteration steps&lt;br /&gt;
    for f = 1:-0.02:0 % remaining liquid fraction&lt;br /&gt;
        % isotope ratio of remaining liquid&lt;br /&gt;
        R18Ol = R18O0/(a18O(T0) - f*(a18O(T0)-1)); % Gat1996&lt;br /&gt;
        R2Hl = R2H0/(a2H(T0) - f*(a2H(T0)-1));     % Gat1996&lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*a18O(T0)-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*a2H(T0)-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        % (3) delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = d18Ov;&lt;br /&gt;
        d2Hv_acc = d2Hv;&lt;br /&gt;
        dxsv_acc = dxsv;&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
        &lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (1) in an open system (material is immediately removed)&lt;br /&gt;
if system == 1&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    i = 1; % iteration steps&lt;br /&gt;
    n = 1; % turbulent exponent in D^n, [0 1], controls the ratio of diffusive transport over turbulent transport of water molecules (Pfahl and Wernli, 2009)&lt;br /&gt;
    for f = 1:-0.02:0 % remaining liquid fraction&lt;br /&gt;
       &lt;br /&gt;
        % modified Rayleigh evaporation model including kinectic effct&lt;br /&gt;
        % during the vapour formation at undersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
        % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
        % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
        % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
        D18 = 0.9723;  % D&#039;/D&lt;br /&gt;
        D2 = 0.9755;   % D&#039;/D&lt;br /&gt;
        ak_18O = 1/(1/D18^n*(1-h)+h);&lt;br /&gt;
        ak_2H = 1/(1/D2^n*(1-h)+h);&lt;br /&gt;
        aeff_18O = a18O(T0) * ak_18O;&lt;br /&gt;
        aeff_2H = a2H(T0) * ak_2H;&lt;br /&gt;
        &lt;br /&gt;
        % isotope ratio of remaining liquid&lt;br /&gt;
        R18Ol = R18O0*f^(aeff_18O-1);&lt;br /&gt;
        R2Hl = R2H0*f^(aeff_2H-1);&lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        &lt;br /&gt;
        % (3) isotope ratio of the accumulated removed vapour&lt;br /&gt;
        R18Ov_acc = R18O0*(1-f^aeff_18O)/(1-f); % Mook 2001, Page 38&lt;br /&gt;
        R2Hv_acc = R2H0*(1-f^aeff_2H)/(1-f);&lt;br /&gt;
        % delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
        d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
        dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
%         % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
%         % mass conservation of rare isotopes between the reservoir and formed removal: f*Rl+(1-f)*Rv_acc=R0,&lt;br /&gt;
%         % after rearranging, we have: Rv_acc=(R0-f*Rl)/(1-f)&lt;br /&gt;
%         R18Ov_acc2 = (R18O0-f*R18Ol)/(1-f);&lt;br /&gt;
%         R2Hv_acc2 = (R2H0-f*R2Hl)/(1-f);&lt;br /&gt;
%         data.d18Ov_acc2(i) = (R18Ov_acc2/R18std-1)*1000;&lt;br /&gt;
%         data.d2Hv_acc2(i) = (R2Hv_acc2/R2std-1)*1000;&lt;br /&gt;
%         data.dxsv_acc2(i) = data.d2Hv_acc2(i)-8*data.d18Ov_acc2(i);&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
&lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (2) in a &amp;quot;free atmosphere&amp;quot; of fixed humidity and isotope composition (C--G model)&lt;br /&gt;
if system == 2&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    % turbulent exponent in D^n, [0 1], controls the ratio of diffusive transport over turbulent transport of water molecules (Pfahl and Wernli, 2009)&lt;br /&gt;
    % n~0.5 for an open water body under natural conditions, n~0.58 for a falling raindrop (Stewart1975), n~1 for soils and leaves &lt;br /&gt;
    n = 1; &lt;br /&gt;
    df = 0.02;&lt;br /&gt;
    i = 1;   % iteration steps&lt;br /&gt;
    &lt;br /&gt;
    for f = 1:-df:0 % remaining liquid fraction&lt;br /&gt;
&lt;br /&gt;
        % modified Rayleigh evaporation model including kinectic effct&lt;br /&gt;
        % during the vapour formation at undersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
        % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
        % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
        % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
        D18 = 0.9723;  % D&#039;/D&lt;br /&gt;
        D2 = 0.9755;   % D&#039;/D&lt;br /&gt;
        if i==1&lt;br /&gt;
            aeff_18O = (a18O(T0) - h*R18Oa/R18O0) / ((1-h)*1/D18^n);&lt;br /&gt;
            aeff_2H = (a2H(T0) - h*R2Ha/R2H0) / ((1-h)*1/D2^n);&lt;br /&gt;
            % isotope ratio of remaining liquid&lt;br /&gt;
            f1 = 1;&lt;br /&gt;
            R18Ol = R18O0*f1^(aeff_18O-1);&lt;br /&gt;
            R2Hl = R2H0*f1^(aeff_2H-1);&lt;br /&gt;
        else&lt;br /&gt;
            aeff_18O = (a18O(T0) - h*R18Oa/data.R18Ol(i-1)) / ((1-h)*1/D18^n);&lt;br /&gt;
            aeff_2H = (a2H(T0) - h*R2Ha/data.R2Hl(i-1)) / ((1-h)*1/D2^n);&lt;br /&gt;
            % isotope ratio of remaining liquid&lt;br /&gt;
            f1 = 1-df; % fraction remaining relative to previous stage&lt;br /&gt;
            R18Ol = data.R18Ol(i-1)*f1^(aeff_18O-1);&lt;br /&gt;
            R2Hl = data.R2Hl(i-1)*f1^(aeff_2H-1);&lt;br /&gt;
        end&lt;br /&gt;
       &lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        &lt;br /&gt;
%         % (3) isotope ratio of the accumulated removed vapour&lt;br /&gt;
%         R18Ov_acc = R18O0*(1-f^aeff_18O)/(1-f); % Mook 2001, Page 38&lt;br /&gt;
%         R2Hv_acc = R2H0*(1-f^aeff_2H)/(1-f);&lt;br /&gt;
%         % delta value of the accumulated removed vapour&lt;br /&gt;
%         d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
%         d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
%         dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
        % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
        % mass conservation of rare isotopes between the reservoir and formed removal: f*Rl+(1-f)*Rv_acc=R0,&lt;br /&gt;
        % after rearranging, we have: Rv_acc=(R0-f*Rl)/(1-f)&lt;br /&gt;
        R18Ov_acc = (R18O0-f*R18Ol)/(1-f);&lt;br /&gt;
        R2Hv_acc = (R2H0-f*R2Hl)/(1-f);&lt;br /&gt;
        % delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
        d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
        dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
        &lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
        &lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
% fin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rayleigh condensation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% rayleigh_condensation.m&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Description:&lt;br /&gt;
% - simple Rayleigh condensation model, after Stern and Blisniuk, 2002&lt;br /&gt;
% - temperature dependent fractionation factor varies at each step during cooling process&lt;br /&gt;
%   (1) isobaric cooling: e.g., air parcel advects to cold regions&lt;br /&gt;
%   (2) or pseudoadiabatic cooling: e.g., updraft or lift of surface air parcel&lt;br /&gt;
% - therefore, the isotope ratio is calculated as: R(n+1) = R(n)(q(n+1)/q(n))^(a-1)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% input variables: T0 (Kelvin), RH0 (%), d18O0 (permil), d2H0 (permil),&lt;br /&gt;
%                  sice: saturation conditions over ice when temperature &amp;lt;0 degree&lt;br /&gt;
%                        &amp;gt; 1: using the constant supersaturation given as sice;&lt;br /&gt;
%                        = 1: meaning alpha_k = 1, thus no supersaturation;&lt;br /&gt;
%                        = 0: using formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
% run example: rayleigh_condensation(20+273.15,0.75,-13,-94,0)&lt;br /&gt;
%              rayleigh_condensation(20+273.15,0.75,-13,-94,1)&lt;br /&gt;
%              rayleigh_condensation(20+273.15,0.75,-13,-94,1.2)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% HS, Do 12 Dez 2013 15:43:28 CET&lt;br /&gt;
% YW, structured and included kinetic effect, 29 Aug 2020&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% YW, 26 Mar 2020&lt;br /&gt;
% limitation:&lt;br /&gt;
% Rayleigh condensation model only reflects the process of water vapor removing&lt;br /&gt;
% and ignores: mixing of air masses, cloud water-vapor isotope exchange,&lt;br /&gt;
% subcloud droplet evaporation, and radiative cooling or heating.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
&lt;br /&gt;
function data = rayleigh_condensation(T0,RH0,d18O0,d2H0,sice)&lt;br /&gt;
&lt;br /&gt;
% %% for debugging&lt;br /&gt;
% T0 = 20+273.15;&lt;br /&gt;
% RH0 = 0.75; % Craig-Gordon, 1965 (Fig. 15)&lt;br /&gt;
% d18O0 = -13;&lt;br /&gt;
% d2H0 = -94;&lt;br /&gt;
% sice = 0;&lt;br /&gt;
&lt;br /&gt;
% RH0 = 0.91;  % 20161207 AR event at Bergen&lt;br /&gt;
% d18O0 = -12.5;&lt;br /&gt;
% d2H0 = -100;&lt;br /&gt;
&lt;br /&gt;
%% functions adopted&lt;br /&gt;
% fractionation factors&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Majoube, M., 1971a: Fractionnement en oxyg`ene-18 entre la glace et la vapeur d’eau. J.&lt;br /&gt;
% Chim. Phys., 68, 625–636.&lt;br /&gt;
&lt;br /&gt;
% Majoube, M., 1971b: Fractionnement en oxyg`ene 18 et deut ́erium entre l’eau et sa vapeur. J. Chim.&lt;br /&gt;
% Phys., 68, 1423–1436.&lt;br /&gt;
&lt;br /&gt;
% Merlivat, L. and G. Nief, 1967: Fractionnement isotopique lors des changements d‘ ́etat&lt;br /&gt;
% solide-vapeur et liquide-vapeur de l’eau `a des temp ́eratures inf ́erieures a ` 0 °C. Tellus,&lt;br /&gt;
% 19, 122–127.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
    function d = a2H(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15 % above 0 celsius&lt;br /&gt;
            d = exp(24.844e3/(T^2)-76.248/T+52.612e-3); % Majoube 1971b, R_liquid/R_vapour &amp;gt; 1&lt;br /&gt;
        else&lt;br /&gt;
            d = exp(16289./T.^2 - 0.0945);   % Merlivat &amp;amp; Nief 1967, R_solid/R_vapour &amp;gt; 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    function d = a18O(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15 % above 0 celsius&lt;br /&gt;
            d = exp(1137/(T^2)-0.4156/T-0.0020667); % Majoube 1971b, R_liquid/R_vapour &amp;gt; 1&lt;br /&gt;
        else&lt;br /&gt;
            d = exp(11.839./T - 0.028224); % Majoube 1971a, R_solid/R_vapour &amp;gt; 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% supersaturation with respect to ice&lt;br /&gt;
% Si = 1 − λT, with λ = 0.004. From Graf 2017 dissertation, page 53, Fig 3.1&lt;br /&gt;
% (as in Risi et al., 2010b, after Jouzel and Merlivat 1984.)&lt;br /&gt;
% Risi, C., S. Bony, F. Vimeux, and J. Jouzel, 2010b: Water-stable isotopes in the LMDZ4&lt;br /&gt;
% general circulation model: Model evaluation for present-day and past climates and&lt;br /&gt;
% applications to climatic interpretations of tropical isotopic records.&lt;br /&gt;
% sice: &amp;gt; 1: using the constant supersaturation given here;&lt;br /&gt;
%       = 1: meaning alpha_k = 1, thus no supersaturation;&lt;br /&gt;
%       = 0: using formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
    function s = si(T)&lt;br /&gt;
        if sice &amp;gt;= 1&lt;br /&gt;
            s = sice;&lt;br /&gt;
        else  % elseif sice == 0&lt;br /&gt;
            s = 1-0.004*(T-273.15);&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% vapour saturation pressure&lt;br /&gt;
    function es = esat(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15&lt;br /&gt;
            % es = 611*exp((17.27*T)/(273+T)); % T in celsius&lt;br /&gt;
            es = 611*exp(17.27*(T-273.15)/T); % T in Kelvin&lt;br /&gt;
        else&lt;br /&gt;
            % Saturation vapour pressure over ice (Murphy and Koop, 2005) for T &amp;gt; 110 K:&lt;br /&gt;
            es_ice = exp(9.550426 - 5723.265/T + 3.53068*log(T) - 0.00728332*T);&lt;br /&gt;
            % the actual saturation vapour pressure&lt;br /&gt;
            es = es_ice * si(T);&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% saturated vapour mixing ratio&lt;br /&gt;
    function ws = wsat(es,p)&lt;br /&gt;
        ws = 0.622*es/(p-es);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% pressure at height of z&lt;br /&gt;
    function p = pressure(z)&lt;br /&gt;
        p0 = 101325; % Pa&lt;br /&gt;
        z0 = 8000;   % m scale height&lt;br /&gt;
        p = p0*exp(-z/z0);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% moist adiabatic lapse rate [Curry and Webster,1999] (cited after Stern and Blisniuk, 2002)&lt;br /&gt;
    function lr = gamma(ws,T) % T in Kelvin&lt;br /&gt;
        % physical constants&lt;br /&gt;
        g = 9.80665;     % m/s^2  the gravitational acceleration&lt;br /&gt;
        Cpd = 1.00464e3; % J/kg/K the specific heat capacity of dry air at constant pressure&lt;br /&gt;
        L = 2.5104e6;    % J/kg   the latent heat of vaporization or sublimation&lt;br /&gt;
        Rd = 287.04;     % J/kg/K the specific gas constant for dry air&lt;br /&gt;
        lr = g/Cpd*(1+L*ws/Rd/T)/(1+0.622*L*L*ws/Rd/Cpd/T/T); % [°C/m]&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
%% initialization&lt;br /&gt;
% isotope ratios of VSMOW reference water&lt;br /&gt;
R2std = 155.76e-6;&lt;br /&gt;
R18std = 2005.20e-6;&lt;br /&gt;
% initial isotope ratio&lt;br /&gt;
R18O0 = (d18O0/1000+1)*R18std;&lt;br /&gt;
R2H0 = (d2H0/1000+1)*R2std;&lt;br /&gt;
dxs0 = R2H0-8*R18O0;&lt;br /&gt;
&lt;br /&gt;
% initial conditions&lt;br /&gt;
f = 1.0;  % remaining vapour fractionation&lt;br /&gt;
z = 0.0;  % elevation&lt;br /&gt;
p = pressure(z);&lt;br /&gt;
w0 = RH0*wsat(esat(T0),p); % kg/kg&lt;br /&gt;
% convert water mixing ratio unit&lt;br /&gt;
md = 28.97; % [g/mol] dry air molar mass&lt;br /&gt;
mv = 18.02; % [g/mol] water vapour molar mass&lt;br /&gt;
wconc0 = w0*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
rh = RH0;&lt;br /&gt;
dt = 0.5;  % temperature step&lt;br /&gt;
T = T0+dt;&lt;br /&gt;
&lt;br /&gt;
%% for the circumstance of isobaric cooling&lt;br /&gt;
%% (1) cool to saturation&lt;br /&gt;
fprintf(&#039;Rayleigh condensation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
fprintf(&#039;   T (°C)   d18Ov     d2Hv     dxsv       rh        f WConc[ppmv] \n&#039;);&lt;br /&gt;
n = 1;  % iteration number&lt;br /&gt;
while rh &amp;lt; 0.99&lt;br /&gt;
    T = T-dt; % decrease temperature by dt °C at each iteration&lt;br /&gt;
    ws = wsat(esat(T),p); % saturated water mixing ratio at each iteration&lt;br /&gt;
    rh = w0/ws;                 % RH at each iteration&lt;br /&gt;
    wconc = wconc0; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18O0,d2H0,dxs0,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18O0;&lt;br /&gt;
    data.R2H(n) = R2H0;&lt;br /&gt;
    data.d18O(n) = d18O0;&lt;br /&gt;
    data.dD(n) = d2H0;&lt;br /&gt;
    data.dxs(n) = d2H0-8*d18O0;&lt;br /&gt;
    data.d18Oc(n) = NaN; % condensate&lt;br /&gt;
    data.d2Hc(n) = NaN;&lt;br /&gt;
    data.dxsc(n) = NaN;&lt;br /&gt;
    data.d18O_acc(n) = NaN; % accumulated condensate (liquid+solid)&lt;br /&gt;
    data.d2H_acc(n) = NaN;&lt;br /&gt;
    data.dxs_acc(n) = NaN;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;Reached saturation now\n&#039;);&lt;br /&gt;
&lt;br /&gt;
ws0 = w0;&lt;br /&gt;
&lt;br /&gt;
%% (2) continue to cool and form liquid condensate&lt;br /&gt;
while T &amp;gt; 273.15 % isobaric cooling with condensation to 0 °C&lt;br /&gt;
    T = T-dt; % decrease temperature by dt °C at each iteration&lt;br /&gt;
    ws = wsat(esat(T),p); % saturated water mixing ratio at each iteration&lt;br /&gt;
    wconc = ws*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    f = ws/ws0;&lt;br /&gt;
    &lt;br /&gt;
    if n == 1&lt;br /&gt;
        f1 = ws/ws0;&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = R18O0*f1^(a18O(T)-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = R2H0*f1^(a2H(T)-1);&lt;br /&gt;
    else&lt;br /&gt;
        f1 = wconc/data.Wconc(n-1); % q(n)/q(n-1)&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = data.R18O(n-1)*f1^(a18O(T)-1);  % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = data.R2H(n-1)*f1^(a2H(T)-1);&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    % (1) delta value of remaining vapour&lt;br /&gt;
    d18Ov = (R18Ov/R18std-1)*1000;&lt;br /&gt;
    d2Hv = (R2Hv/R2std-1)*1000;&lt;br /&gt;
    dxsv = d2Hv - 8*d18Ov;&lt;br /&gt;
    &lt;br /&gt;
    % (2) delta value of the instantaneously removed condensate (in equilibrium with the current remaining vapour)&lt;br /&gt;
    d18Oc = ((d18Ov/1000+1)*a18O(T)-1)*1000;&lt;br /&gt;
    d2Hc = ((d2Hv/1000+1)*a2H(T)-1)*1000;&lt;br /&gt;
    dxsc = d2Hc-8*d18Oc;&lt;br /&gt;
    &lt;br /&gt;
    % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
    % mass conservation of rare isotopes between the reservoir and formed removal: f*Rv + (1-f)*Rl_acc = R0,&lt;br /&gt;
    % after rearranging, we have: Rl_acc = (R0-f*Rv)/(1-f)&lt;br /&gt;
    R18Ol_acc = (R18O0-f*R18Ov)/(1-f);&lt;br /&gt;
    R2Hl_acc = (R2H0-f*R2Hv)/(1-f);&lt;br /&gt;
    d18Ol_acc = (R18Ol_acc/R18std-1)*1000;&lt;br /&gt;
    d2Hl_acc = (R2Hl_acc/R2std-1)*1000;&lt;br /&gt;
    dxsl_acc = d2Hl_acc-8*d18Ol_acc;&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18Ov,d2Hv,dxsv,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18Ov;&lt;br /&gt;
    data.R2H(n) = R2Hv;&lt;br /&gt;
    data.d18O(n) = d18Ov;&lt;br /&gt;
    data.dD(n) = d2Hv;&lt;br /&gt;
    data.dxs(n) = dxsv;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.d18Oc(n) = d18Oc;&lt;br /&gt;
    data.d2Hc(n) = d2Hc;&lt;br /&gt;
    data.dxsc(n) = dxsc;&lt;br /&gt;
    data.d18O_acc(n) = d18Ol_acc;&lt;br /&gt;
    data.d2H_acc(n) = d2Hl_acc;&lt;br /&gt;
    data.dxs_acc(n) = dxsl_acc;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;Have cooled to 0 celcius now \n&#039;);&lt;br /&gt;
&lt;br /&gt;
ws0_ice = ws;&lt;br /&gt;
R18O0 = R18Ov;&lt;br /&gt;
R2H0 = R2Hv;&lt;br /&gt;
f0 = f;&lt;br /&gt;
&lt;br /&gt;
%% (3) continue to cool and form solid condensate&lt;br /&gt;
% considering mixed-phase cloud: subsaturated over liquid droplets and supersaturated over ice crystals&lt;br /&gt;
&lt;br /&gt;
% closure assumption: liquid droplets --&amp;gt; evaporate to vapour --&amp;gt; deposite on ice crystals&lt;br /&gt;
% therefore: when T&amp;lt;0 celsius, the reduced fraction of vapour is due to its deposit on ice crystals with a fractionation&lt;br /&gt;
% factor alpha_eff = alpha_eq*alpha_k taking into account the kinetic effct under the supersaturation condition.&lt;br /&gt;
% i.e.: we start a new Rayleigh condensation model starting with the remaining vapour&lt;br /&gt;
% after the liquid condensation stage above, and use the new factionation factor alpha_eff&lt;br /&gt;
&lt;br /&gt;
while T &amp;gt; -60+273.15&lt;br /&gt;
    T = T-dt;&lt;br /&gt;
    ws = wsat(esat(T),p);&lt;br /&gt;
    wconc = ws*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    f = ws/ws0;      % the total fraction of remaining vapour through all stages&lt;br /&gt;
    fi = ws/ws0_ice; % the fraction of remaing vapour in the ice condensation stage only&lt;br /&gt;
        &lt;br /&gt;
    % modified Rayleigh condensation model including kinectic effct&lt;br /&gt;
    % during the ice formation at supersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
    % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
    % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
    % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
    ak_18O = si(T)/(a18O(T)*1/0.9723*(si(T)-1) + 1);&lt;br /&gt;
    ak_2H = si(T)/(a2H(T)*1/0.9755*(si(T)-1) + 1);&lt;br /&gt;
    aeff_18O = a18O(T) * ak_18O;&lt;br /&gt;
    aeff_2H = a2H(T) * ak_2H;&lt;br /&gt;
    &lt;br /&gt;
    if n == 1&lt;br /&gt;
        f1 = ws/ws0;&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = R18O0*f1^(aeff_18O-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = R2H0*f1^(aeff_2H-1);&lt;br /&gt;
    else&lt;br /&gt;
        f1 = wconc/data.Wconc(n-1); % q(n)/q(n-1)&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = data.R18O(n-1)*f1^(aeff_18O-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1), and Jouzel and Merlivat, 1984&lt;br /&gt;
        R2Hv = data.R2H(n-1)*f1^(aeff_2H-1);&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    % (1) delta value of remaining vapour&lt;br /&gt;
    d18Ov = (R18Ov/R18std-1)*1000;&lt;br /&gt;
    d2Hv = (R2Hv/R2std-1)*1000;&lt;br /&gt;
    dxsv = d2Hv - 8*d18Ov;&lt;br /&gt;
    &lt;br /&gt;
    % (2) delta value of the instantaneously removed condensate (in equilibrium with the current remaining vapour)&lt;br /&gt;
    d18Oc = ((d18Ov/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
    d2Hc = ((d2Hv/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
    dxsc = d2Hc-8*d18Oc;&lt;br /&gt;
    &lt;br /&gt;
    % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
    % (i) mass conservation of rare isotopes between the reservoir and formed removal:&lt;br /&gt;
    % fi*Rv + (1-fi)*Ri_acc = Rv0,&lt;br /&gt;
    % where fi is the fraction of remaining vapour in the ice condensation stage, and&lt;br /&gt;
    % Rv0 is the isotope ratio of the remaining vapour after liquid condensation stage&lt;br /&gt;
    % after rearranging, we have: Ri_acc = (Rv0-fi*Rv)/(1-fi)&lt;br /&gt;
    R18Oi_acc = (R18O0-fi*R18Ov)/(1-fi);&lt;br /&gt;
    R2Hi_acc = (R2H0-fi*R2H0)/(1-fi);&lt;br /&gt;
    %         d18Oi_acc = (R18Oi_acc/R18std-1)*1000;&lt;br /&gt;
    %         d2Hi_acc = (R2Hi_acc/R2std-1)*1000;&lt;br /&gt;
    %         dxsi_acc = d2Hi_acc-8*d18Oi_acc;&lt;br /&gt;
    % (ii) the total accumulation is sum of the liquid (1-f0) and solid condensate (f0*(1-fi))&lt;br /&gt;
    % (1-f0*fi)*R_acc = (1-f0)*Rl_acc + (f0*(1-fi))*Ri_acc&lt;br /&gt;
    R18O_acc = ((1-f0)*R18Ol_acc + (f0*(1-fi))*R18Oi_acc)/(1-f0*fi);&lt;br /&gt;
    R2H_acc = ((1-f0)*R2Hl_acc + (f0*(1-fi))*R2Hi_acc)/(1-f0*fi);&lt;br /&gt;
    d18O_acc = (R18O_acc/R18std-1)*1000;&lt;br /&gt;
    d2H_acc = (R2H_acc/R2std-1)*1000;&lt;br /&gt;
    dxs_acc = d2H_acc-8*d18O_acc;&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18Ov,d2Hv,dxsv,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18Ov;&lt;br /&gt;
    data.R2H(n) = R2Hv;&lt;br /&gt;
    data.d18O(n) = d18Ov;&lt;br /&gt;
    data.dD(n) = d2Hv;&lt;br /&gt;
    data.dxs(n) = dxsv;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.d18Oc(n) = d18Oc;&lt;br /&gt;
    data.d2Hc(n) = d2Hc;&lt;br /&gt;
    data.dxsc(n) = dxsc;&lt;br /&gt;
    data.d18O_acc(n) = d18O_acc;&lt;br /&gt;
    data.d2H_acc(n) = d2H_acc;&lt;br /&gt;
    data.dxs_acc(n) = dxs_acc;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% for the circumstance of pseudoadiabatic cooling&lt;br /&gt;
% - establish the relationship between T and z&lt;br /&gt;
z = 0;&lt;br /&gt;
p = pressure(z);&lt;br /&gt;
n = 1;&lt;br /&gt;
for T = T0:-dt:-60+273.15&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.z(n) = z;&lt;br /&gt;
    data.p(n) = p;&lt;br /&gt;
    % the elevation change&lt;br /&gt;
    ws = wsat(esat(T),p);&lt;br /&gt;
    lr = gamma(ws,T); % lapse rate&lt;br /&gt;
    dz = dt/lr;   % dt = lr*dz&lt;br /&gt;
    % the new elevation and pressure&lt;br /&gt;
    z = z+dz;&lt;br /&gt;
    p = pressure(z);&lt;br /&gt;
    data.lr(n) = lr;   &lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
% fin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of usage ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Generate the desired data sets&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%% create data sets&lt;br /&gt;
% Rayleigh evaporation&lt;br /&gt;
T0 = 20+273.15;&lt;br /&gt;
d18O0 = -10; % close to Bergen precipitation average&lt;br /&gt;
d2H0 = -70;&lt;br /&gt;
h = 0.75; % relative humidity&lt;br /&gt;
de_ok = rayleigh_evaporation(T0,d18O0,d2H0,1,h); % in an open system, unsaturated (including kinetic effect)&lt;br /&gt;
de_oe = rayleigh_evaporation(T0,d18O0,d2H0,1);   % in an open system, saturated (equilibrium)&lt;br /&gt;
de_cl = rayleigh_evaporation(T0,d18O0,d2H0,0);   % in a closed system&lt;br /&gt;
de_CG = rayleigh_evaporation(T0,d18O0,d2H0,2,h); % C--G model&lt;br /&gt;
&lt;br /&gt;
% Rayleigh condensation&lt;br /&gt;
T0 = 20+273.15;&lt;br /&gt;
RH0 = 0.75; % Craig-Gordon, 1965 (Fig. 15)&lt;br /&gt;
d18O0 = -13;&lt;br /&gt;
d2H0 = -94;&lt;br /&gt;
% &amp;gt; 1: using the constant supersaturation given as sice;&lt;br /&gt;
% = 1: &lt;br /&gt;
% = 0: &lt;br /&gt;
dc_ln = rayleigh_condensation(T0,RH0,d18O0,d2H0,0);   % using linear formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
dc_no = rayleigh_condensation(T0,RH0,d18O0,d2H0,1);   % meaning alpha_k = 1, thus no supersaturation, e = e_ice&lt;br /&gt;
dc_11 = rayleigh_condensation(T0,RH0,d18O0,d2H0,1.1); % using the constant supersaturation as given&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Plot Rayleigh evaporation and condensation profiles.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As an example, Fig. 2 is created using the data sets generated from the above step and using the plotting codes from below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%% plot Rayleigh evaporation and condensation model&lt;br /&gt;
fs = 14;&lt;br /&gt;
&lt;br /&gt;
clear h&lt;br /&gt;
figure&lt;br /&gt;
set(gcf,&#039;color&#039;,&#039;white&#039;,&#039;position&#039;,[0 0 1200 1150],&#039;PaperPositionMode&#039;,&#039;auto&#039;);&lt;br /&gt;
% left_color = [0 0 0]; % black&lt;br /&gt;
% right_color = [0 0.4470 0.7410]; % blueish % blue [0 0 1];&lt;br /&gt;
% set(gcf,&#039;defaultAxesColorOrder&#039;,[left_color; right_color]);&lt;br /&gt;
&lt;br /&gt;
% Rayleigh evaporation&lt;br /&gt;
h(1) = subplot(2,2,1);&lt;br /&gt;
% set(h(1),&#039;Position&#039;, [0.1 0.56 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pe(1) = plot(de_ok.f,de_ok.d18Ol,&#039;k-&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(2) = plot(de_ok.f,de_ok.d18Ov,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(3) = plot(de_ok.f,de_ok.d18Ov_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(4) = plot(de_oe.f,de_oe.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); %&#039;color&#039;,[0.3010 0.7450 0.9330],&lt;br /&gt;
pe(5) = plot(de_oe.f,de_oe.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(6) = plot(de_oe.f,de_oe.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(7) = plot(de_cl.f,de_cl.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
pe(8) = plot(de_cl.f,de_cl.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(9) = plot(de_cl.f,de_cl.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(10) = plot(de_CG.f,de_CG.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2); &lt;br /&gt;
pe(11) = plot(de_CG.f,de_CG.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(12) = plot(de_CG.f,de_CG.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(h(1),[-30 40]);&lt;br /&gt;
xlabel(&#039;Residual water fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
ylabel([&#039;\delta^{18}O / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
lgd1 = legend(h(1),pe(1:3),&#039;residual water&#039;,&#039;instant vapour&#039;,&#039;total vapour removed&#039;,&#039;Location&#039;,&#039;northwest&#039;);&lt;br /&gt;
lgd1_pos = lgd1.Position;&lt;br /&gt;
lgd1.FontSize = fs;&lt;br /&gt;
% lgd1.Visible = &#039;off&#039;;&lt;br /&gt;
% 2nd axes&lt;br /&gt;
a2 = axes(&#039;position&#039;,get(h(1),&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
% lgd2 = legend(a2,pe(4:6),&#039;residual water&#039;,&#039;instant vapour&#039;,&#039;total vapour removed&#039;,&#039;Location&#039;,&#039;northwest&#039;);&lt;br /&gt;
% lgd2.FontSize = fs;&lt;br /&gt;
lgd2 = legend(a2,pe(4:6),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd2_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.58 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd2,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd2_pos);&lt;br /&gt;
% 3rd axes&lt;br /&gt;
a3 = axes(&#039;position&#039;,get(gca,&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
lgd3 = legend(a3,pe(7:9),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd3_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.79 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd3,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd3_pos);&lt;br /&gt;
% % 4th axes&lt;br /&gt;
a4 = axes(&#039;position&#039;,get(gca,&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
lgd4 = legend(a4,pe(10:12),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd4_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.88 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd4,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd4_pos);&lt;br /&gt;
% add text&lt;br /&gt;
text(h(1),0.41,8.5,&#039;open&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,30)&lt;br /&gt;
text(h(1),0.30,13.2,&#039;(unsaturated)&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,53)&lt;br /&gt;
text(h(1),0.60,-3,&#039;open&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,15,&#039;color&#039;,[0.6 0.6 0.6])&lt;br /&gt;
text(h(1),0.48,-0.5,&#039;(saturated)&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,20,&#039;color&#039;,[0.6 0.6 0.6])&lt;br /&gt;
text(h(1),0.75,-10,&#039;closed&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,7,&#039;Color&#039;,[0.3010 0.7450 0.9330])&lt;br /&gt;
text(h(1),0.8,1.5,&#039;C-G model&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;FontSize&#039;,fs,&#039;Rotation&#039;,15)&lt;br /&gt;
&lt;br /&gt;
h(3) = subplot(2,2,3);&lt;br /&gt;
% set(h(3),&#039;Position&#039;, [0.1 0.1 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
plot(de_ok.f,de_ok.dxsl,&#039;k-&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_ok.f,de_ok.dxsv,&#039;k--&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_ok.f,de_ok.dxsv_acc,&#039;k:&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsl,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsv,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsl,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsv,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsl,&#039;-&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsv,&#039;--&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
ylim(h(3),[-60 70]);&lt;br /&gt;
set(h(3),&#039;ytick&#039;,-60:20:65);&lt;br /&gt;
xlabel(&#039;Residual water fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
ylabel([&#039;\itd / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
&lt;br /&gt;
% Rayleigh condensation&lt;br /&gt;
h(4) = subplot(2,2,4);&lt;br /&gt;
% set(h(4),&#039;Position&#039;, [0.56 0.1 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pc(4) = plot(dc_no.Wconc,dc_no.dxsc,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); &lt;br /&gt;
pc(5) = plot(dc_no.Wconc,dc_no.dxs,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pc(6) = plot(dc_no.Wconc,dc_no.dxs_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);  &lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;Water mixing ratio / ppmv&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,2000:3000:16000);&lt;br /&gt;
ylabel([&#039;\itd / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
% 2nd axis&lt;br /&gt;
ax1_pos = get(gca,&#039;position&#039;); % position of first axes&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos,&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YAxisLocation&#039;,&#039;right&#039;,&#039;Color&#039;,&#039;none&#039;,&#039;YTickLabel&#039;,&#039;&#039;,&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
hold on&lt;br /&gt;
pc(1) = plot(dc_ln.f,dc_ln.dxsc,&#039;k-&#039;,&#039;linewidth&#039;,2); % [0.3010 0.7450 0.9330]&lt;br /&gt;
pc(2) = plot(dc_ln.f,dc_ln.dxs,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pc(3) = plot(dc_ln.f,dc_ln.dxs_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
% pc(7) = plot(dc_11.f,dc_11.dxsc,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(8) = plot(dc_11.f,dc_11.dxs,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(9) = plot(dc_11.f,dc_11.dxs_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;Residual vapour fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
% 3rd axis&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos+[0 0 0 -ax1_pos(4)],&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YColor&#039;,&#039;w&#039;,&#039;YTick&#039;,[],&#039;Color&#039;,&#039;none&#039;,&#039;TickDir&#039;,&#039;out&#039;,&#039;FontSize&#039;,fs); &lt;br /&gt;
hold on&lt;br /&gt;
pc(7) = plot(dc_ln.Wconc,20*ones(size(dc_ln.Wconc)),&#039;k-&#039;); % [0.3010 0.7450 0.9330]&lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;T / °C&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,[dc_ln.Wconc(81) dc_ln.Wconc(61:-10:11)],&#039;XTickLabel&#039;,[-20 -10:5:15])&lt;br /&gt;
&lt;br /&gt;
h(2) = subplot(2,2,2);&lt;br /&gt;
% set(h(2),&#039;Position&#039;, [0.56 0.56 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pc(4) = plot(dc_no.Wconc,dc_no.d18Oc,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); % [0 0.4470 0.7410]&lt;br /&gt;
pc(5) = plot(dc_no.Wconc,dc_no.d18O,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pc(6) = plot(dc_no.Wconc,dc_no.d18O_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);  &lt;br /&gt;
ylim(h(2),[-60 -2]);&lt;br /&gt;
xlabel(&#039;Water mixing ratio / ppmv&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,2000:3000:16000);&lt;br /&gt;
ylabel([&#039;\delta^{18}O / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
% 2nd axis&lt;br /&gt;
ax1_pos = get(gca,&#039;position&#039;); % position of first axes&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos,&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YAxisLocation&#039;,&#039;right&#039;,&#039;Color&#039;,&#039;none&#039;,&#039;YTickLabel&#039;,&#039;&#039;,&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
hold on&lt;br /&gt;
pc(1) = plot(dc_ln.f,dc_ln.d18Oc,&#039;k-&#039;,&#039;linewidth&#039;,2); % [0.3010 0.7450 0.9330]&lt;br /&gt;
pc(2) = plot(dc_ln.f,dc_ln.d18O,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pc(3) = plot(dc_ln.f,dc_ln.d18O_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
% pc(7) = plot(dc_11.f,dc_11.d18Oc,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(8) = plot(dc_11.f,dc_11.d18O,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(9) = plot(dc_11.f,dc_11.d18O_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(gca,[-60 -2]);&lt;br /&gt;
xlabel(&#039;Residual vapour fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
lg = legend(h(2),pc(1:3),&#039;instant liquid/ice&#039;,&#039;residual vapour&#039;,&#039;total liquid/ice removed&#039;);&lt;br /&gt;
% lg = legend(h(2),pc(4:6),&#039;instant liquid/ice&#039;,&#039;residual vapour&#039;,&#039;total liquid/ice removed&#039;);&lt;br /&gt;
set(lg,&#039;Position&#039;,[0.69 0.66 0.20 0.06],&#039;FontSize&#039;,fs);&lt;br /&gt;
lg_pos = lg.Position;&lt;br /&gt;
% 3rd axis&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos+[0 -ax1_pos(4)*0.2 0 -ax1_pos(4)*0.8],&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YColor&#039;,&#039;w&#039;,&#039;YTick&#039;,[],&#039;Color&#039;,&#039;none&#039;); &lt;br /&gt;
hold on&lt;br /&gt;
pc(7) = plot(dc_ln.Wconc,-2+zeros(size(dc_ln.d18Oc)),&#039;k-&#039;); % [0.3010 0.7450 0.9330]&lt;br /&gt;
ylim(gca,[-60 -2]);&lt;br /&gt;
xlabel(&#039;T / °C&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,[dc_ln.Wconc(81) dc_ln.Wconc(61:-10:11)],&#039;XTickLabel&#039;,[-20 -10:5:15],&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
lg2 = legend(gca,pc(4:6),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;east&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lg2_pos = lg_pos+[-lg_pos(3)*0.405 +lg_pos(4)*0.02 0 lg_pos(4)*0.117]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lg2,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lg2_pos);&lt;br /&gt;
% add text&lt;br /&gt;
text(h(2),1300,-36,&#039;super&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,65)&lt;br /&gt;
text(h(2),2150,-27.5,&#039;saturation&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,50)&lt;br /&gt;
text(h(2),1200,-25,&#039;saturation&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,50,&#039;Color&#039;,0.6*[1 1 1])&lt;br /&gt;
&lt;br /&gt;
set([h(1) h(3)],&#039;XDir&#039;,&#039;reverse&#039;,&#039;box&#039;,&#039;on&#039;);&lt;br /&gt;
set(h(:),&#039;color&#039;,&#039;none&#039;,&#039;FontSize&#039;,fs,&#039;tickdir&#039;,&#039;out&#039;); % ,&#039;YAxisLocation&#039;,&#039;left&#039;,&#039;ticklength&#039;,[0 0],&#039;ygrid&#039;,&#039;on&#039;,&#039;xgrid&#039;,&#039;on&#039;&lt;br /&gt;
&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.05 0.96 0.02 0.02],&#039;String&#039;,&#039;(a)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.49 0.96 0.02 0.02],&#039;String&#039;,&#039;(b)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.05 0.48 0.02 0.02],&#039;String&#039;,&#039;(c)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.49 0.48 0.02 0.02],&#039;String&#039;,&#039;(d)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
&lt;br /&gt;
% print(&#039;-depsc&#039;,&#039;-r300&#039;,&#039;/scratch/home/figs/thesis/Rayleigh_model_plot&#039;);&lt;br /&gt;
% print(&#039;-dpng&#039;,&#039;-r300&#039;,&#039;/scratch/home/figs/thesis/Rayleigh_model_plot&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Rayleigh_model&amp;diff=1445</id>
		<title>Rayleigh model</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Rayleigh_model&amp;diff=1445"/>
		<updated>2021-01-26T20:23:55Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
The Rayleigh distillation model describes the evolution of a multiple-phase system in which one phase is continuously removed to the other phase through fractional distillation. Despite its simplicity, it is a powerful framework to describe in particular the isotopic enrichment or depletion as material moves between reservoirs in an equilibrium fractionation process. &lt;br /&gt;
&lt;br /&gt;
== Model description ==&lt;br /&gt;
&lt;br /&gt;
The system applying the Rayleigh equation is often an open system, from which the newly formed phase is immediately removed. For example, the evaporation of natural water bodies, and the formation of precipitation that immediately leaves the system, can be regarded as examples for open systems. However, with some modifications, Rayleigh models can be also applied to other systems. One such system is a closed system (or two-phase equilibrium model; Gat, (1996)), where the material removed from one reservoir accumulates in a second reservoir in such a manner that isotopic equilibrium is maintained between the two reservoirs. An example for this would be the condensation of vapour to droplets in a cloud, without formation and removal of precipitation.&lt;br /&gt;
&lt;br /&gt;
The isotopic enrichment or depletion by the Rayleigh process for both open and closed systems can be mathematically obtained by different approaches (Fig. 1). The Rayleigh equations that are used to describe the isotopic evolution of the remaining reservoir under different conditions are summarized in Table 1. The isotope ratio of the accumulated removal can be derived using mass conservation of rare isotopes remaining in the reservoir, and the removed component: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; fR_\text{remain} + (1-f)R_\text{remove,acc} = R_0 &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
In the case of condensation involving both liquid and solid phases, the accumulation is a combination of the removed mass fraction of both phases. First, following the equation above, the total liquid removal is calculated as &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; R_\text{l,acc} = (R_0-fR_v)/(1-f) &amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Then, we consider a separated Rayleigh process by only taking into account of the ongoing formation of the solid phase. Following the same reasoning as above, the isotope ratio of the accumulated solid removal is calculated by &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; f_iR_\text{i,v} + (1-f_i)R_\text{i,acc} = R_\text{v0} &amp;lt;/math&amp;gt;, &lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;R_\text{v0}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_\text{i,v}&amp;lt;/math&amp;gt; are the isotope ratio of the remaining vapour at the start and the calculating point of the solid condensation stage, respectively, and &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt; the fraction of remaining vapour within the solid condensation stage. Finally and again, using mass conservation of the rare isotopes, we obtain the isotope ratio of the total accumulation of the removal by &amp;lt;math&amp;gt; (1-ff_i)R_\text{acc} = (1-f)R_\text{l,acc} + f(1-f_i)R_\text{i,acc} &amp;lt;/math&amp;gt;. Corresponding examples of the calculated isotopic evolution profiles are shown in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ &#039;&#039;Table 1&#039;&#039; Rayleigh equations to calculate isotopic evolution of the remaining reservoir under different conditions. The transport resistance is here assumed to be purely due to diffusion (i.e.  &amp;lt;math&amp;gt;\rho \propto D^{-1} &amp;lt;/math&amp;gt;).  &lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| &lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Conditions&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; colspan=&amp;quot;2&amp;quot;| Equation (&#039;&#039;R&#039;&#039; and &#039;&#039;δ&#039;&#039; notation)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Fractionation factor used&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;4&amp;quot;| Evaporation&lt;br /&gt;
| open system saturated&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{vl}&amp;lt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| open system undersaturated&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \frac{1}{\alpha_k \alpha_{lv}} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{lv}&amp;gt;1 &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; \alpha_k = \frac{D}{D&#039;}(1-h)+h &amp;gt; 1 &amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt; h = \frac{e_v}{e_l} &amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
| closed system&lt;br /&gt;
| &amp;lt;math&amp;gt; R = \frac{R_0}{f+\alpha(1-f)} &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \delta = \frac{1+\delta_0}{f+\alpha(1-f)}-1 &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{vl}&amp;lt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| C--G model&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{\alpha-1} &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \delta = (1+\delta_0)f^{\alpha-1}-1 &amp;lt;/math&amp;gt; &lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \frac{\alpha_{vl}-h\frac{R_a}{R_l}}{(1-h)\frac{D}{D&#039;}} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{vl} &amp;lt; 1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; rowspan=&amp;quot;2&amp;quot;| Condensation&lt;br /&gt;
| saturation over ice&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; α = \alpha_{sv}&amp;gt;1 &amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| supersaturation over ice&lt;br /&gt;
| &amp;lt;math&amp;gt; R = R_0f^{α-1} &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; δ = (1+δ_0)f^{α-1}-1 &amp;lt;/math&amp;gt;&lt;br /&gt;
| &amp;lt;math&amp;gt; \alpha = \alpha_k \alpha_{sv} &amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt; \alpha_{sv}&amp;gt;1 &amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt; \alpha_k = \frac{S_i}{\alpha_s \frac{D}{D&#039;}(S_i-1)+1} &amp;lt; 1 &amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt; S_i = \frac{e_v}{e_i} &amp;lt;/math&amp;gt;  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rayleigh_model_box_sketch_v2.png|thumb|800px|&#039;&#039;&#039;&#039;&#039;Figure 1&#039;&#039;&#039;&#039;&#039; Schematic presentation of the mathematical approaches of the Rayleigh model in open system &#039;&#039;&#039;(a, b)&#039;&#039;&#039; and closed system &#039;&#039;&#039;(c)&#039;&#039;&#039;. Adapted from Gat &#039;&#039;et al&#039;&#039; (2001). &lt;br /&gt;
&#039;&#039;&#039;(a)&#039;&#039;&#039; From a reservoir containing &#039;&#039;N&#039;&#039; abundant isotopologues (e.g. H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt;O) and &#039;&#039;N&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; rare isotopologues (e.g. H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O or HD&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt;O) small amounts of both species, &#039;&#039;dN&#039;&#039; and &#039;&#039;dN&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; respectively, are being removed under equilibrium fractionation conditions: &amp;lt;math&amp;gt; dN_i/dN = αR &amp;lt;/math&amp;gt;. &lt;br /&gt;
&#039;&#039;&#039;(b)&#039;&#039;&#039; The changing isotopic composition of the reservoir is calculated from a mass balance consideration for the rare isotopologues: &amp;lt;math&amp;gt; RN = (R-dR)(N-dN) + αRdN &amp;lt;/math&amp;gt;. &lt;br /&gt;
&#039;&#039;&#039;(c)&#039;&#039;&#039; In closed system, the changing isotopic composition of the reservoir can be calculated from a mass balance consideration for the rare isotopologues: &amp;lt;math&amp;gt; R_0N_0 = R(N_0-dN) + αRdN &amp;lt;/math&amp;gt;, with the remaining fraction &amp;lt;math&amp;gt; f = (N_0-dN)/N_0 &amp;lt;/math&amp;gt;.]]&lt;br /&gt;
&lt;br /&gt;
[[File:Rayleigh_model_plot_v2_CG.png|thumb|800px|&#039;&#039;&#039;&#039;&#039;Figure 2&#039;&#039;&#039;&#039;&#039; Isotopic change during &#039;&#039;&#039;(a), (c)&#039;&#039;&#039; Rayleigh evaporation, and &#039;&#039;&#039;(b), (d)&#039;&#039;&#039; Rayleigh condensation. &lt;br /&gt;
&lt;br /&gt;
Rayleigh evaporation occurs here at 20 °C (thus a constant fractionation factor) for initial liquid compositions of δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -10 ‰ and δD = -70 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰), in open system with unsaturated (RH = 75 %; black) or saturated (grey) environment, and closed system (blue). In addition, the result of C--G evaporation model (i.e. open system including feedback from a &amp;quot;free atmosphere&amp;quot; which has fixed isotope compositions of δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -13 ‰ and δD = -94 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰) and a fixed relative humidity (RH = 75 %)) is also presented (red). &lt;br /&gt;
&lt;br /&gt;
Rayleigh condensation occurs here under continuous cooling (thus also a contentiously changing fractionation factor) from T = 20 °C and RH = 75 %. The initial vapour compositions are δ&amp;lt;sup&amp;gt;18&amp;lt;/sup&amp;gt;O = -13 ‰ and δD = -94 ‰ (&#039;&#039;d&#039;&#039; = 10 ‰). For the condensation to ice below 0 °C, two cases are presented. The saturation case (grey) is a classical Rayleigh process where ice crystals from from vapour under equilibrium conditions, using the saturation pressure over ice (&#039;&#039;e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;). The supersaturation case (black) takes into account the supersaturation over ice, where the ambient vapour pressure is &#039;&#039;e&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt; = S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;*e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;. &#039;&#039;S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039; is the defined saturation ratio, as &#039;&#039;e&amp;lt;sub&amp;gt;v&amp;lt;/sub&amp;gt;/e&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&#039;&#039;, and here takes the form &#039;&#039;S&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; = 1-0.004T&#039;&#039; after Risi &#039;&#039;et al&#039;&#039; (2010a). In this case, the fractionation factor combining equilibrium and kinetic effects given by Jouzel &amp;amp; Merlivat (1984) is used.&lt;br /&gt;
 &lt;br /&gt;
The equations used in this figure can be found in Table 1.]]&lt;br /&gt;
&lt;br /&gt;
== Model codes in MATLAB ==&lt;br /&gt;
&lt;br /&gt;
=== Rayleigh evaporation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% rayleigh_evaporation.m&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Description:&lt;br /&gt;
% simple Rayleigh evaporation model, after Stern and Blisniuk, 2002&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% input variables: T0 (Kelvin), d18O0 (permil), d2H0 (permil);&lt;br /&gt;
%                  system: closed system = 0, open system = 1, C--G model = 2; &lt;br /&gt;
%                  optional: relative humidity (default = 1), d18Oa (permil), d2Ha (permil)&lt;br /&gt;
% run example: rayleigh_evaporation(20+273.15,-10,-70,1,0.75)&lt;br /&gt;
%              rayleigh_evaporation(20+273.15,-10,-70,1)&lt;br /&gt;
%              rayleigh_evaporation(20+273.15,-10,-70,2)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% HS, Do 12 Dez 2013 15:43:28 CET&lt;br /&gt;
% YW, structured and included the case of kinetic effect &lt;br /&gt;
% and the case of C--G model, 29 Aug 2020&lt;br /&gt;
%--------------------------------&lt;br /&gt;
&lt;br /&gt;
function data = rayleigh_evaporation(T0,d18O0,d2H0,system,h,d18Oa,d2Ha)&lt;br /&gt;
&lt;br /&gt;
% %% dubugging&lt;br /&gt;
% T0 = 20+273.15;&lt;br /&gt;
% d18O0 = -10; % close to Bergen precipitation average&lt;br /&gt;
% d2H0 = -70;&lt;br /&gt;
% system = 1;&lt;br /&gt;
% h = 0.75;&lt;br /&gt;
&lt;br /&gt;
%% fractionation factors&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Majoube, M., 1971a: Fractionnement en oxyg`ene-18 entre la glace et la vapeur d’eau. J.&lt;br /&gt;
% Chim. Phys., 68, 625–636.&lt;br /&gt;
&lt;br /&gt;
% Majoube, M., 1971b: Fractionnement en oxyg`ene 18 et deut ́erium entre l’eau et sa vapeur. J. Chim.&lt;br /&gt;
% Phys., 68, 1423–1436.&lt;br /&gt;
&lt;br /&gt;
% Merlivat, L. and G. Nief, 1967: Fractionnement isotopique lors des changements d‘ ́etat&lt;br /&gt;
% solide-vapeur et liquide-vapeur de l’eau `a des temp ́eratures inf ́erieures a ` 0 ◦ C. Tellus,&lt;br /&gt;
% 19, 122–127.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
    function d = a2H(T) % T in K&lt;br /&gt;
        d = 1/exp(24.844e3/(T^2)-76.248/T+52.612e-3); % Majoube 1971b, R_vapour/R_liquid &amp;lt; 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    function d = a18O(T) % T in K&lt;br /&gt;
        d = 1/exp(1137/(T^2)-0.4156/T-0.0020667); % Majoube 1971b, R_vapour/R_liquid &amp;lt; 1&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
%% initialization&lt;br /&gt;
% isotope ratios of VSMOW reference water&lt;br /&gt;
R2std = 155.76e-6;&lt;br /&gt;
R18std = 2005.20e-6;&lt;br /&gt;
% initial isotope ratio&lt;br /&gt;
R18O0 = (d18O0/1000+1)*R18std;&lt;br /&gt;
R2H0 = (d2H0/1000+1)*R2std;&lt;br /&gt;
% relative humidity&lt;br /&gt;
if ~exist(&#039;h&#039;,&#039;var&#039;)&lt;br /&gt;
    h = 1;&lt;br /&gt;
end&lt;br /&gt;
% isotope composition of &amp;quot;free atmosphere&amp;quot;&lt;br /&gt;
% if not existing, default it to the equilibrium vapour of global average precipitation &lt;br /&gt;
if ~exist(&#039;d18Oa&#039;,&#039;var&#039;)&lt;br /&gt;
    d18Oa = -13;  &lt;br /&gt;
end&lt;br /&gt;
if ~exist(&#039;d2Ha&#039;,&#039;var&#039;)&lt;br /&gt;
    d2Ha = -94;  &lt;br /&gt;
end&lt;br /&gt;
R18Oa = (d18Oa/1000+1)*R18std;&lt;br /&gt;
R2Ha = (d2Ha/1000+1)*R2std;&lt;br /&gt;
&lt;br /&gt;
% % ouput variables&lt;br /&gt;
% data.T = [];&lt;br /&gt;
% data.f = [];&lt;br /&gt;
% data.d18Ov = [];&lt;br /&gt;
% data.d18Ol = [];&lt;br /&gt;
% data.d2Hv = [];&lt;br /&gt;
% data.d2Hl = [];&lt;br /&gt;
% data.dxsv = [];&lt;br /&gt;
% data.dxsl = [];&lt;br /&gt;
% data.d18Ov_acc = [];&lt;br /&gt;
% data.d2Hv_acc = [];&lt;br /&gt;
% data.dxsv_acc = [];&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (0) in closed system (material maintained under two-phase equilibrium)&lt;br /&gt;
% i.e., the material removed stays in the closed system and stays in equilibrium with the reservoir&lt;br /&gt;
if system == 0&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an closed system (material maintained under two-phase equilibrium) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    i = 1;   % iteration steps&lt;br /&gt;
    for f = 1:-0.02:0 % remaining liquid fraction&lt;br /&gt;
        % isotope ratio of remaining liquid&lt;br /&gt;
        R18Ol = R18O0/(a18O(T0) - f*(a18O(T0)-1)); % Gat1996&lt;br /&gt;
        R2Hl = R2H0/(a2H(T0) - f*(a2H(T0)-1));     % Gat1996&lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*a18O(T0)-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*a2H(T0)-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        % (3) delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = d18Ov;&lt;br /&gt;
        d2Hv_acc = d2Hv;&lt;br /&gt;
        dxsv_acc = dxsv;&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
        &lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (1) in an open system (material is immediately removed)&lt;br /&gt;
if system == 1&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    i = 1; % iteration steps&lt;br /&gt;
    n = 1; % turbulent exponent in D^n, [0 1], controls the ratio of diffusive transport over turbulent transport of water molecules (Pfahl and Wernli, 2009)&lt;br /&gt;
    for f = 1:-0.02:0 % remaining liquid fraction&lt;br /&gt;
       &lt;br /&gt;
        % modified Rayleigh evaporation model including kinectic effct&lt;br /&gt;
        % during the vapour formation at undersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
        % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
        % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
        % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
        D18 = 0.9723;  % D&#039;/D&lt;br /&gt;
        D2 = 0.9755;   % D&#039;/D&lt;br /&gt;
        ak_18O = 1/(1/D18^n*(1-h)+h);&lt;br /&gt;
        ak_2H = 1/(1/D2^n*(1-h)+h);&lt;br /&gt;
        aeff_18O = a18O(T0) * ak_18O;&lt;br /&gt;
        aeff_2H = a2H(T0) * ak_2H;&lt;br /&gt;
        &lt;br /&gt;
        % isotope ratio of remaining liquid&lt;br /&gt;
        R18Ol = R18O0*f^(aeff_18O-1);&lt;br /&gt;
        R2Hl = R2H0*f^(aeff_2H-1);&lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        &lt;br /&gt;
        % (3) isotope ratio of the accumulated removed vapour&lt;br /&gt;
        R18Ov_acc = R18O0*(1-f^aeff_18O)/(1-f); % Mook 2001, Page 38&lt;br /&gt;
        R2Hv_acc = R2H0*(1-f^aeff_2H)/(1-f);&lt;br /&gt;
        % delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
        d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
        dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
%         % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
%         % mass conservation of rare isotopes between the reservoir and formed removal: f*Rl+(1-f)*Rv_acc=R0,&lt;br /&gt;
%         % after rearranging, we have: Rv_acc=(R0-f*Rl)/(1-f)&lt;br /&gt;
%         R18Ov_acc2 = (R18O0-f*R18Ol)/(1-f);&lt;br /&gt;
%         R2Hv_acc2 = (R2H0-f*R2Hl)/(1-f);&lt;br /&gt;
%         data.d18Ov_acc2(i) = (R18Ov_acc2/R18std-1)*1000;&lt;br /&gt;
%         data.d2Hv_acc2(i) = (R2Hv_acc2/R2std-1)*1000;&lt;br /&gt;
%         data.dxsv_acc2(i) = data.d2Hv_acc2(i)-8*data.d18Ov_acc2(i);&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
&lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% Rayleigh evaporation process: (2) in a &amp;quot;free atmosphere&amp;quot; of fixed humidity and isotope composition (C--G model)&lt;br /&gt;
if system == 2&lt;br /&gt;
    fprintf(&#039;Rayleigh evaporation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
    fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
    fprintf(&#039;       f    d18Ol    d18Ov     d2Hl     d2Hv     dxsl     dxsv d18Ov_acc dxsv_acc \n&#039;);&lt;br /&gt;
    % turbulent exponent in D^n, [0 1], controls the ratio of diffusive transport over turbulent transport of water molecules (Pfahl and Wernli, 2009)&lt;br /&gt;
    % n~0.5 for an open water body under natural conditions, n~0.58 for a falling raindrop (Stewart1975), n~1 for soils and leaves &lt;br /&gt;
    n = 1; &lt;br /&gt;
    df = 0.02;&lt;br /&gt;
    i = 1;   % iteration steps&lt;br /&gt;
    &lt;br /&gt;
    for f = 1:-df:0 % remaining liquid fraction&lt;br /&gt;
&lt;br /&gt;
        % modified Rayleigh evaporation model including kinectic effct&lt;br /&gt;
        % during the vapour formation at undersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
        % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
        % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
        % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
        D18 = 0.9723;  % D&#039;/D&lt;br /&gt;
        D2 = 0.9755;   % D&#039;/D&lt;br /&gt;
        if i==1&lt;br /&gt;
            aeff_18O = (a18O(T0) - h*R18Oa/R18O0) / ((1-h)*1/D18^n);&lt;br /&gt;
            aeff_2H = (a2H(T0) - h*R2Ha/R2H0) / ((1-h)*1/D2^n);&lt;br /&gt;
            % isotope ratio of remaining liquid&lt;br /&gt;
            f1 = 1;&lt;br /&gt;
            R18Ol = R18O0*f1^(aeff_18O-1);&lt;br /&gt;
            R2Hl = R2H0*f1^(aeff_2H-1);&lt;br /&gt;
        else&lt;br /&gt;
            aeff_18O = (a18O(T0) - h*R18Oa/data.R18Ol(i-1)) / ((1-h)*1/D18^n);&lt;br /&gt;
            aeff_2H = (a2H(T0) - h*R2Ha/data.R2Hl(i-1)) / ((1-h)*1/D2^n);&lt;br /&gt;
            % isotope ratio of remaining liquid&lt;br /&gt;
            f1 = 1-df; % fraction remaining relative to previous stage&lt;br /&gt;
            R18Ol = data.R18Ol(i-1)*f1^(aeff_18O-1);&lt;br /&gt;
            R2Hl = data.R2Hl(i-1)*f1^(aeff_2H-1);&lt;br /&gt;
        end&lt;br /&gt;
       &lt;br /&gt;
        % (1) delta value of remaining liquid&lt;br /&gt;
        d18Ol = (R18Ol/R18std-1)*1000;&lt;br /&gt;
        d2Hl = (R2Hl/R2std-1)*1000;&lt;br /&gt;
        dxsl = d2Hl-8*d18Ol;&lt;br /&gt;
        &lt;br /&gt;
        % (2) delta value of the instantaneously removed vapour (in equilibrium with the current remaining liquid)&lt;br /&gt;
        d18Ov = ((d18Ol/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
        d2Hv = ((d2Hl/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
        dxsv = d2Hv-8*d18Ov;&lt;br /&gt;
        &lt;br /&gt;
%         % (3) isotope ratio of the accumulated removed vapour&lt;br /&gt;
%         R18Ov_acc = R18O0*(1-f^aeff_18O)/(1-f); % Mook 2001, Page 38&lt;br /&gt;
%         R2Hv_acc = R2H0*(1-f^aeff_2H)/(1-f);&lt;br /&gt;
%         % delta value of the accumulated removed vapour&lt;br /&gt;
%         d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
%         d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
%         dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
        % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
        % mass conservation of rare isotopes between the reservoir and formed removal: f*Rl+(1-f)*Rv_acc=R0,&lt;br /&gt;
        % after rearranging, we have: Rv_acc=(R0-f*Rl)/(1-f)&lt;br /&gt;
        R18Ov_acc = (R18O0-f*R18Ol)/(1-f);&lt;br /&gt;
        R2Hv_acc = (R2H0-f*R2Hl)/(1-f);&lt;br /&gt;
        % delta value of the accumulated removed vapour&lt;br /&gt;
        d18Ov_acc = (R18Ov_acc/R18std-1)*1000;&lt;br /&gt;
        d2Hv_acc = (R2Hv_acc/R2std-1)*1000;&lt;br /&gt;
        dxsv_acc = d2Hv_acc-8*d18Ov_acc;&lt;br /&gt;
        &lt;br /&gt;
        fprintf(&#039;%8.4f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n&#039;,f,d18Ol,d18Ov,d2Hl,d2Hv,dxsl,dxsv,d18Ov_acc,dxsv_acc);&lt;br /&gt;
        &lt;br /&gt;
        % assign to output&lt;br /&gt;
        data.T(i) = T0;&lt;br /&gt;
        data.f(i) = f;&lt;br /&gt;
        data.R18Ol(i) = R18Ol;&lt;br /&gt;
        data.d18Ol(i) = d18Ol;&lt;br /&gt;
        data.d18Ov(i) = d18Ov;&lt;br /&gt;
        data.R2Hl(i) = R2Hl;&lt;br /&gt;
        data.d2Hl(i) = d2Hl;&lt;br /&gt;
        data.d2Hv(i) = d2Hv;&lt;br /&gt;
        data.dxsl(i) = dxsl;&lt;br /&gt;
        data.dxsv(i) = dxsv;&lt;br /&gt;
        data.d18Ov_acc(i) = d18Ov_acc;&lt;br /&gt;
        data.d2Hv_acc(i) = d2Hv_acc;&lt;br /&gt;
        data.dxsv_acc(i) = dxsv_acc;&lt;br /&gt;
        &lt;br /&gt;
        % iterate to next step&lt;br /&gt;
        i = i+1;&lt;br /&gt;
        &lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
% fin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rayleigh condensation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% rayleigh_condensation.m&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Description:&lt;br /&gt;
% - simple Rayleigh condensation model, after Stern and Blisniuk, 2002&lt;br /&gt;
% - temperature dependent fractionation factor varies at each step during cooling process&lt;br /&gt;
%   (1) isobaric cooling: e.g., air parcel advects to cold regions&lt;br /&gt;
%   (2) or pseudoadiabatic cooling: e.g., updraft or lift of surface air parcel&lt;br /&gt;
% - therefore, the isotope ratio is calculated as: R(n+1) = R(n)(q(n+1)/q(n))^(a-1)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% input variables: T0 (Kelvin), RH0 (%), d18O0 (permil), d2H0 (permil),&lt;br /&gt;
%                  sice: saturation conditions over ice when temperature &amp;lt;0 degree&lt;br /&gt;
%                        &amp;gt; 1: using the constant supersaturation given as sice;&lt;br /&gt;
%                        = 1: meaning alpha_k = 1, thus no supersaturation;&lt;br /&gt;
%                        = 0: using formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
% run example: rayleigh_condensation(20+273.15,0.75,-13,-94,0)&lt;br /&gt;
%              rayleigh_condensation(20+273.15,0.75,-13,-94,1)&lt;br /&gt;
%              rayleigh_condensation(20+273.15,0.75,-13,-94,1.2)&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% HS, Do 12 Dez 2013 15:43:28 CET&lt;br /&gt;
% YW, structured and included kinetic effect, 29 Aug 2020&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% YW, 26 Mar 2020&lt;br /&gt;
% limitation:&lt;br /&gt;
% Rayleigh condensation model only reflects the process of water vapor removing&lt;br /&gt;
% and ignores: mixing of air masses, cloud water-vapor isotope exchange,&lt;br /&gt;
% subcloud droplet evaporation, and radiative cooling or heating.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
&lt;br /&gt;
function data = rayleigh_condensation(T0,RH0,d18O0,d2H0,sice)&lt;br /&gt;
&lt;br /&gt;
% %% for debugging&lt;br /&gt;
% T0 = 20+273.15;&lt;br /&gt;
% RH0 = 0.75; % Craig-Gordon, 1965 (Fig. 15)&lt;br /&gt;
% d18O0 = -13;&lt;br /&gt;
% d2H0 = -94;&lt;br /&gt;
% sice = 0;&lt;br /&gt;
&lt;br /&gt;
% RH0 = 0.91;  % 20161207 AR event at Bergen&lt;br /&gt;
% d18O0 = -12.5;&lt;br /&gt;
% d2H0 = -100;&lt;br /&gt;
&lt;br /&gt;
%% functions adopted&lt;br /&gt;
% fractionation factors&lt;br /&gt;
%--------------------------------&lt;br /&gt;
% Majoube, M., 1971a: Fractionnement en oxyg`ene-18 entre la glace et la vapeur d’eau. J.&lt;br /&gt;
% Chim. Phys., 68, 625–636.&lt;br /&gt;
&lt;br /&gt;
% Majoube, M., 1971b: Fractionnement en oxyg`ene 18 et deut ́erium entre l’eau et sa vapeur. J. Chim.&lt;br /&gt;
% Phys., 68, 1423–1436.&lt;br /&gt;
&lt;br /&gt;
% Merlivat, L. and G. Nief, 1967: Fractionnement isotopique lors des changements d‘ ́etat&lt;br /&gt;
% solide-vapeur et liquide-vapeur de l’eau `a des temp ́eratures inf ́erieures a ` 0 °C. Tellus,&lt;br /&gt;
% 19, 122–127.&lt;br /&gt;
%--------------------------------&lt;br /&gt;
    function d = a2H(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15 % above 0 celsius&lt;br /&gt;
            d = exp(24.844e3/(T^2)-76.248/T+52.612e-3); % Majoube 1971b, R_liquid/R_vapour &amp;gt; 1&lt;br /&gt;
        else&lt;br /&gt;
            d = exp(16289./T.^2 - 0.0945);   % Merlivat &amp;amp; Nief 1967, R_solid/R_vapour &amp;gt; 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    function d = a18O(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15 % above 0 celsius&lt;br /&gt;
            d = exp(1137/(T^2)-0.4156/T-0.0020667); % Majoube 1971b, R_liquid/R_vapour &amp;gt; 1&lt;br /&gt;
        else&lt;br /&gt;
            d = exp(11.839./T - 0.028224); % Majoube 1971a, R_solid/R_vapour &amp;gt; 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% supersaturation with respect to ice&lt;br /&gt;
% Si = 1 − λT, with λ = 0.004. From Graf 2017 dissertation, page 53, Fig 3.1&lt;br /&gt;
% (as in Risi et al., 2010b, after Jouzel and Merlivat 1984.)&lt;br /&gt;
% Risi, C., S. Bony, F. Vimeux, and J. Jouzel, 2010b: Water-stable isotopes in the LMDZ4&lt;br /&gt;
% general circulation model: Model evaluation for present-day and past climates and&lt;br /&gt;
% applications to climatic interpretations of tropical isotopic records.&lt;br /&gt;
% sice: &amp;gt; 1: using the constant supersaturation given here;&lt;br /&gt;
%       = 1: meaning alpha_k = 1, thus no supersaturation;&lt;br /&gt;
%       = 0: using formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
    function s = si(T)&lt;br /&gt;
        if sice &amp;gt;= 1&lt;br /&gt;
            s = sice;&lt;br /&gt;
        else  % elseif sice == 0&lt;br /&gt;
            s = 1-0.004*(T-273.15);&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% vapour saturation pressure&lt;br /&gt;
    function es = esat(T) % T in Kelvin&lt;br /&gt;
        if T &amp;gt;= 273.15&lt;br /&gt;
            % es = 611*exp((17.27*T)/(273+T)); % T in celsius&lt;br /&gt;
            es = 611*exp(17.27*(T-273.15)/T); % T in Kelvin&lt;br /&gt;
        else&lt;br /&gt;
            % Saturation vapour pressure over ice (Murphy and Koop, 2005) for T &amp;gt; 110 K:&lt;br /&gt;
            es_ice = exp(9.550426 - 5723.265/T + 3.53068*log(T) - 0.00728332*T);&lt;br /&gt;
            % the actual saturation vapour pressure&lt;br /&gt;
            es = es_ice * si(T);&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% saturated vapour mixing ratio&lt;br /&gt;
    function ws = wsat(es,p)&lt;br /&gt;
        ws = 0.622*es/(p-es);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% pressure at height of z&lt;br /&gt;
    function p = pressure(z)&lt;br /&gt;
        p0 = 101325; % Pa&lt;br /&gt;
        z0 = 8000;   % m scale height&lt;br /&gt;
        p = p0*exp(-z/z0);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
% moist adiabatic lapse rate [Curry and Webster,1999] (cited after Stern and Blisniuk, 2002)&lt;br /&gt;
    function lr = gamma(ws,T) % T in Kelvin&lt;br /&gt;
        % physical constants&lt;br /&gt;
        g = 9.80665;     % m/s^2  the gravitational acceleration&lt;br /&gt;
        Cpd = 1.00464e3; % J/kg/K the specific heat capacity of dry air at constant pressure&lt;br /&gt;
        L = 2.5104e6;    % J/kg   the latent heat of vaporization or sublimation&lt;br /&gt;
        Rd = 287.04;     % J/kg/K the specific gas constant for dry air&lt;br /&gt;
        lr = g/Cpd*(1+L*ws/Rd/T)/(1+0.622*L*L*ws/Rd/Cpd/T/T); % [°C/m]&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
%% initialization&lt;br /&gt;
% isotope ratios of VSMOW reference water&lt;br /&gt;
R2std = 155.76e-6;&lt;br /&gt;
R18std = 2005.20e-6;&lt;br /&gt;
% initial isotope ratio&lt;br /&gt;
R18O0 = (d18O0/1000+1)*R18std;&lt;br /&gt;
R2H0 = (d2H0/1000+1)*R2std;&lt;br /&gt;
dxs0 = R2H0-8*R18O0;&lt;br /&gt;
&lt;br /&gt;
% initial conditions&lt;br /&gt;
f = 1.0;  % remaining vapour fractionation&lt;br /&gt;
z = 0.0;  % elevation&lt;br /&gt;
p = pressure(z);&lt;br /&gt;
w0 = RH0*wsat(esat(T0),p); % kg/kg&lt;br /&gt;
% convert water mixing ratio unit&lt;br /&gt;
md = 28.97; % [g/mol] dry air molar mass&lt;br /&gt;
mv = 18.02; % [g/mol] water vapour molar mass&lt;br /&gt;
wconc0 = w0*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
rh = RH0;&lt;br /&gt;
dt = 0.5;  % temperature step&lt;br /&gt;
T = T0+dt;&lt;br /&gt;
&lt;br /&gt;
%% for the circumstance of isobaric cooling&lt;br /&gt;
%% (1) cool to saturation&lt;br /&gt;
fprintf(&#039;Rayleigh condensation process: in an open system (material is immediately removed) \n&#039;);&lt;br /&gt;
fprintf(&#039;T0 = %6.2f K (%4.2f °C) \n&#039;, T0, T0-273.15);&lt;br /&gt;
fprintf(&#039;   T (°C)   d18Ov     d2Hv     dxsv       rh        f WConc[ppmv] \n&#039;);&lt;br /&gt;
n = 1;  % iteration number&lt;br /&gt;
while rh &amp;lt; 0.99&lt;br /&gt;
    T = T-dt; % decrease temperature by dt °C at each iteration&lt;br /&gt;
    ws = wsat(esat(T),p); % saturated water mixing ratio at each iteration&lt;br /&gt;
    rh = w0/ws;                 % RH at each iteration&lt;br /&gt;
    wconc = wconc0; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18O0,d2H0,dxs0,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18O0;&lt;br /&gt;
    data.R2H(n) = R2H0;&lt;br /&gt;
    data.d18O(n) = d18O0;&lt;br /&gt;
    data.dD(n) = d2H0;&lt;br /&gt;
    data.dxs(n) = d2H0-8*d18O0;&lt;br /&gt;
    data.d18Oc(n) = NaN; % condensate&lt;br /&gt;
    data.d2Hc(n) = NaN;&lt;br /&gt;
    data.dxsc(n) = NaN;&lt;br /&gt;
    data.d18O_acc(n) = NaN; % accumulated condensate (liquid+solid)&lt;br /&gt;
    data.d2H_acc(n) = NaN;&lt;br /&gt;
    data.dxs_acc(n) = NaN;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;Reached saturation now\n&#039;);&lt;br /&gt;
&lt;br /&gt;
ws0 = w0;&lt;br /&gt;
&lt;br /&gt;
%% (2) continue to cool and form liquid condensate&lt;br /&gt;
while T &amp;gt; 273.15 % isobaric cooling with condensation to 0 °C&lt;br /&gt;
    T = T-dt; % decrease temperature by dt °C at each iteration&lt;br /&gt;
    ws = wsat(esat(T),p); % saturated water mixing ratio at each iteration&lt;br /&gt;
    wconc = ws*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    f = ws/ws0;&lt;br /&gt;
    &lt;br /&gt;
    if n == 1&lt;br /&gt;
        f1 = ws/ws0;&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = R18O0*f1^(a18O(T)-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = R2H0*f1^(a2H(T)-1);&lt;br /&gt;
    else&lt;br /&gt;
        f1 = wconc/data.Wconc(n-1); % q(n)/q(n-1)&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = data.R18O(n-1)*f1^(a18O(T)-1);  % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = data.R2H(n-1)*f1^(a2H(T)-1);&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    % (1) delta value of remaining vapour&lt;br /&gt;
    d18Ov = (R18Ov/R18std-1)*1000;&lt;br /&gt;
    d2Hv = (R2Hv/R2std-1)*1000;&lt;br /&gt;
    dxsv = d2Hv - 8*d18Ov;&lt;br /&gt;
    &lt;br /&gt;
    % (2) delta value of the instantaneously removed condensate (in equilibrium with the current remaining vapour)&lt;br /&gt;
    d18Oc = ((d18Ov/1000+1)*a18O(T)-1)*1000;&lt;br /&gt;
    d2Hc = ((d2Hv/1000+1)*a2H(T)-1)*1000;&lt;br /&gt;
    dxsc = d2Hc-8*d18Oc;&lt;br /&gt;
    &lt;br /&gt;
    % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
    % mass conservation of rare isotopes between the reservoir and formed removal: f*Rv + (1-f)*Rl_acc = R0,&lt;br /&gt;
    % after rearranging, we have: Rl_acc = (R0-f*Rv)/(1-f)&lt;br /&gt;
    R18Ol_acc = (R18O0-f*R18Ov)/(1-f);&lt;br /&gt;
    R2Hl_acc = (R2H0-f*R2Hv)/(1-f);&lt;br /&gt;
    d18Ol_acc = (R18Ol_acc/R18std-1)*1000;&lt;br /&gt;
    d2Hl_acc = (R2Hl_acc/R2std-1)*1000;&lt;br /&gt;
    dxsl_acc = d2Hl_acc-8*d18Ol_acc;&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18Ov,d2Hv,dxsv,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18Ov;&lt;br /&gt;
    data.R2H(n) = R2Hv;&lt;br /&gt;
    data.d18O(n) = d18Ov;&lt;br /&gt;
    data.dD(n) = d2Hv;&lt;br /&gt;
    data.dxs(n) = dxsv;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.d18Oc(n) = d18Oc;&lt;br /&gt;
    data.d2Hc(n) = d2Hc;&lt;br /&gt;
    data.dxsc(n) = dxsc;&lt;br /&gt;
    data.d18O_acc(n) = d18Ol_acc;&lt;br /&gt;
    data.d2H_acc(n) = d2Hl_acc;&lt;br /&gt;
    data.dxs_acc(n) = dxsl_acc;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;Have cooled to 0 celcius now \n&#039;);&lt;br /&gt;
&lt;br /&gt;
ws0_ice = ws;&lt;br /&gt;
R18O0 = R18Ov;&lt;br /&gt;
R2H0 = R2Hv;&lt;br /&gt;
f0 = f;&lt;br /&gt;
&lt;br /&gt;
%% (3) continue to cool and form solid condensate&lt;br /&gt;
% considering mixed-phase cloud: subsaturated over liquid droplets and supersaturated over ice crystals&lt;br /&gt;
&lt;br /&gt;
% closure assumption: liquid droplets --&amp;gt; evaporate to vapour --&amp;gt; deposite on ice crystals&lt;br /&gt;
% therefore: when T&amp;lt;0 celsius, the reduced fraction of vapour is due to its deposit on ice crystals with a fractionation&lt;br /&gt;
% factor alpha_eff = alpha_eq*alpha_k taking into account the kinetic effct under the supersaturation condition.&lt;br /&gt;
% i.e.: we start a new Rayleigh condensation model starting with the remaining vapour&lt;br /&gt;
% after the liquid condensation stage above, and use the new factionation factor alpha_eff&lt;br /&gt;
&lt;br /&gt;
while T &amp;gt; -60+273.15&lt;br /&gt;
    T = T-dt;&lt;br /&gt;
    ws = wsat(esat(T),p);&lt;br /&gt;
    wconc = ws*md/mv*1e6; % [kg/kg] --&amp;gt; [ppmv]&lt;br /&gt;
    f = ws/ws0;      % the total fraction of remaining vapour through all stages&lt;br /&gt;
    fi = ws/ws0_ice; % the fraction of remaing vapour in the ice condensation stage only&lt;br /&gt;
        &lt;br /&gt;
    % modified Rayleigh condensation model including kinectic effct&lt;br /&gt;
    % during the ice formation at supersaturated conditions (Jouzel and Merlivat 1984)&lt;br /&gt;
    % Diffusivities D adopted from Merlivat 1978:&lt;br /&gt;
    % D_H18O/D_H16O = 0.9723 ± 0.0007&lt;br /&gt;
    % D_HD16O/D_H216O = 0.9755 ± 0.0009&lt;br /&gt;
    ak_18O = si(T)/(a18O(T)*1/0.9723*(si(T)-1) + 1);&lt;br /&gt;
    ak_2H = si(T)/(a2H(T)*1/0.9755*(si(T)-1) + 1);&lt;br /&gt;
    aeff_18O = a18O(T) * ak_18O;&lt;br /&gt;
    aeff_2H = a2H(T) * ak_2H;&lt;br /&gt;
    &lt;br /&gt;
    if n == 1&lt;br /&gt;
        f1 = ws/ws0;&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = R18O0*f1^(aeff_18O-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1)&lt;br /&gt;
        R2Hv = R2H0*f1^(aeff_2H-1);&lt;br /&gt;
    else&lt;br /&gt;
        f1 = wconc/data.Wconc(n-1); % q(n)/q(n-1)&lt;br /&gt;
        % isotope ratio of remaining vapour&lt;br /&gt;
        R18Ov = data.R18O(n-1)*f1^(aeff_18O-1); % R(n) = R(n-1)(q(n)/q(n-1))^(a-1), and Jouzel and Merlivat, 1984&lt;br /&gt;
        R2Hv = data.R2H(n-1)*f1^(aeff_2H-1);&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    % (1) delta value of remaining vapour&lt;br /&gt;
    d18Ov = (R18Ov/R18std-1)*1000;&lt;br /&gt;
    d2Hv = (R2Hv/R2std-1)*1000;&lt;br /&gt;
    dxsv = d2Hv - 8*d18Ov;&lt;br /&gt;
    &lt;br /&gt;
    % (2) delta value of the instantaneously removed condensate (in equilibrium with the current remaining vapour)&lt;br /&gt;
    d18Oc = ((d18Ov/1000+1)*aeff_18O-1)*1000;&lt;br /&gt;
    d2Hc = ((d2Hv/1000+1)*aeff_2H-1)*1000;&lt;br /&gt;
    dxsc = d2Hc-8*d18Oc;&lt;br /&gt;
    &lt;br /&gt;
    % (3) Calculating the isotope ratio of the accumulated removal using mass conservation approach&lt;br /&gt;
    % (i) mass conservation of rare isotopes between the reservoir and formed removal:&lt;br /&gt;
    % fi*Rv + (1-fi)*Ri_acc = Rv0,&lt;br /&gt;
    % where fi is the fraction of remaining vapour in the ice condensation stage, and&lt;br /&gt;
    % Rv0 is the isotope ratio of the remaining vapour after liquid condensation stage&lt;br /&gt;
    % after rearranging, we have: Ri_acc = (Rv0-fi*Rv)/(1-fi)&lt;br /&gt;
    R18Oi_acc = (R18O0-fi*R18Ov)/(1-fi);&lt;br /&gt;
    R2Hi_acc = (R2H0-fi*R2H0)/(1-fi);&lt;br /&gt;
    %         d18Oi_acc = (R18Oi_acc/R18std-1)*1000;&lt;br /&gt;
    %         d2Hi_acc = (R2Hi_acc/R2std-1)*1000;&lt;br /&gt;
    %         dxsi_acc = d2Hi_acc-8*d18Oi_acc;&lt;br /&gt;
    % (ii) the total accumulation is sum of the liquid (1-f0) and solid condensate (f0*(1-fi))&lt;br /&gt;
    % (1-f0*fi)*R_acc = (1-f0)*Rl_acc + (f0*(1-fi))*Ri_acc&lt;br /&gt;
    R18O_acc = ((1-f0)*R18Ol_acc + (f0*(1-fi))*R18Oi_acc)/(1-f0*fi);&lt;br /&gt;
    R2H_acc = ((1-f0)*R2Hl_acc + (f0*(1-fi))*R2Hi_acc)/(1-f0*fi);&lt;br /&gt;
    d18O_acc = (R18O_acc/R18std-1)*1000;&lt;br /&gt;
    d2H_acc = (R2H_acc/R2std-1)*1000;&lt;br /&gt;
    dxs_acc = d2H_acc-8*d18O_acc;&lt;br /&gt;
    &lt;br /&gt;
    fprintf(&#039;%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f \n&#039;,T-273.15,d18Ov,d2Hv,dxsv,rh,f,wconc);&lt;br /&gt;
    &lt;br /&gt;
    % assign to output&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.f(n) = f;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.Wconc(n) = wconc;&lt;br /&gt;
    data.R18O(n) = R18Ov;&lt;br /&gt;
    data.R2H(n) = R2Hv;&lt;br /&gt;
    data.d18O(n) = d18Ov;&lt;br /&gt;
    data.dD(n) = d2Hv;&lt;br /&gt;
    data.dxs(n) = dxsv;&lt;br /&gt;
    data.rh(n) = rh;&lt;br /&gt;
    data.d18Oc(n) = d18Oc;&lt;br /&gt;
    data.d2Hc(n) = d2Hc;&lt;br /&gt;
    data.dxsc(n) = dxsc;&lt;br /&gt;
    data.d18O_acc(n) = d18O_acc;&lt;br /&gt;
    data.d2H_acc(n) = d2H_acc;&lt;br /&gt;
    data.dxs_acc(n) = dxs_acc;&lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
%% for the circumstance of pseudoadiabatic cooling&lt;br /&gt;
% - establish the relationship between T and z&lt;br /&gt;
z = 0;&lt;br /&gt;
p = pressure(z);&lt;br /&gt;
n = 1;&lt;br /&gt;
for T = T0:-dt:-60+273.15&lt;br /&gt;
    data.T(n) = T;&lt;br /&gt;
    data.z(n) = z;&lt;br /&gt;
    data.p(n) = p;&lt;br /&gt;
    % the elevation change&lt;br /&gt;
    ws = wsat(esat(T),p);&lt;br /&gt;
    lr = gamma(ws,T); % lapse rate&lt;br /&gt;
    dz = dt/lr;   % dt = lr*dz&lt;br /&gt;
    % the new elevation and pressure&lt;br /&gt;
    z = z+dz;&lt;br /&gt;
    p = pressure(z);&lt;br /&gt;
    data.lr(n) = lr;   &lt;br /&gt;
    &lt;br /&gt;
    % iterate to next step&lt;br /&gt;
    n = n+1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
% fin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example of usage ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Generate the desired data sets&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%% create data sets&lt;br /&gt;
% Rayleigh evaporation&lt;br /&gt;
T0 = 20+273.15;&lt;br /&gt;
d18O0 = -10; % close to Bergen precipitation average&lt;br /&gt;
d2H0 = -70;&lt;br /&gt;
h = 0.75; % relative humidity&lt;br /&gt;
de_ok = rayleigh_evaporation(T0,d18O0,d2H0,1,h); % in an open system, unsaturated (including kinetic effect)&lt;br /&gt;
de_oe = rayleigh_evaporation(T0,d18O0,d2H0,1);   % in an open system, saturated (equilibrium)&lt;br /&gt;
de_cl = rayleigh_evaporation(T0,d18O0,d2H0,0);   % in a closed system&lt;br /&gt;
de_CG = rayleigh_evaporation(T0,d18O0,d2H0,2,h); % C--G model&lt;br /&gt;
&lt;br /&gt;
% Rayleigh condensation&lt;br /&gt;
T0 = 20+273.15;&lt;br /&gt;
RH0 = 0.75; % Craig-Gordon, 1965 (Fig. 15)&lt;br /&gt;
d18O0 = -13;&lt;br /&gt;
d2H0 = -94;&lt;br /&gt;
% &amp;gt; 1: using the constant supersaturation given as sice;&lt;br /&gt;
% = 1: &lt;br /&gt;
% = 0: &lt;br /&gt;
dc_ln = rayleigh_condensation(T0,RH0,d18O0,d2H0,0);   % using linear formula Si = 1-0.004*T (in Celsius)&lt;br /&gt;
dc_no = rayleigh_condensation(T0,RH0,d18O0,d2H0,1);   % meaning alpha_k = 1, thus no supersaturation, e = e_ice&lt;br /&gt;
dc_11 = rayleigh_condensation(T0,RH0,d18O0,d2H0,1.1); % using the constant supersaturation as given&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Plot Rayleigh evaporation and condensation profiles.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As an example, Fig. 2 is created using the data sets generated from the above step and using the plotting codes from below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%% plot Rayleigh evaporation and condensation model&lt;br /&gt;
fs = 14;&lt;br /&gt;
&lt;br /&gt;
clear h&lt;br /&gt;
figure&lt;br /&gt;
set(gcf,&#039;color&#039;,&#039;white&#039;,&#039;position&#039;,[0 0 1200 1150],&#039;PaperPositionMode&#039;,&#039;auto&#039;);&lt;br /&gt;
% left_color = [0 0 0]; % black&lt;br /&gt;
% right_color = [0 0.4470 0.7410]; % blueish % blue [0 0 1];&lt;br /&gt;
% set(gcf,&#039;defaultAxesColorOrder&#039;,[left_color; right_color]);&lt;br /&gt;
&lt;br /&gt;
% Rayleigh evaporation&lt;br /&gt;
h(1) = subplot(2,2,1);&lt;br /&gt;
% set(h(1),&#039;Position&#039;, [0.1 0.56 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pe(1) = plot(de_ok.f,de_ok.d18Ol,&#039;k-&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(2) = plot(de_ok.f,de_ok.d18Ov,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(3) = plot(de_ok.f,de_ok.d18Ov_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pe(4) = plot(de_oe.f,de_oe.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); %&#039;color&#039;,[0.3010 0.7450 0.9330],&lt;br /&gt;
pe(5) = plot(de_oe.f,de_oe.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(6) = plot(de_oe.f,de_oe.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(7) = plot(de_cl.f,de_cl.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
pe(8) = plot(de_cl.f,de_cl.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(9) = plot(de_cl.f,de_cl.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(10) = plot(de_CG.f,de_CG.d18Ol,&#039;-&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2); &lt;br /&gt;
pe(11) = plot(de_CG.f,de_CG.d18Ov,&#039;--&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2);&lt;br /&gt;
pe(12) = plot(de_CG.f,de_CG.d18Ov_acc,&#039;:&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(h(1),[-30 40]);&lt;br /&gt;
xlabel(&#039;Residual water fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
ylabel([&#039;\delta^{18}O / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
lgd1 = legend(h(1),pe(1:3),&#039;residual water&#039;,&#039;instant vapour&#039;,&#039;total vapour removed&#039;,&#039;Location&#039;,&#039;northwest&#039;);&lt;br /&gt;
lgd1_pos = lgd1.Position;&lt;br /&gt;
lgd1.FontSize = fs;&lt;br /&gt;
% lgd1.Visible = &#039;off&#039;;&lt;br /&gt;
% 2nd axes&lt;br /&gt;
a2 = axes(&#039;position&#039;,get(h(1),&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
% lgd2 = legend(a2,pe(4:6),&#039;residual water&#039;,&#039;instant vapour&#039;,&#039;total vapour removed&#039;,&#039;Location&#039;,&#039;northwest&#039;);&lt;br /&gt;
% lgd2.FontSize = fs;&lt;br /&gt;
lgd2 = legend(a2,pe(4:6),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd2_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.58 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd2,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd2_pos);&lt;br /&gt;
% 3rd axes&lt;br /&gt;
a3 = axes(&#039;position&#039;,get(gca,&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
lgd3 = legend(a3,pe(7:9),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd3_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.79 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd3,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd3_pos);&lt;br /&gt;
% % 4th axes&lt;br /&gt;
a4 = axes(&#039;position&#039;,get(gca,&#039;position&#039;),&#039;visible&#039;,&#039;off&#039;); % create the same axes but set it invisible&lt;br /&gt;
lgd4 = legend(a4,pe(10:12),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;northwest&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lgd4_pos = lgd1_pos+[-lgd1_pos(3)*0.304 -lgd1_pos(4)*0.88 0 lgd1_pos(4)*0.5]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lgd4,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lgd4_pos);&lt;br /&gt;
% add text&lt;br /&gt;
text(h(1),0.41,8.5,&#039;open&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,30)&lt;br /&gt;
text(h(1),0.30,13.2,&#039;(unsaturated)&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,53)&lt;br /&gt;
text(h(1),0.60,-3,&#039;open&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,15,&#039;color&#039;,[0.6 0.6 0.6])&lt;br /&gt;
text(h(1),0.48,-0.5,&#039;(saturated)&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,20,&#039;color&#039;,[0.6 0.6 0.6])&lt;br /&gt;
text(h(1),0.75,-10,&#039;closed&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,7,&#039;Color&#039;,[0.3010 0.7450 0.9330])&lt;br /&gt;
text(h(1),0.8,1.5,&#039;C-G model&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;FontSize&#039;,fs,&#039;Rotation&#039;,15)&lt;br /&gt;
&lt;br /&gt;
h(3) = subplot(2,2,3);&lt;br /&gt;
% set(h(3),&#039;Position&#039;, [0.1 0.1 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
plot(de_ok.f,de_ok.dxsl,&#039;k-&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_ok.f,de_ok.dxsv,&#039;k--&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_ok.f,de_ok.dxsv_acc,&#039;k:&#039;,&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsl,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsv,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_oe.f,de_oe.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsl,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsv,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_cl.f,de_cl.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsl,&#039;-&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsv,&#039;--&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
plot(de_CG.f,de_CG.dxsv_acc,&#039;:&#039;,&#039;color&#039;,[0.8500 0.3250 0.0980],&#039;linewidth&#039;,2)&lt;br /&gt;
ylim(h(3),[-60 70]);&lt;br /&gt;
set(h(3),&#039;ytick&#039;,-60:20:65);&lt;br /&gt;
xlabel(&#039;Residual water fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
ylabel([&#039;\itd / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
&lt;br /&gt;
% Rayleigh condensation&lt;br /&gt;
h(4) = subplot(2,2,4);&lt;br /&gt;
% set(h(4),&#039;Position&#039;, [0.56 0.1 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pc(4) = plot(dc_no.Wconc,dc_no.dxsc,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); &lt;br /&gt;
pc(5) = plot(dc_no.Wconc,dc_no.dxs,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pc(6) = plot(dc_no.Wconc,dc_no.dxs_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);  &lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;Water mixing ratio / ppmv&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,2000:3000:16000);&lt;br /&gt;
ylabel([&#039;\itd / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
% 2nd axis&lt;br /&gt;
ax1_pos = get(gca,&#039;position&#039;); % position of first axes&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos,&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YAxisLocation&#039;,&#039;right&#039;,&#039;Color&#039;,&#039;none&#039;,&#039;YTickLabel&#039;,&#039;&#039;,&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
hold on&lt;br /&gt;
pc(1) = plot(dc_ln.f,dc_ln.dxsc,&#039;k-&#039;,&#039;linewidth&#039;,2); % [0.3010 0.7450 0.9330]&lt;br /&gt;
pc(2) = plot(dc_ln.f,dc_ln.dxs,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pc(3) = plot(dc_ln.f,dc_ln.dxs_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
% pc(7) = plot(dc_11.f,dc_11.dxsc,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(8) = plot(dc_11.f,dc_11.dxs,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(9) = plot(dc_11.f,dc_11.dxs_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;Residual vapour fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
% 3rd axis&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos+[0 0 0 -ax1_pos(4)],&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YColor&#039;,&#039;w&#039;,&#039;YTick&#039;,[],&#039;Color&#039;,&#039;none&#039;,&#039;TickDir&#039;,&#039;out&#039;,&#039;FontSize&#039;,fs); &lt;br /&gt;
hold on&lt;br /&gt;
pc(7) = plot(dc_ln.Wconc,20*ones(size(dc_ln.Wconc)),&#039;k-&#039;); % [0.3010 0.7450 0.9330]&lt;br /&gt;
ylim(gca,[-20 50]);&lt;br /&gt;
xlabel(&#039;T / °C&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,[dc_ln.Wconc(81) dc_ln.Wconc(61:-10:11)],&#039;XTickLabel&#039;,[-20 -10:5:15])&lt;br /&gt;
&lt;br /&gt;
h(2) = subplot(2,2,2);&lt;br /&gt;
% set(h(2),&#039;Position&#039;, [0.56 0.56 0.38 0.38]);&lt;br /&gt;
hold on&lt;br /&gt;
pc(4) = plot(dc_no.Wconc,dc_no.d18Oc,&#039;-&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2); % [0 0.4470 0.7410]&lt;br /&gt;
pc(5) = plot(dc_no.Wconc,dc_no.d18O,&#039;--&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);&lt;br /&gt;
pc(6) = plot(dc_no.Wconc,dc_no.d18O_acc,&#039;:&#039;,&#039;color&#039;,[0.6 0.6 0.6],&#039;linewidth&#039;,2);  &lt;br /&gt;
ylim(h(2),[-60 -2]);&lt;br /&gt;
xlabel(&#039;Water mixing ratio / ppmv&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,2000:3000:16000);&lt;br /&gt;
ylabel([&#039;\delta^{18}O / &#039;,char(8240)],&#039;fontsize&#039;,fs);&lt;br /&gt;
% 2nd axis&lt;br /&gt;
ax1_pos = get(gca,&#039;position&#039;); % position of first axes&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos,&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YAxisLocation&#039;,&#039;right&#039;,&#039;Color&#039;,&#039;none&#039;,&#039;YTickLabel&#039;,&#039;&#039;,&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
hold on&lt;br /&gt;
pc(1) = plot(dc_ln.f,dc_ln.d18Oc,&#039;k-&#039;,&#039;linewidth&#039;,2); % [0.3010 0.7450 0.9330]&lt;br /&gt;
pc(2) = plot(dc_ln.f,dc_ln.d18O,&#039;k--&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
pc(3) = plot(dc_ln.f,dc_ln.d18O_acc,&#039;k:&#039;,&#039;linewidth&#039;,2);&lt;br /&gt;
% pc(7) = plot(dc_11.f,dc_11.d18Oc,&#039;-&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(8) = plot(dc_11.f,dc_11.d18O,&#039;--&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2); &lt;br /&gt;
% pc(9) = plot(dc_11.f,dc_11.d18O_acc,&#039;:&#039;,&#039;color&#039;,[0.3010 0.7450 0.9330],&#039;linewidth&#039;,2);&lt;br /&gt;
ylim(gca,[-60 -2]);&lt;br /&gt;
xlabel(&#039;Residual vapour fraction&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
lg = legend(h(2),pc(1:3),&#039;instant liquid/ice&#039;,&#039;residual vapour&#039;,&#039;total liquid/ice removed&#039;);&lt;br /&gt;
% lg = legend(h(2),pc(4:6),&#039;instant liquid/ice&#039;,&#039;residual vapour&#039;,&#039;total liquid/ice removed&#039;);&lt;br /&gt;
set(lg,&#039;Position&#039;,[0.69 0.66 0.20 0.06],&#039;FontSize&#039;,fs);&lt;br /&gt;
lg_pos = lg.Position;&lt;br /&gt;
% 3rd axis&lt;br /&gt;
axes(&#039;Position&#039;,ax1_pos+[0 -ax1_pos(4)*0.2 0 -ax1_pos(4)*0.8],&#039;XAxisLocation&#039;,&#039;top&#039;,&#039;YColor&#039;,&#039;w&#039;,&#039;YTick&#039;,[],&#039;Color&#039;,&#039;none&#039;); &lt;br /&gt;
hold on&lt;br /&gt;
pc(7) = plot(dc_ln.Wconc,-2+zeros(size(dc_ln.d18Oc)),&#039;k-&#039;); % [0.3010 0.7450 0.9330]&lt;br /&gt;
ylim(gca,[-60 -2]);&lt;br /&gt;
xlabel(&#039;T / °C&#039;,&#039;fontsize&#039;,fs);&lt;br /&gt;
set(gca,&#039;XTick&#039;,[dc_ln.Wconc(81) dc_ln.Wconc(61:-10:11)],&#039;XTickLabel&#039;,[-20 -10:5:15],&#039;FontSize&#039;,fs,&#039;TickDir&#039;,&#039;out&#039;);&lt;br /&gt;
lg2 = legend(gca,pc(4:6),&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;location&#039;,&#039;east&#039;,&#039;box&#039;,&#039;off&#039;);&lt;br /&gt;
lg2_pos = lg_pos+[-lg_pos(3)*0.405 +lg_pos(4)*0.02 0 lg_pos(4)*0.117]; % move the 2nd legend to the desired position&lt;br /&gt;
set(lg2,&#039;box&#039;,&#039;off&#039;,&#039;Position&#039;,lg2_pos);&lt;br /&gt;
% add text&lt;br /&gt;
text(h(2),1300,-36,&#039;super&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,65)&lt;br /&gt;
text(h(2),2150,-27.5,&#039;saturation&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,50)&lt;br /&gt;
text(h(2),1200,-25,&#039;saturation&#039;,&#039;FontSize&#039;,fs,&#039;Rotation&#039;,50,&#039;Color&#039;,0.6*[1 1 1])&lt;br /&gt;
&lt;br /&gt;
set([h(1) h(3)],&#039;XDir&#039;,&#039;reverse&#039;,&#039;box&#039;,&#039;on&#039;);&lt;br /&gt;
set(h(:),&#039;color&#039;,&#039;none&#039;,&#039;FontSize&#039;,fs,&#039;tickdir&#039;,&#039;out&#039;); % ,&#039;YAxisLocation&#039;,&#039;left&#039;,&#039;ticklength&#039;,[0 0],&#039;ygrid&#039;,&#039;on&#039;,&#039;xgrid&#039;,&#039;on&#039;&lt;br /&gt;
&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.05 0.96 0.02 0.02],&#039;String&#039;,&#039;(a)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.49 0.96 0.02 0.02],&#039;String&#039;,&#039;(b)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.05 0.48 0.02 0.02],&#039;String&#039;,&#039;(c)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
annotation(&#039;textbox&#039;,[0.49 0.48 0.02 0.02],&#039;String&#039;,&#039;(d)&#039;,&#039;FitBoxToText&#039;,&#039;on&#039;,&#039;FontSize&#039;,fs+6,&#039;LineStyle&#039;,&#039;none&#039;);&lt;br /&gt;
&lt;br /&gt;
% print(&#039;-depsc&#039;,&#039;-r300&#039;,&#039;/scratch/home/figs/thesis/Rayleigh_model_plot&#039;);&lt;br /&gt;
% print(&#039;-dpng&#039;,&#039;-r300&#039;,&#039;/scratch/home/figs/thesis/Rayleigh_model_plot&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1436</id>
		<title>WaterSip</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1436"/>
		<updated>2021-01-15T08:43:25Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===About WaterSip===&lt;br /&gt;
&lt;br /&gt;
WaterSip is a diagnostic software tool that identifies source, transport and arrival properties of atmospheric water vapour based on airmass backward trajectories. As a prerequisite, the backward trajectories for the analysis are to be obtained from a trajectory calculation tool, such as FLEXPART [[http://www.flexpart.eu]] or Lagranto [[http://www.lagranto.iac.ethz.ch]]. Moisture sources are then identified from changes in specific humidity interpolated to the air parcel trajectory per time step. The changes in specific humidity at each time step are set in relation with the current humidity of the air parcel. This allows to estimate the quantitative contribution of moisture to the air parcel at a specific location, a so-called moisture accounting. WaterSip identifies and aggregates further properties of the moisture source and during the moisture transport, such as temperature, pressure, latitude etc. The moisture source diagnostic is described in detail in [[Sodemann et al. (2008)]]. Publications using the WaterSip diagnostic are listed in section [[Bibliography]].&lt;br /&gt;
&lt;br /&gt;
===Working principle===&lt;br /&gt;
&lt;br /&gt;
Explanation from Sodemann et al. 2008a&lt;br /&gt;
&lt;br /&gt;
Image from Läderach and Sodemann, 2016 or Sodemann et al., 2008a&lt;br /&gt;
&lt;br /&gt;
Moisture source information&lt;br /&gt;
&lt;br /&gt;
- Accounted fraction fa, fb, fa+fb&lt;br /&gt;
- adding below and above boundary layer or not, when&lt;br /&gt;
- choosing threshold values for Arctic and other regions&lt;br /&gt;
- identifying moisture transport&lt;br /&gt;
&lt;br /&gt;
Arrival information and Lagrangian forward projections&lt;br /&gt;
&lt;br /&gt;
- arrival parameters&lt;br /&gt;
- transport parameters&lt;br /&gt;
- source parameters&lt;br /&gt;
- averaging by contribution and amount&lt;br /&gt;
&lt;br /&gt;
Series information&lt;br /&gt;
&lt;br /&gt;
- sectorization (Sodemann and Zubler, 2010; definition table, code changes)&lt;br /&gt;
- weighted averaging: The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and deviding by the total precipitation.&lt;br /&gt;
&lt;br /&gt;
Averaged properties&lt;br /&gt;
&lt;br /&gt;
- histogram example and modification (code below)&lt;br /&gt;
&lt;br /&gt;
Trajectories&lt;br /&gt;
&lt;br /&gt;
- plotting/reading example (code below)&lt;br /&gt;
&lt;br /&gt;
Uncertainties&lt;br /&gt;
&lt;br /&gt;
===Example setups===&lt;br /&gt;
&lt;br /&gt;
Three examples with different purposes&lt;br /&gt;
&lt;br /&gt;
====Water vapour====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
====Extratropical precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
 &lt;br /&gt;
====High latitude precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
===Version history===&lt;br /&gt;
&lt;br /&gt;
Version 2.1&lt;br /&gt;
&lt;br /&gt;
Version 2.2&lt;br /&gt;
&lt;br /&gt;
Version 2.3&lt;br /&gt;
&lt;br /&gt;
Version 2.4&lt;br /&gt;
&lt;br /&gt;
Version 2.5&lt;br /&gt;
&lt;br /&gt;
Version 2.8&lt;br /&gt;
&lt;br /&gt;
Version 2.8.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9&lt;br /&gt;
&lt;br /&gt;
Version 2.9.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9.2&lt;br /&gt;
&lt;br /&gt;
Version 2.9.3&lt;br /&gt;
&lt;br /&gt;
Version 2.9.4&lt;br /&gt;
&lt;br /&gt;
Version 3.0.8&lt;br /&gt;
&lt;br /&gt;
Version 3.1&lt;br /&gt;
&lt;br /&gt;
The current version of WaterSip is V3.1.0. &lt;br /&gt;
&lt;br /&gt;
===Running the WaterSip diagnostic===&lt;br /&gt;
&lt;br /&gt;
It is advised to create a link to the binary file of WaterSip in your /home/$USER/bin or project directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/bin&lt;br /&gt;
ln -s /Data/gfi/projects/isomet/progs/WaterSip_tool/WaterSip3 ~/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load netCDF-C++&lt;br /&gt;
WaterSip3 &amp;lt;WATERSIP_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the UiB hpc environment requires the above &#039;module load&#039; command to be executed first.&lt;br /&gt;
&lt;br /&gt;
On cyclone.hpc.uib.no, a run script is available that makes repeated similar runs easier to manage. Only essential parameters have to be changed, such as the target coordinates and case name. These will then be replaced on a template INPUT_WATERSIP file, and then WaterSip will be started. The script and an input file template can be copied like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/run_watersip_template_Bergen_2018.sh .&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/INPUT_WATERSIP_template_Bergen_2018 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Input file conversion from V2====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WaterSip3 -c &amp;lt;WATERSIP_V2_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a new file named &amp;lt;WATERSIP_V2_parameter_file&amp;gt;V3 at the current directory. It is recommended to double check and edit the settings in the converted file before starting a simulation.&lt;br /&gt;
&lt;br /&gt;
====Parallelization====&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
If WaterSip3 is to be executed on a queue system (not applicable to cyclone.hpc.uib.no), the following wrapper script can be used to start a run using 4 cores for parallel processing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# start with sbatch NAME_OF_THIS_FILE directly on machine&lt;br /&gt;
&lt;br /&gt;
#SBATCH --job-name=WaterSip3&lt;br /&gt;
#SBATCH --workdir=/tmp/&lt;br /&gt;
#SBATCH --partition=priority&lt;br /&gt;
#SBATCH --output=WaterSip_job.%j.out&lt;br /&gt;
#SBATCH --error=WaterSip_job.%j.err&lt;br /&gt;
#SBATCH --mail-type=END&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --cpus-per-task=4&lt;br /&gt;
&lt;br /&gt;
srun ./WaterSip3 INPUT_WATERSIP_global_1993&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating mask files====&lt;br /&gt;
&lt;br /&gt;
WaterSip allows to define target regions not only by coordinates, but also by mask files. This is a short introduction to creating a mask for use with WaterSip.&lt;br /&gt;
&lt;br /&gt;
The procedure described here  uses python to create the netcdf file with the mask, and CDO to change the netcdf file format such that it can be read in by watersip.&lt;br /&gt;
&lt;br /&gt;
Required python packages [tested version]: numpy [1.19.1], shapely [1.6.4.post1], netCDF4 [1.5.3] and if loading from a csv, pandas [1.1.3]&lt;br /&gt;
&lt;br /&gt;
Optional packages (for plotting): matplotlib [3.3.1], cartopy [0.16.0]&lt;br /&gt;
&lt;br /&gt;
[[File:watersip_mask-guide_cut.png|400px]]&lt;br /&gt;
Figure: Example for Scandinavia&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Basic principle:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using shapely’s .contains and .touches methods on a polygon with a point in vectorized version (taking a list of points instead of just one point for speed). &lt;br /&gt;
This enables more interactive editing on a grid spacing of 0.25x0.25 degree (1M grid points).&lt;br /&gt;
After calculation, the script performs a boolean OR operation on the two masks to get the combined of inner and edge points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mask_inner=shapely.vectorized.contains(geom, x, y) # - for interior points&lt;br /&gt;
mask_edge=shapely.vectorized.touches(geom, x, y) #- for edge points&lt;br /&gt;
mask_full=mask_inner|mask_edge # | is boolean OR bitwise (elementwise) operator.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
list of coordinates of pairs of lat, lon defining the nodes of the polygon mask.&lt;br /&gt;
&lt;br /&gt;
global meshgrid with a given resolution&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Output:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Boolean mask of False and True in the shape of the meshgrid lat-lon&lt;br /&gt;
&lt;br /&gt;
After using python script, convert to a netCDF format readable by WaterSip by using the command below in a terminal where you newly created mask file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cdo -f nc2 copy mask-from-python.nc mask-to-watersip.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For reference, and instructions on how to load political, and other, geometries straight from NaturalEarth dataset, go to&lt;br /&gt;
[[https://gist.github.com/pelson/9785576]]&lt;br /&gt;
&lt;br /&gt;
[[MaskCode|Python program code available here|]]&lt;br /&gt;
&lt;br /&gt;
=== Input file options ===&lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;code&amp;gt;[Case]&amp;lt;/code&amp;gt;). There are 7 option groups which can appear in random order in the input file:&lt;br /&gt;
&lt;br /&gt;
*Case: general settings related to the case to be extracted&lt;br /&gt;
*Grids: specification of different output grids&lt;br /&gt;
*Diagnostrics: parameters of the moisture diagnostic&lt;br /&gt;
*Output: general output settings&lt;br /&gt;
*Variables: selection of output variables&lt;br /&gt;
*Flexpart: options specific to runs using FLEXPART particle output&lt;br /&gt;
*Lagranto: options specific to runs using Lagranto trajectories&lt;br /&gt;
&lt;br /&gt;
====Parameter set Case====&lt;br /&gt;
&lt;br /&gt;
The settings in this parameter category describe the basic conditions of the diagnostic run.&lt;br /&gt;
&lt;br /&gt;
;caseName (string)&lt;br /&gt;
: identifier for the run, prepended to all output files. Example: &amp;lt;code&amp;gt;caseName = global_201002_relative&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;inputDir (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;inputDir = /Volumes/Data/global/shortposit_%s&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;outputDir (string)&lt;br /&gt;
: path where the output files will be created. Example: &amp;lt;code&amp;gt;outputDir = /Volumes/Data/global/output/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;startDate (date string)&lt;br /&gt;
: inital date of the run, fixed format YYYYMMDD-HHMMSS. Start date is latest date of the run which moves backward in time. Example: &amp;lt;code&amp;gt;startDate = 20100228-180000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;endDate (date string)&lt;br /&gt;
: final date of the run, fixed format YYYYMMDD-HHMMSS. End date is earliest date of the run. Example: &amp;lt;code&amp;gt;endDate = 20100211-000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;timeStep (integer)&lt;br /&gt;
: time step in hours between particles or trajectory output times. (typical values 6, 3, or 1 (hours)). Example: &amp;lt;code&amp;gt;timeStep = 6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajPoints (integer)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;trajPoints = 21&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;minTrajPoints (integer)&lt;br /&gt;
: minimum length of trajectories to be included in analysis. Parameter is only relevant for Lagranto simulations with uneven trajectory length. Example: &amp;lt;code&amp;gt;minTrajPoints = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sectorizeRegion (integer)&lt;br /&gt;
: region set used to divide moisture sources into different sectors (see [[#sectorization]]). Example: &amp;lt;code&amp;gt;sectorizeRegion = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterBoxFile (string)&lt;br /&gt;
: path to the text file describing geographic boxes used to filter air parcels during transport (see [[#box filters]]). Example: &amp;lt;code&amp;gt;filterBoxFile = /home/hso039/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterIndex (integer)&lt;br /&gt;
: used line from the filterBoxFile to select/deselect trajectories. Example: &amp;lt;code&amp;gt;filterIndex = -1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;orographyFile (string)&lt;br /&gt;
: path to the orography file used to select arrival based on underying topography, using the ETOPO2 topography. File in netcdf format. Example: &amp;lt;code&amp;gt;orographyFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/etopo5.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;lsmFile (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;lsmFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maskFile (string)&lt;br /&gt;
: path to file with an arrival selection. Example: &amp;lt;code&amp;gt;maskFile = &amp;quot; &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;useMask (boolean)&lt;br /&gt;
: use mask file (0=no, 1=yes). Example: &amp;lt;code&amp;gt;useMask = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;ompThreads (integer)&lt;br /&gt;
: number of threads to be used with OpenMP parallelisation if compiled with flag -fopenmp (1=no parallelisation, &amp;gt;1 parallelisation activated.). Example: &amp;lt;code&amp;gt;ompThreads = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;showStats (boolean)&lt;br /&gt;
: print statistics about particle processing to the command line (0=off, 1=on). Example: &amp;lt;code&amp;gt;showStats = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Grids====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category specify the different output grids and the gridding method&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLon (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLon (float)&lt;br /&gt;
: maximum longitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalgridmaxlon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMaxLat = 90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDx (float)&lt;br /&gt;
: longitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDy (float)&lt;br /&gt;
: latitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridRadius (float)&lt;br /&gt;
: gridding radius for information from arriving trajectories. Example: &amp;lt;code&amp;gt;arrivalGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLon (float)&lt;br /&gt;
: minimum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLon (float)&lt;br /&gt;
: maximum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLat (float)&lt;br /&gt;
: minimum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLat (float)&lt;br /&gt;
: maximum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLat = 90&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;sourceGridDx (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridDy (float)&lt;br /&gt;
: latitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridRadius (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;griddingType (integer)&lt;br /&gt;
: select [[#gridding algorithm]] (1: fast and simple gridding, 2: improved but slower gridding). Example: &amp;lt;code&amp;gt;griddingType = 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Diagnostics====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category control the way how the diagnostic works, and which trajectories should be considered in the run.&lt;br /&gt;
&lt;br /&gt;
;uptakeThreshold (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;uptakeThreshold = 0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipThreshold (float)&lt;br /&gt;
: 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 precipThreshold is specified as percent decrease relative to the current specific humidity of an air parcel. Then the value is negative. Default absolute values are -0.1 to -0.2 for 3h and 6h time steps. Example: &amp;lt;code&amp;gt;precipThreshold = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;relativeThreshold (boolean)&lt;br /&gt;
: determines whether absolute threshold values or relative threshold values are specified (0: absolute, 1: relative threshold values). Example: &amp;lt;code&amp;gt;relativeThreshold = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease larger than the value given by &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt; to the same number. Example: &amp;lt;code&amp;gt;arrivalPrecipMin = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease of up to the value given by &amp;lt;code&amp;gt;arrivalprecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;relativeThresholds&amp;lt;/code&amp;gt; is set to false, or a value of 1.0 otherwise. The combination of the &amp;lt;code&amp;gt;arrivalPrecipMin/Max&amp;lt;/code&amp;gt; parameters allows to focus on heavy and weak precipitation events only. Example: &amp;lt;code&amp;gt;arrivalPrecipMax = -100.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is larger than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt;. 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. Example: &amp;lt;code&amp;gt;arrivalRHMin = 80&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is less than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt;. Units are %. This parameter in combination with &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; can be used to focus on condensation/no condensation cases when the parameter &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is set to true. Example: &amp;lt;code&amp;gt;arrivalRHMax = 110&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMin (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalOroMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the ETOPO2 topography does not exceed the given value (in m). In combination with . Example: &amp;lt;code&amp;gt;arrivalOroMin&amp;lt;/code&amp;gt;, regions with a complex shape but common elevation can be selected easily. Example: &amp;lt;code&amp;gt;arrivalOroMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMin (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are above at the given altitude (in m above sea level). Example: &amp;lt;code&amp;gt;arrivalAltMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are below the given altitude (in m above sea level). The parameters &amp;lt;code&amp;gt;arrivalAltMin/Max&amp;lt;/code&amp;gt; can be used to conduct vertically stratified analyses.Example: &amp;lt;code&amp;gt;arrivalAltMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;blhScale (float)&lt;br /&gt;
: 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 &#039;moisture sources boundary-layer&#039;, all others to the category &#039;moisture sources free troposphere&#039;. Default value is 1.5. Example: &amp;lt;code&amp;gt;blhScale = 1.5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;analyzeVapour (boolean)&lt;br /&gt;
: Parameter allowing to analyze vapour origin instead of precipitation origin. Setting this parameter to true considers all air parcels during arrival, not just the ones that precipitate according to the precipitation threshold. If set to true, the &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalRHMin/Max&amp;lt;/code&amp;gt; parameters also need modification. Typically, one will set the &amp;lt;code&amp;gt;precipitation threshold&amp;lt;/code&amp;gt; to a small or even positive number, and the &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; to 0 and &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt; to 110 to include all arriving trajectories. It is often preferrable then to set the &amp;lt;code&amp;gt;arrivalAltMax&amp;lt;/code&amp;gt; to values of around 1000m for surface station measurements, for example. If &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is 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. Example: &amp;lt;code&amp;gt;analyzeVapour = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;assignToUptake (boolean)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;assignToUptake = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;forwardProjectionMode (integer)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;forwardProjectionMode = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Output====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category determine which output files should be created.&lt;br /&gt;
&lt;br /&gt;
;stepFile (boolean)&lt;br /&gt;
: write parameters on [[#Grid files]] and [[#Series files]] for each time step. Example: &amp;lt;code&amp;gt;stepFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;dayFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each day. Example: &amp;lt;code&amp;gt;dayFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;monthFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each month. Example: &amp;lt;code&amp;gt;monthFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;yearFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each year. Example: &amp;lt;code&amp;gt;yearFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;allFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for all time steps. Example: &amp;lt;code&amp;gt;allFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;staticFields (boolean)&lt;br /&gt;
: write static fields (land-sea mask and topography) onto grid files. Example: &amp;lt;code&amp;gt;staticFields = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveTraj (integer)&lt;br /&gt;
: write particle trajectories to [[#Trajectory files]] at each time step (1) or each month (2). Option 0 disables trajectory output. Example: &amp;lt;code&amp;gt;saveTraj = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;skipTraj (boolean)&lt;br /&gt;
: write every nth trajectory to reduce traj file size (1:disabled, &amp;gt;=2: stride size). Example: &amp;lt;code&amp;gt;skipTraj = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveHistogram (boolean)&lt;br /&gt;
: write histogram for selected parameters to a [[#Histogram files]] (0: disabled, 1:enabled). Example: &amp;lt;code&amp;gt;saveHistogram = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveMean (boolean)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;saveMean = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Variables====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category allow to include or exclude specific variables from the output files. Setting the output for unused variables to 0 (disabled) will speed up computation time, reduce the memory footprint, and reduce the output file size. Only parameters that are really required from a run should therefore selected as enabled.&lt;br /&gt;
&lt;br /&gt;
;sourcesBoundaryLayer (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the boundary layer to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesBoundaryLayer = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourcesFreeTroposphere (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the free troposphere to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesFreeTroposphere = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;evaporationMinusPrecipitation (boolean)&lt;br /&gt;
: write unweighted evaporation minus precipitation along entire trajectory length to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;evaporationMinusPrecipitation = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;moistureTransport (boolean)&lt;br /&gt;
: write weighted moisture transport along trajectories to grid and series output files (0: disabled, 1: enabled). Units are mm. Example: &amp;lt;code&amp;gt;moistureTransport = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajectoryLocations (boolean)&lt;br /&gt;
: write trajectory locations to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Example: &amp;lt;code&amp;gt;trajectoryLocations = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipitationEstimate (boolean)&lt;br /&gt;
: write precipitation estimate at arrival to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;precipitationEstimate = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLongitude (boolean)&lt;br /&gt;
: write weighted moisture source longitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees longitude. Example: &amp;lt;code&amp;gt;sourceLongitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLatitude (boolean)&lt;br /&gt;
: write moisture source latitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees latitude. Example: &amp;lt;code&amp;gt;sourceLatitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionCount (boolean)&lt;br /&gt;
: write convection count projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Convection count can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionCount is not on the ERA-Interim climatology run. The counter is increased each time the particles passes the convection scheme upwards. Example: &amp;lt;code&amp;gt;convectionCount = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionHeight (boolean)&lt;br /&gt;
: write convection height projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Convection height can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionHeight is not on the ERA-Interim climatology run. The value gives an average height of vertical displacement when the particles passes the convection scheme. Example: &amp;lt;code&amp;gt;convectionHeight = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;landFraction (boolean)&lt;br /&gt;
: write fraction of moisture sources over land projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;landFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;boundaryLayerFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;boundaryLayerFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;freeTroposphereFraction (boolean)&lt;br /&gt;
: write accounted fraction of free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;freeTroposphereFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;combinedFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer and free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). This is the sum of the two previous variables. Example: &amp;lt;code&amp;gt;combinedFraction = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTime (boolean)&lt;br /&gt;
: write moisture transport time projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are hours. Example: &amp;lt;code&amp;gt;transportTime = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSpecificHumidity (boolean)&lt;br /&gt;
: write surface specific humidity at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are g per kg. Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSpecificHumidity = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportDistance (boolean)&lt;br /&gt;
: write transport distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Transport distance is the length of the actual travel path along the trajectories from moisture source to the arrival region. Example: &amp;lt;code&amp;gt;transportDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDistance (boolean)&lt;br /&gt;
: write source distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Source distance is the shortest distance between the moisture source and the arrival region. Example: &amp;lt;code&amp;gt;sourceDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;source2mTemperature (boolean)&lt;br /&gt;
: write 2m temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;source2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDeuteriumExcess (boolean)&lt;br /&gt;
: write deuterium excess projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are permil. Deuterium excess is calculated from the relative humidity with respect to SST and the relationship from Pfahl and Sodemann (2014). Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceDeuteriumExcess = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperature during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;transportTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportPressure (boolean)&lt;br /&gt;
: write moisture-weighted pressure during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;transportPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;condensationTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperatures where RH&amp;lt;sub&amp;gt;liquid&amp;lt;/sub&amp;gt; exceeds 80% to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;condensationTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalTemperature (boolean)&lt;br /&gt;
: write temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;arrivalTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPressure (boolean)&lt;br /&gt;
: write pressure during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;arrivalPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrival2mTemperature (boolean)&lt;br /&gt;
: write temperature at 2m during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that 2m temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrival2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrivalSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Flexpart====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
;inputFormat (integer)&lt;br /&gt;
: 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/NorESM data short format, 4: global reanalysis data long format, 5 regional reanalysis/NorESM data short format. Example: &amp;lt;code&amp;gt;inputFormat = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maxPart (integer)&lt;br /&gt;
: number of particles contained in a single FLEXPART partposit or shortposit file. Example: &amp;lt;code&amp;gt;maxPart = 5000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partMass (float)&lt;br /&gt;
: atmospheric mass represented by each particle in kilogramms. Parameter is written out by specific version of FLEXPART to create WaterSip output data. Example: &amp;lt;code&amp;gt;partMass = 1.01943e+12&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partStride (integer)&lt;br /&gt;
: number of particles to skip during processing to speed up calculations (1: use every particle, &amp;gt;=2: use every 2nd particle, etc). Example: &amp;lt;code&amp;gt;partStride = 10&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;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). Example: &amp;lt;code&amp;gt;allowReenter = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Lagranto====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Full example for a FLEXPART run input file:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Case]&lt;br /&gt;
caseName = global_201002_final_relativex&lt;br /&gt;
inputDir = /home/data/flexpart/global/shortposit_%s&lt;br /&gt;
outputDir=/home/data/watersip/global_201002_V3/&lt;br /&gt;
startDate = 20100228-180000&lt;br /&gt;
endDate = 20100211-000000&lt;br /&gt;
timeStep = 6&lt;br /&gt;
sectorizeRegion = 0&lt;br /&gt;
filterBoxFile = /home/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&lt;br /&gt;
filterIndex = -1&lt;br /&gt;
orographyFile = &amp;quot;/home/projects/WaterSip_tool/etopo5.nc&amp;quot;&lt;br /&gt;
lsmFile = &amp;quot;/home/projects/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&lt;br /&gt;
maskFile = &amp;quot; &amp;quot;&lt;br /&gt;
useMask = 0&lt;br /&gt;
trajPoints = 41&lt;br /&gt;
minTrajPoints = 0&lt;br /&gt;
ompThreads = 1&lt;br /&gt;
showStats = 0&lt;br /&gt;
&lt;br /&gt;
[Grids]&lt;br /&gt;
arrivalGridMinLon = -180&lt;br /&gt;
arrivalGridMaxLon = 180&lt;br /&gt;
arrivalGridMinLat = -90&lt;br /&gt;
arrivalGridMaxLat = 90&lt;br /&gt;
arrivalGridDx = 1&lt;br /&gt;
arrivalGridDy = 1&lt;br /&gt;
arrivalGridRadius = 200&lt;br /&gt;
sourceGridMinLon = -180&lt;br /&gt;
sourceGridMaxLon = 180&lt;br /&gt;
sourceGridMinLat = -90&lt;br /&gt;
sourceGridMaxLat = 90&lt;br /&gt;
sourceGridDx = 1&lt;br /&gt;
sourceGridDy = 1&lt;br /&gt;
sourceGridRadius = 200&lt;br /&gt;
griddingType = 2&lt;br /&gt;
&lt;br /&gt;
[Diagnostics]&lt;br /&gt;
uptakeThreshold = 0.05&lt;br /&gt;
precipThreshold = 0.05&lt;br /&gt;
blhScale = 1.5&lt;br /&gt;
arrivalPrecipMin = 0.05&lt;br /&gt;
arrivalPrecipMax = 1.0&lt;br /&gt;
arrivalRHMin = 80&lt;br /&gt;
arrivalRHMax = 110&lt;br /&gt;
arrivalOroMin = -100&lt;br /&gt;
arrivalOroMax = 12000&lt;br /&gt;
arrivalAltMin = -100&lt;br /&gt;
arrivalAltMax = 12000&lt;br /&gt;
analyzeVapour = 0&lt;br /&gt;
assignToUptake = 0&lt;br /&gt;
forwardProjectionMode = 3&lt;br /&gt;
relativeThreshold = 1&lt;br /&gt;
&lt;br /&gt;
[Output]&lt;br /&gt;
stepFile = 1&lt;br /&gt;
dayFile = 1&lt;br /&gt;
monthFile = 1&lt;br /&gt;
yearFile = 1&lt;br /&gt;
allFile = 1&lt;br /&gt;
staticFields = 1&lt;br /&gt;
saveTraj = 0&lt;br /&gt;
skipTraj = 0&lt;br /&gt;
saveHistogram = 0&lt;br /&gt;
saveMean = 0&lt;br /&gt;
&lt;br /&gt;
[Variables]&lt;br /&gt;
sourcesBoundaryLayer = 1&lt;br /&gt;
sourcesFreeTroposphere = 1&lt;br /&gt;
evaporationMinusPrecipitation = 1&lt;br /&gt;
moistureTransport = 1&lt;br /&gt;
trajectoryLocations = 1&lt;br /&gt;
precipitationEstimate = 1&lt;br /&gt;
sourceLongitude = 1&lt;br /&gt;
sourceLatitude = 1&lt;br /&gt;
convectionCount = 0&lt;br /&gt;
convectionHeight = 0&lt;br /&gt;
landFraction = 1&lt;br /&gt;
boundaryLayerFraction = 1&lt;br /&gt;
freeTroposphereFraction = 1&lt;br /&gt;
combinedFraction = 0&lt;br /&gt;
transportTime = 1&lt;br /&gt;
sourceSkinTemperature = 1&lt;br /&gt;
sourceSpecificHumidity = 0&lt;br /&gt;
transportDistance = 1&lt;br /&gt;
sourceDistance = 1&lt;br /&gt;
source2mTemperature = 0&lt;br /&gt;
sourceDeuteriumExcess = 1&lt;br /&gt;
transportTemperature = 1&lt;br /&gt;
transportPressure = 1&lt;br /&gt;
condensationTemperature = 1&lt;br /&gt;
arrivalTemperature = 1&lt;br /&gt;
arrivalPressure = 1&lt;br /&gt;
arrival2mTemperature = 0&lt;br /&gt;
arrivalSkinTemperature = 1&lt;br /&gt;
&lt;br /&gt;
[Flexpart]&lt;br /&gt;
inputFormat = 3&lt;br /&gt;
maxPart = 5000000&lt;br /&gt;
partMass = 1.01943e+12&lt;br /&gt;
partStride = 10&lt;br /&gt;
allowReenter = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Output file formats===&lt;br /&gt;
&lt;br /&gt;
The results from the WaterSip diagnostic are written to a set of output files in different format. The main output files are created in netCDF with detailed metadata information, including the parameter settings of the run for automated documentation. The creation of different output files can be adapted by parameter settings in parameter set *Output* and the contained variables with settings in parameter set *Variables*. Spatial fields at different time intervals are written to so-called grid files in [[netCDF]] format, time series of averaged quantities at different time intervals are written to so-called Series files in netCDF format, histograms of selected quantities identified during the processing for each time step and each trajectory are written to Histogram files in ASCII format, and trajectories are written to Trajectory files in either the binary format traj or the Lagranto ASCII format. Earlier versions than V3 reported output in so-called Mean files in an ASCII format. That format is documented here but no longer in use in current versions of WaterSip.&lt;br /&gt;
&lt;br /&gt;
The time unit has changed in Version 3.1. Previously, the unit was set to &amp;quot;days since 0000-01-02 00:00:00&amp;quot; to allow matlab-compatible values for time that could directly be utilized with the datenum() commands. In order to confirm to netCDF-CF standards, where no calendar year 0000 exists, the time unit is now &amp;quot;days since 0001-01-01 00:00:00&amp;quot;. This provides the ability to open and visualize netCDF output files directly with tools such as ncview and panoply. To convert the time values into a matlab datenum compatible value, the following commands have to be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ncid=netcdf.open(filename,&amp;quot;noclobber&amp;quot;);&lt;br /&gt;
tim=(float)netcdf.getVar(ncid,&amp;quot;time&amp;quot;);&lt;br /&gt;
tim=tim-datenum(1,0,1);&lt;br /&gt;
datestr(tim)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table below summarizes the available output files:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Content !! Format !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| Grid files || Spatial properties of moisture sources and arrival regios || netCDF || CASE_grd_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Series files || Mean/min/max/std of regionally and globally averaged moisture source and arrival region properties || netCDF || CASE_ser_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Histogram files || Histograms of quantities identified for each timestep along each trajectory || ASCII || CASE_hst_steps&lt;br /&gt;
|-&lt;br /&gt;
| Trajectory files || Trajectories for identified precipitation events || ASCII/binary traj || CASE_DATE.traj/CASE_DATE_lsl&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Grid files====&lt;br /&gt;
&lt;br /&gt;
Grid file variables are separated into immediate source and transport variables, typically on a coarser, global grid, and arrival and forward-projected variables on the (typically finer-scale) arrival grid. The grid settings are determined by the corresponding parameters in parameter set *Grid*. All variables are of type float, and the fill value (netCDF property _FillValue) is -999.99. The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and dividing by the total precipitation (as described above).&lt;br /&gt;
&lt;br /&gt;
**Moisture source and transport properties**&lt;br /&gt;
&lt;br /&gt;
Variables related to immediate moisture source and transport properties (not forward projected) have dimension of variables time, global_latitude, global_longitude, as defined by input file parameters *sourceGridMinLon,sourceGridMaxLon, sourceGridMinLat, sourceGridMaxLat, sourceGridDx, sourceGridDy, sourceGridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer || E_s^BL || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere || E_s^FT || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation || E-P || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport || Q_t || mm ||  text &lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location || N_t || counts km^-2 || text &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Arrival properties and Lagrangian forward projections**&lt;br /&gt;
&lt;br /&gt;
The variables contained in these files have the dimensions time (days since 0001-01-01 00:00:00), latitude (degrees_north), and longitude (degrees_east) as defined by input file parameters *arrivalGridMinLon, arrivalGridMaxLon, arrivalGridMinLat, arrivalGridMaxLat, arrivalGridDx, arrivalGridDy, arrival | source | text |GridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Unit !! Property !! Description &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate || PE || mm day^-1 or mm step^-1 || arrival || precipitation at arrival location estimated from change in specific humidity during last time step &lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature || T_a || K || arrival || PE-weighted temperature at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure || p_a || hPa || arrival || PE-weighted pressure at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature || SKT_a || K || arrival || PE-weighted SKT below trajectory location during arrival &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer || f_BL || fraction || arrival || fractional contribution of BL moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere || f_FT || fraction || arrival || fractional contribution of FT moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_lifetime || \tau_t || h || transport || contribution and precipitation-weighted precipitation life time &lt;br /&gt;
|-&lt;br /&gt;
| transport_distance || \Delta_t || km || transport || contribution and precipitation-weighted transport distance along trajectory &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature || T_t || K || transport || contribution and precipitation-weighted temperature during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure || p_t || hPa || transport || contribution and precipitation-weighted pressure during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature || T_c || K || transport || contribution and precipitation-weighted temperature when RH&amp;gt;80% during transport &lt;br /&gt;
|-&lt;br /&gt;
| source_longitude || \lambda_s || degrees_east || source || contribution and precipitation-weighted latitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_latitude || \phi_s || degrees_north || source || contribution and precipitation-weighted longitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| land_fraction || f_l || fraction || source || contribution and precipitation-weighted fraction of moisture sources over land &lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature || SKT_s || K || source || contribution and precipitation-weighted SKT at the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_distance || \Delta_s || km || source || contribution and precipitation-weighted direct distance between the moisture source and arrival location &lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess || d_s || permil || source || contribution and precipitation-weighted estimate of deuterium excess at the source from RH and T using the Pfahl and Sodemann (2013) relation &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Global attributes**&lt;br /&gt;
&lt;br /&gt;
The netCDF grid files contain a range of essential parameters as global attributes. These parameters allow to fully characterise the result of the WaterSip run as required for the interpretation of the results. A number of run parameters are omitted, that concern logistical settings, or that are self-evident from the content of the the output files. The table below gives an example for a WaterSip run:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Example !! Type &lt;br /&gt;
|-&lt;br /&gt;
| startDate || &amp;quot;2010-02-28 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| endingDate || &amp;quot;2010-01-11 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| analysisRegion || &amp;quot;NEEM&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| maxPart || 5000001  || int&lt;br /&gt;
|-&lt;br /&gt;
| caseName || &amp;quot;global_201002_V3_stride&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| trajPoints || 61  || int&lt;br /&gt;
|-&lt;br /&gt;
| timeStep || 6  || in float&lt;br /&gt;
|-&lt;br /&gt;
| partMass || 2.03885996E12  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| dryLevel || 0.01  || float&lt;br /&gt;
|-&lt;br /&gt;
| blhScale || 1.5  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMin || 80.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMax || 110.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| uptakeThreshold || 0.2  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| precipThreshold || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMin || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMax || -120.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| anaVapour || 0  || int&lt;br /&gt;
|-&lt;br /&gt;
| filterIndex || -1  || int&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Series files====&lt;br /&gt;
&lt;br /&gt;
The netCDF series files contain two sets of information. The so-called sectorization output provides time series of the moisture source information seperated into relative contributions from predefined geographical areas. Furthermore, the series files contains weighted averages and further statistical properties of all quantities in the grid files. &lt;br /&gt;
&lt;br /&gt;
**Sectorisation output**&lt;br /&gt;
&lt;br /&gt;
A set of sectorisations is chosen by the parameter *sectorizeRegion*. The currently available options are listed in the table below. New sectorisations can be defined by changing the code in routine &amp;lt;code&amp;gt;Sectors.cpp/Sectors.h&amp;lt;/code&amp;gt;. This requires defining a new name and new decision tree that provides a unique number for any lat/lon value between -180E to 180E and -90 to 90N. See comments in the code.&lt;br /&gt;
&lt;br /&gt;
For each of the predefined areas, the relative contributions are subdivided into land and sea covered areas. Time series of the contributions are of dimension time and sector. Thereby, the sector numbers correspond to the sector numbers defined in the program code. The area of the sectors is calculated automatically within WaterSip. As noted above for the grid files, the time unit has been changed starting from Version 3.1.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol !! Unit !! Description&lt;br /&gt;
|-&lt;br /&gt;
| time || t || days since 0001-01-01 00:00:00 || text&lt;br /&gt;
|-&lt;br /&gt;
| sector || s || sector number || text&lt;br /&gt;
|-&lt;br /&gt;
| sector_area || A_s || km^2 || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_boundary_layer || f_l^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_boundary_layer || f_s^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_free_troposphere || f_l^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_free_troposphere || f_s^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_trajectory_location || f_l^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_trajectory_location || f_s^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_transport || f_l^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_transport || f_s^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_evaporation_minus_precipitation || f_l^EP || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_evaporation_minus_precipitation | f_s^EP | percent | text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Time-series output**&lt;br /&gt;
&lt;br /&gt;
For immediate quantities, a time series of the total field sum is recorded in the series file. In order to obtain an area average, one needs to divide the sum by the surface of the earth (x km^2). The unit for moisture uptakes, E-P and precipitation estimate is mm step^-1 for step series files, and mm 24h^-1 for all other averaging series files. In addition to sums, the files contain time series of the minimum, maximum and standard deviation of the grid field at each time instance. For all forward-projected and arrival quantities, the average rather than the sum is calculated on the arrival grid locations. When averaging from step output to larger time intervals, the quantities are weighted with the corresponding PE at each grid point. &lt;br /&gt;
&lt;br /&gt;
In addition, series files contain the same set of global attributes as described in Grid files to enable interpretation without additional documentation of the run setup.&lt;br /&gt;
&lt;br /&gt;
*Immediate quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_min || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_sum || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_max || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_min || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_sum || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_max || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Arrival and forward-projected quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_min || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_avg || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_max || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_min || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_avg || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_max || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_min || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_avg || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_max || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_min || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_avg || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_max || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_avg || x  || K &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_max || x || K&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Histogram files====&lt;br /&gt;
&lt;br /&gt;
* Bounds freq (1 to n categories), (1 to m variables)&lt;br /&gt;
* Main variables time, dq, conv&lt;br /&gt;
* where to implement&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20.71   46.56   8.1351e+05  -1.0000e+00&lt;br /&gt;
21.22   45.90   1.1314e+06  -1.0000e+00&lt;br /&gt;
22.03   45.24   4.1929e+05  -1.0000e+00&lt;br /&gt;
21.19   45.35   1.0639e+06  -1.0000e+00&lt;br /&gt;
20.71   46.50   5.0963e+05  -1.0000e+00&lt;br /&gt;
21.07   47.51   2.8182e+05  -1.0000e+00&lt;br /&gt;
21.71   48.67   9.3088e+05  -1.0000e+00&lt;br /&gt;
22.14   51.47   2.3634e+05  -1.0000e+00&lt;br /&gt;
22.14   52.49   8.0048e+05  -1.0000e+00&lt;br /&gt;
22.34   53.76   7.3297e+05  -1.0000e+00&lt;br /&gt;
23.17   54.41   4.1516e+05  -1.0000e+00&lt;br /&gt;
23.56   54.54   2.7414e+05  -1.0000e+00&lt;br /&gt;
24.39   54.55   5.0017e+05  -1.0000e+00&lt;br /&gt;
26.89   54.42   2.8215e+05  -1.0000e+00&lt;br /&gt;
28.18   54.40   3.9987e+05  -1.0000e+00&lt;br /&gt;
29.80   54.25   3.6020e+05  -1.0000e+00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Trajectory files====&lt;br /&gt;
&lt;br /&gt;
**LSL format**&lt;br /&gt;
&lt;br /&gt;
* As documented elsewhere&lt;br /&gt;
* only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Traj format**&lt;br /&gt;
&lt;br /&gt;
* Binary format, only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
* reading in and plotting traj files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mean file====&lt;br /&gt;
&lt;br /&gt;
Legacy format, global_201002_V3_avg_steps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20100228_00 13795.603  0.001 7994.128  0.001 722561152.000 1977998.875   -0.081   -3.124    0.007  -0.080  -1.347   0.003   0.181   0.000   0.001   0.711   0.006   0.001   0.242   0.000   0.001 -999.990 -999.990 -999.990  -83.283 -340.404    0.153  288.231  242.846    0.050 -999.990 -999.990 -999.990   2828.54    120.41      7.50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Annotated bibliography===&lt;br /&gt;
&lt;br /&gt;
There are to date (Oct 2019) 25 publications involving the WaterSip method in one way or another. The versatility of WaterSip ranges from weather events to climatological studies, and from process understanding to paleoclimate proxy interpretation. This documentation can only provide initial guidance in applying WaterSip to new research plans. The annotated bibliography below provides an overview over the relevant studies, ordered by topic and the respective climatic zone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Topic !! Time perspective !! Climate zone !! Region !! Reference&lt;br /&gt;
|-&lt;br /&gt;
| Method description || - || High latitudes || Greenland || Sodemann et al., 2008a&lt;br /&gt;
|-&lt;br /&gt;
| Precipitation extremes || Climatology || Subtropics || Mediterranean || Winschall et al., 2014a&lt;br /&gt;
|-&lt;br /&gt;
| Method evaluation || Weather event || Subtropics || Mediterranean || Winschall et al., 2014b&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime of precipitation || Climatology || Global || Global || Läderach and Sodemann, 2016&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || High latitudes || Greenland || Sodemann et al., 2008b&lt;br /&gt;
|-&lt;br /&gt;
| Climate characteristics || Climatology || Mid latitudes || Europe || Sodemann and Zubler, 2010&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Tropics || Belize || Kenneth et al., &lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Mid latitudes || China || Baker et al., Luetscher et al. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
* Thurnherr, I., Kozachek, A., Graf, P., Weng, Y., Bolshiyanov, D., Landwehr, S., Pfahl, S., Schmale, J., Sodemann, H., Steen-Larsen, H. C., Toffoli, A., Wernli, H., and Aemisegger, F., 2019: Meridional and vertical variations of the water vapour isotopic composition in the marine boundary layer over the Atlantic and Southern Ocean, Atmos. Chem. Phys. Discuss., doi: 10.5194/acp-2019-782.&lt;br /&gt;
* Fremme, A. and Sodemann, H., 2019: The role of land and ocean evaporation on the variability of precipitation in the Yangtze River valley, Hydrol. Earth Syst. Sci., 23, 2525–2540, doi: 10.5194/hess-23-2525-2019. &lt;br /&gt;
* Huang, R, Zhu, H, Liang, E., Grießinger, J, Wernicke, J., Yu, W., Hochreuther, P., Risi, C., Zeng, Y., Fremme, A., Sodemann, H., Bräuning, A., 2019: Temperature signals in tree-ring oxygen isotope series from the northern slope of the Himalaya, EPSL 506: 455-465. &lt;br /&gt;
* Buizert, Christo; Sigl, Michael; Severi, Mirko; Markle, Bradley; Wettstein, Justin; McConnell, J; Pedro, Joel; Sodemann, H.; Goto-Azuma, Kumiko; Kawamura, Kenji; Fujita, Shuji; Motoyama, Hideaki; Hirabayashi, Motohiro; Uemura, Ryu; Stenni, Barbara; Parrenin, Frederic; He, Feng; Fudge, T.J.; Steig, Eric J., 2018: Abrupt ice-age shifts in southern westerly winds and Antarctic climate forced from the north, Nature 563: 681-685.&lt;br /&gt;
* Bohlinger, P., Sorteberg, A., Liu, C., Rasmussen, R., Sodemann, H., Ogawa, F., 2018: Multiscale characteristics of an extreme precipitation event over Nepal. QJRMS:1-18, doi:10.1002/qj.3418. &lt;br /&gt;
* Bohlinger, P., Sorteberg, A., and Sodemann, H., 2017: Synoptic conditions and moisture sources actuating extreme precipitation in Nepal. Journal of Geophysical Research: Atmospheres, 122, 12,653–12,671. https://doi.org/10.1002/2017JD027543.&lt;br /&gt;
* Blazina, T., A. Läderach, G. D. Jones, H. Sodemann, H. Wernli, J. W. Kirchner and L. H. E. Winkel, 2016: Marine primary productivity as a potential source of selenium and other trace elements in atmospheric deposition, Environ. Sci. Technol. 2017, 51, 108−118, doi: 10.1021/acs.est.6b03063.&lt;br /&gt;
* Läderach, A. andSodemann, H., 2016: A revised picture of the atmospheric moisture residence time, Geophys. Res. Lett., 43, doi:10.1002/2015GL067449.&lt;br /&gt;
* Baker, A., Sodemann, H., Baldini, J. U. L., Breitenbach, S. F. M., Johnson, K. R., van Hunen, J., and Pingzhong, Z., 2015: Seasonality of westerly moisture transport in the East Asian Summer Monsoon and its implications for interpreting precipitation d18O, J. Geophys. Res., 120,  doi:10.1002/2014JD022919.&lt;br /&gt;
* Steen-Larsen, H. C., Sveinbjörnsdottir, A. E., Jonsson, T., Ritter, F., Bonne, J.-L., Masson-Delmotte, V., Sodemann, H., Blunier, T., Dahl-Jensen, D., Vinther, B. M., 2015: Moisture sources and synoptic to seasonal variability of North Atlantic water vapor isotopic composition, J. Geophys. Res., 120, 5757–5774, doi:10.1002/ 2015JD023234.&lt;br /&gt;
* Bonne, J.-L., Steen-Larsen, H. C., Risi, C., Werner, M., Sodemann, H., Lacour, J.-L., Fettweis, X., Cesana, G., Delmotte, M., Cattani, O., Vallelonga, P., Kjær, H. A., Clerbaux, C., Sveinbjörnsdóttir, A. E., and Masson-Delmotte, V., 2015: The summer 2012 Greenland heat wave: In situ and remote sensing observations of water vapor isotopic composition during an atmospheric river event, J. Geophys. Res., 120, 2970-2989, doi:10.1002/2014JD022602.&lt;br /&gt;
* Luetscher, M., Boch, R., Sodemann, H., Spoetl, C., Cheng, H., Edwards, R. L., Frisia, S., Hof, F., Mueller, W., 2015: North Atlantic storm track changes during the Last Glacial Maximum recorded by Alpine speleothems, Nature Comm. 6: 6344, doi:10.1038/ncomms7344.&lt;br /&gt;
* Winschall, A., Sodemann, H.,Pfahl, S. and Wernli, H., 2014: How important is intensified evaporation for Mediterranean precipitation extremes?, J. Geophys. Res., 119: 5240–5256, doi:10.1002/2013JD021175&lt;br /&gt;
* Winschall, A., Pfahl, S., Sodemann, H.and Wernli, H.. 2014. Comparison of Eulerian and Lagrangian moisture source diagnostics - the flood event in eastern Europe in May 2010, Atmos. Chem. Phys. 14: 6605–6619, doi:10.5194/acp-14-6605-2014.&lt;br /&gt;
* Aemisegger, F., Pfahl, S., Sodemann, H., Lehner, I., Seneviratne, S. I., and Wernli, H., 2014: Deuterium excess as a proxy for continental moisture recycling and plant transpiration, Atmos. Chem. Phys., 14: 4029–4054, doi:10.5194/acp-14-4029-2014.&lt;br /&gt;
* Bonne, J. L., Masson-Delmotte, V., Cattani, O., Delmotte, M., Risi, C., Sodemann, H., and Steen-Larsen, H. C., 2014:The isotopic composition of water vapour and precipitation in Ivittuut, southern Greenland, Atmos. Chem. Phys. 14: 4419–4439, doi:10.5194/acp-14-4419-2014.&lt;br /&gt;
* Wang, Y., Sodemann, H., Hou, S., Masson-Delmotte, V. Jouzel, J. and Pang, H., 2013: Snow accumulation and its moisture origin over Dome Argus, Antarctica. Clim. Dyn., 40:731-742, doi: 10.1007/s00382-012-1398-9.&lt;br /&gt;
* Martius, O., Sodemann, H., Joos, H., Pfahl, S., Winschall, A., Croci-Maspoli, M., Graf, M., Madonna, E., Mueller, B., Schemm, S., Sedlacek, J., Sprenger, M. and Wernli, H., 2012: The role of upper-level dynamics and surface processes for the Pakistan flood in July 2010. Quart. J. Royal Meteorol. Soc., published online, doi: 10.1002/qj.2082.&lt;br /&gt;
* Kennett, D. J., Breitenbach, S. F. M., Aquino, V. V., Asmerom, Y., Awe, J., Baldini, J. U. L., Bartlein, P., Culleton, B. J., Ebert, C., Jazwa, C., Macri, M. J., Marwan, N., Polyak, V., Prufer, K. M., Ridley, H. E., Sodemann, H., Winterhalder, B. and Haug, G. H., 2012: Development and Disintegration of Maya Political Systems in Response to Climate Change. Science, 338: 788-791, doi: 10.1126/science.1226299.&lt;br /&gt;
* Winkler, R., Landais, A., Sodemann, H., Dümbgen, L., Priéa, F., Masson-Delmotte, V., Stenni, B., and Jouzel, J., 2012: Deglaciation records of 17O-excess in East Antarctica: reliable reconstruction of oceanic relative humidity from coastal sites. Clim. Past 8, 1-16.&lt;br /&gt;
* Masson-Delmotte, V., Buiron, D., Ekaykin, A., Frezzotti, M., Gallée, H., Jouzel, J., Krinner, G., Landais, A., Motoyama, A., Oerter, H., Pol, K., Pollard, D., Ritz, C., Schlosser, E., Sime, L. C., Sodemann, H., Stenni, B., Uemura R., and Vimeux, F., 2011: A comparison of the present and last interglacial periods in six Antarctic ice cores Clim. Past, 7, 397-423. &lt;br /&gt;
* Sodemann, H.and Zubler, E., 2010: Seasonality and inter-annual variability of the moisture sources for Alpine precipitation during 1995-2002, Int. J. Climatol., 30: 947-961, doi:10.1002/joc.1932.&lt;br /&gt;
* Sodemann, H., and Stohl, A., 2009: Asymmetries in the moisture origin of Antarctic precipitation, Geophys. Res. Lett., 36, L22803, doi:10.1029/2009GL040242.&lt;br /&gt;
* Sodemann, H., Masson-Delmotte, V., Schwierz, C., Vinther, B. M. and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Part II: Effects of North Atlantic Oscillation variability on stable isotopes in precipitation, J. Geophys. Res., 113, D12111, doi:10.1029/2007JD009416.&lt;br /&gt;
* Sodemann, H., Schwierz, C., and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Lagrangian moisture diagnostic and North Atlantic Oscillation influence, J. Geophys. Res.,113, D03107, doi:10.1029/2007JD008503.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=File:Watersip_mask-guide_cut.png&amp;diff=1435</id>
		<title>File:Watersip mask-guide cut.png</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=File:Watersip_mask-guide_cut.png&amp;diff=1435"/>
		<updated>2021-01-15T08:42:58Z</updated>

		<summary type="html">&lt;p&gt;Hso039: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1434</id>
		<title>WaterSip</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1434"/>
		<updated>2021-01-15T08:41:50Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===About WaterSip===&lt;br /&gt;
&lt;br /&gt;
WaterSip is a diagnostic software tool that identifies source, transport and arrival properties of atmospheric water vapour based on airmass backward trajectories. As a prerequisite, the backward trajectories for the analysis are to be obtained from a trajectory calculation tool, such as FLEXPART [[http://www.flexpart.eu]] or Lagranto [[http://www.lagranto.iac.ethz.ch]]. Moisture sources are then identified from changes in specific humidity interpolated to the air parcel trajectory per time step. The changes in specific humidity at each time step are set in relation with the current humidity of the air parcel. This allows to estimate the quantitative contribution of moisture to the air parcel at a specific location, a so-called moisture accounting. WaterSip identifies and aggregates further properties of the moisture source and during the moisture transport, such as temperature, pressure, latitude etc. The moisture source diagnostic is described in detail in [[Sodemann et al. (2008)]]. Publications using the WaterSip diagnostic are listed in section [[Bibliography]].&lt;br /&gt;
&lt;br /&gt;
===Working principle===&lt;br /&gt;
&lt;br /&gt;
Explanation from Sodemann et al. 2008a&lt;br /&gt;
&lt;br /&gt;
Image from Läderach and Sodemann, 2016 or Sodemann et al., 2008a&lt;br /&gt;
&lt;br /&gt;
Moisture source information&lt;br /&gt;
&lt;br /&gt;
- Accounted fraction fa, fb, fa+fb&lt;br /&gt;
- adding below and above boundary layer or not, when&lt;br /&gt;
- choosing threshold values for Arctic and other regions&lt;br /&gt;
- identifying moisture transport&lt;br /&gt;
&lt;br /&gt;
Arrival information and Lagrangian forward projections&lt;br /&gt;
&lt;br /&gt;
- arrival parameters&lt;br /&gt;
- transport parameters&lt;br /&gt;
- source parameters&lt;br /&gt;
- averaging by contribution and amount&lt;br /&gt;
&lt;br /&gt;
Series information&lt;br /&gt;
&lt;br /&gt;
- sectorization (Sodemann and Zubler, 2010; definition table, code changes)&lt;br /&gt;
- weighted averaging: The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and deviding by the total precipitation.&lt;br /&gt;
&lt;br /&gt;
Averaged properties&lt;br /&gt;
&lt;br /&gt;
- histogram example and modification (code below)&lt;br /&gt;
&lt;br /&gt;
Trajectories&lt;br /&gt;
&lt;br /&gt;
- plotting/reading example (code below)&lt;br /&gt;
&lt;br /&gt;
Uncertainties&lt;br /&gt;
&lt;br /&gt;
===Example setups===&lt;br /&gt;
&lt;br /&gt;
Three examples with different purposes&lt;br /&gt;
&lt;br /&gt;
====Water vapour====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
====Extratropical precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
 &lt;br /&gt;
====High latitude precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
===Version history===&lt;br /&gt;
&lt;br /&gt;
Version 2.1&lt;br /&gt;
&lt;br /&gt;
Version 2.2&lt;br /&gt;
&lt;br /&gt;
Version 2.3&lt;br /&gt;
&lt;br /&gt;
Version 2.4&lt;br /&gt;
&lt;br /&gt;
Version 2.5&lt;br /&gt;
&lt;br /&gt;
Version 2.8&lt;br /&gt;
&lt;br /&gt;
Version 2.8.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9&lt;br /&gt;
&lt;br /&gt;
Version 2.9.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9.2&lt;br /&gt;
&lt;br /&gt;
Version 2.9.3&lt;br /&gt;
&lt;br /&gt;
Version 2.9.4&lt;br /&gt;
&lt;br /&gt;
Version 3.0.8&lt;br /&gt;
&lt;br /&gt;
Version 3.1&lt;br /&gt;
&lt;br /&gt;
The current version of WaterSip is V3.1.0. &lt;br /&gt;
&lt;br /&gt;
===Running the WaterSip diagnostic===&lt;br /&gt;
&lt;br /&gt;
It is advised to create a link to the binary file of WaterSip in your /home/$USER/bin or project directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/bin&lt;br /&gt;
ln -s /Data/gfi/projects/isomet/progs/WaterSip_tool/WaterSip3 ~/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load netCDF-C++&lt;br /&gt;
WaterSip3 &amp;lt;WATERSIP_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the UiB hpc environment requires the above &#039;module load&#039; command to be executed first.&lt;br /&gt;
&lt;br /&gt;
On cyclone.hpc.uib.no, a run script is available that makes repeated similar runs easier to manage. Only essential parameters have to be changed, such as the target coordinates and case name. These will then be replaced on a template INPUT_WATERSIP file, and then WaterSip will be started. The script and an input file template can be copied like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/run_watersip_template_Bergen_2018.sh .&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/INPUT_WATERSIP_template_Bergen_2018 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Input file conversion from V2====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WaterSip3 -c &amp;lt;WATERSIP_V2_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a new file named &amp;lt;WATERSIP_V2_parameter_file&amp;gt;V3 at the current directory. It is recommended to double check and edit the settings in the converted file before starting a simulation.&lt;br /&gt;
&lt;br /&gt;
====Parallelization====&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
If WaterSip3 is to be executed on a queue system (not applicable to cyclone.hpc.uib.no), the following wrapper script can be used to start a run using 4 cores for parallel processing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# start with sbatch NAME_OF_THIS_FILE directly on machine&lt;br /&gt;
&lt;br /&gt;
#SBATCH --job-name=WaterSip3&lt;br /&gt;
#SBATCH --workdir=/tmp/&lt;br /&gt;
#SBATCH --partition=priority&lt;br /&gt;
#SBATCH --output=WaterSip_job.%j.out&lt;br /&gt;
#SBATCH --error=WaterSip_job.%j.err&lt;br /&gt;
#SBATCH --mail-type=END&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --cpus-per-task=4&lt;br /&gt;
&lt;br /&gt;
srun ./WaterSip3 INPUT_WATERSIP_global_1993&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating mask files====&lt;br /&gt;
&lt;br /&gt;
WaterSip allows to define target regions not only by coordinates, but also by mask files. This is a short introduction to creating a mask for use with WaterSip.&lt;br /&gt;
&lt;br /&gt;
The procedure described here  uses python to create the netcdf file with the mask, and CDO to change the netcdf file format such that it can be read in by watersip.&lt;br /&gt;
&lt;br /&gt;
Required python packages [tested version]: numpy [1.19.1], shapely [1.6.4.post1], netCDF4 [1.5.3] and if loading from a csv, pandas [1.1.3]&lt;br /&gt;
&lt;br /&gt;
Optional packages (for plotting): matplotlib [3.3.1], cartopy [0.16.0]&lt;br /&gt;
&lt;br /&gt;
[[File:watersip_mask-guide.png|300px]]&lt;br /&gt;
Figure: Example for Scandinavia&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Basic principle:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using shapely’s .contains and .touches methods on a polygon with a point in vectorized version (taking a list of points instead of just one point for speed). &lt;br /&gt;
This enables more interactive editing on a grid spacing of 0.25x0.25 degree (1M grid points).&lt;br /&gt;
After calculation, the script performs a boolean OR operation on the two masks to get the combined of inner and edge points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mask_inner=shapely.vectorized.contains(geom, x, y) # - for interior points&lt;br /&gt;
mask_edge=shapely.vectorized.touches(geom, x, y) #- for edge points&lt;br /&gt;
mask_full=mask_inner|mask_edge # | is boolean OR bitwise (elementwise) operator.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
list of coordinates of pairs of lat, lon defining the nodes of the polygon mask.&lt;br /&gt;
&lt;br /&gt;
global meshgrid with a given resolution&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Output:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Boolean mask of False and True in the shape of the meshgrid lat-lon&lt;br /&gt;
&lt;br /&gt;
After using python script, convert to a netCDF format readable by WaterSip by using the command below in a terminal where you newly created mask file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cdo -f nc2 copy mask-from-python.nc mask-to-watersip.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For reference, and instructions on how to load political, and other, geometries straight from NaturalEarth dataset, go to&lt;br /&gt;
[[https://gist.github.com/pelson/9785576]]&lt;br /&gt;
&lt;br /&gt;
[[MaskCode|Python program code available here|]]&lt;br /&gt;
&lt;br /&gt;
=== Input file options ===&lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;code&amp;gt;[Case]&amp;lt;/code&amp;gt;). There are 7 option groups which can appear in random order in the input file:&lt;br /&gt;
&lt;br /&gt;
*Case: general settings related to the case to be extracted&lt;br /&gt;
*Grids: specification of different output grids&lt;br /&gt;
*Diagnostrics: parameters of the moisture diagnostic&lt;br /&gt;
*Output: general output settings&lt;br /&gt;
*Variables: selection of output variables&lt;br /&gt;
*Flexpart: options specific to runs using FLEXPART particle output&lt;br /&gt;
*Lagranto: options specific to runs using Lagranto trajectories&lt;br /&gt;
&lt;br /&gt;
====Parameter set Case====&lt;br /&gt;
&lt;br /&gt;
The settings in this parameter category describe the basic conditions of the diagnostic run.&lt;br /&gt;
&lt;br /&gt;
;caseName (string)&lt;br /&gt;
: identifier for the run, prepended to all output files. Example: &amp;lt;code&amp;gt;caseName = global_201002_relative&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;inputDir (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;inputDir = /Volumes/Data/global/shortposit_%s&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;outputDir (string)&lt;br /&gt;
: path where the output files will be created. Example: &amp;lt;code&amp;gt;outputDir = /Volumes/Data/global/output/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;startDate (date string)&lt;br /&gt;
: inital date of the run, fixed format YYYYMMDD-HHMMSS. Start date is latest date of the run which moves backward in time. Example: &amp;lt;code&amp;gt;startDate = 20100228-180000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;endDate (date string)&lt;br /&gt;
: final date of the run, fixed format YYYYMMDD-HHMMSS. End date is earliest date of the run. Example: &amp;lt;code&amp;gt;endDate = 20100211-000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;timeStep (integer)&lt;br /&gt;
: time step in hours between particles or trajectory output times. (typical values 6, 3, or 1 (hours)). Example: &amp;lt;code&amp;gt;timeStep = 6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajPoints (integer)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;trajPoints = 21&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;minTrajPoints (integer)&lt;br /&gt;
: minimum length of trajectories to be included in analysis. Parameter is only relevant for Lagranto simulations with uneven trajectory length. Example: &amp;lt;code&amp;gt;minTrajPoints = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sectorizeRegion (integer)&lt;br /&gt;
: region set used to divide moisture sources into different sectors (see [[#sectorization]]). Example: &amp;lt;code&amp;gt;sectorizeRegion = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterBoxFile (string)&lt;br /&gt;
: path to the text file describing geographic boxes used to filter air parcels during transport (see [[#box filters]]). Example: &amp;lt;code&amp;gt;filterBoxFile = /home/hso039/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterIndex (integer)&lt;br /&gt;
: used line from the filterBoxFile to select/deselect trajectories. Example: &amp;lt;code&amp;gt;filterIndex = -1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;orographyFile (string)&lt;br /&gt;
: path to the orography file used to select arrival based on underying topography, using the ETOPO2 topography. File in netcdf format. Example: &amp;lt;code&amp;gt;orographyFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/etopo5.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;lsmFile (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;lsmFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maskFile (string)&lt;br /&gt;
: path to file with an arrival selection. Example: &amp;lt;code&amp;gt;maskFile = &amp;quot; &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;useMask (boolean)&lt;br /&gt;
: use mask file (0=no, 1=yes). Example: &amp;lt;code&amp;gt;useMask = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;ompThreads (integer)&lt;br /&gt;
: number of threads to be used with OpenMP parallelisation if compiled with flag -fopenmp (1=no parallelisation, &amp;gt;1 parallelisation activated.). Example: &amp;lt;code&amp;gt;ompThreads = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;showStats (boolean)&lt;br /&gt;
: print statistics about particle processing to the command line (0=off, 1=on). Example: &amp;lt;code&amp;gt;showStats = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Grids====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category specify the different output grids and the gridding method&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLon (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLon (float)&lt;br /&gt;
: maximum longitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalgridmaxlon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMaxLat = 90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDx (float)&lt;br /&gt;
: longitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDy (float)&lt;br /&gt;
: latitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridRadius (float)&lt;br /&gt;
: gridding radius for information from arriving trajectories. Example: &amp;lt;code&amp;gt;arrivalGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLon (float)&lt;br /&gt;
: minimum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLon (float)&lt;br /&gt;
: maximum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLat (float)&lt;br /&gt;
: minimum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLat (float)&lt;br /&gt;
: maximum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLat = 90&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;sourceGridDx (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridDy (float)&lt;br /&gt;
: latitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridRadius (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;griddingType (integer)&lt;br /&gt;
: select [[#gridding algorithm]] (1: fast and simple gridding, 2: improved but slower gridding). Example: &amp;lt;code&amp;gt;griddingType = 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Diagnostics====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category control the way how the diagnostic works, and which trajectories should be considered in the run.&lt;br /&gt;
&lt;br /&gt;
;uptakeThreshold (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;uptakeThreshold = 0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipThreshold (float)&lt;br /&gt;
: 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 precipThreshold is specified as percent decrease relative to the current specific humidity of an air parcel. Then the value is negative. Default absolute values are -0.1 to -0.2 for 3h and 6h time steps. Example: &amp;lt;code&amp;gt;precipThreshold = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;relativeThreshold (boolean)&lt;br /&gt;
: determines whether absolute threshold values or relative threshold values are specified (0: absolute, 1: relative threshold values). Example: &amp;lt;code&amp;gt;relativeThreshold = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease larger than the value given by &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt; to the same number. Example: &amp;lt;code&amp;gt;arrivalPrecipMin = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease of up to the value given by &amp;lt;code&amp;gt;arrivalprecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;relativeThresholds&amp;lt;/code&amp;gt; is set to false, or a value of 1.0 otherwise. The combination of the &amp;lt;code&amp;gt;arrivalPrecipMin/Max&amp;lt;/code&amp;gt; parameters allows to focus on heavy and weak precipitation events only. Example: &amp;lt;code&amp;gt;arrivalPrecipMax = -100.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is larger than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt;. 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. Example: &amp;lt;code&amp;gt;arrivalRHMin = 80&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is less than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt;. Units are %. This parameter in combination with &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; can be used to focus on condensation/no condensation cases when the parameter &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is set to true. Example: &amp;lt;code&amp;gt;arrivalRHMax = 110&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMin (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalOroMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the ETOPO2 topography does not exceed the given value (in m). In combination with . Example: &amp;lt;code&amp;gt;arrivalOroMin&amp;lt;/code&amp;gt;, regions with a complex shape but common elevation can be selected easily. Example: &amp;lt;code&amp;gt;arrivalOroMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMin (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are above at the given altitude (in m above sea level). Example: &amp;lt;code&amp;gt;arrivalAltMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are below the given altitude (in m above sea level). The parameters &amp;lt;code&amp;gt;arrivalAltMin/Max&amp;lt;/code&amp;gt; can be used to conduct vertically stratified analyses.Example: &amp;lt;code&amp;gt;arrivalAltMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;blhScale (float)&lt;br /&gt;
: 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 &#039;moisture sources boundary-layer&#039;, all others to the category &#039;moisture sources free troposphere&#039;. Default value is 1.5. Example: &amp;lt;code&amp;gt;blhScale = 1.5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;analyzeVapour (boolean)&lt;br /&gt;
: Parameter allowing to analyze vapour origin instead of precipitation origin. Setting this parameter to true considers all air parcels during arrival, not just the ones that precipitate according to the precipitation threshold. If set to true, the &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalRHMin/Max&amp;lt;/code&amp;gt; parameters also need modification. Typically, one will set the &amp;lt;code&amp;gt;precipitation threshold&amp;lt;/code&amp;gt; to a small or even positive number, and the &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; to 0 and &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt; to 110 to include all arriving trajectories. It is often preferrable then to set the &amp;lt;code&amp;gt;arrivalAltMax&amp;lt;/code&amp;gt; to values of around 1000m for surface station measurements, for example. If &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is 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. Example: &amp;lt;code&amp;gt;analyzeVapour = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;assignToUptake (boolean)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;assignToUptake = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;forwardProjectionMode (integer)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;forwardProjectionMode = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Output====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category determine which output files should be created.&lt;br /&gt;
&lt;br /&gt;
;stepFile (boolean)&lt;br /&gt;
: write parameters on [[#Grid files]] and [[#Series files]] for each time step. Example: &amp;lt;code&amp;gt;stepFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;dayFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each day. Example: &amp;lt;code&amp;gt;dayFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;monthFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each month. Example: &amp;lt;code&amp;gt;monthFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;yearFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each year. Example: &amp;lt;code&amp;gt;yearFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;allFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for all time steps. Example: &amp;lt;code&amp;gt;allFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;staticFields (boolean)&lt;br /&gt;
: write static fields (land-sea mask and topography) onto grid files. Example: &amp;lt;code&amp;gt;staticFields = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveTraj (integer)&lt;br /&gt;
: write particle trajectories to [[#Trajectory files]] at each time step (1) or each month (2). Option 0 disables trajectory output. Example: &amp;lt;code&amp;gt;saveTraj = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;skipTraj (boolean)&lt;br /&gt;
: write every nth trajectory to reduce traj file size (1:disabled, &amp;gt;=2: stride size). Example: &amp;lt;code&amp;gt;skipTraj = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveHistogram (boolean)&lt;br /&gt;
: write histogram for selected parameters to a [[#Histogram files]] (0: disabled, 1:enabled). Example: &amp;lt;code&amp;gt;saveHistogram = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveMean (boolean)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;saveMean = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Variables====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category allow to include or exclude specific variables from the output files. Setting the output for unused variables to 0 (disabled) will speed up computation time, reduce the memory footprint, and reduce the output file size. Only parameters that are really required from a run should therefore selected as enabled.&lt;br /&gt;
&lt;br /&gt;
;sourcesBoundaryLayer (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the boundary layer to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesBoundaryLayer = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourcesFreeTroposphere (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the free troposphere to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesFreeTroposphere = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;evaporationMinusPrecipitation (boolean)&lt;br /&gt;
: write unweighted evaporation minus precipitation along entire trajectory length to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;evaporationMinusPrecipitation = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;moistureTransport (boolean)&lt;br /&gt;
: write weighted moisture transport along trajectories to grid and series output files (0: disabled, 1: enabled). Units are mm. Example: &amp;lt;code&amp;gt;moistureTransport = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajectoryLocations (boolean)&lt;br /&gt;
: write trajectory locations to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Example: &amp;lt;code&amp;gt;trajectoryLocations = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipitationEstimate (boolean)&lt;br /&gt;
: write precipitation estimate at arrival to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;precipitationEstimate = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLongitude (boolean)&lt;br /&gt;
: write weighted moisture source longitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees longitude. Example: &amp;lt;code&amp;gt;sourceLongitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLatitude (boolean)&lt;br /&gt;
: write moisture source latitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees latitude. Example: &amp;lt;code&amp;gt;sourceLatitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionCount (boolean)&lt;br /&gt;
: write convection count projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Convection count can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionCount is not on the ERA-Interim climatology run. The counter is increased each time the particles passes the convection scheme upwards. Example: &amp;lt;code&amp;gt;convectionCount = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionHeight (boolean)&lt;br /&gt;
: write convection height projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Convection height can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionHeight is not on the ERA-Interim climatology run. The value gives an average height of vertical displacement when the particles passes the convection scheme. Example: &amp;lt;code&amp;gt;convectionHeight = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;landFraction (boolean)&lt;br /&gt;
: write fraction of moisture sources over land projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;landFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;boundaryLayerFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;boundaryLayerFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;freeTroposphereFraction (boolean)&lt;br /&gt;
: write accounted fraction of free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;freeTroposphereFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;combinedFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer and free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). This is the sum of the two previous variables. Example: &amp;lt;code&amp;gt;combinedFraction = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTime (boolean)&lt;br /&gt;
: write moisture transport time projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are hours. Example: &amp;lt;code&amp;gt;transportTime = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSpecificHumidity (boolean)&lt;br /&gt;
: write surface specific humidity at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are g per kg. Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSpecificHumidity = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportDistance (boolean)&lt;br /&gt;
: write transport distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Transport distance is the length of the actual travel path along the trajectories from moisture source to the arrival region. Example: &amp;lt;code&amp;gt;transportDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDistance (boolean)&lt;br /&gt;
: write source distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Source distance is the shortest distance between the moisture source and the arrival region. Example: &amp;lt;code&amp;gt;sourceDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;source2mTemperature (boolean)&lt;br /&gt;
: write 2m temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;source2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDeuteriumExcess (boolean)&lt;br /&gt;
: write deuterium excess projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are permil. Deuterium excess is calculated from the relative humidity with respect to SST and the relationship from Pfahl and Sodemann (2014). Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceDeuteriumExcess = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperature during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;transportTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportPressure (boolean)&lt;br /&gt;
: write moisture-weighted pressure during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;transportPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;condensationTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperatures where RH&amp;lt;sub&amp;gt;liquid&amp;lt;/sub&amp;gt; exceeds 80% to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;condensationTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalTemperature (boolean)&lt;br /&gt;
: write temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;arrivalTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPressure (boolean)&lt;br /&gt;
: write pressure during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;arrivalPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrival2mTemperature (boolean)&lt;br /&gt;
: write temperature at 2m during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that 2m temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrival2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrivalSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Flexpart====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
;inputFormat (integer)&lt;br /&gt;
: 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/NorESM data short format, 4: global reanalysis data long format, 5 regional reanalysis/NorESM data short format. Example: &amp;lt;code&amp;gt;inputFormat = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maxPart (integer)&lt;br /&gt;
: number of particles contained in a single FLEXPART partposit or shortposit file. Example: &amp;lt;code&amp;gt;maxPart = 5000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partMass (float)&lt;br /&gt;
: atmospheric mass represented by each particle in kilogramms. Parameter is written out by specific version of FLEXPART to create WaterSip output data. Example: &amp;lt;code&amp;gt;partMass = 1.01943e+12&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partStride (integer)&lt;br /&gt;
: number of particles to skip during processing to speed up calculations (1: use every particle, &amp;gt;=2: use every 2nd particle, etc). Example: &amp;lt;code&amp;gt;partStride = 10&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;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). Example: &amp;lt;code&amp;gt;allowReenter = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Lagranto====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Full example for a FLEXPART run input file:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Case]&lt;br /&gt;
caseName = global_201002_final_relativex&lt;br /&gt;
inputDir = /home/data/flexpart/global/shortposit_%s&lt;br /&gt;
outputDir=/home/data/watersip/global_201002_V3/&lt;br /&gt;
startDate = 20100228-180000&lt;br /&gt;
endDate = 20100211-000000&lt;br /&gt;
timeStep = 6&lt;br /&gt;
sectorizeRegion = 0&lt;br /&gt;
filterBoxFile = /home/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&lt;br /&gt;
filterIndex = -1&lt;br /&gt;
orographyFile = &amp;quot;/home/projects/WaterSip_tool/etopo5.nc&amp;quot;&lt;br /&gt;
lsmFile = &amp;quot;/home/projects/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&lt;br /&gt;
maskFile = &amp;quot; &amp;quot;&lt;br /&gt;
useMask = 0&lt;br /&gt;
trajPoints = 41&lt;br /&gt;
minTrajPoints = 0&lt;br /&gt;
ompThreads = 1&lt;br /&gt;
showStats = 0&lt;br /&gt;
&lt;br /&gt;
[Grids]&lt;br /&gt;
arrivalGridMinLon = -180&lt;br /&gt;
arrivalGridMaxLon = 180&lt;br /&gt;
arrivalGridMinLat = -90&lt;br /&gt;
arrivalGridMaxLat = 90&lt;br /&gt;
arrivalGridDx = 1&lt;br /&gt;
arrivalGridDy = 1&lt;br /&gt;
arrivalGridRadius = 200&lt;br /&gt;
sourceGridMinLon = -180&lt;br /&gt;
sourceGridMaxLon = 180&lt;br /&gt;
sourceGridMinLat = -90&lt;br /&gt;
sourceGridMaxLat = 90&lt;br /&gt;
sourceGridDx = 1&lt;br /&gt;
sourceGridDy = 1&lt;br /&gt;
sourceGridRadius = 200&lt;br /&gt;
griddingType = 2&lt;br /&gt;
&lt;br /&gt;
[Diagnostics]&lt;br /&gt;
uptakeThreshold = 0.05&lt;br /&gt;
precipThreshold = 0.05&lt;br /&gt;
blhScale = 1.5&lt;br /&gt;
arrivalPrecipMin = 0.05&lt;br /&gt;
arrivalPrecipMax = 1.0&lt;br /&gt;
arrivalRHMin = 80&lt;br /&gt;
arrivalRHMax = 110&lt;br /&gt;
arrivalOroMin = -100&lt;br /&gt;
arrivalOroMax = 12000&lt;br /&gt;
arrivalAltMin = -100&lt;br /&gt;
arrivalAltMax = 12000&lt;br /&gt;
analyzeVapour = 0&lt;br /&gt;
assignToUptake = 0&lt;br /&gt;
forwardProjectionMode = 3&lt;br /&gt;
relativeThreshold = 1&lt;br /&gt;
&lt;br /&gt;
[Output]&lt;br /&gt;
stepFile = 1&lt;br /&gt;
dayFile = 1&lt;br /&gt;
monthFile = 1&lt;br /&gt;
yearFile = 1&lt;br /&gt;
allFile = 1&lt;br /&gt;
staticFields = 1&lt;br /&gt;
saveTraj = 0&lt;br /&gt;
skipTraj = 0&lt;br /&gt;
saveHistogram = 0&lt;br /&gt;
saveMean = 0&lt;br /&gt;
&lt;br /&gt;
[Variables]&lt;br /&gt;
sourcesBoundaryLayer = 1&lt;br /&gt;
sourcesFreeTroposphere = 1&lt;br /&gt;
evaporationMinusPrecipitation = 1&lt;br /&gt;
moistureTransport = 1&lt;br /&gt;
trajectoryLocations = 1&lt;br /&gt;
precipitationEstimate = 1&lt;br /&gt;
sourceLongitude = 1&lt;br /&gt;
sourceLatitude = 1&lt;br /&gt;
convectionCount = 0&lt;br /&gt;
convectionHeight = 0&lt;br /&gt;
landFraction = 1&lt;br /&gt;
boundaryLayerFraction = 1&lt;br /&gt;
freeTroposphereFraction = 1&lt;br /&gt;
combinedFraction = 0&lt;br /&gt;
transportTime = 1&lt;br /&gt;
sourceSkinTemperature = 1&lt;br /&gt;
sourceSpecificHumidity = 0&lt;br /&gt;
transportDistance = 1&lt;br /&gt;
sourceDistance = 1&lt;br /&gt;
source2mTemperature = 0&lt;br /&gt;
sourceDeuteriumExcess = 1&lt;br /&gt;
transportTemperature = 1&lt;br /&gt;
transportPressure = 1&lt;br /&gt;
condensationTemperature = 1&lt;br /&gt;
arrivalTemperature = 1&lt;br /&gt;
arrivalPressure = 1&lt;br /&gt;
arrival2mTemperature = 0&lt;br /&gt;
arrivalSkinTemperature = 1&lt;br /&gt;
&lt;br /&gt;
[Flexpart]&lt;br /&gt;
inputFormat = 3&lt;br /&gt;
maxPart = 5000000&lt;br /&gt;
partMass = 1.01943e+12&lt;br /&gt;
partStride = 10&lt;br /&gt;
allowReenter = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Output file formats===&lt;br /&gt;
&lt;br /&gt;
The results from the WaterSip diagnostic are written to a set of output files in different format. The main output files are created in netCDF with detailed metadata information, including the parameter settings of the run for automated documentation. The creation of different output files can be adapted by parameter settings in parameter set *Output* and the contained variables with settings in parameter set *Variables*. Spatial fields at different time intervals are written to so-called grid files in [[netCDF]] format, time series of averaged quantities at different time intervals are written to so-called Series files in netCDF format, histograms of selected quantities identified during the processing for each time step and each trajectory are written to Histogram files in ASCII format, and trajectories are written to Trajectory files in either the binary format traj or the Lagranto ASCII format. Earlier versions than V3 reported output in so-called Mean files in an ASCII format. That format is documented here but no longer in use in current versions of WaterSip.&lt;br /&gt;
&lt;br /&gt;
The time unit has changed in Version 3.1. Previously, the unit was set to &amp;quot;days since 0000-01-02 00:00:00&amp;quot; to allow matlab-compatible values for time that could directly be utilized with the datenum() commands. In order to confirm to netCDF-CF standards, where no calendar year 0000 exists, the time unit is now &amp;quot;days since 0001-01-01 00:00:00&amp;quot;. This provides the ability to open and visualize netCDF output files directly with tools such as ncview and panoply. To convert the time values into a matlab datenum compatible value, the following commands have to be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ncid=netcdf.open(filename,&amp;quot;noclobber&amp;quot;);&lt;br /&gt;
tim=(float)netcdf.getVar(ncid,&amp;quot;time&amp;quot;);&lt;br /&gt;
tim=tim-datenum(1,0,1);&lt;br /&gt;
datestr(tim)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table below summarizes the available output files:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Content !! Format !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| Grid files || Spatial properties of moisture sources and arrival regios || netCDF || CASE_grd_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Series files || Mean/min/max/std of regionally and globally averaged moisture source and arrival region properties || netCDF || CASE_ser_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Histogram files || Histograms of quantities identified for each timestep along each trajectory || ASCII || CASE_hst_steps&lt;br /&gt;
|-&lt;br /&gt;
| Trajectory files || Trajectories for identified precipitation events || ASCII/binary traj || CASE_DATE.traj/CASE_DATE_lsl&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Grid files====&lt;br /&gt;
&lt;br /&gt;
Grid file variables are separated into immediate source and transport variables, typically on a coarser, global grid, and arrival and forward-projected variables on the (typically finer-scale) arrival grid. The grid settings are determined by the corresponding parameters in parameter set *Grid*. All variables are of type float, and the fill value (netCDF property _FillValue) is -999.99. The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and dividing by the total precipitation (as described above).&lt;br /&gt;
&lt;br /&gt;
**Moisture source and transport properties**&lt;br /&gt;
&lt;br /&gt;
Variables related to immediate moisture source and transport properties (not forward projected) have dimension of variables time, global_latitude, global_longitude, as defined by input file parameters *sourceGridMinLon,sourceGridMaxLon, sourceGridMinLat, sourceGridMaxLat, sourceGridDx, sourceGridDy, sourceGridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer || E_s^BL || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere || E_s^FT || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation || E-P || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport || Q_t || mm ||  text &lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location || N_t || counts km^-2 || text &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Arrival properties and Lagrangian forward projections**&lt;br /&gt;
&lt;br /&gt;
The variables contained in these files have the dimensions time (days since 0001-01-01 00:00:00), latitude (degrees_north), and longitude (degrees_east) as defined by input file parameters *arrivalGridMinLon, arrivalGridMaxLon, arrivalGridMinLat, arrivalGridMaxLat, arrivalGridDx, arrivalGridDy, arrival | source | text |GridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Unit !! Property !! Description &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate || PE || mm day^-1 or mm step^-1 || arrival || precipitation at arrival location estimated from change in specific humidity during last time step &lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature || T_a || K || arrival || PE-weighted temperature at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure || p_a || hPa || arrival || PE-weighted pressure at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature || SKT_a || K || arrival || PE-weighted SKT below trajectory location during arrival &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer || f_BL || fraction || arrival || fractional contribution of BL moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere || f_FT || fraction || arrival || fractional contribution of FT moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_lifetime || \tau_t || h || transport || contribution and precipitation-weighted precipitation life time &lt;br /&gt;
|-&lt;br /&gt;
| transport_distance || \Delta_t || km || transport || contribution and precipitation-weighted transport distance along trajectory &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature || T_t || K || transport || contribution and precipitation-weighted temperature during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure || p_t || hPa || transport || contribution and precipitation-weighted pressure during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature || T_c || K || transport || contribution and precipitation-weighted temperature when RH&amp;gt;80% during transport &lt;br /&gt;
|-&lt;br /&gt;
| source_longitude || \lambda_s || degrees_east || source || contribution and precipitation-weighted latitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_latitude || \phi_s || degrees_north || source || contribution and precipitation-weighted longitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| land_fraction || f_l || fraction || source || contribution and precipitation-weighted fraction of moisture sources over land &lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature || SKT_s || K || source || contribution and precipitation-weighted SKT at the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_distance || \Delta_s || km || source || contribution and precipitation-weighted direct distance between the moisture source and arrival location &lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess || d_s || permil || source || contribution and precipitation-weighted estimate of deuterium excess at the source from RH and T using the Pfahl and Sodemann (2013) relation &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Global attributes**&lt;br /&gt;
&lt;br /&gt;
The netCDF grid files contain a range of essential parameters as global attributes. These parameters allow to fully characterise the result of the WaterSip run as required for the interpretation of the results. A number of run parameters are omitted, that concern logistical settings, or that are self-evident from the content of the the output files. The table below gives an example for a WaterSip run:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Example !! Type &lt;br /&gt;
|-&lt;br /&gt;
| startDate || &amp;quot;2010-02-28 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| endingDate || &amp;quot;2010-01-11 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| analysisRegion || &amp;quot;NEEM&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| maxPart || 5000001  || int&lt;br /&gt;
|-&lt;br /&gt;
| caseName || &amp;quot;global_201002_V3_stride&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| trajPoints || 61  || int&lt;br /&gt;
|-&lt;br /&gt;
| timeStep || 6  || in float&lt;br /&gt;
|-&lt;br /&gt;
| partMass || 2.03885996E12  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| dryLevel || 0.01  || float&lt;br /&gt;
|-&lt;br /&gt;
| blhScale || 1.5  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMin || 80.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMax || 110.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| uptakeThreshold || 0.2  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| precipThreshold || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMin || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMax || -120.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| anaVapour || 0  || int&lt;br /&gt;
|-&lt;br /&gt;
| filterIndex || -1  || int&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Series files====&lt;br /&gt;
&lt;br /&gt;
The netCDF series files contain two sets of information. The so-called sectorization output provides time series of the moisture source information seperated into relative contributions from predefined geographical areas. Furthermore, the series files contains weighted averages and further statistical properties of all quantities in the grid files. &lt;br /&gt;
&lt;br /&gt;
**Sectorisation output**&lt;br /&gt;
&lt;br /&gt;
A set of sectorisations is chosen by the parameter *sectorizeRegion*. The currently available options are listed in the table below. New sectorisations can be defined by changing the code in routine &amp;lt;code&amp;gt;Sectors.cpp/Sectors.h&amp;lt;/code&amp;gt;. This requires defining a new name and new decision tree that provides a unique number for any lat/lon value between -180E to 180E and -90 to 90N. See comments in the code.&lt;br /&gt;
&lt;br /&gt;
For each of the predefined areas, the relative contributions are subdivided into land and sea covered areas. Time series of the contributions are of dimension time and sector. Thereby, the sector numbers correspond to the sector numbers defined in the program code. The area of the sectors is calculated automatically within WaterSip. As noted above for the grid files, the time unit has been changed starting from Version 3.1.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol !! Unit !! Description&lt;br /&gt;
|-&lt;br /&gt;
| time || t || days since 0001-01-01 00:00:00 || text&lt;br /&gt;
|-&lt;br /&gt;
| sector || s || sector number || text&lt;br /&gt;
|-&lt;br /&gt;
| sector_area || A_s || km^2 || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_boundary_layer || f_l^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_boundary_layer || f_s^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_free_troposphere || f_l^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_free_troposphere || f_s^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_trajectory_location || f_l^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_trajectory_location || f_s^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_transport || f_l^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_transport || f_s^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_evaporation_minus_precipitation || f_l^EP || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_evaporation_minus_precipitation | f_s^EP | percent | text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Time-series output**&lt;br /&gt;
&lt;br /&gt;
For immediate quantities, a time series of the total field sum is recorded in the series file. In order to obtain an area average, one needs to divide the sum by the surface of the earth (x km^2). The unit for moisture uptakes, E-P and precipitation estimate is mm step^-1 for step series files, and mm 24h^-1 for all other averaging series files. In addition to sums, the files contain time series of the minimum, maximum and standard deviation of the grid field at each time instance. For all forward-projected and arrival quantities, the average rather than the sum is calculated on the arrival grid locations. When averaging from step output to larger time intervals, the quantities are weighted with the corresponding PE at each grid point. &lt;br /&gt;
&lt;br /&gt;
In addition, series files contain the same set of global attributes as described in Grid files to enable interpretation without additional documentation of the run setup.&lt;br /&gt;
&lt;br /&gt;
*Immediate quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_min || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_sum || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_max || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_min || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_sum || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_max || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Arrival and forward-projected quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_min || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_avg || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_max || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_min || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_avg || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_max || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_min || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_avg || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_max || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_min || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_avg || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_max || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_avg || x  || K &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_max || x || K&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Histogram files====&lt;br /&gt;
&lt;br /&gt;
* Bounds freq (1 to n categories), (1 to m variables)&lt;br /&gt;
* Main variables time, dq, conv&lt;br /&gt;
* where to implement&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20.71   46.56   8.1351e+05  -1.0000e+00&lt;br /&gt;
21.22   45.90   1.1314e+06  -1.0000e+00&lt;br /&gt;
22.03   45.24   4.1929e+05  -1.0000e+00&lt;br /&gt;
21.19   45.35   1.0639e+06  -1.0000e+00&lt;br /&gt;
20.71   46.50   5.0963e+05  -1.0000e+00&lt;br /&gt;
21.07   47.51   2.8182e+05  -1.0000e+00&lt;br /&gt;
21.71   48.67   9.3088e+05  -1.0000e+00&lt;br /&gt;
22.14   51.47   2.3634e+05  -1.0000e+00&lt;br /&gt;
22.14   52.49   8.0048e+05  -1.0000e+00&lt;br /&gt;
22.34   53.76   7.3297e+05  -1.0000e+00&lt;br /&gt;
23.17   54.41   4.1516e+05  -1.0000e+00&lt;br /&gt;
23.56   54.54   2.7414e+05  -1.0000e+00&lt;br /&gt;
24.39   54.55   5.0017e+05  -1.0000e+00&lt;br /&gt;
26.89   54.42   2.8215e+05  -1.0000e+00&lt;br /&gt;
28.18   54.40   3.9987e+05  -1.0000e+00&lt;br /&gt;
29.80   54.25   3.6020e+05  -1.0000e+00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Trajectory files====&lt;br /&gt;
&lt;br /&gt;
**LSL format**&lt;br /&gt;
&lt;br /&gt;
* As documented elsewhere&lt;br /&gt;
* only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Traj format**&lt;br /&gt;
&lt;br /&gt;
* Binary format, only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
* reading in and plotting traj files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mean file====&lt;br /&gt;
&lt;br /&gt;
Legacy format, global_201002_V3_avg_steps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20100228_00 13795.603  0.001 7994.128  0.001 722561152.000 1977998.875   -0.081   -3.124    0.007  -0.080  -1.347   0.003   0.181   0.000   0.001   0.711   0.006   0.001   0.242   0.000   0.001 -999.990 -999.990 -999.990  -83.283 -340.404    0.153  288.231  242.846    0.050 -999.990 -999.990 -999.990   2828.54    120.41      7.50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Annotated bibliography===&lt;br /&gt;
&lt;br /&gt;
There are to date (Oct 2019) 25 publications involving the WaterSip method in one way or another. The versatility of WaterSip ranges from weather events to climatological studies, and from process understanding to paleoclimate proxy interpretation. This documentation can only provide initial guidance in applying WaterSip to new research plans. The annotated bibliography below provides an overview over the relevant studies, ordered by topic and the respective climatic zone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Topic !! Time perspective !! Climate zone !! Region !! Reference&lt;br /&gt;
|-&lt;br /&gt;
| Method description || - || High latitudes || Greenland || Sodemann et al., 2008a&lt;br /&gt;
|-&lt;br /&gt;
| Precipitation extremes || Climatology || Subtropics || Mediterranean || Winschall et al., 2014a&lt;br /&gt;
|-&lt;br /&gt;
| Method evaluation || Weather event || Subtropics || Mediterranean || Winschall et al., 2014b&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime of precipitation || Climatology || Global || Global || Läderach and Sodemann, 2016&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || High latitudes || Greenland || Sodemann et al., 2008b&lt;br /&gt;
|-&lt;br /&gt;
| Climate characteristics || Climatology || Mid latitudes || Europe || Sodemann and Zubler, 2010&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Tropics || Belize || Kenneth et al., &lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Mid latitudes || China || Baker et al., Luetscher et al. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
* Thurnherr, I., Kozachek, A., Graf, P., Weng, Y., Bolshiyanov, D., Landwehr, S., Pfahl, S., Schmale, J., Sodemann, H., Steen-Larsen, H. C., Toffoli, A., Wernli, H., and Aemisegger, F., 2019: Meridional and vertical variations of the water vapour isotopic composition in the marine boundary layer over the Atlantic and Southern Ocean, Atmos. Chem. Phys. Discuss., doi: 10.5194/acp-2019-782.&lt;br /&gt;
* Fremme, A. and Sodemann, H., 2019: The role of land and ocean evaporation on the variability of precipitation in the Yangtze River valley, Hydrol. Earth Syst. Sci., 23, 2525–2540, doi: 10.5194/hess-23-2525-2019. &lt;br /&gt;
* Huang, R, Zhu, H, Liang, E., Grießinger, J, Wernicke, J., Yu, W., Hochreuther, P., Risi, C., Zeng, Y., Fremme, A., Sodemann, H., Bräuning, A., 2019: Temperature signals in tree-ring oxygen isotope series from the northern slope of the Himalaya, EPSL 506: 455-465. &lt;br /&gt;
* Buizert, Christo; Sigl, Michael; Severi, Mirko; Markle, Bradley; Wettstein, Justin; McConnell, J; Pedro, Joel; Sodemann, H.; Goto-Azuma, Kumiko; Kawamura, Kenji; Fujita, Shuji; Motoyama, Hideaki; Hirabayashi, Motohiro; Uemura, Ryu; Stenni, Barbara; Parrenin, Frederic; He, Feng; Fudge, T.J.; Steig, Eric J., 2018: Abrupt ice-age shifts in southern westerly winds and Antarctic climate forced from the north, Nature 563: 681-685.&lt;br /&gt;
* Bohlinger, P., Sorteberg, A., Liu, C., Rasmussen, R., Sodemann, H., Ogawa, F., 2018: Multiscale characteristics of an extreme precipitation event over Nepal. QJRMS:1-18, doi:10.1002/qj.3418. &lt;br /&gt;
* Bohlinger, P., Sorteberg, A., and Sodemann, H., 2017: Synoptic conditions and moisture sources actuating extreme precipitation in Nepal. Journal of Geophysical Research: Atmospheres, 122, 12,653–12,671. https://doi.org/10.1002/2017JD027543.&lt;br /&gt;
* Blazina, T., A. Läderach, G. D. Jones, H. Sodemann, H. Wernli, J. W. Kirchner and L. H. E. Winkel, 2016: Marine primary productivity as a potential source of selenium and other trace elements in atmospheric deposition, Environ. Sci. Technol. 2017, 51, 108−118, doi: 10.1021/acs.est.6b03063.&lt;br /&gt;
* Läderach, A. andSodemann, H., 2016: A revised picture of the atmospheric moisture residence time, Geophys. Res. Lett., 43, doi:10.1002/2015GL067449.&lt;br /&gt;
* Baker, A., Sodemann, H., Baldini, J. U. L., Breitenbach, S. F. M., Johnson, K. R., van Hunen, J., and Pingzhong, Z., 2015: Seasonality of westerly moisture transport in the East Asian Summer Monsoon and its implications for interpreting precipitation d18O, J. Geophys. Res., 120,  doi:10.1002/2014JD022919.&lt;br /&gt;
* Steen-Larsen, H. C., Sveinbjörnsdottir, A. E., Jonsson, T., Ritter, F., Bonne, J.-L., Masson-Delmotte, V., Sodemann, H., Blunier, T., Dahl-Jensen, D., Vinther, B. M., 2015: Moisture sources and synoptic to seasonal variability of North Atlantic water vapor isotopic composition, J. Geophys. Res., 120, 5757–5774, doi:10.1002/ 2015JD023234.&lt;br /&gt;
* Bonne, J.-L., Steen-Larsen, H. C., Risi, C., Werner, M., Sodemann, H., Lacour, J.-L., Fettweis, X., Cesana, G., Delmotte, M., Cattani, O., Vallelonga, P., Kjær, H. A., Clerbaux, C., Sveinbjörnsdóttir, A. E., and Masson-Delmotte, V., 2015: The summer 2012 Greenland heat wave: In situ and remote sensing observations of water vapor isotopic composition during an atmospheric river event, J. Geophys. Res., 120, 2970-2989, doi:10.1002/2014JD022602.&lt;br /&gt;
* Luetscher, M., Boch, R., Sodemann, H., Spoetl, C., Cheng, H., Edwards, R. L., Frisia, S., Hof, F., Mueller, W., 2015: North Atlantic storm track changes during the Last Glacial Maximum recorded by Alpine speleothems, Nature Comm. 6: 6344, doi:10.1038/ncomms7344.&lt;br /&gt;
* Winschall, A., Sodemann, H.,Pfahl, S. and Wernli, H., 2014: How important is intensified evaporation for Mediterranean precipitation extremes?, J. Geophys. Res., 119: 5240–5256, doi:10.1002/2013JD021175&lt;br /&gt;
* Winschall, A., Pfahl, S., Sodemann, H.and Wernli, H.. 2014. Comparison of Eulerian and Lagrangian moisture source diagnostics - the flood event in eastern Europe in May 2010, Atmos. Chem. Phys. 14: 6605–6619, doi:10.5194/acp-14-6605-2014.&lt;br /&gt;
* Aemisegger, F., Pfahl, S., Sodemann, H., Lehner, I., Seneviratne, S. I., and Wernli, H., 2014: Deuterium excess as a proxy for continental moisture recycling and plant transpiration, Atmos. Chem. Phys., 14: 4029–4054, doi:10.5194/acp-14-4029-2014.&lt;br /&gt;
* Bonne, J. L., Masson-Delmotte, V., Cattani, O., Delmotte, M., Risi, C., Sodemann, H., and Steen-Larsen, H. C., 2014:The isotopic composition of water vapour and precipitation in Ivittuut, southern Greenland, Atmos. Chem. Phys. 14: 4419–4439, doi:10.5194/acp-14-4419-2014.&lt;br /&gt;
* Wang, Y., Sodemann, H., Hou, S., Masson-Delmotte, V. Jouzel, J. and Pang, H., 2013: Snow accumulation and its moisture origin over Dome Argus, Antarctica. Clim. Dyn., 40:731-742, doi: 10.1007/s00382-012-1398-9.&lt;br /&gt;
* Martius, O., Sodemann, H., Joos, H., Pfahl, S., Winschall, A., Croci-Maspoli, M., Graf, M., Madonna, E., Mueller, B., Schemm, S., Sedlacek, J., Sprenger, M. and Wernli, H., 2012: The role of upper-level dynamics and surface processes for the Pakistan flood in July 2010. Quart. J. Royal Meteorol. Soc., published online, doi: 10.1002/qj.2082.&lt;br /&gt;
* Kennett, D. J., Breitenbach, S. F. M., Aquino, V. V., Asmerom, Y., Awe, J., Baldini, J. U. L., Bartlein, P., Culleton, B. J., Ebert, C., Jazwa, C., Macri, M. J., Marwan, N., Polyak, V., Prufer, K. M., Ridley, H. E., Sodemann, H., Winterhalder, B. and Haug, G. H., 2012: Development and Disintegration of Maya Political Systems in Response to Climate Change. Science, 338: 788-791, doi: 10.1126/science.1226299.&lt;br /&gt;
* Winkler, R., Landais, A., Sodemann, H., Dümbgen, L., Priéa, F., Masson-Delmotte, V., Stenni, B., and Jouzel, J., 2012: Deglaciation records of 17O-excess in East Antarctica: reliable reconstruction of oceanic relative humidity from coastal sites. Clim. Past 8, 1-16.&lt;br /&gt;
* Masson-Delmotte, V., Buiron, D., Ekaykin, A., Frezzotti, M., Gallée, H., Jouzel, J., Krinner, G., Landais, A., Motoyama, A., Oerter, H., Pol, K., Pollard, D., Ritz, C., Schlosser, E., Sime, L. C., Sodemann, H., Stenni, B., Uemura R., and Vimeux, F., 2011: A comparison of the present and last interglacial periods in six Antarctic ice cores Clim. Past, 7, 397-423. &lt;br /&gt;
* Sodemann, H.and Zubler, E., 2010: Seasonality and inter-annual variability of the moisture sources for Alpine precipitation during 1995-2002, Int. J. Climatol., 30: 947-961, doi:10.1002/joc.1932.&lt;br /&gt;
* Sodemann, H., and Stohl, A., 2009: Asymmetries in the moisture origin of Antarctic precipitation, Geophys. Res. Lett., 36, L22803, doi:10.1029/2009GL040242.&lt;br /&gt;
* Sodemann, H., Masson-Delmotte, V., Schwierz, C., Vinther, B. M. and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Part II: Effects of North Atlantic Oscillation variability on stable isotopes in precipitation, J. Geophys. Res., 113, D12111, doi:10.1029/2007JD009416.&lt;br /&gt;
* Sodemann, H., Schwierz, C., and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Lagrangian moisture diagnostic and North Atlantic Oscillation influence, J. Geophys. Res.,113, D03107, doi:10.1029/2007JD008503.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=MaskCode&amp;diff=1433</id>
		<title>MaskCode</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=MaskCode&amp;diff=1433"/>
		<updated>2021-01-15T08:40:35Z</updated>

		<summary type="html">&lt;p&gt;Hso039: Created page with &amp;quot;&amp;lt;pre&amp;gt; #!/usr/bin/env python3 # -*- coding: utf-8 -*- &amp;quot;&amp;quot;&amp;quot; Created on Mon Jan 11 16:54:46 2021  @author: mika &amp;quot;&amp;quot;&amp;quot; #mask creation: import numpy as np import shapely as shp #no ca...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/env python3&lt;br /&gt;
# -*- coding: utf-8 -*-&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
Created on Mon Jan 11 16:54:46 2021&lt;br /&gt;
&lt;br /&gt;
@author: mika&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
#mask creation:&lt;br /&gt;
import numpy as np&lt;br /&gt;
import shapely as shp #no canonical shortname&lt;br /&gt;
import shapely.vectorized #vectorized version has to be loaded in separately&lt;br /&gt;
import pandas as pd #optional, only for loading in coordinates from csv&lt;br /&gt;
&lt;br /&gt;
#netcdf file creation:&lt;br /&gt;
import netCDF4 as nc4&lt;br /&gt;
&lt;br /&gt;
#plotting:&lt;br /&gt;
import matplotlib.pyplot as plt&lt;br /&gt;
import matplotlib.colors as mcolors&lt;br /&gt;
import cartopy.crs as ccrs&lt;br /&gt;
import cartopy.feature as cfeature&lt;br /&gt;
import matplotlib.patches as mpatches #for artificial legends&lt;br /&gt;
import matplotlib.lines as mlines #for artificial legends&lt;br /&gt;
&lt;br /&gt;
#unsure:&lt;br /&gt;
#from cartopy import config&lt;br /&gt;
#import copy #from python, but because of cmap copying&lt;br /&gt;
&lt;br /&gt;
#if warning due to cartopy and matplotlib versions clashing: &lt;br /&gt;
#whether you have this problem and need this will depend on your specific cartopy and matplotlib versions&lt;br /&gt;
from matplotlib.axes import Axes&lt;br /&gt;
from cartopy.mpl.geoaxes import GeoAxes&lt;br /&gt;
GeoAxes._pcolormesh_patched = Axes.pcolormesh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# %% setup global grid and polygon&lt;br /&gt;
&lt;br /&gt;
#global grid, points to check for:&lt;br /&gt;
    &lt;br /&gt;
res=0.25 # resolution in degrees&lt;br /&gt;
global_lats=np.arange(-90,90+res,res)&lt;br /&gt;
global_lons=np.arange(-180,180+res,res)&lt;br /&gt;
x, y = np.meshgrid(global_lons,global_lats) #creates meshgrid of size lats*lons&lt;br /&gt;
&lt;br /&gt;
# the polygon, our mask:&lt;br /&gt;
#df=pd.read_csv(&#039;coords_scandinavia.csv&#039;)&lt;br /&gt;
#coordinates=list(zip(df.lon,df.lat))&lt;br /&gt;
&lt;br /&gt;
#if not loading in a csv-file. coordinates needs to be a python LIST of TUPLE pairs of (lon,lat) (x,y)&lt;br /&gt;
coordinates=\&lt;br /&gt;
[(31.25, 69.75), (23.75, 66.0), (20.0, 62.0), (20.0, 55.25), (15.0, 54.75),(13.0, 55.0),&lt;br /&gt;
 (12.0, 54.5), (10.75, 54.0), (8.75, 54.0), (8.5, 54.4), (4.0, 54.5), (4.0, 72.0), (31.0, 72.0)]&lt;br /&gt;
&lt;br /&gt;
nodes=coordinates.copy() #needs to be copy or otherwise appends updates with the appending below&lt;br /&gt;
nodes.append(coordinates[0]) #polygon needs to be closed, so first point is endpointt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#create polygon:&lt;br /&gt;
geom=shp.geometry.Polygon(nodes)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# %% calcuate boolean mask:&lt;br /&gt;
mask_inner=shapely.vectorized.contains(geom, x, y) # - for interior points&lt;br /&gt;
mask_edge=shapely.vectorized.touches(geom, x, y) #- for edge points&lt;br /&gt;
mask_full=mask_inner|mask_edge # | is boolean OR bitwise (elementwise) operator. if either of the elements are true, result is true. if both are false, false.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# %% super quick plotting for checking&lt;br /&gt;
&lt;br /&gt;
#matplotlibs imshow is by far the quickest for such dense plotting (1M points if res=0.25&lt;br /&gt;
#quicklook plot, NOT in geographical projection&lt;br /&gt;
#imshow uses ij indexing, so we use the origin argument&lt;br /&gt;
    &lt;br /&gt;
fig, ax = plt.subplots(3, 1, figsize=(14,25))&lt;br /&gt;
cmap=&#039;bwr&#039;&lt;br /&gt;
ax[0].imshow(mask_inner,origin=&#039;lower&#039;,cmap=cmap)&lt;br /&gt;
ax[1].imshow(mask_edge,origin=&#039;lower&#039;,cmap=cmap)&lt;br /&gt;
ax[2].imshow(mask_full,origin=&#039;lower&#039;,cmap=cmap)&lt;br /&gt;
&lt;br /&gt;
ax[0].set_title(&#039;inner mask&#039;)&lt;br /&gt;
ax[1].set_title(&#039;edge mask&#039;)&lt;br /&gt;
ax[2].set_title(&#039;combined mask&#039;)&lt;br /&gt;
&lt;br /&gt;
# for ax in axs.ravel():&lt;br /&gt;
#     ax.grid(b=True,which=&#039;major&#039;,axis=&#039;x&#039;,color=&#039;k&#039;,alpha=0.4,linestyle=&#039;--&#039;)&lt;br /&gt;
#     ax.set_xticks(months)&lt;br /&gt;
#     ax.set_xticklabels([x[0:3] for x in monthnames],rotation=90,ha=&#039;center&#039;)&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
# %% geographical global map:&lt;br /&gt;
 &lt;br /&gt;
dataproj=ccrs.PlateCarree()&lt;br /&gt;
mapproj=ccrs.PlateCarree() #regular, fine for global&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fig, ax = plt.subplots(1, 1, subplot_kw=dict(projection=mapproj), figsize=(14,14))&lt;br /&gt;
ax.set_global()&lt;br /&gt;
#ax.set_extent((3,27,53,73),crs=dataproj) #fine for scandinavia&lt;br /&gt;
ax.coastlines(&#039;10m&#039;) #choices 110m, 50m and 10m. m does not mean meter, but 1:Xmillion.&lt;br /&gt;
ax.add_feature(cfeature.BORDERS, linestyle=&#039;:&#039;)&lt;br /&gt;
ax.gridlines(color=&#039;k&#039;,alpha=0.3,linestyle=&#039;:&#039;)&lt;br /&gt;
pixelplot=ax.pcolormesh(global_lons,global_lats,mask_full,transform=dataproj,cmap=&#039;bwr&#039;)&lt;br /&gt;
ax.set_title(&#039;global map proj \n full mask&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# %% zoom-in geographical map standard projection&lt;br /&gt;
&lt;br /&gt;
#we find coordinates to zoom by based on polygon bounds:&lt;br /&gt;
minlon,maxlon,minlat,maxlat=geom.bounds&lt;br /&gt;
zoomin=geom.bounds&lt;br /&gt;
pad=2 #padding in degrees, adjust as needed&lt;br /&gt;
&lt;br /&gt;
dataproj=ccrs.PlateCarree()&lt;br /&gt;
mapproj=ccrs.PlateCarree() #regular, fine for global&lt;br /&gt;
&lt;br /&gt;
fig, ax = plt.subplots(1, 1, subplot_kw=dict(projection=mapproj), figsize=(14,14))&lt;br /&gt;
#ax.set_global()&lt;br /&gt;
ax.set_extent((minlon-pad, maxlon+pad, minlat-pad, maxlat+pad),crs=dataproj) &lt;br /&gt;
ax.coastlines(&#039;10m&#039;) #choices 110m, 50m and 10m. m does not mean meter, but 1:Xmillion.&lt;br /&gt;
ax.add_feature(cfeature.BORDERS, linestyle=&#039;:&#039;)&lt;br /&gt;
ax.gridlines(color=&#039;k&#039;,alpha=0.3,linestyle=&#039;:&#039;)&lt;br /&gt;
pixelplot=ax.pcolormesh(global_lons,global_lats,mask_full,transform=dataproj,cmap=&#039;bwr&#039;)&lt;br /&gt;
ax.set_title(&#039;zoom-in standard map proj \n full mask&#039;)&lt;br /&gt;
&lt;br /&gt;
#as you will see, this is not very good unless global mask or close to equator&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
# %% closeup-geograpical, better projection choice&lt;br /&gt;
&lt;br /&gt;
#when switching to LambertConformal projection, or others, it can no longer handle a input data set that is global.&lt;br /&gt;
#it will simply plot nothing. Known bug/undesired behavoir in cartopy from cyclic points and transformations, or something like that&lt;br /&gt;
#we will therefore make a subset of the data based &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
minlon,maxlon,minlat,maxlat=geom.bounds&lt;br /&gt;
zoomin=geom.bounds&lt;br /&gt;
pad=5 #padding in degrees&lt;br /&gt;
&lt;br /&gt;
#xs and ys to subset data with&lt;br /&gt;
xss1=np.where(global_lons==(minlon-pad))[0][0]&lt;br /&gt;
xss2=np.where(global_lons==(maxlon+pad))[0][0]&lt;br /&gt;
yss1=np.where(global_lats==(minlat-pad))[0][0]&lt;br /&gt;
yss2=np.where(global_lats==(maxlat+pad))[0][0]&lt;br /&gt;
mask_inner_subset=mask_inner[yss1:yss2+1,xss1:xss2+1]&lt;br /&gt;
mask_edge_subset=mask_edge[yss1:yss2+1,xss1:xss2+1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dataproj=ccrs.PlateCarree()&lt;br /&gt;
#mapproj=ccrs.PlateCarree()&lt;br /&gt;
#this specific mapproj and settings are nice for Scandinavia, specifically.&lt;br /&gt;
#test different projections/settings to fit your mask&lt;br /&gt;
&lt;br /&gt;
mapproj=ccrs.LambertConformal(central_longitude=8, central_latitude=60, &lt;br /&gt;
    false_easting=0.0, false_northing=0.0, secant_latitudes=None,&lt;br /&gt;
    standard_parallels=None, globe=None, cutoff=-30)&lt;br /&gt;
&lt;br /&gt;
fig, ax = plt.subplots(1, 1, subplot_kw=dict(projection=mapproj), figsize=(14,14))&lt;br /&gt;
#ax1.set_global()&lt;br /&gt;
ax.set_extent((3,27,53,73),crs=dataproj) #fine for scandinavia&lt;br /&gt;
ax.coastlines(&#039;10m&#039;) #choices 110m, 50m and 10m. m does not mean meter, but 1:Xmillion.&lt;br /&gt;
ax.add_feature(cfeature.BORDERS, linestyle=&#039;:&#039;)&lt;br /&gt;
ax.gridlines(color=&#039;k&#039;,alpha=0.3,linestyle=&#039;:&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#matplotlib.colors.to_rgba(c, alpha=None)&lt;br /&gt;
&lt;br /&gt;
alpha=0.3&lt;br /&gt;
edgeplot=ax.pcolormesh(global_lons[xss1:xss2+1],global_lats[yss1:yss2+1],mask_inner_subset,&lt;br /&gt;
                          transform=dataproj,cmap=&#039;Reds&#039;,shading=&#039;auto&#039;,edgecolor=&#039;lightgrey&#039;,alpha=alpha,label=&#039;_inner&#039;)&lt;br /&gt;
&lt;br /&gt;
innerplot=ax.pcolormesh(global_lons[xss1:xss2+1],global_lats[yss1:yss2+1],mask_edge_subset,&lt;br /&gt;
                          transform=dataproj,cmap=&#039;Blues&#039;,shading=&#039;auto&#039;,edgecolor=&#039;lightgrey&#039;,alpha=alpha,label=&#039;_edge&#039;)&lt;br /&gt;
&lt;br /&gt;
xs=[x[0] for x in coordinates]&lt;br /&gt;
ys=[y[1] for y in coordinates]&lt;br /&gt;
nodesplot=ax.scatter(xs,ys,s=50,c=&#039;yellow&#039;,transform=dataproj,marker=&#039;o&#039;,label=&#039;_nodes&#039;)&lt;br /&gt;
&lt;br /&gt;
pathplot=ax.add_geometries([geom],dataproj,facecolor=&#039;none&#039;, edgecolor=&#039;green&#039;,label=&#039;_path&#039;)&lt;br /&gt;
&lt;br /&gt;
ax.set_title(&#039;better projection zoom in \n inner, edge, nodes and path&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# #make artifical legend elements:&lt;br /&gt;
# note: the hidden _labels in the plots are because else it makes plotting really, really show as it checks for a label first&lt;br /&gt;
&lt;br /&gt;
red_patch = mpatches.Patch(color=mcolors.to_rgba(&#039;red&#039;,alpha=alpha), label=&#039;inner points&#039;)&lt;br /&gt;
blue_patch = mpatches.Patch(color=mcolors.to_rgba(&#039;blue&#039;,alpha=alpha), label=&#039;edge points&#039;)&lt;br /&gt;
yellow_dots = mlines.Line2D([],[],color=&#039;yellow&#039;,marker=&#039;o&#039;,linestyle=None, label=&#039;nodes&#039;)&lt;br /&gt;
black_line = mlines.Line2D([],[],color=&#039;green&#039;,marker=None,linestyle=&#039;-&#039;, label=&#039;path&#039;)&lt;br /&gt;
&lt;br /&gt;
ax.legend(handles=[red_patch,blue_patch,yellow_dots,black_line],loc=&#039;upper right&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# %% make netcdf file&lt;br /&gt;
&lt;br /&gt;
#outcommented now. only comment in when making.&lt;br /&gt;
#remember you cannot change in an already created netcdf file, so make sure you create a new one first&lt;br /&gt;
&lt;br /&gt;
# homemade_mask=nc4.Dataset(&#039;homemade_mask.nc&#039;,&#039;w&#039;,format=&#039;NETCDF4&#039;)&lt;br /&gt;
&lt;br /&gt;
# lon = homemade_mask.createDimension(&amp;quot;lon&amp;quot;, global_lons.size)&lt;br /&gt;
# lon = homemade_mask.createVariable(&amp;quot;lon&amp;quot;, &amp;quot;f8&amp;quot;,(&amp;quot;lon&amp;quot;), zlib=True)&lt;br /&gt;
# lon[:]=global_lons #put data in&lt;br /&gt;
&lt;br /&gt;
# lon.units=&amp;quot;degrees_east&amp;quot;&lt;br /&gt;
# lon.standard_name=&amp;quot;longitude&amp;quot;&lt;br /&gt;
# lon.long_name=&amp;quot;longitude&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# lat = homemade_mask.createDimension(&amp;quot;lat&amp;quot;, global_lats.size)&lt;br /&gt;
# lat = homemade_mask.createVariable(&amp;quot;lat&amp;quot;, &amp;quot;f8&amp;quot;,(&amp;quot;lat&amp;quot;), zlib=True)&lt;br /&gt;
# lat[:]=global_lats #put data in&lt;br /&gt;
&lt;br /&gt;
# lat.units=&amp;quot;degrees_north&amp;quot;&lt;br /&gt;
# lat.standard_name=&amp;quot;laitude&amp;quot;&lt;br /&gt;
# lat.long_name=&amp;quot;laitude&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# time = homemade_mask.createDimension(&amp;quot;time&amp;quot;,None)&lt;br /&gt;
# time = homemade_mask.createVariable(&amp;quot;time&amp;quot;, &amp;quot;f8&amp;quot;, (&amp;quot;time&amp;quot;), zlib=True)&lt;br /&gt;
&lt;br /&gt;
# tunits=&#039;days since 0001-01-01&#039;&lt;br /&gt;
# calendar=&#039;standard&#039;&lt;br /&gt;
# time.units=tunits&lt;br /&gt;
# time.calendar=calendar&lt;br /&gt;
# time.standard_name=&amp;quot;time&amp;quot;&lt;br /&gt;
# time[:]=0 #it needs atleast one time to work with watersip&lt;br /&gt;
&lt;br /&gt;
# mask = homemade_mask.createVariable(&amp;quot;mask&amp;quot;, &amp;quot;f8&amp;quot;, (&amp;quot;time&amp;quot;,&amp;quot;lat&amp;quot;,&amp;quot;lon&amp;quot;), zlib=True)&lt;br /&gt;
# mask[0,:,:]=mask_full #put the mask data in&lt;br /&gt;
# mask.units=&amp;quot;mm/day&amp;quot;&lt;br /&gt;
# mask.xmin=-180&lt;br /&gt;
# mask.xmax=180&lt;br /&gt;
# mask.xstag=180&lt;br /&gt;
# mask.ymin=-90&lt;br /&gt;
# mask.ymax=90&lt;br /&gt;
# mask.ystag=90&lt;br /&gt;
&lt;br /&gt;
# # time = mob_flux.createDimension(&amp;quot;time&amp;quot;,None)&lt;br /&gt;
&lt;br /&gt;
# # times = mob_flux.createVariable(&amp;quot;time&amp;quot;,&amp;quot;f8&amp;quot;,(&amp;quot;time&amp;quot;),zlib=True)&lt;br /&gt;
&lt;br /&gt;
# # times.units = tunits&lt;br /&gt;
# # times.calendar = calendar&lt;br /&gt;
# # dates=fluxdata_5s.index.to_pydatetime()&lt;br /&gt;
# # times[:] = nc4.date2num(dates, units=tunits, calendar=calendar)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# homemade_mask.close() #remember to close the file&lt;br /&gt;
&lt;br /&gt;
# %% OUTSIDE PYTHON&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
in a terminal, navigate to where you newly created mask file is&lt;br /&gt;
then use&lt;br /&gt;
&amp;quot;cdo -f nc2 copy mask-from-python.nc mask-to-watersip.nc&lt;br /&gt;
&amp;quot;&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1432</id>
		<title>WaterSip</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1432"/>
		<updated>2021-01-15T08:40:03Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===About WaterSip===&lt;br /&gt;
&lt;br /&gt;
WaterSip is a diagnostic software tool that identifies source, transport and arrival properties of atmospheric water vapour based on airmass backward trajectories. As a prerequisite, the backward trajectories for the analysis are to be obtained from a trajectory calculation tool, such as FLEXPART [[http://www.flexpart.eu]] or Lagranto [[http://www.lagranto.iac.ethz.ch]]. Moisture sources are then identified from changes in specific humidity interpolated to the air parcel trajectory per time step. The changes in specific humidity at each time step are set in relation with the current humidity of the air parcel. This allows to estimate the quantitative contribution of moisture to the air parcel at a specific location, a so-called moisture accounting. WaterSip identifies and aggregates further properties of the moisture source and during the moisture transport, such as temperature, pressure, latitude etc. The moisture source diagnostic is described in detail in [[Sodemann et al. (2008)]]. Publications using the WaterSip diagnostic are listed in section [[Bibliography]].&lt;br /&gt;
&lt;br /&gt;
===Working principle===&lt;br /&gt;
&lt;br /&gt;
Explanation from Sodemann et al. 2008a&lt;br /&gt;
&lt;br /&gt;
Image from Läderach and Sodemann, 2016 or Sodemann et al., 2008a&lt;br /&gt;
&lt;br /&gt;
Moisture source information&lt;br /&gt;
&lt;br /&gt;
- Accounted fraction fa, fb, fa+fb&lt;br /&gt;
- adding below and above boundary layer or not, when&lt;br /&gt;
- choosing threshold values for Arctic and other regions&lt;br /&gt;
- identifying moisture transport&lt;br /&gt;
&lt;br /&gt;
Arrival information and Lagrangian forward projections&lt;br /&gt;
&lt;br /&gt;
- arrival parameters&lt;br /&gt;
- transport parameters&lt;br /&gt;
- source parameters&lt;br /&gt;
- averaging by contribution and amount&lt;br /&gt;
&lt;br /&gt;
Series information&lt;br /&gt;
&lt;br /&gt;
- sectorization (Sodemann and Zubler, 2010; definition table, code changes)&lt;br /&gt;
- weighted averaging: The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and deviding by the total precipitation.&lt;br /&gt;
&lt;br /&gt;
Averaged properties&lt;br /&gt;
&lt;br /&gt;
- histogram example and modification (code below)&lt;br /&gt;
&lt;br /&gt;
Trajectories&lt;br /&gt;
&lt;br /&gt;
- plotting/reading example (code below)&lt;br /&gt;
&lt;br /&gt;
Uncertainties&lt;br /&gt;
&lt;br /&gt;
===Example setups===&lt;br /&gt;
&lt;br /&gt;
Three examples with different purposes&lt;br /&gt;
&lt;br /&gt;
====Water vapour====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
====Extratropical precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
 &lt;br /&gt;
====High latitude precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
===Version history===&lt;br /&gt;
&lt;br /&gt;
Version 2.1&lt;br /&gt;
&lt;br /&gt;
Version 2.2&lt;br /&gt;
&lt;br /&gt;
Version 2.3&lt;br /&gt;
&lt;br /&gt;
Version 2.4&lt;br /&gt;
&lt;br /&gt;
Version 2.5&lt;br /&gt;
&lt;br /&gt;
Version 2.8&lt;br /&gt;
&lt;br /&gt;
Version 2.8.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9&lt;br /&gt;
&lt;br /&gt;
Version 2.9.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9.2&lt;br /&gt;
&lt;br /&gt;
Version 2.9.3&lt;br /&gt;
&lt;br /&gt;
Version 2.9.4&lt;br /&gt;
&lt;br /&gt;
Version 3.0.8&lt;br /&gt;
&lt;br /&gt;
Version 3.1&lt;br /&gt;
&lt;br /&gt;
The current version of WaterSip is V3.1.0. &lt;br /&gt;
&lt;br /&gt;
===Running the WaterSip diagnostic===&lt;br /&gt;
&lt;br /&gt;
It is advised to create a link to the binary file of WaterSip in your /home/$USER/bin or project directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/bin&lt;br /&gt;
ln -s /Data/gfi/projects/isomet/progs/WaterSip_tool/WaterSip3 ~/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load netCDF-C++&lt;br /&gt;
WaterSip3 &amp;lt;WATERSIP_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the UiB hpc environment requires the above &#039;module load&#039; command to be executed first.&lt;br /&gt;
&lt;br /&gt;
On cyclone.hpc.uib.no, a run script is available that makes repeated similar runs easier to manage. Only essential parameters have to be changed, such as the target coordinates and case name. These will then be replaced on a template INPUT_WATERSIP file, and then WaterSip will be started. The script and an input file template can be copied like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/run_watersip_template_Bergen_2018.sh .&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/INPUT_WATERSIP_template_Bergen_2018 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Input file conversion from V2====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WaterSip3 -c &amp;lt;WATERSIP_V2_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a new file named &amp;lt;WATERSIP_V2_parameter_file&amp;gt;V3 at the current directory. It is recommended to double check and edit the settings in the converted file before starting a simulation.&lt;br /&gt;
&lt;br /&gt;
====Parallelization====&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
If WaterSip3 is to be executed on a queue system (not applicable to cyclone.hpc.uib.no), the following wrapper script can be used to start a run using 4 cores for parallel processing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# start with sbatch NAME_OF_THIS_FILE directly on machine&lt;br /&gt;
&lt;br /&gt;
#SBATCH --job-name=WaterSip3&lt;br /&gt;
#SBATCH --workdir=/tmp/&lt;br /&gt;
#SBATCH --partition=priority&lt;br /&gt;
#SBATCH --output=WaterSip_job.%j.out&lt;br /&gt;
#SBATCH --error=WaterSip_job.%j.err&lt;br /&gt;
#SBATCH --mail-type=END&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --cpus-per-task=4&lt;br /&gt;
&lt;br /&gt;
srun ./WaterSip3 INPUT_WATERSIP_global_1993&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating mask files====&lt;br /&gt;
&lt;br /&gt;
WaterSip allows to define target regions not only by coordinates, but also by mask files. This is a short introduction to creating a mask for use with WaterSip.&lt;br /&gt;
&lt;br /&gt;
The procedure described here  uses python to create the netcdf file with the mask, and CDO to change the netcdf file format such that it can be read in by watersip.&lt;br /&gt;
&lt;br /&gt;
Required python packages [tested version]: numpy [1.19.1], shapely [1.6.4.post1], netCDF4 [1.5.3] and if loading from a csv, pandas [1.1.3]&lt;br /&gt;
&lt;br /&gt;
Optional packages (for plotting): matplotlib [3.3.1], cartopy [0.16.0]&lt;br /&gt;
&lt;br /&gt;
[[File:watersip_mask-guide.png|600px]]&lt;br /&gt;
Figure: Example for Scandinavia&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Basic principle:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using shapely’s .contains and .touches methods on a polygon with a point in vectorized version (taking a list of points instead of just one point for speed). &lt;br /&gt;
This enables more interactive editing on a grid spacing of 0.25x0.25 degree (1M grid points).&lt;br /&gt;
After calculation, the script performs a boolean OR operation on the two masks to get the combined of inner and edge points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mask_inner=shapely.vectorized.contains(geom, x, y) # - for interior points&lt;br /&gt;
mask_edge=shapely.vectorized.touches(geom, x, y) #- for edge points&lt;br /&gt;
mask_full=mask_inner|mask_edge # | is boolean OR bitwise (elementwise) operator.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
list of coordinates of pairs of lat, lon defining the nodes of the polygon mask.&lt;br /&gt;
&lt;br /&gt;
global meshgrid with a given resolution&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Output:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Boolean mask of False and True in the shape of the meshgrid lat-lon&lt;br /&gt;
&lt;br /&gt;
After using python script, convert to a netCDF format readable by WaterSip by using the command below in a terminal where you newly created mask file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cdo -f nc2 copy mask-from-python.nc mask-to-watersip.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For reference, and instructions on how to load political, and other, geometries straight from NaturalEarth dataset, go to&lt;br /&gt;
[[https://gist.github.com/pelson/9785576]]&lt;br /&gt;
&lt;br /&gt;
[[MaskCode|Python program code available here|]]&lt;br /&gt;
&lt;br /&gt;
=== Input file options ===&lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;code&amp;gt;[Case]&amp;lt;/code&amp;gt;). There are 7 option groups which can appear in random order in the input file:&lt;br /&gt;
&lt;br /&gt;
*Case: general settings related to the case to be extracted&lt;br /&gt;
*Grids: specification of different output grids&lt;br /&gt;
*Diagnostrics: parameters of the moisture diagnostic&lt;br /&gt;
*Output: general output settings&lt;br /&gt;
*Variables: selection of output variables&lt;br /&gt;
*Flexpart: options specific to runs using FLEXPART particle output&lt;br /&gt;
*Lagranto: options specific to runs using Lagranto trajectories&lt;br /&gt;
&lt;br /&gt;
====Parameter set Case====&lt;br /&gt;
&lt;br /&gt;
The settings in this parameter category describe the basic conditions of the diagnostic run.&lt;br /&gt;
&lt;br /&gt;
;caseName (string)&lt;br /&gt;
: identifier for the run, prepended to all output files. Example: &amp;lt;code&amp;gt;caseName = global_201002_relative&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;inputDir (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;inputDir = /Volumes/Data/global/shortposit_%s&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;outputDir (string)&lt;br /&gt;
: path where the output files will be created. Example: &amp;lt;code&amp;gt;outputDir = /Volumes/Data/global/output/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;startDate (date string)&lt;br /&gt;
: inital date of the run, fixed format YYYYMMDD-HHMMSS. Start date is latest date of the run which moves backward in time. Example: &amp;lt;code&amp;gt;startDate = 20100228-180000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;endDate (date string)&lt;br /&gt;
: final date of the run, fixed format YYYYMMDD-HHMMSS. End date is earliest date of the run. Example: &amp;lt;code&amp;gt;endDate = 20100211-000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;timeStep (integer)&lt;br /&gt;
: time step in hours between particles or trajectory output times. (typical values 6, 3, or 1 (hours)). Example: &amp;lt;code&amp;gt;timeStep = 6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajPoints (integer)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;trajPoints = 21&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;minTrajPoints (integer)&lt;br /&gt;
: minimum length of trajectories to be included in analysis. Parameter is only relevant for Lagranto simulations with uneven trajectory length. Example: &amp;lt;code&amp;gt;minTrajPoints = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sectorizeRegion (integer)&lt;br /&gt;
: region set used to divide moisture sources into different sectors (see [[#sectorization]]). Example: &amp;lt;code&amp;gt;sectorizeRegion = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterBoxFile (string)&lt;br /&gt;
: path to the text file describing geographic boxes used to filter air parcels during transport (see [[#box filters]]). Example: &amp;lt;code&amp;gt;filterBoxFile = /home/hso039/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterIndex (integer)&lt;br /&gt;
: used line from the filterBoxFile to select/deselect trajectories. Example: &amp;lt;code&amp;gt;filterIndex = -1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;orographyFile (string)&lt;br /&gt;
: path to the orography file used to select arrival based on underying topography, using the ETOPO2 topography. File in netcdf format. Example: &amp;lt;code&amp;gt;orographyFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/etopo5.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;lsmFile (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;lsmFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maskFile (string)&lt;br /&gt;
: path to file with an arrival selection. Example: &amp;lt;code&amp;gt;maskFile = &amp;quot; &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;useMask (boolean)&lt;br /&gt;
: use mask file (0=no, 1=yes). Example: &amp;lt;code&amp;gt;useMask = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;ompThreads (integer)&lt;br /&gt;
: number of threads to be used with OpenMP parallelisation if compiled with flag -fopenmp (1=no parallelisation, &amp;gt;1 parallelisation activated.). Example: &amp;lt;code&amp;gt;ompThreads = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;showStats (boolean)&lt;br /&gt;
: print statistics about particle processing to the command line (0=off, 1=on). Example: &amp;lt;code&amp;gt;showStats = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Grids====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category specify the different output grids and the gridding method&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLon (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLon (float)&lt;br /&gt;
: maximum longitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalgridmaxlon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMaxLat = 90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDx (float)&lt;br /&gt;
: longitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDy (float)&lt;br /&gt;
: latitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridRadius (float)&lt;br /&gt;
: gridding radius for information from arriving trajectories. Example: &amp;lt;code&amp;gt;arrivalGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLon (float)&lt;br /&gt;
: minimum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLon (float)&lt;br /&gt;
: maximum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLat (float)&lt;br /&gt;
: minimum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLat (float)&lt;br /&gt;
: maximum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLat = 90&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;sourceGridDx (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridDy (float)&lt;br /&gt;
: latitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridRadius (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;griddingType (integer)&lt;br /&gt;
: select [[#gridding algorithm]] (1: fast and simple gridding, 2: improved but slower gridding). Example: &amp;lt;code&amp;gt;griddingType = 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Diagnostics====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category control the way how the diagnostic works, and which trajectories should be considered in the run.&lt;br /&gt;
&lt;br /&gt;
;uptakeThreshold (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;uptakeThreshold = 0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipThreshold (float)&lt;br /&gt;
: 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 precipThreshold is specified as percent decrease relative to the current specific humidity of an air parcel. Then the value is negative. Default absolute values are -0.1 to -0.2 for 3h and 6h time steps. Example: &amp;lt;code&amp;gt;precipThreshold = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;relativeThreshold (boolean)&lt;br /&gt;
: determines whether absolute threshold values or relative threshold values are specified (0: absolute, 1: relative threshold values). Example: &amp;lt;code&amp;gt;relativeThreshold = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease larger than the value given by &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt; to the same number. Example: &amp;lt;code&amp;gt;arrivalPrecipMin = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease of up to the value given by &amp;lt;code&amp;gt;arrivalprecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;relativeThresholds&amp;lt;/code&amp;gt; is set to false, or a value of 1.0 otherwise. The combination of the &amp;lt;code&amp;gt;arrivalPrecipMin/Max&amp;lt;/code&amp;gt; parameters allows to focus on heavy and weak precipitation events only. Example: &amp;lt;code&amp;gt;arrivalPrecipMax = -100.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is larger than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt;. 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. Example: &amp;lt;code&amp;gt;arrivalRHMin = 80&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is less than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt;. Units are %. This parameter in combination with &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; can be used to focus on condensation/no condensation cases when the parameter &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is set to true. Example: &amp;lt;code&amp;gt;arrivalRHMax = 110&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMin (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalOroMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the ETOPO2 topography does not exceed the given value (in m). In combination with . Example: &amp;lt;code&amp;gt;arrivalOroMin&amp;lt;/code&amp;gt;, regions with a complex shape but common elevation can be selected easily. Example: &amp;lt;code&amp;gt;arrivalOroMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMin (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are above at the given altitude (in m above sea level). Example: &amp;lt;code&amp;gt;arrivalAltMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are below the given altitude (in m above sea level). The parameters &amp;lt;code&amp;gt;arrivalAltMin/Max&amp;lt;/code&amp;gt; can be used to conduct vertically stratified analyses.Example: &amp;lt;code&amp;gt;arrivalAltMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;blhScale (float)&lt;br /&gt;
: 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 &#039;moisture sources boundary-layer&#039;, all others to the category &#039;moisture sources free troposphere&#039;. Default value is 1.5. Example: &amp;lt;code&amp;gt;blhScale = 1.5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;analyzeVapour (boolean)&lt;br /&gt;
: Parameter allowing to analyze vapour origin instead of precipitation origin. Setting this parameter to true considers all air parcels during arrival, not just the ones that precipitate according to the precipitation threshold. If set to true, the &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalRHMin/Max&amp;lt;/code&amp;gt; parameters also need modification. Typically, one will set the &amp;lt;code&amp;gt;precipitation threshold&amp;lt;/code&amp;gt; to a small or even positive number, and the &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; to 0 and &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt; to 110 to include all arriving trajectories. It is often preferrable then to set the &amp;lt;code&amp;gt;arrivalAltMax&amp;lt;/code&amp;gt; to values of around 1000m for surface station measurements, for example. If &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is 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. Example: &amp;lt;code&amp;gt;analyzeVapour = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;assignToUptake (boolean)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;assignToUptake = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;forwardProjectionMode (integer)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;forwardProjectionMode = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Output====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category determine which output files should be created.&lt;br /&gt;
&lt;br /&gt;
;stepFile (boolean)&lt;br /&gt;
: write parameters on [[#Grid files]] and [[#Series files]] for each time step. Example: &amp;lt;code&amp;gt;stepFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;dayFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each day. Example: &amp;lt;code&amp;gt;dayFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;monthFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each month. Example: &amp;lt;code&amp;gt;monthFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;yearFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each year. Example: &amp;lt;code&amp;gt;yearFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;allFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for all time steps. Example: &amp;lt;code&amp;gt;allFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;staticFields (boolean)&lt;br /&gt;
: write static fields (land-sea mask and topography) onto grid files. Example: &amp;lt;code&amp;gt;staticFields = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveTraj (integer)&lt;br /&gt;
: write particle trajectories to [[#Trajectory files]] at each time step (1) or each month (2). Option 0 disables trajectory output. Example: &amp;lt;code&amp;gt;saveTraj = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;skipTraj (boolean)&lt;br /&gt;
: write every nth trajectory to reduce traj file size (1:disabled, &amp;gt;=2: stride size). Example: &amp;lt;code&amp;gt;skipTraj = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveHistogram (boolean)&lt;br /&gt;
: write histogram for selected parameters to a [[#Histogram files]] (0: disabled, 1:enabled). Example: &amp;lt;code&amp;gt;saveHistogram = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveMean (boolean)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;saveMean = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Variables====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category allow to include or exclude specific variables from the output files. Setting the output for unused variables to 0 (disabled) will speed up computation time, reduce the memory footprint, and reduce the output file size. Only parameters that are really required from a run should therefore selected as enabled.&lt;br /&gt;
&lt;br /&gt;
;sourcesBoundaryLayer (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the boundary layer to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesBoundaryLayer = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourcesFreeTroposphere (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the free troposphere to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesFreeTroposphere = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;evaporationMinusPrecipitation (boolean)&lt;br /&gt;
: write unweighted evaporation minus precipitation along entire trajectory length to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;evaporationMinusPrecipitation = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;moistureTransport (boolean)&lt;br /&gt;
: write weighted moisture transport along trajectories to grid and series output files (0: disabled, 1: enabled). Units are mm. Example: &amp;lt;code&amp;gt;moistureTransport = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajectoryLocations (boolean)&lt;br /&gt;
: write trajectory locations to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Example: &amp;lt;code&amp;gt;trajectoryLocations = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipitationEstimate (boolean)&lt;br /&gt;
: write precipitation estimate at arrival to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;precipitationEstimate = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLongitude (boolean)&lt;br /&gt;
: write weighted moisture source longitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees longitude. Example: &amp;lt;code&amp;gt;sourceLongitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLatitude (boolean)&lt;br /&gt;
: write moisture source latitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees latitude. Example: &amp;lt;code&amp;gt;sourceLatitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionCount (boolean)&lt;br /&gt;
: write convection count projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Convection count can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionCount is not on the ERA-Interim climatology run. The counter is increased each time the particles passes the convection scheme upwards. Example: &amp;lt;code&amp;gt;convectionCount = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionHeight (boolean)&lt;br /&gt;
: write convection height projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Convection height can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionHeight is not on the ERA-Interim climatology run. The value gives an average height of vertical displacement when the particles passes the convection scheme. Example: &amp;lt;code&amp;gt;convectionHeight = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;landFraction (boolean)&lt;br /&gt;
: write fraction of moisture sources over land projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;landFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;boundaryLayerFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;boundaryLayerFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;freeTroposphereFraction (boolean)&lt;br /&gt;
: write accounted fraction of free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;freeTroposphereFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;combinedFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer and free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). This is the sum of the two previous variables. Example: &amp;lt;code&amp;gt;combinedFraction = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTime (boolean)&lt;br /&gt;
: write moisture transport time projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are hours. Example: &amp;lt;code&amp;gt;transportTime = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSpecificHumidity (boolean)&lt;br /&gt;
: write surface specific humidity at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are g per kg. Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSpecificHumidity = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportDistance (boolean)&lt;br /&gt;
: write transport distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Transport distance is the length of the actual travel path along the trajectories from moisture source to the arrival region. Example: &amp;lt;code&amp;gt;transportDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDistance (boolean)&lt;br /&gt;
: write source distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Source distance is the shortest distance between the moisture source and the arrival region. Example: &amp;lt;code&amp;gt;sourceDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;source2mTemperature (boolean)&lt;br /&gt;
: write 2m temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;source2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDeuteriumExcess (boolean)&lt;br /&gt;
: write deuterium excess projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are permil. Deuterium excess is calculated from the relative humidity with respect to SST and the relationship from Pfahl and Sodemann (2014). Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceDeuteriumExcess = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperature during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;transportTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportPressure (boolean)&lt;br /&gt;
: write moisture-weighted pressure during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;transportPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;condensationTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperatures where RH&amp;lt;sub&amp;gt;liquid&amp;lt;/sub&amp;gt; exceeds 80% to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;condensationTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalTemperature (boolean)&lt;br /&gt;
: write temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;arrivalTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPressure (boolean)&lt;br /&gt;
: write pressure during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;arrivalPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrival2mTemperature (boolean)&lt;br /&gt;
: write temperature at 2m during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that 2m temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrival2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrivalSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Flexpart====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
;inputFormat (integer)&lt;br /&gt;
: 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/NorESM data short format, 4: global reanalysis data long format, 5 regional reanalysis/NorESM data short format. Example: &amp;lt;code&amp;gt;inputFormat = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maxPart (integer)&lt;br /&gt;
: number of particles contained in a single FLEXPART partposit or shortposit file. Example: &amp;lt;code&amp;gt;maxPart = 5000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partMass (float)&lt;br /&gt;
: atmospheric mass represented by each particle in kilogramms. Parameter is written out by specific version of FLEXPART to create WaterSip output data. Example: &amp;lt;code&amp;gt;partMass = 1.01943e+12&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partStride (integer)&lt;br /&gt;
: number of particles to skip during processing to speed up calculations (1: use every particle, &amp;gt;=2: use every 2nd particle, etc). Example: &amp;lt;code&amp;gt;partStride = 10&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;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). Example: &amp;lt;code&amp;gt;allowReenter = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Lagranto====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Full example for a FLEXPART run input file:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Case]&lt;br /&gt;
caseName = global_201002_final_relativex&lt;br /&gt;
inputDir = /home/data/flexpart/global/shortposit_%s&lt;br /&gt;
outputDir=/home/data/watersip/global_201002_V3/&lt;br /&gt;
startDate = 20100228-180000&lt;br /&gt;
endDate = 20100211-000000&lt;br /&gt;
timeStep = 6&lt;br /&gt;
sectorizeRegion = 0&lt;br /&gt;
filterBoxFile = /home/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&lt;br /&gt;
filterIndex = -1&lt;br /&gt;
orographyFile = &amp;quot;/home/projects/WaterSip_tool/etopo5.nc&amp;quot;&lt;br /&gt;
lsmFile = &amp;quot;/home/projects/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&lt;br /&gt;
maskFile = &amp;quot; &amp;quot;&lt;br /&gt;
useMask = 0&lt;br /&gt;
trajPoints = 41&lt;br /&gt;
minTrajPoints = 0&lt;br /&gt;
ompThreads = 1&lt;br /&gt;
showStats = 0&lt;br /&gt;
&lt;br /&gt;
[Grids]&lt;br /&gt;
arrivalGridMinLon = -180&lt;br /&gt;
arrivalGridMaxLon = 180&lt;br /&gt;
arrivalGridMinLat = -90&lt;br /&gt;
arrivalGridMaxLat = 90&lt;br /&gt;
arrivalGridDx = 1&lt;br /&gt;
arrivalGridDy = 1&lt;br /&gt;
arrivalGridRadius = 200&lt;br /&gt;
sourceGridMinLon = -180&lt;br /&gt;
sourceGridMaxLon = 180&lt;br /&gt;
sourceGridMinLat = -90&lt;br /&gt;
sourceGridMaxLat = 90&lt;br /&gt;
sourceGridDx = 1&lt;br /&gt;
sourceGridDy = 1&lt;br /&gt;
sourceGridRadius = 200&lt;br /&gt;
griddingType = 2&lt;br /&gt;
&lt;br /&gt;
[Diagnostics]&lt;br /&gt;
uptakeThreshold = 0.05&lt;br /&gt;
precipThreshold = 0.05&lt;br /&gt;
blhScale = 1.5&lt;br /&gt;
arrivalPrecipMin = 0.05&lt;br /&gt;
arrivalPrecipMax = 1.0&lt;br /&gt;
arrivalRHMin = 80&lt;br /&gt;
arrivalRHMax = 110&lt;br /&gt;
arrivalOroMin = -100&lt;br /&gt;
arrivalOroMax = 12000&lt;br /&gt;
arrivalAltMin = -100&lt;br /&gt;
arrivalAltMax = 12000&lt;br /&gt;
analyzeVapour = 0&lt;br /&gt;
assignToUptake = 0&lt;br /&gt;
forwardProjectionMode = 3&lt;br /&gt;
relativeThreshold = 1&lt;br /&gt;
&lt;br /&gt;
[Output]&lt;br /&gt;
stepFile = 1&lt;br /&gt;
dayFile = 1&lt;br /&gt;
monthFile = 1&lt;br /&gt;
yearFile = 1&lt;br /&gt;
allFile = 1&lt;br /&gt;
staticFields = 1&lt;br /&gt;
saveTraj = 0&lt;br /&gt;
skipTraj = 0&lt;br /&gt;
saveHistogram = 0&lt;br /&gt;
saveMean = 0&lt;br /&gt;
&lt;br /&gt;
[Variables]&lt;br /&gt;
sourcesBoundaryLayer = 1&lt;br /&gt;
sourcesFreeTroposphere = 1&lt;br /&gt;
evaporationMinusPrecipitation = 1&lt;br /&gt;
moistureTransport = 1&lt;br /&gt;
trajectoryLocations = 1&lt;br /&gt;
precipitationEstimate = 1&lt;br /&gt;
sourceLongitude = 1&lt;br /&gt;
sourceLatitude = 1&lt;br /&gt;
convectionCount = 0&lt;br /&gt;
convectionHeight = 0&lt;br /&gt;
landFraction = 1&lt;br /&gt;
boundaryLayerFraction = 1&lt;br /&gt;
freeTroposphereFraction = 1&lt;br /&gt;
combinedFraction = 0&lt;br /&gt;
transportTime = 1&lt;br /&gt;
sourceSkinTemperature = 1&lt;br /&gt;
sourceSpecificHumidity = 0&lt;br /&gt;
transportDistance = 1&lt;br /&gt;
sourceDistance = 1&lt;br /&gt;
source2mTemperature = 0&lt;br /&gt;
sourceDeuteriumExcess = 1&lt;br /&gt;
transportTemperature = 1&lt;br /&gt;
transportPressure = 1&lt;br /&gt;
condensationTemperature = 1&lt;br /&gt;
arrivalTemperature = 1&lt;br /&gt;
arrivalPressure = 1&lt;br /&gt;
arrival2mTemperature = 0&lt;br /&gt;
arrivalSkinTemperature = 1&lt;br /&gt;
&lt;br /&gt;
[Flexpart]&lt;br /&gt;
inputFormat = 3&lt;br /&gt;
maxPart = 5000000&lt;br /&gt;
partMass = 1.01943e+12&lt;br /&gt;
partStride = 10&lt;br /&gt;
allowReenter = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Output file formats===&lt;br /&gt;
&lt;br /&gt;
The results from the WaterSip diagnostic are written to a set of output files in different format. The main output files are created in netCDF with detailed metadata information, including the parameter settings of the run for automated documentation. The creation of different output files can be adapted by parameter settings in parameter set *Output* and the contained variables with settings in parameter set *Variables*. Spatial fields at different time intervals are written to so-called grid files in [[netCDF]] format, time series of averaged quantities at different time intervals are written to so-called Series files in netCDF format, histograms of selected quantities identified during the processing for each time step and each trajectory are written to Histogram files in ASCII format, and trajectories are written to Trajectory files in either the binary format traj or the Lagranto ASCII format. Earlier versions than V3 reported output in so-called Mean files in an ASCII format. That format is documented here but no longer in use in current versions of WaterSip.&lt;br /&gt;
&lt;br /&gt;
The time unit has changed in Version 3.1. Previously, the unit was set to &amp;quot;days since 0000-01-02 00:00:00&amp;quot; to allow matlab-compatible values for time that could directly be utilized with the datenum() commands. In order to confirm to netCDF-CF standards, where no calendar year 0000 exists, the time unit is now &amp;quot;days since 0001-01-01 00:00:00&amp;quot;. This provides the ability to open and visualize netCDF output files directly with tools such as ncview and panoply. To convert the time values into a matlab datenum compatible value, the following commands have to be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ncid=netcdf.open(filename,&amp;quot;noclobber&amp;quot;);&lt;br /&gt;
tim=(float)netcdf.getVar(ncid,&amp;quot;time&amp;quot;);&lt;br /&gt;
tim=tim-datenum(1,0,1);&lt;br /&gt;
datestr(tim)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table below summarizes the available output files:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Content !! Format !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| Grid files || Spatial properties of moisture sources and arrival regios || netCDF || CASE_grd_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Series files || Mean/min/max/std of regionally and globally averaged moisture source and arrival region properties || netCDF || CASE_ser_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Histogram files || Histograms of quantities identified for each timestep along each trajectory || ASCII || CASE_hst_steps&lt;br /&gt;
|-&lt;br /&gt;
| Trajectory files || Trajectories for identified precipitation events || ASCII/binary traj || CASE_DATE.traj/CASE_DATE_lsl&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Grid files====&lt;br /&gt;
&lt;br /&gt;
Grid file variables are separated into immediate source and transport variables, typically on a coarser, global grid, and arrival and forward-projected variables on the (typically finer-scale) arrival grid. The grid settings are determined by the corresponding parameters in parameter set *Grid*. All variables are of type float, and the fill value (netCDF property _FillValue) is -999.99. The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and dividing by the total precipitation (as described above).&lt;br /&gt;
&lt;br /&gt;
**Moisture source and transport properties**&lt;br /&gt;
&lt;br /&gt;
Variables related to immediate moisture source and transport properties (not forward projected) have dimension of variables time, global_latitude, global_longitude, as defined by input file parameters *sourceGridMinLon,sourceGridMaxLon, sourceGridMinLat, sourceGridMaxLat, sourceGridDx, sourceGridDy, sourceGridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer || E_s^BL || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere || E_s^FT || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation || E-P || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport || Q_t || mm ||  text &lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location || N_t || counts km^-2 || text &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Arrival properties and Lagrangian forward projections**&lt;br /&gt;
&lt;br /&gt;
The variables contained in these files have the dimensions time (days since 0001-01-01 00:00:00), latitude (degrees_north), and longitude (degrees_east) as defined by input file parameters *arrivalGridMinLon, arrivalGridMaxLon, arrivalGridMinLat, arrivalGridMaxLat, arrivalGridDx, arrivalGridDy, arrival | source | text |GridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Unit !! Property !! Description &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate || PE || mm day^-1 or mm step^-1 || arrival || precipitation at arrival location estimated from change in specific humidity during last time step &lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature || T_a || K || arrival || PE-weighted temperature at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure || p_a || hPa || arrival || PE-weighted pressure at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature || SKT_a || K || arrival || PE-weighted SKT below trajectory location during arrival &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer || f_BL || fraction || arrival || fractional contribution of BL moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere || f_FT || fraction || arrival || fractional contribution of FT moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_lifetime || \tau_t || h || transport || contribution and precipitation-weighted precipitation life time &lt;br /&gt;
|-&lt;br /&gt;
| transport_distance || \Delta_t || km || transport || contribution and precipitation-weighted transport distance along trajectory &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature || T_t || K || transport || contribution and precipitation-weighted temperature during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure || p_t || hPa || transport || contribution and precipitation-weighted pressure during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature || T_c || K || transport || contribution and precipitation-weighted temperature when RH&amp;gt;80% during transport &lt;br /&gt;
|-&lt;br /&gt;
| source_longitude || \lambda_s || degrees_east || source || contribution and precipitation-weighted latitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_latitude || \phi_s || degrees_north || source || contribution and precipitation-weighted longitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| land_fraction || f_l || fraction || source || contribution and precipitation-weighted fraction of moisture sources over land &lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature || SKT_s || K || source || contribution and precipitation-weighted SKT at the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_distance || \Delta_s || km || source || contribution and precipitation-weighted direct distance between the moisture source and arrival location &lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess || d_s || permil || source || contribution and precipitation-weighted estimate of deuterium excess at the source from RH and T using the Pfahl and Sodemann (2013) relation &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Global attributes**&lt;br /&gt;
&lt;br /&gt;
The netCDF grid files contain a range of essential parameters as global attributes. These parameters allow to fully characterise the result of the WaterSip run as required for the interpretation of the results. A number of run parameters are omitted, that concern logistical settings, or that are self-evident from the content of the the output files. The table below gives an example for a WaterSip run:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Example !! Type &lt;br /&gt;
|-&lt;br /&gt;
| startDate || &amp;quot;2010-02-28 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| endingDate || &amp;quot;2010-01-11 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| analysisRegion || &amp;quot;NEEM&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| maxPart || 5000001  || int&lt;br /&gt;
|-&lt;br /&gt;
| caseName || &amp;quot;global_201002_V3_stride&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| trajPoints || 61  || int&lt;br /&gt;
|-&lt;br /&gt;
| timeStep || 6  || in float&lt;br /&gt;
|-&lt;br /&gt;
| partMass || 2.03885996E12  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| dryLevel || 0.01  || float&lt;br /&gt;
|-&lt;br /&gt;
| blhScale || 1.5  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMin || 80.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMax || 110.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| uptakeThreshold || 0.2  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| precipThreshold || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMin || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMax || -120.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| anaVapour || 0  || int&lt;br /&gt;
|-&lt;br /&gt;
| filterIndex || -1  || int&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Series files====&lt;br /&gt;
&lt;br /&gt;
The netCDF series files contain two sets of information. The so-called sectorization output provides time series of the moisture source information seperated into relative contributions from predefined geographical areas. Furthermore, the series files contains weighted averages and further statistical properties of all quantities in the grid files. &lt;br /&gt;
&lt;br /&gt;
**Sectorisation output**&lt;br /&gt;
&lt;br /&gt;
A set of sectorisations is chosen by the parameter *sectorizeRegion*. The currently available options are listed in the table below. New sectorisations can be defined by changing the code in routine &amp;lt;code&amp;gt;Sectors.cpp/Sectors.h&amp;lt;/code&amp;gt;. This requires defining a new name and new decision tree that provides a unique number for any lat/lon value between -180E to 180E and -90 to 90N. See comments in the code.&lt;br /&gt;
&lt;br /&gt;
For each of the predefined areas, the relative contributions are subdivided into land and sea covered areas. Time series of the contributions are of dimension time and sector. Thereby, the sector numbers correspond to the sector numbers defined in the program code. The area of the sectors is calculated automatically within WaterSip. As noted above for the grid files, the time unit has been changed starting from Version 3.1.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol !! Unit !! Description&lt;br /&gt;
|-&lt;br /&gt;
| time || t || days since 0001-01-01 00:00:00 || text&lt;br /&gt;
|-&lt;br /&gt;
| sector || s || sector number || text&lt;br /&gt;
|-&lt;br /&gt;
| sector_area || A_s || km^2 || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_boundary_layer || f_l^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_boundary_layer || f_s^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_free_troposphere || f_l^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_free_troposphere || f_s^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_trajectory_location || f_l^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_trajectory_location || f_s^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_transport || f_l^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_transport || f_s^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_evaporation_minus_precipitation || f_l^EP || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_evaporation_minus_precipitation | f_s^EP | percent | text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Time-series output**&lt;br /&gt;
&lt;br /&gt;
For immediate quantities, a time series of the total field sum is recorded in the series file. In order to obtain an area average, one needs to divide the sum by the surface of the earth (x km^2). The unit for moisture uptakes, E-P and precipitation estimate is mm step^-1 for step series files, and mm 24h^-1 for all other averaging series files. In addition to sums, the files contain time series of the minimum, maximum and standard deviation of the grid field at each time instance. For all forward-projected and arrival quantities, the average rather than the sum is calculated on the arrival grid locations. When averaging from step output to larger time intervals, the quantities are weighted with the corresponding PE at each grid point. &lt;br /&gt;
&lt;br /&gt;
In addition, series files contain the same set of global attributes as described in Grid files to enable interpretation without additional documentation of the run setup.&lt;br /&gt;
&lt;br /&gt;
*Immediate quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_min || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_sum || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_max || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_min || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_sum || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_max || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Arrival and forward-projected quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_min || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_avg || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_max || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_min || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_avg || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_max || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_min || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_avg || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_max || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_min || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_avg || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_max || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_avg || x  || K &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_max || x || K&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Histogram files====&lt;br /&gt;
&lt;br /&gt;
* Bounds freq (1 to n categories), (1 to m variables)&lt;br /&gt;
* Main variables time, dq, conv&lt;br /&gt;
* where to implement&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20.71   46.56   8.1351e+05  -1.0000e+00&lt;br /&gt;
21.22   45.90   1.1314e+06  -1.0000e+00&lt;br /&gt;
22.03   45.24   4.1929e+05  -1.0000e+00&lt;br /&gt;
21.19   45.35   1.0639e+06  -1.0000e+00&lt;br /&gt;
20.71   46.50   5.0963e+05  -1.0000e+00&lt;br /&gt;
21.07   47.51   2.8182e+05  -1.0000e+00&lt;br /&gt;
21.71   48.67   9.3088e+05  -1.0000e+00&lt;br /&gt;
22.14   51.47   2.3634e+05  -1.0000e+00&lt;br /&gt;
22.14   52.49   8.0048e+05  -1.0000e+00&lt;br /&gt;
22.34   53.76   7.3297e+05  -1.0000e+00&lt;br /&gt;
23.17   54.41   4.1516e+05  -1.0000e+00&lt;br /&gt;
23.56   54.54   2.7414e+05  -1.0000e+00&lt;br /&gt;
24.39   54.55   5.0017e+05  -1.0000e+00&lt;br /&gt;
26.89   54.42   2.8215e+05  -1.0000e+00&lt;br /&gt;
28.18   54.40   3.9987e+05  -1.0000e+00&lt;br /&gt;
29.80   54.25   3.6020e+05  -1.0000e+00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Trajectory files====&lt;br /&gt;
&lt;br /&gt;
**LSL format**&lt;br /&gt;
&lt;br /&gt;
* As documented elsewhere&lt;br /&gt;
* only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Traj format**&lt;br /&gt;
&lt;br /&gt;
* Binary format, only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
* reading in and plotting traj files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mean file====&lt;br /&gt;
&lt;br /&gt;
Legacy format, global_201002_V3_avg_steps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20100228_00 13795.603  0.001 7994.128  0.001 722561152.000 1977998.875   -0.081   -3.124    0.007  -0.080  -1.347   0.003   0.181   0.000   0.001   0.711   0.006   0.001   0.242   0.000   0.001 -999.990 -999.990 -999.990  -83.283 -340.404    0.153  288.231  242.846    0.050 -999.990 -999.990 -999.990   2828.54    120.41      7.50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Annotated bibliography===&lt;br /&gt;
&lt;br /&gt;
There are to date (Oct 2019) 25 publications involving the WaterSip method in one way or another. The versatility of WaterSip ranges from weather events to climatological studies, and from process understanding to paleoclimate proxy interpretation. This documentation can only provide initial guidance in applying WaterSip to new research plans. The annotated bibliography below provides an overview over the relevant studies, ordered by topic and the respective climatic zone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Topic !! Time perspective !! Climate zone !! Region !! Reference&lt;br /&gt;
|-&lt;br /&gt;
| Method description || - || High latitudes || Greenland || Sodemann et al., 2008a&lt;br /&gt;
|-&lt;br /&gt;
| Precipitation extremes || Climatology || Subtropics || Mediterranean || Winschall et al., 2014a&lt;br /&gt;
|-&lt;br /&gt;
| Method evaluation || Weather event || Subtropics || Mediterranean || Winschall et al., 2014b&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime of precipitation || Climatology || Global || Global || Läderach and Sodemann, 2016&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || High latitudes || Greenland || Sodemann et al., 2008b&lt;br /&gt;
|-&lt;br /&gt;
| Climate characteristics || Climatology || Mid latitudes || Europe || Sodemann and Zubler, 2010&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Tropics || Belize || Kenneth et al., &lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Mid latitudes || China || Baker et al., Luetscher et al. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
* Thurnherr, I., Kozachek, A., Graf, P., Weng, Y., Bolshiyanov, D., Landwehr, S., Pfahl, S., Schmale, J., Sodemann, H., Steen-Larsen, H. C., Toffoli, A., Wernli, H., and Aemisegger, F., 2019: Meridional and vertical variations of the water vapour isotopic composition in the marine boundary layer over the Atlantic and Southern Ocean, Atmos. Chem. Phys. Discuss., doi: 10.5194/acp-2019-782.&lt;br /&gt;
* Fremme, A. and Sodemann, H., 2019: The role of land and ocean evaporation on the variability of precipitation in the Yangtze River valley, Hydrol. Earth Syst. Sci., 23, 2525–2540, doi: 10.5194/hess-23-2525-2019. &lt;br /&gt;
* Huang, R, Zhu, H, Liang, E., Grießinger, J, Wernicke, J., Yu, W., Hochreuther, P., Risi, C., Zeng, Y., Fremme, A., Sodemann, H., Bräuning, A., 2019: Temperature signals in tree-ring oxygen isotope series from the northern slope of the Himalaya, EPSL 506: 455-465. &lt;br /&gt;
* Buizert, Christo; Sigl, Michael; Severi, Mirko; Markle, Bradley; Wettstein, Justin; McConnell, J; Pedro, Joel; Sodemann, H.; Goto-Azuma, Kumiko; Kawamura, Kenji; Fujita, Shuji; Motoyama, Hideaki; Hirabayashi, Motohiro; Uemura, Ryu; Stenni, Barbara; Parrenin, Frederic; He, Feng; Fudge, T.J.; Steig, Eric J., 2018: Abrupt ice-age shifts in southern westerly winds and Antarctic climate forced from the north, Nature 563: 681-685.&lt;br /&gt;
* Bohlinger, P., Sorteberg, A., Liu, C., Rasmussen, R., Sodemann, H., Ogawa, F., 2018: Multiscale characteristics of an extreme precipitation event over Nepal. QJRMS:1-18, doi:10.1002/qj.3418. &lt;br /&gt;
* Bohlinger, P., Sorteberg, A., and Sodemann, H., 2017: Synoptic conditions and moisture sources actuating extreme precipitation in Nepal. Journal of Geophysical Research: Atmospheres, 122, 12,653–12,671. https://doi.org/10.1002/2017JD027543.&lt;br /&gt;
* Blazina, T., A. Läderach, G. D. Jones, H. Sodemann, H. Wernli, J. W. Kirchner and L. H. E. Winkel, 2016: Marine primary productivity as a potential source of selenium and other trace elements in atmospheric deposition, Environ. Sci. Technol. 2017, 51, 108−118, doi: 10.1021/acs.est.6b03063.&lt;br /&gt;
* Läderach, A. andSodemann, H., 2016: A revised picture of the atmospheric moisture residence time, Geophys. Res. Lett., 43, doi:10.1002/2015GL067449.&lt;br /&gt;
* Baker, A., Sodemann, H., Baldini, J. U. L., Breitenbach, S. F. M., Johnson, K. R., van Hunen, J., and Pingzhong, Z., 2015: Seasonality of westerly moisture transport in the East Asian Summer Monsoon and its implications for interpreting precipitation d18O, J. Geophys. Res., 120,  doi:10.1002/2014JD022919.&lt;br /&gt;
* Steen-Larsen, H. C., Sveinbjörnsdottir, A. E., Jonsson, T., Ritter, F., Bonne, J.-L., Masson-Delmotte, V., Sodemann, H., Blunier, T., Dahl-Jensen, D., Vinther, B. M., 2015: Moisture sources and synoptic to seasonal variability of North Atlantic water vapor isotopic composition, J. Geophys. Res., 120, 5757–5774, doi:10.1002/ 2015JD023234.&lt;br /&gt;
* Bonne, J.-L., Steen-Larsen, H. C., Risi, C., Werner, M., Sodemann, H., Lacour, J.-L., Fettweis, X., Cesana, G., Delmotte, M., Cattani, O., Vallelonga, P., Kjær, H. A., Clerbaux, C., Sveinbjörnsdóttir, A. E., and Masson-Delmotte, V., 2015: The summer 2012 Greenland heat wave: In situ and remote sensing observations of water vapor isotopic composition during an atmospheric river event, J. Geophys. Res., 120, 2970-2989, doi:10.1002/2014JD022602.&lt;br /&gt;
* Luetscher, M., Boch, R., Sodemann, H., Spoetl, C., Cheng, H., Edwards, R. L., Frisia, S., Hof, F., Mueller, W., 2015: North Atlantic storm track changes during the Last Glacial Maximum recorded by Alpine speleothems, Nature Comm. 6: 6344, doi:10.1038/ncomms7344.&lt;br /&gt;
* Winschall, A., Sodemann, H.,Pfahl, S. and Wernli, H., 2014: How important is intensified evaporation for Mediterranean precipitation extremes?, J. Geophys. Res., 119: 5240–5256, doi:10.1002/2013JD021175&lt;br /&gt;
* Winschall, A., Pfahl, S., Sodemann, H.and Wernli, H.. 2014. Comparison of Eulerian and Lagrangian moisture source diagnostics - the flood event in eastern Europe in May 2010, Atmos. Chem. Phys. 14: 6605–6619, doi:10.5194/acp-14-6605-2014.&lt;br /&gt;
* Aemisegger, F., Pfahl, S., Sodemann, H., Lehner, I., Seneviratne, S. I., and Wernli, H., 2014: Deuterium excess as a proxy for continental moisture recycling and plant transpiration, Atmos. Chem. Phys., 14: 4029–4054, doi:10.5194/acp-14-4029-2014.&lt;br /&gt;
* Bonne, J. L., Masson-Delmotte, V., Cattani, O., Delmotte, M., Risi, C., Sodemann, H., and Steen-Larsen, H. C., 2014:The isotopic composition of water vapour and precipitation in Ivittuut, southern Greenland, Atmos. Chem. Phys. 14: 4419–4439, doi:10.5194/acp-14-4419-2014.&lt;br /&gt;
* Wang, Y., Sodemann, H., Hou, S., Masson-Delmotte, V. Jouzel, J. and Pang, H., 2013: Snow accumulation and its moisture origin over Dome Argus, Antarctica. Clim. Dyn., 40:731-742, doi: 10.1007/s00382-012-1398-9.&lt;br /&gt;
* Martius, O., Sodemann, H., Joos, H., Pfahl, S., Winschall, A., Croci-Maspoli, M., Graf, M., Madonna, E., Mueller, B., Schemm, S., Sedlacek, J., Sprenger, M. and Wernli, H., 2012: The role of upper-level dynamics and surface processes for the Pakistan flood in July 2010. Quart. J. Royal Meteorol. Soc., published online, doi: 10.1002/qj.2082.&lt;br /&gt;
* Kennett, D. J., Breitenbach, S. F. M., Aquino, V. V., Asmerom, Y., Awe, J., Baldini, J. U. L., Bartlein, P., Culleton, B. J., Ebert, C., Jazwa, C., Macri, M. J., Marwan, N., Polyak, V., Prufer, K. M., Ridley, H. E., Sodemann, H., Winterhalder, B. and Haug, G. H., 2012: Development and Disintegration of Maya Political Systems in Response to Climate Change. Science, 338: 788-791, doi: 10.1126/science.1226299.&lt;br /&gt;
* Winkler, R., Landais, A., Sodemann, H., Dümbgen, L., Priéa, F., Masson-Delmotte, V., Stenni, B., and Jouzel, J., 2012: Deglaciation records of 17O-excess in East Antarctica: reliable reconstruction of oceanic relative humidity from coastal sites. Clim. Past 8, 1-16.&lt;br /&gt;
* Masson-Delmotte, V., Buiron, D., Ekaykin, A., Frezzotti, M., Gallée, H., Jouzel, J., Krinner, G., Landais, A., Motoyama, A., Oerter, H., Pol, K., Pollard, D., Ritz, C., Schlosser, E., Sime, L. C., Sodemann, H., Stenni, B., Uemura R., and Vimeux, F., 2011: A comparison of the present and last interglacial periods in six Antarctic ice cores Clim. Past, 7, 397-423. &lt;br /&gt;
* Sodemann, H.and Zubler, E., 2010: Seasonality and inter-annual variability of the moisture sources for Alpine precipitation during 1995-2002, Int. J. Climatol., 30: 947-961, doi:10.1002/joc.1932.&lt;br /&gt;
* Sodemann, H., and Stohl, A., 2009: Asymmetries in the moisture origin of Antarctic precipitation, Geophys. Res. Lett., 36, L22803, doi:10.1029/2009GL040242.&lt;br /&gt;
* Sodemann, H., Masson-Delmotte, V., Schwierz, C., Vinther, B. M. and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Part II: Effects of North Atlantic Oscillation variability on stable isotopes in precipitation, J. Geophys. Res., 113, D12111, doi:10.1029/2007JD009416.&lt;br /&gt;
* Sodemann, H., Schwierz, C., and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Lagrangian moisture diagnostic and North Atlantic Oscillation influence, J. Geophys. Res.,113, D03107, doi:10.1029/2007JD008503.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1431</id>
		<title>WaterSip</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1431"/>
		<updated>2021-01-15T08:35:17Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===About WaterSip===&lt;br /&gt;
&lt;br /&gt;
WaterSip is a diagnostic software tool that identifies source, transport and arrival properties of atmospheric water vapour based on airmass backward trajectories. As a prerequisite, the backward trajectories for the analysis are to be obtained from a trajectory calculation tool, such as FLEXPART [[http://www.flexpart.eu]] or Lagranto [[http://www.lagranto.iac.ethz.ch]]. Moisture sources are then identified from changes in specific humidity interpolated to the air parcel trajectory per time step. The changes in specific humidity at each time step are set in relation with the current humidity of the air parcel. This allows to estimate the quantitative contribution of moisture to the air parcel at a specific location, a so-called moisture accounting. WaterSip identifies and aggregates further properties of the moisture source and during the moisture transport, such as temperature, pressure, latitude etc. The moisture source diagnostic is described in detail in [[Sodemann et al. (2008)]]. Publications using the WaterSip diagnostic are listed in section [[Bibliography]].&lt;br /&gt;
&lt;br /&gt;
===Working principle===&lt;br /&gt;
&lt;br /&gt;
Explanation from Sodemann et al. 2008a&lt;br /&gt;
&lt;br /&gt;
Image from Läderach and Sodemann, 2016 or Sodemann et al., 2008a&lt;br /&gt;
&lt;br /&gt;
Moisture source information&lt;br /&gt;
&lt;br /&gt;
- Accounted fraction fa, fb, fa+fb&lt;br /&gt;
- adding below and above boundary layer or not, when&lt;br /&gt;
- choosing threshold values for Arctic and other regions&lt;br /&gt;
- identifying moisture transport&lt;br /&gt;
&lt;br /&gt;
Arrival information and Lagrangian forward projections&lt;br /&gt;
&lt;br /&gt;
- arrival parameters&lt;br /&gt;
- transport parameters&lt;br /&gt;
- source parameters&lt;br /&gt;
- averaging by contribution and amount&lt;br /&gt;
&lt;br /&gt;
Series information&lt;br /&gt;
&lt;br /&gt;
- sectorization (Sodemann and Zubler, 2010; definition table, code changes)&lt;br /&gt;
- weighted averaging: The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and deviding by the total precipitation.&lt;br /&gt;
&lt;br /&gt;
Averaged properties&lt;br /&gt;
&lt;br /&gt;
- histogram example and modification (code below)&lt;br /&gt;
&lt;br /&gt;
Trajectories&lt;br /&gt;
&lt;br /&gt;
- plotting/reading example (code below)&lt;br /&gt;
&lt;br /&gt;
Uncertainties&lt;br /&gt;
&lt;br /&gt;
===Example setups===&lt;br /&gt;
&lt;br /&gt;
Three examples with different purposes&lt;br /&gt;
&lt;br /&gt;
====Water vapour====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
====Extratropical precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
 &lt;br /&gt;
====High latitude precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
===Version history===&lt;br /&gt;
&lt;br /&gt;
Version 2.1&lt;br /&gt;
&lt;br /&gt;
Version 2.2&lt;br /&gt;
&lt;br /&gt;
Version 2.3&lt;br /&gt;
&lt;br /&gt;
Version 2.4&lt;br /&gt;
&lt;br /&gt;
Version 2.5&lt;br /&gt;
&lt;br /&gt;
Version 2.8&lt;br /&gt;
&lt;br /&gt;
Version 2.8.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9&lt;br /&gt;
&lt;br /&gt;
Version 2.9.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9.2&lt;br /&gt;
&lt;br /&gt;
Version 2.9.3&lt;br /&gt;
&lt;br /&gt;
Version 2.9.4&lt;br /&gt;
&lt;br /&gt;
Version 3.0.8&lt;br /&gt;
&lt;br /&gt;
Version 3.1&lt;br /&gt;
&lt;br /&gt;
The current version of WaterSip is V3.1.0. &lt;br /&gt;
&lt;br /&gt;
===Running the WaterSip diagnostic===&lt;br /&gt;
&lt;br /&gt;
It is advised to create a link to the binary file of WaterSip in your /home/$USER/bin or project directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/bin&lt;br /&gt;
ln -s /Data/gfi/projects/isomet/progs/WaterSip_tool/WaterSip3 ~/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load netCDF-C++&lt;br /&gt;
WaterSip3 &amp;lt;WATERSIP_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the UiB hpc environment requires the above &#039;module load&#039; command to be executed first.&lt;br /&gt;
&lt;br /&gt;
On cyclone.hpc.uib.no, a run script is available that makes repeated similar runs easier to manage. Only essential parameters have to be changed, such as the target coordinates and case name. These will then be replaced on a template INPUT_WATERSIP file, and then WaterSip will be started. The script and an input file template can be copied like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/run_watersip_template_Bergen_2018.sh .&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/INPUT_WATERSIP_template_Bergen_2018 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Input file conversion from V2====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WaterSip3 -c &amp;lt;WATERSIP_V2_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a new file named &amp;lt;WATERSIP_V2_parameter_file&amp;gt;V3 at the current directory. It is recommended to double check and edit the settings in the converted file before starting a simulation.&lt;br /&gt;
&lt;br /&gt;
====Parallelization====&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
If WaterSip3 is to be executed on a queue system (not applicable to cyclone.hpc.uib.no), the following wrapper script can be used to start a run using 4 cores for parallel processing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# start with sbatch NAME_OF_THIS_FILE directly on machine&lt;br /&gt;
&lt;br /&gt;
#SBATCH --job-name=WaterSip3&lt;br /&gt;
#SBATCH --workdir=/tmp/&lt;br /&gt;
#SBATCH --partition=priority&lt;br /&gt;
#SBATCH --output=WaterSip_job.%j.out&lt;br /&gt;
#SBATCH --error=WaterSip_job.%j.err&lt;br /&gt;
#SBATCH --mail-type=END&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --cpus-per-task=4&lt;br /&gt;
&lt;br /&gt;
srun ./WaterSip3 INPUT_WATERSIP_global_1993&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating mask files====&lt;br /&gt;
&lt;br /&gt;
WaterSip allows to define target regions not only by coordinates, but also by mask files. This is a short introduction to creating a mask for use with WaterSip.&lt;br /&gt;
&lt;br /&gt;
The procedure described here  uses python to create the netcdf file with the mask, and CDO to change the netcdf file format such that it can be read in by watersip.&lt;br /&gt;
&lt;br /&gt;
Required python packages [tested version]: numpy [1.19.1], shapely [1.6.4.post1], netCDF4 [1.5.3] and if loading from a csv, pandas [1.1.3]&lt;br /&gt;
&lt;br /&gt;
Optional packages (for plotting): matplotlib [3.3.1], cartopy [0.16.0]&lt;br /&gt;
&lt;br /&gt;
[[File:watersip_mask-guide.png]]&lt;br /&gt;
Figure: Example for Scandinavia&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Basic principle:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using shapely’s .contains and .touches methods on a polygon with a point in vectorized version (taking a list of points instead of just one point for speed). &lt;br /&gt;
This enables more interactive editing on a grid spacing of 0.25x0.25 degree (1M grid points).&lt;br /&gt;
After calculation, the script performs a boolean OR operation on the two masks to get the combined of inner and edge points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mask_inner=shapely.vectorized.contains(geom, x, y) # - for interior points&lt;br /&gt;
mask_edge=shapely.vectorized.touches(geom, x, y) #- for edge points&lt;br /&gt;
mask_full=mask_inner|mask_edge # | is boolean OR bitwise (elementwise) operator.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
list of coordinates of pairs of lat, lon defining the nodes of the polygon mask.&lt;br /&gt;
&lt;br /&gt;
global meshgrid with a given resolution&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Output:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Boolean mask of False and True in the shape of the meshgrid lat-lon&lt;br /&gt;
&lt;br /&gt;
After using python script, convert to a netCDF format readable by WaterSip by using the command below in a terminal where you newly created mask file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cdo -f nc2 copy mask-from-python.nc mask-to-watersip.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For reference, and instructions on how to load political, and other, geometries straight from NaturalEarth dataset, go to&lt;br /&gt;
[[https://gist.github.com/pelson/9785576]]&lt;br /&gt;
&lt;br /&gt;
[Program code available here]&lt;br /&gt;
&lt;br /&gt;
=== Input file options ===&lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;code&amp;gt;[Case]&amp;lt;/code&amp;gt;). There are 7 option groups which can appear in random order in the input file:&lt;br /&gt;
&lt;br /&gt;
*Case: general settings related to the case to be extracted&lt;br /&gt;
*Grids: specification of different output grids&lt;br /&gt;
*Diagnostrics: parameters of the moisture diagnostic&lt;br /&gt;
*Output: general output settings&lt;br /&gt;
*Variables: selection of output variables&lt;br /&gt;
*Flexpart: options specific to runs using FLEXPART particle output&lt;br /&gt;
*Lagranto: options specific to runs using Lagranto trajectories&lt;br /&gt;
&lt;br /&gt;
====Parameter set Case====&lt;br /&gt;
&lt;br /&gt;
The settings in this parameter category describe the basic conditions of the diagnostic run.&lt;br /&gt;
&lt;br /&gt;
;caseName (string)&lt;br /&gt;
: identifier for the run, prepended to all output files. Example: &amp;lt;code&amp;gt;caseName = global_201002_relative&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;inputDir (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;inputDir = /Volumes/Data/global/shortposit_%s&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;outputDir (string)&lt;br /&gt;
: path where the output files will be created. Example: &amp;lt;code&amp;gt;outputDir = /Volumes/Data/global/output/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;startDate (date string)&lt;br /&gt;
: inital date of the run, fixed format YYYYMMDD-HHMMSS. Start date is latest date of the run which moves backward in time. Example: &amp;lt;code&amp;gt;startDate = 20100228-180000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;endDate (date string)&lt;br /&gt;
: final date of the run, fixed format YYYYMMDD-HHMMSS. End date is earliest date of the run. Example: &amp;lt;code&amp;gt;endDate = 20100211-000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;timeStep (integer)&lt;br /&gt;
: time step in hours between particles or trajectory output times. (typical values 6, 3, or 1 (hours)). Example: &amp;lt;code&amp;gt;timeStep = 6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajPoints (integer)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;trajPoints = 21&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;minTrajPoints (integer)&lt;br /&gt;
: minimum length of trajectories to be included in analysis. Parameter is only relevant for Lagranto simulations with uneven trajectory length. Example: &amp;lt;code&amp;gt;minTrajPoints = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sectorizeRegion (integer)&lt;br /&gt;
: region set used to divide moisture sources into different sectors (see [[#sectorization]]). Example: &amp;lt;code&amp;gt;sectorizeRegion = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterBoxFile (string)&lt;br /&gt;
: path to the text file describing geographic boxes used to filter air parcels during transport (see [[#box filters]]). Example: &amp;lt;code&amp;gt;filterBoxFile = /home/hso039/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterIndex (integer)&lt;br /&gt;
: used line from the filterBoxFile to select/deselect trajectories. Example: &amp;lt;code&amp;gt;filterIndex = -1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;orographyFile (string)&lt;br /&gt;
: path to the orography file used to select arrival based on underying topography, using the ETOPO2 topography. File in netcdf format. Example: &amp;lt;code&amp;gt;orographyFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/etopo5.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;lsmFile (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;lsmFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maskFile (string)&lt;br /&gt;
: path to file with an arrival selection. Example: &amp;lt;code&amp;gt;maskFile = &amp;quot; &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;useMask (boolean)&lt;br /&gt;
: use mask file (0=no, 1=yes). Example: &amp;lt;code&amp;gt;useMask = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;ompThreads (integer)&lt;br /&gt;
: number of threads to be used with OpenMP parallelisation if compiled with flag -fopenmp (1=no parallelisation, &amp;gt;1 parallelisation activated.). Example: &amp;lt;code&amp;gt;ompThreads = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;showStats (boolean)&lt;br /&gt;
: print statistics about particle processing to the command line (0=off, 1=on). Example: &amp;lt;code&amp;gt;showStats = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Grids====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category specify the different output grids and the gridding method&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLon (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLon (float)&lt;br /&gt;
: maximum longitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalgridmaxlon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMaxLat = 90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDx (float)&lt;br /&gt;
: longitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDy (float)&lt;br /&gt;
: latitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridRadius (float)&lt;br /&gt;
: gridding radius for information from arriving trajectories. Example: &amp;lt;code&amp;gt;arrivalGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLon (float)&lt;br /&gt;
: minimum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLon (float)&lt;br /&gt;
: maximum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLat (float)&lt;br /&gt;
: minimum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLat (float)&lt;br /&gt;
: maximum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLat = 90&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;sourceGridDx (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridDy (float)&lt;br /&gt;
: latitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridRadius (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;griddingType (integer)&lt;br /&gt;
: select [[#gridding algorithm]] (1: fast and simple gridding, 2: improved but slower gridding). Example: &amp;lt;code&amp;gt;griddingType = 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Diagnostics====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category control the way how the diagnostic works, and which trajectories should be considered in the run.&lt;br /&gt;
&lt;br /&gt;
;uptakeThreshold (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;uptakeThreshold = 0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipThreshold (float)&lt;br /&gt;
: 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 precipThreshold is specified as percent decrease relative to the current specific humidity of an air parcel. Then the value is negative. Default absolute values are -0.1 to -0.2 for 3h and 6h time steps. Example: &amp;lt;code&amp;gt;precipThreshold = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;relativeThreshold (boolean)&lt;br /&gt;
: determines whether absolute threshold values or relative threshold values are specified (0: absolute, 1: relative threshold values). Example: &amp;lt;code&amp;gt;relativeThreshold = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease larger than the value given by &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt; to the same number. Example: &amp;lt;code&amp;gt;arrivalPrecipMin = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease of up to the value given by &amp;lt;code&amp;gt;arrivalprecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;relativeThresholds&amp;lt;/code&amp;gt; is set to false, or a value of 1.0 otherwise. The combination of the &amp;lt;code&amp;gt;arrivalPrecipMin/Max&amp;lt;/code&amp;gt; parameters allows to focus on heavy and weak precipitation events only. Example: &amp;lt;code&amp;gt;arrivalPrecipMax = -100.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is larger than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt;. 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. Example: &amp;lt;code&amp;gt;arrivalRHMin = 80&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is less than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt;. Units are %. This parameter in combination with &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; can be used to focus on condensation/no condensation cases when the parameter &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is set to true. Example: &amp;lt;code&amp;gt;arrivalRHMax = 110&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMin (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalOroMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the ETOPO2 topography does not exceed the given value (in m). In combination with . Example: &amp;lt;code&amp;gt;arrivalOroMin&amp;lt;/code&amp;gt;, regions with a complex shape but common elevation can be selected easily. Example: &amp;lt;code&amp;gt;arrivalOroMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMin (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are above at the given altitude (in m above sea level). Example: &amp;lt;code&amp;gt;arrivalAltMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are below the given altitude (in m above sea level). The parameters &amp;lt;code&amp;gt;arrivalAltMin/Max&amp;lt;/code&amp;gt; can be used to conduct vertically stratified analyses.Example: &amp;lt;code&amp;gt;arrivalAltMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;blhScale (float)&lt;br /&gt;
: 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 &#039;moisture sources boundary-layer&#039;, all others to the category &#039;moisture sources free troposphere&#039;. Default value is 1.5. Example: &amp;lt;code&amp;gt;blhScale = 1.5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;analyzeVapour (boolean)&lt;br /&gt;
: Parameter allowing to analyze vapour origin instead of precipitation origin. Setting this parameter to true considers all air parcels during arrival, not just the ones that precipitate according to the precipitation threshold. If set to true, the &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalRHMin/Max&amp;lt;/code&amp;gt; parameters also need modification. Typically, one will set the &amp;lt;code&amp;gt;precipitation threshold&amp;lt;/code&amp;gt; to a small or even positive number, and the &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; to 0 and &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt; to 110 to include all arriving trajectories. It is often preferrable then to set the &amp;lt;code&amp;gt;arrivalAltMax&amp;lt;/code&amp;gt; to values of around 1000m for surface station measurements, for example. If &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is 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. Example: &amp;lt;code&amp;gt;analyzeVapour = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;assignToUptake (boolean)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;assignToUptake = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;forwardProjectionMode (integer)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;forwardProjectionMode = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Output====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category determine which output files should be created.&lt;br /&gt;
&lt;br /&gt;
;stepFile (boolean)&lt;br /&gt;
: write parameters on [[#Grid files]] and [[#Series files]] for each time step. Example: &amp;lt;code&amp;gt;stepFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;dayFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each day. Example: &amp;lt;code&amp;gt;dayFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;monthFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each month. Example: &amp;lt;code&amp;gt;monthFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;yearFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each year. Example: &amp;lt;code&amp;gt;yearFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;allFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for all time steps. Example: &amp;lt;code&amp;gt;allFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;staticFields (boolean)&lt;br /&gt;
: write static fields (land-sea mask and topography) onto grid files. Example: &amp;lt;code&amp;gt;staticFields = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveTraj (integer)&lt;br /&gt;
: write particle trajectories to [[#Trajectory files]] at each time step (1) or each month (2). Option 0 disables trajectory output. Example: &amp;lt;code&amp;gt;saveTraj = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;skipTraj (boolean)&lt;br /&gt;
: write every nth trajectory to reduce traj file size (1:disabled, &amp;gt;=2: stride size). Example: &amp;lt;code&amp;gt;skipTraj = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveHistogram (boolean)&lt;br /&gt;
: write histogram for selected parameters to a [[#Histogram files]] (0: disabled, 1:enabled). Example: &amp;lt;code&amp;gt;saveHistogram = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveMean (boolean)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;saveMean = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Variables====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category allow to include or exclude specific variables from the output files. Setting the output for unused variables to 0 (disabled) will speed up computation time, reduce the memory footprint, and reduce the output file size. Only parameters that are really required from a run should therefore selected as enabled.&lt;br /&gt;
&lt;br /&gt;
;sourcesBoundaryLayer (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the boundary layer to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesBoundaryLayer = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourcesFreeTroposphere (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the free troposphere to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesFreeTroposphere = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;evaporationMinusPrecipitation (boolean)&lt;br /&gt;
: write unweighted evaporation minus precipitation along entire trajectory length to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;evaporationMinusPrecipitation = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;moistureTransport (boolean)&lt;br /&gt;
: write weighted moisture transport along trajectories to grid and series output files (0: disabled, 1: enabled). Units are mm. Example: &amp;lt;code&amp;gt;moistureTransport = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajectoryLocations (boolean)&lt;br /&gt;
: write trajectory locations to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Example: &amp;lt;code&amp;gt;trajectoryLocations = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipitationEstimate (boolean)&lt;br /&gt;
: write precipitation estimate at arrival to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;precipitationEstimate = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLongitude (boolean)&lt;br /&gt;
: write weighted moisture source longitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees longitude. Example: &amp;lt;code&amp;gt;sourceLongitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLatitude (boolean)&lt;br /&gt;
: write moisture source latitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees latitude. Example: &amp;lt;code&amp;gt;sourceLatitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionCount (boolean)&lt;br /&gt;
: write convection count projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Convection count can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionCount is not on the ERA-Interim climatology run. The counter is increased each time the particles passes the convection scheme upwards. Example: &amp;lt;code&amp;gt;convectionCount = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionHeight (boolean)&lt;br /&gt;
: write convection height projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Convection height can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionHeight is not on the ERA-Interim climatology run. The value gives an average height of vertical displacement when the particles passes the convection scheme. Example: &amp;lt;code&amp;gt;convectionHeight = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;landFraction (boolean)&lt;br /&gt;
: write fraction of moisture sources over land projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;landFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;boundaryLayerFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;boundaryLayerFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;freeTroposphereFraction (boolean)&lt;br /&gt;
: write accounted fraction of free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;freeTroposphereFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;combinedFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer and free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). This is the sum of the two previous variables. Example: &amp;lt;code&amp;gt;combinedFraction = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTime (boolean)&lt;br /&gt;
: write moisture transport time projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are hours. Example: &amp;lt;code&amp;gt;transportTime = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSpecificHumidity (boolean)&lt;br /&gt;
: write surface specific humidity at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are g per kg. Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSpecificHumidity = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportDistance (boolean)&lt;br /&gt;
: write transport distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Transport distance is the length of the actual travel path along the trajectories from moisture source to the arrival region. Example: &amp;lt;code&amp;gt;transportDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDistance (boolean)&lt;br /&gt;
: write source distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Source distance is the shortest distance between the moisture source and the arrival region. Example: &amp;lt;code&amp;gt;sourceDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;source2mTemperature (boolean)&lt;br /&gt;
: write 2m temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;source2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDeuteriumExcess (boolean)&lt;br /&gt;
: write deuterium excess projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are permil. Deuterium excess is calculated from the relative humidity with respect to SST and the relationship from Pfahl and Sodemann (2014). Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceDeuteriumExcess = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperature during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;transportTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportPressure (boolean)&lt;br /&gt;
: write moisture-weighted pressure during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;transportPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;condensationTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperatures where RH&amp;lt;sub&amp;gt;liquid&amp;lt;/sub&amp;gt; exceeds 80% to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;condensationTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalTemperature (boolean)&lt;br /&gt;
: write temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;arrivalTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPressure (boolean)&lt;br /&gt;
: write pressure during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;arrivalPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrival2mTemperature (boolean)&lt;br /&gt;
: write temperature at 2m during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that 2m temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrival2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrivalSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Flexpart====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
;inputFormat (integer)&lt;br /&gt;
: 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/NorESM data short format, 4: global reanalysis data long format, 5 regional reanalysis/NorESM data short format. Example: &amp;lt;code&amp;gt;inputFormat = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maxPart (integer)&lt;br /&gt;
: number of particles contained in a single FLEXPART partposit or shortposit file. Example: &amp;lt;code&amp;gt;maxPart = 5000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partMass (float)&lt;br /&gt;
: atmospheric mass represented by each particle in kilogramms. Parameter is written out by specific version of FLEXPART to create WaterSip output data. Example: &amp;lt;code&amp;gt;partMass = 1.01943e+12&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partStride (integer)&lt;br /&gt;
: number of particles to skip during processing to speed up calculations (1: use every particle, &amp;gt;=2: use every 2nd particle, etc). Example: &amp;lt;code&amp;gt;partStride = 10&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;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). Example: &amp;lt;code&amp;gt;allowReenter = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Lagranto====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Full example for a FLEXPART run input file:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Case]&lt;br /&gt;
caseName = global_201002_final_relativex&lt;br /&gt;
inputDir = /home/data/flexpart/global/shortposit_%s&lt;br /&gt;
outputDir=/home/data/watersip/global_201002_V3/&lt;br /&gt;
startDate = 20100228-180000&lt;br /&gt;
endDate = 20100211-000000&lt;br /&gt;
timeStep = 6&lt;br /&gt;
sectorizeRegion = 0&lt;br /&gt;
filterBoxFile = /home/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&lt;br /&gt;
filterIndex = -1&lt;br /&gt;
orographyFile = &amp;quot;/home/projects/WaterSip_tool/etopo5.nc&amp;quot;&lt;br /&gt;
lsmFile = &amp;quot;/home/projects/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&lt;br /&gt;
maskFile = &amp;quot; &amp;quot;&lt;br /&gt;
useMask = 0&lt;br /&gt;
trajPoints = 41&lt;br /&gt;
minTrajPoints = 0&lt;br /&gt;
ompThreads = 1&lt;br /&gt;
showStats = 0&lt;br /&gt;
&lt;br /&gt;
[Grids]&lt;br /&gt;
arrivalGridMinLon = -180&lt;br /&gt;
arrivalGridMaxLon = 180&lt;br /&gt;
arrivalGridMinLat = -90&lt;br /&gt;
arrivalGridMaxLat = 90&lt;br /&gt;
arrivalGridDx = 1&lt;br /&gt;
arrivalGridDy = 1&lt;br /&gt;
arrivalGridRadius = 200&lt;br /&gt;
sourceGridMinLon = -180&lt;br /&gt;
sourceGridMaxLon = 180&lt;br /&gt;
sourceGridMinLat = -90&lt;br /&gt;
sourceGridMaxLat = 90&lt;br /&gt;
sourceGridDx = 1&lt;br /&gt;
sourceGridDy = 1&lt;br /&gt;
sourceGridRadius = 200&lt;br /&gt;
griddingType = 2&lt;br /&gt;
&lt;br /&gt;
[Diagnostics]&lt;br /&gt;
uptakeThreshold = 0.05&lt;br /&gt;
precipThreshold = 0.05&lt;br /&gt;
blhScale = 1.5&lt;br /&gt;
arrivalPrecipMin = 0.05&lt;br /&gt;
arrivalPrecipMax = 1.0&lt;br /&gt;
arrivalRHMin = 80&lt;br /&gt;
arrivalRHMax = 110&lt;br /&gt;
arrivalOroMin = -100&lt;br /&gt;
arrivalOroMax = 12000&lt;br /&gt;
arrivalAltMin = -100&lt;br /&gt;
arrivalAltMax = 12000&lt;br /&gt;
analyzeVapour = 0&lt;br /&gt;
assignToUptake = 0&lt;br /&gt;
forwardProjectionMode = 3&lt;br /&gt;
relativeThreshold = 1&lt;br /&gt;
&lt;br /&gt;
[Output]&lt;br /&gt;
stepFile = 1&lt;br /&gt;
dayFile = 1&lt;br /&gt;
monthFile = 1&lt;br /&gt;
yearFile = 1&lt;br /&gt;
allFile = 1&lt;br /&gt;
staticFields = 1&lt;br /&gt;
saveTraj = 0&lt;br /&gt;
skipTraj = 0&lt;br /&gt;
saveHistogram = 0&lt;br /&gt;
saveMean = 0&lt;br /&gt;
&lt;br /&gt;
[Variables]&lt;br /&gt;
sourcesBoundaryLayer = 1&lt;br /&gt;
sourcesFreeTroposphere = 1&lt;br /&gt;
evaporationMinusPrecipitation = 1&lt;br /&gt;
moistureTransport = 1&lt;br /&gt;
trajectoryLocations = 1&lt;br /&gt;
precipitationEstimate = 1&lt;br /&gt;
sourceLongitude = 1&lt;br /&gt;
sourceLatitude = 1&lt;br /&gt;
convectionCount = 0&lt;br /&gt;
convectionHeight = 0&lt;br /&gt;
landFraction = 1&lt;br /&gt;
boundaryLayerFraction = 1&lt;br /&gt;
freeTroposphereFraction = 1&lt;br /&gt;
combinedFraction = 0&lt;br /&gt;
transportTime = 1&lt;br /&gt;
sourceSkinTemperature = 1&lt;br /&gt;
sourceSpecificHumidity = 0&lt;br /&gt;
transportDistance = 1&lt;br /&gt;
sourceDistance = 1&lt;br /&gt;
source2mTemperature = 0&lt;br /&gt;
sourceDeuteriumExcess = 1&lt;br /&gt;
transportTemperature = 1&lt;br /&gt;
transportPressure = 1&lt;br /&gt;
condensationTemperature = 1&lt;br /&gt;
arrivalTemperature = 1&lt;br /&gt;
arrivalPressure = 1&lt;br /&gt;
arrival2mTemperature = 0&lt;br /&gt;
arrivalSkinTemperature = 1&lt;br /&gt;
&lt;br /&gt;
[Flexpart]&lt;br /&gt;
inputFormat = 3&lt;br /&gt;
maxPart = 5000000&lt;br /&gt;
partMass = 1.01943e+12&lt;br /&gt;
partStride = 10&lt;br /&gt;
allowReenter = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Output file formats===&lt;br /&gt;
&lt;br /&gt;
The results from the WaterSip diagnostic are written to a set of output files in different format. The main output files are created in netCDF with detailed metadata information, including the parameter settings of the run for automated documentation. The creation of different output files can be adapted by parameter settings in parameter set *Output* and the contained variables with settings in parameter set *Variables*. Spatial fields at different time intervals are written to so-called grid files in [[netCDF]] format, time series of averaged quantities at different time intervals are written to so-called Series files in netCDF format, histograms of selected quantities identified during the processing for each time step and each trajectory are written to Histogram files in ASCII format, and trajectories are written to Trajectory files in either the binary format traj or the Lagranto ASCII format. Earlier versions than V3 reported output in so-called Mean files in an ASCII format. That format is documented here but no longer in use in current versions of WaterSip.&lt;br /&gt;
&lt;br /&gt;
The time unit has changed in Version 3.1. Previously, the unit was set to &amp;quot;days since 0000-01-02 00:00:00&amp;quot; to allow matlab-compatible values for time that could directly be utilized with the datenum() commands. In order to confirm to netCDF-CF standards, where no calendar year 0000 exists, the time unit is now &amp;quot;days since 0001-01-01 00:00:00&amp;quot;. This provides the ability to open and visualize netCDF output files directly with tools such as ncview and panoply. To convert the time values into a matlab datenum compatible value, the following commands have to be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ncid=netcdf.open(filename,&amp;quot;noclobber&amp;quot;);&lt;br /&gt;
tim=(float)netcdf.getVar(ncid,&amp;quot;time&amp;quot;);&lt;br /&gt;
tim=tim-datenum(1,0,1);&lt;br /&gt;
datestr(tim)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table below summarizes the available output files:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Content !! Format !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| Grid files || Spatial properties of moisture sources and arrival regios || netCDF || CASE_grd_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Series files || Mean/min/max/std of regionally and globally averaged moisture source and arrival region properties || netCDF || CASE_ser_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Histogram files || Histograms of quantities identified for each timestep along each trajectory || ASCII || CASE_hst_steps&lt;br /&gt;
|-&lt;br /&gt;
| Trajectory files || Trajectories for identified precipitation events || ASCII/binary traj || CASE_DATE.traj/CASE_DATE_lsl&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Grid files====&lt;br /&gt;
&lt;br /&gt;
Grid file variables are separated into immediate source and transport variables, typically on a coarser, global grid, and arrival and forward-projected variables on the (typically finer-scale) arrival grid. The grid settings are determined by the corresponding parameters in parameter set *Grid*. All variables are of type float, and the fill value (netCDF property _FillValue) is -999.99. The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and dividing by the total precipitation (as described above).&lt;br /&gt;
&lt;br /&gt;
**Moisture source and transport properties**&lt;br /&gt;
&lt;br /&gt;
Variables related to immediate moisture source and transport properties (not forward projected) have dimension of variables time, global_latitude, global_longitude, as defined by input file parameters *sourceGridMinLon,sourceGridMaxLon, sourceGridMinLat, sourceGridMaxLat, sourceGridDx, sourceGridDy, sourceGridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer || E_s^BL || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere || E_s^FT || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation || E-P || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport || Q_t || mm ||  text &lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location || N_t || counts km^-2 || text &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Arrival properties and Lagrangian forward projections**&lt;br /&gt;
&lt;br /&gt;
The variables contained in these files have the dimensions time (days since 0001-01-01 00:00:00), latitude (degrees_north), and longitude (degrees_east) as defined by input file parameters *arrivalGridMinLon, arrivalGridMaxLon, arrivalGridMinLat, arrivalGridMaxLat, arrivalGridDx, arrivalGridDy, arrival | source | text |GridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Unit !! Property !! Description &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate || PE || mm day^-1 or mm step^-1 || arrival || precipitation at arrival location estimated from change in specific humidity during last time step &lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature || T_a || K || arrival || PE-weighted temperature at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure || p_a || hPa || arrival || PE-weighted pressure at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature || SKT_a || K || arrival || PE-weighted SKT below trajectory location during arrival &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer || f_BL || fraction || arrival || fractional contribution of BL moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere || f_FT || fraction || arrival || fractional contribution of FT moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_lifetime || \tau_t || h || transport || contribution and precipitation-weighted precipitation life time &lt;br /&gt;
|-&lt;br /&gt;
| transport_distance || \Delta_t || km || transport || contribution and precipitation-weighted transport distance along trajectory &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature || T_t || K || transport || contribution and precipitation-weighted temperature during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure || p_t || hPa || transport || contribution and precipitation-weighted pressure during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature || T_c || K || transport || contribution and precipitation-weighted temperature when RH&amp;gt;80% during transport &lt;br /&gt;
|-&lt;br /&gt;
| source_longitude || \lambda_s || degrees_east || source || contribution and precipitation-weighted latitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_latitude || \phi_s || degrees_north || source || contribution and precipitation-weighted longitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| land_fraction || f_l || fraction || source || contribution and precipitation-weighted fraction of moisture sources over land &lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature || SKT_s || K || source || contribution and precipitation-weighted SKT at the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_distance || \Delta_s || km || source || contribution and precipitation-weighted direct distance between the moisture source and arrival location &lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess || d_s || permil || source || contribution and precipitation-weighted estimate of deuterium excess at the source from RH and T using the Pfahl and Sodemann (2013) relation &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Global attributes**&lt;br /&gt;
&lt;br /&gt;
The netCDF grid files contain a range of essential parameters as global attributes. These parameters allow to fully characterise the result of the WaterSip run as required for the interpretation of the results. A number of run parameters are omitted, that concern logistical settings, or that are self-evident from the content of the the output files. The table below gives an example for a WaterSip run:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Example !! Type &lt;br /&gt;
|-&lt;br /&gt;
| startDate || &amp;quot;2010-02-28 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| endingDate || &amp;quot;2010-01-11 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| analysisRegion || &amp;quot;NEEM&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| maxPart || 5000001  || int&lt;br /&gt;
|-&lt;br /&gt;
| caseName || &amp;quot;global_201002_V3_stride&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| trajPoints || 61  || int&lt;br /&gt;
|-&lt;br /&gt;
| timeStep || 6  || in float&lt;br /&gt;
|-&lt;br /&gt;
| partMass || 2.03885996E12  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| dryLevel || 0.01  || float&lt;br /&gt;
|-&lt;br /&gt;
| blhScale || 1.5  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMin || 80.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMax || 110.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| uptakeThreshold || 0.2  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| precipThreshold || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMin || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMax || -120.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| anaVapour || 0  || int&lt;br /&gt;
|-&lt;br /&gt;
| filterIndex || -1  || int&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Series files====&lt;br /&gt;
&lt;br /&gt;
The netCDF series files contain two sets of information. The so-called sectorization output provides time series of the moisture source information seperated into relative contributions from predefined geographical areas. Furthermore, the series files contains weighted averages and further statistical properties of all quantities in the grid files. &lt;br /&gt;
&lt;br /&gt;
**Sectorisation output**&lt;br /&gt;
&lt;br /&gt;
A set of sectorisations is chosen by the parameter *sectorizeRegion*. The currently available options are listed in the table below. New sectorisations can be defined by changing the code in routine &amp;lt;code&amp;gt;Sectors.cpp/Sectors.h&amp;lt;/code&amp;gt;. This requires defining a new name and new decision tree that provides a unique number for any lat/lon value between -180E to 180E and -90 to 90N. See comments in the code.&lt;br /&gt;
&lt;br /&gt;
For each of the predefined areas, the relative contributions are subdivided into land and sea covered areas. Time series of the contributions are of dimension time and sector. Thereby, the sector numbers correspond to the sector numbers defined in the program code. The area of the sectors is calculated automatically within WaterSip. As noted above for the grid files, the time unit has been changed starting from Version 3.1.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol !! Unit !! Description&lt;br /&gt;
|-&lt;br /&gt;
| time || t || days since 0001-01-01 00:00:00 || text&lt;br /&gt;
|-&lt;br /&gt;
| sector || s || sector number || text&lt;br /&gt;
|-&lt;br /&gt;
| sector_area || A_s || km^2 || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_boundary_layer || f_l^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_boundary_layer || f_s^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_free_troposphere || f_l^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_free_troposphere || f_s^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_trajectory_location || f_l^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_trajectory_location || f_s^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_transport || f_l^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_transport || f_s^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_evaporation_minus_precipitation || f_l^EP || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_evaporation_minus_precipitation | f_s^EP | percent | text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Time-series output**&lt;br /&gt;
&lt;br /&gt;
For immediate quantities, a time series of the total field sum is recorded in the series file. In order to obtain an area average, one needs to divide the sum by the surface of the earth (x km^2). The unit for moisture uptakes, E-P and precipitation estimate is mm step^-1 for step series files, and mm 24h^-1 for all other averaging series files. In addition to sums, the files contain time series of the minimum, maximum and standard deviation of the grid field at each time instance. For all forward-projected and arrival quantities, the average rather than the sum is calculated on the arrival grid locations. When averaging from step output to larger time intervals, the quantities are weighted with the corresponding PE at each grid point. &lt;br /&gt;
&lt;br /&gt;
In addition, series files contain the same set of global attributes as described in Grid files to enable interpretation without additional documentation of the run setup.&lt;br /&gt;
&lt;br /&gt;
*Immediate quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_min || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_sum || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_max || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_min || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_sum || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_max || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Arrival and forward-projected quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_min || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_avg || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_max || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_min || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_avg || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_max || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_min || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_avg || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_max || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_min || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_avg || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_max || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_avg || x  || K &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_max || x || K&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Histogram files====&lt;br /&gt;
&lt;br /&gt;
* Bounds freq (1 to n categories), (1 to m variables)&lt;br /&gt;
* Main variables time, dq, conv&lt;br /&gt;
* where to implement&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20.71   46.56   8.1351e+05  -1.0000e+00&lt;br /&gt;
21.22   45.90   1.1314e+06  -1.0000e+00&lt;br /&gt;
22.03   45.24   4.1929e+05  -1.0000e+00&lt;br /&gt;
21.19   45.35   1.0639e+06  -1.0000e+00&lt;br /&gt;
20.71   46.50   5.0963e+05  -1.0000e+00&lt;br /&gt;
21.07   47.51   2.8182e+05  -1.0000e+00&lt;br /&gt;
21.71   48.67   9.3088e+05  -1.0000e+00&lt;br /&gt;
22.14   51.47   2.3634e+05  -1.0000e+00&lt;br /&gt;
22.14   52.49   8.0048e+05  -1.0000e+00&lt;br /&gt;
22.34   53.76   7.3297e+05  -1.0000e+00&lt;br /&gt;
23.17   54.41   4.1516e+05  -1.0000e+00&lt;br /&gt;
23.56   54.54   2.7414e+05  -1.0000e+00&lt;br /&gt;
24.39   54.55   5.0017e+05  -1.0000e+00&lt;br /&gt;
26.89   54.42   2.8215e+05  -1.0000e+00&lt;br /&gt;
28.18   54.40   3.9987e+05  -1.0000e+00&lt;br /&gt;
29.80   54.25   3.6020e+05  -1.0000e+00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Trajectory files====&lt;br /&gt;
&lt;br /&gt;
**LSL format**&lt;br /&gt;
&lt;br /&gt;
* As documented elsewhere&lt;br /&gt;
* only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Traj format**&lt;br /&gt;
&lt;br /&gt;
* Binary format, only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
* reading in and plotting traj files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mean file====&lt;br /&gt;
&lt;br /&gt;
Legacy format, global_201002_V3_avg_steps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20100228_00 13795.603  0.001 7994.128  0.001 722561152.000 1977998.875   -0.081   -3.124    0.007  -0.080  -1.347   0.003   0.181   0.000   0.001   0.711   0.006   0.001   0.242   0.000   0.001 -999.990 -999.990 -999.990  -83.283 -340.404    0.153  288.231  242.846    0.050 -999.990 -999.990 -999.990   2828.54    120.41      7.50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Annotated bibliography===&lt;br /&gt;
&lt;br /&gt;
There are to date (Oct 2019) 25 publications involving the WaterSip method in one way or another. The versatility of WaterSip ranges from weather events to climatological studies, and from process understanding to paleoclimate proxy interpretation. This documentation can only provide initial guidance in applying WaterSip to new research plans. The annotated bibliography below provides an overview over the relevant studies, ordered by topic and the respective climatic zone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Topic !! Time perspective !! Climate zone !! Region !! Reference&lt;br /&gt;
|-&lt;br /&gt;
| Method description || - || High latitudes || Greenland || Sodemann et al., 2008a&lt;br /&gt;
|-&lt;br /&gt;
| Precipitation extremes || Climatology || Subtropics || Mediterranean || Winschall et al., 2014a&lt;br /&gt;
|-&lt;br /&gt;
| Method evaluation || Weather event || Subtropics || Mediterranean || Winschall et al., 2014b&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime of precipitation || Climatology || Global || Global || Läderach and Sodemann, 2016&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || High latitudes || Greenland || Sodemann et al., 2008b&lt;br /&gt;
|-&lt;br /&gt;
| Climate characteristics || Climatology || Mid latitudes || Europe || Sodemann and Zubler, 2010&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Tropics || Belize || Kenneth et al., &lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Mid latitudes || China || Baker et al., Luetscher et al. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
* Thurnherr, I., Kozachek, A., Graf, P., Weng, Y., Bolshiyanov, D., Landwehr, S., Pfahl, S., Schmale, J., Sodemann, H., Steen-Larsen, H. C., Toffoli, A., Wernli, H., and Aemisegger, F., 2019: Meridional and vertical variations of the water vapour isotopic composition in the marine boundary layer over the Atlantic and Southern Ocean, Atmos. Chem. Phys. Discuss., doi: 10.5194/acp-2019-782.&lt;br /&gt;
* Fremme, A. and Sodemann, H., 2019: The role of land and ocean evaporation on the variability of precipitation in the Yangtze River valley, Hydrol. Earth Syst. Sci., 23, 2525–2540, doi: 10.5194/hess-23-2525-2019. &lt;br /&gt;
* Huang, R, Zhu, H, Liang, E., Grießinger, J, Wernicke, J., Yu, W., Hochreuther, P., Risi, C., Zeng, Y., Fremme, A., Sodemann, H., Bräuning, A., 2019: Temperature signals in tree-ring oxygen isotope series from the northern slope of the Himalaya, EPSL 506: 455-465. &lt;br /&gt;
* Buizert, Christo; Sigl, Michael; Severi, Mirko; Markle, Bradley; Wettstein, Justin; McConnell, J; Pedro, Joel; Sodemann, H.; Goto-Azuma, Kumiko; Kawamura, Kenji; Fujita, Shuji; Motoyama, Hideaki; Hirabayashi, Motohiro; Uemura, Ryu; Stenni, Barbara; Parrenin, Frederic; He, Feng; Fudge, T.J.; Steig, Eric J., 2018: Abrupt ice-age shifts in southern westerly winds and Antarctic climate forced from the north, Nature 563: 681-685.&lt;br /&gt;
* Bohlinger, P., Sorteberg, A., Liu, C., Rasmussen, R., Sodemann, H., Ogawa, F., 2018: Multiscale characteristics of an extreme precipitation event over Nepal. QJRMS:1-18, doi:10.1002/qj.3418. &lt;br /&gt;
* Bohlinger, P., Sorteberg, A., and Sodemann, H., 2017: Synoptic conditions and moisture sources actuating extreme precipitation in Nepal. Journal of Geophysical Research: Atmospheres, 122, 12,653–12,671. https://doi.org/10.1002/2017JD027543.&lt;br /&gt;
* Blazina, T., A. Läderach, G. D. Jones, H. Sodemann, H. Wernli, J. W. Kirchner and L. H. E. Winkel, 2016: Marine primary productivity as a potential source of selenium and other trace elements in atmospheric deposition, Environ. Sci. Technol. 2017, 51, 108−118, doi: 10.1021/acs.est.6b03063.&lt;br /&gt;
* Läderach, A. andSodemann, H., 2016: A revised picture of the atmospheric moisture residence time, Geophys. Res. Lett., 43, doi:10.1002/2015GL067449.&lt;br /&gt;
* Baker, A., Sodemann, H., Baldini, J. U. L., Breitenbach, S. F. M., Johnson, K. R., van Hunen, J., and Pingzhong, Z., 2015: Seasonality of westerly moisture transport in the East Asian Summer Monsoon and its implications for interpreting precipitation d18O, J. Geophys. Res., 120,  doi:10.1002/2014JD022919.&lt;br /&gt;
* Steen-Larsen, H. C., Sveinbjörnsdottir, A. E., Jonsson, T., Ritter, F., Bonne, J.-L., Masson-Delmotte, V., Sodemann, H., Blunier, T., Dahl-Jensen, D., Vinther, B. M., 2015: Moisture sources and synoptic to seasonal variability of North Atlantic water vapor isotopic composition, J. Geophys. Res., 120, 5757–5774, doi:10.1002/ 2015JD023234.&lt;br /&gt;
* Bonne, J.-L., Steen-Larsen, H. C., Risi, C., Werner, M., Sodemann, H., Lacour, J.-L., Fettweis, X., Cesana, G., Delmotte, M., Cattani, O., Vallelonga, P., Kjær, H. A., Clerbaux, C., Sveinbjörnsdóttir, A. E., and Masson-Delmotte, V., 2015: The summer 2012 Greenland heat wave: In situ and remote sensing observations of water vapor isotopic composition during an atmospheric river event, J. Geophys. Res., 120, 2970-2989, doi:10.1002/2014JD022602.&lt;br /&gt;
* Luetscher, M., Boch, R., Sodemann, H., Spoetl, C., Cheng, H., Edwards, R. L., Frisia, S., Hof, F., Mueller, W., 2015: North Atlantic storm track changes during the Last Glacial Maximum recorded by Alpine speleothems, Nature Comm. 6: 6344, doi:10.1038/ncomms7344.&lt;br /&gt;
* Winschall, A., Sodemann, H.,Pfahl, S. and Wernli, H., 2014: How important is intensified evaporation for Mediterranean precipitation extremes?, J. Geophys. Res., 119: 5240–5256, doi:10.1002/2013JD021175&lt;br /&gt;
* Winschall, A., Pfahl, S., Sodemann, H.and Wernli, H.. 2014. Comparison of Eulerian and Lagrangian moisture source diagnostics - the flood event in eastern Europe in May 2010, Atmos. Chem. Phys. 14: 6605–6619, doi:10.5194/acp-14-6605-2014.&lt;br /&gt;
* Aemisegger, F., Pfahl, S., Sodemann, H., Lehner, I., Seneviratne, S. I., and Wernli, H., 2014: Deuterium excess as a proxy for continental moisture recycling and plant transpiration, Atmos. Chem. Phys., 14: 4029–4054, doi:10.5194/acp-14-4029-2014.&lt;br /&gt;
* Bonne, J. L., Masson-Delmotte, V., Cattani, O., Delmotte, M., Risi, C., Sodemann, H., and Steen-Larsen, H. C., 2014:The isotopic composition of water vapour and precipitation in Ivittuut, southern Greenland, Atmos. Chem. Phys. 14: 4419–4439, doi:10.5194/acp-14-4419-2014.&lt;br /&gt;
* Wang, Y., Sodemann, H., Hou, S., Masson-Delmotte, V. Jouzel, J. and Pang, H., 2013: Snow accumulation and its moisture origin over Dome Argus, Antarctica. Clim. Dyn., 40:731-742, doi: 10.1007/s00382-012-1398-9.&lt;br /&gt;
* Martius, O., Sodemann, H., Joos, H., Pfahl, S., Winschall, A., Croci-Maspoli, M., Graf, M., Madonna, E., Mueller, B., Schemm, S., Sedlacek, J., Sprenger, M. and Wernli, H., 2012: The role of upper-level dynamics and surface processes for the Pakistan flood in July 2010. Quart. J. Royal Meteorol. Soc., published online, doi: 10.1002/qj.2082.&lt;br /&gt;
* Kennett, D. J., Breitenbach, S. F. M., Aquino, V. V., Asmerom, Y., Awe, J., Baldini, J. U. L., Bartlein, P., Culleton, B. J., Ebert, C., Jazwa, C., Macri, M. J., Marwan, N., Polyak, V., Prufer, K. M., Ridley, H. E., Sodemann, H., Winterhalder, B. and Haug, G. H., 2012: Development and Disintegration of Maya Political Systems in Response to Climate Change. Science, 338: 788-791, doi: 10.1126/science.1226299.&lt;br /&gt;
* Winkler, R., Landais, A., Sodemann, H., Dümbgen, L., Priéa, F., Masson-Delmotte, V., Stenni, B., and Jouzel, J., 2012: Deglaciation records of 17O-excess in East Antarctica: reliable reconstruction of oceanic relative humidity from coastal sites. Clim. Past 8, 1-16.&lt;br /&gt;
* Masson-Delmotte, V., Buiron, D., Ekaykin, A., Frezzotti, M., Gallée, H., Jouzel, J., Krinner, G., Landais, A., Motoyama, A., Oerter, H., Pol, K., Pollard, D., Ritz, C., Schlosser, E., Sime, L. C., Sodemann, H., Stenni, B., Uemura R., and Vimeux, F., 2011: A comparison of the present and last interglacial periods in six Antarctic ice cores Clim. Past, 7, 397-423. &lt;br /&gt;
* Sodemann, H.and Zubler, E., 2010: Seasonality and inter-annual variability of the moisture sources for Alpine precipitation during 1995-2002, Int. J. Climatol., 30: 947-961, doi:10.1002/joc.1932.&lt;br /&gt;
* Sodemann, H., and Stohl, A., 2009: Asymmetries in the moisture origin of Antarctic precipitation, Geophys. Res. Lett., 36, L22803, doi:10.1029/2009GL040242.&lt;br /&gt;
* Sodemann, H., Masson-Delmotte, V., Schwierz, C., Vinther, B. M. and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Part II: Effects of North Atlantic Oscillation variability on stable isotopes in precipitation, J. Geophys. Res., 113, D12111, doi:10.1029/2007JD009416.&lt;br /&gt;
* Sodemann, H., Schwierz, C., and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Lagrangian moisture diagnostic and North Atlantic Oscillation influence, J. Geophys. Res.,113, D03107, doi:10.1029/2007JD008503.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1430</id>
		<title>WaterSip</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1430"/>
		<updated>2021-01-15T08:33:13Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===About WaterSip===&lt;br /&gt;
&lt;br /&gt;
WaterSip is a diagnostic software tool that identifies source, transport and arrival properties of atmospheric water vapour based on airmass backward trajectories. As a prerequisite, the backward trajectories for the analysis are to be obtained from a trajectory calculation tool, such as FLEXPART [[http://www.flexpart.eu]] or Lagranto [[http://www.lagranto.iac.ethz.ch]]. Moisture sources are then identified from changes in specific humidity interpolated to the air parcel trajectory per time step. The changes in specific humidity at each time step are set in relation with the current humidity of the air parcel. This allows to estimate the quantitative contribution of moisture to the air parcel at a specific location, a so-called moisture accounting. WaterSip identifies and aggregates further properties of the moisture source and during the moisture transport, such as temperature, pressure, latitude etc. The moisture source diagnostic is described in detail in [[Sodemann et al. (2008)]]. Publications using the WaterSip diagnostic are listed in section [[Bibliography]].&lt;br /&gt;
&lt;br /&gt;
===Working principle===&lt;br /&gt;
&lt;br /&gt;
Explanation from Sodemann et al. 2008a&lt;br /&gt;
&lt;br /&gt;
Image from Läderach and Sodemann, 2016 or Sodemann et al., 2008a&lt;br /&gt;
&lt;br /&gt;
Moisture source information&lt;br /&gt;
&lt;br /&gt;
- Accounted fraction fa, fb, fa+fb&lt;br /&gt;
- adding below and above boundary layer or not, when&lt;br /&gt;
- choosing threshold values for Arctic and other regions&lt;br /&gt;
- identifying moisture transport&lt;br /&gt;
&lt;br /&gt;
Arrival information and Lagrangian forward projections&lt;br /&gt;
&lt;br /&gt;
- arrival parameters&lt;br /&gt;
- transport parameters&lt;br /&gt;
- source parameters&lt;br /&gt;
- averaging by contribution and amount&lt;br /&gt;
&lt;br /&gt;
Series information&lt;br /&gt;
&lt;br /&gt;
- sectorization (Sodemann and Zubler, 2010; definition table, code changes)&lt;br /&gt;
- weighted averaging: The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and deviding by the total precipitation.&lt;br /&gt;
&lt;br /&gt;
Averaged properties&lt;br /&gt;
&lt;br /&gt;
- histogram example and modification (code below)&lt;br /&gt;
&lt;br /&gt;
Trajectories&lt;br /&gt;
&lt;br /&gt;
- plotting/reading example (code below)&lt;br /&gt;
&lt;br /&gt;
Uncertainties&lt;br /&gt;
&lt;br /&gt;
===Example setups===&lt;br /&gt;
&lt;br /&gt;
Three examples with different purposes&lt;br /&gt;
&lt;br /&gt;
====Water vapour====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
====Extratropical precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
 &lt;br /&gt;
====High latitude precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
===Version history===&lt;br /&gt;
&lt;br /&gt;
Version 2.1&lt;br /&gt;
&lt;br /&gt;
Version 2.2&lt;br /&gt;
&lt;br /&gt;
Version 2.3&lt;br /&gt;
&lt;br /&gt;
Version 2.4&lt;br /&gt;
&lt;br /&gt;
Version 2.5&lt;br /&gt;
&lt;br /&gt;
Version 2.8&lt;br /&gt;
&lt;br /&gt;
Version 2.8.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9&lt;br /&gt;
&lt;br /&gt;
Version 2.9.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9.2&lt;br /&gt;
&lt;br /&gt;
Version 2.9.3&lt;br /&gt;
&lt;br /&gt;
Version 2.9.4&lt;br /&gt;
&lt;br /&gt;
Version 3.0.8&lt;br /&gt;
&lt;br /&gt;
Version 3.1&lt;br /&gt;
&lt;br /&gt;
The current version of WaterSip is V3.1.0. &lt;br /&gt;
&lt;br /&gt;
===Running the WaterSip diagnostic===&lt;br /&gt;
&lt;br /&gt;
It is advised to create a link to the binary file of WaterSip in your /home/$USER/bin or project directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/bin&lt;br /&gt;
ln -s /Data/gfi/projects/isomet/progs/WaterSip_tool/WaterSip3 ~/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load netCDF-C++&lt;br /&gt;
WaterSip3 &amp;lt;WATERSIP_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the UiB hpc environment requires the above &#039;module load&#039; command to be executed first.&lt;br /&gt;
&lt;br /&gt;
On cyclone.hpc.uib.no, a run script is available that makes repeated similar runs easier to manage. Only essential parameters have to be changed, such as the target coordinates and case name. These will then be replaced on a template INPUT_WATERSIP file, and then WaterSip will be started. The script and an input file template can be copied like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/run_watersip_template_Bergen_2018.sh .&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/INPUT_WATERSIP_template_Bergen_2018 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Input file conversion from V2====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WaterSip3 -c &amp;lt;WATERSIP_V2_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a new file named &amp;lt;WATERSIP_V2_parameter_file&amp;gt;V3 at the current directory. It is recommended to double check and edit the settings in the converted file before starting a simulation.&lt;br /&gt;
&lt;br /&gt;
====Parallelization====&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
If WaterSip3 is to be executed on a queue system (not applicable to cyclone.hpc.uib.no), the following wrapper script can be used to start a run using 4 cores for parallel processing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# start with sbatch NAME_OF_THIS_FILE directly on machine&lt;br /&gt;
&lt;br /&gt;
#SBATCH --job-name=WaterSip3&lt;br /&gt;
#SBATCH --workdir=/tmp/&lt;br /&gt;
#SBATCH --partition=priority&lt;br /&gt;
#SBATCH --output=WaterSip_job.%j.out&lt;br /&gt;
#SBATCH --error=WaterSip_job.%j.err&lt;br /&gt;
#SBATCH --mail-type=END&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --cpus-per-task=4&lt;br /&gt;
&lt;br /&gt;
srun ./WaterSip3 INPUT_WATERSIP_global_1993&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating mask files====&lt;br /&gt;
&lt;br /&gt;
WaterSip allows to define target regions not only by coordinates, but also by mask files. This is a short introduction to creating a mask for use with WaterSip.&lt;br /&gt;
&lt;br /&gt;
The procedure described here  uses python to create the netcdf file with the mask, and CDO to change the netcdf file format such that it can be read in by watersip.&lt;br /&gt;
&lt;br /&gt;
Required python packages [tested version]: numpy [1.19.1], shapely [1.6.4.post1], netCDF4 [1.5.3] and if loading from a csv, pandas [1.1.3]&lt;br /&gt;
&lt;br /&gt;
Optional packages (for plotting): matplotlib [3.3.1], cartopy [0.16.0]&lt;br /&gt;
&lt;br /&gt;
[[File:watersip_mask-guide.png|400px]]&lt;br /&gt;
Figure: Example for Scandinavia&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Basic principle:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using shapely’s .contains and .touches methods on a polygon with a point in vectorized version (taking a list of points instead of just one point for speed). &lt;br /&gt;
This enables more interactive editing on a grid spacing of 0.25x0.25 degree (1M grid points).&lt;br /&gt;
After calculation, the script performs a boolean OR operation on the two masks to get the combined of inner and edge points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mask_inner=shapely.vectorized.contains(geom, x, y) # - for interior points&lt;br /&gt;
mask_edge=shapely.vectorized.touches(geom, x, y) #- for edge points&lt;br /&gt;
mask_full=mask_inner|mask_edge # | is boolean OR bitwise (elementwise) operator.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
list of coordinates of pairs of lat, lon defining the nodes of the polygon mask.&lt;br /&gt;
&lt;br /&gt;
global meshgrid with a given resolution&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Output:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Boolean mask of False and True in the shape of the meshgrid lat-lon&lt;br /&gt;
&lt;br /&gt;
After using python script, convert to a netCDF format readable by WaterSip by using the command below in a terminal where you newly created mask file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cdo -f nc2 copy mask-from-python.nc mask-to-watersip.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For reference, and instructions on how to load political, and other, geometries straight from NaturalEarth dataset, go to&lt;br /&gt;
[[https://gist.github.com/pelson/9785576]]&lt;br /&gt;
&lt;br /&gt;
=== Input file options ===&lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;code&amp;gt;[Case]&amp;lt;/code&amp;gt;). There are 7 option groups which can appear in random order in the input file:&lt;br /&gt;
&lt;br /&gt;
*Case: general settings related to the case to be extracted&lt;br /&gt;
*Grids: specification of different output grids&lt;br /&gt;
*Diagnostrics: parameters of the moisture diagnostic&lt;br /&gt;
*Output: general output settings&lt;br /&gt;
*Variables: selection of output variables&lt;br /&gt;
*Flexpart: options specific to runs using FLEXPART particle output&lt;br /&gt;
*Lagranto: options specific to runs using Lagranto trajectories&lt;br /&gt;
&lt;br /&gt;
====Parameter set Case====&lt;br /&gt;
&lt;br /&gt;
The settings in this parameter category describe the basic conditions of the diagnostic run.&lt;br /&gt;
&lt;br /&gt;
;caseName (string)&lt;br /&gt;
: identifier for the run, prepended to all output files. Example: &amp;lt;code&amp;gt;caseName = global_201002_relative&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;inputDir (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;inputDir = /Volumes/Data/global/shortposit_%s&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;outputDir (string)&lt;br /&gt;
: path where the output files will be created. Example: &amp;lt;code&amp;gt;outputDir = /Volumes/Data/global/output/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;startDate (date string)&lt;br /&gt;
: inital date of the run, fixed format YYYYMMDD-HHMMSS. Start date is latest date of the run which moves backward in time. Example: &amp;lt;code&amp;gt;startDate = 20100228-180000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;endDate (date string)&lt;br /&gt;
: final date of the run, fixed format YYYYMMDD-HHMMSS. End date is earliest date of the run. Example: &amp;lt;code&amp;gt;endDate = 20100211-000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;timeStep (integer)&lt;br /&gt;
: time step in hours between particles or trajectory output times. (typical values 6, 3, or 1 (hours)). Example: &amp;lt;code&amp;gt;timeStep = 6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajPoints (integer)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;trajPoints = 21&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;minTrajPoints (integer)&lt;br /&gt;
: minimum length of trajectories to be included in analysis. Parameter is only relevant for Lagranto simulations with uneven trajectory length. Example: &amp;lt;code&amp;gt;minTrajPoints = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sectorizeRegion (integer)&lt;br /&gt;
: region set used to divide moisture sources into different sectors (see [[#sectorization]]). Example: &amp;lt;code&amp;gt;sectorizeRegion = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterBoxFile (string)&lt;br /&gt;
: path to the text file describing geographic boxes used to filter air parcels during transport (see [[#box filters]]). Example: &amp;lt;code&amp;gt;filterBoxFile = /home/hso039/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterIndex (integer)&lt;br /&gt;
: used line from the filterBoxFile to select/deselect trajectories. Example: &amp;lt;code&amp;gt;filterIndex = -1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;orographyFile (string)&lt;br /&gt;
: path to the orography file used to select arrival based on underying topography, using the ETOPO2 topography. File in netcdf format. Example: &amp;lt;code&amp;gt;orographyFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/etopo5.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;lsmFile (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;lsmFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maskFile (string)&lt;br /&gt;
: path to file with an arrival selection. Example: &amp;lt;code&amp;gt;maskFile = &amp;quot; &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;useMask (boolean)&lt;br /&gt;
: use mask file (0=no, 1=yes). Example: &amp;lt;code&amp;gt;useMask = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;ompThreads (integer)&lt;br /&gt;
: number of threads to be used with OpenMP parallelisation if compiled with flag -fopenmp (1=no parallelisation, &amp;gt;1 parallelisation activated.). Example: &amp;lt;code&amp;gt;ompThreads = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;showStats (boolean)&lt;br /&gt;
: print statistics about particle processing to the command line (0=off, 1=on). Example: &amp;lt;code&amp;gt;showStats = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Grids====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category specify the different output grids and the gridding method&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLon (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLon (float)&lt;br /&gt;
: maximum longitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalgridmaxlon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMaxLat = 90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDx (float)&lt;br /&gt;
: longitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDy (float)&lt;br /&gt;
: latitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridRadius (float)&lt;br /&gt;
: gridding radius for information from arriving trajectories. Example: &amp;lt;code&amp;gt;arrivalGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLon (float)&lt;br /&gt;
: minimum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLon (float)&lt;br /&gt;
: maximum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLat (float)&lt;br /&gt;
: minimum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLat (float)&lt;br /&gt;
: maximum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLat = 90&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;sourceGridDx (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridDy (float)&lt;br /&gt;
: latitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridRadius (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;griddingType (integer)&lt;br /&gt;
: select [[#gridding algorithm]] (1: fast and simple gridding, 2: improved but slower gridding). Example: &amp;lt;code&amp;gt;griddingType = 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Diagnostics====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category control the way how the diagnostic works, and which trajectories should be considered in the run.&lt;br /&gt;
&lt;br /&gt;
;uptakeThreshold (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;uptakeThreshold = 0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipThreshold (float)&lt;br /&gt;
: 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 precipThreshold is specified as percent decrease relative to the current specific humidity of an air parcel. Then the value is negative. Default absolute values are -0.1 to -0.2 for 3h and 6h time steps. Example: &amp;lt;code&amp;gt;precipThreshold = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;relativeThreshold (boolean)&lt;br /&gt;
: determines whether absolute threshold values or relative threshold values are specified (0: absolute, 1: relative threshold values). Example: &amp;lt;code&amp;gt;relativeThreshold = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease larger than the value given by &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt; to the same number. Example: &amp;lt;code&amp;gt;arrivalPrecipMin = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease of up to the value given by &amp;lt;code&amp;gt;arrivalprecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;relativeThresholds&amp;lt;/code&amp;gt; is set to false, or a value of 1.0 otherwise. The combination of the &amp;lt;code&amp;gt;arrivalPrecipMin/Max&amp;lt;/code&amp;gt; parameters allows to focus on heavy and weak precipitation events only. Example: &amp;lt;code&amp;gt;arrivalPrecipMax = -100.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is larger than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt;. 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. Example: &amp;lt;code&amp;gt;arrivalRHMin = 80&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is less than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt;. Units are %. This parameter in combination with &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; can be used to focus on condensation/no condensation cases when the parameter &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is set to true. Example: &amp;lt;code&amp;gt;arrivalRHMax = 110&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMin (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalOroMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the ETOPO2 topography does not exceed the given value (in m). In combination with . Example: &amp;lt;code&amp;gt;arrivalOroMin&amp;lt;/code&amp;gt;, regions with a complex shape but common elevation can be selected easily. Example: &amp;lt;code&amp;gt;arrivalOroMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMin (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are above at the given altitude (in m above sea level). Example: &amp;lt;code&amp;gt;arrivalAltMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are below the given altitude (in m above sea level). The parameters &amp;lt;code&amp;gt;arrivalAltMin/Max&amp;lt;/code&amp;gt; can be used to conduct vertically stratified analyses.Example: &amp;lt;code&amp;gt;arrivalAltMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;blhScale (float)&lt;br /&gt;
: 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 &#039;moisture sources boundary-layer&#039;, all others to the category &#039;moisture sources free troposphere&#039;. Default value is 1.5. Example: &amp;lt;code&amp;gt;blhScale = 1.5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;analyzeVapour (boolean)&lt;br /&gt;
: Parameter allowing to analyze vapour origin instead of precipitation origin. Setting this parameter to true considers all air parcels during arrival, not just the ones that precipitate according to the precipitation threshold. If set to true, the &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalRHMin/Max&amp;lt;/code&amp;gt; parameters also need modification. Typically, one will set the &amp;lt;code&amp;gt;precipitation threshold&amp;lt;/code&amp;gt; to a small or even positive number, and the &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; to 0 and &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt; to 110 to include all arriving trajectories. It is often preferrable then to set the &amp;lt;code&amp;gt;arrivalAltMax&amp;lt;/code&amp;gt; to values of around 1000m for surface station measurements, for example. If &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is 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. Example: &amp;lt;code&amp;gt;analyzeVapour = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;assignToUptake (boolean)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;assignToUptake = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;forwardProjectionMode (integer)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;forwardProjectionMode = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Output====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category determine which output files should be created.&lt;br /&gt;
&lt;br /&gt;
;stepFile (boolean)&lt;br /&gt;
: write parameters on [[#Grid files]] and [[#Series files]] for each time step. Example: &amp;lt;code&amp;gt;stepFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;dayFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each day. Example: &amp;lt;code&amp;gt;dayFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;monthFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each month. Example: &amp;lt;code&amp;gt;monthFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;yearFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each year. Example: &amp;lt;code&amp;gt;yearFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;allFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for all time steps. Example: &amp;lt;code&amp;gt;allFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;staticFields (boolean)&lt;br /&gt;
: write static fields (land-sea mask and topography) onto grid files. Example: &amp;lt;code&amp;gt;staticFields = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveTraj (integer)&lt;br /&gt;
: write particle trajectories to [[#Trajectory files]] at each time step (1) or each month (2). Option 0 disables trajectory output. Example: &amp;lt;code&amp;gt;saveTraj = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;skipTraj (boolean)&lt;br /&gt;
: write every nth trajectory to reduce traj file size (1:disabled, &amp;gt;=2: stride size). Example: &amp;lt;code&amp;gt;skipTraj = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveHistogram (boolean)&lt;br /&gt;
: write histogram for selected parameters to a [[#Histogram files]] (0: disabled, 1:enabled). Example: &amp;lt;code&amp;gt;saveHistogram = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveMean (boolean)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;saveMean = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Variables====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category allow to include or exclude specific variables from the output files. Setting the output for unused variables to 0 (disabled) will speed up computation time, reduce the memory footprint, and reduce the output file size. Only parameters that are really required from a run should therefore selected as enabled.&lt;br /&gt;
&lt;br /&gt;
;sourcesBoundaryLayer (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the boundary layer to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesBoundaryLayer = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourcesFreeTroposphere (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the free troposphere to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesFreeTroposphere = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;evaporationMinusPrecipitation (boolean)&lt;br /&gt;
: write unweighted evaporation minus precipitation along entire trajectory length to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;evaporationMinusPrecipitation = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;moistureTransport (boolean)&lt;br /&gt;
: write weighted moisture transport along trajectories to grid and series output files (0: disabled, 1: enabled). Units are mm. Example: &amp;lt;code&amp;gt;moistureTransport = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajectoryLocations (boolean)&lt;br /&gt;
: write trajectory locations to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Example: &amp;lt;code&amp;gt;trajectoryLocations = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipitationEstimate (boolean)&lt;br /&gt;
: write precipitation estimate at arrival to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;precipitationEstimate = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLongitude (boolean)&lt;br /&gt;
: write weighted moisture source longitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees longitude. Example: &amp;lt;code&amp;gt;sourceLongitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLatitude (boolean)&lt;br /&gt;
: write moisture source latitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees latitude. Example: &amp;lt;code&amp;gt;sourceLatitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionCount (boolean)&lt;br /&gt;
: write convection count projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Convection count can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionCount is not on the ERA-Interim climatology run. The counter is increased each time the particles passes the convection scheme upwards. Example: &amp;lt;code&amp;gt;convectionCount = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionHeight (boolean)&lt;br /&gt;
: write convection height projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Convection height can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionHeight is not on the ERA-Interim climatology run. The value gives an average height of vertical displacement when the particles passes the convection scheme. Example: &amp;lt;code&amp;gt;convectionHeight = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;landFraction (boolean)&lt;br /&gt;
: write fraction of moisture sources over land projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;landFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;boundaryLayerFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;boundaryLayerFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;freeTroposphereFraction (boolean)&lt;br /&gt;
: write accounted fraction of free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;freeTroposphereFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;combinedFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer and free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). This is the sum of the two previous variables. Example: &amp;lt;code&amp;gt;combinedFraction = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTime (boolean)&lt;br /&gt;
: write moisture transport time projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are hours. Example: &amp;lt;code&amp;gt;transportTime = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSpecificHumidity (boolean)&lt;br /&gt;
: write surface specific humidity at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are g per kg. Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSpecificHumidity = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportDistance (boolean)&lt;br /&gt;
: write transport distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Transport distance is the length of the actual travel path along the trajectories from moisture source to the arrival region. Example: &amp;lt;code&amp;gt;transportDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDistance (boolean)&lt;br /&gt;
: write source distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Source distance is the shortest distance between the moisture source and the arrival region. Example: &amp;lt;code&amp;gt;sourceDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;source2mTemperature (boolean)&lt;br /&gt;
: write 2m temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;source2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDeuteriumExcess (boolean)&lt;br /&gt;
: write deuterium excess projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are permil. Deuterium excess is calculated from the relative humidity with respect to SST and the relationship from Pfahl and Sodemann (2014). Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceDeuteriumExcess = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperature during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;transportTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportPressure (boolean)&lt;br /&gt;
: write moisture-weighted pressure during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;transportPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;condensationTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperatures where RH&amp;lt;sub&amp;gt;liquid&amp;lt;/sub&amp;gt; exceeds 80% to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;condensationTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalTemperature (boolean)&lt;br /&gt;
: write temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;arrivalTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPressure (boolean)&lt;br /&gt;
: write pressure during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;arrivalPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrival2mTemperature (boolean)&lt;br /&gt;
: write temperature at 2m during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that 2m temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrival2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrivalSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Flexpart====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
;inputFormat (integer)&lt;br /&gt;
: 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/NorESM data short format, 4: global reanalysis data long format, 5 regional reanalysis/NorESM data short format. Example: &amp;lt;code&amp;gt;inputFormat = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maxPart (integer)&lt;br /&gt;
: number of particles contained in a single FLEXPART partposit or shortposit file. Example: &amp;lt;code&amp;gt;maxPart = 5000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partMass (float)&lt;br /&gt;
: atmospheric mass represented by each particle in kilogramms. Parameter is written out by specific version of FLEXPART to create WaterSip output data. Example: &amp;lt;code&amp;gt;partMass = 1.01943e+12&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partStride (integer)&lt;br /&gt;
: number of particles to skip during processing to speed up calculations (1: use every particle, &amp;gt;=2: use every 2nd particle, etc). Example: &amp;lt;code&amp;gt;partStride = 10&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;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). Example: &amp;lt;code&amp;gt;allowReenter = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Lagranto====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Full example for a FLEXPART run input file:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Case]&lt;br /&gt;
caseName = global_201002_final_relativex&lt;br /&gt;
inputDir = /home/data/flexpart/global/shortposit_%s&lt;br /&gt;
outputDir=/home/data/watersip/global_201002_V3/&lt;br /&gt;
startDate = 20100228-180000&lt;br /&gt;
endDate = 20100211-000000&lt;br /&gt;
timeStep = 6&lt;br /&gt;
sectorizeRegion = 0&lt;br /&gt;
filterBoxFile = /home/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&lt;br /&gt;
filterIndex = -1&lt;br /&gt;
orographyFile = &amp;quot;/home/projects/WaterSip_tool/etopo5.nc&amp;quot;&lt;br /&gt;
lsmFile = &amp;quot;/home/projects/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&lt;br /&gt;
maskFile = &amp;quot; &amp;quot;&lt;br /&gt;
useMask = 0&lt;br /&gt;
trajPoints = 41&lt;br /&gt;
minTrajPoints = 0&lt;br /&gt;
ompThreads = 1&lt;br /&gt;
showStats = 0&lt;br /&gt;
&lt;br /&gt;
[Grids]&lt;br /&gt;
arrivalGridMinLon = -180&lt;br /&gt;
arrivalGridMaxLon = 180&lt;br /&gt;
arrivalGridMinLat = -90&lt;br /&gt;
arrivalGridMaxLat = 90&lt;br /&gt;
arrivalGridDx = 1&lt;br /&gt;
arrivalGridDy = 1&lt;br /&gt;
arrivalGridRadius = 200&lt;br /&gt;
sourceGridMinLon = -180&lt;br /&gt;
sourceGridMaxLon = 180&lt;br /&gt;
sourceGridMinLat = -90&lt;br /&gt;
sourceGridMaxLat = 90&lt;br /&gt;
sourceGridDx = 1&lt;br /&gt;
sourceGridDy = 1&lt;br /&gt;
sourceGridRadius = 200&lt;br /&gt;
griddingType = 2&lt;br /&gt;
&lt;br /&gt;
[Diagnostics]&lt;br /&gt;
uptakeThreshold = 0.05&lt;br /&gt;
precipThreshold = 0.05&lt;br /&gt;
blhScale = 1.5&lt;br /&gt;
arrivalPrecipMin = 0.05&lt;br /&gt;
arrivalPrecipMax = 1.0&lt;br /&gt;
arrivalRHMin = 80&lt;br /&gt;
arrivalRHMax = 110&lt;br /&gt;
arrivalOroMin = -100&lt;br /&gt;
arrivalOroMax = 12000&lt;br /&gt;
arrivalAltMin = -100&lt;br /&gt;
arrivalAltMax = 12000&lt;br /&gt;
analyzeVapour = 0&lt;br /&gt;
assignToUptake = 0&lt;br /&gt;
forwardProjectionMode = 3&lt;br /&gt;
relativeThreshold = 1&lt;br /&gt;
&lt;br /&gt;
[Output]&lt;br /&gt;
stepFile = 1&lt;br /&gt;
dayFile = 1&lt;br /&gt;
monthFile = 1&lt;br /&gt;
yearFile = 1&lt;br /&gt;
allFile = 1&lt;br /&gt;
staticFields = 1&lt;br /&gt;
saveTraj = 0&lt;br /&gt;
skipTraj = 0&lt;br /&gt;
saveHistogram = 0&lt;br /&gt;
saveMean = 0&lt;br /&gt;
&lt;br /&gt;
[Variables]&lt;br /&gt;
sourcesBoundaryLayer = 1&lt;br /&gt;
sourcesFreeTroposphere = 1&lt;br /&gt;
evaporationMinusPrecipitation = 1&lt;br /&gt;
moistureTransport = 1&lt;br /&gt;
trajectoryLocations = 1&lt;br /&gt;
precipitationEstimate = 1&lt;br /&gt;
sourceLongitude = 1&lt;br /&gt;
sourceLatitude = 1&lt;br /&gt;
convectionCount = 0&lt;br /&gt;
convectionHeight = 0&lt;br /&gt;
landFraction = 1&lt;br /&gt;
boundaryLayerFraction = 1&lt;br /&gt;
freeTroposphereFraction = 1&lt;br /&gt;
combinedFraction = 0&lt;br /&gt;
transportTime = 1&lt;br /&gt;
sourceSkinTemperature = 1&lt;br /&gt;
sourceSpecificHumidity = 0&lt;br /&gt;
transportDistance = 1&lt;br /&gt;
sourceDistance = 1&lt;br /&gt;
source2mTemperature = 0&lt;br /&gt;
sourceDeuteriumExcess = 1&lt;br /&gt;
transportTemperature = 1&lt;br /&gt;
transportPressure = 1&lt;br /&gt;
condensationTemperature = 1&lt;br /&gt;
arrivalTemperature = 1&lt;br /&gt;
arrivalPressure = 1&lt;br /&gt;
arrival2mTemperature = 0&lt;br /&gt;
arrivalSkinTemperature = 1&lt;br /&gt;
&lt;br /&gt;
[Flexpart]&lt;br /&gt;
inputFormat = 3&lt;br /&gt;
maxPart = 5000000&lt;br /&gt;
partMass = 1.01943e+12&lt;br /&gt;
partStride = 10&lt;br /&gt;
allowReenter = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Output file formats===&lt;br /&gt;
&lt;br /&gt;
The results from the WaterSip diagnostic are written to a set of output files in different format. The main output files are created in netCDF with detailed metadata information, including the parameter settings of the run for automated documentation. The creation of different output files can be adapted by parameter settings in parameter set *Output* and the contained variables with settings in parameter set *Variables*. Spatial fields at different time intervals are written to so-called grid files in [[netCDF]] format, time series of averaged quantities at different time intervals are written to so-called Series files in netCDF format, histograms of selected quantities identified during the processing for each time step and each trajectory are written to Histogram files in ASCII format, and trajectories are written to Trajectory files in either the binary format traj or the Lagranto ASCII format. Earlier versions than V3 reported output in so-called Mean files in an ASCII format. That format is documented here but no longer in use in current versions of WaterSip.&lt;br /&gt;
&lt;br /&gt;
The time unit has changed in Version 3.1. Previously, the unit was set to &amp;quot;days since 0000-01-02 00:00:00&amp;quot; to allow matlab-compatible values for time that could directly be utilized with the datenum() commands. In order to confirm to netCDF-CF standards, where no calendar year 0000 exists, the time unit is now &amp;quot;days since 0001-01-01 00:00:00&amp;quot;. This provides the ability to open and visualize netCDF output files directly with tools such as ncview and panoply. To convert the time values into a matlab datenum compatible value, the following commands have to be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ncid=netcdf.open(filename,&amp;quot;noclobber&amp;quot;);&lt;br /&gt;
tim=(float)netcdf.getVar(ncid,&amp;quot;time&amp;quot;);&lt;br /&gt;
tim=tim-datenum(1,0,1);&lt;br /&gt;
datestr(tim)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table below summarizes the available output files:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Content !! Format !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| Grid files || Spatial properties of moisture sources and arrival regios || netCDF || CASE_grd_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Series files || Mean/min/max/std of regionally and globally averaged moisture source and arrival region properties || netCDF || CASE_ser_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Histogram files || Histograms of quantities identified for each timestep along each trajectory || ASCII || CASE_hst_steps&lt;br /&gt;
|-&lt;br /&gt;
| Trajectory files || Trajectories for identified precipitation events || ASCII/binary traj || CASE_DATE.traj/CASE_DATE_lsl&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Grid files====&lt;br /&gt;
&lt;br /&gt;
Grid file variables are separated into immediate source and transport variables, typically on a coarser, global grid, and arrival and forward-projected variables on the (typically finer-scale) arrival grid. The grid settings are determined by the corresponding parameters in parameter set *Grid*. All variables are of type float, and the fill value (netCDF property _FillValue) is -999.99. The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and dividing by the total precipitation (as described above).&lt;br /&gt;
&lt;br /&gt;
**Moisture source and transport properties**&lt;br /&gt;
&lt;br /&gt;
Variables related to immediate moisture source and transport properties (not forward projected) have dimension of variables time, global_latitude, global_longitude, as defined by input file parameters *sourceGridMinLon,sourceGridMaxLon, sourceGridMinLat, sourceGridMaxLat, sourceGridDx, sourceGridDy, sourceGridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer || E_s^BL || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere || E_s^FT || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation || E-P || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport || Q_t || mm ||  text &lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location || N_t || counts km^-2 || text &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Arrival properties and Lagrangian forward projections**&lt;br /&gt;
&lt;br /&gt;
The variables contained in these files have the dimensions time (days since 0001-01-01 00:00:00), latitude (degrees_north), and longitude (degrees_east) as defined by input file parameters *arrivalGridMinLon, arrivalGridMaxLon, arrivalGridMinLat, arrivalGridMaxLat, arrivalGridDx, arrivalGridDy, arrival | source | text |GridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Unit !! Property !! Description &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate || PE || mm day^-1 or mm step^-1 || arrival || precipitation at arrival location estimated from change in specific humidity during last time step &lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature || T_a || K || arrival || PE-weighted temperature at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure || p_a || hPa || arrival || PE-weighted pressure at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature || SKT_a || K || arrival || PE-weighted SKT below trajectory location during arrival &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer || f_BL || fraction || arrival || fractional contribution of BL moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere || f_FT || fraction || arrival || fractional contribution of FT moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_lifetime || \tau_t || h || transport || contribution and precipitation-weighted precipitation life time &lt;br /&gt;
|-&lt;br /&gt;
| transport_distance || \Delta_t || km || transport || contribution and precipitation-weighted transport distance along trajectory &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature || T_t || K || transport || contribution and precipitation-weighted temperature during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure || p_t || hPa || transport || contribution and precipitation-weighted pressure during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature || T_c || K || transport || contribution and precipitation-weighted temperature when RH&amp;gt;80% during transport &lt;br /&gt;
|-&lt;br /&gt;
| source_longitude || \lambda_s || degrees_east || source || contribution and precipitation-weighted latitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_latitude || \phi_s || degrees_north || source || contribution and precipitation-weighted longitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| land_fraction || f_l || fraction || source || contribution and precipitation-weighted fraction of moisture sources over land &lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature || SKT_s || K || source || contribution and precipitation-weighted SKT at the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_distance || \Delta_s || km || source || contribution and precipitation-weighted direct distance between the moisture source and arrival location &lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess || d_s || permil || source || contribution and precipitation-weighted estimate of deuterium excess at the source from RH and T using the Pfahl and Sodemann (2013) relation &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Global attributes**&lt;br /&gt;
&lt;br /&gt;
The netCDF grid files contain a range of essential parameters as global attributes. These parameters allow to fully characterise the result of the WaterSip run as required for the interpretation of the results. A number of run parameters are omitted, that concern logistical settings, or that are self-evident from the content of the the output files. The table below gives an example for a WaterSip run:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Example !! Type &lt;br /&gt;
|-&lt;br /&gt;
| startDate || &amp;quot;2010-02-28 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| endingDate || &amp;quot;2010-01-11 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| analysisRegion || &amp;quot;NEEM&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| maxPart || 5000001  || int&lt;br /&gt;
|-&lt;br /&gt;
| caseName || &amp;quot;global_201002_V3_stride&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| trajPoints || 61  || int&lt;br /&gt;
|-&lt;br /&gt;
| timeStep || 6  || in float&lt;br /&gt;
|-&lt;br /&gt;
| partMass || 2.03885996E12  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| dryLevel || 0.01  || float&lt;br /&gt;
|-&lt;br /&gt;
| blhScale || 1.5  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMin || 80.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMax || 110.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| uptakeThreshold || 0.2  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| precipThreshold || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMin || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMax || -120.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| anaVapour || 0  || int&lt;br /&gt;
|-&lt;br /&gt;
| filterIndex || -1  || int&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Series files====&lt;br /&gt;
&lt;br /&gt;
The netCDF series files contain two sets of information. The so-called sectorization output provides time series of the moisture source information seperated into relative contributions from predefined geographical areas. Furthermore, the series files contains weighted averages and further statistical properties of all quantities in the grid files. &lt;br /&gt;
&lt;br /&gt;
**Sectorisation output**&lt;br /&gt;
&lt;br /&gt;
A set of sectorisations is chosen by the parameter *sectorizeRegion*. The currently available options are listed in the table below. New sectorisations can be defined by changing the code in routine &amp;lt;code&amp;gt;Sectors.cpp/Sectors.h&amp;lt;/code&amp;gt;. This requires defining a new name and new decision tree that provides a unique number for any lat/lon value between -180E to 180E and -90 to 90N. See comments in the code.&lt;br /&gt;
&lt;br /&gt;
For each of the predefined areas, the relative contributions are subdivided into land and sea covered areas. Time series of the contributions are of dimension time and sector. Thereby, the sector numbers correspond to the sector numbers defined in the program code. The area of the sectors is calculated automatically within WaterSip. As noted above for the grid files, the time unit has been changed starting from Version 3.1.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol !! Unit !! Description&lt;br /&gt;
|-&lt;br /&gt;
| time || t || days since 0001-01-01 00:00:00 || text&lt;br /&gt;
|-&lt;br /&gt;
| sector || s || sector number || text&lt;br /&gt;
|-&lt;br /&gt;
| sector_area || A_s || km^2 || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_boundary_layer || f_l^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_boundary_layer || f_s^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_free_troposphere || f_l^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_free_troposphere || f_s^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_trajectory_location || f_l^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_trajectory_location || f_s^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_transport || f_l^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_transport || f_s^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_evaporation_minus_precipitation || f_l^EP || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_evaporation_minus_precipitation | f_s^EP | percent | text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Time-series output**&lt;br /&gt;
&lt;br /&gt;
For immediate quantities, a time series of the total field sum is recorded in the series file. In order to obtain an area average, one needs to divide the sum by the surface of the earth (x km^2). The unit for moisture uptakes, E-P and precipitation estimate is mm step^-1 for step series files, and mm 24h^-1 for all other averaging series files. In addition to sums, the files contain time series of the minimum, maximum and standard deviation of the grid field at each time instance. For all forward-projected and arrival quantities, the average rather than the sum is calculated on the arrival grid locations. When averaging from step output to larger time intervals, the quantities are weighted with the corresponding PE at each grid point. &lt;br /&gt;
&lt;br /&gt;
In addition, series files contain the same set of global attributes as described in Grid files to enable interpretation without additional documentation of the run setup.&lt;br /&gt;
&lt;br /&gt;
*Immediate quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_min || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_sum || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_max || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_min || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_sum || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_max || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Arrival and forward-projected quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_min || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_avg || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_max || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_min || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_avg || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_max || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_min || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_avg || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_max || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_min || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_avg || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_max || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_avg || x  || K &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_max || x || K&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Histogram files====&lt;br /&gt;
&lt;br /&gt;
* Bounds freq (1 to n categories), (1 to m variables)&lt;br /&gt;
* Main variables time, dq, conv&lt;br /&gt;
* where to implement&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20.71   46.56   8.1351e+05  -1.0000e+00&lt;br /&gt;
21.22   45.90   1.1314e+06  -1.0000e+00&lt;br /&gt;
22.03   45.24   4.1929e+05  -1.0000e+00&lt;br /&gt;
21.19   45.35   1.0639e+06  -1.0000e+00&lt;br /&gt;
20.71   46.50   5.0963e+05  -1.0000e+00&lt;br /&gt;
21.07   47.51   2.8182e+05  -1.0000e+00&lt;br /&gt;
21.71   48.67   9.3088e+05  -1.0000e+00&lt;br /&gt;
22.14   51.47   2.3634e+05  -1.0000e+00&lt;br /&gt;
22.14   52.49   8.0048e+05  -1.0000e+00&lt;br /&gt;
22.34   53.76   7.3297e+05  -1.0000e+00&lt;br /&gt;
23.17   54.41   4.1516e+05  -1.0000e+00&lt;br /&gt;
23.56   54.54   2.7414e+05  -1.0000e+00&lt;br /&gt;
24.39   54.55   5.0017e+05  -1.0000e+00&lt;br /&gt;
26.89   54.42   2.8215e+05  -1.0000e+00&lt;br /&gt;
28.18   54.40   3.9987e+05  -1.0000e+00&lt;br /&gt;
29.80   54.25   3.6020e+05  -1.0000e+00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Trajectory files====&lt;br /&gt;
&lt;br /&gt;
**LSL format**&lt;br /&gt;
&lt;br /&gt;
* As documented elsewhere&lt;br /&gt;
* only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Traj format**&lt;br /&gt;
&lt;br /&gt;
* Binary format, only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
* reading in and plotting traj files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mean file====&lt;br /&gt;
&lt;br /&gt;
Legacy format, global_201002_V3_avg_steps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20100228_00 13795.603  0.001 7994.128  0.001 722561152.000 1977998.875   -0.081   -3.124    0.007  -0.080  -1.347   0.003   0.181   0.000   0.001   0.711   0.006   0.001   0.242   0.000   0.001 -999.990 -999.990 -999.990  -83.283 -340.404    0.153  288.231  242.846    0.050 -999.990 -999.990 -999.990   2828.54    120.41      7.50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Annotated bibliography===&lt;br /&gt;
&lt;br /&gt;
There are to date (Oct 2019) 25 publications involving the WaterSip method in one way or another. The versatility of WaterSip ranges from weather events to climatological studies, and from process understanding to paleoclimate proxy interpretation. This documentation can only provide initial guidance in applying WaterSip to new research plans. The annotated bibliography below provides an overview over the relevant studies, ordered by topic and the respective climatic zone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Topic !! Time perspective !! Climate zone !! Region !! Reference&lt;br /&gt;
|-&lt;br /&gt;
| Method description || - || High latitudes || Greenland || Sodemann et al., 2008a&lt;br /&gt;
|-&lt;br /&gt;
| Precipitation extremes || Climatology || Subtropics || Mediterranean || Winschall et al., 2014a&lt;br /&gt;
|-&lt;br /&gt;
| Method evaluation || Weather event || Subtropics || Mediterranean || Winschall et al., 2014b&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime of precipitation || Climatology || Global || Global || Läderach and Sodemann, 2016&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || High latitudes || Greenland || Sodemann et al., 2008b&lt;br /&gt;
|-&lt;br /&gt;
| Climate characteristics || Climatology || Mid latitudes || Europe || Sodemann and Zubler, 2010&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Tropics || Belize || Kenneth et al., &lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Mid latitudes || China || Baker et al., Luetscher et al. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
* Thurnherr, I., Kozachek, A., Graf, P., Weng, Y., Bolshiyanov, D., Landwehr, S., Pfahl, S., Schmale, J., Sodemann, H., Steen-Larsen, H. C., Toffoli, A., Wernli, H., and Aemisegger, F., 2019: Meridional and vertical variations of the water vapour isotopic composition in the marine boundary layer over the Atlantic and Southern Ocean, Atmos. Chem. Phys. Discuss., doi: 10.5194/acp-2019-782.&lt;br /&gt;
* Fremme, A. and Sodemann, H., 2019: The role of land and ocean evaporation on the variability of precipitation in the Yangtze River valley, Hydrol. Earth Syst. Sci., 23, 2525–2540, doi: 10.5194/hess-23-2525-2019. &lt;br /&gt;
* Huang, R, Zhu, H, Liang, E., Grießinger, J, Wernicke, J., Yu, W., Hochreuther, P., Risi, C., Zeng, Y., Fremme, A., Sodemann, H., Bräuning, A., 2019: Temperature signals in tree-ring oxygen isotope series from the northern slope of the Himalaya, EPSL 506: 455-465. &lt;br /&gt;
* Buizert, Christo; Sigl, Michael; Severi, Mirko; Markle, Bradley; Wettstein, Justin; McConnell, J; Pedro, Joel; Sodemann, H.; Goto-Azuma, Kumiko; Kawamura, Kenji; Fujita, Shuji; Motoyama, Hideaki; Hirabayashi, Motohiro; Uemura, Ryu; Stenni, Barbara; Parrenin, Frederic; He, Feng; Fudge, T.J.; Steig, Eric J., 2018: Abrupt ice-age shifts in southern westerly winds and Antarctic climate forced from the north, Nature 563: 681-685.&lt;br /&gt;
* Bohlinger, P., Sorteberg, A., Liu, C., Rasmussen, R., Sodemann, H., Ogawa, F., 2018: Multiscale characteristics of an extreme precipitation event over Nepal. QJRMS:1-18, doi:10.1002/qj.3418. &lt;br /&gt;
* Bohlinger, P., Sorteberg, A., and Sodemann, H., 2017: Synoptic conditions and moisture sources actuating extreme precipitation in Nepal. Journal of Geophysical Research: Atmospheres, 122, 12,653–12,671. https://doi.org/10.1002/2017JD027543.&lt;br /&gt;
* Blazina, T., A. Läderach, G. D. Jones, H. Sodemann, H. Wernli, J. W. Kirchner and L. H. E. Winkel, 2016: Marine primary productivity as a potential source of selenium and other trace elements in atmospheric deposition, Environ. Sci. Technol. 2017, 51, 108−118, doi: 10.1021/acs.est.6b03063.&lt;br /&gt;
* Läderach, A. andSodemann, H., 2016: A revised picture of the atmospheric moisture residence time, Geophys. Res. Lett., 43, doi:10.1002/2015GL067449.&lt;br /&gt;
* Baker, A., Sodemann, H., Baldini, J. U. L., Breitenbach, S. F. M., Johnson, K. R., van Hunen, J., and Pingzhong, Z., 2015: Seasonality of westerly moisture transport in the East Asian Summer Monsoon and its implications for interpreting precipitation d18O, J. Geophys. Res., 120,  doi:10.1002/2014JD022919.&lt;br /&gt;
* Steen-Larsen, H. C., Sveinbjörnsdottir, A. E., Jonsson, T., Ritter, F., Bonne, J.-L., Masson-Delmotte, V., Sodemann, H., Blunier, T., Dahl-Jensen, D., Vinther, B. M., 2015: Moisture sources and synoptic to seasonal variability of North Atlantic water vapor isotopic composition, J. Geophys. Res., 120, 5757–5774, doi:10.1002/ 2015JD023234.&lt;br /&gt;
* Bonne, J.-L., Steen-Larsen, H. C., Risi, C., Werner, M., Sodemann, H., Lacour, J.-L., Fettweis, X., Cesana, G., Delmotte, M., Cattani, O., Vallelonga, P., Kjær, H. A., Clerbaux, C., Sveinbjörnsdóttir, A. E., and Masson-Delmotte, V., 2015: The summer 2012 Greenland heat wave: In situ and remote sensing observations of water vapor isotopic composition during an atmospheric river event, J. Geophys. Res., 120, 2970-2989, doi:10.1002/2014JD022602.&lt;br /&gt;
* Luetscher, M., Boch, R., Sodemann, H., Spoetl, C., Cheng, H., Edwards, R. L., Frisia, S., Hof, F., Mueller, W., 2015: North Atlantic storm track changes during the Last Glacial Maximum recorded by Alpine speleothems, Nature Comm. 6: 6344, doi:10.1038/ncomms7344.&lt;br /&gt;
* Winschall, A., Sodemann, H.,Pfahl, S. and Wernli, H., 2014: How important is intensified evaporation for Mediterranean precipitation extremes?, J. Geophys. Res., 119: 5240–5256, doi:10.1002/2013JD021175&lt;br /&gt;
* Winschall, A., Pfahl, S., Sodemann, H.and Wernli, H.. 2014. Comparison of Eulerian and Lagrangian moisture source diagnostics - the flood event in eastern Europe in May 2010, Atmos. Chem. Phys. 14: 6605–6619, doi:10.5194/acp-14-6605-2014.&lt;br /&gt;
* Aemisegger, F., Pfahl, S., Sodemann, H., Lehner, I., Seneviratne, S. I., and Wernli, H., 2014: Deuterium excess as a proxy for continental moisture recycling and plant transpiration, Atmos. Chem. Phys., 14: 4029–4054, doi:10.5194/acp-14-4029-2014.&lt;br /&gt;
* Bonne, J. L., Masson-Delmotte, V., Cattani, O., Delmotte, M., Risi, C., Sodemann, H., and Steen-Larsen, H. C., 2014:The isotopic composition of water vapour and precipitation in Ivittuut, southern Greenland, Atmos. Chem. Phys. 14: 4419–4439, doi:10.5194/acp-14-4419-2014.&lt;br /&gt;
* Wang, Y., Sodemann, H., Hou, S., Masson-Delmotte, V. Jouzel, J. and Pang, H., 2013: Snow accumulation and its moisture origin over Dome Argus, Antarctica. Clim. Dyn., 40:731-742, doi: 10.1007/s00382-012-1398-9.&lt;br /&gt;
* Martius, O., Sodemann, H., Joos, H., Pfahl, S., Winschall, A., Croci-Maspoli, M., Graf, M., Madonna, E., Mueller, B., Schemm, S., Sedlacek, J., Sprenger, M. and Wernli, H., 2012: The role of upper-level dynamics and surface processes for the Pakistan flood in July 2010. Quart. J. Royal Meteorol. Soc., published online, doi: 10.1002/qj.2082.&lt;br /&gt;
* Kennett, D. J., Breitenbach, S. F. M., Aquino, V. V., Asmerom, Y., Awe, J., Baldini, J. U. L., Bartlein, P., Culleton, B. J., Ebert, C., Jazwa, C., Macri, M. J., Marwan, N., Polyak, V., Prufer, K. M., Ridley, H. E., Sodemann, H., Winterhalder, B. and Haug, G. H., 2012: Development and Disintegration of Maya Political Systems in Response to Climate Change. Science, 338: 788-791, doi: 10.1126/science.1226299.&lt;br /&gt;
* Winkler, R., Landais, A., Sodemann, H., Dümbgen, L., Priéa, F., Masson-Delmotte, V., Stenni, B., and Jouzel, J., 2012: Deglaciation records of 17O-excess in East Antarctica: reliable reconstruction of oceanic relative humidity from coastal sites. Clim. Past 8, 1-16.&lt;br /&gt;
* Masson-Delmotte, V., Buiron, D., Ekaykin, A., Frezzotti, M., Gallée, H., Jouzel, J., Krinner, G., Landais, A., Motoyama, A., Oerter, H., Pol, K., Pollard, D., Ritz, C., Schlosser, E., Sime, L. C., Sodemann, H., Stenni, B., Uemura R., and Vimeux, F., 2011: A comparison of the present and last interglacial periods in six Antarctic ice cores Clim. Past, 7, 397-423. &lt;br /&gt;
* Sodemann, H.and Zubler, E., 2010: Seasonality and inter-annual variability of the moisture sources for Alpine precipitation during 1995-2002, Int. J. Climatol., 30: 947-961, doi:10.1002/joc.1932.&lt;br /&gt;
* Sodemann, H., and Stohl, A., 2009: Asymmetries in the moisture origin of Antarctic precipitation, Geophys. Res. Lett., 36, L22803, doi:10.1029/2009GL040242.&lt;br /&gt;
* Sodemann, H., Masson-Delmotte, V., Schwierz, C., Vinther, B. M. and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Part II: Effects of North Atlantic Oscillation variability on stable isotopes in precipitation, J. Geophys. Res., 113, D12111, doi:10.1029/2007JD009416.&lt;br /&gt;
* Sodemann, H., Schwierz, C., and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Lagrangian moisture diagnostic and North Atlantic Oscillation influence, J. Geophys. Res.,113, D03107, doi:10.1029/2007JD008503.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=File:Watersip_mask-guide.png&amp;diff=1429</id>
		<title>File:Watersip mask-guide.png</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=File:Watersip_mask-guide.png&amp;diff=1429"/>
		<updated>2021-01-15T08:32:11Z</updated>

		<summary type="html">&lt;p&gt;Hso039: Hso039 uploaded a new version of File:Watersip mask-guide.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1428</id>
		<title>WaterSip</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1428"/>
		<updated>2021-01-15T08:30:44Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===About WaterSip===&lt;br /&gt;
&lt;br /&gt;
WaterSip is a diagnostic software tool that identifies source, transport and arrival properties of atmospheric water vapour based on airmass backward trajectories. As a prerequisite, the backward trajectories for the analysis are to be obtained from a trajectory calculation tool, such as FLEXPART [[http://www.flexpart.eu]] or Lagranto [[http://www.lagranto.iac.ethz.ch]]. Moisture sources are then identified from changes in specific humidity interpolated to the air parcel trajectory per time step. The changes in specific humidity at each time step are set in relation with the current humidity of the air parcel. This allows to estimate the quantitative contribution of moisture to the air parcel at a specific location, a so-called moisture accounting. WaterSip identifies and aggregates further properties of the moisture source and during the moisture transport, such as temperature, pressure, latitude etc. The moisture source diagnostic is described in detail in [[Sodemann et al. (2008)]]. Publications using the WaterSip diagnostic are listed in section [[Bibliography]].&lt;br /&gt;
&lt;br /&gt;
===Working principle===&lt;br /&gt;
&lt;br /&gt;
Explanation from Sodemann et al. 2008a&lt;br /&gt;
&lt;br /&gt;
Image from Läderach and Sodemann, 2016 or Sodemann et al., 2008a&lt;br /&gt;
&lt;br /&gt;
Moisture source information&lt;br /&gt;
&lt;br /&gt;
- Accounted fraction fa, fb, fa+fb&lt;br /&gt;
- adding below and above boundary layer or not, when&lt;br /&gt;
- choosing threshold values for Arctic and other regions&lt;br /&gt;
- identifying moisture transport&lt;br /&gt;
&lt;br /&gt;
Arrival information and Lagrangian forward projections&lt;br /&gt;
&lt;br /&gt;
- arrival parameters&lt;br /&gt;
- transport parameters&lt;br /&gt;
- source parameters&lt;br /&gt;
- averaging by contribution and amount&lt;br /&gt;
&lt;br /&gt;
Series information&lt;br /&gt;
&lt;br /&gt;
- sectorization (Sodemann and Zubler, 2010; definition table, code changes)&lt;br /&gt;
- weighted averaging: The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and deviding by the total precipitation.&lt;br /&gt;
&lt;br /&gt;
Averaged properties&lt;br /&gt;
&lt;br /&gt;
- histogram example and modification (code below)&lt;br /&gt;
&lt;br /&gt;
Trajectories&lt;br /&gt;
&lt;br /&gt;
- plotting/reading example (code below)&lt;br /&gt;
&lt;br /&gt;
Uncertainties&lt;br /&gt;
&lt;br /&gt;
===Example setups===&lt;br /&gt;
&lt;br /&gt;
Three examples with different purposes&lt;br /&gt;
&lt;br /&gt;
====Water vapour====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
====Extratropical precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
 &lt;br /&gt;
====High latitude precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
===Version history===&lt;br /&gt;
&lt;br /&gt;
Version 2.1&lt;br /&gt;
&lt;br /&gt;
Version 2.2&lt;br /&gt;
&lt;br /&gt;
Version 2.3&lt;br /&gt;
&lt;br /&gt;
Version 2.4&lt;br /&gt;
&lt;br /&gt;
Version 2.5&lt;br /&gt;
&lt;br /&gt;
Version 2.8&lt;br /&gt;
&lt;br /&gt;
Version 2.8.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9&lt;br /&gt;
&lt;br /&gt;
Version 2.9.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9.2&lt;br /&gt;
&lt;br /&gt;
Version 2.9.3&lt;br /&gt;
&lt;br /&gt;
Version 2.9.4&lt;br /&gt;
&lt;br /&gt;
Version 3.0.8&lt;br /&gt;
&lt;br /&gt;
Version 3.1&lt;br /&gt;
&lt;br /&gt;
The current version of WaterSip is V3.1.0. &lt;br /&gt;
&lt;br /&gt;
===Running the WaterSip diagnostic===&lt;br /&gt;
&lt;br /&gt;
It is advised to create a link to the binary file of WaterSip in your /home/$USER/bin or project directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/bin&lt;br /&gt;
ln -s /Data/gfi/projects/isomet/progs/WaterSip_tool/WaterSip3 ~/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load netCDF-C++&lt;br /&gt;
WaterSip3 &amp;lt;WATERSIP_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the UiB hpc environment requires the above &#039;module load&#039; command to be executed first.&lt;br /&gt;
&lt;br /&gt;
On cyclone.hpc.uib.no, a run script is available that makes repeated similar runs easier to manage. Only essential parameters have to be changed, such as the target coordinates and case name. These will then be replaced on a template INPUT_WATERSIP file, and then WaterSip will be started. The script and an input file template can be copied like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/run_watersip_template_Bergen_2018.sh .&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/INPUT_WATERSIP_template_Bergen_2018 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Input file conversion from V2====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WaterSip3 -c &amp;lt;WATERSIP_V2_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a new file named &amp;lt;WATERSIP_V2_parameter_file&amp;gt;V3 at the current directory. It is recommended to double check and edit the settings in the converted file before starting a simulation.&lt;br /&gt;
&lt;br /&gt;
====Parallelization====&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
If WaterSip3 is to be executed on a queue system (not applicable to cyclone.hpc.uib.no), the following wrapper script can be used to start a run using 4 cores for parallel processing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# start with sbatch NAME_OF_THIS_FILE directly on machine&lt;br /&gt;
&lt;br /&gt;
#SBATCH --job-name=WaterSip3&lt;br /&gt;
#SBATCH --workdir=/tmp/&lt;br /&gt;
#SBATCH --partition=priority&lt;br /&gt;
#SBATCH --output=WaterSip_job.%j.out&lt;br /&gt;
#SBATCH --error=WaterSip_job.%j.err&lt;br /&gt;
#SBATCH --mail-type=END&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --cpus-per-task=4&lt;br /&gt;
&lt;br /&gt;
srun ./WaterSip3 INPUT_WATERSIP_global_1993&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating mask files====&lt;br /&gt;
&lt;br /&gt;
WaterSip allows to define target regions not only by coordinates, but also by mask files. This is a short introduction to creating a mask for use with WaterSip.&lt;br /&gt;
&lt;br /&gt;
The procedure described here  uses python to create the netcdf file with the mask, and CDO to change the netcdf file format such that it can be read in by watersip.&lt;br /&gt;
&lt;br /&gt;
Required python packages [tested version]: numpy [1.19.1], shapely [1.6.4.post1], netCDF4 [1.5.3] and if loading from a csv, pandas [1.1.3]&lt;br /&gt;
&lt;br /&gt;
Optional packages (for plotting): matplotlib [3.3.1], cartopy [0.16.0]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Basic principle:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using shapely’s .contains and .touches methods on a polygon with a point in vectorized version (taking a list of points instead of just one point for speed). &lt;br /&gt;
This enables more interactive editing on a grid spacing of 0.25x0.25 degree (1M grid points).&lt;br /&gt;
After calculation, the script performs a boolean OR operation on the two masks to get the combined of inner and edge points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mask_inner=shapely.vectorized.contains(geom, x, y) # - for interior points&lt;br /&gt;
mask_edge=shapely.vectorized.touches(geom, x, y) #- for edge points&lt;br /&gt;
mask_full=mask_inner|mask_edge # | is boolean OR bitwise (elementwise) operator.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
list of coordinates of pairs of lat, lon defining the nodes of the polygon mask.&lt;br /&gt;
&lt;br /&gt;
global meshgrid with a given resolution&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Output:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Boolean mask of False and True in the shape of the meshgrid lat-lon&lt;br /&gt;
&lt;br /&gt;
After using python script, convert to a netCDF format readable by WaterSip by using the command below in a terminal where you newly created mask file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cdo -f nc2 copy mask-from-python.nc mask-to-watersip.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For reference, and instructions on how to load political, and other, geometries straight from NaturalEarth dataset, go to&lt;br /&gt;
[[https://gist.github.com/pelson/9785576]]&lt;br /&gt;
&lt;br /&gt;
[[File:watersip_mask-guide.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Input file options ===&lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;code&amp;gt;[Case]&amp;lt;/code&amp;gt;). There are 7 option groups which can appear in random order in the input file:&lt;br /&gt;
&lt;br /&gt;
*Case: general settings related to the case to be extracted&lt;br /&gt;
*Grids: specification of different output grids&lt;br /&gt;
*Diagnostrics: parameters of the moisture diagnostic&lt;br /&gt;
*Output: general output settings&lt;br /&gt;
*Variables: selection of output variables&lt;br /&gt;
*Flexpart: options specific to runs using FLEXPART particle output&lt;br /&gt;
*Lagranto: options specific to runs using Lagranto trajectories&lt;br /&gt;
&lt;br /&gt;
====Parameter set Case====&lt;br /&gt;
&lt;br /&gt;
The settings in this parameter category describe the basic conditions of the diagnostic run.&lt;br /&gt;
&lt;br /&gt;
;caseName (string)&lt;br /&gt;
: identifier for the run, prepended to all output files. Example: &amp;lt;code&amp;gt;caseName = global_201002_relative&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;inputDir (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;inputDir = /Volumes/Data/global/shortposit_%s&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;outputDir (string)&lt;br /&gt;
: path where the output files will be created. Example: &amp;lt;code&amp;gt;outputDir = /Volumes/Data/global/output/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;startDate (date string)&lt;br /&gt;
: inital date of the run, fixed format YYYYMMDD-HHMMSS. Start date is latest date of the run which moves backward in time. Example: &amp;lt;code&amp;gt;startDate = 20100228-180000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;endDate (date string)&lt;br /&gt;
: final date of the run, fixed format YYYYMMDD-HHMMSS. End date is earliest date of the run. Example: &amp;lt;code&amp;gt;endDate = 20100211-000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;timeStep (integer)&lt;br /&gt;
: time step in hours between particles or trajectory output times. (typical values 6, 3, or 1 (hours)). Example: &amp;lt;code&amp;gt;timeStep = 6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajPoints (integer)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;trajPoints = 21&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;minTrajPoints (integer)&lt;br /&gt;
: minimum length of trajectories to be included in analysis. Parameter is only relevant for Lagranto simulations with uneven trajectory length. Example: &amp;lt;code&amp;gt;minTrajPoints = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sectorizeRegion (integer)&lt;br /&gt;
: region set used to divide moisture sources into different sectors (see [[#sectorization]]). Example: &amp;lt;code&amp;gt;sectorizeRegion = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterBoxFile (string)&lt;br /&gt;
: path to the text file describing geographic boxes used to filter air parcels during transport (see [[#box filters]]). Example: &amp;lt;code&amp;gt;filterBoxFile = /home/hso039/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterIndex (integer)&lt;br /&gt;
: used line from the filterBoxFile to select/deselect trajectories. Example: &amp;lt;code&amp;gt;filterIndex = -1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;orographyFile (string)&lt;br /&gt;
: path to the orography file used to select arrival based on underying topography, using the ETOPO2 topography. File in netcdf format. Example: &amp;lt;code&amp;gt;orographyFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/etopo5.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;lsmFile (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;lsmFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maskFile (string)&lt;br /&gt;
: path to file with an arrival selection. Example: &amp;lt;code&amp;gt;maskFile = &amp;quot; &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;useMask (boolean)&lt;br /&gt;
: use mask file (0=no, 1=yes). Example: &amp;lt;code&amp;gt;useMask = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;ompThreads (integer)&lt;br /&gt;
: number of threads to be used with OpenMP parallelisation if compiled with flag -fopenmp (1=no parallelisation, &amp;gt;1 parallelisation activated.). Example: &amp;lt;code&amp;gt;ompThreads = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;showStats (boolean)&lt;br /&gt;
: print statistics about particle processing to the command line (0=off, 1=on). Example: &amp;lt;code&amp;gt;showStats = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Grids====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category specify the different output grids and the gridding method&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLon (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLon (float)&lt;br /&gt;
: maximum longitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalgridmaxlon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMaxLat = 90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDx (float)&lt;br /&gt;
: longitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDy (float)&lt;br /&gt;
: latitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridRadius (float)&lt;br /&gt;
: gridding radius for information from arriving trajectories. Example: &amp;lt;code&amp;gt;arrivalGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLon (float)&lt;br /&gt;
: minimum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLon (float)&lt;br /&gt;
: maximum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLat (float)&lt;br /&gt;
: minimum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLat (float)&lt;br /&gt;
: maximum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLat = 90&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;sourceGridDx (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridDy (float)&lt;br /&gt;
: latitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridRadius (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;griddingType (integer)&lt;br /&gt;
: select [[#gridding algorithm]] (1: fast and simple gridding, 2: improved but slower gridding). Example: &amp;lt;code&amp;gt;griddingType = 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Diagnostics====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category control the way how the diagnostic works, and which trajectories should be considered in the run.&lt;br /&gt;
&lt;br /&gt;
;uptakeThreshold (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;uptakeThreshold = 0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipThreshold (float)&lt;br /&gt;
: 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 precipThreshold is specified as percent decrease relative to the current specific humidity of an air parcel. Then the value is negative. Default absolute values are -0.1 to -0.2 for 3h and 6h time steps. Example: &amp;lt;code&amp;gt;precipThreshold = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;relativeThreshold (boolean)&lt;br /&gt;
: determines whether absolute threshold values or relative threshold values are specified (0: absolute, 1: relative threshold values). Example: &amp;lt;code&amp;gt;relativeThreshold = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease larger than the value given by &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt; to the same number. Example: &amp;lt;code&amp;gt;arrivalPrecipMin = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease of up to the value given by &amp;lt;code&amp;gt;arrivalprecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;relativeThresholds&amp;lt;/code&amp;gt; is set to false, or a value of 1.0 otherwise. The combination of the &amp;lt;code&amp;gt;arrivalPrecipMin/Max&amp;lt;/code&amp;gt; parameters allows to focus on heavy and weak precipitation events only. Example: &amp;lt;code&amp;gt;arrivalPrecipMax = -100.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is larger than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt;. 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. Example: &amp;lt;code&amp;gt;arrivalRHMin = 80&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is less than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt;. Units are %. This parameter in combination with &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; can be used to focus on condensation/no condensation cases when the parameter &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is set to true. Example: &amp;lt;code&amp;gt;arrivalRHMax = 110&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMin (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalOroMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the ETOPO2 topography does not exceed the given value (in m). In combination with . Example: &amp;lt;code&amp;gt;arrivalOroMin&amp;lt;/code&amp;gt;, regions with a complex shape but common elevation can be selected easily. Example: &amp;lt;code&amp;gt;arrivalOroMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMin (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are above at the given altitude (in m above sea level). Example: &amp;lt;code&amp;gt;arrivalAltMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are below the given altitude (in m above sea level). The parameters &amp;lt;code&amp;gt;arrivalAltMin/Max&amp;lt;/code&amp;gt; can be used to conduct vertically stratified analyses.Example: &amp;lt;code&amp;gt;arrivalAltMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;blhScale (float)&lt;br /&gt;
: 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 &#039;moisture sources boundary-layer&#039;, all others to the category &#039;moisture sources free troposphere&#039;. Default value is 1.5. Example: &amp;lt;code&amp;gt;blhScale = 1.5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;analyzeVapour (boolean)&lt;br /&gt;
: Parameter allowing to analyze vapour origin instead of precipitation origin. Setting this parameter to true considers all air parcels during arrival, not just the ones that precipitate according to the precipitation threshold. If set to true, the &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalRHMin/Max&amp;lt;/code&amp;gt; parameters also need modification. Typically, one will set the &amp;lt;code&amp;gt;precipitation threshold&amp;lt;/code&amp;gt; to a small or even positive number, and the &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; to 0 and &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt; to 110 to include all arriving trajectories. It is often preferrable then to set the &amp;lt;code&amp;gt;arrivalAltMax&amp;lt;/code&amp;gt; to values of around 1000m for surface station measurements, for example. If &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is 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. Example: &amp;lt;code&amp;gt;analyzeVapour = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;assignToUptake (boolean)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;assignToUptake = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;forwardProjectionMode (integer)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;forwardProjectionMode = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Output====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category determine which output files should be created.&lt;br /&gt;
&lt;br /&gt;
;stepFile (boolean)&lt;br /&gt;
: write parameters on [[#Grid files]] and [[#Series files]] for each time step. Example: &amp;lt;code&amp;gt;stepFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;dayFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each day. Example: &amp;lt;code&amp;gt;dayFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;monthFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each month. Example: &amp;lt;code&amp;gt;monthFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;yearFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each year. Example: &amp;lt;code&amp;gt;yearFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;allFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for all time steps. Example: &amp;lt;code&amp;gt;allFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;staticFields (boolean)&lt;br /&gt;
: write static fields (land-sea mask and topography) onto grid files. Example: &amp;lt;code&amp;gt;staticFields = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveTraj (integer)&lt;br /&gt;
: write particle trajectories to [[#Trajectory files]] at each time step (1) or each month (2). Option 0 disables trajectory output. Example: &amp;lt;code&amp;gt;saveTraj = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;skipTraj (boolean)&lt;br /&gt;
: write every nth trajectory to reduce traj file size (1:disabled, &amp;gt;=2: stride size). Example: &amp;lt;code&amp;gt;skipTraj = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveHistogram (boolean)&lt;br /&gt;
: write histogram for selected parameters to a [[#Histogram files]] (0: disabled, 1:enabled). Example: &amp;lt;code&amp;gt;saveHistogram = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveMean (boolean)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;saveMean = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Variables====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category allow to include or exclude specific variables from the output files. Setting the output for unused variables to 0 (disabled) will speed up computation time, reduce the memory footprint, and reduce the output file size. Only parameters that are really required from a run should therefore selected as enabled.&lt;br /&gt;
&lt;br /&gt;
;sourcesBoundaryLayer (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the boundary layer to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesBoundaryLayer = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourcesFreeTroposphere (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the free troposphere to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesFreeTroposphere = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;evaporationMinusPrecipitation (boolean)&lt;br /&gt;
: write unweighted evaporation minus precipitation along entire trajectory length to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;evaporationMinusPrecipitation = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;moistureTransport (boolean)&lt;br /&gt;
: write weighted moisture transport along trajectories to grid and series output files (0: disabled, 1: enabled). Units are mm. Example: &amp;lt;code&amp;gt;moistureTransport = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajectoryLocations (boolean)&lt;br /&gt;
: write trajectory locations to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Example: &amp;lt;code&amp;gt;trajectoryLocations = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipitationEstimate (boolean)&lt;br /&gt;
: write precipitation estimate at arrival to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;precipitationEstimate = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLongitude (boolean)&lt;br /&gt;
: write weighted moisture source longitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees longitude. Example: &amp;lt;code&amp;gt;sourceLongitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLatitude (boolean)&lt;br /&gt;
: write moisture source latitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees latitude. Example: &amp;lt;code&amp;gt;sourceLatitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionCount (boolean)&lt;br /&gt;
: write convection count projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Convection count can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionCount is not on the ERA-Interim climatology run. The counter is increased each time the particles passes the convection scheme upwards. Example: &amp;lt;code&amp;gt;convectionCount = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionHeight (boolean)&lt;br /&gt;
: write convection height projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Convection height can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionHeight is not on the ERA-Interim climatology run. The value gives an average height of vertical displacement when the particles passes the convection scheme. Example: &amp;lt;code&amp;gt;convectionHeight = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;landFraction (boolean)&lt;br /&gt;
: write fraction of moisture sources over land projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;landFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;boundaryLayerFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;boundaryLayerFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;freeTroposphereFraction (boolean)&lt;br /&gt;
: write accounted fraction of free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;freeTroposphereFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;combinedFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer and free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). This is the sum of the two previous variables. Example: &amp;lt;code&amp;gt;combinedFraction = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTime (boolean)&lt;br /&gt;
: write moisture transport time projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are hours. Example: &amp;lt;code&amp;gt;transportTime = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSpecificHumidity (boolean)&lt;br /&gt;
: write surface specific humidity at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are g per kg. Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSpecificHumidity = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportDistance (boolean)&lt;br /&gt;
: write transport distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Transport distance is the length of the actual travel path along the trajectories from moisture source to the arrival region. Example: &amp;lt;code&amp;gt;transportDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDistance (boolean)&lt;br /&gt;
: write source distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Source distance is the shortest distance between the moisture source and the arrival region. Example: &amp;lt;code&amp;gt;sourceDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;source2mTemperature (boolean)&lt;br /&gt;
: write 2m temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;source2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDeuteriumExcess (boolean)&lt;br /&gt;
: write deuterium excess projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are permil. Deuterium excess is calculated from the relative humidity with respect to SST and the relationship from Pfahl and Sodemann (2014). Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceDeuteriumExcess = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperature during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;transportTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportPressure (boolean)&lt;br /&gt;
: write moisture-weighted pressure during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;transportPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;condensationTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperatures where RH&amp;lt;sub&amp;gt;liquid&amp;lt;/sub&amp;gt; exceeds 80% to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;condensationTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalTemperature (boolean)&lt;br /&gt;
: write temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;arrivalTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPressure (boolean)&lt;br /&gt;
: write pressure during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;arrivalPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrival2mTemperature (boolean)&lt;br /&gt;
: write temperature at 2m during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that 2m temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrival2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrivalSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Flexpart====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
;inputFormat (integer)&lt;br /&gt;
: 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/NorESM data short format, 4: global reanalysis data long format, 5 regional reanalysis/NorESM data short format. Example: &amp;lt;code&amp;gt;inputFormat = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maxPart (integer)&lt;br /&gt;
: number of particles contained in a single FLEXPART partposit or shortposit file. Example: &amp;lt;code&amp;gt;maxPart = 5000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partMass (float)&lt;br /&gt;
: atmospheric mass represented by each particle in kilogramms. Parameter is written out by specific version of FLEXPART to create WaterSip output data. Example: &amp;lt;code&amp;gt;partMass = 1.01943e+12&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partStride (integer)&lt;br /&gt;
: number of particles to skip during processing to speed up calculations (1: use every particle, &amp;gt;=2: use every 2nd particle, etc). Example: &amp;lt;code&amp;gt;partStride = 10&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;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). Example: &amp;lt;code&amp;gt;allowReenter = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Lagranto====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Full example for a FLEXPART run input file:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Case]&lt;br /&gt;
caseName = global_201002_final_relativex&lt;br /&gt;
inputDir = /home/data/flexpart/global/shortposit_%s&lt;br /&gt;
outputDir=/home/data/watersip/global_201002_V3/&lt;br /&gt;
startDate = 20100228-180000&lt;br /&gt;
endDate = 20100211-000000&lt;br /&gt;
timeStep = 6&lt;br /&gt;
sectorizeRegion = 0&lt;br /&gt;
filterBoxFile = /home/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&lt;br /&gt;
filterIndex = -1&lt;br /&gt;
orographyFile = &amp;quot;/home/projects/WaterSip_tool/etopo5.nc&amp;quot;&lt;br /&gt;
lsmFile = &amp;quot;/home/projects/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&lt;br /&gt;
maskFile = &amp;quot; &amp;quot;&lt;br /&gt;
useMask = 0&lt;br /&gt;
trajPoints = 41&lt;br /&gt;
minTrajPoints = 0&lt;br /&gt;
ompThreads = 1&lt;br /&gt;
showStats = 0&lt;br /&gt;
&lt;br /&gt;
[Grids]&lt;br /&gt;
arrivalGridMinLon = -180&lt;br /&gt;
arrivalGridMaxLon = 180&lt;br /&gt;
arrivalGridMinLat = -90&lt;br /&gt;
arrivalGridMaxLat = 90&lt;br /&gt;
arrivalGridDx = 1&lt;br /&gt;
arrivalGridDy = 1&lt;br /&gt;
arrivalGridRadius = 200&lt;br /&gt;
sourceGridMinLon = -180&lt;br /&gt;
sourceGridMaxLon = 180&lt;br /&gt;
sourceGridMinLat = -90&lt;br /&gt;
sourceGridMaxLat = 90&lt;br /&gt;
sourceGridDx = 1&lt;br /&gt;
sourceGridDy = 1&lt;br /&gt;
sourceGridRadius = 200&lt;br /&gt;
griddingType = 2&lt;br /&gt;
&lt;br /&gt;
[Diagnostics]&lt;br /&gt;
uptakeThreshold = 0.05&lt;br /&gt;
precipThreshold = 0.05&lt;br /&gt;
blhScale = 1.5&lt;br /&gt;
arrivalPrecipMin = 0.05&lt;br /&gt;
arrivalPrecipMax = 1.0&lt;br /&gt;
arrivalRHMin = 80&lt;br /&gt;
arrivalRHMax = 110&lt;br /&gt;
arrivalOroMin = -100&lt;br /&gt;
arrivalOroMax = 12000&lt;br /&gt;
arrivalAltMin = -100&lt;br /&gt;
arrivalAltMax = 12000&lt;br /&gt;
analyzeVapour = 0&lt;br /&gt;
assignToUptake = 0&lt;br /&gt;
forwardProjectionMode = 3&lt;br /&gt;
relativeThreshold = 1&lt;br /&gt;
&lt;br /&gt;
[Output]&lt;br /&gt;
stepFile = 1&lt;br /&gt;
dayFile = 1&lt;br /&gt;
monthFile = 1&lt;br /&gt;
yearFile = 1&lt;br /&gt;
allFile = 1&lt;br /&gt;
staticFields = 1&lt;br /&gt;
saveTraj = 0&lt;br /&gt;
skipTraj = 0&lt;br /&gt;
saveHistogram = 0&lt;br /&gt;
saveMean = 0&lt;br /&gt;
&lt;br /&gt;
[Variables]&lt;br /&gt;
sourcesBoundaryLayer = 1&lt;br /&gt;
sourcesFreeTroposphere = 1&lt;br /&gt;
evaporationMinusPrecipitation = 1&lt;br /&gt;
moistureTransport = 1&lt;br /&gt;
trajectoryLocations = 1&lt;br /&gt;
precipitationEstimate = 1&lt;br /&gt;
sourceLongitude = 1&lt;br /&gt;
sourceLatitude = 1&lt;br /&gt;
convectionCount = 0&lt;br /&gt;
convectionHeight = 0&lt;br /&gt;
landFraction = 1&lt;br /&gt;
boundaryLayerFraction = 1&lt;br /&gt;
freeTroposphereFraction = 1&lt;br /&gt;
combinedFraction = 0&lt;br /&gt;
transportTime = 1&lt;br /&gt;
sourceSkinTemperature = 1&lt;br /&gt;
sourceSpecificHumidity = 0&lt;br /&gt;
transportDistance = 1&lt;br /&gt;
sourceDistance = 1&lt;br /&gt;
source2mTemperature = 0&lt;br /&gt;
sourceDeuteriumExcess = 1&lt;br /&gt;
transportTemperature = 1&lt;br /&gt;
transportPressure = 1&lt;br /&gt;
condensationTemperature = 1&lt;br /&gt;
arrivalTemperature = 1&lt;br /&gt;
arrivalPressure = 1&lt;br /&gt;
arrival2mTemperature = 0&lt;br /&gt;
arrivalSkinTemperature = 1&lt;br /&gt;
&lt;br /&gt;
[Flexpart]&lt;br /&gt;
inputFormat = 3&lt;br /&gt;
maxPart = 5000000&lt;br /&gt;
partMass = 1.01943e+12&lt;br /&gt;
partStride = 10&lt;br /&gt;
allowReenter = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Output file formats===&lt;br /&gt;
&lt;br /&gt;
The results from the WaterSip diagnostic are written to a set of output files in different format. The main output files are created in netCDF with detailed metadata information, including the parameter settings of the run for automated documentation. The creation of different output files can be adapted by parameter settings in parameter set *Output* and the contained variables with settings in parameter set *Variables*. Spatial fields at different time intervals are written to so-called grid files in [[netCDF]] format, time series of averaged quantities at different time intervals are written to so-called Series files in netCDF format, histograms of selected quantities identified during the processing for each time step and each trajectory are written to Histogram files in ASCII format, and trajectories are written to Trajectory files in either the binary format traj or the Lagranto ASCII format. Earlier versions than V3 reported output in so-called Mean files in an ASCII format. That format is documented here but no longer in use in current versions of WaterSip.&lt;br /&gt;
&lt;br /&gt;
The time unit has changed in Version 3.1. Previously, the unit was set to &amp;quot;days since 0000-01-02 00:00:00&amp;quot; to allow matlab-compatible values for time that could directly be utilized with the datenum() commands. In order to confirm to netCDF-CF standards, where no calendar year 0000 exists, the time unit is now &amp;quot;days since 0001-01-01 00:00:00&amp;quot;. This provides the ability to open and visualize netCDF output files directly with tools such as ncview and panoply. To convert the time values into a matlab datenum compatible value, the following commands have to be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ncid=netcdf.open(filename,&amp;quot;noclobber&amp;quot;);&lt;br /&gt;
tim=(float)netcdf.getVar(ncid,&amp;quot;time&amp;quot;);&lt;br /&gt;
tim=tim-datenum(1,0,1);&lt;br /&gt;
datestr(tim)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table below summarizes the available output files:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Content !! Format !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| Grid files || Spatial properties of moisture sources and arrival regios || netCDF || CASE_grd_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Series files || Mean/min/max/std of regionally and globally averaged moisture source and arrival region properties || netCDF || CASE_ser_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Histogram files || Histograms of quantities identified for each timestep along each trajectory || ASCII || CASE_hst_steps&lt;br /&gt;
|-&lt;br /&gt;
| Trajectory files || Trajectories for identified precipitation events || ASCII/binary traj || CASE_DATE.traj/CASE_DATE_lsl&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Grid files====&lt;br /&gt;
&lt;br /&gt;
Grid file variables are separated into immediate source and transport variables, typically on a coarser, global grid, and arrival and forward-projected variables on the (typically finer-scale) arrival grid. The grid settings are determined by the corresponding parameters in parameter set *Grid*. All variables are of type float, and the fill value (netCDF property _FillValue) is -999.99. The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and dividing by the total precipitation (as described above).&lt;br /&gt;
&lt;br /&gt;
**Moisture source and transport properties**&lt;br /&gt;
&lt;br /&gt;
Variables related to immediate moisture source and transport properties (not forward projected) have dimension of variables time, global_latitude, global_longitude, as defined by input file parameters *sourceGridMinLon,sourceGridMaxLon, sourceGridMinLat, sourceGridMaxLat, sourceGridDx, sourceGridDy, sourceGridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer || E_s^BL || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere || E_s^FT || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation || E-P || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport || Q_t || mm ||  text &lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location || N_t || counts km^-2 || text &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Arrival properties and Lagrangian forward projections**&lt;br /&gt;
&lt;br /&gt;
The variables contained in these files have the dimensions time (days since 0001-01-01 00:00:00), latitude (degrees_north), and longitude (degrees_east) as defined by input file parameters *arrivalGridMinLon, arrivalGridMaxLon, arrivalGridMinLat, arrivalGridMaxLat, arrivalGridDx, arrivalGridDy, arrival | source | text |GridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Unit !! Property !! Description &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate || PE || mm day^-1 or mm step^-1 || arrival || precipitation at arrival location estimated from change in specific humidity during last time step &lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature || T_a || K || arrival || PE-weighted temperature at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure || p_a || hPa || arrival || PE-weighted pressure at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature || SKT_a || K || arrival || PE-weighted SKT below trajectory location during arrival &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer || f_BL || fraction || arrival || fractional contribution of BL moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere || f_FT || fraction || arrival || fractional contribution of FT moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_lifetime || \tau_t || h || transport || contribution and precipitation-weighted precipitation life time &lt;br /&gt;
|-&lt;br /&gt;
| transport_distance || \Delta_t || km || transport || contribution and precipitation-weighted transport distance along trajectory &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature || T_t || K || transport || contribution and precipitation-weighted temperature during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure || p_t || hPa || transport || contribution and precipitation-weighted pressure during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature || T_c || K || transport || contribution and precipitation-weighted temperature when RH&amp;gt;80% during transport &lt;br /&gt;
|-&lt;br /&gt;
| source_longitude || \lambda_s || degrees_east || source || contribution and precipitation-weighted latitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_latitude || \phi_s || degrees_north || source || contribution and precipitation-weighted longitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| land_fraction || f_l || fraction || source || contribution and precipitation-weighted fraction of moisture sources over land &lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature || SKT_s || K || source || contribution and precipitation-weighted SKT at the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_distance || \Delta_s || km || source || contribution and precipitation-weighted direct distance between the moisture source and arrival location &lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess || d_s || permil || source || contribution and precipitation-weighted estimate of deuterium excess at the source from RH and T using the Pfahl and Sodemann (2013) relation &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Global attributes**&lt;br /&gt;
&lt;br /&gt;
The netCDF grid files contain a range of essential parameters as global attributes. These parameters allow to fully characterise the result of the WaterSip run as required for the interpretation of the results. A number of run parameters are omitted, that concern logistical settings, or that are self-evident from the content of the the output files. The table below gives an example for a WaterSip run:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Example !! Type &lt;br /&gt;
|-&lt;br /&gt;
| startDate || &amp;quot;2010-02-28 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| endingDate || &amp;quot;2010-01-11 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| analysisRegion || &amp;quot;NEEM&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| maxPart || 5000001  || int&lt;br /&gt;
|-&lt;br /&gt;
| caseName || &amp;quot;global_201002_V3_stride&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| trajPoints || 61  || int&lt;br /&gt;
|-&lt;br /&gt;
| timeStep || 6  || in float&lt;br /&gt;
|-&lt;br /&gt;
| partMass || 2.03885996E12  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| dryLevel || 0.01  || float&lt;br /&gt;
|-&lt;br /&gt;
| blhScale || 1.5  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMin || 80.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMax || 110.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| uptakeThreshold || 0.2  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| precipThreshold || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMin || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMax || -120.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| anaVapour || 0  || int&lt;br /&gt;
|-&lt;br /&gt;
| filterIndex || -1  || int&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Series files====&lt;br /&gt;
&lt;br /&gt;
The netCDF series files contain two sets of information. The so-called sectorization output provides time series of the moisture source information seperated into relative contributions from predefined geographical areas. Furthermore, the series files contains weighted averages and further statistical properties of all quantities in the grid files. &lt;br /&gt;
&lt;br /&gt;
**Sectorisation output**&lt;br /&gt;
&lt;br /&gt;
A set of sectorisations is chosen by the parameter *sectorizeRegion*. The currently available options are listed in the table below. New sectorisations can be defined by changing the code in routine &amp;lt;code&amp;gt;Sectors.cpp/Sectors.h&amp;lt;/code&amp;gt;. This requires defining a new name and new decision tree that provides a unique number for any lat/lon value between -180E to 180E and -90 to 90N. See comments in the code.&lt;br /&gt;
&lt;br /&gt;
For each of the predefined areas, the relative contributions are subdivided into land and sea covered areas. Time series of the contributions are of dimension time and sector. Thereby, the sector numbers correspond to the sector numbers defined in the program code. The area of the sectors is calculated automatically within WaterSip. As noted above for the grid files, the time unit has been changed starting from Version 3.1.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol !! Unit !! Description&lt;br /&gt;
|-&lt;br /&gt;
| time || t || days since 0001-01-01 00:00:00 || text&lt;br /&gt;
|-&lt;br /&gt;
| sector || s || sector number || text&lt;br /&gt;
|-&lt;br /&gt;
| sector_area || A_s || km^2 || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_boundary_layer || f_l^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_boundary_layer || f_s^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_free_troposphere || f_l^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_free_troposphere || f_s^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_trajectory_location || f_l^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_trajectory_location || f_s^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_transport || f_l^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_transport || f_s^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_evaporation_minus_precipitation || f_l^EP || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_evaporation_minus_precipitation | f_s^EP | percent | text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Time-series output**&lt;br /&gt;
&lt;br /&gt;
For immediate quantities, a time series of the total field sum is recorded in the series file. In order to obtain an area average, one needs to divide the sum by the surface of the earth (x km^2). The unit for moisture uptakes, E-P and precipitation estimate is mm step^-1 for step series files, and mm 24h^-1 for all other averaging series files. In addition to sums, the files contain time series of the minimum, maximum and standard deviation of the grid field at each time instance. For all forward-projected and arrival quantities, the average rather than the sum is calculated on the arrival grid locations. When averaging from step output to larger time intervals, the quantities are weighted with the corresponding PE at each grid point. &lt;br /&gt;
&lt;br /&gt;
In addition, series files contain the same set of global attributes as described in Grid files to enable interpretation without additional documentation of the run setup.&lt;br /&gt;
&lt;br /&gt;
*Immediate quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_min || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_sum || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_max || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_min || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_sum || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_max || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Arrival and forward-projected quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_min || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_avg || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_max || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_min || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_avg || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_max || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_min || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_avg || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_max || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_min || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_avg || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_max || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_avg || x  || K &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_max || x || K&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Histogram files====&lt;br /&gt;
&lt;br /&gt;
* Bounds freq (1 to n categories), (1 to m variables)&lt;br /&gt;
* Main variables time, dq, conv&lt;br /&gt;
* where to implement&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20.71   46.56   8.1351e+05  -1.0000e+00&lt;br /&gt;
21.22   45.90   1.1314e+06  -1.0000e+00&lt;br /&gt;
22.03   45.24   4.1929e+05  -1.0000e+00&lt;br /&gt;
21.19   45.35   1.0639e+06  -1.0000e+00&lt;br /&gt;
20.71   46.50   5.0963e+05  -1.0000e+00&lt;br /&gt;
21.07   47.51   2.8182e+05  -1.0000e+00&lt;br /&gt;
21.71   48.67   9.3088e+05  -1.0000e+00&lt;br /&gt;
22.14   51.47   2.3634e+05  -1.0000e+00&lt;br /&gt;
22.14   52.49   8.0048e+05  -1.0000e+00&lt;br /&gt;
22.34   53.76   7.3297e+05  -1.0000e+00&lt;br /&gt;
23.17   54.41   4.1516e+05  -1.0000e+00&lt;br /&gt;
23.56   54.54   2.7414e+05  -1.0000e+00&lt;br /&gt;
24.39   54.55   5.0017e+05  -1.0000e+00&lt;br /&gt;
26.89   54.42   2.8215e+05  -1.0000e+00&lt;br /&gt;
28.18   54.40   3.9987e+05  -1.0000e+00&lt;br /&gt;
29.80   54.25   3.6020e+05  -1.0000e+00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Trajectory files====&lt;br /&gt;
&lt;br /&gt;
**LSL format**&lt;br /&gt;
&lt;br /&gt;
* As documented elsewhere&lt;br /&gt;
* only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Traj format**&lt;br /&gt;
&lt;br /&gt;
* Binary format, only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
* reading in and plotting traj files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mean file====&lt;br /&gt;
&lt;br /&gt;
Legacy format, global_201002_V3_avg_steps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20100228_00 13795.603  0.001 7994.128  0.001 722561152.000 1977998.875   -0.081   -3.124    0.007  -0.080  -1.347   0.003   0.181   0.000   0.001   0.711   0.006   0.001   0.242   0.000   0.001 -999.990 -999.990 -999.990  -83.283 -340.404    0.153  288.231  242.846    0.050 -999.990 -999.990 -999.990   2828.54    120.41      7.50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Annotated bibliography===&lt;br /&gt;
&lt;br /&gt;
There are to date (Oct 2019) 25 publications involving the WaterSip method in one way or another. The versatility of WaterSip ranges from weather events to climatological studies, and from process understanding to paleoclimate proxy interpretation. This documentation can only provide initial guidance in applying WaterSip to new research plans. The annotated bibliography below provides an overview over the relevant studies, ordered by topic and the respective climatic zone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Topic !! Time perspective !! Climate zone !! Region !! Reference&lt;br /&gt;
|-&lt;br /&gt;
| Method description || - || High latitudes || Greenland || Sodemann et al., 2008a&lt;br /&gt;
|-&lt;br /&gt;
| Precipitation extremes || Climatology || Subtropics || Mediterranean || Winschall et al., 2014a&lt;br /&gt;
|-&lt;br /&gt;
| Method evaluation || Weather event || Subtropics || Mediterranean || Winschall et al., 2014b&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime of precipitation || Climatology || Global || Global || Läderach and Sodemann, 2016&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || High latitudes || Greenland || Sodemann et al., 2008b&lt;br /&gt;
|-&lt;br /&gt;
| Climate characteristics || Climatology || Mid latitudes || Europe || Sodemann and Zubler, 2010&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Tropics || Belize || Kenneth et al., &lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Mid latitudes || China || Baker et al., Luetscher et al. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
* Thurnherr, I., Kozachek, A., Graf, P., Weng, Y., Bolshiyanov, D., Landwehr, S., Pfahl, S., Schmale, J., Sodemann, H., Steen-Larsen, H. C., Toffoli, A., Wernli, H., and Aemisegger, F., 2019: Meridional and vertical variations of the water vapour isotopic composition in the marine boundary layer over the Atlantic and Southern Ocean, Atmos. Chem. Phys. Discuss., doi: 10.5194/acp-2019-782.&lt;br /&gt;
* Fremme, A. and Sodemann, H., 2019: The role of land and ocean evaporation on the variability of precipitation in the Yangtze River valley, Hydrol. Earth Syst. Sci., 23, 2525–2540, doi: 10.5194/hess-23-2525-2019. &lt;br /&gt;
* Huang, R, Zhu, H, Liang, E., Grießinger, J, Wernicke, J., Yu, W., Hochreuther, P., Risi, C., Zeng, Y., Fremme, A., Sodemann, H., Bräuning, A., 2019: Temperature signals in tree-ring oxygen isotope series from the northern slope of the Himalaya, EPSL 506: 455-465. &lt;br /&gt;
* Buizert, Christo; Sigl, Michael; Severi, Mirko; Markle, Bradley; Wettstein, Justin; McConnell, J; Pedro, Joel; Sodemann, H.; Goto-Azuma, Kumiko; Kawamura, Kenji; Fujita, Shuji; Motoyama, Hideaki; Hirabayashi, Motohiro; Uemura, Ryu; Stenni, Barbara; Parrenin, Frederic; He, Feng; Fudge, T.J.; Steig, Eric J., 2018: Abrupt ice-age shifts in southern westerly winds and Antarctic climate forced from the north, Nature 563: 681-685.&lt;br /&gt;
* Bohlinger, P., Sorteberg, A., Liu, C., Rasmussen, R., Sodemann, H., Ogawa, F., 2018: Multiscale characteristics of an extreme precipitation event over Nepal. QJRMS:1-18, doi:10.1002/qj.3418. &lt;br /&gt;
* Bohlinger, P., Sorteberg, A., and Sodemann, H., 2017: Synoptic conditions and moisture sources actuating extreme precipitation in Nepal. Journal of Geophysical Research: Atmospheres, 122, 12,653–12,671. https://doi.org/10.1002/2017JD027543.&lt;br /&gt;
* Blazina, T., A. Läderach, G. D. Jones, H. Sodemann, H. Wernli, J. W. Kirchner and L. H. E. Winkel, 2016: Marine primary productivity as a potential source of selenium and other trace elements in atmospheric deposition, Environ. Sci. Technol. 2017, 51, 108−118, doi: 10.1021/acs.est.6b03063.&lt;br /&gt;
* Läderach, A. andSodemann, H., 2016: A revised picture of the atmospheric moisture residence time, Geophys. Res. Lett., 43, doi:10.1002/2015GL067449.&lt;br /&gt;
* Baker, A., Sodemann, H., Baldini, J. U. L., Breitenbach, S. F. M., Johnson, K. R., van Hunen, J., and Pingzhong, Z., 2015: Seasonality of westerly moisture transport in the East Asian Summer Monsoon and its implications for interpreting precipitation d18O, J. Geophys. Res., 120,  doi:10.1002/2014JD022919.&lt;br /&gt;
* Steen-Larsen, H. C., Sveinbjörnsdottir, A. E., Jonsson, T., Ritter, F., Bonne, J.-L., Masson-Delmotte, V., Sodemann, H., Blunier, T., Dahl-Jensen, D., Vinther, B. M., 2015: Moisture sources and synoptic to seasonal variability of North Atlantic water vapor isotopic composition, J. Geophys. Res., 120, 5757–5774, doi:10.1002/ 2015JD023234.&lt;br /&gt;
* Bonne, J.-L., Steen-Larsen, H. C., Risi, C., Werner, M., Sodemann, H., Lacour, J.-L., Fettweis, X., Cesana, G., Delmotte, M., Cattani, O., Vallelonga, P., Kjær, H. A., Clerbaux, C., Sveinbjörnsdóttir, A. E., and Masson-Delmotte, V., 2015: The summer 2012 Greenland heat wave: In situ and remote sensing observations of water vapor isotopic composition during an atmospheric river event, J. Geophys. Res., 120, 2970-2989, doi:10.1002/2014JD022602.&lt;br /&gt;
* Luetscher, M., Boch, R., Sodemann, H., Spoetl, C., Cheng, H., Edwards, R. L., Frisia, S., Hof, F., Mueller, W., 2015: North Atlantic storm track changes during the Last Glacial Maximum recorded by Alpine speleothems, Nature Comm. 6: 6344, doi:10.1038/ncomms7344.&lt;br /&gt;
* Winschall, A., Sodemann, H.,Pfahl, S. and Wernli, H., 2014: How important is intensified evaporation for Mediterranean precipitation extremes?, J. Geophys. Res., 119: 5240–5256, doi:10.1002/2013JD021175&lt;br /&gt;
* Winschall, A., Pfahl, S., Sodemann, H.and Wernli, H.. 2014. Comparison of Eulerian and Lagrangian moisture source diagnostics - the flood event in eastern Europe in May 2010, Atmos. Chem. Phys. 14: 6605–6619, doi:10.5194/acp-14-6605-2014.&lt;br /&gt;
* Aemisegger, F., Pfahl, S., Sodemann, H., Lehner, I., Seneviratne, S. I., and Wernli, H., 2014: Deuterium excess as a proxy for continental moisture recycling and plant transpiration, Atmos. Chem. Phys., 14: 4029–4054, doi:10.5194/acp-14-4029-2014.&lt;br /&gt;
* Bonne, J. L., Masson-Delmotte, V., Cattani, O., Delmotte, M., Risi, C., Sodemann, H., and Steen-Larsen, H. C., 2014:The isotopic composition of water vapour and precipitation in Ivittuut, southern Greenland, Atmos. Chem. Phys. 14: 4419–4439, doi:10.5194/acp-14-4419-2014.&lt;br /&gt;
* Wang, Y., Sodemann, H., Hou, S., Masson-Delmotte, V. Jouzel, J. and Pang, H., 2013: Snow accumulation and its moisture origin over Dome Argus, Antarctica. Clim. Dyn., 40:731-742, doi: 10.1007/s00382-012-1398-9.&lt;br /&gt;
* Martius, O., Sodemann, H., Joos, H., Pfahl, S., Winschall, A., Croci-Maspoli, M., Graf, M., Madonna, E., Mueller, B., Schemm, S., Sedlacek, J., Sprenger, M. and Wernli, H., 2012: The role of upper-level dynamics and surface processes for the Pakistan flood in July 2010. Quart. J. Royal Meteorol. Soc., published online, doi: 10.1002/qj.2082.&lt;br /&gt;
* Kennett, D. J., Breitenbach, S. F. M., Aquino, V. V., Asmerom, Y., Awe, J., Baldini, J. U. L., Bartlein, P., Culleton, B. J., Ebert, C., Jazwa, C., Macri, M. J., Marwan, N., Polyak, V., Prufer, K. M., Ridley, H. E., Sodemann, H., Winterhalder, B. and Haug, G. H., 2012: Development and Disintegration of Maya Political Systems in Response to Climate Change. Science, 338: 788-791, doi: 10.1126/science.1226299.&lt;br /&gt;
* Winkler, R., Landais, A., Sodemann, H., Dümbgen, L., Priéa, F., Masson-Delmotte, V., Stenni, B., and Jouzel, J., 2012: Deglaciation records of 17O-excess in East Antarctica: reliable reconstruction of oceanic relative humidity from coastal sites. Clim. Past 8, 1-16.&lt;br /&gt;
* Masson-Delmotte, V., Buiron, D., Ekaykin, A., Frezzotti, M., Gallée, H., Jouzel, J., Krinner, G., Landais, A., Motoyama, A., Oerter, H., Pol, K., Pollard, D., Ritz, C., Schlosser, E., Sime, L. C., Sodemann, H., Stenni, B., Uemura R., and Vimeux, F., 2011: A comparison of the present and last interglacial periods in six Antarctic ice cores Clim. Past, 7, 397-423. &lt;br /&gt;
* Sodemann, H.and Zubler, E., 2010: Seasonality and inter-annual variability of the moisture sources for Alpine precipitation during 1995-2002, Int. J. Climatol., 30: 947-961, doi:10.1002/joc.1932.&lt;br /&gt;
* Sodemann, H., and Stohl, A., 2009: Asymmetries in the moisture origin of Antarctic precipitation, Geophys. Res. Lett., 36, L22803, doi:10.1029/2009GL040242.&lt;br /&gt;
* Sodemann, H., Masson-Delmotte, V., Schwierz, C., Vinther, B. M. and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Part II: Effects of North Atlantic Oscillation variability on stable isotopes in precipitation, J. Geophys. Res., 113, D12111, doi:10.1029/2007JD009416.&lt;br /&gt;
* Sodemann, H., Schwierz, C., and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Lagrangian moisture diagnostic and North Atlantic Oscillation influence, J. Geophys. Res.,113, D03107, doi:10.1029/2007JD008503.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=File:Watersip_mask-guide.png&amp;diff=1427</id>
		<title>File:Watersip mask-guide.png</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=File:Watersip_mask-guide.png&amp;diff=1427"/>
		<updated>2021-01-15T08:30:27Z</updated>

		<summary type="html">&lt;p&gt;Hso039: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1426</id>
		<title>WaterSip</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=WaterSip&amp;diff=1426"/>
		<updated>2021-01-15T08:27:19Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===About WaterSip===&lt;br /&gt;
&lt;br /&gt;
WaterSip is a diagnostic software tool that identifies source, transport and arrival properties of atmospheric water vapour based on airmass backward trajectories. As a prerequisite, the backward trajectories for the analysis are to be obtained from a trajectory calculation tool, such as FLEXPART [[http://www.flexpart.eu]] or Lagranto [[http://www.lagranto.iac.ethz.ch]]. Moisture sources are then identified from changes in specific humidity interpolated to the air parcel trajectory per time step. The changes in specific humidity at each time step are set in relation with the current humidity of the air parcel. This allows to estimate the quantitative contribution of moisture to the air parcel at a specific location, a so-called moisture accounting. WaterSip identifies and aggregates further properties of the moisture source and during the moisture transport, such as temperature, pressure, latitude etc. The moisture source diagnostic is described in detail in [[Sodemann et al. (2008)]]. Publications using the WaterSip diagnostic are listed in section [[Bibliography]].&lt;br /&gt;
&lt;br /&gt;
===Working principle===&lt;br /&gt;
&lt;br /&gt;
Explanation from Sodemann et al. 2008a&lt;br /&gt;
&lt;br /&gt;
Image from Läderach and Sodemann, 2016 or Sodemann et al., 2008a&lt;br /&gt;
&lt;br /&gt;
Moisture source information&lt;br /&gt;
&lt;br /&gt;
- Accounted fraction fa, fb, fa+fb&lt;br /&gt;
- adding below and above boundary layer or not, when&lt;br /&gt;
- choosing threshold values for Arctic and other regions&lt;br /&gt;
- identifying moisture transport&lt;br /&gt;
&lt;br /&gt;
Arrival information and Lagrangian forward projections&lt;br /&gt;
&lt;br /&gt;
- arrival parameters&lt;br /&gt;
- transport parameters&lt;br /&gt;
- source parameters&lt;br /&gt;
- averaging by contribution and amount&lt;br /&gt;
&lt;br /&gt;
Series information&lt;br /&gt;
&lt;br /&gt;
- sectorization (Sodemann and Zubler, 2010; definition table, code changes)&lt;br /&gt;
- weighted averaging: The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and deviding by the total precipitation.&lt;br /&gt;
&lt;br /&gt;
Averaged properties&lt;br /&gt;
&lt;br /&gt;
- histogram example and modification (code below)&lt;br /&gt;
&lt;br /&gt;
Trajectories&lt;br /&gt;
&lt;br /&gt;
- plotting/reading example (code below)&lt;br /&gt;
&lt;br /&gt;
Uncertainties&lt;br /&gt;
&lt;br /&gt;
===Example setups===&lt;br /&gt;
&lt;br /&gt;
Three examples with different purposes&lt;br /&gt;
&lt;br /&gt;
====Water vapour====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
====Extratropical precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
 &lt;br /&gt;
====High latitude precipitation====&lt;br /&gt;
&lt;br /&gt;
- considerations and parameters&lt;br /&gt;
&lt;br /&gt;
===Version history===&lt;br /&gt;
&lt;br /&gt;
Version 2.1&lt;br /&gt;
&lt;br /&gt;
Version 2.2&lt;br /&gt;
&lt;br /&gt;
Version 2.3&lt;br /&gt;
&lt;br /&gt;
Version 2.4&lt;br /&gt;
&lt;br /&gt;
Version 2.5&lt;br /&gt;
&lt;br /&gt;
Version 2.8&lt;br /&gt;
&lt;br /&gt;
Version 2.8.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9&lt;br /&gt;
&lt;br /&gt;
Version 2.9.1&lt;br /&gt;
&lt;br /&gt;
Version 2.9.2&lt;br /&gt;
&lt;br /&gt;
Version 2.9.3&lt;br /&gt;
&lt;br /&gt;
Version 2.9.4&lt;br /&gt;
&lt;br /&gt;
Version 3.0.8&lt;br /&gt;
&lt;br /&gt;
Version 3.1&lt;br /&gt;
&lt;br /&gt;
The current version of WaterSip is V3.1.0. &lt;br /&gt;
&lt;br /&gt;
===Running the WaterSip diagnostic===&lt;br /&gt;
&lt;br /&gt;
It is advised to create a link to the binary file of WaterSip in your /home/$USER/bin or project directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/bin&lt;br /&gt;
ln -s /Data/gfi/projects/isomet/progs/WaterSip_tool/WaterSip3 ~/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding &amp;lt;code&amp;gt;~/bin&amp;lt;/code&amp;gt; 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):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load netCDF-C++&lt;br /&gt;
WaterSip3 &amp;lt;WATERSIP_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the UiB hpc environment requires the above &#039;module load&#039; command to be executed first.&lt;br /&gt;
&lt;br /&gt;
On cyclone.hpc.uib.no, a run script is available that makes repeated similar runs easier to manage. Only essential parameters have to be changed, such as the target coordinates and case name. These will then be replaced on a template INPUT_WATERSIP file, and then WaterSip will be started. The script and an input file template can be copied like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/run_watersip_template_Bergen_2018.sh .&lt;br /&gt;
cp /Data/gfi/projects/isomet/projects/watersip/Bergen_iso/INPUT_WATERSIP_template_Bergen_2018 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Input file conversion from V2====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WaterSip3 -c &amp;lt;WATERSIP_V2_parameter_file&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will create a new file named &amp;lt;WATERSIP_V2_parameter_file&amp;gt;V3 at the current directory. It is recommended to double check and edit the settings in the converted file before starting a simulation.&lt;br /&gt;
&lt;br /&gt;
====Parallelization====&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
If WaterSip3 is to be executed on a queue system (not applicable to cyclone.hpc.uib.no), the following wrapper script can be used to start a run using 4 cores for parallel processing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# start with sbatch NAME_OF_THIS_FILE directly on machine&lt;br /&gt;
&lt;br /&gt;
#SBATCH --job-name=WaterSip3&lt;br /&gt;
#SBATCH --workdir=/tmp/&lt;br /&gt;
#SBATCH --partition=priority&lt;br /&gt;
#SBATCH --output=WaterSip_job.%j.out&lt;br /&gt;
#SBATCH --error=WaterSip_job.%j.err&lt;br /&gt;
#SBATCH --mail-type=END&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --cpus-per-task=4&lt;br /&gt;
&lt;br /&gt;
srun ./WaterSip3 INPUT_WATERSIP_global_1993&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating mask files====&lt;br /&gt;
&lt;br /&gt;
WaterSip allows to define target regions not only by coordinates, but also by mask files. This is a short introduction to creating a mask for use with WaterSip.&lt;br /&gt;
&lt;br /&gt;
The procedure described here  uses python to create the netcdf file with the mask, and CDO to change the netcdf file format such that it can be read in by watersip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Python packages required [tested version]:&lt;br /&gt;
numpy [1.19.1], shapely [1.6.4.post1] and if loading from a csv, pandas [1.1.3])&lt;br /&gt;
netCDF4 [1.5.3]&lt;br /&gt;
optionally:&lt;br /&gt;
matplotlib [3.3.1], cartopy [0.16.0]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Basic principle:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using shapely’s .contains and .touches methods on a polygon with a point in vectorized version (taking a list of points instead of just one point for speed). &lt;br /&gt;
This enables more interactive editing on a grid spacing of 0.25x0.25 degree (1M grid points).&lt;br /&gt;
After calculation, the script performs a boolean OR operation on the two masks to get the combined of inner and edge points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mask_inner=shapely.vectorized.contains(geom, x, y) # - for interior points&lt;br /&gt;
mask_edge=shapely.vectorized.touches(geom, x, y) #- for edge points&lt;br /&gt;
mask_full=mask_inner|mask_edge # | is boolean OR bitwise (elementwise) operator.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
list of coordinates of pairs of lat, lon defining the nodes of the polygon mask.&lt;br /&gt;
&lt;br /&gt;
global meshgrid with a given resolution&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Output:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Boolean mask of False and True in the shape of the meshgrid lat-lon&lt;br /&gt;
&lt;br /&gt;
After using python script, convert to a netCDF format readable by WaterSip by using the command below in a terminal where you newly created mask file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cdo -f nc2 copy mask-from-python.nc mask-to-watersip.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For reference, and instructions on how to load political, and other, geometries straight from NaturalEarth dataset, go to&lt;br /&gt;
[[https://gist.github.com/pelson/9785576]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Input file options ===&lt;br /&gt;
&lt;br /&gt;
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. &amp;lt;code&amp;gt;[Case]&amp;lt;/code&amp;gt;). There are 7 option groups which can appear in random order in the input file:&lt;br /&gt;
&lt;br /&gt;
*Case: general settings related to the case to be extracted&lt;br /&gt;
*Grids: specification of different output grids&lt;br /&gt;
*Diagnostrics: parameters of the moisture diagnostic&lt;br /&gt;
*Output: general output settings&lt;br /&gt;
*Variables: selection of output variables&lt;br /&gt;
*Flexpart: options specific to runs using FLEXPART particle output&lt;br /&gt;
*Lagranto: options specific to runs using Lagranto trajectories&lt;br /&gt;
&lt;br /&gt;
====Parameter set Case====&lt;br /&gt;
&lt;br /&gt;
The settings in this parameter category describe the basic conditions of the diagnostic run.&lt;br /&gt;
&lt;br /&gt;
;caseName (string)&lt;br /&gt;
: identifier for the run, prepended to all output files. Example: &amp;lt;code&amp;gt;caseName = global_201002_relative&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;inputDir (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;inputDir = /Volumes/Data/global/shortposit_%s&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;outputDir (string)&lt;br /&gt;
: path where the output files will be created. Example: &amp;lt;code&amp;gt;outputDir = /Volumes/Data/global/output/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;startDate (date string)&lt;br /&gt;
: inital date of the run, fixed format YYYYMMDD-HHMMSS. Start date is latest date of the run which moves backward in time. Example: &amp;lt;code&amp;gt;startDate = 20100228-180000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;endDate (date string)&lt;br /&gt;
: final date of the run, fixed format YYYYMMDD-HHMMSS. End date is earliest date of the run. Example: &amp;lt;code&amp;gt;endDate = 20100211-000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;timeStep (integer)&lt;br /&gt;
: time step in hours between particles or trajectory output times. (typical values 6, 3, or 1 (hours)). Example: &amp;lt;code&amp;gt;timeStep = 6&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajPoints (integer)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;trajPoints = 21&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;minTrajPoints (integer)&lt;br /&gt;
: minimum length of trajectories to be included in analysis. Parameter is only relevant for Lagranto simulations with uneven trajectory length. Example: &amp;lt;code&amp;gt;minTrajPoints = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sectorizeRegion (integer)&lt;br /&gt;
: region set used to divide moisture sources into different sectors (see [[#sectorization]]). Example: &amp;lt;code&amp;gt;sectorizeRegion = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterBoxFile (string)&lt;br /&gt;
: path to the text file describing geographic boxes used to filter air parcels during transport (see [[#box filters]]). Example: &amp;lt;code&amp;gt;filterBoxFile = /home/hso039/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;filterIndex (integer)&lt;br /&gt;
: used line from the filterBoxFile to select/deselect trajectories. Example: &amp;lt;code&amp;gt;filterIndex = -1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;orographyFile (string)&lt;br /&gt;
: path to the orography file used to select arrival based on underying topography, using the ETOPO2 topography. File in netcdf format. Example: &amp;lt;code&amp;gt;orographyFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/etopo5.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;lsmFile (string)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;lsmFile = &amp;quot;/Users/hso039/Library/Mobile Documents/com~apple~CloudDocs/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maskFile (string)&lt;br /&gt;
: path to file with an arrival selection. Example: &amp;lt;code&amp;gt;maskFile = &amp;quot; &amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;useMask (boolean)&lt;br /&gt;
: use mask file (0=no, 1=yes). Example: &amp;lt;code&amp;gt;useMask = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;ompThreads (integer)&lt;br /&gt;
: number of threads to be used with OpenMP parallelisation if compiled with flag -fopenmp (1=no parallelisation, &amp;gt;1 parallelisation activated.). Example: &amp;lt;code&amp;gt;ompThreads = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;showStats (boolean)&lt;br /&gt;
: print statistics about particle processing to the command line (0=off, 1=on). Example: &amp;lt;code&amp;gt;showStats = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Grids====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category specify the different output grids and the gridding method&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLon (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLon (float)&lt;br /&gt;
: maximum longitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalgridmaxlon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMinLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridMaxLat (float)&lt;br /&gt;
: minimum latitude of arrival (target region) grid box. Example: &amp;lt;code&amp;gt;arrivalGridMaxLat = 90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDx (float)&lt;br /&gt;
: longitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridDy (float)&lt;br /&gt;
: latitude increment of arrival (target region) grid. Example: &amp;lt;code&amp;gt;arrivalGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalGridRadius (float)&lt;br /&gt;
: gridding radius for information from arriving trajectories. Example: &amp;lt;code&amp;gt;arrivalGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLon (float)&lt;br /&gt;
: minimum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLon = -180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLon (float)&lt;br /&gt;
: maximum longitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLon = 180&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMinLat (float)&lt;br /&gt;
: minimum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMinLat = -90&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridMaxLat (float)&lt;br /&gt;
: maximum latitude of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridMaxLat = 90&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
;sourceGridDx (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDx = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridDy (float)&lt;br /&gt;
: latitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridDy = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceGridRadius (float)&lt;br /&gt;
: longitude increment of moisture source grid box. Example: &amp;lt;code&amp;gt;sourceGridRadius = 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;griddingType (integer)&lt;br /&gt;
: select [[#gridding algorithm]] (1: fast and simple gridding, 2: improved but slower gridding). Example: &amp;lt;code&amp;gt;griddingType = 2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Diagnostics====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category control the way how the diagnostic works, and which trajectories should be considered in the run.&lt;br /&gt;
&lt;br /&gt;
;uptakeThreshold (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;uptakeThreshold = 0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipThreshold (float)&lt;br /&gt;
: 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 precipThreshold is specified as percent decrease relative to the current specific humidity of an air parcel. Then the value is negative. Default absolute values are -0.1 to -0.2 for 3h and 6h time steps. Example: &amp;lt;code&amp;gt;precipThreshold = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;relativeThreshold (boolean)&lt;br /&gt;
: determines whether absolute threshold values or relative threshold values are specified (0: absolute, 1: relative threshold values). Example: &amp;lt;code&amp;gt;relativeThreshold = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease larger than the value given by &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalPrecipMin&amp;lt;/code&amp;gt; to the same number. Example: &amp;lt;code&amp;gt;arrivalPrecipMin = -0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPrecipMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events with a specific humidity decrease of up to the value given by &amp;lt;code&amp;gt;arrivalprecipMin&amp;lt;/code&amp;gt;. 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 &amp;lt;code&amp;gt;relativeThresholds&amp;lt;/code&amp;gt; is set to false, or a value of 1.0 otherwise. The combination of the &amp;lt;code&amp;gt;arrivalPrecipMin/Max&amp;lt;/code&amp;gt; parameters allows to focus on heavy and weak precipitation events only. Example: &amp;lt;code&amp;gt;arrivalPrecipMax = -100.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMin (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is larger than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt;. 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. Example: &amp;lt;code&amp;gt;arrivalRHMin = 80&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalRHMax (float)&lt;br /&gt;
: Threshold value to consider precipitation events when relative humidity at the arrival location is less than the value given by . Example: &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt;. Units are %. This parameter in combination with &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; can be used to focus on condensation/no condensation cases when the parameter &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is set to true. Example: &amp;lt;code&amp;gt;arrivalRHMax = 110&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMin (float)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;arrivalOroMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalOroMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the ETOPO2 topography does not exceed the given value (in m). In combination with . Example: &amp;lt;code&amp;gt;arrivalOroMin&amp;lt;/code&amp;gt;, regions with a complex shape but common elevation can be selected easily. Example: &amp;lt;code&amp;gt;arrivalOroMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMin (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are above at the given altitude (in m above sea level). Example: &amp;lt;code&amp;gt;arrivalAltMin = -100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalAltMax (float)&lt;br /&gt;
: Threshold value to consider only arrival locations where the air parcels are below the given altitude (in m above sea level). The parameters &amp;lt;code&amp;gt;arrivalAltMin/Max&amp;lt;/code&amp;gt; can be used to conduct vertically stratified analyses.Example: &amp;lt;code&amp;gt;arrivalAltMax = 12000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;blhScale (float)&lt;br /&gt;
: 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 &#039;moisture sources boundary-layer&#039;, all others to the category &#039;moisture sources free troposphere&#039;. Default value is 1.5. Example: &amp;lt;code&amp;gt;blhScale = 1.5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;analyzeVapour (boolean)&lt;br /&gt;
: Parameter allowing to analyze vapour origin instead of precipitation origin. Setting this parameter to true considers all air parcels during arrival, not just the ones that precipitate according to the precipitation threshold. If set to true, the &amp;lt;code&amp;gt;precipitationThreshold&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;arrivalRHMin/Max&amp;lt;/code&amp;gt; parameters also need modification. Typically, one will set the &amp;lt;code&amp;gt;precipitation threshold&amp;lt;/code&amp;gt; to a small or even positive number, and the &amp;lt;code&amp;gt;arrivalRHMin&amp;lt;/code&amp;gt; to 0 and &amp;lt;code&amp;gt;arrivalRHMax&amp;lt;/code&amp;gt; to 110 to include all arriving trajectories. It is often preferrable then to set the &amp;lt;code&amp;gt;arrivalAltMax&amp;lt;/code&amp;gt; to values of around 1000m for surface station measurements, for example. If &amp;lt;code&amp;gt;analyzeVapour&amp;lt;/code&amp;gt; is 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. Example: &amp;lt;code&amp;gt;analyzeVapour = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;assignToUptake (boolean)&lt;br /&gt;
: 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. Example: &amp;lt;code&amp;gt;assignToUptake = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;forwardProjectionMode (integer)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;forwardProjectionMode = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Output====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category determine which output files should be created.&lt;br /&gt;
&lt;br /&gt;
;stepFile (boolean)&lt;br /&gt;
: write parameters on [[#Grid files]] and [[#Series files]] for each time step. Example: &amp;lt;code&amp;gt;stepFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;dayFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each day. Example: &amp;lt;code&amp;gt;dayFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;monthFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each month. Example: &amp;lt;code&amp;gt;monthFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;yearFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for each year. Example: &amp;lt;code&amp;gt;yearFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;allFile (boolean)&lt;br /&gt;
: write parameters on grid and series files averaged/accumulated for all time steps. Example: &amp;lt;code&amp;gt;allFile = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;staticFields (boolean)&lt;br /&gt;
: write static fields (land-sea mask and topography) onto grid files. Example: &amp;lt;code&amp;gt;staticFields = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveTraj (integer)&lt;br /&gt;
: write particle trajectories to [[#Trajectory files]] at each time step (1) or each month (2). Option 0 disables trajectory output. Example: &amp;lt;code&amp;gt;saveTraj = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;skipTraj (boolean)&lt;br /&gt;
: write every nth trajectory to reduce traj file size (1:disabled, &amp;gt;=2: stride size). Example: &amp;lt;code&amp;gt;skipTraj = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveHistogram (boolean)&lt;br /&gt;
: write histogram for selected parameters to a [[#Histogram files]] (0: disabled, 1:enabled). Example: &amp;lt;code&amp;gt;saveHistogram = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;saveMean (boolean)&lt;br /&gt;
: 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). Example: &amp;lt;code&amp;gt;saveMean = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Variables====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category allow to include or exclude specific variables from the output files. Setting the output for unused variables to 0 (disabled) will speed up computation time, reduce the memory footprint, and reduce the output file size. Only parameters that are really required from a run should therefore selected as enabled.&lt;br /&gt;
&lt;br /&gt;
;sourcesBoundaryLayer (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the boundary layer to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesBoundaryLayer = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourcesFreeTroposphere (boolean)&lt;br /&gt;
: write accounted moisture uptakes in the free troposphere to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;sourcesFreeTroposphere = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;evaporationMinusPrecipitation (boolean)&lt;br /&gt;
: write unweighted evaporation minus precipitation along entire trajectory length to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;evaporationMinusPrecipitation = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;moistureTransport (boolean)&lt;br /&gt;
: write weighted moisture transport along trajectories to grid and series output files (0: disabled, 1: enabled). Units are mm. Example: &amp;lt;code&amp;gt;moistureTransport = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;trajectoryLocations (boolean)&lt;br /&gt;
: write trajectory locations to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Example: &amp;lt;code&amp;gt;trajectoryLocations = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;precipitationEstimate (boolean)&lt;br /&gt;
: write precipitation estimate at arrival to grid and series output files (0: disabled, 1: enabled). Units are mm per time step for step files, and mm per day on all other files. Example: &amp;lt;code&amp;gt;precipitationEstimate = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLongitude (boolean)&lt;br /&gt;
: write weighted moisture source longitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees longitude. Example: &amp;lt;code&amp;gt;sourceLongitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceLatitude (boolean)&lt;br /&gt;
: write moisture source latitude projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are degrees latitude. Example: &amp;lt;code&amp;gt;sourceLatitude = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionCount (boolean)&lt;br /&gt;
: write convection count projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are counts per km&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. Convection count can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionCount is not on the ERA-Interim climatology run. The counter is increased each time the particles passes the convection scheme upwards. Example: &amp;lt;code&amp;gt;convectionCount = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;convectionHeight (boolean)&lt;br /&gt;
: write convection height projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Convection height can be written to the FLEXPART particle files with a special version of FLEXPART_WATER. convectionHeight is not on the ERA-Interim climatology run. The value gives an average height of vertical displacement when the particles passes the convection scheme. Example: &amp;lt;code&amp;gt;convectionHeight = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;landFraction (boolean)&lt;br /&gt;
: write fraction of moisture sources over land projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;landFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;boundaryLayerFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;boundaryLayerFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;freeTroposphereFraction (boolean)&lt;br /&gt;
: write accounted fraction of free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Example: &amp;lt;code&amp;gt;freeTroposphereFraction = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;combinedFraction (boolean)&lt;br /&gt;
: write accounted fraction of boundary layer and free troposphere uptakes projected to the arrival region to grid and series output files (0: disabled, 1: enabled). This is the sum of the two previous variables. Example: &amp;lt;code&amp;gt;combinedFraction = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTime (boolean)&lt;br /&gt;
: write moisture transport time projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are hours. Example: &amp;lt;code&amp;gt;transportTime = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceSpecificHumidity (boolean)&lt;br /&gt;
: write surface specific humidity at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are g per kg. Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceSpecificHumidity = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportDistance (boolean)&lt;br /&gt;
: write transport distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Transport distance is the length of the actual travel path along the trajectories from moisture source to the arrival region. Example: &amp;lt;code&amp;gt;transportDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDistance (boolean)&lt;br /&gt;
: write source distance projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are km. Source distance is the shortest distance between the moisture source and the arrival region. Example: &amp;lt;code&amp;gt;sourceDistance = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;source2mTemperature (boolean)&lt;br /&gt;
: write 2m temperature at the moisture source projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;source2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;sourceDeuteriumExcess (boolean)&lt;br /&gt;
: write deuterium excess projected to the arrival region to grid and series output files (0: disabled, 1: enabled). Units are permil. Deuterium excess is calculated from the relative humidity with respect to SST and the relationship from Pfahl and Sodemann (2014). Requires that source specific humidity is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;sourceDeuteriumExcess = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperature during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;transportTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;transportPressure (boolean)&lt;br /&gt;
: write moisture-weighted pressure during transport projected to arrival region to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;transportPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;condensationTemperature (boolean)&lt;br /&gt;
: write moisture-weighted temperatures where RH&amp;lt;sub&amp;gt;liquid&amp;lt;/sub&amp;gt; exceeds 80% to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;condensationTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalTemperature (boolean)&lt;br /&gt;
: write temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Example: &amp;lt;code&amp;gt;arrivalTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalPressure (boolean)&lt;br /&gt;
: write pressure during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are hPa. Example: &amp;lt;code&amp;gt;arrivalPressure = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrival2mTemperature (boolean)&lt;br /&gt;
: write temperature at 2m during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that 2m temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrival2mTemperature = 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;arrivalSkinTemperature (boolean)&lt;br /&gt;
: write skin temperature during moisture arrival to grid and series output files (0: disabled, 1: enabled). Units are K. Requires that skin temperature is a variable on the particle or trajectory files. Example: &amp;lt;code&amp;gt;arrivalSkinTemperature = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Flexpart====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
;inputFormat (integer)&lt;br /&gt;
: 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/NorESM data short format, 4: global reanalysis data long format, 5 regional reanalysis/NorESM data short format. Example: &amp;lt;code&amp;gt;inputFormat = 3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;maxPart (integer)&lt;br /&gt;
: number of particles contained in a single FLEXPART partposit or shortposit file. Example: &amp;lt;code&amp;gt;maxPart = 5000000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partMass (float)&lt;br /&gt;
: atmospheric mass represented by each particle in kilogramms. Parameter is written out by specific version of FLEXPART to create WaterSip output data. Example: &amp;lt;code&amp;gt;partMass = 1.01943e+12&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;partStride (integer)&lt;br /&gt;
: number of particles to skip during processing to speed up calculations (1: use every particle, &amp;gt;=2: use every 2nd particle, etc). Example: &amp;lt;code&amp;gt;partStride = 10&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;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). Example: &amp;lt;code&amp;gt;allowReenter = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
====Parameter set Lagranto====&lt;br /&gt;
&lt;br /&gt;
The parameters in this category describe the properties specific to FLEXPART input files.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Full example for a FLEXPART run input file:===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Case]&lt;br /&gt;
caseName = global_201002_final_relativex&lt;br /&gt;
inputDir = /home/data/flexpart/global/shortposit_%s&lt;br /&gt;
outputDir=/home/data/watersip/global_201002_V3/&lt;br /&gt;
startDate = 20100228-180000&lt;br /&gt;
endDate = 20100211-000000&lt;br /&gt;
timeStep = 6&lt;br /&gt;
sectorizeRegion = 0&lt;br /&gt;
filterBoxFile = /home/progs/WaterSip_tool/BOX_FILTERS_SiebenHengste&lt;br /&gt;
filterIndex = -1&lt;br /&gt;
orographyFile = &amp;quot;/home/projects/WaterSip_tool/etopo5.nc&amp;quot;&lt;br /&gt;
lsmFile = &amp;quot;/home/projects/WaterSip_tool/ERA_sea_mask_inv.nc&amp;quot;&lt;br /&gt;
maskFile = &amp;quot; &amp;quot;&lt;br /&gt;
useMask = 0&lt;br /&gt;
trajPoints = 41&lt;br /&gt;
minTrajPoints = 0&lt;br /&gt;
ompThreads = 1&lt;br /&gt;
showStats = 0&lt;br /&gt;
&lt;br /&gt;
[Grids]&lt;br /&gt;
arrivalGridMinLon = -180&lt;br /&gt;
arrivalGridMaxLon = 180&lt;br /&gt;
arrivalGridMinLat = -90&lt;br /&gt;
arrivalGridMaxLat = 90&lt;br /&gt;
arrivalGridDx = 1&lt;br /&gt;
arrivalGridDy = 1&lt;br /&gt;
arrivalGridRadius = 200&lt;br /&gt;
sourceGridMinLon = -180&lt;br /&gt;
sourceGridMaxLon = 180&lt;br /&gt;
sourceGridMinLat = -90&lt;br /&gt;
sourceGridMaxLat = 90&lt;br /&gt;
sourceGridDx = 1&lt;br /&gt;
sourceGridDy = 1&lt;br /&gt;
sourceGridRadius = 200&lt;br /&gt;
griddingType = 2&lt;br /&gt;
&lt;br /&gt;
[Diagnostics]&lt;br /&gt;
uptakeThreshold = 0.05&lt;br /&gt;
precipThreshold = 0.05&lt;br /&gt;
blhScale = 1.5&lt;br /&gt;
arrivalPrecipMin = 0.05&lt;br /&gt;
arrivalPrecipMax = 1.0&lt;br /&gt;
arrivalRHMin = 80&lt;br /&gt;
arrivalRHMax = 110&lt;br /&gt;
arrivalOroMin = -100&lt;br /&gt;
arrivalOroMax = 12000&lt;br /&gt;
arrivalAltMin = -100&lt;br /&gt;
arrivalAltMax = 12000&lt;br /&gt;
analyzeVapour = 0&lt;br /&gt;
assignToUptake = 0&lt;br /&gt;
forwardProjectionMode = 3&lt;br /&gt;
relativeThreshold = 1&lt;br /&gt;
&lt;br /&gt;
[Output]&lt;br /&gt;
stepFile = 1&lt;br /&gt;
dayFile = 1&lt;br /&gt;
monthFile = 1&lt;br /&gt;
yearFile = 1&lt;br /&gt;
allFile = 1&lt;br /&gt;
staticFields = 1&lt;br /&gt;
saveTraj = 0&lt;br /&gt;
skipTraj = 0&lt;br /&gt;
saveHistogram = 0&lt;br /&gt;
saveMean = 0&lt;br /&gt;
&lt;br /&gt;
[Variables]&lt;br /&gt;
sourcesBoundaryLayer = 1&lt;br /&gt;
sourcesFreeTroposphere = 1&lt;br /&gt;
evaporationMinusPrecipitation = 1&lt;br /&gt;
moistureTransport = 1&lt;br /&gt;
trajectoryLocations = 1&lt;br /&gt;
precipitationEstimate = 1&lt;br /&gt;
sourceLongitude = 1&lt;br /&gt;
sourceLatitude = 1&lt;br /&gt;
convectionCount = 0&lt;br /&gt;
convectionHeight = 0&lt;br /&gt;
landFraction = 1&lt;br /&gt;
boundaryLayerFraction = 1&lt;br /&gt;
freeTroposphereFraction = 1&lt;br /&gt;
combinedFraction = 0&lt;br /&gt;
transportTime = 1&lt;br /&gt;
sourceSkinTemperature = 1&lt;br /&gt;
sourceSpecificHumidity = 0&lt;br /&gt;
transportDistance = 1&lt;br /&gt;
sourceDistance = 1&lt;br /&gt;
source2mTemperature = 0&lt;br /&gt;
sourceDeuteriumExcess = 1&lt;br /&gt;
transportTemperature = 1&lt;br /&gt;
transportPressure = 1&lt;br /&gt;
condensationTemperature = 1&lt;br /&gt;
arrivalTemperature = 1&lt;br /&gt;
arrivalPressure = 1&lt;br /&gt;
arrival2mTemperature = 0&lt;br /&gt;
arrivalSkinTemperature = 1&lt;br /&gt;
&lt;br /&gt;
[Flexpart]&lt;br /&gt;
inputFormat = 3&lt;br /&gt;
maxPart = 5000000&lt;br /&gt;
partMass = 1.01943e+12&lt;br /&gt;
partStride = 10&lt;br /&gt;
allowReenter = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Output file formats===&lt;br /&gt;
&lt;br /&gt;
The results from the WaterSip diagnostic are written to a set of output files in different format. The main output files are created in netCDF with detailed metadata information, including the parameter settings of the run for automated documentation. The creation of different output files can be adapted by parameter settings in parameter set *Output* and the contained variables with settings in parameter set *Variables*. Spatial fields at different time intervals are written to so-called grid files in [[netCDF]] format, time series of averaged quantities at different time intervals are written to so-called Series files in netCDF format, histograms of selected quantities identified during the processing for each time step and each trajectory are written to Histogram files in ASCII format, and trajectories are written to Trajectory files in either the binary format traj or the Lagranto ASCII format. Earlier versions than V3 reported output in so-called Mean files in an ASCII format. That format is documented here but no longer in use in current versions of WaterSip.&lt;br /&gt;
&lt;br /&gt;
The time unit has changed in Version 3.1. Previously, the unit was set to &amp;quot;days since 0000-01-02 00:00:00&amp;quot; to allow matlab-compatible values for time that could directly be utilized with the datenum() commands. In order to confirm to netCDF-CF standards, where no calendar year 0000 exists, the time unit is now &amp;quot;days since 0001-01-01 00:00:00&amp;quot;. This provides the ability to open and visualize netCDF output files directly with tools such as ncview and panoply. To convert the time values into a matlab datenum compatible value, the following commands have to be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ncid=netcdf.open(filename,&amp;quot;noclobber&amp;quot;);&lt;br /&gt;
tim=(float)netcdf.getVar(ncid,&amp;quot;time&amp;quot;);&lt;br /&gt;
tim=tim-datenum(1,0,1);&lt;br /&gt;
datestr(tim)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table below summarizes the available output files:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Content !! Format !! Filename&lt;br /&gt;
|-&lt;br /&gt;
| Grid files || Spatial properties of moisture sources and arrival regios || netCDF || CASE_grd_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Series files || Mean/min/max/std of regionally and globally averaged moisture source and arrival region properties || netCDF || CASE_ser_all/year/month/day/step.nc&lt;br /&gt;
|-&lt;br /&gt;
| Histogram files || Histograms of quantities identified for each timestep along each trajectory || ASCII || CASE_hst_steps&lt;br /&gt;
|-&lt;br /&gt;
| Trajectory files || Trajectories for identified precipitation events || ASCII/binary traj || CASE_DATE.traj/CASE_DATE_lsl&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Grid files====&lt;br /&gt;
&lt;br /&gt;
Grid file variables are separated into immediate source and transport variables, typically on a coarser, global grid, and arrival and forward-projected variables on the (typically finer-scale) arrival grid. The grid settings are determined by the corresponding parameters in parameter set *Grid*. All variables are of type float, and the fill value (netCDF property _FillValue) is -999.99. The averaging over time steps, as required by different grid files, is done by weighting each time step contribution with the corresponding precipitation estimate, and dividing by the total precipitation (as described above).&lt;br /&gt;
&lt;br /&gt;
**Moisture source and transport properties**&lt;br /&gt;
&lt;br /&gt;
Variables related to immediate moisture source and transport properties (not forward projected) have dimension of variables time, global_latitude, global_longitude, as defined by input file parameters *sourceGridMinLon,sourceGridMaxLon, sourceGridMinLat, sourceGridMaxLat, sourceGridDx, sourceGridDy, sourceGridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer || E_s^BL || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere || E_s^FT || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation || E-P || mm (step)h^-1 or mm 24h^-1 || text &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport || Q_t || mm ||  text &lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location || N_t || counts km^-2 || text &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Arrival properties and Lagrangian forward projections**&lt;br /&gt;
&lt;br /&gt;
The variables contained in these files have the dimensions time (days since 0001-01-01 00:00:00), latitude (degrees_north), and longitude (degrees_east) as defined by input file parameters *arrivalGridMinLon, arrivalGridMaxLon, arrivalGridMinLat, arrivalGridMaxLat, arrivalGridDx, arrivalGridDy, arrival | source | text |GridRadius*.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Symbol !! Unit !! Property !! Description &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate || PE || mm day^-1 or mm step^-1 || arrival || precipitation at arrival location estimated from change in specific humidity during last time step &lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature || T_a || K || arrival || PE-weighted temperature at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure || p_a || hPa || arrival || PE-weighted pressure at trajectory location and elevation during arrival &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature || SKT_a || K || arrival || PE-weighted SKT below trajectory location during arrival &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer || f_BL || fraction || arrival || fractional contribution of BL moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere || f_FT || fraction || arrival || fractional contribution of FT moisture sources to PE &lt;br /&gt;
|-&lt;br /&gt;
| precipitation_lifetime || \tau_t || h || transport || contribution and precipitation-weighted precipitation life time &lt;br /&gt;
|-&lt;br /&gt;
| transport_distance || \Delta_t || km || transport || contribution and precipitation-weighted transport distance along trajectory &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature || T_t || K || transport || contribution and precipitation-weighted temperature during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure || p_t || hPa || transport || contribution and precipitation-weighted pressure during moisture transport &lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature || T_c || K || transport || contribution and precipitation-weighted temperature when RH&amp;gt;80% during transport &lt;br /&gt;
|-&lt;br /&gt;
| source_longitude || \lambda_s || degrees_east || source || contribution and precipitation-weighted latitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_latitude || \phi_s || degrees_north || source || contribution and precipitation-weighted longitude of the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| land_fraction || f_l || fraction || source || contribution and precipitation-weighted fraction of moisture sources over land &lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature || SKT_s || K || source || contribution and precipitation-weighted SKT at the moisture source &lt;br /&gt;
|-&lt;br /&gt;
| source_distance || \Delta_s || km || source || contribution and precipitation-weighted direct distance between the moisture source and arrival location &lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess || d_s || permil || source || contribution and precipitation-weighted estimate of deuterium excess at the source from RH and T using the Pfahl and Sodemann (2013) relation &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Global attributes**&lt;br /&gt;
&lt;br /&gt;
The netCDF grid files contain a range of essential parameters as global attributes. These parameters allow to fully characterise the result of the WaterSip run as required for the interpretation of the results. A number of run parameters are omitted, that concern logistical settings, or that are self-evident from the content of the the output files. The table below gives an example for a WaterSip run:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Example !! Type &lt;br /&gt;
|-&lt;br /&gt;
| startDate || &amp;quot;2010-02-28 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| endingDate || &amp;quot;2010-01-11 00:00:00 +0000&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| analysisRegion || &amp;quot;NEEM&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| maxPart || 5000001  || int&lt;br /&gt;
|-&lt;br /&gt;
| caseName || &amp;quot;global_201002_V3_stride&amp;quot; || string&lt;br /&gt;
|-&lt;br /&gt;
| trajPoints || 61  || int&lt;br /&gt;
|-&lt;br /&gt;
| timeStep || 6  || in float&lt;br /&gt;
|-&lt;br /&gt;
| partMass || 2.03885996E12  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| dryLevel || 0.01  || float&lt;br /&gt;
|-&lt;br /&gt;
| blhScale || 1.5  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMin || 80.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| rhMax || 110.0  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| uptakeThreshold || 0.2  ||  float&lt;br /&gt;
|-&lt;br /&gt;
| precipThreshold || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMin || -0.2  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrPrecipMax || -120.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrOroMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMin || 0.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| arrAltMax || 9000.0  || float&lt;br /&gt;
|-&lt;br /&gt;
| anaVapour || 0  || int&lt;br /&gt;
|-&lt;br /&gt;
| filterIndex || -1  || int&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Series files====&lt;br /&gt;
&lt;br /&gt;
The netCDF series files contain two sets of information. The so-called sectorization output provides time series of the moisture source information seperated into relative contributions from predefined geographical areas. Furthermore, the series files contains weighted averages and further statistical properties of all quantities in the grid files. &lt;br /&gt;
&lt;br /&gt;
**Sectorisation output**&lt;br /&gt;
&lt;br /&gt;
A set of sectorisations is chosen by the parameter *sectorizeRegion*. The currently available options are listed in the table below. New sectorisations can be defined by changing the code in routine &amp;lt;code&amp;gt;Sectors.cpp/Sectors.h&amp;lt;/code&amp;gt;. This requires defining a new name and new decision tree that provides a unique number for any lat/lon value between -180E to 180E and -90 to 90N. See comments in the code.&lt;br /&gt;
&lt;br /&gt;
For each of the predefined areas, the relative contributions are subdivided into land and sea covered areas. Time series of the contributions are of dimension time and sector. Thereby, the sector numbers correspond to the sector numbers defined in the program code. The area of the sectors is calculated automatically within WaterSip. As noted above for the grid files, the time unit has been changed starting from Version 3.1.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol !! Unit !! Description&lt;br /&gt;
|-&lt;br /&gt;
| time || t || days since 0001-01-01 00:00:00 || text&lt;br /&gt;
|-&lt;br /&gt;
| sector || s || sector number || text&lt;br /&gt;
|-&lt;br /&gt;
| sector_area || A_s || km^2 || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_boundary_layer || f_l^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_boundary_layer || f_s^BL || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_uptakes_free_troposphere || f_l^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_uptakes_free_troposphere || f_s^FT || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_trajectory_location || f_l^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_trajectory_location || f_s^N || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_moisture_transport || f_l^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_moisture_transport || f_s^Q || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_evaporation_minus_precipitation || f_l^EP || percent || text&lt;br /&gt;
|-&lt;br /&gt;
| sea_fraction_evaporation_minus_precipitation | f_s^EP | percent | text&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
**Time-series output**&lt;br /&gt;
&lt;br /&gt;
For immediate quantities, a time series of the total field sum is recorded in the series file. In order to obtain an area average, one needs to divide the sum by the surface of the earth (x km^2). The unit for moisture uptakes, E-P and precipitation estimate is mm step^-1 for step series files, and mm 24h^-1 for all other averaging series files. In addition to sums, the files contain time series of the minimum, maximum and standard deviation of the grid field at each time instance. For all forward-projected and arrival quantities, the average rather than the sum is calculated on the arrival grid locations. When averaging from step output to larger time intervals, the quantities are weighted with the corresponding PE at each grid point. &lt;br /&gt;
&lt;br /&gt;
In addition, series files contain the same set of global attributes as described in Grid files to enable interpretation without additional documentation of the run setup.&lt;br /&gt;
&lt;br /&gt;
*Immediate quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_boundary_layer_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_uptakes_free_troposphere_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| evaporation_minus_precipitation_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_min || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_sum || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_max || x  || mm&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_min || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_sum || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| trajectory_location_max || x  || counts km^-2&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_min || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_sum || x  || mm (step or 24h)^-1&lt;br /&gt;
|-&lt;br /&gt;
| precipitation_estimate_max || x  || mm (step or 24h)^-1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Arrival and forward-projected quantities*&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Symbol  !! Unit&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_min || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_avg || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_longitude_max || x  || degrees_east&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_min || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_avg || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| source_latitude_max || x  || degrees_north&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| land_fraction_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_boundary_layer_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_min || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_avg || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| accounted_fraction_free_troposphere_max || x  || fraction&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_min || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_avg || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| transport_time_max || x  || hours_before_arrival&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| source_skin_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| transport_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_min || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_avg || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| source_distance_max || x  || km&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_min || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_avg || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| deuterium_excess_max || x  || permil&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| moisture_transport_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| condensation_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_avg || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_temperature_max || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_min || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_avg || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_pressure_max || x  || hPa&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_min || x  || K&lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_avg || x  || K &lt;br /&gt;
|-&lt;br /&gt;
| arrival_skin_temperature_max || x || K&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Histogram files====&lt;br /&gt;
&lt;br /&gt;
* Bounds freq (1 to n categories), (1 to m variables)&lt;br /&gt;
* Main variables time, dq, conv&lt;br /&gt;
* where to implement&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20.71   46.56   8.1351e+05  -1.0000e+00&lt;br /&gt;
21.22   45.90   1.1314e+06  -1.0000e+00&lt;br /&gt;
22.03   45.24   4.1929e+05  -1.0000e+00&lt;br /&gt;
21.19   45.35   1.0639e+06  -1.0000e+00&lt;br /&gt;
20.71   46.50   5.0963e+05  -1.0000e+00&lt;br /&gt;
21.07   47.51   2.8182e+05  -1.0000e+00&lt;br /&gt;
21.71   48.67   9.3088e+05  -1.0000e+00&lt;br /&gt;
22.14   51.47   2.3634e+05  -1.0000e+00&lt;br /&gt;
22.14   52.49   8.0048e+05  -1.0000e+00&lt;br /&gt;
22.34   53.76   7.3297e+05  -1.0000e+00&lt;br /&gt;
23.17   54.41   4.1516e+05  -1.0000e+00&lt;br /&gt;
23.56   54.54   2.7414e+05  -1.0000e+00&lt;br /&gt;
24.39   54.55   5.0017e+05  -1.0000e+00&lt;br /&gt;
26.89   54.42   2.8215e+05  -1.0000e+00&lt;br /&gt;
28.18   54.40   3.9987e+05  -1.0000e+00&lt;br /&gt;
29.80   54.25   3.6020e+05  -1.0000e+00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Trajectory files====&lt;br /&gt;
&lt;br /&gt;
**LSL format**&lt;br /&gt;
&lt;br /&gt;
* As documented elsewhere&lt;br /&gt;
* only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**Traj format**&lt;br /&gt;
&lt;br /&gt;
* Binary format, only some variables&lt;br /&gt;
* Code location&lt;br /&gt;
* reading in and plotting traj files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
example&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mean file====&lt;br /&gt;
&lt;br /&gt;
Legacy format, global_201002_V3_avg_steps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
20100228_00 13795.603  0.001 7994.128  0.001 722561152.000 1977998.875   -0.081   -3.124    0.007  -0.080  -1.347   0.003   0.181   0.000   0.001   0.711   0.006   0.001   0.242   0.000   0.001 -999.990 -999.990 -999.990  -83.283 -340.404    0.153  288.231  242.846    0.050 -999.990 -999.990 -999.990   2828.54    120.41      7.50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Annotated bibliography===&lt;br /&gt;
&lt;br /&gt;
There are to date (Oct 2019) 25 publications involving the WaterSip method in one way or another. The versatility of WaterSip ranges from weather events to climatological studies, and from process understanding to paleoclimate proxy interpretation. This documentation can only provide initial guidance in applying WaterSip to new research plans. The annotated bibliography below provides an overview over the relevant studies, ordered by topic and the respective climatic zone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Topic !! Time perspective !! Climate zone !! Region !! Reference&lt;br /&gt;
|-&lt;br /&gt;
| Method description || - || High latitudes || Greenland || Sodemann et al., 2008a&lt;br /&gt;
|-&lt;br /&gt;
| Precipitation extremes || Climatology || Subtropics || Mediterranean || Winschall et al., 2014a&lt;br /&gt;
|-&lt;br /&gt;
| Method evaluation || Weather event || Subtropics || Mediterranean || Winschall et al., 2014b&lt;br /&gt;
|-&lt;br /&gt;
| Lifetime of precipitation || Climatology || Global || Global || Läderach and Sodemann, 2016&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || High latitudes || Greenland || Sodemann et al., 2008b&lt;br /&gt;
|-&lt;br /&gt;
| Climate characteristics || Climatology || Mid latitudes || Europe || Sodemann and Zubler, 2010&lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Tropics || Belize || Kenneth et al., &lt;br /&gt;
|-&lt;br /&gt;
| Climate proxy interpretation || Climatology || Mid latitudes || China || Baker et al., Luetscher et al. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
* Thurnherr, I., Kozachek, A., Graf, P., Weng, Y., Bolshiyanov, D., Landwehr, S., Pfahl, S., Schmale, J., Sodemann, H., Steen-Larsen, H. C., Toffoli, A., Wernli, H., and Aemisegger, F., 2019: Meridional and vertical variations of the water vapour isotopic composition in the marine boundary layer over the Atlantic and Southern Ocean, Atmos. Chem. Phys. Discuss., doi: 10.5194/acp-2019-782.&lt;br /&gt;
* Fremme, A. and Sodemann, H., 2019: The role of land and ocean evaporation on the variability of precipitation in the Yangtze River valley, Hydrol. Earth Syst. Sci., 23, 2525–2540, doi: 10.5194/hess-23-2525-2019. &lt;br /&gt;
* Huang, R, Zhu, H, Liang, E., Grießinger, J, Wernicke, J., Yu, W., Hochreuther, P., Risi, C., Zeng, Y., Fremme, A., Sodemann, H., Bräuning, A., 2019: Temperature signals in tree-ring oxygen isotope series from the northern slope of the Himalaya, EPSL 506: 455-465. &lt;br /&gt;
* Buizert, Christo; Sigl, Michael; Severi, Mirko; Markle, Bradley; Wettstein, Justin; McConnell, J; Pedro, Joel; Sodemann, H.; Goto-Azuma, Kumiko; Kawamura, Kenji; Fujita, Shuji; Motoyama, Hideaki; Hirabayashi, Motohiro; Uemura, Ryu; Stenni, Barbara; Parrenin, Frederic; He, Feng; Fudge, T.J.; Steig, Eric J., 2018: Abrupt ice-age shifts in southern westerly winds and Antarctic climate forced from the north, Nature 563: 681-685.&lt;br /&gt;
* Bohlinger, P., Sorteberg, A., Liu, C., Rasmussen, R., Sodemann, H., Ogawa, F., 2018: Multiscale characteristics of an extreme precipitation event over Nepal. QJRMS:1-18, doi:10.1002/qj.3418. &lt;br /&gt;
* Bohlinger, P., Sorteberg, A., and Sodemann, H., 2017: Synoptic conditions and moisture sources actuating extreme precipitation in Nepal. Journal of Geophysical Research: Atmospheres, 122, 12,653–12,671. https://doi.org/10.1002/2017JD027543.&lt;br /&gt;
* Blazina, T., A. Läderach, G. D. Jones, H. Sodemann, H. Wernli, J. W. Kirchner and L. H. E. Winkel, 2016: Marine primary productivity as a potential source of selenium and other trace elements in atmospheric deposition, Environ. Sci. Technol. 2017, 51, 108−118, doi: 10.1021/acs.est.6b03063.&lt;br /&gt;
* Läderach, A. andSodemann, H., 2016: A revised picture of the atmospheric moisture residence time, Geophys. Res. Lett., 43, doi:10.1002/2015GL067449.&lt;br /&gt;
* Baker, A., Sodemann, H., Baldini, J. U. L., Breitenbach, S. F. M., Johnson, K. R., van Hunen, J., and Pingzhong, Z., 2015: Seasonality of westerly moisture transport in the East Asian Summer Monsoon and its implications for interpreting precipitation d18O, J. Geophys. Res., 120,  doi:10.1002/2014JD022919.&lt;br /&gt;
* Steen-Larsen, H. C., Sveinbjörnsdottir, A. E., Jonsson, T., Ritter, F., Bonne, J.-L., Masson-Delmotte, V., Sodemann, H., Blunier, T., Dahl-Jensen, D., Vinther, B. M., 2015: Moisture sources and synoptic to seasonal variability of North Atlantic water vapor isotopic composition, J. Geophys. Res., 120, 5757–5774, doi:10.1002/ 2015JD023234.&lt;br /&gt;
* Bonne, J.-L., Steen-Larsen, H. C., Risi, C., Werner, M., Sodemann, H., Lacour, J.-L., Fettweis, X., Cesana, G., Delmotte, M., Cattani, O., Vallelonga, P., Kjær, H. A., Clerbaux, C., Sveinbjörnsdóttir, A. E., and Masson-Delmotte, V., 2015: The summer 2012 Greenland heat wave: In situ and remote sensing observations of water vapor isotopic composition during an atmospheric river event, J. Geophys. Res., 120, 2970-2989, doi:10.1002/2014JD022602.&lt;br /&gt;
* Luetscher, M., Boch, R., Sodemann, H., Spoetl, C., Cheng, H., Edwards, R. L., Frisia, S., Hof, F., Mueller, W., 2015: North Atlantic storm track changes during the Last Glacial Maximum recorded by Alpine speleothems, Nature Comm. 6: 6344, doi:10.1038/ncomms7344.&lt;br /&gt;
* Winschall, A., Sodemann, H.,Pfahl, S. and Wernli, H., 2014: How important is intensified evaporation for Mediterranean precipitation extremes?, J. Geophys. Res., 119: 5240–5256, doi:10.1002/2013JD021175&lt;br /&gt;
* Winschall, A., Pfahl, S., Sodemann, H.and Wernli, H.. 2014. Comparison of Eulerian and Lagrangian moisture source diagnostics - the flood event in eastern Europe in May 2010, Atmos. Chem. Phys. 14: 6605–6619, doi:10.5194/acp-14-6605-2014.&lt;br /&gt;
* Aemisegger, F., Pfahl, S., Sodemann, H., Lehner, I., Seneviratne, S. I., and Wernli, H., 2014: Deuterium excess as a proxy for continental moisture recycling and plant transpiration, Atmos. Chem. Phys., 14: 4029–4054, doi:10.5194/acp-14-4029-2014.&lt;br /&gt;
* Bonne, J. L., Masson-Delmotte, V., Cattani, O., Delmotte, M., Risi, C., Sodemann, H., and Steen-Larsen, H. C., 2014:The isotopic composition of water vapour and precipitation in Ivittuut, southern Greenland, Atmos. Chem. Phys. 14: 4419–4439, doi:10.5194/acp-14-4419-2014.&lt;br /&gt;
* Wang, Y., Sodemann, H., Hou, S., Masson-Delmotte, V. Jouzel, J. and Pang, H., 2013: Snow accumulation and its moisture origin over Dome Argus, Antarctica. Clim. Dyn., 40:731-742, doi: 10.1007/s00382-012-1398-9.&lt;br /&gt;
* Martius, O., Sodemann, H., Joos, H., Pfahl, S., Winschall, A., Croci-Maspoli, M., Graf, M., Madonna, E., Mueller, B., Schemm, S., Sedlacek, J., Sprenger, M. and Wernli, H., 2012: The role of upper-level dynamics and surface processes for the Pakistan flood in July 2010. Quart. J. Royal Meteorol. Soc., published online, doi: 10.1002/qj.2082.&lt;br /&gt;
* Kennett, D. J., Breitenbach, S. F. M., Aquino, V. V., Asmerom, Y., Awe, J., Baldini, J. U. L., Bartlein, P., Culleton, B. J., Ebert, C., Jazwa, C., Macri, M. J., Marwan, N., Polyak, V., Prufer, K. M., Ridley, H. E., Sodemann, H., Winterhalder, B. and Haug, G. H., 2012: Development and Disintegration of Maya Political Systems in Response to Climate Change. Science, 338: 788-791, doi: 10.1126/science.1226299.&lt;br /&gt;
* Winkler, R., Landais, A., Sodemann, H., Dümbgen, L., Priéa, F., Masson-Delmotte, V., Stenni, B., and Jouzel, J., 2012: Deglaciation records of 17O-excess in East Antarctica: reliable reconstruction of oceanic relative humidity from coastal sites. Clim. Past 8, 1-16.&lt;br /&gt;
* Masson-Delmotte, V., Buiron, D., Ekaykin, A., Frezzotti, M., Gallée, H., Jouzel, J., Krinner, G., Landais, A., Motoyama, A., Oerter, H., Pol, K., Pollard, D., Ritz, C., Schlosser, E., Sime, L. C., Sodemann, H., Stenni, B., Uemura R., and Vimeux, F., 2011: A comparison of the present and last interglacial periods in six Antarctic ice cores Clim. Past, 7, 397-423. &lt;br /&gt;
* Sodemann, H.and Zubler, E., 2010: Seasonality and inter-annual variability of the moisture sources for Alpine precipitation during 1995-2002, Int. J. Climatol., 30: 947-961, doi:10.1002/joc.1932.&lt;br /&gt;
* Sodemann, H., and Stohl, A., 2009: Asymmetries in the moisture origin of Antarctic precipitation, Geophys. Res. Lett., 36, L22803, doi:10.1029/2009GL040242.&lt;br /&gt;
* Sodemann, H., Masson-Delmotte, V., Schwierz, C., Vinther, B. M. and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Part II: Effects of North Atlantic Oscillation variability on stable isotopes in precipitation, J. Geophys. Res., 113, D12111, doi:10.1029/2007JD009416.&lt;br /&gt;
* Sodemann, H., Schwierz, C., and Wernli, H., 2008: Inter-annual variability of Greenland winter precipitation sources. Lagrangian moisture diagnostic and North Atlantic Oscillation influence, J. Geophys. Res.,113, D03107, doi:10.1029/2007JD008503.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1404</id>
		<title>FLIIMP - FARLAB liquid water isotope measurements processor</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1404"/>
		<updated>2020-10-28T14:46:00Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Installation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the current code from the [https://git.app.uib.no/farlab-codes/fliimp FLIIMP git repository]&lt;br /&gt;
&lt;br /&gt;
(optional) copy the script FLIIMP.sh to your computer to start FLIIMP with a double click. Path settings need to be adjusted to your computer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running interactively&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A. run the script &lt;br /&gt;
&lt;br /&gt;
 FLIIMP.m &lt;br /&gt;
&lt;br /&gt;
with matlab&lt;br /&gt;
&lt;br /&gt;
-or-&lt;br /&gt;
&lt;br /&gt;
B. double-click the script &lt;br /&gt;
&lt;br /&gt;
 FLIIMP.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running in batch mode&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
edit the file &lt;br /&gt;
&lt;br /&gt;
 batch_FLIIMP_example.m &lt;br /&gt;
&lt;br /&gt;
to process a set of files. The example is using calls to the routine  FLIIMP_batch.m&lt;br /&gt;
&lt;br /&gt;
For further details, see the comments within the files.&lt;br /&gt;
&lt;br /&gt;
== Detailed user instructions: ==&lt;br /&gt;
&lt;br /&gt;
[https://vimeo.com/450466002 Watch the video walk-through here]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USING FLIIMP:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
FLIIMP has 3 windows, that have to be completed in a fixed sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Path settings, instrument and time&#039;&#039;&#039;&lt;br /&gt;
￼&lt;br /&gt;
FLIIMP reads in the injection files from an instrument for a particular time, time range, or day. The Input file path for all injection files is specified in the first entry field.&lt;br /&gt;
&lt;br /&gt;
FLIIMP creates a report on the calibrated data in HTML format within a new subfolder. The base output file path where the new output folder will be created is specified in the second entry field.&lt;br /&gt;
&lt;br /&gt;
The instrument on which the liquid samples were measured is chosen from the pulldown list &amp;quot;Instrument&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Next, either a time range or specific files are selected. If choosing time range, only a date in format YYYYMMDD_HHMMSS needs to be given. If a range is given, all files that fall within the time period will be loaded. If only one date is given, either all files from that day (YYYYMMDD) or if a specific date with HHMMSS is given, that specific time will be looked for. The search path for files is combined from the input file path, the instrument, and the time range, for example&lt;br /&gt;
&lt;br /&gt;
 HKDS2038/IsotopeData/HKDS2038_IsoWater_20180912_120312.csv&lt;br /&gt;
&lt;br /&gt;
At any point, the settings can be saved to a .mat file, or loaded from a previous run. The settings are saved and loaded across all three steps of the calibration, not for each step separately.&lt;br /&gt;
&lt;br /&gt;
The button &amp;quot;Next &amp;gt;&amp;quot; advances to the second step. After clicking, please check the matlab command window for error messages or warnings.&lt;br /&gt;
&lt;br /&gt;
Path settings are saved automatically to the file &amp;quot;FLIIMP_settings.mat&amp;quot; in your home directory ($HOME on linux/mac systems).&lt;br /&gt;
&lt;br /&gt;
![FLiiMP_1](uploads/965cac19a14e7a9464ca2682c80fc74c/FLiiMP_1.png)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Sample screening and selection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the second step, the data files for the selected period are loaded, and displayed for screening and selection. The table shows each identified sample by its &amp;quot;Identifier 1&amp;quot; value, them mean H2O concentration (in ppmv), and the standard deviation based on all samples.&lt;br /&gt;
&lt;br /&gt;
The figure panels to the right show box-and-whisker plots of H2O vs. Injection number (top) and a selected isotope parameter from the Parameter drop-down below vs. Injection nr.&lt;br /&gt;
&lt;br /&gt;
Clicking on a list item will display the injections of a sample. Using the checkmark &amp;quot;Exclude sample from processing&amp;quot; it is possible to disregard the currently selected sample from analysis. When the tickbox is checked, a &amp;quot;X&amp;quot; will appear in the list in front of an excluded sample.&lt;br /&gt;
&lt;br /&gt;
Using the buttons &amp;quot;Exclude all&amp;quot; and &amp;quot;Include all&amp;quot;, it is possible to set all samples in the list as excluded/included.&lt;br /&gt;
&lt;br /&gt;
In the Injections line below, it is possible to exclude specific injections from the processing. If no sample is to be excluded, a value &amp;quot;-1&amp;quot; is displayed in the text entry box. To exclude injections 3 and 4 of the current sample, enter 3 and 4 separated by a space character in the input box. After choosing a different sample in the list, and combing back to the sample with excluded injections, these will be marked in red in the graphic display panels. &lt;br /&gt;
&lt;br /&gt;
Manually excluded samples and injections are listed in the FLIIMP report in the section &amp;quot;Pre-processing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
![FLIIMP_2](uploads/0e50e2fd3cdb0e030f09cdf006fa2739/FLIIMP_2.png)￼&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Run parameters and calibration settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the third step, the run parameters and calibration settings are entered. Each FARLAB project has a unique id that is entered in the first input field. The accounting can either be internal, collaborator, or external, which will influence the analysis cost (not considered in the report at present).&lt;br /&gt;
&lt;br /&gt;
The report date defaults to the current date (format YYYYMMDD), but can be set to any other date. This date will be appended to the output directory name. The checkbox &amp;quot;Detailed report&amp;quot; determines whether additional analysis information is included in the report. For normal customers that are not part of FARLAB, the checkbox &amp;quot;Detailed report&amp;quot; should not be checked, as FARLAB-internal information about the instruments and processing are included in the detailed report.&lt;br /&gt;
&lt;br /&gt;
Often, a project contains several runs/batches. The serial number or identifier of a run is entered in the field &amp;quot;Run ID&amp;quot; (for example &amp;quot;run01&amp;quot; and so on).&lt;br /&gt;
&lt;br /&gt;
The next two lines should contain a name and email of the customer, and of the operator at FARLAB who can be contacted by the customer in case of questions.&lt;br /&gt;
&lt;br /&gt;
Processing at FARLAB is based on local laboratory standards, that were calibrated on the VSMOW2-SLAP2 scale at several instances. The most current instance (run 3) is the default setting, for comparison purposes an older calibration run of the lab standards may be chosen. The delta values of the calibration standards are included in the report.&lt;br /&gt;
&lt;br /&gt;
The calibration type can be either 1-point or 2-point linear. The third option, 3-point is not yet implemented. Using 1-point will use an average of the standard measurements in the beginning and end of a run. Using 2-point linear will linearly interpolate between the standard measurements in the beginning and end of a run. The option 2-point linear is recommended.&lt;br /&gt;
&lt;br /&gt;
The input field &amp;quot;Calibration standards&amp;quot; should contain the chosen pair of calibration standards for slope and offset calibration. The first standard will be the offset correction, the first and second will be used in the slope correction. Standard names should appear as they are listed in the table visible in step 2. If more than 2 standards were measured, that are not used in the calibration, these names should be listed after the first two standards. If not included here, additional standard measurements will be treated as samples. &lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Drift standard&amp;quot; contains the name of a standard that was repeatedly measured during the run but not used in calibration. It is displayed in a separate section in the report. The fields &amp;quot;Calibration standards&amp;quot; and &amp;quot;Drift standard&amp;quot; must not be empty. If no drift standard was in included in a run, use one of the calibration standards here.&lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Averaging injections&amp;quot; sets how many of the last injections will be used in the averaging step. A number of 3 or 4 is currently recommended (without memory correction). The checkbox &amp;quot;include 17-O excess&amp;quot; needs to be checked for runs that are intended for 17-O excess analysis.&lt;br /&gt;
&lt;br /&gt;
Pressing the button &amp;quot;Calibrate&amp;quot; that will start to produce the output report in HTML format. Watch the matlab command line window for progress, error messages and warnings.&lt;br /&gt;
&lt;br /&gt;
Remember, settings across all three steps can be saved and loaded at any time using the buttons &amp;quot;Save&amp;quot; and &amp;quot;Load&amp;quot;.&lt;br /&gt;
￼&lt;br /&gt;
![FLIIMP_3](uploads/68266f681b7e2f2f21789771bcee76bc/FLIIMP_3.png)&lt;br /&gt;
&lt;br /&gt;
==Detailed description of calibration procedure==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Identification of standards&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Calibration standards&lt;br /&gt;
&lt;br /&gt;
- Drift standards&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Calibration&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Using IAEA procedures&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Instrument characteristics&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Cavity temperature, cavity pressure, warm-box temperature, DAS temperature&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. Quality flags&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Humidity variation&lt;br /&gt;
&lt;br /&gt;
- Isotope variation&lt;br /&gt;
&lt;br /&gt;
- Temperature variation&lt;br /&gt;
&lt;br /&gt;
- Quality flags&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. Sample report&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reference&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
IAEA, 20xx&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=ERA5_reanalysis_data&amp;diff=1403</id>
		<title>ERA5 reanalysis data</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=ERA5_reanalysis_data&amp;diff=1403"/>
		<updated>2020-10-26T21:40:26Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Documentation of the ERA5 archive at GFI&lt;br /&gt;
&lt;br /&gt;
GFI is building up an archive of ERA5 reanalysis data on the local linux system cyclone.hpc.uib.no. ERA5 supersedes the ERA-Interim reanalysis data, which ended in August 2019. More information about the ERA5 reanalysis data set is available [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5 at ECMWF&#039;s ERA5 websites].&lt;br /&gt;
&lt;br /&gt;
The ERA5 data files are available in a CF-compatible netCDF format on cyclone.hpc.uib.no and other computers that mount the UiB linux system at&lt;br /&gt;
 &lt;br /&gt;
 /Data/gfi/share/era5&lt;br /&gt;
&lt;br /&gt;
At GFI, we share the data format with the [https://iac.ethz.ch/group/atmospheric-dynamics.html Atmospheric Dynamics group at IAC, ETH Zürich, Switzerland]; the [https://www.imk-tro.kit.edu/7425.php LSDP group at Karlsruhe Institute of Technology, Germany]; and the [https://www.weizmann.ac.il/EPS/raveh-rubin/ Dynamical Meteorology Group, Weizmann Institute of Science, Rehovot, Israel]. The data are organised as follows&lt;br /&gt;
&lt;br /&gt;
 ml/        3-hourly data on a regular 0.5 deg lat-lon grid, with model-level and pressure level files (see below)&lt;br /&gt;
 pl/        pressure level data at different resolutions than 0.5x0.5 deg (not yet processed)&lt;br /&gt;
&lt;br /&gt;
Data files are contained in subdirectories for each year and month:&lt;br /&gt;
&lt;br /&gt;
 ml/yyyy/mm/[B|H|P|Z]yyyymmdd_hh&lt;br /&gt;
&lt;br /&gt;
where yyyy is the year, mm the two-digit month, dd the two-digit day, and hh the two-digit hours, and Bxxx, Hxxx, Pxxx, Zxxx are different file types, as described in the table below.&lt;br /&gt;
&lt;br /&gt;
Until now, the years 1999-2018 have been retrieved, the period will successively be extended back to 1979, and forward in time.&lt;br /&gt;
&lt;br /&gt;
The data files contain the following variables:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;6&amp;quot;|ERA5 data files&lt;br /&gt;
|-&lt;br /&gt;
|File name&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Pyyyymmdd_hh&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot;|Zyyyymmdd_hh&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot;|Hyyyymmdd_hh&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot;|Byyyymmdd_hh&lt;br /&gt;
|-&lt;br /&gt;
|Leveltype&lt;br /&gt;
|Model level&lt;br /&gt;
|Surface&lt;br /&gt;
|Pressure&lt;br /&gt;
|Pressure&lt;br /&gt;
|Surface&lt;br /&gt;
|-&lt;br /&gt;
|Variables&lt;br /&gt;
|T, Q, U, V, OMEGA, LWC, IWC, RWC, SWC&lt;br /&gt;
|LSP, CP, SF, SSHF, SLHF, BLH, TCC, U10M, V10M, MSL, PS, SSTK&lt;br /&gt;
|Z, T, Q, U, V&lt;br /&gt;
|Z&lt;br /&gt;
|PS, MSL, TCC, U10M, V10M, SSTK, CI, D2M, T2M, TCW, TCWV, VIWVD, E, MN2T, MX2T, SI, TTR, TTRC, WG10, LSP, CP, SF, SSHF, SLHF, BLH&lt;br /&gt;
|-&lt;br /&gt;
|Levels&lt;br /&gt;
|40-137&lt;br /&gt;
| -&lt;br /&gt;
|900, 850, 800, 700, 600, 500, 400, 300, 250, 200, 100 hPa&lt;br /&gt;
|1000, 975, 950, 925, 900, 875, 850, 825, 800, 775, 750, 700, 650, 600, 550, 500, 450, 400, 350, 300, 250, 225, 200, 175, 150, 125, 100, 70, 50, 30, 20, 10, 70, 5, 3, 2, 1 hPa&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|Times available&lt;br /&gt;
|colspan=&amp;quot;5&amp;quot;|00, 03, 06, 09, 12, 15, 18, 21 UTC&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that the variables LSP, CP, SF, SSHF, SLHF, and BLH are derived as prognostic variables from the short-range forecast. Data valid at 00, 03, 06, 09 UTC are 06, 09, 12, 15 h forecast of the 18 UTC forecast of the previous day. Accordingly, data valid at 12, 15, 18, 21 UTC are 06, 09, 12, 15 h forecast of the 06 UTC forecast. The prognostic variables are accumulated over the previous 1 h.&lt;br /&gt;
&lt;br /&gt;
Please see [https://confluence.ecmwf.int//display/CKB/ERA5+data+documentation#ERA5datadocumentation-Parameterlistings ECMWF ERA5 data documentation] for parameter abbreviations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conditions of use:&#039;&#039;&#039; When using the ERA5 data from this archive please make sure to reference &amp;quot;[https://cds.climate.copernicus.eu/cdsapp#!/home Copernicus Climate Change Service (C3S) (2017): ERA5: Fifth generation of ECMWF atmospheric reanalyses of the global climate. Copernicus Climate Change Service Climate Data Store (CDS)], date of citation&amp;quot; and acknowledge &amp;quot;ECMWF for providing ERA-5 data“. Also, please acknowledge &amp;quot;Michael Sprenger (ETH Zurich)“ for the support in providing the data.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=ERA5_reanalysis_data&amp;diff=1402</id>
		<title>ERA5 reanalysis data</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=ERA5_reanalysis_data&amp;diff=1402"/>
		<updated>2020-10-26T21:40:01Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Documentation of the ERA5 archive at GFI&lt;br /&gt;
&lt;br /&gt;
GFI is building up an archive of ERA5 reanalysis data on the local linux system cyclone.hpc.uib.no. ERA5 supersedes the ERA-Interim reanalysis data, which ended in August 2019. More information about the ERA5 reanalysis data set is available [https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5 at ECMWF&#039;s ERA5 websites].&lt;br /&gt;
&lt;br /&gt;
The ERA5 data files are available in a CF-compatible netCDF format on cyclone.hpc.uib.no and other computers that mount the UiB linux system at&lt;br /&gt;
 &lt;br /&gt;
 /Data/gfi/share/era5&lt;br /&gt;
&lt;br /&gt;
At GFI, we share the data format with the [https://iac.ethz.ch/group/atmospheric-dynamics.html Atmospheric Dynamics group at IAC, ETH Zürich, Switzerland]; the [https://www.imk-tro.kit.edu/7425.php LSDP group at Karlsruhe Institute of Technology, Germany]; and the [https://www.weizmann.ac.il/EPS/raveh-rubin/ Dynamical Meteorology Group, Weizmann Institute of Science, Rehovot, Israel]. The data are organised as follows&lt;br /&gt;
&lt;br /&gt;
 ml/        3-hourly data on a regular 0.5 deg latitude-longitude grid, including model-level files and pressure level files (see below)&lt;br /&gt;
 pl/        pressure level data at different resolutions than 0.5x0.5 deg (not yet processed)&lt;br /&gt;
&lt;br /&gt;
Data files are contained in subdirectories for each year and month:&lt;br /&gt;
&lt;br /&gt;
 ml/yyyy/mm/[B|H|P|Z]yyyymmdd_hh&lt;br /&gt;
&lt;br /&gt;
where yyyy is the year, mm the two-digit month, dd the two-digit day, and hh the two-digit hours, and Bxxx, Hxxx, Pxxx, Zxxx are different file types, as described in the table below.&lt;br /&gt;
&lt;br /&gt;
Until now, the years 1999-2018 have been retrieved, the period will successively be extended back to 1979, and forward in time.&lt;br /&gt;
&lt;br /&gt;
The data files contain the following variables:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;6&amp;quot;|ERA5 data files&lt;br /&gt;
|-&lt;br /&gt;
|File name&lt;br /&gt;
|colspan=&amp;quot;2&amp;quot;|Pyyyymmdd_hh&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot;|Zyyyymmdd_hh&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot;|Hyyyymmdd_hh&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot;|Byyyymmdd_hh&lt;br /&gt;
|-&lt;br /&gt;
|Leveltype&lt;br /&gt;
|Model level&lt;br /&gt;
|Surface&lt;br /&gt;
|Pressure&lt;br /&gt;
|Pressure&lt;br /&gt;
|Surface&lt;br /&gt;
|-&lt;br /&gt;
|Variables&lt;br /&gt;
|T, Q, U, V, OMEGA, LWC, IWC, RWC, SWC&lt;br /&gt;
|LSP, CP, SF, SSHF, SLHF, BLH, TCC, U10M, V10M, MSL, PS, SSTK&lt;br /&gt;
|Z, T, Q, U, V&lt;br /&gt;
|Z&lt;br /&gt;
|PS, MSL, TCC, U10M, V10M, SSTK, CI, D2M, T2M, TCW, TCWV, VIWVD, E, MN2T, MX2T, SI, TTR, TTRC, WG10, LSP, CP, SF, SSHF, SLHF, BLH&lt;br /&gt;
|-&lt;br /&gt;
|Levels&lt;br /&gt;
|40-137&lt;br /&gt;
| -&lt;br /&gt;
|900, 850, 800, 700, 600, 500, 400, 300, 250, 200, 100 hPa&lt;br /&gt;
|1000, 975, 950, 925, 900, 875, 850, 825, 800, 775, 750, 700, 650, 600, 550, 500, 450, 400, 350, 300, 250, 225, 200, 175, 150, 125, 100, 70, 50, 30, 20, 10, 70, 5, 3, 2, 1 hPa&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
|Times available&lt;br /&gt;
|colspan=&amp;quot;5&amp;quot;|00, 03, 06, 09, 12, 15, 18, 21 UTC&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that the variables LSP, CP, SF, SSHF, SLHF, and BLH are derived as prognostic variables from the short-range forecast. Data valid at 00, 03, 06, 09 UTC are 06, 09, 12, 15 h forecast of the 18 UTC forecast of the previous day. Accordingly, data valid at 12, 15, 18, 21 UTC are 06, 09, 12, 15 h forecast of the 06 UTC forecast. The prognostic variables are accumulated over the previous 1 h.&lt;br /&gt;
&lt;br /&gt;
Please see [https://confluence.ecmwf.int//display/CKB/ERA5+data+documentation#ERA5datadocumentation-Parameterlistings ECMWF ERA5 data documentation] for parameter abbreviations.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conditions of use:&#039;&#039;&#039; When using the ERA5 data from this archive please make sure to reference &amp;quot;[https://cds.climate.copernicus.eu/cdsapp#!/home Copernicus Climate Change Service (C3S) (2017): ERA5: Fifth generation of ECMWF atmospheric reanalyses of the global climate. Copernicus Climate Change Service Climate Data Store (CDS)], date of citation&amp;quot; and acknowledge &amp;quot;ECMWF for providing ERA-5 data“. Also, please acknowledge &amp;quot;Michael Sprenger (ETH Zurich)“ for the support in providing the data.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1385</id>
		<title>FLIIMP - FARLAB liquid water isotope measurements processor</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1385"/>
		<updated>2020-09-18T07:33:43Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Installation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the current code from the [https://git.app.uib.no/farlab-codes/fliimp FLIIMP git repository]&lt;br /&gt;
&lt;br /&gt;
(optional) copy the script FLIIMP.sh to your computer to start FLIIMP with a double click. Path settings need to be adjusted to your computer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running interactively&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A. run the script &lt;br /&gt;
&lt;br /&gt;
 FLIIMP.m &lt;br /&gt;
&lt;br /&gt;
with matlab&lt;br /&gt;
&lt;br /&gt;
-or-&lt;br /&gt;
&lt;br /&gt;
B. double-click the script &lt;br /&gt;
&lt;br /&gt;
 FLIIMP.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running in batch mode&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
edit the file &lt;br /&gt;
&lt;br /&gt;
 batch_FLIIMP_example.m &lt;br /&gt;
&lt;br /&gt;
to process a set of files. The example is using calls to the routine  FLIIMP_batch.m&lt;br /&gt;
&lt;br /&gt;
For further details, see the comments within the files.&lt;br /&gt;
&lt;br /&gt;
== Detailed user instructions: ==&lt;br /&gt;
&lt;br /&gt;
[https://vimeo.com/450466002 Watch the video walk-through here]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USING FLIIMP:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
FLIIMP has 3 windows, that have to be completed in a fixed sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Path settings, instrument and time&#039;&#039;&#039;&lt;br /&gt;
￼&lt;br /&gt;
FLIIMP reads in the injection files from an instrument for a particular time, time range, or day. The Input file path for all injection files is specified in the first entry field.&lt;br /&gt;
&lt;br /&gt;
FLIIMP creates a report on the calibrated data in HTML format within a new subfolder. The base output file path where the new output folder will be created is specified in the second entry field.&lt;br /&gt;
&lt;br /&gt;
The instrument on which the liquid samples were measured is chosen from the pulldown list &amp;quot;Instrument&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Next, either a time range or specific files are selected. If choosing time range, only a date in format YYYYMMDD_HHMMSS needs to be given. If a range is given, all files that fall within the time period will be loaded. If only one date is given, either all files from that day (YYYYMMDD) or if a specific date with HHMMSS is given, that specific time will be looked for. The search path for files is combined from the input file path, the instrument, and the time range, for example&lt;br /&gt;
&lt;br /&gt;
 HKDS2038/IsotopeData/HKDS2038_IsoWater_20180912_120312.csv&lt;br /&gt;
&lt;br /&gt;
At any point, the settings can be saved to a .mat file, or loaded from a previous run. The settings are saved and loaded across all three steps of the calibration, not for each step separately.&lt;br /&gt;
&lt;br /&gt;
The button &amp;quot;Next &amp;gt;&amp;quot; advances to the second step. After clicking, please check the matlab command window for error messages or warnings.&lt;br /&gt;
&lt;br /&gt;
Path settings are saved automatically to the file &amp;quot;FLIIMP_settings.mat&amp;quot; in the local directory where FLIIMP.m is located.&lt;br /&gt;
&lt;br /&gt;
![FLiiMP_1](uploads/965cac19a14e7a9464ca2682c80fc74c/FLiiMP_1.png)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Sample screening and selection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the second step, the data files for the selected period are loaded, and displayed for screening and selection. The table shows each identified sample by its &amp;quot;Identifier 1&amp;quot; value, them mean H2O concentration (in ppmv), and the standard deviation based on all samples.&lt;br /&gt;
&lt;br /&gt;
The figure panels to the right show box-and-whisker plots of H2O vs. Injection number (top) and a selected isotope parameter from the Parameter drop-down below vs. Injection nr.&lt;br /&gt;
&lt;br /&gt;
Clicking on a list item will display the injections of a sample. Using the checkmark &amp;quot;Exclude sample from processing&amp;quot; it is possible to disregard the currently selected sample from analysis. When the tickbox is checked, a &amp;quot;X&amp;quot; will appear in the list in front of an excluded sample.&lt;br /&gt;
&lt;br /&gt;
Using the buttons &amp;quot;Exclude all&amp;quot; and &amp;quot;Include all&amp;quot;, it is possible to set all samples in the list as excluded/included.&lt;br /&gt;
&lt;br /&gt;
In the Injections line below, it is possible to exclude specific injections from the processing. If no sample is to be excluded, a value &amp;quot;-1&amp;quot; is displayed in the text entry box. To exclude injections 3 and 4 of the current sample, enter 3 and 4 separated by a space character in the input box. After choosing a different sample in the list, and combing back to the sample with excluded injections, these will be marked in red in the graphic display panels. &lt;br /&gt;
&lt;br /&gt;
Manually excluded samples and injections are listed in the FLIIMP report in the section &amp;quot;Pre-processing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
![FLIIMP_2](uploads/0e50e2fd3cdb0e030f09cdf006fa2739/FLIIMP_2.png)￼&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Run parameters and calibration settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the third step, the run parameters and calibration settings are entered. Each FARLAB project has a unique id that is entered in the first input field. The accounting can either be internal, collaborator, or external, which will influence the analysis cost (not considered in the report at present).&lt;br /&gt;
&lt;br /&gt;
The report date defaults to the current date (format YYYYMMDD), but can be set to any other date. This date will be appended to the output directory name. The checkbox &amp;quot;Detailed report&amp;quot; determines whether additional analysis information is included in the report. For normal customers that are not part of FARLAB, the checkbox &amp;quot;Detailed report&amp;quot; should not be checked, as FARLAB-internal information about the instruments and processing are included in the detailed report.&lt;br /&gt;
&lt;br /&gt;
Often, a project contains several runs/batches. The serial number or identifier of a run is entered in the field &amp;quot;Run ID&amp;quot; (for example &amp;quot;run01&amp;quot; and so on).&lt;br /&gt;
&lt;br /&gt;
The next two lines should contain a name and email of the customer, and of the operator at FARLAB who can be contacted by the customer in case of questions.&lt;br /&gt;
&lt;br /&gt;
Processing at FARLAB is based on local laboratory standards, that were calibrated on the VSMOW2-SLAP2 scale at several instances. The most current instance (run 3) is the default setting, for comparison purposes an older calibration run of the lab standards may be chosen. The delta values of the calibration standards are included in the report.&lt;br /&gt;
&lt;br /&gt;
The calibration type can be either 1-point or 2-point linear. The third option, 3-point is not yet implemented. Using 1-point will use an average of the standard measurements in the beginning and end of a run. Using 2-point linear will linearly interpolate between the standard measurements in the beginning and end of a run. The option 2-point linear is recommended.&lt;br /&gt;
&lt;br /&gt;
The input field &amp;quot;Calibration standards&amp;quot; should contain the chosen pair of calibration standards for slope and offset calibration. The first standard will be the offset correction, the first and second will be used in the slope correction. Standard names should appear as they are listed in the table visible in step 2. If more than 2 standards were measured, that are not used in the calibration, these names should be listed after the first two standards. If not included here, additional standard measurements will be treated as samples. &lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Drift standard&amp;quot; contains the name of a standard that was repeatedly measured during the run but not used in calibration. It is displayed in a separate section in the report. The fields &amp;quot;Calibration standards&amp;quot; and &amp;quot;Drift standard&amp;quot; must not be empty. If no drift standard was in included in a run, use one of the calibration standards here.&lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Averaging injections&amp;quot; sets how many of the last injections will be used in the averaging step. A number of 3 or 4 is currently recommended (without memory correction). The checkbox &amp;quot;include 17-O excess&amp;quot; needs to be checked for runs that are intended for 17-O excess analysis.&lt;br /&gt;
&lt;br /&gt;
Pressing the button &amp;quot;Calibrate&amp;quot; that will start to produce the output report in HTML format. Watch the matlab command line window for progress, error messages and warnings.&lt;br /&gt;
&lt;br /&gt;
Remember, settings across all three steps can be saved and loaded at any time using the buttons &amp;quot;Save&amp;quot; and &amp;quot;Load&amp;quot;.&lt;br /&gt;
￼&lt;br /&gt;
![FLIIMP_3](uploads/68266f681b7e2f2f21789771bcee76bc/FLIIMP_3.png)&lt;br /&gt;
&lt;br /&gt;
==Detailed description of calibration procedure==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Identification of standards&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Calibration standards&lt;br /&gt;
&lt;br /&gt;
- Drift standards&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Calibration&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Using IAEA procedures&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Instrument characteristics&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Cavity temperature, cavity pressure, warm-box temperature, DAS temperature&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. Quality flags&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Humidity variation&lt;br /&gt;
&lt;br /&gt;
- Isotope variation&lt;br /&gt;
&lt;br /&gt;
- Temperature variation&lt;br /&gt;
&lt;br /&gt;
- Quality flags&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. Sample report&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reference&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
IAEA, 20xx&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1384</id>
		<title>FLIIMP - FARLAB liquid water isotope measurements processor</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1384"/>
		<updated>2020-09-18T07:32:45Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==FLIIMP - FARLAB Liquid Injection Isotope Measurement Processor==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Installation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the current code from the [https://git.app.uib.no/farlab-codes/fliimp FLIIMP git repository]&lt;br /&gt;
&lt;br /&gt;
(optional) copy the script FLIIMP.sh to your computer to start FLIIMP with a double click. Path settings need to be adjusted to your computer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running interactively&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A. run the script &lt;br /&gt;
&lt;br /&gt;
 FLIIMP.m &lt;br /&gt;
&lt;br /&gt;
with matlab&lt;br /&gt;
&lt;br /&gt;
-or-&lt;br /&gt;
&lt;br /&gt;
B. double-click the script &lt;br /&gt;
&lt;br /&gt;
 FLIIMP.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running in batch mode&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
edit the file &lt;br /&gt;
&lt;br /&gt;
 batch_FLIIMP_example.m &lt;br /&gt;
&lt;br /&gt;
to process a set of files. The example is using calls to the routine  FLIIMP_batch.m&lt;br /&gt;
&lt;br /&gt;
For further details, see the comments within the files.&lt;br /&gt;
&lt;br /&gt;
== Detailed user instructions: ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USING FLIIMP:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
FLIIMP has 3 windows, that have to be completed in a fixed sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Path settings, instrument and time&#039;&#039;&#039;&lt;br /&gt;
￼&lt;br /&gt;
FLIIMP reads in the injection files from an instrument for a particular time, time range, or day. The Input file path for all injection files is specified in the first entry field.&lt;br /&gt;
&lt;br /&gt;
FLIIMP creates a report on the calibrated data in HTML format within a new subfolder. The base output file path where the new output folder will be created is specified in the second entry field.&lt;br /&gt;
&lt;br /&gt;
The instrument on which the liquid samples were measured is chosen from the pulldown list &amp;quot;Instrument&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Next, either a time range or specific files are selected. If choosing time range, only a date in format YYYYMMDD_HHMMSS needs to be given. If a range is given, all files that fall within the time period will be loaded. If only one date is given, either all files from that day (YYYYMMDD) or if a specific date with HHMMSS is given, that specific time will be looked for. The search path for files is combined from the input file path, the instrument, and the time range, for example&lt;br /&gt;
&lt;br /&gt;
 HKDS2038/IsotopeData/HKDS2038_IsoWater_20180912_120312.csv&lt;br /&gt;
&lt;br /&gt;
At any point, the settings can be saved to a .mat file, or loaded from a previous run. The settings are saved and loaded across all three steps of the calibration, not for each step separately.&lt;br /&gt;
&lt;br /&gt;
The button &amp;quot;Next &amp;gt;&amp;quot; advances to the second step. After clicking, please check the matlab command window for error messages or warnings.&lt;br /&gt;
&lt;br /&gt;
Path settings are saved automatically to the file &amp;quot;FLIIMP_settings.mat&amp;quot; in the local directory where FLIIMP.m is located.&lt;br /&gt;
&lt;br /&gt;
![FLiiMP_1](uploads/965cac19a14e7a9464ca2682c80fc74c/FLiiMP_1.png)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Sample screening and selection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the second step, the data files for the selected period are loaded, and displayed for screening and selection. The table shows each identified sample by its &amp;quot;Identifier 1&amp;quot; value, them mean H2O concentration (in ppmv), and the standard deviation based on all samples.&lt;br /&gt;
&lt;br /&gt;
The figure panels to the right show box-and-whisker plots of H2O vs. Injection number (top) and a selected isotope parameter from the Parameter drop-down below vs. Injection nr.&lt;br /&gt;
&lt;br /&gt;
Clicking on a list item will display the injections of a sample. Using the checkmark &amp;quot;Exclude sample from processing&amp;quot; it is possible to disregard the currently selected sample from analysis. When the tickbox is checked, a &amp;quot;X&amp;quot; will appear in the list in front of an excluded sample.&lt;br /&gt;
&lt;br /&gt;
Using the buttons &amp;quot;Exclude all&amp;quot; and &amp;quot;Include all&amp;quot;, it is possible to set all samples in the list as excluded/included.&lt;br /&gt;
&lt;br /&gt;
In the Injections line below, it is possible to exclude specific injections from the processing. If no sample is to be excluded, a value &amp;quot;-1&amp;quot; is displayed in the text entry box. To exclude injections 3 and 4 of the current sample, enter 3 and 4 separated by a space character in the input box. After choosing a different sample in the list, and combing back to the sample with excluded injections, these will be marked in red in the graphic display panels. &lt;br /&gt;
&lt;br /&gt;
Manually excluded samples and injections are listed in the FLIIMP report in the section &amp;quot;Pre-processing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
![FLIIMP_2](uploads/0e50e2fd3cdb0e030f09cdf006fa2739/FLIIMP_2.png)￼&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Run parameters and calibration settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the third step, the run parameters and calibration settings are entered. Each FARLAB project has a unique id that is entered in the first input field. The accounting can either be internal, collaborator, or external, which will influence the analysis cost (not considered in the report at present).&lt;br /&gt;
&lt;br /&gt;
The report date defaults to the current date (format YYYYMMDD), but can be set to any other date. This date will be appended to the output directory name. The checkbox &amp;quot;Detailed report&amp;quot; determines whether additional analysis information is included in the report. For normal customers that are not part of FARLAB, the checkbox &amp;quot;Detailed report&amp;quot; should not be checked, as FARLAB-internal information about the instruments and processing are included in the detailed report.&lt;br /&gt;
&lt;br /&gt;
Often, a project contains several runs/batches. The serial number or identifier of a run is entered in the field &amp;quot;Run ID&amp;quot; (for example &amp;quot;run01&amp;quot; and so on).&lt;br /&gt;
&lt;br /&gt;
The next two lines should contain a name and email of the customer, and of the operator at FARLAB who can be contacted by the customer in case of questions.&lt;br /&gt;
&lt;br /&gt;
Processing at FARLAB is based on local laboratory standards, that were calibrated on the VSMOW2-SLAP2 scale at several instances. The most current instance (run 3) is the default setting, for comparison purposes an older calibration run of the lab standards may be chosen. The delta values of the calibration standards are included in the report.&lt;br /&gt;
&lt;br /&gt;
The calibration type can be either 1-point or 2-point linear. The third option, 3-point is not yet implemented. Using 1-point will use an average of the standard measurements in the beginning and end of a run. Using 2-point linear will linearly interpolate between the standard measurements in the beginning and end of a run. The option 2-point linear is recommended.&lt;br /&gt;
&lt;br /&gt;
The input field &amp;quot;Calibration standards&amp;quot; should contain the chosen pair of calibration standards for slope and offset calibration. The first standard will be the offset correction, the first and second will be used in the slope correction. Standard names should appear as they are listed in the table visible in step 2. If more than 2 standards were measured, that are not used in the calibration, these names should be listed after the first two standards. If not included here, additional standard measurements will be treated as samples. &lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Drift standard&amp;quot; contains the name of a standard that was repeatedly measured during the run but not used in calibration. It is displayed in a separate section in the report. The fields &amp;quot;Calibration standards&amp;quot; and &amp;quot;Drift standard&amp;quot; must not be empty. If no drift standard was in included in a run, use one of the calibration standards here.&lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Averaging injections&amp;quot; sets how many of the last injections will be used in the averaging step. A number of 3 or 4 is currently recommended (without memory correction). The checkbox &amp;quot;include 17-O excess&amp;quot; needs to be checked for runs that are intended for 17-O excess analysis.&lt;br /&gt;
&lt;br /&gt;
Pressing the button &amp;quot;Calibrate&amp;quot; that will start to produce the output report in HTML format. Watch the matlab command line window for progress, error messages and warnings.&lt;br /&gt;
&lt;br /&gt;
Remember, settings across all three steps can be saved and loaded at any time using the buttons &amp;quot;Save&amp;quot; and &amp;quot;Load&amp;quot;.&lt;br /&gt;
￼&lt;br /&gt;
![FLIIMP_3](uploads/68266f681b7e2f2f21789771bcee76bc/FLIIMP_3.png)&lt;br /&gt;
&lt;br /&gt;
==Detailed description of calibration procedure==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Identification of standards&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Calibration standards&lt;br /&gt;
&lt;br /&gt;
- Drift standards&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Calibration&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Using IAEA procedures&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Instrument characteristics&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Cavity temperature, cavity pressure, warm-box temperature, DAS temperature&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. Quality flags&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Humidity variation&lt;br /&gt;
&lt;br /&gt;
- Isotope variation&lt;br /&gt;
&lt;br /&gt;
- Temperature variation&lt;br /&gt;
&lt;br /&gt;
- Quality flags&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. Sample report&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reference&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
IAEA, 20xx&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1383</id>
		<title>FLIIMP - FARLAB liquid water isotope measurements processor</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1383"/>
		<updated>2020-09-18T07:32:04Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==FLIIMP - FARLAB Liquid Injection Isotope Measurement Processor==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Installation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the current code from the [https://git.app.uib.no/farlab-codes/fliimp FLIIMP git repository]&lt;br /&gt;
&lt;br /&gt;
(optional) copy the script FLIIMP.sh to your computer to start FLIIMP with a double click. Path settings need to be adjusted to your computer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running interactively&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A. run the script FLIIMP.m with matlab&lt;br /&gt;
&lt;br /&gt;
-or-&lt;br /&gt;
&lt;br /&gt;
B. double-click the script FLIIMP.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Running in batch mode&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
edit the file &lt;br /&gt;
&lt;br /&gt;
 batch_FLIIMP_example.m &lt;br /&gt;
&lt;br /&gt;
to process a set of files. The example is using calls to the routine  FLIIMP_batch.m&lt;br /&gt;
&lt;br /&gt;
For further details, see the comments within the files.&lt;br /&gt;
&lt;br /&gt;
== Detailed user instructions: ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USING FLIIMP:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
FLIIMP has 3 windows, that have to be completed in a fixed sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Path settings, instrument and time&#039;&#039;&#039;&lt;br /&gt;
￼&lt;br /&gt;
FLIIMP reads in the injection files from an instrument for a particular time, time range, or day. The Input file path for all injection files is specified in the first entry field.&lt;br /&gt;
&lt;br /&gt;
FLIIMP creates a report on the calibrated data in HTML format within a new subfolder. The base output file path where the new output folder will be created is specified in the second entry field.&lt;br /&gt;
&lt;br /&gt;
The instrument on which the liquid samples were measured is chosen from the pulldown list &amp;quot;Instrument&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Next, either a time range or specific files are selected. If choosing time range, only a date in format YYYYMMDD_HHMMSS needs to be given. If a range is given, all files that fall within the time period will be loaded. If only one date is given, either all files from that day (YYYYMMDD) or if a specific date with HHMMSS is given, that specific time will be looked for. The search path for files is combined from the input file path, the instrument, and the time range, for example&lt;br /&gt;
&lt;br /&gt;
 HKDS2038/IsotopeData/HKDS2038_IsoWater_20180912_120312.csv&lt;br /&gt;
&lt;br /&gt;
At any point, the settings can be saved to a .mat file, or loaded from a previous run. The settings are saved and loaded across all three steps of the calibration, not for each step separately.&lt;br /&gt;
&lt;br /&gt;
The button &amp;quot;Next &amp;gt;&amp;quot; advances to the second step. After clicking, please check the matlab command window for error messages or warnings.&lt;br /&gt;
&lt;br /&gt;
Path settings are saved automatically to the file &amp;quot;FLIIMP_settings.mat&amp;quot; in the local directory where FLIIMP.m is located.&lt;br /&gt;
&lt;br /&gt;
![FLiiMP_1](uploads/965cac19a14e7a9464ca2682c80fc74c/FLiiMP_1.png)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Sample screening and selection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the second step, the data files for the selected period are loaded, and displayed for screening and selection. The table shows each identified sample by its &amp;quot;Identifier 1&amp;quot; value, them mean H2O concentration (in ppmv), and the standard deviation based on all samples.&lt;br /&gt;
&lt;br /&gt;
The figure panels to the right show box-and-whisker plots of H2O vs. Injection number (top) and a selected isotope parameter from the Parameter drop-down below vs. Injection nr.&lt;br /&gt;
&lt;br /&gt;
Clicking on a list item will display the injections of a sample. Using the checkmark &amp;quot;Exclude sample from processing&amp;quot; it is possible to disregard the currently selected sample from analysis. When the tickbox is checked, a &amp;quot;X&amp;quot; will appear in the list in front of an excluded sample.&lt;br /&gt;
&lt;br /&gt;
Using the buttons &amp;quot;Exclude all&amp;quot; and &amp;quot;Include all&amp;quot;, it is possible to set all samples in the list as excluded/included.&lt;br /&gt;
&lt;br /&gt;
In the Injections line below, it is possible to exclude specific injections from the processing. If no sample is to be excluded, a value &amp;quot;-1&amp;quot; is displayed in the text entry box. To exclude injections 3 and 4 of the current sample, enter 3 and 4 separated by a space character in the input box. After choosing a different sample in the list, and combing back to the sample with excluded injections, these will be marked in red in the graphic display panels. &lt;br /&gt;
&lt;br /&gt;
Manually excluded samples and injections are listed in the FLIIMP report in the section &amp;quot;Pre-processing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
![FLIIMP_2](uploads/0e50e2fd3cdb0e030f09cdf006fa2739/FLIIMP_2.png)￼&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Run parameters and calibration settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the third step, the run parameters and calibration settings are entered. Each FARLAB project has a unique id that is entered in the first input field. The accounting can either be internal, collaborator, or external, which will influence the analysis cost (not considered in the report at present).&lt;br /&gt;
&lt;br /&gt;
The report date defaults to the current date (format YYYYMMDD), but can be set to any other date. This date will be appended to the output directory name. The checkbox &amp;quot;Detailed report&amp;quot; determines whether additional analysis information is included in the report. For normal customers that are not part of FARLAB, the checkbox &amp;quot;Detailed report&amp;quot; should not be checked, as FARLAB-internal information about the instruments and processing are included in the detailed report.&lt;br /&gt;
&lt;br /&gt;
Often, a project contains several runs/batches. The serial number or identifier of a run is entered in the field &amp;quot;Run ID&amp;quot; (for example &amp;quot;run01&amp;quot; and so on).&lt;br /&gt;
&lt;br /&gt;
The next two lines should contain a name and email of the customer, and of the operator at FARLAB who can be contacted by the customer in case of questions.&lt;br /&gt;
&lt;br /&gt;
Processing at FARLAB is based on local laboratory standards, that were calibrated on the VSMOW2-SLAP2 scale at several instances. The most current instance (run 3) is the default setting, for comparison purposes an older calibration run of the lab standards may be chosen. The delta values of the calibration standards are included in the report.&lt;br /&gt;
&lt;br /&gt;
The calibration type can be either 1-point or 2-point linear. The third option, 3-point is not yet implemented. Using 1-point will use an average of the standard measurements in the beginning and end of a run. Using 2-point linear will linearly interpolate between the standard measurements in the beginning and end of a run. The option 2-point linear is recommended.&lt;br /&gt;
&lt;br /&gt;
The input field &amp;quot;Calibration standards&amp;quot; should contain the chosen pair of calibration standards for slope and offset calibration. The first standard will be the offset correction, the first and second will be used in the slope correction. Standard names should appear as they are listed in the table visible in step 2. If more than 2 standards were measured, that are not used in the calibration, these names should be listed after the first two standards. If not included here, additional standard measurements will be treated as samples. &lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Drift standard&amp;quot; contains the name of a standard that was repeatedly measured during the run but not used in calibration. It is displayed in a separate section in the report. The fields &amp;quot;Calibration standards&amp;quot; and &amp;quot;Drift standard&amp;quot; must not be empty. If no drift standard was in included in a run, use one of the calibration standards here.&lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Averaging injections&amp;quot; sets how many of the last injections will be used in the averaging step. A number of 3 or 4 is currently recommended (without memory correction). The checkbox &amp;quot;include 17-O excess&amp;quot; needs to be checked for runs that are intended for 17-O excess analysis.&lt;br /&gt;
&lt;br /&gt;
Pressing the button &amp;quot;Calibrate&amp;quot; that will start to produce the output report in HTML format. Watch the matlab command line window for progress, error messages and warnings.&lt;br /&gt;
&lt;br /&gt;
Remember, settings across all three steps can be saved and loaded at any time using the buttons &amp;quot;Save&amp;quot; and &amp;quot;Load&amp;quot;.&lt;br /&gt;
￼&lt;br /&gt;
![FLIIMP_3](uploads/68266f681b7e2f2f21789771bcee76bc/FLIIMP_3.png)&lt;br /&gt;
&lt;br /&gt;
==Detailed description of calibration procedure==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Identification of standards&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Calibration standards&lt;br /&gt;
&lt;br /&gt;
- Drift standards&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Calibration&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Using IAEA procedures&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Instrument characteristics&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Cavity temperature, cavity pressure, warm-box temperature, DAS temperature&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. Quality flags&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Humidity variation&lt;br /&gt;
&lt;br /&gt;
- Isotope variation&lt;br /&gt;
&lt;br /&gt;
- Temperature variation&lt;br /&gt;
&lt;br /&gt;
- Quality flags&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. Sample report&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reference&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
IAEA, 20xx&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1382</id>
		<title>FLIIMP - FARLAB liquid water isotope measurements processor</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1382"/>
		<updated>2020-09-18T07:24:51Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;FLIIMP - FARLAB Liquid Injection Isotope Measurement Processor&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the current code from the [https://git.app.uib.no/farlab-codes/fliimp FLIIMP git repository]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USING FLIIMP:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
FLIIMP has 3 windows, that have to be completed in a fixed sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Path settings, instrument and time&#039;&#039;&#039;&lt;br /&gt;
￼&lt;br /&gt;
FLIIMP reads in the injection files from an instrument for a particular time, time range, or day. The Input file path for all injection files is specified in the first entry field.&lt;br /&gt;
&lt;br /&gt;
FLIIMP creates a report on the calibrated data in HTML format within a new subfolder. The base output file path where the new output folder will be created is specified in the second entry field.&lt;br /&gt;
&lt;br /&gt;
The instrument on which the liquid samples were measured is chosen from the pulldown list &amp;quot;Instrument&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Next, either a time range or specific files are selected. If choosing time range, only a date in format YYYYMMDD_HHMMSS needs to be given. If a range is given, all files that fall within the time period will be loaded. If only one date is given, either all files from that day (YYYYMMDD) or if a specific date with HHMMSS is given, that specific time will be looked for. The search path for files is combined from the input file path, the instrument, and the time range, for example&lt;br /&gt;
&lt;br /&gt;
 HKDS2038/IsotopeData/HKDS2038_IsoWater_20180912_120312.csv&lt;br /&gt;
&lt;br /&gt;
At any point, the settings can be saved to a .mat file, or loaded from a previous run. The settings are saved and loaded across all three steps of the calibration, not for each step separately.&lt;br /&gt;
&lt;br /&gt;
The button &amp;quot;Next &amp;gt;&amp;quot; advances to the second step. After clicking, please check the matlab command window for error messages or warnings.&lt;br /&gt;
&lt;br /&gt;
Path settings are saved automatically to the file &amp;quot;FLIIMP_settings.mat&amp;quot; in the local directory where FLIIMP.m is located.&lt;br /&gt;
&lt;br /&gt;
![FLiiMP_1](uploads/965cac19a14e7a9464ca2682c80fc74c/FLiiMP_1.png)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Sample screening and selection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the second step, the data files for the selected period are loaded, and displayed for screening and selection. The table shows each identified sample by its &amp;quot;Identifier 1&amp;quot; value, them mean H2O concentration (in ppmv), and the standard deviation based on all samples.&lt;br /&gt;
&lt;br /&gt;
The figure panels to the right show box-and-whisker plots of H2O vs. Injection number (top) and a selected isotope parameter from the Parameter drop-down below vs. Injection nr.&lt;br /&gt;
&lt;br /&gt;
Clicking on a list item will display the injections of a sample. Using the checkmark &amp;quot;Exclude sample from processing&amp;quot; it is possible to disregard the currently selected sample from analysis. When the tickbox is checked, a &amp;quot;X&amp;quot; will appear in the list in front of an excluded sample.&lt;br /&gt;
&lt;br /&gt;
Using the buttons &amp;quot;Exclude all&amp;quot; and &amp;quot;Include all&amp;quot;, it is possible to set all samples in the list as excluded/included.&lt;br /&gt;
&lt;br /&gt;
In the Injections line below, it is possible to exclude specific injections from the processing. If no sample is to be excluded, a value &amp;quot;-1&amp;quot; is displayed in the text entry box. To exclude injections 3 and 4 of the current sample, enter 3 and 4 separated by a space character in the input box. After choosing a different sample in the list, and combing back to the sample with excluded injections, these will be marked in red in the graphic display panels. &lt;br /&gt;
&lt;br /&gt;
Manually excluded samples and injections are listed in the FLIIMP report in the section &amp;quot;Pre-processing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
![FLIIMP_2](uploads/0e50e2fd3cdb0e030f09cdf006fa2739/FLIIMP_2.png)￼&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Run parameters and calibration settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the third step, the run parameters and calibration settings are entered. Each FARLAB project has a unique id that is entered in the first input field. The accounting can either be internal, collaborator, or external, which will influence the analysis cost (not considered in the report at present).&lt;br /&gt;
&lt;br /&gt;
The report date defaults to the current date (format YYYYMMDD), but can be set to any other date. This date will be appended to the output directory name. The checkbox &amp;quot;Detailed report&amp;quot; determines whether additional analysis information is included in the report. For normal customers that are not part of FARLAB, the checkbox &amp;quot;Detailed report&amp;quot; should not be checked, as FARLAB-internal information about the instruments and processing are included in the detailed report.&lt;br /&gt;
&lt;br /&gt;
Often, a project contains several runs/batches. The serial number or identifier of a run is entered in the field &amp;quot;Run ID&amp;quot; (for example &amp;quot;run01&amp;quot; and so on).&lt;br /&gt;
&lt;br /&gt;
The next two lines should contain a name and email of the customer, and of the operator at FARLAB who can be contacted by the customer in case of questions.&lt;br /&gt;
&lt;br /&gt;
Processing at FARLAB is based on local laboratory standards, that were calibrated on the VSMOW2-SLAP2 scale at several instances. The most current instance (run 3) is the default setting, for comparison purposes an older calibration run of the lab standards may be chosen. The delta values of the calibration standards are included in the report.&lt;br /&gt;
&lt;br /&gt;
The calibration type can be either 1-point or 2-point linear. The third option, 3-point is not yet implemented. Using 1-point will use an average of the standard measurements in the beginning and end of a run. Using 2-point linear will linearly interpolate between the standard measurements in the beginning and end of a run. The option 2-point linear is recommended.&lt;br /&gt;
&lt;br /&gt;
The input field &amp;quot;Calibration standards&amp;quot; should contain the chosen pair of calibration standards for slope and offset calibration. The first standard will be the offset correction, the first and second will be used in the slope correction. Standard names should appear as they are listed in the table visible in step 2. If more than 2 standards were measured, that are not used in the calibration, these names should be listed after the first two standards. If not included here, additional standard measurements will be treated as samples. &lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Drift standard&amp;quot; contains the name of a standard that was repeatedly measured during the run but not used in calibration. It is displayed in a separate section in the report. The fields &amp;quot;Calibration standards&amp;quot; and &amp;quot;Drift standard&amp;quot; must not be empty. If no drift standard was in included in a run, use one of the calibration standards here.&lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Averaging injections&amp;quot; sets how many of the last injections will be used in the averaging step. A number of 3 or 4 is currently recommended (without memory correction). The checkbox &amp;quot;include 17-O excess&amp;quot; needs to be checked for runs that are intended for 17-O excess analysis.&lt;br /&gt;
&lt;br /&gt;
Pressing the button &amp;quot;Calibrate&amp;quot; that will start to produce the output report in HTML format. Watch the matlab command line window for progress, error messages and warnings.&lt;br /&gt;
&lt;br /&gt;
Remember, settings across all three steps can be saved and loaded at any time using the buttons &amp;quot;Save&amp;quot; and &amp;quot;Load&amp;quot;.&lt;br /&gt;
￼&lt;br /&gt;
![FLIIMP_3](uploads/68266f681b7e2f2f21789771bcee76bc/FLIIMP_3.png)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Detailed description of calibration procedure&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Identification of standards&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Calibration standards&lt;br /&gt;
&lt;br /&gt;
- Drift standards&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Calibration&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Using IAEA procedures&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Instrument characteristics&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Cavity temperature, cavity pressure, warm-box temperature, DAS temperature&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. Quality flags&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Humidity variation&lt;br /&gt;
&lt;br /&gt;
- Isotope variation&lt;br /&gt;
&lt;br /&gt;
- Temperature variation&lt;br /&gt;
&lt;br /&gt;
- Quality flags&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. Sample report&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reference&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
IAEA, 20xx&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1381</id>
		<title>FLIIMP - FARLAB liquid water isotope measurements processor</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1381"/>
		<updated>2020-09-18T07:23:22Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;# FLIIMP - FARLAB Liquid Injection Isotope Measurement Processor&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USING FLIIMP:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
FLIIMP has 3 windows, that have to be completed in a fixed sequence.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Path settings, instrument and time&#039;&#039;&#039;&lt;br /&gt;
￼&lt;br /&gt;
FLIIMP reads in the injection files from an instrument for a particular time, time range, or day. The Input file path for all injection files is specified in the first entry field.&lt;br /&gt;
&lt;br /&gt;
FLIIMP creates a report on the calibrated data in HTML format within a new subfolder. The base output file path where the new output folder will be created is specified in the second entry field.&lt;br /&gt;
&lt;br /&gt;
The instrument on which the liquid samples were measured is chosen from the pulldown list &amp;quot;Instrument&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Next, either a time range or specific files are selected. If choosing time range, only a date in format YYYYMMDD_HHMMSS needs to be given. If a range is given, all files that fall within the time period will be loaded. If only one date is given, either all files from that day (YYYYMMDD) or if a specific date with HHMMSS is given, that specific time will be looked for. The search path for files is combined from the input file path, the instrument, and the time range, for example&lt;br /&gt;
&lt;br /&gt;
 HKDS2038/IsotopeData/HKDS2038_IsoWater_20180912_120312.csv&lt;br /&gt;
&lt;br /&gt;
At any point, the settings can be saved to a .mat file, or loaded from a previous run. The settings are saved and loaded across all three steps of the calibration, not for each step separately.&lt;br /&gt;
&lt;br /&gt;
The button &amp;quot;Next &amp;gt;&amp;quot; advances to the second step. After clicking, please check the matlab command window for error messages or warnings.&lt;br /&gt;
&lt;br /&gt;
Path settings are saved automatically to the file &amp;quot;FLIIMP_settings.mat&amp;quot; in the local directory where FLIIMP.m is located.&lt;br /&gt;
&lt;br /&gt;
![FLiiMP_1](uploads/965cac19a14e7a9464ca2682c80fc74c/FLiiMP_1.png)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Sample screening and selection&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the second step, the data files for the selected period are loaded, and displayed for screening and selection. The table shows each identified sample by its &amp;quot;Identifier 1&amp;quot; value, them mean H2O concentration (in ppmv), and the standard deviation based on all samples.&lt;br /&gt;
&lt;br /&gt;
The figure panels to the right show box-and-whisker plots of H2O vs. Injection number (top) and a selected isotope parameter from the Parameter drop-down below vs. Injection nr.&lt;br /&gt;
&lt;br /&gt;
Clicking on a list item will display the injections of a sample. Using the checkmark &amp;quot;Exclude sample from processing&amp;quot; it is possible to disregard the currently selected sample from analysis. When the tickbox is checked, a &amp;quot;X&amp;quot; will appear in the list in front of an excluded sample.&lt;br /&gt;
&lt;br /&gt;
Using the buttons &amp;quot;Exclude all&amp;quot; and &amp;quot;Include all&amp;quot;, it is possible to set all samples in the list as excluded/included.&lt;br /&gt;
&lt;br /&gt;
In the Injections line below, it is possible to exclude specific injections from the processing. If no sample is to be excluded, a value &amp;quot;-1&amp;quot; is displayed in the text entry box. To exclude injections 3 and 4 of the current sample, enter 3 and 4 separated by a space character in the input box. After choosing a different sample in the list, and combing back to the sample with excluded injections, these will be marked in red in the graphic display panels. &lt;br /&gt;
&lt;br /&gt;
Manually excluded samples and injections are listed in the FLIIMP report in the section &amp;quot;Pre-processing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
![FLIIMP_2](uploads/0e50e2fd3cdb0e030f09cdf006fa2739/FLIIMP_2.png)￼&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Run parameters and calibration settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the third step, the run parameters and calibration settings are entered. Each FARLAB project has a unique id that is entered in the first input field. The accounting can either be internal, collaborator, or external, which will influence the analysis cost (not considered in the report at present).&lt;br /&gt;
&lt;br /&gt;
The report date defaults to the current date (format YYYYMMDD), but can be set to any other date. This date will be appended to the output directory name. The checkbox &amp;quot;Detailed report&amp;quot; determines whether additional analysis information is included in the report. For normal customers that are not part of FARLAB, the checkbox &amp;quot;Detailed report&amp;quot; should not be checked, as FARLAB-internal information about the instruments and processing are included in the detailed report.&lt;br /&gt;
&lt;br /&gt;
Often, a project contains several runs/batches. The serial number or identifier of a run is entered in the field &amp;quot;Run ID&amp;quot; (for example &amp;quot;run01&amp;quot; and so on).&lt;br /&gt;
&lt;br /&gt;
The next two lines should contain a name and email of the customer, and of the operator at FARLAB who can be contacted by the customer in case of questions.&lt;br /&gt;
&lt;br /&gt;
Processing at FARLAB is based on local laboratory standards, that were calibrated on the VSMOW2-SLAP2 scale at several instances. The most current instance (run 3) is the default setting, for comparison purposes an older calibration run of the lab standards may be chosen. The delta values of the calibration standards are included in the report.&lt;br /&gt;
&lt;br /&gt;
The calibration type can be either 1-point or 2-point linear. The third option, 3-point is not yet implemented. Using 1-point will use an average of the standard measurements in the beginning and end of a run. Using 2-point linear will linearly interpolate between the standard measurements in the beginning and end of a run. The option 2-point linear is recommended.&lt;br /&gt;
&lt;br /&gt;
The input field &amp;quot;Calibration standards&amp;quot; should contain the chosen pair of calibration standards for slope and offset calibration. The first standard will be the offset correction, the first and second will be used in the slope correction. Standard names should appear as they are listed in the table visible in step 2. If more than 2 standards were measured, that are not used in the calibration, these names should be listed after the first two standards. If not included here, additional standard measurements will be treated as samples. &lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Drift standard&amp;quot; contains the name of a standard that was repeatedly measured during the run but not used in calibration. It is displayed in a separate section in the report. The fields &amp;quot;Calibration standards&amp;quot; and &amp;quot;Drift standard&amp;quot; must not be empty. If no drift standard was in included in a run, use one of the calibration standards here.&lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Averaging injections&amp;quot; sets how many of the last injections will be used in the averaging step. A number of 3 or 4 is currently recommended (without memory correction). The checkbox &amp;quot;include 17-O excess&amp;quot; needs to be checked for runs that are intended for 17-O excess analysis.&lt;br /&gt;
&lt;br /&gt;
Pressing the button &amp;quot;Calibrate&amp;quot; that will start to produce the output report in HTML format. Watch the matlab command line window for progress, error messages and warnings.&lt;br /&gt;
&lt;br /&gt;
Remember, settings across all three steps can be saved and loaded at any time using the buttons &amp;quot;Save&amp;quot; and &amp;quot;Load&amp;quot;.&lt;br /&gt;
￼&lt;br /&gt;
![FLIIMP_3](uploads/68266f681b7e2f2f21789771bcee76bc/FLIIMP_3.png)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Detailed description of calibration procedure&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Identification of standards&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Calibration standards&lt;br /&gt;
&lt;br /&gt;
- Drift standards&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Calibration&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Using IAEA procedures&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Instrument characteristics&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Cavity temperature, cavity pressure, warm-box temperature, DAS temperature&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. Quality flags&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Humidity variation&lt;br /&gt;
&lt;br /&gt;
- Isotope variation&lt;br /&gt;
&lt;br /&gt;
- Temperature variation&lt;br /&gt;
&lt;br /&gt;
- Quality flags&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5. Sample report&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reference&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
IAEA, 20xx&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1380</id>
		<title>FLIIMP - FARLAB liquid water isotope measurements processor</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=FLIIMP_-_FARLAB_liquid_water_isotope_measurements_processor&amp;diff=1380"/>
		<updated>2020-09-18T07:21:53Z</updated>

		<summary type="html">&lt;p&gt;Hso039: Created page with &amp;quot;# FLIIMP - FARLAB Liquid Injection Isotope Measurement Processor  ## USING FLIIMP:  FLIIMP has 3 windows, that have to be completed in a fixed sequence.  ### 1. Path settings,...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;# FLIIMP - FARLAB Liquid Injection Isotope Measurement Processor&lt;br /&gt;
&lt;br /&gt;
## USING FLIIMP:&lt;br /&gt;
&lt;br /&gt;
FLIIMP has 3 windows, that have to be completed in a fixed sequence.&lt;br /&gt;
&lt;br /&gt;
### 1. Path settings, instrument and time&lt;br /&gt;
￼&lt;br /&gt;
FLIIMP reads in the injection files from an instrument for a particular time, time range, or day. The Input file path for all injection files is specified in the first entry field.&lt;br /&gt;
&lt;br /&gt;
FLIIMP creates a report on the calibrated data in HTML format within a new subfolder. The base output file path where the new output folder will be created is specified in the second entry field.&lt;br /&gt;
&lt;br /&gt;
The instrument on which the liquid samples were measured is chosen from the pulldown list &amp;quot;Instrument&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Next, either a time range or specific files are selected. If choosing time range, only a date in format YYYYMMDD_HHMMSS needs to be given. If a range is given, all files that fall within the time period will be loaded. If only one date is given, either all files from that day (YYYYMMDD) or if a specific date with HHMMSS is given, that specific time will be looked for. The search path for files is combined from the input file path, the instrument, and the time range, for example&lt;br /&gt;
&lt;br /&gt;
 HKDS2038/IsotopeData/HKDS2038_IsoWater_20180912_120312.csv&lt;br /&gt;
&lt;br /&gt;
At any point, the settings can be saved to a .mat file, or loaded from a previous run. The settings are saved and loaded across all three steps of the calibration, not for each step separately.&lt;br /&gt;
&lt;br /&gt;
The button &amp;quot;Next &amp;gt;&amp;quot; advances to the second step. After clicking, please check the matlab command window for error messages or warnings.&lt;br /&gt;
&lt;br /&gt;
Path settings are saved automatically to the file &amp;quot;FLIIMP_settings.mat&amp;quot; in the local directory where FLIIMP.m is located.&lt;br /&gt;
&lt;br /&gt;
![FLiiMP_1](uploads/965cac19a14e7a9464ca2682c80fc74c/FLiiMP_1.png)&lt;br /&gt;
&lt;br /&gt;
### 2. Sample screening and selection&lt;br /&gt;
&lt;br /&gt;
In the second step, the data files for the selected period are loaded, and displayed for screening and selection. The table shows each identified sample by its &amp;quot;Identifier 1&amp;quot; value, them mean H2O concentration (in ppmv), and the standard deviation based on all samples.&lt;br /&gt;
&lt;br /&gt;
The figure panels to the right show box-and-whisker plots of H2O vs. Injection number (top) and a selected isotope parameter from the Parameter drop-down below vs. Injection nr.&lt;br /&gt;
&lt;br /&gt;
Clicking on a list item will display the injections of a sample. Using the checkmark &amp;quot;Exclude sample from processing&amp;quot; it is possible to disregard the currently selected sample from analysis. When the tickbox is checked, a &amp;quot;X&amp;quot; will appear in the list in front of an excluded sample.&lt;br /&gt;
&lt;br /&gt;
Using the buttons &amp;quot;Exclude all&amp;quot; and &amp;quot;Include all&amp;quot;, it is possible to set all samples in the list as excluded/included.&lt;br /&gt;
&lt;br /&gt;
In the Injections line below, it is possible to exclude specific injections from the processing. If no sample is to be excluded, a value &amp;quot;-1&amp;quot; is displayed in the text entry box. To exclude injections 3 and 4 of the current sample, enter 3 and 4 separated by a space character in the input box. After choosing a different sample in the list, and combing back to the sample with excluded injections, these will be marked in red in the graphic display panels. &lt;br /&gt;
&lt;br /&gt;
Manually excluded samples and injections are listed in the FLIIMP report in the section &amp;quot;Pre-processing&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
![FLIIMP_2](uploads/0e50e2fd3cdb0e030f09cdf006fa2739/FLIIMP_2.png)￼&lt;br /&gt;
&lt;br /&gt;
### 3. Run parameters and calibration settings&lt;br /&gt;
&lt;br /&gt;
In the third step, the run parameters and calibration settings are entered. Each FARLAB project has a unique id that is entered in the first input field. The accounting can either be internal, collaborator, or external, which will influence the analysis cost (not considered in the report at present).&lt;br /&gt;
&lt;br /&gt;
The report date defaults to the current date (format YYYYMMDD), but can be set to any other date. This date will be appended to the output directory name. The checkbox &amp;quot;Detailed report&amp;quot; determines whether additional analysis information is included in the report. For normal customers that are not part of FARLAB, the checkbox &amp;quot;Detailed report&amp;quot; should not be checked, as FARLAB-internal information about the instruments and processing are included in the detailed report.&lt;br /&gt;
&lt;br /&gt;
Often, a project contains several runs/batches. The serial number or identifier of a run is entered in the field &amp;quot;Run ID&amp;quot; (for example &amp;quot;run01&amp;quot; and so on).&lt;br /&gt;
&lt;br /&gt;
The next two lines should contain a name and email of the customer, and of the operator at FARLAB who can be contacted by the customer in case of questions.&lt;br /&gt;
&lt;br /&gt;
Processing at FARLAB is based on local laboratory standards, that were calibrated on the VSMOW2-SLAP2 scale at several instances. The most current instance (run 3) is the default setting, for comparison purposes an older calibration run of the lab standards may be chosen. The delta values of the calibration standards are included in the report.&lt;br /&gt;
&lt;br /&gt;
The calibration type can be either 1-point or 2-point linear. The third option, 3-point is not yet implemented. Using 1-point will use an average of the standard measurements in the beginning and end of a run. Using 2-point linear will linearly interpolate between the standard measurements in the beginning and end of a run. The option 2-point linear is recommended.&lt;br /&gt;
&lt;br /&gt;
The input field &amp;quot;Calibration standards&amp;quot; should contain the chosen pair of calibration standards for slope and offset calibration. The first standard will be the offset correction, the first and second will be used in the slope correction. Standard names should appear as they are listed in the table visible in step 2. If more than 2 standards were measured, that are not used in the calibration, these names should be listed after the first two standards. If not included here, additional standard measurements will be treated as samples. &lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Drift standard&amp;quot; contains the name of a standard that was repeatedly measured during the run but not used in calibration. It is displayed in a separate section in the report. The fields &amp;quot;Calibration standards&amp;quot; and &amp;quot;Drift standard&amp;quot; must not be empty. If no drift standard was in included in a run, use one of the calibration standards here.&lt;br /&gt;
&lt;br /&gt;
The field &amp;quot;Averaging injections&amp;quot; sets how many of the last injections will be used in the averaging step. A number of 3 or 4 is currently recommended (without memory correction). The checkbox &amp;quot;include 17-O excess&amp;quot; needs to be checked for runs that are intended for 17-O excess analysis.&lt;br /&gt;
&lt;br /&gt;
Pressing the button &amp;quot;Calibrate&amp;quot; that will start to produce the output report in HTML format. Watch the matlab command line window for progress, error messages and warnings.&lt;br /&gt;
&lt;br /&gt;
Remember, settings across all three steps can be saved and loaded at any time using the buttons &amp;quot;Save&amp;quot; and &amp;quot;Load&amp;quot;.&lt;br /&gt;
￼&lt;br /&gt;
![FLIIMP_3](uploads/68266f681b7e2f2f21789771bcee76bc/FLIIMP_3.png)&lt;br /&gt;
&lt;br /&gt;
## Detailed description of calibration procedure &lt;br /&gt;
&lt;br /&gt;
### 1. Identification of standards&lt;br /&gt;
&lt;br /&gt;
- Calibration standards&lt;br /&gt;
&lt;br /&gt;
- Drift standards&lt;br /&gt;
&lt;br /&gt;
### 2. Calibration&lt;br /&gt;
&lt;br /&gt;
- Using IAEA procedures&lt;br /&gt;
&lt;br /&gt;
### 3. Instrument characteristics&lt;br /&gt;
&lt;br /&gt;
- Cavity temperature, cavity pressure, warm-box temperature, DAS temperature&lt;br /&gt;
&lt;br /&gt;
### 4. Quality flags&lt;br /&gt;
&lt;br /&gt;
- Humidity variation&lt;br /&gt;
&lt;br /&gt;
- Isotope variation&lt;br /&gt;
&lt;br /&gt;
- Temperature variation&lt;br /&gt;
&lt;br /&gt;
- Quality flags&lt;br /&gt;
&lt;br /&gt;
### 5. Sample report&lt;br /&gt;
&lt;br /&gt;
## Reference&lt;br /&gt;
&lt;br /&gt;
IAEA, 20xx&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1379</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1379"/>
		<updated>2020-09-18T07:20:46Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Geophysical Institute ==&lt;br /&gt;
&lt;br /&gt;
[[File:GFI.jpg]]&lt;br /&gt;
&lt;br /&gt;
==[[Teaching]]==&lt;br /&gt;
&lt;br /&gt;
==Research and PhD/Postdoc Groups==&lt;br /&gt;
===[[Meteorology]]===&lt;br /&gt;
===[[ResClim Bergen subgroup]]===&lt;br /&gt;
===[[Physical Oceanography group]]===&lt;br /&gt;
&lt;br /&gt;
==Observations==&lt;br /&gt;
===[[ITAS Automatic Weather Stations]]===&lt;br /&gt;
===[[MRR Micro Rain Radar]]===&lt;br /&gt;
===[[TPS-3100 Hotplate pluviometer]]===&lt;br /&gt;
===[[Parsivel2 Disdrometer]]===&lt;br /&gt;
===[[HOBO rain gauges]]===&lt;br /&gt;
===[[EasyLog temperature logger]]===&lt;br /&gt;
===[[iMet UAV sonde package]]===&lt;br /&gt;
===[[Kristine Bonnevie shiplog data]]===&lt;br /&gt;
===[[Joining several data files with CDO and IsoFuse]]===&lt;br /&gt;
&lt;br /&gt;
==Shared data sets==&lt;br /&gt;
===[[ERA5 reanalysis data]]===&lt;br /&gt;
&lt;br /&gt;
==IT (Hardware and Software)==&lt;br /&gt;
===[[The GFI computing system]]===&lt;br /&gt;
===[[Using cyclone]]===&lt;br /&gt;
===[[Using modules on cyclone]]===&lt;br /&gt;
===[[Best practices when using cyclone]]===&lt;br /&gt;
===[[Bedymo]]===&lt;br /&gt;
===[[Dynlib]]===&lt;br /&gt;
===[[Forecast plotting]]===&lt;br /&gt;
===[[Git]]===&lt;br /&gt;
===[[NCL]]===&lt;br /&gt;
===[[Python]]===&lt;br /&gt;
===[[WRF]]===&lt;br /&gt;
===[[OpenIFS]]===&lt;br /&gt;
===[[GFI&amp;amp;SKD Storage]]===&lt;br /&gt;
===(outdated) [[Using the queue system on skd-cyclone]]===&lt;br /&gt;
&lt;br /&gt;
==IsoMet Tools==&lt;br /&gt;
===[[FLEXPART]]===&lt;br /&gt;
===[[Lagranto]]===&lt;br /&gt;
===[[WaterSip]]===&lt;br /&gt;
===[[Flextract]]===&lt;br /&gt;
===[[Joining several data files with CDO and IsoFuse|IsoFuse]]===&lt;br /&gt;
===[[Rayleigh model]]===&lt;br /&gt;
===[[FLIIMP - FARLAB liquid water isotope measurements processor]]===&lt;br /&gt;
===[[FaVaCal - FARLAB water vapour isotope calibration processor]]===&lt;br /&gt;
&lt;br /&gt;
==Social Activities and Groups==&lt;br /&gt;
===[[Football]]===&lt;br /&gt;
===[[Gale Brewing Club]]===&lt;br /&gt;
===[[Geosupen]]===&lt;br /&gt;
===[[GFI-social]]===&lt;br /&gt;
===[[Kakeklubben]]===&lt;br /&gt;
===[[Music]]===&lt;br /&gt;
===[[PhD Forum]]===&lt;br /&gt;
===[[Schafkopf]]===&lt;br /&gt;
===[[Volleyball]]===&lt;br /&gt;
&lt;br /&gt;
[[Category:IT]]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=IMet_UAV_sonde_package&amp;diff=1324</id>
		<title>IMet UAV sonde package</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=IMet_UAV_sonde_package&amp;diff=1324"/>
		<updated>2020-06-21T05:39:29Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Meteorology group has 2 UAV measurement sondes of type iMet XQ2 ([https://www.intermetsystems.com/products/imet-xq2-uav-sensor see Intermet Systems website]).&lt;br /&gt;
&lt;br /&gt;
[[File:XQ2_for_publication.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Figure (c) Intermet systems&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Measurement capability&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Measurement features in the second-generation sensor include &lt;br /&gt;
&lt;br /&gt;
- atmospheric pressure, &lt;br /&gt;
&lt;br /&gt;
- air temperature &lt;br /&gt;
&lt;br /&gt;
- relative humidity, &lt;br /&gt;
&lt;br /&gt;
- GPS coordinates, &lt;br /&gt;
&lt;br /&gt;
This is packaged into a small housing, with rechargeable battery and data logger. The sonde can be run on battery power or powered by micro-USB cable. &lt;br /&gt;
Battery capacity five hours.&lt;br /&gt;
&lt;br /&gt;
The sensor information is detailed on the corresponding [https://www.intermetsystems.com/ee/pdf/202021_iMet-XQ2_171207.pdf data sheet]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data format and processing&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The log from the imet can either be acquired in csv format from the software when connected to a computer via USB cable, or from reading the output with another serial port logging program.&lt;br /&gt;
&lt;br /&gt;
Routines for data processing are available on the [https://git.app.uib.no/uib-gfi/gfi_instruments/-/tree/master/iMet GFI git repository], including a simple plotting routine in matlab. The code in its current version is cloned on the cyclone compute system at location &amp;lt;code&amp;gt;/Data/gfi/scratch/metdata/scripts/gfi_instuments/imet&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=IMet_UAV_sonde_package&amp;diff=1323</id>
		<title>IMet UAV sonde package</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=IMet_UAV_sonde_package&amp;diff=1323"/>
		<updated>2020-06-21T05:37:39Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Meteorology group has 2 UAV measurement sondes of type iMet XQ2 ([https://www.intermetsystems.com/products/imet-xq2-uav-sensor see Intermet Systems website]).&lt;br /&gt;
&lt;br /&gt;
[[File:XQ2_for_publication.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Figure (c) Intermet systems&lt;br /&gt;
&lt;br /&gt;
Measurement features in the second-generation sensor include &lt;br /&gt;
&lt;br /&gt;
- atmospheric pressure, &lt;br /&gt;
&lt;br /&gt;
- air temperature &lt;br /&gt;
&lt;br /&gt;
- relative humidity, &lt;br /&gt;
&lt;br /&gt;
- GPS coordinates, &lt;br /&gt;
&lt;br /&gt;
This is packaged into a small housing, with rechargeable battery and data logger. The sonde can be run on battery power or powered by micro-USB cable. &lt;br /&gt;
Battery capacity five hours.&lt;br /&gt;
&lt;br /&gt;
The sensor information is detailed on the corresponding [https://www.intermetsystems.com/ee/pdf/202021_iMet-XQ2_171207.pdf data sheet]&lt;br /&gt;
&lt;br /&gt;
Routines for data processing are available on the [https://git.app.uib.no/uib-gfi/gfi_instruments/-/tree/master/iMet GFI git repository], including a simple plotting routine in matlab. The code in its current version is cloned on the cyclone compute system at location &amp;lt;code&amp;gt;/Data/gfi/scratch/metdata/scripts/gfi_instuments/imet&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=IMet_UAV_sonde_package&amp;diff=1322</id>
		<title>IMet UAV sonde package</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=IMet_UAV_sonde_package&amp;diff=1322"/>
		<updated>2020-06-21T05:37:19Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Meteorology group has 2 UAV measurement sondes of type iMet XQ2 ([https://www.intermetsystems.com/products/imet-xq2-uav-sensor see Intermet Systems website]).&lt;br /&gt;
&lt;br /&gt;
[[File:XQ2_for_publication.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Figure (c) Intermet systems&lt;br /&gt;
&lt;br /&gt;
Measurement features in the second-generation sensor include &lt;br /&gt;
&lt;br /&gt;
- atmospheric pressure, &lt;br /&gt;
&lt;br /&gt;
- air temperature &lt;br /&gt;
&lt;br /&gt;
- relative humidity, &lt;br /&gt;
&lt;br /&gt;
- GPS coordinates, &lt;br /&gt;
&lt;br /&gt;
This is packaged into a small housing, with rechargeable battery and data logger. The sonde can be run on battery power or powered by micro-USB cable. &lt;br /&gt;
Battery capacity five hours.&lt;br /&gt;
&lt;br /&gt;
The sensor information is detailed on the corresponding [https://www.intermetsystems.com/ee/pdf/202021_iMet-XQ2_171207.pdf data sheet]&lt;br /&gt;
&lt;br /&gt;
Routines for data processing are available on the [https://git.app.uib.no/uib-gfi/gfi_instruments/-/tree/master/iMet GFI git repository], including a simple plotting routine in matlab. The code in its current version is cloned on cyclone at location &amp;lt;code&amp;gt;//Data/gfi/scratch/metdata/scripts/gfi_instuments/imet&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=IMet_UAV_sonde_package&amp;diff=1321</id>
		<title>IMet UAV sonde package</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=IMet_UAV_sonde_package&amp;diff=1321"/>
		<updated>2020-06-21T05:33:39Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Meteorology group has 2 UAV measurement sondes of type iMet XQ2 ([https://www.intermetsystems.com/products/imet-xq2-uav-sensor see Intermet Systems website]).&lt;br /&gt;
&lt;br /&gt;
[[File:XQ2_for_publication.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
Figure (c) Intermet systems&lt;br /&gt;
&lt;br /&gt;
Measurement features in the second-generation sensor include &lt;br /&gt;
&lt;br /&gt;
- atmospheric pressure, &lt;br /&gt;
&lt;br /&gt;
- air temperature &lt;br /&gt;
&lt;br /&gt;
- relative humidity, &lt;br /&gt;
&lt;br /&gt;
- GPS coordinates, &lt;br /&gt;
&lt;br /&gt;
This is packaged into a small housing, with rechargeable battery and data logger. The sonde can be run on battery power or powered by micro-USB cable. &lt;br /&gt;
Battery capacity five hours.&lt;br /&gt;
&lt;br /&gt;
The sensor information is detailed on the corresponding [https://www.intermetsystems.com/ee/pdf/202021_iMet-XQ2_171207.pdf data sheet]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=File:XQ2_for_publication.jpg&amp;diff=1320</id>
		<title>File:XQ2 for publication.jpg</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=File:XQ2_for_publication.jpg&amp;diff=1320"/>
		<updated>2020-06-21T05:33:10Z</updated>

		<summary type="html">&lt;p&gt;Hso039: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=IMet_UAV_sonde_package&amp;diff=1319</id>
		<title>IMet UAV sonde package</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=IMet_UAV_sonde_package&amp;diff=1319"/>
		<updated>2020-06-21T05:32:34Z</updated>

		<summary type="html">&lt;p&gt;Hso039: Created page with &amp;quot;The Meteorology group has 2 UAV measurement sondes of type iMet XQ2 ([https://www.intermetsystems.com/products/imet-xq2-uav-sensor see Intermet Systems website]).  Measurement...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Meteorology group has 2 UAV measurement sondes of type iMet XQ2 ([https://www.intermetsystems.com/products/imet-xq2-uav-sensor see Intermet Systems website]).&lt;br /&gt;
&lt;br /&gt;
Measurement features in the second-generation sensor include &lt;br /&gt;
&lt;br /&gt;
- atmospheric pressure, &lt;br /&gt;
&lt;br /&gt;
- air temperature &lt;br /&gt;
&lt;br /&gt;
- relative humidity, &lt;br /&gt;
&lt;br /&gt;
- GPS coordinates, &lt;br /&gt;
&lt;br /&gt;
This is packaged into a small housing, with rechargeable battery and data logger. The sonde can be run on battery power or powered by micro-USB cable. &lt;br /&gt;
Battery capacity five hours.&lt;br /&gt;
&lt;br /&gt;
The sensor information is detailed on the corresponding [https://www.intermetsystems.com/ee/pdf/202021_iMet-XQ2_171207.pdf data sheet]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1318</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1318"/>
		<updated>2020-06-21T05:27:00Z</updated>

		<summary type="html">&lt;p&gt;Hso039: /* Observations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Geophysical Institute ==&lt;br /&gt;
&lt;br /&gt;
[[File:GFI.jpg]]&lt;br /&gt;
&lt;br /&gt;
==[[Teaching]]==&lt;br /&gt;
&lt;br /&gt;
==Research and PhD/Postdoc Groups==&lt;br /&gt;
===[[Meteorology]]===&lt;br /&gt;
===[[ResClim Bergen subgroup]]===&lt;br /&gt;
===[[Physical Oceanography group]]===&lt;br /&gt;
&lt;br /&gt;
==Observations==&lt;br /&gt;
===[[ITAS Automatic Weather Stations]]===&lt;br /&gt;
===[[MRR Micro Rain Radar]]===&lt;br /&gt;
===[[TPS-3100 Hotplate pluviometer]]===&lt;br /&gt;
===[[Parsivel2 Disdrometer]]===&lt;br /&gt;
===[[HOBO rain gauges]]===&lt;br /&gt;
===[[EasyLog temperature logger]]===&lt;br /&gt;
===[[iMet UAV sonde package]]===&lt;br /&gt;
===[[Kristine Bonnevie shiplog data]]===&lt;br /&gt;
===[[Joining several data files with CDO and IsoFuse]]===&lt;br /&gt;
&lt;br /&gt;
==Shared data sets==&lt;br /&gt;
===[[ERA5 reanalysis data]]===&lt;br /&gt;
&lt;br /&gt;
==IT (Hardware and Software)==&lt;br /&gt;
===[[The GFI computing system]]===&lt;br /&gt;
===[[Using cyclone]]===&lt;br /&gt;
===[[Using modules on cyclone]]===&lt;br /&gt;
===[[Best practices when using cyclone]]===&lt;br /&gt;
===[[Bedymo]]===&lt;br /&gt;
===[[Dynlib]]===&lt;br /&gt;
===[[Forecast plotting]]===&lt;br /&gt;
===[[Git]]===&lt;br /&gt;
===[[NCL]]===&lt;br /&gt;
===[[Python]]===&lt;br /&gt;
===[[WRF]]===&lt;br /&gt;
===[[OpenIFS]]===&lt;br /&gt;
===[[GFI&amp;amp;SKD Storage]]===&lt;br /&gt;
===(outdated) [[Using the queue system on skd-cyclone]]===&lt;br /&gt;
&lt;br /&gt;
==IsoMet Tools==&lt;br /&gt;
===[[FLEXPART]]===&lt;br /&gt;
===[[Lagranto]]===&lt;br /&gt;
===[[WaterSip]]===&lt;br /&gt;
===[[Flextract]]===&lt;br /&gt;
===[[Joining several data files with CDO and IsoFuse|IsoFuse]]===&lt;br /&gt;
&lt;br /&gt;
==Social Activities and Groups==&lt;br /&gt;
===[[Football]]===&lt;br /&gt;
===[[Gale Brewing Club]]===&lt;br /&gt;
===[[Geosupen]]===&lt;br /&gt;
===[[GFI-social]]===&lt;br /&gt;
===[[Kakeklubben]]===&lt;br /&gt;
===[[Music]]===&lt;br /&gt;
===[[PhD Forum]]===&lt;br /&gt;
===[[Schafkopf]]===&lt;br /&gt;
===[[Volleyball]]===&lt;br /&gt;
&lt;br /&gt;
[[Category:IT]]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=MRR_Micro_Rain_Radar&amp;diff=1291</id>
		<title>MRR Micro Rain Radar</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=MRR_Micro_Rain_Radar&amp;diff=1291"/>
		<updated>2020-04-28T07:59:14Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The MRR (Micro Rain Radar, Metek GmbH, Germany) is installed on the GFI rooftop and delivers vertical precipitation profiles and droplet size distributions every 10s.&lt;br /&gt;
&lt;br /&gt;
Data files for the period Oct 2015 - Mar 2020 are available on the GFI linux file system in &amp;lt;code&amp;gt;/Data/gfi/scratch/metdata/MRR&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Routines for reading data files are available on the GFI linux file system in &amp;lt;code&amp;gt;/Data/gfi/scratch/metdata/scripts/MRR&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instrument characteristics, data processing, and data availability and archiving are described in the document attached below.&lt;br /&gt;
&lt;br /&gt;
 [[:File:Data_management_MRR_202004.pdf|MRR-2 instrument description and data management]] (Updated April 2020)]]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=MRR_Micro_Rain_Radar&amp;diff=1290</id>
		<title>MRR Micro Rain Radar</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=MRR_Micro_Rain_Radar&amp;diff=1290"/>
		<updated>2020-04-28T07:58:43Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The MRR (Micro Rain Radar, Metek GmbH, Germany) is installed on the GFI rooftop and delivers vertical precipitation profiles and droplet size distributions every 10s.&lt;br /&gt;
&lt;br /&gt;
Data files for the period Oct 2015 - Mar 2020 are available on the GFI linux file system in &amp;lt;code&amp;gt;/Data/gfi/scratch/metdata/MRR&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Routines for reading data files are available on the GFI linux file system in &amp;lt;code&amp;gt;/Data/gfi/scratch/metdata/scripts/MRR&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instrument characteristics, data processing, and data availability and archiving are described in the document attached below.&lt;br /&gt;
&lt;br /&gt;
[[:File:Data_management_MRR_202004.pdf|MRR-2 instrument description and data management]] (Updated April 2020)]]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=MRR_Micro_Rain_Radar&amp;diff=1289</id>
		<title>MRR Micro Rain Radar</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=MRR_Micro_Rain_Radar&amp;diff=1289"/>
		<updated>2020-04-28T07:48:38Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The MRR (Micro Rain Radar, Metek GmbH, Germany) is installed on the GFI rooftop and delivers vertical precipitation profiles and droplet size distributions every 10s.&lt;br /&gt;
&lt;br /&gt;
Data files for the period Oct 2015 - Mar 2020 are available on the GFI linux file system in &amp;lt;code&amp;gt;/Data/gfi/scratch/metdata/MRR&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Routines for reading data files are available on the GFI linux file system in &amp;lt;code&amp;gt;/Data/gfi/scratch/metdata/scripts/MRR&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The instrument characteristics, data processing, and data availability and archiving are described in the document attached below.&lt;br /&gt;
&lt;br /&gt;
[[:File:Data_management_MRR_202004.pdf]]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=File:Data_management_MRR_202004.pdf&amp;diff=1288</id>
		<title>File:Data management MRR 202004.pdf</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=File:Data_management_MRR_202004.pdf&amp;diff=1288"/>
		<updated>2020-04-28T07:48:26Z</updated>

		<summary type="html">&lt;p&gt;Hso039: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Flextract&amp;diff=1286</id>
		<title>Flextract</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Flextract&amp;diff=1286"/>
		<updated>2020-04-23T18:23:06Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Flextract reference ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AUTHORS:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alexander Läderach, Harald Sodemann&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PURPOSE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Extract trajectories from FLEXPART particle binary format and convert them to text-based LAGRANTO lsl file format.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
./flextract &amp;lt;settings-file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AVAILABLE DATA:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5 mio. global FLEXPART-trajectories covering 1979-01-02 00:00 to 2019-08-30 15:00 UTC. &lt;br /&gt;
Stored at &amp;lt;code&amp;gt;Data/gfi/met/flexpart/erainterim/global/global_corr/&amp;lt;/code&amp;gt; (input-path).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minimal timestep for the trajectories to be extracted is 6 hours, for some periods 3 hours may work as well, check files in input path beforehand. The timesteps 00 06 12 18 are given by the ERA-interim reanalysis and the 03 09 15 21 timesteps are given by the forecasts of the model used to produce ERA-interim.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GET STARTED:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Create a link to the flextract executable, located on cyclone to your working directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ln -s /Data/gfi/projects/isomet/progs/flextract/flextract .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the &#039;dot&#039; in the end of the command, for the current location. This will &lt;br /&gt;
&lt;br /&gt;
2. Create a settings.txt-file with the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# --------------------------------------------------------- #&lt;br /&gt;
# Settings to extract FLEXPART trajectories from database # &lt;br /&gt;
# NOTE: All lines beginning with # and empty ones ignored # &lt;br /&gt;
# --------------------------------------------------------- #&lt;br /&gt;
# Path to the FLEXPART trajectory files (Input) &lt;br /&gt;
/Data/gfi/met/flexpart/erainterim/global/global_corr/&lt;br /&gt;
&lt;br /&gt;
# Path to store trajectories in LAGRANTO-format (Output) &lt;br /&gt;
/Data/gfi/work/&amp;lt;USERNAME&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
# Begin time (Year Month Day Hour Min Sec) &lt;br /&gt;
# NOTE First date for which trajectories are calculated&lt;br /&gt;
2018 1 1 0 0 0&lt;br /&gt;
&lt;br /&gt;
# End time (Year Month Day Hour Min Sec) &lt;br /&gt;
# NOTE Last date for which trajectories are calculated&lt;br /&gt;
2018 1 3 0 0 0&lt;br /&gt;
&lt;br /&gt;
# Timestep (hours) &lt;br /&gt;
# NOTE always positive&lt;br /&gt;
6&lt;br /&gt;
&lt;br /&gt;
# Trajectory length (hours) &lt;br /&gt;
# NOTE positive for forward trajectories, negative for backward&lt;br /&gt;
72&lt;br /&gt;
&lt;br /&gt;
# Only consider each nth-particle only (1=each of the 5mio. particles) &lt;br /&gt;
# NOTE: could lead to huge output if too small&lt;br /&gt;
1&lt;br /&gt;
&lt;br /&gt;
# Target area (minlon maxlon minlat maxlat) &lt;br /&gt;
5.0 17.1 43.4 49.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Run the flextract program, providing the settings file as argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./flextract ./settings.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While calculating the trajectories, a percent number will indicate progress of the extraction. The lsl trajectory files will be created in the location specified in the settings.txt file.&lt;br /&gt;
&lt;br /&gt;
4. Read/plot trajectories from the files in lsl format using matlab routines located in &amp;lt;code&amp;gt;/Data/gfi/projects/isomet/matlab&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- read_lsl.m&lt;br /&gt;
- traj_filter.m&lt;br /&gt;
- traj_plot.m&lt;br /&gt;
- traj_plot_vert.m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Flextract&amp;diff=1285</id>
		<title>Flextract</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Flextract&amp;diff=1285"/>
		<updated>2020-04-23T18:21:54Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Flextract reference ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AUTHORS:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alexander Läderach, Harald Sodemann&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PURPOSE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Extract trajectories from FLEXPART particle binary format and convert them to text-based LAGRANTO lsl file format.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
./flextract &amp;lt;settings-file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AVAILABLE DATA:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5 mio. global FLEXPART-trajectories covering 1979-01-02 00:00 to 2019-08-30 15:00 UTC. &lt;br /&gt;
Stored at &amp;lt;code&amp;gt;Data/gfi/met/flexpart/erainterim/global/global_corr/&amp;lt;/code&amp;gt; (input-path).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minimal timestep for the trajectories to be extracted is 3 hours. The timesteps 00 06 12 18 are given by the ERA-interim reanalysis and the 03 09 15 21 timesteps are given by the forecasts of the model used to produce ERA-interim.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GET STARTED:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Create a link to the flextract executable, located on cyclone to your working directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ln -s /Data/gfi/projects/isomet/progs/flextract/flextract .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the &#039;dot&#039; in the end of the command, for the current location. This will &lt;br /&gt;
&lt;br /&gt;
2. Create a settings-file with the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# --------------------------------------------------------- #&lt;br /&gt;
# Settings to extract FLEXPART trajectories from database # &lt;br /&gt;
# NOTE: All lines beginning with # and empty ones ignored # &lt;br /&gt;
# --------------------------------------------------------- #&lt;br /&gt;
# Path to the FLEXPART trajectory files (Input) &lt;br /&gt;
/Data/gfi/met/flexpart/erainterim/global/global_corr/&lt;br /&gt;
&lt;br /&gt;
# Path to store trajectories in LAGRANTO-format (Output) &lt;br /&gt;
/Data/gfi/work/&amp;lt;USERNAME&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
# Begin time (Year Month Day Hour Min Sec) &lt;br /&gt;
# NOTE First date for which trajectories are calculated&lt;br /&gt;
2018 1 1 0 0 0&lt;br /&gt;
&lt;br /&gt;
# End time (Year Month Day Hour Min Sec) &lt;br /&gt;
# NOTE Last date for which trajectories are calculated&lt;br /&gt;
2018 1 3 0 0 0&lt;br /&gt;
&lt;br /&gt;
# Timestep (hours) &lt;br /&gt;
# NOTE always positive&lt;br /&gt;
6&lt;br /&gt;
&lt;br /&gt;
# Trajectory length (hours) &lt;br /&gt;
# NOTE positive for forward trajectories, negative for backward&lt;br /&gt;
72&lt;br /&gt;
&lt;br /&gt;
# Only consider each nth-particle only (1=each of the 5mio. particles) &lt;br /&gt;
# NOTE: could lead to huge output if too small&lt;br /&gt;
1&lt;br /&gt;
&lt;br /&gt;
# Target area (minlon maxlon minlat maxlat) &lt;br /&gt;
5.0 17.1 43.4 49.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Run the flextract program, providing the settings file as argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./flextract ./settings.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While calculating the trajectories, a percent number will indicate progress of the extraction. The lsl trajectory files will be created in the location specified in the settings.txt file.&lt;br /&gt;
&lt;br /&gt;
4. Read/plot trajectories from the files in lsl format using matlab routines located in &amp;lt;code&amp;gt;/Data/gfi/projects/isomet/matlab&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- read_lsl.m&lt;br /&gt;
- traj_filter.m&lt;br /&gt;
- traj_plot.m&lt;br /&gt;
- traj_plot_vert.m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1284</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1284"/>
		<updated>2020-04-23T14:27:39Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Geophysical Institute ==&lt;br /&gt;
&lt;br /&gt;
[[File:GFI.jpg]]&lt;br /&gt;
&lt;br /&gt;
==[[Teaching]]==&lt;br /&gt;
&lt;br /&gt;
==Research and PhD/Postdoc Groups==&lt;br /&gt;
===[[Meteorology]]===&lt;br /&gt;
===[[ResClim Bergen subgroup]]===&lt;br /&gt;
===[[Physical Oceanography group]]===&lt;br /&gt;
&lt;br /&gt;
==Observations==&lt;br /&gt;
===[[ITAS Automatic Weather Stations]]===&lt;br /&gt;
===[[MRR Micro Rain Radar]]===&lt;br /&gt;
===[[TPS-3100 Hotplate pluviometer]]===&lt;br /&gt;
===[[Parsivel2 Disdrometer]]===&lt;br /&gt;
===[[HOBO rain gauges]]===&lt;br /&gt;
===[[EasyLog temperature logger]]===&lt;br /&gt;
===[[Kristine Bonnevie shiplog data]]===&lt;br /&gt;
===[[Joining several data files with CDO and IsoFuse]]===&lt;br /&gt;
&lt;br /&gt;
==Shared data sets==&lt;br /&gt;
===[[ERA5 reanalysis data]]===&lt;br /&gt;
&lt;br /&gt;
==IT (Hardware and Software)==&lt;br /&gt;
===[[The GFI computing system]]===&lt;br /&gt;
===[[Using cyclone]]===&lt;br /&gt;
===[[Using modules on cyclone]]===&lt;br /&gt;
===[[Bedymo]]===&lt;br /&gt;
===[[Dynlib]]===&lt;br /&gt;
===[[Forecast plotting]]===&lt;br /&gt;
===[[Git]]===&lt;br /&gt;
===[[NCL]]===&lt;br /&gt;
===[[Python]]===&lt;br /&gt;
===[[WRF]]===&lt;br /&gt;
===[[OpenIFS]]===&lt;br /&gt;
===[[GFI&amp;amp;SKD Storage]]===&lt;br /&gt;
===(outdated) [[Using the queue system on skd-cyclone]]===&lt;br /&gt;
&lt;br /&gt;
==IsoMet Tools==&lt;br /&gt;
===[[FLEXPART]]===&lt;br /&gt;
===[[Lagranto]]===&lt;br /&gt;
===[[WaterSip]]===&lt;br /&gt;
===[[Flextract]]===&lt;br /&gt;
===[[Joining several data files with CDO and IsoFuse|IsoFuse]]===&lt;br /&gt;
&lt;br /&gt;
==Social Activities and Groups==&lt;br /&gt;
===[[Football]]===&lt;br /&gt;
===[[Gale Brewing Club]]===&lt;br /&gt;
===[[Geosupen]]===&lt;br /&gt;
===[[GFI-social]]===&lt;br /&gt;
===[[Kakeklubben]]===&lt;br /&gt;
===[[Music]]===&lt;br /&gt;
===[[PhD Forum]]===&lt;br /&gt;
===[[Schafkopf]]===&lt;br /&gt;
===[[Volleyball]]===&lt;br /&gt;
&lt;br /&gt;
[[Category:IT]]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1283</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1283"/>
		<updated>2020-04-23T14:27:17Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Geophysical Institute ==&lt;br /&gt;
&lt;br /&gt;
[[File:GFI.jpg]]&lt;br /&gt;
&lt;br /&gt;
==[[Teaching]]==&lt;br /&gt;
&lt;br /&gt;
==Research and PhD/Postdoc Groups==&lt;br /&gt;
===[[Meteorology]]===&lt;br /&gt;
===[[ResClim Bergen subgroup]]===&lt;br /&gt;
===[[Physical Oceanography group]]===&lt;br /&gt;
&lt;br /&gt;
==Observations==&lt;br /&gt;
===[[ITAS Automatic Weather Stations]]===&lt;br /&gt;
===[[MRR Micro Rain Radar]]===&lt;br /&gt;
===[[TPS-3100 Hotplate pluviometer]]===&lt;br /&gt;
===[[Parsivel2 Disdrometer]]===&lt;br /&gt;
===[[HOBO rain gauges]]===&lt;br /&gt;
===[[EasyLog temperature logger]]===&lt;br /&gt;
===[[Kristine Bonnevie shiplog data]]===&lt;br /&gt;
===[[Joining several data files with CDO and IsoFuse]]===&lt;br /&gt;
&lt;br /&gt;
==Shared data sets==&lt;br /&gt;
===[[ERA5 reanalysis data]]===&lt;br /&gt;
&lt;br /&gt;
==IT (Hardware and Software)==&lt;br /&gt;
===[[The GFI computing system]]===&lt;br /&gt;
===[[Using cyclone]]===&lt;br /&gt;
===[[Using modules on cyclone]]===&lt;br /&gt;
===[[Bedymo]]===&lt;br /&gt;
===[[Dynlib]]===&lt;br /&gt;
===[[Forecast plotting]]===&lt;br /&gt;
===[[Git]]===&lt;br /&gt;
===[[NCL]]===&lt;br /&gt;
===[[Python]]===&lt;br /&gt;
===[[WRF]]===&lt;br /&gt;
===[[OpenIFS]]===&lt;br /&gt;
===[[GFI&amp;amp;SKD Storage]]===&lt;br /&gt;
===(outdated) [[Using the queue system on skd-cyclone]]===&lt;br /&gt;
&lt;br /&gt;
==IsoMet Tools==&lt;br /&gt;
===[[FLEXPART]]===&lt;br /&gt;
===[[Lagranto]]===&lt;br /&gt;
===[[WaterSip]]===&lt;br /&gt;
===[[Flextract]]===&lt;br /&gt;
===[[IsoFuse|Joining several data files with CDO and IsoFuse]]===&lt;br /&gt;
&lt;br /&gt;
==Social Activities and Groups==&lt;br /&gt;
===[[Football]]===&lt;br /&gt;
===[[Gale Brewing Club]]===&lt;br /&gt;
===[[Geosupen]]===&lt;br /&gt;
===[[GFI-social]]===&lt;br /&gt;
===[[Kakeklubben]]===&lt;br /&gt;
===[[Music]]===&lt;br /&gt;
===[[PhD Forum]]===&lt;br /&gt;
===[[Schafkopf]]===&lt;br /&gt;
===[[Volleyball]]===&lt;br /&gt;
&lt;br /&gt;
[[Category:IT]]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Flextract&amp;diff=1281</id>
		<title>Flextract</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Flextract&amp;diff=1281"/>
		<updated>2020-04-21T21:09:25Z</updated>

		<summary type="html">&lt;p&gt;Hso039: Created page with &amp;quot;== Flextract reference ==   &amp;#039;&amp;#039;&amp;#039;AUTHORS:&amp;#039;&amp;#039;&amp;#039;  Alexander Läderach, Harald Sodemann  &amp;#039;&amp;#039;&amp;#039;PURPOSE:&amp;#039;&amp;#039;&amp;#039;  Extract trajectories from FLEXPART particle binary format and convert them to...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Flextract reference ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AUTHORS:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alexander Läderach, Harald Sodemann&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PURPOSE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Extract trajectories from FLEXPART particle binary format and convert them to LAGRANTO-format.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AVAILABLE DATA:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5 mio. global FLEXPART-trajectories covering 1979-01-02 00:00 to 2019-08-30 15:00 UTC. &lt;br /&gt;
Stored at &amp;lt;code&amp;gt;Data/gfi/met/flexpart/erainterim/global/global_corr/&amp;lt;/code&amp;gt; (input-path).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GET STARTED:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a settings-file with the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# --------------------------------------------------------- #&lt;br /&gt;
# Settings to extract FLEXPART trajectories from database # &lt;br /&gt;
# NOTE: All lines beginning with # and empty ones ignored # &lt;br /&gt;
# --------------------------------------------------------- #&lt;br /&gt;
# Path to the FLEXPART trajectory files (Input) &lt;br /&gt;
/Data/gfi/met/flexpart/erainterim/global/global_corr/&lt;br /&gt;
&lt;br /&gt;
# Path to store trajectories in LAGRANTO-format (Output) &lt;br /&gt;
/Data/gfi/work/&amp;lt;USERNAME&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
# Begin time (Year Month Day Hour Min Sec) &lt;br /&gt;
# NOTE First date for which trajectories are calculated&lt;br /&gt;
2000 1 1 0 0 0&lt;br /&gt;
&lt;br /&gt;
# End time (Year Month Day Hour Min Sec) &lt;br /&gt;
# NOTE Last date for which trajectories are calculated&lt;br /&gt;
2000 1 2 0 0 0&lt;br /&gt;
&lt;br /&gt;
# Timestep (hours) &lt;br /&gt;
# NOTE always positive&lt;br /&gt;
6&lt;br /&gt;
&lt;br /&gt;
# Trajectory length (hours) &lt;br /&gt;
# NOTE positive for forward trajectories, negative for backward&lt;br /&gt;
24&lt;br /&gt;
&lt;br /&gt;
# Only consider each nth-particle only (1=each of the 5mio. particles) &lt;br /&gt;
# NOTE: could lead to huge output if too small&lt;br /&gt;
10&lt;br /&gt;
&lt;br /&gt;
# Target area (minlon maxlon minlat maxlat) &lt;br /&gt;
5 17 43 49&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
./flextract &amp;lt;settings-file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minimal timestep for the trajectories to be extracted is 3 hours. The timesteps 00 06 12 18 are given by the ERA-interim reanalysis and the 03 09 15 21 timesteps are given by the forecasts of the model used to produce ERA-interim.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1280</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1280"/>
		<updated>2020-04-21T21:09:08Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Geophysical Institute ==&lt;br /&gt;
&lt;br /&gt;
[[File:GFI.jpg]]&lt;br /&gt;
&lt;br /&gt;
==[[Teaching]]==&lt;br /&gt;
&lt;br /&gt;
==Research and PhD/Postdoc Groups==&lt;br /&gt;
===[[Meteorology]]===&lt;br /&gt;
===[[ResClim Bergen subgroup]]===&lt;br /&gt;
===[[Physical Oceanography group]]===&lt;br /&gt;
&lt;br /&gt;
==Observations==&lt;br /&gt;
===[[ITAS Automatic Weather Stations]]===&lt;br /&gt;
===[[MRR Micro Rain Radar]]===&lt;br /&gt;
===[[TPS-3100 Hotplate pluviometer]]===&lt;br /&gt;
===[[Parsivel2 Disdrometer]]===&lt;br /&gt;
===[[HOBO rain gauges]]===&lt;br /&gt;
===[[EasyLog temperature logger]]===&lt;br /&gt;
===[[Kristine Bonnevie shiplog data]]===&lt;br /&gt;
===[[Joining several data files with CDO and IsoFuse]]===&lt;br /&gt;
&lt;br /&gt;
==Shared data sets==&lt;br /&gt;
===[[ERA5 reanalysis data]]===&lt;br /&gt;
&lt;br /&gt;
==IT (Hardware and Software)==&lt;br /&gt;
===[[The GFI computing system]]===&lt;br /&gt;
===[[Using cyclone]]===&lt;br /&gt;
===[[Using modules on cyclone]]===&lt;br /&gt;
===[[Bedymo]]===&lt;br /&gt;
===[[Dynlib]]===&lt;br /&gt;
===[[Forecast plotting]]===&lt;br /&gt;
===[[Git]]===&lt;br /&gt;
===[[NCL]]===&lt;br /&gt;
===[[Python]]===&lt;br /&gt;
===[[WRF]]===&lt;br /&gt;
===[[OpenIFS]]===&lt;br /&gt;
===[[GFI&amp;amp;SKD Storage]]===&lt;br /&gt;
===(outdated) [[Using the queue system on skd-cyclone]]===&lt;br /&gt;
&lt;br /&gt;
==IsoMet Tools==&lt;br /&gt;
===[[FLEXPART]]===&lt;br /&gt;
===[[Lagranto]]===&lt;br /&gt;
===[[WaterSip]]===&lt;br /&gt;
===[[Flextract]]===&lt;br /&gt;
&lt;br /&gt;
==Social Activities and Groups==&lt;br /&gt;
===[[Football]]===&lt;br /&gt;
===[[Gale Brewing Club]]===&lt;br /&gt;
===[[Geosupen]]===&lt;br /&gt;
===[[GFI-social]]===&lt;br /&gt;
===[[Kakeklubben]]===&lt;br /&gt;
===[[Music]]===&lt;br /&gt;
===[[PhD Forum]]===&lt;br /&gt;
===[[Schafkopf]]===&lt;br /&gt;
===[[Volleyball]]===&lt;br /&gt;
&lt;br /&gt;
[[Category:IT]]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=IsoMet_Tools&amp;diff=1279</id>
		<title>IsoMet Tools</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=IsoMet_Tools&amp;diff=1279"/>
		<updated>2020-04-21T21:08:17Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Flextract reference ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AUTHORS:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alexander Läderach, Harald Sodemann&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PURPOSE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Extract trajectories from FLEXPART particle binary format and convert them to LAGRANTO-format.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;AVAILABLE DATA:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5 mio. global FLEXPART-trajectories covering 1979-01-02 00:00 to 2019-08-30 15:00 UTC. &lt;br /&gt;
Stored at &amp;lt;code&amp;gt;Data/gfi/met/flexpart/erainterim/global/global_corr/&amp;lt;/code&amp;gt; (input-path).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GET STARTED:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a settings-file with the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# --------------------------------------------------------- #&lt;br /&gt;
# Settings to extract FLEXPART trajectories from database # &lt;br /&gt;
# NOTE: All lines beginning with # and empty ones ignored # &lt;br /&gt;
# --------------------------------------------------------- #&lt;br /&gt;
# Path to the FLEXPART trajectory files (Input) &lt;br /&gt;
/Data/gfi/met/flexpart/erainterim/global/global_corr/&lt;br /&gt;
&lt;br /&gt;
# Path to store trajectories in LAGRANTO-format (Output) &lt;br /&gt;
/Data/gfi/work/&amp;lt;USERNAME&amp;gt;/&lt;br /&gt;
&lt;br /&gt;
# Begin time (Year Month Day Hour Min Sec) &lt;br /&gt;
# NOTE First date for which trajectories are calculated&lt;br /&gt;
2000 1 1 0 0 0&lt;br /&gt;
&lt;br /&gt;
# End time (Year Month Day Hour Min Sec) &lt;br /&gt;
# NOTE Last date for which trajectories are calculated&lt;br /&gt;
2000 1 2 0 0 0&lt;br /&gt;
&lt;br /&gt;
# Timestep (hours) &lt;br /&gt;
# NOTE always positive&lt;br /&gt;
6&lt;br /&gt;
&lt;br /&gt;
# Trajectory length (hours) &lt;br /&gt;
# NOTE positive for forward trajectories, negative for backward&lt;br /&gt;
24&lt;br /&gt;
&lt;br /&gt;
# Only consider each nth-particle only (1=each of the 5mio. particles) &lt;br /&gt;
# NOTE: could lead to huge output if too small&lt;br /&gt;
10&lt;br /&gt;
&lt;br /&gt;
# Target area (minlon maxlon minlat maxlat) &lt;br /&gt;
5 17 43 49&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
./flextract &amp;lt;settings-file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The minimal timestep for the trajectories to be extracted is 3 hours. The timesteps 00 06 12 18 are given by the ERA-interim reanalysis and the 03 09 15 21 timesteps are given by the forecasts of the model used to produce ERA-interim.&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1278</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1278"/>
		<updated>2020-04-21T21:07:53Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Geophysical Institute ==&lt;br /&gt;
&lt;br /&gt;
[[File:GFI.jpg]]&lt;br /&gt;
&lt;br /&gt;
==[[Teaching]]==&lt;br /&gt;
&lt;br /&gt;
==Research and PhD/Postdoc Groups==&lt;br /&gt;
===[[Meteorology]]===&lt;br /&gt;
===[[ResClim Bergen subgroup]]===&lt;br /&gt;
===[[Physical Oceanography group]]===&lt;br /&gt;
&lt;br /&gt;
==Observations==&lt;br /&gt;
===[[ITAS Automatic Weather Stations]]===&lt;br /&gt;
===[[MRR Micro Rain Radar]]===&lt;br /&gt;
===[[TPS-3100 Hotplate pluviometer]]===&lt;br /&gt;
===[[Parsivel2 Disdrometer]]===&lt;br /&gt;
===[[HOBO rain gauges]]===&lt;br /&gt;
===[[EasyLog temperature logger]]===&lt;br /&gt;
===[[Kristine Bonnevie shiplog data]]===&lt;br /&gt;
===[[Joining several data files with CDO and IsoFuse]]===&lt;br /&gt;
&lt;br /&gt;
==Shared data sets==&lt;br /&gt;
===[[ERA5 reanalysis data]]===&lt;br /&gt;
&lt;br /&gt;
==IT (Hardware and Software)==&lt;br /&gt;
===[[The GFI computing system]]===&lt;br /&gt;
===[[Using cyclone]]===&lt;br /&gt;
===[[Using modules on cyclone]]===&lt;br /&gt;
===[[Bedymo]]===&lt;br /&gt;
===[[Dynlib]]===&lt;br /&gt;
===[[Forecast plotting]]===&lt;br /&gt;
===[[Git]]===&lt;br /&gt;
===[[NCL]]===&lt;br /&gt;
===[[Python]]===&lt;br /&gt;
===[[WRF]]===&lt;br /&gt;
===[[OpenIFS]]===&lt;br /&gt;
===[[GFI&amp;amp;SKD Storage]]===&lt;br /&gt;
===(outdated) [[Using the queue system on skd-cyclone]]===&lt;br /&gt;
&lt;br /&gt;
==IsoMet Tools==&lt;br /&gt;
===[[FLEXPART]]===&lt;br /&gt;
===[[Lagranto]]===&lt;br /&gt;
===[[WaterSip]]===&lt;br /&gt;
===[[IsoMet Tools|Flextract]]===&lt;br /&gt;
&lt;br /&gt;
==Social Activities and Groups==&lt;br /&gt;
===[[Football]]===&lt;br /&gt;
===[[Gale Brewing Club]]===&lt;br /&gt;
===[[Geosupen]]===&lt;br /&gt;
===[[GFI-social]]===&lt;br /&gt;
===[[Kakeklubben]]===&lt;br /&gt;
===[[Music]]===&lt;br /&gt;
===[[PhD Forum]]===&lt;br /&gt;
===[[Schafkopf]]===&lt;br /&gt;
===[[Volleyball]]===&lt;br /&gt;
&lt;br /&gt;
[[Category:IT]]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
	<entry>
		<id>http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1277</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://gfi.wiki.uib.no/index.php?title=Main_Page&amp;diff=1277"/>
		<updated>2020-04-21T21:07:25Z</updated>

		<summary type="html">&lt;p&gt;Hso039: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Geophysical Institute ==&lt;br /&gt;
&lt;br /&gt;
[[File:GFI.jpg]]&lt;br /&gt;
&lt;br /&gt;
==[[Teaching]]==&lt;br /&gt;
&lt;br /&gt;
==Research and PhD/Postdoc Groups==&lt;br /&gt;
===[[Meteorology]]===&lt;br /&gt;
===[[ResClim Bergen subgroup]]===&lt;br /&gt;
===[[Physical Oceanography group]]===&lt;br /&gt;
&lt;br /&gt;
==Observations==&lt;br /&gt;
===[[ITAS Automatic Weather Stations]]===&lt;br /&gt;
===[[MRR Micro Rain Radar]]===&lt;br /&gt;
===[[TPS-3100 Hotplate pluviometer]]===&lt;br /&gt;
===[[Parsivel2 Disdrometer]]===&lt;br /&gt;
===[[HOBO rain gauges]]===&lt;br /&gt;
===[[EasyLog temperature logger]]===&lt;br /&gt;
===[[Kristine Bonnevie shiplog data]]===&lt;br /&gt;
===[[Joining several data files with CDO and IsoFuse]]===&lt;br /&gt;
&lt;br /&gt;
==Shared data sets==&lt;br /&gt;
===[[ERA5 reanalysis data]]===&lt;br /&gt;
&lt;br /&gt;
==IT (Hardware and Software)==&lt;br /&gt;
===[[The GFI computing system]]===&lt;br /&gt;
===[[Using cyclone]]===&lt;br /&gt;
===[[Using modules on cyclone]]===&lt;br /&gt;
===[[Bedymo]]===&lt;br /&gt;
===[[Dynlib]]===&lt;br /&gt;
===[[Forecast plotting]]===&lt;br /&gt;
===[[Git]]===&lt;br /&gt;
===[[NCL]]===&lt;br /&gt;
===[[Python]]===&lt;br /&gt;
===[[WRF]]===&lt;br /&gt;
===[[OpenIFS]]===&lt;br /&gt;
===[[GFI&amp;amp;SKD Storage]]===&lt;br /&gt;
===(outdated) [[Using the queue system on skd-cyclone]]===&lt;br /&gt;
&lt;br /&gt;
==IsoMet Tools==&lt;br /&gt;
===[[FLEXPART]]===&lt;br /&gt;
===[[Lagranto]]===&lt;br /&gt;
===[[WaterSip]]===&lt;br /&gt;
===[[Flextract|IsoMet Tools]]===&lt;br /&gt;
&lt;br /&gt;
==Social Activities and Groups==&lt;br /&gt;
===[[Football]]===&lt;br /&gt;
===[[Gale Brewing Club]]===&lt;br /&gt;
===[[Geosupen]]===&lt;br /&gt;
===[[GFI-social]]===&lt;br /&gt;
===[[Kakeklubben]]===&lt;br /&gt;
===[[Music]]===&lt;br /&gt;
===[[PhD Forum]]===&lt;br /&gt;
===[[Schafkopf]]===&lt;br /&gt;
===[[Volleyball]]===&lt;br /&gt;
&lt;br /&gt;
[[Category:IT]]&lt;/div&gt;</summary>
		<author><name>Hso039</name></author>
	</entry>
</feed>