Skip to content

Input Data Remapping

Data remapping, also known as regridding, is the process of transforming data from one spatial grid (the source grid) to another (the destination grid). This is a common and essential task in numerical modeling, particularly in climate and oceanographic simulations. It ensures that datasets with different spatial resolutions or coordinate systems can be consistently used as inputs to other models. In SURF, data remapping involves three main steps:

Each step is detailed below.

Extrapolation (Sea-Over-Land)

Before any interpolation is performed, SURF applies the Sea-Over-Land (SOL) extrapolation procedure, as described in Trotta et al., (2021).

The primary goal of SOL is to ensure that valid data is available for interpolation near coastlines by extrapolating values from nearby sea grid-points to adjacent land grid-points in the source grid.

SOL uses a diffusive boundary layer approach, a method commonly employed in geophysical modeling to smoothly extend physical fields into regions where data is missing or unsuitable for direct use.

  • For ocean fields, the procedure effectively "extends" the ocean data slightly over land, providing necessary source values for a robust interpolation onto the destination grid.

  • For atmospheric fields, SOL is similarly applied using an atmospheric land-sea mask. This helps prevent contamination from land-based atmospheric data, ensuring accurate representation at sea points near the coast during interpolation to the destination grid.

Horizontal Interpolation

Once SOL is complete, SURF performs horizontal interpolation. This is based on the Spherical Coordinate Remapping and Interpolation Package (SCRIP). SCRIP is a well-established tool, also part of the NEMO software suite (found under tools/WEIGHT section of the NEMO repository ).

The SCRIP-based interpolation process generally involves two stages:

  • Weight Generation: An interpolation weight matrix is calculated. This matrix defines how values from the source grid contribute to each point on the destination grid.

  • Interpolation: The data values from the source grid are then multiplied by this interpolation weight matrix to compute the corresponding values on the destination grid.

This spatial interpolation procedure is applied to all input fields required for running the NEMO models, including bathymetry, atmospheric and tidal forcing, initial conditions, and lateral open boundary condition datasets.

Currently, SURF supports bilinear and bicubic horizontal interpolation methods.

Vertical Interpolation

Vertical interpolation in SURF is performed using functions from the SciPy library, specifically the scipy.interpolate.interp1d function. This method interpolates 3D ocean fields — such as temperature, salinity, and velocity — from the coarse vertical resolution of the parent grid to the higher-resolution vertical levels of the child grid. Currently, only linear vertical interpolation is supported.