Quantitative experiments: Part 3
Hello and welcome to this video, which is part of a series of videos
on how to carry out an experiment in quantitative mode with Ariane.
After submitting our experiment to the Ariane application,
we will learn how to interpret the first results of this experiment
from the contents of the output file 'stats.txt',
which is the first file you should look at
after submitting a quantitative experiment.
This will be an opportunity to understand how to adapt the experiment
according to the first results obtained.
We will go back to where we left off
in the previous video
at the point of submitting the experiment to Ariane.
You now know how to submit your model.
As the experiment takes some time to run,
I have already run it in my directory
and we will look at the output of this experiment.
So, I interrupt this command line
because the experiment has already run
in order do this quicker.
If I list all the files in my directory,
I see that we have a number of new files.
To make this clearer, I have created a slide
containing the output files of our Ariane experiment.
As I said before, the most important file,
once the quantitative experiment has finished,
is 'stats.txt'.
In this video we will have a closer look at 'stats.txt'.
We also find other files in our output directory,
such as the file 'mod_criter[0 1 2].f90'.
We will see how to interpret and use them in other videos.
We also have two NetCDF files that contain the results:
of all the positions of our particles: 'ariane_positions_quantitative.nc'
and all the statistics of our quantitative experiment:
'ariane_statistics_quantitative.nc'.
We also have two other secondary files.
The first is 'ariane_output.txt', which contains all the information
that appears on the screen but which is also written in this file.
And we have the file 'ariane_memory.log', which tells us
about the evolution of memory usage in Ariane.
Let's go back to our directory...
We will look in detail at the content of the 'stats.txt' file.
To do this, I will use the 'vi' command
and I will display it on screen.
So the 'stats.txt' file, which is an easily readable ASCII file,
can be opened with 'vi'.
We will go through each line of this file in detail.
On the first line, we have 'total transport'.
which is expressed in Sverdrup (Sv), with a value of 24.92 Sv.
Another line here gives us extra information.
With the help of some slides I will give details
of the content of this 'total transport' value.
This slide shows the initial section.
In the case of this relatively simple experiment,
we have a vertical section,
section 1, which is the initial section,
between the Greenland coast and the Icelandic coast.
We can see an evolution in 'i' here, which corresponds to the longitudes,
while the latitude doesn't vary much
and the model's mesh goes from the surface to the bottom.
This section 1 has currents flowing through it.
Shown here in red with a '+' sign
are the currents entering our region.
In our 'sections.txt' file, we used '@'
to specify the interior of our region.
We also have currents leaving our region through this section.
These appear here in blue and with the '-' sign.
Here we are only interested in the incoming currents,
which are shown in red with the '+' sign.
Next, Ariane will instrument our section,
i.e. associate a particle to each of the transports that enter our region.
Each of the particles placed in the mesh square
will have a weight corresponding to the transport through that mesh square.
The greater the transport, the larger the diameter of the disc.
The lower the transport, the smaller the diameter of the disc.
Please note that in this case
we have entered in the Namelist file
a value of 1 * 10^9 m^3/s for the variable 'max_transport'.
For Ariane, this means
that if a transport that passes through a mesh square
is less than this value of 1 * 10^9,
we put only one particle.
So I told Ariane to put only one particle per mesh square.
As we have seen in other videos,
we can set a lower value for 'max_transport'.
Ariane will put more particles
if a strong transport goes through a mesh square.
So Ariane has put one particle per mesh square
and weighted each of these particles
with the transport through the mesh square.
In the Namelist file of our experiment,
we have defined 'lmin=1' and 'lmax=12',
i.e. we asked Ariane
to instrument the first 12 records, from 1 to 12.
So here the 12 sections are represented.
To simplify, I have shown all transports in the same way,
but let's not forget that the transport changes across section 1.
Ariane will put particles for each of the 12 sections
in order to instrument all the transports.
How will Ariane calculate the 'total transport' for the 'stats.txt' file?
For each of the records and sections
Ariane will sum the transport of the particles that have been instrumented.
So here 'tp1' represents the total transport through section 1
represented by our particles.
'tp2' represents the section of record 2,
'tp3' for record 3 and so on
up to 'tp12' for record 12.
'total transport' is the sum of tp1, tp2, tp3, ... tp12.
Since we want to know the average total transport,
we will divide 'total transport' by the number of records.
Here the number of records is 12,
this corresponds to 'lmax - lmin + 1'.
12 - 1 + 1 = 12.
We sum the total transport of each particle per section,
then we add the total transport of all sections,
and we divide by the number of sections or the number of records.
This is what 'total transport' represents in 'stats.txt'.
I return to 'stats.txt' and we move on to the next line.
'max_transport' is simply a carry-over of the value you entered in the Namelist file.
This is expressed not in m^3 but in Sv.
This corresponds to 10^9 m^3 or 1000 Sv.
An important number that you didn't know beforehand
is the number of particles used to instrument these 12 sections.
Ariane will use 12,156 particles
to instrument all transports through the initial section
for the first 12 records.
Let's move on to the next block,
shown here in white,
which is called the 'initial state'.
This is the initial position of our particles and their age.
So here we have 12,156 particles,
we have information about the minimum value, the maximum value,
the mean value and the standard deviation.
For 'x', which corresponds to the longitude in degrees east,
for 'y', which corresponds to the latitude in degrees north,
for 'z', which corresponds to the depth in metres,
(here the metres are positive)
and for 'a' which is the age.
For example, for our initial section we have on average
particles positioned at 33° W,
at latitude of 64°
(the section is positioned on a single latitude so it does not vary between min and max),
and an average depth of 763 metres.
All particles are initiated, so their age = 0.
Here, I would like to stress something very important:
to calculate these statistics
we take the weight of the particles into account.
That is, a particle that represents a high transport
will have a greater weight than a particle that represents low transport.
On this slide we can see this with an equation.
When you want to calculate an average statistic in Ariane,
you have to take the sum of your statistics associated with the particle,
but you still have to multiply it by the transport associated with the particle
in order to weight this value.
Next we need to nondimensionalise the result
by dividing by the number of particles, but also by the total transport.
This is a very important point if you want to run your own statistics,
you should always weight the variable you use
by the transport associated with the particles.
This is the case in the file 'stats.txt'.
Let's move on to the second block,
which gives us details
about the transport that passes through the interception sections.
Section 1 is a bit special
because it is the section from which the particles are emitted,
but it's also a section that will intercept particles.
This is represented here by 'meanders'.
These are the particles that both left section 1 and return to section 1.
So we see that out of 24.92 Sv,
we have 8.77 Sv coming back to section 1.
Here, section 1 is a transmitting section and no longer an interception section.
We then have section 2 located in the Labrador,
which intercepts 0.29 Sv.
The southern section, which was of particular interest to us,
intercepts only 0.6 Sv.
A small section in Gibraltar also intercepts a few particles.
Section 5, which lies between Iceland and Norway, intercepts 2.54 Sv.
Also, we also put a 'lid' section,
which intercepts 0 Sv, so no particles
escaped through the surface of our model.
The total sum of intercepted transports
is not equal to 24.92 Sv as one would expect.
A large part, almost half,
of our particles were not intercepted at all.
This is equivalent to saying
that the particles emitted by section 1
were then integrated over a period of 20 years
and over these 20 years they didn't reach any interception section.
So they are somewhere in our domain.
They may have been trapped by eddies or gyres.
In 20 years, they haven't had the opportunity to cross a section.
An important point to note in our experiment:
it seems that our time series is not long enough
to allow the particles to reach a section,
or that our region is too large
compared with our 20-year time series.
We see, for example, that very few particles reach section 3.
So we have several options.
Either we extend our time series,
but 20 years of data is not easy to handle;
or we reduce the scope of our study area,
which is what we will do next.
Let's move on to the details of each section,
giving the information on the initial position
and on the final position of the particles on the interception section.
We will start with first interception section, the 'meanders' section.
Here, Section 1 is the interception section.
Of all the particles,
5,311 particles return to section 1.
Here we have the statistics of the initial positions,
(positions on the initialisation section 1).
We will look at the average.
On average, the particles start at a longitude of 32° W,
and a latitude of 64° N.
Their average depth is 802 metres,
and their age at the time they are reintercepted is 2656.
Here, it's important to know in what units we are talking.
I recommend you watch the video that talks about the 't-cycle' variable in the Namelist file.
Remember, if the 't-cycle' variable is set to 0,
or if you don't put it in the Namelist file,
the age of the particles is normalised between 0 and 1.
In contrast, in the present experiment,
we have set 't-cycle' to 86,400 seconds (= 1 day),
so here the age is expressed in days.
When the particles will have returned to the initial section,
they will be on average 2656 days old.
Here, we have the statistics of the final positions of our particles on section 1.
On average there has been a shift in longitude.
We have gone from 32° W to 28° W.
We are obviously on the same latitude.
For the depth, our particles have gone from from 802 metres to 197 metres,
i.e. they moved closer to the surface.
They took 2656 days, on average, to return to section 1.
So their journey was relatively long.
For example, they were not just caught in a whirlpool,
which would have made them return to section 1 very quickly.
The 'youngest' particle for example
took only half a day to return to section 1.
Other particles took much longer to return to section 1.
We have statistics on all the interception sections.
For the Labrador section, we have 344 particles,
and we have information
on the statistics of the initial positions on section 1
and on the positions on the final section (Labrador).
We have information on the southern section (section 3)
with only 256 particles intercepted.
We expected more.
Our time series must be too short compared with the size of our region.
We will see how to decrease the size of our region.
Here we have some statistics,
with the average starting positions on section 1
for the particles that reached section 3 at the end.
We see, for example, that the particles
have gone from 649 metres to 2313 metres in depth
and took an average of 4797 days
to reach section 3 (south).
We have similar information for Gibraltar,
and we have information for section 5,
between Iceland and Norway, which I won't go into now.
As we have seen, this 'stats.txt' file
contains a lot of important information and gives us an overview
of our quantitative experiment and its results.
Are these results what we expected?
Are we happy with them?
We have some information to correct.
What we need to remember about the 'stats.txt' file,
is that our domain is too large, and section 3 is too far south.
So we will move section 3 further north,
between the European coast and the North American coast,
so as to allow particles to reach section 3 more easily
during our 20-year time series.
We are going to base what follows on scientific research.
Here, this is the article by Thierry Huck from May 2010,
which gives us an overview of the currents observed in this region.
We see that our section 1
allows two transports in particular (shown in light orange and blue),
which will reach section 3 here.
That is what we are going to concentrate on now.
To do this, I'm going to submit another experiment.
I'm going to exit from my 'Exp0' directory
and create another one, which I will call 'Exp1'.
Let's go to my 'Exp1' directory,
and copy the files I need from 'Exp0',
especially the Namelist file, which is very important.
I will also copy the 'segrid' file
which is needed to position our sections.
We will now modify section 3 in the south
and move it further north.
We will create symbolic links
for the Ariane executables.
And we will recreate a symbolic link for the calculation
of the file 'section.txt' by Ariane.
Now I have all these files in my directory.
I will edit the 'segrid' file using NEdit,
as you now know how to do.
I will change the font.
I'm positioning myself on my domain
and on the 'segrid' file of 'Exp0'.
I need to find the sections I had before.
I will now remove section 3.
I remind you that you have to click on 'CTRL' to select your data.
I'm going to put back the character for the ocean.
I'm deleting the Gibraltar section too, as it's no longer needed.
I'm going back to my region.
Now I place a new section number 3
between Europe and North America.
My domain is not completely closed, as particles could escape here.
So I will close my domain, like with Gibraltar,
by putting a small section here.
Now I've created a new closed domain, with section 3 further north.
The '@' is still here and reminds me of which section I'm in.
Let's save the file
and put it aside.
I'm going to run the 'mkseg' command, which will generate the 'sections.txt' file.
The 'sections.txt' file will be generated.
Next, I will resubmit my simulation with my border further north.
I have my 'sections.txt' and 'region_limits' files, needed for this quantitative experiment.
I will resubmit my experiment to Ariane.
My experiment has now run and I have the results in my directory.
We will edit the 'stats.txt' file to see if there has been any change in our statistics.
We see that the value for 'total transport' has not changed.
The section is the same and we still integrate between 'lmin' and 'lmax' from 1 to 12.
We have the same number of particles: 12,156.
However, we see that there is a change in our statistics
that is going in the right direction.
Section 3, the southernmost section,
intercepted almost all of
of the transport that passed through section 1.
This agrees with Thierry Huck's article of May 2010.
We note, however, that there were still some particles
that were never intercepted over the 20 years of integration.
In the next video, we will see how to solve this problem.
In this video, we learned how to interpret the results of the 'stats.txt' file,
which is the main file to be consulted after submitting an experiment to Ariane in quantitative mode.
The interpretation of these files allowed us to adapt our quantitative experiment
in order to follow the water masses in the strait between Greenland and Iceland
and better intercept them east of Newfoundland:
the 'Deepwater Boundary Current'.
We will continue to learn how to interpret the contents of the 'stats.txt' file
to increase the robustness of our statistics
by removing the lost particles
and giving the particles the same integration time
using criteria contained in the file 'mod_criter1.f90'.
Thank you and see you soon!