Quantitative experiments: Part 4
Hello and welcome to this video series about
conducting a quantitative experiment with Ariane.
We will continue to interpret the first results of our quantitative experiment
from the contents of the file 'stats.txt' and to improve them.
We will learn how to remove particles that have not reached
an interception section identified by 'LOST' in the 'stats.txt' file.
To do this, we will learn to submit a new quantitative experiment
based on the initial positions of the particles
of the previous quantitative experiment,
selecting only those that have reached a section.
Our objective is to increase the robustness of Ariane's statistical results.
We will start from the directory of our previous experiment (Exp1),
in which we moved section 3 a little further north.
Let's display the files we had on screen.
Together, we looked at the contents of the 'stats.txt' file.
For each of the interception sections,
we saw that 20 Sverdrups (Sv) reached section 3
out of the 24 Sv that left the initial section.
We also found that 2 Sv of particles were lost in our domain,
i.e. these particles did not reach an interception section.
Let's have a look at what happens in our experiment.
Here, we have our domain region with the boundaries (sections) we put in.
The initial section is shown here with '1s'
and these coloured arrows
represent the transport of the particles to the different sections.
The red arrow represents the particles returning to section 1.
The green arrow represents the particles going to section 5.
The blue arrow represents the particles going to section 3.
The black arrows represent the particles going to the two sections 2.
The yellow arrow represents the particles that left
but did not reach a section during the integration time of our experiment.
Particles can be integrated over a number of years,
but despite this, these did not reached a section.
These particles, which represent 2 Sv of transport,
need to be removed from our statistics
in order to make them more robust.
Let's see how we can do that.
We are going to create a new directory
and we'll call it 'Exp1_nolost'.
Let's go into in this directory.
We'll copy over several files from the 'Exp1' directory.
In particular, we will copy
the Namelist file,
which is very important.
We're also going to copy the information
about our study area: 'section.txt'
We also need to copy the 'region_limits' file.
Let's create a symbolic link to the Ariane executable.
Here I am going to repeat what we did in experiment 1.
We are going to create a second very important link,
a symbolic link to a file of 'Exp1':
the NetCDF file created by Ariane,
which contains the initial and final positions of our particles
from experiment 1 ('ariane_positions_quantitative.nc').
So I'm going to point to this file
and I'm going to call it 'ariane_initial.nc'.
It's very important to use that name
in the 'Exp1_nolost' directory.
I will now edit all the files I have in my directory.
I have the Namelist, 'sections.txt' and 'region_limits' files.
I point to the Ariane executable
because I will have to submit this experiment again.
I have a symbolic link: 'ariane_initial.nc'
that points to the 'Exp1' result file in which we have
the initial and final positions of our particles.
Now we have to adapt our experiment.
To do this, we will edit the Namelist file and change some parameters.
For the parameter 'bin', we are going to replace 'nobin' by 'subbin'.
We also need to change 'init_final'.
In the file, which contains the initial and final positions of our particles,
we need to say whether we want the initial or the final positions.
Here, it turns out that we have already filled in the information.
We set 'init_final' to 'init'.
We will reuse the initial positions of our particles.
That's all we need to change for the Namelist file.
Now, we will use a shell script that is available in the Ariane package.
In the 'examples/shell_scripts/' directory,
you have the 'subset_reach_sections.sh' file,
which you will copy into your main directory.
For this shell script to work,
the NCO toolkit must be installed on your computer.
For more information, please consult the NetCDF operator (NCO) web page.
If necessary, you will need to make this shell executable.
In this case, we can add execute permissions to this shell file.
Let's submit the file and see what happens in our directory.
While the script is running, we see that
the number of selected particles is displayed.
If I reopen the previous 'stats.txt' file,
we see that 12,156 particles
were emitted from section 1.
We now see that among these 12,000 or so emitted particles,
only 11,248 have reached a section.
The 'subset_reach_sections.sh' shell script
has created a file called 'subset.txt'.
If we open this 'subset.txt' file,
the first column shows the particle number,
and the second column shows the section that the particle has reached.
e.g. the first retained particle is particle 2,
which came back to the initial section (aka 'section 0' or 'meanders').
Particle number 3 has reached section 3,
and so on for the 11,000 retained particles.
Thanks to the symbolic link 'ariane_initial.nc',
the 'subset.txt' file, and the changes we made to the Namelist file,
Ariane will not re-instrument initial section 1,
but will take the particles retained in the 'subset.txt' file
and restart the exact same experiment as in the 'Exp1' directory.
Let's resubmit our Ariane experiment, it is going to take a while.
We now have the results displayed in our directory.
Let's have a closer look at the 'stats.txt' file.
In this file, we now see that:
- 'total transport' has gone down from 24 Sv to 22.7 Sv;
- there are less particles than in 'Exp1' (11,248 instead of 12,000 or so);
- the water mass transfer statistics between the different sections remain unchanged.
However, we see that none of the particles that failed to
reach a section have been taken into account in our new statistics,
which is what we wanted to achieve.
In this video, we have continued to interpret the results of the 'stats.txt' file.
We found that some ('lost') particles failed to reach an interception section,
and that it made our results noisy.
We saw how to reuse a previous quantitative experiment
by selecting only those particles that reached a section.
We have seen that, in this second case,
the particles that did not reach a section could be removed from our statistics.
Next time, we will see how to constrain the integration time of the particles
using criteria built into the Ariane source code.
Thank you and see you soon!