In this tutorial we describe how to calculate species distribution along depth (3D) in marine habitats with ModestR. In this way, if you have occurrences with depth information from a species, and environmental/climatic data for different depths (such as those from NOAA or Copernicus), with ModestR you can calculate species distribution in 3D, for each depth where the species is present
Pathways to sustainable trade and system dynamic simulation
19. Calculating 3D species distribution in marine habitats with ModestR (Version ModestR 5.6 or higher)
1. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Step by step tutorial:
Calculating 3D species
distribution in marine
habitats with ModestR
2. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
What do you need for this tutorial:
1. ModestR v.5.6 or higher installed
2. Internet connection
3. About 25 minutes
ModestR software can be freely downloaded from http://www.ipez.es/ModestR
3. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
We’ll describe how to calculate species
distribution along depth (3D) in marine
habitats with ModestR.
Follow the next steps!
4. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
To calculate species distribution along depth, we’ll need species occurrences with depth values
For this tutorial we’ll later provide a sample CSV file with a virtual
species generated using the “virtualspecies” package from R, and
the environmental variables from the World Ocean Atlas.
They can come from GBIF, or from a CSV file like this one
5. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
To calculate species distribution along depth, we’ll also need environmental data for the range of depth we want to work with.
There are different datasets freely available, such as NOOA’s World Ocean Atlas or Copernicus Marine.
For this tutorial we’ll use World Ocean Atlas (WOA) data 2013 version.
To download and integrate these data in ModestR, follow
“Tutorial 9- Adding NOAA´s Word Ocean Atlas data to ModestR”
You can find it in the ModestR tutorials page:
http://www.ipez.es/ModestR/Manual_Tutorial.html
6. 1) Select menu “Options / Preferences”
2) To use Spanish format (default):
Decimal separator “ , “
Field separator “ ; “
To use English format :
Decimal separator “ . “
Field separator “ , “
For this tutorial you’ll find a sample file “Single_Virtual_Species_Occurrences_for_Tutorial_19”.
You can choose it between two CSV options: Format Spanish / Format English
You may select the format depending on the configuration in the "Options / Preferences" menu of the "CSV Exportation
Options" section of any of the ModestR applications.
For example in ModestR DataBase Manager you can find it:
7. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
2) Go to menu “File/Import/Occurrence data
from CSV file” then select the downloaded
CSV file
1) Run ModestR MapMaker
Download the file “Single_Virtual_Species_Occurrences_for_Tutorial_19” from next link:
CSV in Spanish Format / CSV in English Format
Then import it from MapMaker
8. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
When importing occurrences to ModestR, you have to select the valid habitats for the species and to indicate
that depth value has to be imported
2) In the dialog box just
check the “Sea” habitat
3)Then click on “Accept”
4) Import completed
Then click on “Accept”
1)Be sure of adding Depth as field to be
imported in the third column.
The columns to be imported and their
order will depend on the format for the
specific CSV file
9. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Once occurrences imported ModestR checks the habitats and indicates when occurrences are in an invalid habitat for
the species using another color. Those occurrences are shown but are not used in any analysis or calculation
Invalid occurrences (here in black) are
occurrences located in habitats not valid for the
species. As we indicated that only sea was valid
for this species, invalid occurrences are those
located in land or freshwater habitats.
10. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
NOO3D can be used to calculate a density map that shows species suitability along a 3th dimension
(such as depth in this tutorial), or to calculate a distribution. We’ll first start with the density map
1) Go to menu Mapping/Niche of occurrence/Density Map
More details about what are compounded environmental layers can be found in
ModestR User’s Manual on ModestR website.
A tutorial about compounded environmental layers creation can also be found at
http://www.ipez.es/ModestR/Manual_Tutorial.html
11. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Next step is creating or selecting an existing 2D or 3D CEL (Compounded Environmental Layer).
A CEL will bind together several enviromental variables in a single multidimensional variable. In this case we’ll
create a new 3D CEL using the World Ocean Atlas (WOA) data we have imported previously (see Tutorial 9)
1) Select “Create a new 3D CEL”
More details about what are compounded
environmental layers can be found in ModestR User’s
Manual on ModestR website.
A tutorial about compounded environmental layers
creation can also be found at
http://www.ipez.es/ModestR/Manual_Tutorial.html2) Click “Accept”
If other previously created and stored
CEL’s exist, they will be show here
12. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
When creating a 3D CEL, only 3D datasets will be displayed among the candidate variables.
You have to select the whished variables you want to work with.
1) For this example, in the dialog box that will be
shown, select all the variables from WOA
2) But we’ll change that, selecting “Adjust to
occurrence Z values range”.
In this way the range of the distribution model to be
calculated will be limited to the depth range where
there are ocurrences of the species (in this case,
from 0m to 200m)
By default, NOO3D modelling will be done for the whole
range covered by the selected variables, which in this
case would be the depth range from 0m to 5500m
We’ll maintain the default value of “Full extent” to
calculate the distribution using the whole range of the
environmental variables. In this case, this range are
the worldwide marine habitats.
Other options are working only on the Extent of
Occurrence of the species or on a specific shape
(countries, regions, etc.) 3) Click on “Continue”
13. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
1) Click on “Calculate VIF “
In the next step you can calculate VIF (Variance Inflation Factor)
of the variables to detect collinearity and, optionally, delete
some variables that may be redundant
14. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
You can select a variable an delete it from the list.
VIF will be recalculated with the remaining variables. You
can continue deleting other variables, until VIF is considered
acceptable (tipically when VIF<30)
For this example we’ll delete variables
ApparentOxygenUtilization and Oxygen. We’ll keep the
remaining variables.
VIF of each variable is shown
VIF >30 is shown in red.
3) Click on “Continue”
2) Select a variable and click on “Delete selected“
(delete ApparentOxygenUtilization and Oxygen)
Note.- to select several variables keep Ctrl key pressed while selecting.
15. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
In the next step you can calculate the relative relevance of each variable regarding the species distribution using a
Instability Index (see https://doi.org/10.1016/j.ecoinf.2016.11.004 for more information).
This can help you selecting the most relevant variables for the species
1) Select “Use only occurrences with depth value” (which is the default). In
this way, only the occurrences of the species with a depth value will be
used to calculate its niche.
Another option is using all ocurrences, then assigning some specific value
to the occurrences without a depth value, such as the mean depth of the
ocurrences with a depth value, or a specific value entered by the user.
2) Select “Use occurrences Z value range” (which is the default). In this
way the range to be used for this analisys will be limited to the depth range
where there are occurrences of the species (in this case, from 0m to
200m).
3) Click on “Analyse”
Z meaning is set by default to Depth because this is the Z
meaning we previously assigned to the variables we imported.
Those settings should be different when 3th dimension is not depth but time, for example.
An example of using time as 3th dimension to assess species distribution in different
climatic change scenarios is described in Tutorial 17. it can be found in
http://www.ipez.es/ModestR/Manual_Tutorial.html
16. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Contribution of each variable will appear
4) Click on “Continue”
Most relevant variables
will be automatically
selected.
17. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
In the next step variables are optimally ordered in the polar space using they correlation matrix.
You can eventually reorder variables, but the most of the time you’ll just continue
Click on “Continue”
18. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
In the next step, the 3DCEL is generated and shown in the polar coordinates system
Here the current environmental data are projected on
polar coordinates system. The result is a tridimensional
representation of the different environmental conditions
for each year
2) Click on “3D View”
to open a 3D viewer
and show the 3DCEL
in a 3D view.
1) Click on those cursor buttons to
see the different layers of the
3DCEL. There is one layer for each
depth of the used variables
19. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
4) Click on “Continue”
2) Click on “Show in map” to show the CEL for the currently selected
depth in the world map.
Take into account that a CEL contains only environmental variables. It will
be employed to calculate the species distribution, but it is not related
with a specific species.
20. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
In the last step, you can optionally save this 3D CEL to be used later. Or you can just load it for the current worksession.
For this example we’ll save it to use it later
1) Enter a name
2) Click on “Save 3D layer”
4) Click on “Continue”
3) When save completed,
click on “Continue”
21. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
3) Click on “Continue”
This indicates that NOO3D will generate a model for the depth
range where there are occurrences of the species
1) “Use only occurrences with depth value”
(which is the default)
Z meaning is set to Depth because this is the Z meaning
assigned to the variables we imported.
Once a 3DCEL selected or built, we can perform the NOO3D using this CEL and the
species data.
We’ll have to be sure that the Z axis is Depth. In other contexts, for example when
modelling species for several years, we’ll most likely select Year as Z meaning.
22. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
2) Click “Run” to calculate density
1) We’ll leave “Smoothing” to 1.
But you can also test increasing it to 2 or 3
NOO3D uses a kernel density function to calculate the suitability of the
species. Therefore a smoothing parameter can be adjusted to take into account
the environmental tolerance of the species. The more a species is tolerant, the
higher we may adjust smoothing. Typical values range between 1 and 3
23. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Results will be displayed both in the world map, showing geographic density, and in the dialog, showing polar density map
You can see the density for each Z
(depth) value of the 3D CEL using the
button bar
You can also open the 3D view using the
3D View button
Probability and density rasters can
be saved to files using this button
24. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
If you click the 3D View button you’ll see a 3D viewer with the niche density data of the species
25. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Going back to MapMaker, you can move the dialog box to be able to show the world map, and see the species
suitability for different depths
1) Drag the dialog box to a side
to be able to see the world map
2) Click on those buttons to see
the different layers of the 3DCEL.
There is one layer for each depth
of the used variables
You can see in the world map the
density for each Z (depth) value of
the 3D CEL using the button bar to
change depth
26. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Close the dialog box and go back to main MapMaker window. If many occurrences are shown on the map, they may
sometimes hide parts of the density map. Try to hide them to see the whole density map.
Uncheck valid occurrences to
only see the density map.
Then check them again to
show the occurrences before
continuing to the next step.
27. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
We’ll now calculate Distribution map
1) Go to menu
“Mapping/Niche of occurrence/ Distribution map”
28. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Thanks to having saved previously the 3DCEL we built, we’ll now just have to select it to calculate NOO3D distribution
2) Select the previously saved CEL
3) Click on “Accept”
29. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
The parameters to set are the same than for the density map
3) Click on “Continue”
This indicates that NOO3D will generate a model for the depth
range where there are occurrences of the species
1) “Use only occurrences with depth value”
(which is the default)
Z meaning is set to Depth because this is the Z meaning
assigned to the variables we imported
30. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
5) Click on “Run”. You’ll be asked to enter a file
name to save results. Then calculation will start
Kernel density hull options
Range can be “Full layer” or “EOO”. In this case, as we
want to see the potential distribution of the species
worldwide, we can leave the defaults
“Add area” option (by default) indicates that the
estimated area will be added to the distribution map. The
other option, “Hull simulation”, adds just a shape only
for visualization purposes, not as part of the species
distribution
4) Leave “Smoothing” to 1
31. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Once ended, results will include a file that can be opened with MRMapping
MRMapping is another application of ModestR that
can show several distribution maps at the same time,
while MapMaker is intended to work with a single
distribution map
Click to “Open MRMapping”
32. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
The file generated for MRMapping contains a distribution map for each Z value (depth) of the 3D CEL used to calculate
niche. In this case, this means a distribution map for each depth of the range we used (which is the range where there
are species occurrences)
Uncheck valid occurrences to
only see the range distribution
The distribution of the species
for each depth is displayed with
a different color
33. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Go to menu “Edit / Distribution list editor”
Double click on sea colors to modify them
Use those checkboxes to show / hide
individual distribution maps
Select a distribution and use those
buttons to change their display order
You can modify the distribution colors and order to explore the species distribution by depth
The list of distributions is shown
here. The numerical value added to
the species name indicates the depth.
34. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
You can modify the distribution colors and order to explore the species distribution by depth
Click on “Reverse” button to
reverse the order of the
distributions. This way you can see
lower depths above higher ones
35. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
You can also use slideshow feature to see how species distributions changes along depth
Go to “View / Slideshow” A floating toolbar will be displayed, to easily move around the distribution maps for
each Z value (depth), much like moving from a slide to another in a slideshow
36. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
The procedure previously described is useful when working with one or few species, and when we want to see the results
of each step, test several parameters, etc.
But when working with many species, it may be more useful to use DataManager application from ModestR, that
allows working with databases of hundreds or thousands of species. In DataManager you can perform NOO3D in batch
mode and obtain for example the distribution of many species for different depths
37. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
It was the Step by step tutorial:
Calculating 3D species distribution in marine
habitats with ModestR
Thank you for your interest.
You can find this one and other tutorials in http://www.ipez.es/ModestR
By the ModestR team