Examples

After going through the Getting Started section you can try out the Jarkus Analysis Toolbox with the following examples.

1. Single transect

This example provides the code necessary to extract all characteristic parameters from one single transect. The default settings in the jarkus_01.yml file look at the years from 1980 to 2021 and at transect location 8009325. It is adviced to play around with these settings and extract the characteristic parameters for different periods and location. To extract the characteristic parameters open JAT_use_single_transect.py in the Python IDE of your choice (Spyder is recommended, see Help) and run the commands step by step. This should show you the steps necessary to extract the characteristic parameters for one transect and gives examples how these data can be visualized. Note that the plotting functions of pandas were used in this example, for more elaborate visualization use matplotlib.

2. Regional analysis

Example 2 shows how to extract the characteristic parameters from multiple transects at once. Tow work with this example, include the correct directories in the jarkus_02.yml file and run the code in JAT_use_region_transects.py.

3. Extract all

This Example shows how to extract all characteristic parameters from all transect locations. For this, include the correct directories in the jarkus_03.yml file and run the code in JAT_use_extract_all.py. The analysis can take a long time, around 10 hours. Thus, it is recommended to download the input files and store them locally to reduce the run time.

The Filtering_execution.py file provides an example of how the filtering functionalities of the JAT can be used.

To create distribution plots that show the values of the characteristic parameters through time and space use Distribution_plots.py. This script can only be used after the output of JAT_use_extract_all.py and Filtering_execution.py are available. Distribution_plots.py creates the distribution plots for both the filtered and unfiltered dataframes. The distribution plots of the unfiltered dataframes are available on the 4TU repository to show what the characteristic parameters look like.

Creation_netcdf.py was used to produce the netcdf file that is available on the 4TU repository. The output of Creation_netcdf.py, which is extracted_parameters.nc is saved in the Input directory because it serves as the input for Example 5.

4. Dune toe analysis

The Jarkus Analysis Toolbox was developed during the research that led to the publication of Van IJzendoorn et al. (2021) 1. This example shows how the toolbox was used for the dune toe analysis. To replicate the results include the correct directories in the jarkus_04.yml file and run the code in JAT_use_dune_toe_analysis.py. Then, the following scripts produce the figures that are included in the paper.

  • dunetoe_transect_figure.py - Figure 1

  • dunetoe_transect_map.py - Figure 1

  • dunetoe_trend_figure.py - Figure 2 and Supl. Figure 1

  • dunetoe_alongshore_figure.py - Figure 3

  • sea_level_rise_figure.py - Figure 4

The mapping executed in the dunetoe_transect_map.py uses the package basemap which is dependent on a specific version of matplotlib and is therefore not compatible with the jarkus dependencies. Thus, it is best to create a new environment to run this script. This can be done by using the dune_transect_map.yml file which includes all the dependencies necessary to run the mapping script. Use the anaconda prompt and go to directory where environment file (dune_transect_map.yml) is located, use the following commands:

$ conda env create -f dune_transect_map.yml
$ conda activate map
$ python dunetoe_transect_map.py

It should be noted that for the sea level rise figure, a specific dataset is used that can be found here.

The Figures folder includes all figures for reference so you can check whether your output matches the expectations.

1

Van IJzendoorn, C.O., De Vries, S., Hallin, C. & Hesp, P.A. (2021). Sea level outpaced by coastal dune toe translation. In review

5. Use NetCDF file

The output of Example 3 was converted into a netcdf file that is publicly available. This makes sure that the characteristic parameters can be accessed directly without having to use the Jarkus Analysis Toolbox. Thus, to work with this example you can choose to work through example 3 or just simply download extracted_parameters.nc from the 4TU repository.

The Load_data_from_netcdf.py script shows how to load the extracted characteristic parameters from the netcdf file and gives a first glimpse of how to work with these data.