Simply put, fremorizer CMORizes FRE output with CMOR.
fremorizer is a conda package, it's documentation can be found on readthedocs.
fremorizer is a model output rewriter (CMORizer) for FRE/FMS based models and output. It was originally the fre.cmor submodule of
NOAA-GFDL/fre-cli. fremorizer (or fremor for short) is geared for rewriting NOAA-GFDL
datasets for further quality control checks, assessments and data publishing pipelines in the context of CMIP7 using the
CMOR library.
# this will be whatever is in main of this repository (COMING SOON/TODO)
module load fremorizer/test
# this will be a tagged version of the package in this repository
module load fremorizer/YYYY.XX.[ZZ]{-alpha,-beta}If you're trying to develop the package, or edit the code for contributing in either a big or small way, this is for you. If you're just
trying to use fremorizer and you want to deal with as few technical details as possible, this is not for you.
Add -e to the pip step for an editable install. --recursive pulls in required configuration in the form of CMIP CMOR tables, and
can be omitted if desired at the cost of local testing functionality out-of-box
# this does work, right now
git clone --recursive https://github.com/ilaflott/fremorizer.git
cd fremorizer
conda env create -f environment.yaml
pip install . If you just want an environment named fremorizer with the package:
# does not work yet, TODO
conda create -n fremorizer noaa-gfdl::fremorizer
conda activate fremorizeror, if you've already activated a conda environment
# does not work yet, TODO
conda install -c noaa-gfdl fremorizer
# does not work yet, TODO
# equivalent syntax
conda install noaa-gfdl::fremorizerThe CLI entry point is fremor. It maps directly from the fre cmor subcommand:
# past fre-cli command
fre -vv -l logfile.txt cmor <COMMAND> [OPTIONS]
# fremorizer equivalent
fremor -vv -l logfile.txt <COMMAND> [OPTIONS]Each CLI subcommand (run, yaml, etc.) maps to an API under under fremor, so the CLI functionality
is equivalently available via import in scripts as a proper python module
fremor init # Initialize CMOR configuration resources: generate template user config, fetch tables
fremor find # Find and print variables in MIP tables according to your variable lists or other input
fremor varlist # Create a simple variable list of netCDF files in a directory
fremor config # Generate a basic CMOR YAML configuration from a pp directory tree
fremor yaml # Bulk routine for processing data based on a CMOR YAML config, calls fremor run many times
fremor run # Lowest-level routine, no CMOR YAML needed, rewrites output files in a directory with CMORFor a concise overview of required inputs and sample commands, see the CMOR Quickstart.
Before CMORizing data, you need an experiment configuration template and MIP tables.
The fremor init command helps set up these resources:
# Generate a CMIP6 experiment config template and fetch CMIP6 tables
fremor init -m cmip6 -e exp_config.json -t cmip6-tables
# Generate a CMIP7 experiment config template and fetch CMIP7 tables (fast mode)
fremor init -m cmip7 -e exp_config.json -t cmip7-tables --fast
# Fetch tables for a specific release tag
fremor init -m cmip6 -t cmip6-tables --tag 6.9.33This command:
- Generates an experiment configuration JSON template with required CMIP metadata fields
- Fetches official MIP tables from trusted GitHub repositories (CMIP6:
pcmdi/cmip6-cmor-tables, CMIP7:WCRP-CMIP/cmip7-cmor-tables) - Supports both
git clone(default) andcurl(--fast) methods for downloading official configurations
fremor -v run ... # INFO level logging
fremor -vv run ... # DEBUG level logging
fremor -q run ... # ERROR level only (quiet)
fremor -l log.txt run ... # Log to file (appends)fremor run \
-d /path/to/input/netcdf/dir \
-l /path/to/varlist.json \
-r /path/to/CMIP6_Omon.json \
-p /path/to/exp_config.json \
-o /path/to/output/dirpython>=3.11click>=8.2cmor>=3.14.2netCDF4>=1.7numpy>=2pyyaml
For development and testing, pylint, pytest, and pytest-cov are all highly recommended as helpful additions.
# Checkout code
git clone --recursive https://github.com/ilaflott/fremorizer.git
cd fremorizer
# Create a conda environment
conda env create -f environment.yaml
conda activate fremorizer
# Install in editable mode
pip install -e .
# Run tests
pytest fremorizer/tests/
# Run linter
pylint --rcfile pylintrc fremorizer/The wcrp_compliance_check workflow validates CMORized NetCDF outputs against WCRP project
specifications using cc-plugin-wcrp, a plugin for
the IOOS compliance-checker. This pipeline:
- Runs automatically on pull requests and via manual dispatch
- Executes unit tests to generate CMORized output files
- Gathers and categorizes outputs by CMIP version (CMIP6, CMIP7)
- Validates outputs using the
wcrp_cmip6compliance checker - Uploads compliance reports as workflow artifacts (retained for 30 days)
To view compliance results from a workflow/CI run:
- Navigate to the Actions tab in GitHub
- Select the
wcrp_compliance_checkworkflow run - Download the
wcrp-compliance-reportsartifact
| Python 3.11 | Python 3.12 | Python 3.13 | Python 3.14 |
|---|---|---|---|
Apache License 2.0 — see LICENSE.md
See CONDA_FORGE_FEEDSTOCK_PLAN.md for the steps and follow-up tasks to submit and maintain the conda-forge feedstock for fremorizer.
fremorizer uses a post-release scheme to identify development beyond the latest tagged version and tie the current main branch to a
conda package versioned as develop. To avoid confusion with fre-workflows and fre-cli, which often demand that the version tags
match, fremorizer's version format is X.Y.Z[.post].
To publish new release carefully follow the below procedure:
- create a new branch off of
main, which is already published tocondaunderdevelop/the previous tagged version +.post - edit the version number in
fremorizer/_version.pyfrom the current one, to the desired version tag, remove.post, then open a PR. edit nothing else (usually). - confirm the branch is functional by letting workflows finish, if you see green checks only, proceed. otherwise, stop and debug.
- draft a new release pointing to the PR branch, click release. the publishing workflow should trigger and finish, and you should see the
X.Y.Zversion in the conda channel. - releases in this repository are immutable, so even if the release workflow fails, breathe and move on to the next step.
- edit the version number in
fremorizer/_version.pytoX.Y.Z.post, and merge the PR to main workflow steps passed.publish_condawill trigger again and upload what is inmainunder thecondaversiondevelopandpipversionX.Y.Z.post