Skip to content

Commit

Permalink
Additional explanations markdown text V2
Browse files Browse the repository at this point in the history
  • Loading branch information
DahyannAraya committed Sep 4, 2024
1 parent 6560d41 commit 69f0ebe
Showing 1 changed file with 45 additions and 3 deletions.
48 changes: 45 additions & 3 deletions doc/tutorial/climada_hazard_copernicus_forecast.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@
"id": "50ea48c5-b435-47e0-a178-a1d08742fcad",
"metadata": {},
"source": [
"### Parameters:\n",
"### Parameters Overview:\n",
"\n",
"Before utilizing the module that converts Copernicus forecast data into a hazard object for CLIMADA, it is crucial to define specific parameters accurately. These parameters are essential because they dictate the type of data retrieved, its format, the period, and the geographic focus of the forecast data that will be transformed into a hazard model. Correct configuration of these parameters ensures that the data aligns well with the requirements for hazard modeling in CLIMADA, facilitating effective risk assessment and management. To learn more about what these parameters entail and their significance, please refer to the [documentation on the CDS webpage](https://cds.climate.copernicus.eu/cdsapp#!/dataset/seasonal-original-single-levels?tab=overview).\n",
"\n",
"1. **format**: Specifies the format of the data to be downloaded. Currently, only the \"grib\" format is available, though \"netcdf\" is also a supported type.\n",
"\n",
Expand Down Expand Up @@ -259,7 +261,22 @@
"id": "c7142655-26bd-41a9-8a7a-1f2a36e57fc4",
"metadata": {},
"source": [
"### Calculate indices"
"### Calculate Climate Indices\n",
"\n",
"When you use the `handler.calculate_index` method in CLIMADA to compute specific climate indices (such as Tropical Nights), the generated output is saved and organized in a structured format for further analysis. This process is significant for several reasons:\n",
"\n",
"- **Index Calculation**: The method processes seasonal forecast data to compute relevant climate indices for the selected years, months, and regions. These indices represent specific climate conditions, such as the number of Tropical Nights ('TR') over the forecast period, as defined in the parameters.\n",
"\n",
"- **Data Storage**: The calculated index data is saved in **netCDF** format, which is widely used for storing multi-dimensional scientific data. These files are automatically saved in directories specific to the index and time period. The file paths are printed below the processing steps. For example, the computed index values are stored in: \n",
" *\"/Users/daraya/Documents/CLIMADA/climada_petals/results/copernicus_forecast_data/TR/2022/TR_202206.nc\"*\n",
"\n",
" Similarly, the statistics of the index (e.g., mean, variance) are saved in: \n",
" *\"/Users/daraya/Documents/CLIMADA/climada_petals/results/copernicus_forecast_data/TR/2022/stats/TR_202206_statistics.nc\"*. \n",
" These files ensure that both the raw indices and their statistical summaries are available for detailed analysis.\n",
"\n",
"- **Geographic and Temporal Resolution**: Each file contains data for a specific month and geographic region, as defined in the parameters. This allows you to analyze how the selected climate index varies over time and across different locations.\n",
"\n",
"- **Completeness of Data Processing**: Messages like 'Tropical nights saved to...' confirm the successful calculation and storage of the indices, ensuring that all requested data has been processed and saved correctly.\n"
]
},
{
Expand Down Expand Up @@ -294,7 +311,32 @@
"id": "3166a41f-874d-4e22-aad4-7be71d08e456",
"metadata": {},
"source": [
"### Calculate a hazard object"
"### Calculate a Hazard Object\n",
"\n",
"When you use the `handler.process_and_save_hazards` method in CLIMADA to convert processed indices from Copernicus forecast data into a hazard object, the generated output is significant for several reasons:\n",
"\n",
"- **Hazard Object Creation**: The method processes seasonal forecast data for specified years and months, converting these into hazard objects. These objects encapsulate potential risks associated with specific weather events or conditions, such as Tropical Nights ('TR') indicated in the parameters, over the forecast period.\n",
"\n",
"- **Data Storage**: The hazard data for each ensemble member of the forecast is saved as HDF5 files. These files are automatically stored in specific directories corresponding to each month and type of hazard. The file paths are printed below the processing steps. For example, *\"/Users/daraya/Documents/CLIMADA/climada_petals/results/copernicus_forecast_data/TR/hazard/202206/hazard_TR_member_0_202206.hdf5\"*\n",
" HDF5 is a versatile data model that efficiently stores large volumes of complex data.\n",
"\n",
"- **Geographic and Temporal Resolution**: Each file is specific to a particular month and hazard scenario ('TR' in this case) and covers all ensemble members for that forecast period, aiding in detailed risk analysis.\n",
"\n",
"- **Completeness of Data Processing**: Messages like 'Completed processing for 2022-07. Data saved in...' confirm the successful processing and storage of the hazard data for that period, ensuring that all requested data has been properly handled and stored.\n",
"\n",
"#### Visualizing the Calculated Hazard Object\n",
"\n",
"Once the hazard object has been successfully calculated, the last element created is printed for visualization. This is important for several reasons:\n",
"\n",
"- **Initial Data Inspection**: The visualization allows you to view a slice of the forecast data, providing a quick check of the results. This initial glimpse helps you verify that the data processing was successful and provides insights into the distribution of the hazard (in this case, Tropical Nights) across the area of interest.\n",
"\n",
"- **Geographic Accuracy**: The map helps you verify if the correct geographic region was processed and plotted. This is particularly useful as it allows immediate feedback on whether the user-defined boundaries or selected areas (e.g., Germany and Switzerland) were captured correctly.\n",
"\n",
"- **Data Quality Check**: Visualizing the output also serves as a preliminary quality check, allowing you to detect any unexpected results or anomalies in the data. For instance, the color bar indicating the \"Intensity (days)\" gives an indication of how the hazard index is distributed across the mapped area.\n",
"\n",
"- **Quick Testing**: This step is essential for testing the entire workflow, ensuring that the process is working as expected from data download, processing, and hazard object creation to visualization.\n",
"\n",
"This output provides a structured dataset ready for further analysis within the CLIMADA framework, allowing for the evaluation of potential impacts and the planning of mitigation strategies. \n"
]
},
{
Expand Down

0 comments on commit 69f0ebe

Please sign in to comment.