Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README for sea ice metrics #1031

Merged
merged 17 commits into from
Jan 30, 2024
24 changes: 16 additions & 8 deletions pcmdi_metrics/sea_ice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

## Summary

The PCMDI Metrics Package (PMP) sea ice driver produces metrics that compare modeled and observed sea ice extent as shown in Ivanova (2016). These metrics are generated for total sea ice extent in eight preset sectors. They can be compared across models, realizations, and regions.

## Demo

* Link to notebook
* [Sea ice demo notebook](https://github.com/PCMDI/pcmdi_metrics/blob/main/doc/jupyter/Demo/Demo_9_seaIceExtent_ivanova.ipynb)

## Inputs

### Sectors
The sea ice driver uses monthly mean sea ice concentration and grid area data to generate sea ice extent metrics. An unlimited number of test data sets (typically model data) may be provided if file names follow a common template. A single reference data set is required, which is typically a observational data set or a model control run. For best results, all data files should contain latitude and longitude variables that are named "latitude" and "longitude" or "lat" and "lon". Data may use an irregular grid if latitude and longitude variables are included, preferably as additional coordinates. If multiple realizations of a model are provided, all realizations must use the same grid. See the Parameters section for more details about inputs.

## Run

Expand All @@ -28,20 +30,26 @@ sea_ice_driver.py -p parameter_file.py --msyear 1991 --meyear 2020

The driver produces a JSON file containing mean square error metrics for all input models and realizations relative to the reference data set. It also produces a bar chart displaying these metrics.

### Sectors

The metrics results are provided for eight different geographic regions. In the Northern Hemisphere there are the Arctic, North Pacific, North Atlantic, and Central Arctic regions. In the Southern Hemisphere there are the Antarctic, South Pacific, South Atlantic, and Indian Ocean regions. The region definitions can be found in [Ivanova (2016)](https://doi.org/10.1175/JCLI-D-16-0026.1).

## Parameters

A [demo parameter file](https://github.com/PCMDI/pcmdi_metrics/blob/405_sic_ao/pcmdi_metrics/sea_ice/param/parameter_file.py) is provided in the sea ice code.

* **case_id**: Save JSON and figure files into this subdirectory so that results from multiple tests can be readily organized.
* **test_data_set**: List of model names.
* **realization**: List of realizations.
* **realization**: List of realizations or "*" to use all realizations.
* **test_data_path**: File path to directory containing model/test data.
* **filename_template**: File name template for test data, e.g., "CMIP5.historical.%(model_version).r1i1p1.mon.%(variable).19810-200512.AC.v2019022512.nc" where "model_version" and "variable" will be analyzed for each of the entries in test_data_set and vars.
* **filename_template**: File name template for test data, e.g., "%(variable)\_SImon_%(model_version)_historical_r1i2p2f1_gr_201001-201112.nc" where "model_version" and "variable" will be analyzed for each of the entries in test_data_set and vars.
* **var**: Name of model sea ice variable
* **msyear**: Start year for test data set.
* **meyear**: End year for test data set.
* **ModUnitsAdjust**: Factor to convert model sea ice data to fraction of 1. Uses format (flag (bool), operation (str), value (float)). Operation can be "add", "subtract", "multiply", or "divide". For example, use (True, 'multiply', 1e-2) to convert from percent concentration to decimal concentration.
* **area_template**: File path of model grid area data.
* **area_var**: Name of model area variable, e.g. "areacello"
* **AreaUnitsAdjust**: Factor to convert model area data to units of km2. Uses format (flag (bool), operation (str), value (float)). Operation can be "add", "subtract", "multiply", or "divide". For example, use (True, 'multiply', 1e6) to convert from m2 to km2.
* **AreaUnitsAdjust**: Factor to convert model area data to units of km2. Uses format (flag (bool), operation (str), value (float)). Operation can be "add", "subtract", "multiply", or "divide". For example, use (True, 'multiply', 1e-6) to convert from m2 to km2.
* **metrics_output_path**: Directory path for metrics output in JSON files, e.g., '~/demo_data/PMP_metrics/'. The %(case_id) variable can be used here. If exists, should be empty before run.
* **reference_data_path_nh**: The reference data file path for the northern hemisphere. If data is global, provide same path for nh and sh.
* **reference_data_path_sh**: The reference data file path for the southern hemisphere. If data is global, provide same path for nh and sh.
Expand All @@ -50,12 +58,12 @@ The driver produces a JSON file containing mean square error metrics for all inp
* **osyear**: Start year for reference data set.
* **oeyear**: End year for reference data set.
* **obs_var**: Name of reference sea ice variable.
* **ObsAreaUnitsAdjust**: Factor to convert model area data to units of km2. Uses format (flag (bool), operation (str), value (float)). Operation can be "add", "subtract", "multiply", or "divide". For example, use (True, 'multiply', 1e6) to convert from m2 to km2.
* **ObsAreaUnitsAdjust**: Factor to convert model area data to units of km2. Uses format (flag (bool), operation (str), value (float)). Operation can be "add", "subtract", "multiply", or "divide". For example, use (True, 'multiply', 1e-6) to convert from m2 to km2.
* **obs_area_template**: File path of grid area data. If unavailalbe, skip and use "obs_cell_area".
* **obs_area_var**: Name of reference area variable, if available. If unavailable, skip and use "obs_cell_area".
* **obs_cell_area**: For equal area grids, the area of a single grid cell in units of km2.
* **obs_cell_area**: For equal area grids, the area of a single grid cell in units of km2. Only required if obs area file is not available.


## Reference

Ivanova, D. P., P. J. Gleckler, K. E. Taylor, P. J. Durack, and K. D. Marvel, 2016: Moving beyond the Total Sea Ice Extent in Gauging Model Biases. J. Climate, 29, 8965–8987, https://doi.org/10.1175/JCLI-D-16-0026.1.
Ivanova, D. P., P. J. Gleckler, K. E. Taylor, P. J. Durack, and K. D. Marvel, 2016: Moving beyond the Total Sea Ice Extent in Gauging Model Biases. J. Climate, 29, 8965–8987, https://doi.org/10.1175/JCLI-D-16-0026.1.
Loading