Skip to content

Commit

Permalink
tidy and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
byersiiasa committed Nov 13, 2023
1 parent 06aa7df commit e852288
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
When accompanied by climate impacts data (table and/or maps), RIME can be used to take a global mean temperature timeseries (e.g. from an IAM or climate model like FaIR/MAGICC), and return tables and maps of climate impacts through time consistent with the warming of the scenario.

There are two key use-cases for the RIME approach:
1. Estimating a suite of climate impacts from an global emissions or temperature scenario.
1. Estimating a suite of climate impacts from a global emissions or temperature scenario.
2. Reformulating climate impacts data to be used as an input to an integrated assessment model scenario.

[![RIME_use_cases]](https://github.com/iiasa/rime/assets/17701232/12e9ae66-5d28-4f06-9540-fa496cc588d0)




## Core files

### `rime_functions.py`
Contains the key functions that can be used to process data.
Expand All @@ -34,18 +35,19 @@ A script to host a large number of configurable settings for running the softwar
Needs to be imported at the beginning of a script, e.g. `from process_config import *`.
Settings for Dask could be configured in here.

## Example processing and workflow scripts

### `generate_aggregated_inputs.py`
Pre-processing of tabular impacts data of exposure by GWL, into netcdf datasets that will be used in emulation. Only needs to run once to pre-process the impacts data.
Pre-processing of tabular impacts data of exposure by GWL, into netcdf datasets that will be used in emulation. Only needs to run once to pre-process the impacts data. Only required if working with IAMC table impacts data.

### `process_tabledata.py`
Take input table of emissions scenarios with GMT and output tables of climate impacts data in IAMC format. Can be done for multiple scenarios and indicators at a time.
Example script that takes input table of emissions scenarios with global temperature timeseries, and output tables of climate impacts data in IAMC format. Can be done for multiple scenarios and indicators at a time.

### `process_maps.py`
Take input table of emissions scenarios with GMT and output maps of climate impacts through time as netCDF. Ouptut netCDF can be specified for either for 1 scenario and multiple climate impacts, or multiple scenarios for 1 indicator.

Example script that takes input table of emissions scenarios with global temperature timeseries, and output maps of climate impacts through time as netCDF. Ouptut netCDF can be specified for either for 1 scenario and multiple climate impacts, or multiple scenarios for 1 indicator.

## Tutorials
Example scripts and tutorials are found inthe respective folders.
### pp_combined example.ipynb
Example jupyter notebook that demonstrates methods of processing both table and map impacts data for IAM scenarios.


## Installation
Expand Down
13 changes: 6 additions & 7 deletions rime/rime_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def map_transform_gmt_wrapper(

else:
# =============================================================================
# 1 scenario, multi-indicator mode
# Mode 2: 1 scenario, multi-indicator mode
# =============================================================================
print("Single scenario mode, multiple indicators possible")
model = df.model[0]
Expand All @@ -456,15 +456,14 @@ def map_transform_gmt_wrapper(
# needs to be outsite loop
delayed_tasks = []


df1 = df

# use_dask not working here
if use_dask:
# Iterate through spatial indicators in DataSet
for var_name in mapdata.data_vars:
print(var_name)
# Create delayed task for map_transform_gmt_dask
# Create delayed task for map_transform_gmt_wrapper
delayed_map_transform = delayed(map_transform_gmt)(
df1, mapdata[var_name], years, var_name, map_array
)
Expand Down Expand Up @@ -627,13 +626,13 @@ def co2togmt_simple(cum_CO2, regr=None):
cum_CO2 : int, float, np.array, pandas.Series
Value of cumulative CO2, from 2020 onwards, in Gt CO2.
regr : dict, optional
'slope' and 'intercept' values for line. The default is None, in which
case parameters from AR6 assessment are used. Provide {'slope': m,
'slope' and 'intercept' values for linear regession. The default is None, in which
case parameters from IPCC AR6 assessment are used. Provide {'slope': m,
'intercept': x} to define own linear relationship.
Returns
-------
Global mean surface air temperature (p50).
Global mean surface air temperature.
"""

Expand Down Expand Up @@ -683,7 +682,7 @@ def plot_maps_dashboard(ds, filename=None, indicators=None, year=2050,
cmap='magma_r', shared_axes=True, clim=None,
coastline=True, crs=None, features=None, layout_title=None):
"""
From an xarray.DataSet of climate impacts indicators through time for one IAM scenario,
From an xarray.DataSet of climate impact indicators through time for one IAM scenario (mode 2 in map_transform_gmt_wrapper),
plot the indicators as an interactive html dashboard in a specified year.
Parameters
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e852288

Please sign in to comment.