Configure a Lagrangian diagnostic: The Namelist file part 2/4
Now we will move on to a very important tab.
When you run your mouse over 'Diagnostic modes',
it will give some important explanations.
Two modes exist: qualitative and quantitative.
These have been described in earlier videos
made by my colleague Bruno
on the theory behind Ariane,
and how to use it
to answer your scientific questions.
I'll come back briefly to the qualitative mode:
it’s you who positions particles 'by hand'
in your stream.
and Ariane will advect them over time, in 3-D,
either forward or backward.
In quantitative mode, you give Ariane
the sections where your particles should start from
and the sections where your particles should arrive.
Ariane will implement the initial section
in order to represent the current transports
and represent the water masses
that go from your initial section to your final section.
I remind you that there are explanations of this in the earlier videos.
If you select the qualitative mode,
you need to fill in some information.
Qualitative means that you position a particle in your model.
Ariane will calculate a trajectory,
and what you want to obtain
are the points along this path.
You need to enter the output frequency along this path.
It's rather the same strategy
as the one presented before
on the output recordings of the model.
How do we fill in the duration of a recording?
Here we represent 7 hours.
We'll ask Ariane
to save the positions of the particle
along the trajectory.
We'll also tell Ariane when we want to do this.
So we have two variables to fill in: 'delta_t',
which plays the role of 'tunit'.
So here I'm asking for a day in seconds.
This is the output frequency.
For example, I want a daily frequency.
Along the trajectory, I want
a position to be saved every day
in my Ariane output file.
As for the duration of a recording,
I could request a recording every hour.
I just have to change this.
If I want a recording every 12 hours,
I just need to change the 'frequency' parameter.
So you can modify all the parameters
that interest you.
Some examples are shown
when you move the mouse over this parameter.
After the output frequency along the trajectory,
you need to enter the number of points
along this trajectory.
Let's go back, for example,
to one output per day,
at a rate of one output per day for 30 days.
I'll fill in 'nb_output'.
For example, if I want
to save in the output file
30 days,
I have to enter '30' here.
So in the output file I would then have 30 positions
of my particle, one for each day.
An important note
concerning the temporal sampling
of your model's outputs:
you need to decide the
type of sampling you want along your trajectory.
Let's say I have the outputs of a model
every 30 days.
I have entered 30 days in seconds.
I request an output every day,
30 times.
So my 30-day period is covered,
but the frequency along my trajectory is much higher
than the frequency at the output of the model.
You have to be careful, and Bruno's theory videos explain this,
because Ariane can't give you
information on a finer scale here.
When the model puts out 30-day averages,
it smoothes out some information.
It’s not by asking for a frequency
along the output trajectory,
at a higher frequency than your model output
that you’ll get more accurate information.
By default, I advise you to start
by asking for the same output frequency
as the one of your model.
Here you would change the number of outputs
to match the number of available times.
The last parameter in this part is 'key_region'.
The default is 'FALSE'.
But if you have rerun a qualitative experiment,
from a quantitative experiment (possible in Ariane),
it may only be necessary to reread
The NetCDF data from the region
selected in the quantitative part.
By default put 'FALSE', unless you know what you are doing!
We will now see, for a quantitative experiment,
the information that it is important to fill in.
We will associate a maximum transport with a particle.
Remember that in the quantitative case,
Ariane will automatically implement
a section,
generally a vertical one,
with particles.
Each of the particles is placed by default
in the centre of the mesh, at point ’T’,
and will have a different transport from one mesh to another.
This is where you enter the 'max transport' associated with a particle.
A high value (in cubic metres per second) is used deliberately,
to force Ariane to put only ONE particle per mesh.
If we decrease this value
below a certain threshold
Ariane adds more particles per mesh
to cover the transport through this mesh.
I refer you, once more, to the videos by Bruno
that explain this perfectly.
If you don't know what to put,
the default value that you set
is 1.10^9.
This value puts a single particle per mesh,
but each particle
will be associated with a different transport.
Next we need to define the duration
during which we will implement
the sections we have positioned.
We are not going to use time values
(seconds, minutes, days or months),
our unit will be the number of recordings.
'lmin' is the first recording
in which Ariane should start
implementing your section.
'lmax', which must be >= 'lmin'
(For example, we will put 10).
This is up to the 10th recording
that Ariane must implement
the starting section.
From 'lmin' to 'lmax' Ariane will
calculate the transport through your section
and implement this section with
the number of particles required
to represent the whole transport
that will have passed through this section.
'lmin' and 'lmax' are very important.
We'll come back to this,
to see how to position them according to your scientific questions,
in the videos on quantitative experiments.
The next parameter, 'key_reducmem',
is used to optimise
the use of your computer's memory.
Set to 'TRUE', this allows us to
read only some of the NetCDF data
instead of reading the whole NetCDF file.
It will only read the region for
the sections you positioned
in the quantitative part.
I strongly advise you to put 'TRUE'.
This will require another file to be created,
which we'll see about in the quantitative part.
We have more variables to fill in
that are of secondary importance.
We can choose the unit:
either sverdrups or m^3/sec.
We have the possibility to block
particles in a 2D layer
i.e. the particles are no longer
affected by the vertical current.
Ariane can be prevented from performing
certain complex calculations
that provide additional information.
By default, this option is set to 'TRUE'
to avoid doing these unnecessary calculations.
The last variable allows Ariane
to save tracers along the trajectory
such as temperature or salinity.
At the moment we are on the trajectory,
we have the possibility either to take
the four nearest points and interpolate
or to take the closest value.
I advise you to leave this value as 'FALSE'.
So we interpolate the four closest values
to get a more satisfactory result
than with a single value.
'Diagnostic modes' is very important
and the choice you make here
we will look at in the videos
dealing specifically with
the qualitative and quantitative modes.
Another point:
by default when you use
Ariane in qualitative mode
a text file must be specified
This is the idea of 'nobin', a text file.
In qualitative mode,
this is the file 'initial_positions.txt'.
We will look at this file in a future video.
In quantitative mode,
it is the file in which
your initial and final sections are positioned,
which is called 'sections.txt'.
As I said before,
it is possible with Ariane
to start from a previous experiment.
When Ariane is run
the result is a NetCDF file
in which is saved
the initial and final positions of the particles.
So we have the possibility,
by choosing 'bin', to ask Ariane
not to read back information from a text file
or calculate it automatically on a section,
but to retrieve this information
directly from a previous experiment.
So we'll position 'bin'.
in our Namelist file.
This assumes that we have a file
called 'ariane_initial.nc',
which refers to a previous experiment.
In this file we will have saved
the information about the initial position
and the final position of the particles.
This parameter tells us
if we restart from the initial position
or from the final position.
As Ariane works in offline mode
we have the possibility to integrate
the currents in a
positive or negative time direction:
'backward' or 'forward'.
So we have the choice between
taking the initial position
or the final position of our particle.
It is also possible, in some cases,
to reread the age of the particle.
Let's say that we do a first experiment,
we stop our particles,
and then we decide to restart
the particles from their final position,
taking into account their age,
and continue the integration of these particles.
This can be done
by selecting 'TRUE'.
By default, leave this on 'FALSE'.
The last parameter, 'subbin',
is very similar to 'bin',
except that this time
we'll also give Ariane
the file 'subset.txt'
in which we give the number
of the particles we want to keep.
Let's imagine that we have done an experiment with Ariane
and that from the results of this experiment
we want to start a new experiment.
We take the NetCDF binary file.
For example, we ask to resume
the initial positions of the particles
but without taking all the particles,
only some particles.
Thanks to the 'subbin' mode,
we can select just
the desired particles.
This is especially important
in the case of a quantitative experiment.
Imagine you have an initial section,
but you have several end sections.
For example, say you only want to select
those particles that start from the initial section
and go to final section 'x'.
Then, suppose you repeat the experiment
with only those particles
that start from the initial section
and go to final section 'y'.
You can do this with the 'subbin' mode.
We'll look at this in more detail
in later videos on the quantitative mode.
Another important point,
which is perhaps a weakness of Ariane:
Ariane can't detect
the number of particles
that we will use.
This must be filled in with the variable 'nmax'.
How many particles should be used?
Too many particles
will saturate the computer memory unnecessarily.
With too few particles, Ariane stops
and tells us that 'nmax' is too low.
If you do a qualitative experiment,
it's quite simple: you fill in
the number of particles in a text file.
Just count the number of lines in the file
to fill in 'nmax'.
In a quantitative experiment
where Ariane implements a section
and decides on the number of particles,
you don't know how many there are.
In this case it is better to choose a value
that is reasonably high.
When you've run your first quantitative experiment,
you will have an idea
of the number of particles.
So for the following experiments
you can adjust the value of 'nmax'.
When you run Ariane and receive the message
'nmax' too low,
it's this parameter that you will have to change
in your Namelist file.
Here again, you get some more information
when you run your mouse
over the name of this variable.
The next parameter is simple to understand.
Ariane runs in offline mode
and has the possibility to integrate the particles
either forwards
or backwards in time.
We choose to integrate the particles
in the forward direction
or in the backward direction.
In forward mode, we take the value of the currents
‘U’, ‘V’ and ‘W’ if necessary (or specified)
to integrate the particle in 3D.
In backward mode, we take the inverse of these currents.
A brief note: in Ariane's qualitative mode, you can
position a particle, integrate it for a while,
start from the outputs of the Ariane model
from the final position of this particle
and reintegrate over time.
Normally your particle should finish in
exactly the same position.
We have just seen many important aspects of Namelist.
Let's stop there.
We'll look at the rest in the next video.
Thank you!