Skip to content

Latest commit

 

History

History
107 lines (70 loc) · 1.99 KB

File metadata and controls

107 lines (70 loc) · 1.99 KB

GRTcode

GRTcode is a radiative transfer modeling tool used for IRF (Instantaneous Radiative Forcing) calculations and climate diagnostics. This repository provides the core codebase, workflows for running experiments, and example datasets.

Clone the Repository

git clone https://github.com/NOAA-GFDL/GRTCODE.git
cd GRTCODE

Build Instructions (on GAEA)

To compile the GRTcode executables:

./GRTworkflow/build.sh -p ./

💡 If you omit the optional -p <path> argument, the script will only report the status of the pre-built executables.

Prepare Input Spectral Data

./download-test-data
unzip grtcode-data

This will download and extract example spectral datasets needed for test runs.

Run Examples

Run RFMIP-IRF 100-Column Experiments

./GRTworkflow/run-rfmip-irf.sh -p <path_to_GRTcode> <experiment_number>

Example (to run experiment 1):

./GRTworkflow/run-rfmip-irf.sh -p ./ 1

Run One Year of ERA5 Reanalysis

./GRTworkflow/run-era5.sh -p ./ <year>

Example:

./GRTworkflow/run-era5.sh -p ./ 2010

Run Multiple ERA5 Experiments

To run a series of experiments over multiple years:

  1. Open and edit the submission script:
vim ./GRTworkflow/submit.sh
  1. Modify the paths for runscript and executables accordingly.

  2. Example loop inside submit.sh:

for year in $(seq 2010 2010); do
    for exp in "${exps[@]}"; do
        cmd="$runscript -p /ncrc/home1/Jing.Feng/scripts/grtcode $year $era5_data $data_dir/${exp}.nc ${exp}"
        echo "Running: $cmd"
        eval "$cmd"
    done
done

To submit the batch job:

./GRTworkflow/submit.sh

Download ERA5 Input Data

Navigate to the era5-tools directory and run:

cd era5-tools
python3 download_2021to2025.py

Edit the script to modify years and output directory as needed.

🧰 Python Environment Setup

module load cray-python/3.11.5
pip install xarray glob os argparse netCDF4