Skip to main content

fremor

Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge

fremor CMORizes FRE output with CMOR. It is both a conda and pip package.

Documentation is on readthedocs.

License

Apache License 2.0 — see LICENSE.md

DOI/Citation

zenodo DOI

Under construction! Sometimes the badge doesn't render, try refreshing.

Contributors

Contributors

Background and Purpose

fremor is a model output rewriter (CMORizer) for FRE/FMS based models and output. It is specifically geared for standardizing NOAA-GFDL datasets for further quality control checks, assessments and data publishing pipelines in the context of CMIP7 using the CMOR library.

Relationship to fre-cli

fremor was originally the fre.cmor submodule of NOAA-GFDL/fre-cli and so stands on the shoulders of it's contributors, retaining it's general structure and lessons learned from it. Future re-integrations back into fre-cli, as a formal package dependency, are being assessed.

AI Disclaimer

AI was heavily used in the creation of this repository, primarily github's copilot with Claude (opus4.6, sonnet4.6, and haiku), and Gemini and Chat-GPT models to a lesser extent, in agent mode. Claude and Codex agents have also contributed.

Quickstart

# Initialize CMIP6Plus resources (config template + MIP tables)
fremor init -m cmip6plus -e exp_config.json -t mip-cmor-tables --fast

For an overview of required inputs and sample commands, see the CMOR Quickstart.

Installation / Access

via PPAN / modules

If you're trying to gain access to fremor functionality as quickly as possible:

# a tagged version of fremor, post-releases will never be named modules
module load fremor/X.Y.Z

## (COMING SOON) the current post-release, i.e., latest commit on main
#module load fremor/test

via conda and/or conda-forge

For the official, auto-updated installation instructions, see the fremor conda-forge feedstock.

If you have a path to a fremor environment you can activate it like so:

conda activate some/path/to/fremor_env

If you want your own fremor environment:

# the environment will be named fremor_en
conda create -n fremor_env conda-forge::fremor

# see fremor_env in the list --> activate it by name
conda env list
conda activate fremor_env

or, if you've already activated a conda environment

conda create -n empty_env
conda activate empty_env
conda install -c conda-forge fremor

# equivalent syntax
conda install conda-forge::fremor

pip install into a virtual environment (conda/venv)

via pip install [-e] . with a checkout of the code

If you're trying to develop fremor capabilities, or edit the code to your liking in either a big or small way, this is for you. This checks out the code, creates and activates an environment, installs into the environment, and runs all unit-tests and pylint checks:

# omit --recursive if you don't want tables as submodules
git clone --recursive https://github.com/NOAA-GFDL/fremor.git
cd fremor

# create an environment and install the local checkout
conda env create -f environment.yaml
conda activate fremor
pip install -e . 

# Run tests
pytest fremor/tests/

# Run linter
pylint --rcfile pylintrc fremor/

via pip install fremor without a checkout of the code

Not all of fremor's dependencies are pip installable, so this method assumes you've grabbed the requirements, and made them available to fremor in a common context via another method (conda is still easiest). Assuming this was done correctly and all relevant python modules are installed to locations in PYTHONPATH, pip install fremor should install the package from PyPI.

Usage

as a command line interface (CLI)

The CLI entry point is fremor, a set of routines for preparing and CMORizing model output for CMIP workflows.

# The full list of subcommands
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 check     # Audit mapping coverage, and optionally input staging and vertical dimensions
fremor map       # Interactively review and edit mappings before writing them to variable-list files
fremor stage     # Recall all mapped YAML-run inputs in one dmget batch
fremor resolve   # Resolve a FRE model YAML + cmor/grids YAMLs into one combined document for inspection
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 CMOR

Review mappings and stage archive data

After fremor config produces a self-contained CMOR YAML file, use check to review which MIP variables are unmapped, mapped more than once, or mapped to an unknown table entry. --check-inputs also checks that the selected input files are present and disk-resident; --check-dims compares a representative input file's vertical dimension with the MIP table.

