1-D radiative–convective equilibrium model (Fortran core + Python for parameters and plotting).
This repository is an adaptation of the original RCE MIT Single-Column Model by K. Emanuel (15 March 2010). The Fortran core (rc_ver2.f) and scientific behavior are unchanged; the modifications are tooling and workflow around it:
- Table-format parameters: A human-readable parameter table (
params_ver2_table.in) with Parameter, Value, Units, and Description columns. A Python script (scripts/table_to_params.py) converts it to the value-onlyparams_ver2.inexpected by the Fortran program. - Run and execute scripts:
run_RCE.shprovides a single entry point with options for output directory, parameter table file, and optional plotting.execute_rce.shcreates a user-specified run directory and a symlink so the model still reads/writes throughoutput/, and picks the right executable by platform (Linux/Mac/Windows). - Python plotting:
plotting/plot_rce_outputs.pygenerates figures from model output (e.g. profiles, time series). Use--plot,-p, or--plot trueinrun_RCE.shto run the model and then produce plots inoutput/figs/. - Conda environment:
rce_environment.ymland a shared conda env so students can run without installing conda or building the Fortran executable themselves. - Build support: A
Makefile(andmake rebuild) to recompilerc_ver2unixfromrc_ver2.fon different systems (e.g. whenlibgfortranis missing). - Run-directory bookkeeping: The run scripts copy the parameter table and a readable parameter summary into each run directory for reproducibility.
- MATLAB scripts: Parameter menus and run wrappers live in the
matlab/folder (e.g.run_model.m,get_parameters_ver2.m). Run from the repo root withaddpath('matlab')or from insidematlab/.
./run_RCE.sh --output_folder my_run --table params_ver2_table.in
# or with short options: ./run_RCE.sh -o my_run -t params_ver2_table.inNote
The scripts expect Python 3 with numpy and matplotlib. Activate the shared env (or recreate it from rce_environment.yml) before running.
source /rtmp/akumar/conda/bin/activate rceThen run the model and plotting as in the examples below. To recreate the env elsewhere, use conda env create -f rce_environment.yml.
To run the model on Meteor, connect via SSH (either directly or via a login node), then set up and build in the repo:
Connect:
ssh meteor
or, if required: ssh stratus or ssh rayleigh, then ssh meteor.
Setup and test:
git clone https://github.com/ankurk017/RCE_1D_Emanuel.git
cd RCE_1D_Emanuel
module load hdf5/1.14.6-gcc-11.5.0-cmrr
make rebuild
./run_RCE.sh --output_folder rce_output_testNote
The output directory (e.g. rce_output_test) must not already exist; the script will create it.
Long and short forms are supported:
| Argument | Short | Description | Default |
|---|---|---|---|
--output_folder |
-o |
Output directory (must not exist). | required |
--table |
-t |
Parameter table file (same format as params_ver2_table.txt). |
params_ver2_table.in |
--plot |
-p |
After the run, generate plots into output/figs/. Use as a flag or --plot true. |
no |
Positional form: you can pass the output folder as the first argument instead of --output_folder / -o.
Note
The output folder must not already exist; the script will create it. Choose a new name for each run (e.g. SST25_run1).
# Default table, output in my_run/
./run_RCE.sh --output_folder my_run --table params_ver2_table.in
./run_RCE.sh -o my_run -t params_ver2_table.in
# Custom table file
./run_RCE.sh --output_folder SST28_run1 --table my_params.in
# Run and then generate plots (flag or --plot true)
./run_RCE.sh --output_folder SST25_wind5 --table params_ver2_table.in --plot
./run_RCE.sh -o SST25_wind5 -t params_ver2_table.in -p
./run_RCE.sh -o SST25_wind5 --plot true
# Positional output folder
./run_RCE.sh my_run --table params_ver2_table.in
./run_RCE.sh my_runNote
Input files: params_ver2_table.in is the parameter input file — edit it to change model parameters (e.g. SST, time step, radiation options). Also edit sounding.in for SST. See params_ver2.in_README for parameter meanings; Users_guide.pdf for the full model description.
Tip
To get plots automatically after a run, add --plot, -p, or --plot true; figures are written to output/figs/.
- Common issues — libgfortran and other troubleshooting.
- Contributing — How to contribute to this project.
- Workflow flowchart — Diagram of how to run the codebase.
Stable versions are published as Releases. Each release includes a tag (e.g. v1.0.0) and optional release notes. To use a specific version, clone the repo and check out the tag, or download the source tarball from the release page.
For questions about this code or adaptation, contact Ankur Kumar at ankur017@gmail.com or ankur.kumar@uah.edu.
This project is licensed under the MIT License.