📊 netcdf-display 🗺️

Table of contents 📑

Description 📝

The netcdf-display is a project from my internship at Seagnal, during my 2nd year in EPITECH Grand Ecole program.
Its purpose is to create in C a program to dump the content of NetCDF (and GRIB) files.

Usage ⚔️

You can run netcdf-display like this :

./netcdf-display --switch file.nc  

For more information, please see the help section.

> ./netcdf-display --help  
Usage: ./netcdf-display file [OPTIONS] ...  
  
DESCRIPTION  
 Display the content of a NetCDF (or GRIB) file.  
  
OPTIONS  
 -h, --help                      Display this help and exit  
        -s, --switch                    Switch between all options  
        -g, --global-attributes         Display global attributes  
        -d, --dimensions                Display dimensions  
        -v, --variables                 Display variables  
        -a, --attributes                Display attributes of variables  
        -c, --content                   Display content of variables  
        -r, --raw                       Set display style to a raw text  

Visualize 📊

You can visualize the content of a NetCDF (or a GRIB) file with this command :

python3 visualize_netcdf.py file.nc  

To see the results, go to http://127.0.0.1:8050/ in your browser.

For more information, please see the help section.

> python3 visualize_netcdf.py --help  
usage: visualize_netcdf.py [-h] [--flipud] [--vmin VMIN] [--vmax VMAX] file  
  
Visualize a NetCDF file.  
  
positional arguments:  
  file         The NetCDF file to visualize.  
  
options:  
 -h, --help   show this help message and exit  
  --flipud     Revert Up down on plot.  
  --vmin VMIN  The minimum value in the variable data.  
  --vmax VMAX  The maximum value in the variable data.  

To use it, you need to install the following packages (with pip) :

- jupyter_dash  
- netcdf4  
- numpy  
- plotly  

Only lightweight files are accepted. Files that are too large may cause the program to crash !

Compilation 🛠️

NetCDF lib is required to compile the project.

You can compile the project with this command :

make  

If you want to add color to program, you can compile the project with this :

make color   

If you want to debug the program (debug contain colors), you can compile the project with this :

make debug   

If you want clean the project, you can run this command :

make fclean  

You can clean and compile the project with make re , for color make re_color and for debugging make re_debug

Documentation 📚

The documentation is accessible here.

You can generate the documentation with this command :

make doc  

You need multiple package for generate them :

Code mandatory 📦

Of course, in exceptional cases, we may depart from these rules.

Contributors 👤

This project was carried out alone by Nicolas TORO.