fremor check -y cmor.yaml --check-inputs --check-dims
fremor check -y cmor.yaml Amon --show-mapped

Use map when the report identifies mappings that need human review. It opens a terminal UI: select a MIP variable to see its table definition, select a post-processing file to preview it, then press m to stage a mapping or d to stage its removal. Press s to save all staged edits; nothing is written before then.

fremor map -y cmor.yaml Amon

If the selected inputs are archived offline, inspect the planned recall first, then submit the complete deduplicated selection in one dmget batch.

fremor stage -y cmor.yaml --dry_run
fremor stage -y cmor.yaml

The CLI offers full logging and verbosity control independent of the command chosen:

# verbosity and logging
fremor -v  ...          # INFO level logging
fremor -vv ...          # DEBUG level logging
fremor -q  ...          # ERROR level only (quiet)
fremor -l mylog.txt ... # Log to file (appends)

If you've used the previous fre cmor command, there is a direct mapping of syntax:

# past fre-cli command
fre -vv -l logfile.txt cmor <COMMAND> [OPTIONS]

# fremor equivalent
fremor -vv -l logfile.txt <COMMAND> [OPTIONS]

as a python module

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

Versioning and tags

fremor uses a post-release scheme to identify development beyond the latest tagged version. To avoid confusion with fre-workflows and fre-cli, which often demand that the version tags match, fremor's version format is X.Y.Z[.post].

New Release Procedure

see .github/PULL_REQUEST_TEMPLATE/new_release.md

Requirements

fremor's requirements are deliberately kept loose, so that it can be installed in as wide array of conda environments as possible. You'll find stricter ones in environment.yaml. Currently, the package build is using the following, slightly looser requirements:

  • python>=3.11
  • click>=8.2
  • cmor>=3.15.0
  • netCDF4>=1.7
  • numpy>=2
  • pyyaml

For development and testing, pylint, pytest, and pytest-cov are all highly recommended as helpful additions.

CI/CD Workflows and QA

codecov codecov

pylint pylint pylint

conda env create -f environment.yaml

python==3.11:3.11

python==3.12:3.12

python==3.13:3.13

python==3.14:3.14

cmor==nightly:cmor nightly

conda build . build_and_publish_pip

conda-forge/fremor-feedstock conda build conda-forge feedstock

readthedocs and sphinx readthedocs

WCRP Compliance Checking wcrp_compliance_check

Under development

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_cmip6 compliance checker
  • Uploads compliance reports as workflow artifacts (retained for 30 days)

To view compliance results from a workflow/CI run:

  1. Navigate to the Actions tab in GitHub
  2. Select the wcrp_compliance_check workflow run
  3. Download the wcrp-compliance-reports artifact

Metadata

Release files for fremor 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fremor 1.0.0
File Size Uploaded Provenance
fremor-1.0.0.tar.gz 11.4 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fremor 1.0.0
File Interpreter ABI Platform
fremor-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 MB

Release files / fremor-1.0.0.tar.gz

Download URL fremor-1.0.0.tar.gz
Size 11.4 MB
Tags Source
SHA-256 checksum
How to use checksums
dbf634a84fad4dd622a4de33b7233c7fc094f268d7fda7f7407879ef764f78a0
BLAKE2b-256 checksum
How to use checksums
e561bd535140e9ea9bebbed8f8fa4b0eee0bc7af9e16dcaf28aac0eb72877667
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / fremor-1.0.0-py3-none-any.whl

Download URL fremor-1.0.0-py3-none-any.whl
Size 11.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5fc56f1fd19fbca990a4e9857ec0b65f919837df42773993ba61387a05263922
BLAKE2b-256 checksum
How to use checksums
acfd8e623bf77a0cf5522c7d4be8a506f58780497ed4f596f081b9bf1e36f447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for fremor 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fremor-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page