Skip to content

corsaronero/RiskGuard

Repository files navigation

RiskGuard (en)

Download and view climate datasets from Copernicus and CMCC in QGIS, apply advanced geographic and temporal filters, and export the results as Mesh Layer and Raster Layer.

Copernicus

Register on Copernicus via the following link:

ECMWF Account

All information on how to create the .cdsapirc file, obtain the URL and API key, and install the cdsapi libraries is available here:

CDS API

In Copernicus, to download some datasets you must accept the terms & conditions.

You can do this directly within the program before downloading the datasets, or directly from your profile:

Create Profile

***Note:

IF QGIS does not recognize cdsapi

1. Open the folder: C:\Program Files\QGIS 3.34.9

2. Click on OSGeo4W to open the terminal

3. Type the following command in the command prompt and press Enter:

pip install cdsapi

Now QGIS will correctly recognize the library.

CMCC-DDS

Register on CMCC-DDS via the following link:

Create Profile

To create the .ddsapirc configuration file, obtain the URL and API key, and install the ddsapi libraries, refer to the official guide:

Official Guide

How it works

The interface allows you to choose the endpoint from which to download datasets via two radio buttons at the top.

If you select Copernicus, the available categories will appear (e.g., Analysis, Climate Indices, etc.).

After choosing a category, the dropdown will populate with the list of available datasets, indicating the total number. (Img 1.1)

Img 1.1

Next steps

Dataset selection: After the list is populated, choose a dataset. A dynamic structure will be generated containing all variables, temporal parameters, download format, etc.

Download: After selecting the mandatory parameters, start the download by clicking on Submit.

Monitoring in QGIS: In QGIS's Python console, you can monitor the download status (accepted, running, successful).

Managing downloaded files:

Once downloaded, the file name is dynamically generated based on the current date and time, ensuring unique identification.

The application supports various file formats, including ZIP, NetCDF (.nc), and GRIB.

If the downloaded file is a ZIP archive, it is automatically extracted into the Documents destination directory.

If the downloaded or extracted files are in NetCDF (.nc) or GRIB format, they are automatically loaded as layers in QGIS.

Geographic selection interface:

The GlobeMapForm graphical interface was developed to allow interactive geographic selection, helping the user identify and delimit the area of interest.

Zoom and Panning: The interface includes two +/- buttons for zooming in and out. The map scale adapts based on the zoom to maintain high resolution.

Rectangular Area Selection: By enabling the Draw Rectangle mode, the user can draw a rectangle to delimit the area.

When activated, the user can select the desired area by clicking on the map to mark the starting and ending points of the rectangle.

The selection is displayed with a red outline to ensure visibility and precision.

Coordinate Output: Using the Save button, the coordinates are saved in the main panel.



RiskGuard (it)

Scarica e visualizza dataset climatici di Copernicus e CMCC in QGIS, applica filtri geografici e temporali avanzati e esporta i risultati come Layer Mesh e Layer Raster.

Copernicus

Registrati su Copernicus tramite il seguente link:

Account ecmf

Tutte le informazioni su come creare il file .cdsapirc, ottenere l’URL e la chiave API, e installare le librerie cdsapi sono disponibili qui:

CDS API

In Copernicus per effettuare il download di alcuni dataset bisogna accettare i terms&conditions.

Puoi farlo direttamente all’interno del programma prima di effettuare il download dei dataset, oppure direttamente dal tuo profilo:

Crea Profilo

***Nota:

SE QGIS non riconosce cdsapi

1. Apri la cartella: C:\Program Files\QGIS 3.34.9

2. Clicca su OSGeo4W per aprire il terminale

3. Digita il seguente comando nel prompt dei comandi e premi Invio:

pip install cdsapi

Ora QGIS riconoscerà correttamente la libreria.

CMCC-DDS

Registrati su CMCC-DDS tramite il seguente link:

Crea Profilo

Per creare il file di configurazione .ddsapirc, ottenere l’URL e la chiave API, e installare le librerie ddsapi, consulta la guida ufficiale:

Guida Ufficiale

Funzionamento

L’interfaccia permette di scegliere l’endpoint da cui scaricare i dataset tramite due radio button nella parte superiore.

Se selezioni Copernicus, appariranno le categorie disponibili (es. Analysis, Climate Indices, etc.).

Dopo aver scelto una categoria, la dropdown si popolerà con la lista dei dataset disponibili, indicando il numero totale. (Img 1.1)

Img 1.1

Passaggi successivi

Selezione del dataset: Dopo aver popolato la lista, scegli un dataset. verrà generata una struttura dinamica contenente tutte le variabili, parametri temporali, formato download etc..

Download: Dopo aver selezionato i parametri obbligatori, avvia il download cliccando su Submit.

Monitoraggio in QGIS: Nella console Python di QGIS puoi monitorare lo stato del download (accepted, running, successful).

Gestione file scaricati:

Effettuato il download, il nome del file viene generato dinamicamente in base alla data e all'ora correnti, garantendo un'identificazione univoca.

L’applicazione gestisce diversi formati di file, inclusi ZIP, NetCDF(.nc) e GRIB .

Se il file scaricato è un archivio ZIP, viene automaticamente estratto nella directory di destinazione Documents.

Se i file scaricati o estratti sono in formato NetCDF (.nc) o GRIB, vengono automaticamente caricati come layer in QGIS.

Interfaccia per la selezione geografica:

L’interfaccia grafica GlobeMapForm è stata sviluppata per consentire una selezione geografica interattiva, aiutando l'utente a identificare e delimitare l’area d'interesse.

Zoom e Panning: L’interfaccia include due bottoni +/- per lo zoom in e out. La scala della mappa si adatta in base allo zoom per mantenere un'alta risoluzione.

Selezione Rettangolare dell’Area: Attivando la modalità Draw Rectangle, l’utente può disegnare un rettangolo per delimitare l’area.

Quando viene attivata, l’utente può selezionare l’area desiderata cliccando sulla mappa per segnare il punto di partenza e di fine del rettangolo.

La selezione viene visualizzata con un contorno rosso per garantire visibilità e precisione.

Emissione delle Coordinate: Tramite il pulsante Save, le coordinate vengono salvate nel pannello principale.



About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors