relative_difference#

Compute the spatial relative difference between reference and model datasets.

This script is intended for NetCDF files that represent aggregated fields (e.g., long-term averages, climatologies, or single-time snapshots), rather than full time series. The model dataset is interpolated onto the reference grid to ensure spatial alignment. The relative difference is then calculated as (reference - model) / reference at each grid cell, with division by zero safely masked as NaN.

The result is plotted as a map and, if requested, saved as a NetCDF file.

Authors#

  • Jeisson Leal

Functions#

calc_rel_diff(ref_input_dir, mod_input_dir, ...)

Compute long-term mean difference between model and reference datasets and plot the result.