> For the complete documentation index, see [llms.txt](https://guides.geospatial.bas.ac.uk/working-with-scientific-data-formats-in-gis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guides.geospatial.bas.ac.uk/working-with-scientific-data-formats-in-gis/intro-notes.md).

# Intro notes

This session is focused on tools and methods to prepare data in scientific/multidimensional formats (HDF, GRIB, NetCDF) for use in GIS, featuring tools like QGIS, GDAL, and XARRAY and GDAL API for Python.

It consists of 3 parts:

* **"Good" HDF** is an example of working with QGIS-readable MODIS NDSI data with the GDAL command line tool
* **"Good" GRIB** section features the Xarray Python library as an efficient tool for multidimensional data processing
* **"Not-so-good" NetCDF** is an example of how to treat datasets with incorrect georeferencing with GDAL and Xarray together
* **Reading Sentinel-3 data** is a ready-to-use script for converting Sentinel-3 L1 EFR data to GeoTiff. <br>

Below are the tips for installing the GDAL command line tool and configuring the conda environment for working with GDAL and Xarray in Python. Checked for Python 3.9.

{% hint style="info" %}
Terminal commands  are written in Linux syntax
{% endhint %}

<details>

<summary>GDAL installation</summary>

#### Windows

Usually, GDAL is installed along with QGIS. The easiest way to access GDAL is to open **OSGeo4W Shell**: Start > QGIS > OSGeo4W Shell.

#### Ubuntu / MacOS

Usually, GDAL is installed along with QGIS and can be called through the terminal window.&#x20;

#### No QGIS&#x20;

[Install anaconda](https://docs.anaconda.com/anaconda/install/index.html). Create a new Python environment.

```
conda create --name geo
conda activate geo
```

Install GDAL in this environment

<pre><code><strong>conda install -c conda-forge gdal
</strong></code></pre>

Check installation

```
gdlainfo
```

</details>

<details>

<summary>Configuring environment for Jupyter Notebook </summary>

Install anaconda. Create a new Python environment.

```shell
conda create --name geo
conda activate geo
```

Install geopandas (this will also install numpy, pandas and gdal), matplotlib, xarray and dependables netcdf4 and cfgrib.&#x20;

```
conda install -c conda-forge geopandas 
conda install -c conda-forge matplotlib
conda install -c conda-forge cfgrib
conda install -c conda-forge netcdf4
conda install -c conda-forge xarray
conda install -c anaconda jupyter
```

Navigate to your working directory and start Jupyter

```sh
cd /mnt/c/my_dir/
jupyter notebook
```

A new jupyter session will start and a new browser tab will be open.&#x20;

</details>

{% hint style="warning" %}
Sections 2 through 4 contain \*.ipynb files to download.

Data is not provided, but you can download it using links in the 'Data source' section.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guides.geospatial.bas.ac.uk/working-with-scientific-data-formats-in-gis/intro-notes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
