/hector_cmip6data

CMIP6 data relevant for Hector v3 calibration

Primary LanguagePython

DOI

hector_cmip6data

This repository contains CMIP6 data relevant for Hector v3 calibration.

Some notes on the organization of this repository:

Scripts

The ./scripts directory contains both Python and R scripts for each variable. The Python scripts are used to access CMIP6 data using Pangeo. Outputs get saved as csv files, which are read into R for further processing and visualization.

Order of operations: Run the "A_" Python script, and then the corresponding "B_" R script/s. If present, RMarkdown files will have the prefix "C_." These RMarkdowns are to provide a little more guidance and/or clarity than the R scripts alone.

The ocean heat flux variables (hfls, hfss, rlds, rlus, rsds, rsus) all have individual Python files, but pre- and post-processing files work with all six variables in one script.

Directories

Each directory named for a variable contains raw csv output files for each variable. The files are generated by the Python scripts, leveraging Pangeo. The corresponding R scripts then use these raw csv files to perform data manipulations and calculations to yield final output files. These output files are also csv files, located in ./outputs. The output files contain final values for each variable with outliers removed.

Heatflux variables

First, run A4.heatflux_preprocessing.py to isolate the Pangeo file locations for six heat flux variables. Then, run B4a.heatflux_preprocessing.R to isolate the files that contain information on all six variables. Then, run the individual .py files to download CMIP6 data for each variable. Finally, run B4b.processing_heatflux.R to extract output data.

land-ocean-warming-ratio

The processing scripts and materials for the land-ocean-warming-ratio do not follow the rest of the repository organization. It is a copy of the https://github.com/skygering/land-ocean-warming-ratio repo created by Skylar Gering.

Inputs

All csv files that are required in R files can be found in ./inputs. Files not generated within this repository are in the subdirectory, ./inputs/comp_data.

A note on variable-specific functions within .py scripts

Within the .py scripts, each variable has its own function, i.e. get_rh. There is a check within the function that if areacella or sftlf data is missing, the function will return an error. Models that failed consistently have been identified and removed from the list of zstore addresses within each file. However, be aware that some models may still fail and will need to be manually removed from the list of zstore addresses.