Quantitative experiments: Part 6
Hello and welcome to this video series
about implementing and interpreting a quantitative experiment with Ariane.
We are going to interpret the results of our quantitative experiment
that can be found in the NetCDF files
'ariane_positions_quantitative.nc'
and 'ariane_statistics_quantitatives.nc'.
Let's open a terminal window,
and go to the directory of
our last quantitative experiment.
We will display its contents.
Previously, we obtained our results
by removing the particles that did not reach an interception section
and applying the same integration time for all particles.
We then analysed the results in the 'stats.txt' file.
In this video we will look at
the contents of 'ariane_positions_quantitative.nc'
and 'ariane_statistics_quantitative.nc'.
To do this, we will use the 'ncdump' command
with the '-h' option to see the contents of 'ariane_positions_quantitative.nc'.
Let's move to the beginning of the file.
In this file we have
the initial positions of all the particles of our quantitative experiment
and the final positions of all our particles on the intercept sections.
There is no information about the trajectories of our particles.
Here, we can make an analogy here with the file
produced when we do a qualitative experiment:
'ariane_trajectories_qualitatives.nc'
in which we had the initial and final positions of our particles.
In 'ariane_positions_quantitative',
Ariane will save the initial and final positions,
but no information about the trajectories will be saved.
Ariane will save two types of information:
First, the initial and final positions for location and time
as table indices,
which will be found in 'init_x', 'init_y', 'init_z' and 'init_t'.
Second, we will also have information on the age
and the transport associated with each of the particles.
Let's recall that each particle has a specific transport associated with it.
We will have the information in terms of table indices
about the final position of our particles on the interception sections:
'final_x', 'final_y', 'final_z', 'final_t', 'final_age', 'final_transp',
with 'final transport' being equivalent to 'initial transport'.
Then we have information about the section
on which our particles have been intercepted ('final_sections'),
and about the initial and final positions of our particles
in terms of longitude, latitude and depth
for each particle.
This was an overview of what is saved in 'ariane_positions_quantitative'.
This information is useful if we recall
the qualitative backward experiment we did from a forward experiment.
We could start from this quantitative experiment
and the initial or final positions of our particles
to carry out a qualitative experiment
to get information along the trajectory
of the particles that were positioned by Ariane on the initial section.
Please see our video about performing
a backward quantitative experiment
from a forward qualitative experiment.
We will now move on to the content
of the other result file: 'ariane_statistics_quantitative.nc'.
Let's go to the beginning of the file.
We have a set of variables that we are going to go through
with the help of a few slides.
This slide represents
a very simple model
with 5 mesh squares in longitude,
3 mesh squares in latitude and 3 vertical levels.
The cells shown in grey represent the Earth.
We have positioned a 'section 1' here,
a 'section 2' along a longitude
and a 'section 3' along a latitude.
We have also represented the particles
that were positioned by Ariane.
Each particle has a different transport:
they are called 'T1', 'T2', 'T3', 'T4', 'T5' and 'T6'.
In a qualitative experiment,
Ariane will integrate these particles from section 1 to an interception section,
either section 2, section 3 or section 1.
All these trajectories are represented here in 3D.
The green particles
on the initial section will reach section 3,
the blue particles will reach section 2
and the red particle will return to the initial section.
Everything is happening in 3D in Ariane.
For storage capacity reasons,
we will save our statistical results not in 3D,
but in 2D in our NetCDF file.
To do this, we will integrate our trajectories in one direction.
Let's start to integrate vertically.
That is why we are going to watch our 3D diagram from above,
as we can see on this slide.
Section 1 is now at the top of the slide,
section 2 is on the left hand side,
section 3 is at the bottom of the slide,
and the land points are here in grey.
We have our trajectories seen from above.
This is a 2D projection of our 3D information.
We are going to reuse a convention that was developed
by Blanke et al. in their 1999 paper,
which you will find in the appendix.
This convention allows us to recalculate a streamfunction
from the transport information of each of the particles
as they pass through the mesh of the model.
One of our goals is to obtain this streamfunction
in our quantitative experiment.
Using the equation
from the Blanke et al. paper,
we see that we can recalculate
the streamfunction, which is located at the top
of a mesh centred at T
in Arakawa's convention for a C grid.
We can recalculate the streamfunction
using either meridian or zonal transports
using the equations shown here.
If we calculate the difference of the meridian transports, we obtain this streamfunction.
If we calculate the difference of the zonal transports, we obtain this streamfunction at this point.
Knowing that we can use this method
to calculate our streamfunction,
we can apply it to the results of our quantitative experiment.
Let's go back to the previous diagram
with the trajectory of each of the particles.
For each of the mesh squares,
I will calculate the sum of the transports
following the convention defined earlier.
On section 1,
since my transports cross my meridian faces
from north to south,
I will put '-T1' for the first particle, minus 'T2'.
This is the sum of the transports for the surface
of this mesh square in meridian.
I will do the same thing for all the other particles.
We are going to follow one particle
and see how it adds up on each mesh square.
I'll take for example particle 'T3'
associated with transport 3.
Since it crosses the first meridian face of section 1
from north to south, it is going to be 'minus'
according to the convention established earlier.
Then, the particle is going to cross the cell
and come out from an eastern side.
When transport goes from west to east,
we take the positive transport.
So it is equal to '+T3'.
Then, the particle goes across the mesh square
to cross its southern section.
According to our convention, this is equal to '-T3'.
It goes through the mesh square, it crosses the south side
from north to south, so '-T3'.
Then, it goes through a zonal section
from east to west, so '-T3'.
It crosses a zonal section from east to west again, so '-T3',
and it finally reaches section 2 with '-T3'.
We will do this for each of the particles.
At each of the zonal or meridian points of a cell,
we will add or subtract the transport of each of the cells.
This property is interesting because,
the notion of non-divergence present in 3D
is kept in 2D.
Everything that goes into a cell comes out of it.
After following this convention,
we have the meridian transport
and the zonal transport for each of the cells of our model
for all particles that left section 1 and have reached a section of interception.
What will be saved in our NetCDF file
is the meridian information and the zonal information.
This is shown on this slide:
meridian information in pink and zonal information in yellow.
If we take this cell for instance,
we see that for this point,
we are going to add up the transports, taking into account
the direction of the particle when it crosses the mesh wall
following the meridian.
We are going to save the information and the transports
taking into account the direction in which our particle passes through the surface of a mesh
for zonal information.
This is what will be saved in our NetCDF file.
In the zonal 'x, y' variable,
we will have the sum of the transports
that cross the zonal phases
of a cell of our model,
taking into account the direction in which our particle crossed that face.
We also have the meridian information.
I have plotted all the saved points
that are larger than the region delimited by the sections.
This is why I put dark yellow cells and light yellow cells.
We have the same thing for the meridian data.
At the end, we have tables
with the same dimensions as our original tables,
for example 'u' and 'v', in our model,
'imt' for the number of points in longitude,
and 'jmt' for the number of points in latitude.
Let's go back to our terminal.
We see that, indeed, the first table
in 'ariane_statistics_quantitative.nc'
is 'x, y' zonal and 'x, y' meridian.
This is the transport information
taking into account their direction
across the zonal or meridian walls of our cells.
Just like we did when
integrating our information on the vertical axis,
the same can be done along the other axes.
We will have two more variables saved in our NetCDF file:
'xz_zonal' and 'xz_vert',
which are going to be an integration 'view'
of our particles according to the latitude
with respect to the 'x, z' axes.
Now we are going to calculate transport using a convention for direction,
which depends on how the particles will cross
the zonal or vertical walls of the mesh.
The same thing can be done
when integrating with respect to longitude
to obtain the 'yz_vert' and 'yz_mer' tables,
taking 'y, z' as the plane
and integrating with respect to 'x'.
We find this in our NetCDF file
with the variables 'xz_zonal',
'xz_vert',
'yz_mer'
and 'yz_vert'.
There are other variables, which we are going to present now.
What does 'xy_uh' represent?
It is the sum of the transports that pass through a zonal wall of a cell.
However, unlike the transports seen previously
we do not take into account
the direction in which the particles will pass through the wall.
That is, we add up the absolute value of all transports.
Why are we doing this?
Because we will need this information later on.
Remember that the particles have different weights.
When we calculate our statistics,
we will have to take into account the transport
associated with each of the particles.
Later on, we will see the usefulness of this variable.
So, 'xy_uh' represents the total transport
going through each of the zonal walls.
As seen previously,
we get information on the meridian walls of our cells
by adding up the absolute value of all the transports
that cross these meridian walls.
We find this information in the NetCDF file:
which are 'xy_uh',
and 'xy_vh'.
When we go from a 3D representation
to 2D statistical results,
we lose information on the average depth
of our statistics.
That is, the trajectories of our particles were not following a plane
but were moving along the whole vertical column.
In this case, we can save
the average depths encountered by the particles,
but these average depths will be weighted by transport.
This is what will be saved
for each of the faces in our model.
Now you know that we have information
on the zonal and meridian phases.
For the zonal phase, we have
'xy_zuh', which is the sum
(by convention, we will take this 'minus the depth', since depths are negative in Ariane)
times the transport associated with the particle.
We will sum all the transports and depths associated with particles.
This will give us average statistical information on depth
associated with transport which passes through each of the walls of our model.
We have information on the zonal phase
and on the meridian phase of our cells.
For statistical reasons, we will also save the square of the depth,
which will allow us to calculate the standard deviation,
and we will always take transport into account
because the particles have to be weighted by the transport.
Concerning the depth or the square of the depth,
using our previous variable,
which stored the sum of the transports,
all you have to do is to divide 'xy_zuh'
by the total transport
to obtain the average depth.
This is why we have saved the previous variables.
Let's go back to our file.
We have the variables 'xy_zuh',
'xy_z2uh', the square of the depth following the zonal faces,
and the meridian variables for depth and depth squared.
Finally, I have information on the 3D mask
for the point 'T' saved on the integration region of the particles.
I remind you that we have activated the 'ReducMem' function in the Namelist file
and, as a result, Ariane reads only a part of the data.
Thus, only a part of the 3D mask of the data will be saved.
This could help you if you decide to make graphical
representations of the streamfunction for example.
In my quantitative experiment I did not set
the 'key_alltracers' parameter to 'true' in the Namelist file.
That is, in my experiment, 'key_alltracers' is equal to 'false'.
This parameter allows us to include additional tracer parameters
for our particles, e.g., tracers about temperature, sanity and density.
In an experiment involving temperature, salinity or density
you will have, as with depth,
statistics about average temperature weighted by transport,
according to the zonal and meridian phases of our particle set.
You will have temperature and temperature squared,
salinity and salinity squared,
density and density squared.
In my experiment, I did not set 'key_alltracers = true'
but you can enable it if you have the information
on temperature and salinity of your particles.
The objective of all these statistics is to allow us
to represent the streamfunction graphically,
which connects the initial section to the other sections.
We will see that we can get a specific streamfunction
from an initial section to a chosen section.
Thanks to the information we have saved, we can display
the preferred path of our particles.
Here we see a path connecting
the initial section to the southern section.
This represents almost 20 sverdrups out of 22.
Some particles are intercepted by section 2 and section 5,
but the majority of the particles are intercepted by section 3.
We can see the preferred path of our particles.
We also see the intensity of the path.
When the curves are widely spaced, the intensity is low.
The closer the curves are to each other, the higher the intensity.
We see for example that some particles left the path,
swirled around for a while, here, and went out through section 3.
In this video we have explored and interpreted the content
of 'ariane_positions_quantitative' and 'ariane_statistics_quantitative' files.
In the next video, we will see how to plot this streamfunction
represented here on screen.
We will also see how to represent this streamfunction
by eliminating the particles that have been intercepted by sections 2 and 5.
Thank you and see you soon!