High-Resolution Nested Grid
In this page you will learn more about the grid structure used by the NEMO model and how SURF automatically generates it based on your configuration.
The Grid Structure
Arrangement of Variables
The NEMO model uses the Arakawa C-grid for spatial discretization. In this staggered grid system:
- Scalar variables such as temperature (T), salinity (S), pressure (p), and density (ρ) are defined at the center of each 3D grid cell (known as T-points).
-
Velocity components are defined at the edges of the grid cell, shifted by half a grid width in their respective directions:
- Zonal velocity (u) is placed at the east-west (i-direction) cell faces.
- Meridional velocity (v) is placed at the north-south (j-direction) cell faces.
- Vertical velocity (w) is located on the top and bottom (k-direction) faces.

Horizontal Grid
SURF uses a rectangular latitude–longitude grid defined in a spherical coordinate system (\(\lambda,\varphi\)), where \(\lambda\) represents longitude and \(\varphi\) represents latitude (expressed in degrees). This type of grid is commonly used in limited-area ocean models, particularly for regional and coastal applications.
The horizontal grid coordinates \((\lambda_{i,j}, \varphi_{i,j})\) are defined by the number of grid points in longitude and latitude \((n_\lambda, n_\varphi)\), the grid resolutions \((\Delta \lambda, \Delta \varphi)\), and the south-west corner \((\lambda_{11}, \varphi_{11})\) of the domain, using the following formulas:
An illustration of the horizontally staggered Arakawa C-grid is provided in the figure below.
Horizontal staggered Arakawa C-grid used by the NEMO ocean model.
Large symbols represent the parent model grid; small symbols indicate the child model grid.
Vertical Grid
SURF adopts the z* (z-star) vertical coordinate system — a surface-following approach where vertical levels adjust dynamically with the free surface. This means the vertical coordinate system stretches and compresses in proportion to local variations in water column thickness, allowing for more accurate representation of sea surface variability.
Key features of the NEMO vertical grid as adopts in SURF configuration include:
- Stretched z-levels: The grid levels are smoothly distributed throughout the water column, typically with higher vertical resolution near the surface and intermediate depths. This is where vertical gradients are often stronger, and finer resolution is valuable for resolving surface mixing and upper ocean dynamics. Once the bathymetry \(z = H(\lambda, \varphi)\) and the number of vertical levels \(n_{z}\) are specified, the vertical location of the w- and T-levels (in metres) are computed using the following analytic expression:
where \(h_{cr}\) represents the grid's stretching factor, \(h_{th}\) defines the approximate model level at which the maximum stretching occurs. The parameters \(h_{sur}\), \(h_0\) and \(h_{1}\) can be internally computed based on two parameters: \(dz_{min}\), minimum thickness for the top layer (in meters), and \(h_{max}\) the total depth of the ocean (in meters).
- Partial bottom cell parameterization: To better represent complex bathymetry, SURF employs this technique. It allows the thickness of the bottom-most grid cell to vary according to the local bathymetry, enhancing the realism of seabed topography.
An illustration of the vertical level structure is shown in the following figure.
Vertical grid used by NEMO ocean model.
Grid Generation Steps
The high-resolution nested grid is automatically generated by SURF.
This process is based on your domain selection, the horizontal grid resolution and vertical levels settings specified in the configuration (see the configuration section 🔗Nested Grid and Land-Sea Mask Settings
).
To generate an accurate 3D mesh for NEMO, SURF requires two input datasets:
-
Bathymetry dataset — defines ocean depth at each horizontal location and determines which grid levels are classified as land or sea.
-
High-resolution coastline dataset — refines the first verticla level of the land–sea mask to align with realistic shoreline boundaries.
The grid generation process consists of the following main steps:
2D Grid Generation
The horizontal (2D) grid is generated using the NEMO utility tool DOMAINcfg
.
This step generates the regular latitude–longitude grid for the child model domain and it serves as the foundation for interpolating the bathymetry data.
Bathymetry Processing
Before the final 3D grid can be generated, the input bathymetry data must be interpolated onto the model's 2D T-grid and then preprocessed. This preprocessing is vital for ensuring consistency, numerical stability, and accuracy in the model simulations.
SURF includes several utilities and applies specific steps to preprocess and refine bathymetry data:
-
Interpolation to Model Grid
The source bathymetry, typically provided on a structured global or regional grid (e.g., GEBCO, ETOPO), is interpolated onto the newly generated child model T-grid. -
Shapiro Filtering for Noise Reduction
Bathymetric data often contains small-scale noise or sharp gradients that that may potentially lead to numerical instabilities during model integration. To address this, SURF applies a high-order Shapiro filter to smooth the input bathymetry without significantly altering large-scale topographic features.
A Shapiro filter of 2N-order accuracy is applied to a variable \(w\) using the expression:\[ \tilde{w_i} = F^{2N}(w_i) = \left[ I + (-1)^{N-1} \frac{\delta^{2N}}{2^{2N}} \right] (w_i) = w_i + (-1)^{N-1} \frac{\delta^{2N} w_i}{2^{2N}} \]where \(\tilde{w_i}\) is the filtered value of variable \(w\) at point \(x_i\), \(I\) is the identity operator and \(\delta^{2N}\) is the even composition of the standard difference operator \(\delta\) (Richtmyer, 1957). This filter is a discrete symmetric operator with a (2N + 1) point stencil. It acts as a low-pass filter that preserves the low-frequency content (i.e., largest wavelengths) and completely dissipates the high-frequency content (i.e., shortest wavelengths) from the original field.
-
Bathymetry Clipping
SURF allows setting minimum and/or maximum depth values across the entire domain. -
Region-Specific Modifications
Users can assign constant bathymetry values to selected subregions. This feature is useful for idealized model experiments or for manually correcting known bathymetric inaccuracies in specific zones. -
Sea Surface Elevation Adjustment
The entire bathymetry can be shifted vertically to simulate non-zero mean sea level offsets. This is particularly relevant for modeling enclosed or semi-enclosed basins that have a mean sea level different from the global geoid. Example: Apply a −28m offset to represent the Caspian Sea’s mean sea level relative to the global mean.
3D Grid Generation
The final 3D nested grid is created by incorporating the processed bathymetry data.
This step is also performed using the NEMO utility tool DOMAINcfg
. The full configuration for this process is defined in a dedicated namelist file, available here.
The output of this step — commonly referred to as the meshmask — includes:
-
The complete 3D high-resolution nested grid (coordinates and scale factors of all T, U, V, W, F points).,
-
the associated land–sea mask, a 3D boolean array that identifies whether each grid cell represents land or ocean.
The generated files are saved in NetCDF format and can be found at: