Conservative mapping of data from one horizontal grid to another should preserve certain integral or mean properties of the original data. This may be essential in some model applications, including ensuring realistic exchange of energy and mass between coupled model components. It can also be essential for certain types of analysis, such as evaluating how far a system is from an equilibrium state. For some common grids, existing remapping algorithms may fail to perfectly represent the shapes and sizes of grid cells, which leads to errors in the remapped fields. A procedure is presented here that enables users to rely on the mapping weights generated by remapping algorithms but corrects for their deficiencies. With this procedure, for a given pair of source and destination grids, a single set of remapping weights can be applied to remap any variable, including those with grid cells that are partially or fully masked.

When analyzing climate data from different sources, it is often necessary, as an initial step, to map the data to a common grid, a procedure commonly referred to as remapping or “regridding” the data. For some purposes it is essential when remapping the data that the global mean (or, alternatively, the global integral) of the field be preserved. Conservative remapping algorithms are meant to guarantee this. In practice, remapping occurs in two steps: (1) given a source and destination grid, mapping “weights” are computed, and then (2) a sparse matrix multiplication of the source data by the weights yields the values of the field on the destination grid. The focus here is on the second step: given the weights needed for remapping conservatively, guidance is provided on how they should be applied. Appendix A lists some remapping packages that can be used to generate weights (i.e., to execute step 1). It should be noted that nearly all of these packages slightly misrepresent the true shape of grid cells found in some subset of commonly encountered grids. This can cause errors which must be corrected if conservative remapping is demanded. Moreover, most packages provide inadequate guidance on how to handle fields that are partially masked or, for three-dimensional fields, how to account for variations in the thickness of individual layers. The main purpose here is to clearly explain how to compensate for any inaccuracies in a remapping algorithm's representation of grid cell shapes and to account for missing or partially masked data when that is necessary.

The objective in remapping conservatively is to preserve certain physically important characteristics of the climate system. For a climate in global thermodynamic equilibrium, for example, the mean net flux of energy at the top of the atmosphere is zero. In properly formulated models run with all externally imposed conditions unchanging over time, the net flux at the top of the atmosphere will indeed approach and fluctuate about zero as the system approaches equilibrium. When the fluxes from a simulation of this kind are mapped to a different grid, we would like to preserve this important characteristic of the simulation. This can only be done if the remapping algorithm is conservative.

As a second example, consider trace species concentration in the atmosphere (e.g., of water vapor, ozone, CO

The fundamental relationship that must be satisfied to preserve the integral of a field over the global area is

A different relationship must be satisfied to preserve a field's global mean (denoted by an overbar):

In the next section, the formulas are introduced that apply to remapping data when

Consider first the simple case in which

Conceptually, the remapping weights are determined by overlaying the destination grid onto the source grid and calculating what fraction of each source cell overlaps each destination cell. These fractional contributions, here denoted

Noting that the fractional areas of the source cells contributing to a destination cell must add up to the area of the destination cell, we obtain a second useful identity:

Most conservative remapping algorithms are variants of an approach suggested by

When cell shapes are misrepresented, the

After computing the fractional contributions,

In order to preserve the true global mean, some packages accept, as an option, user-supplied true cell areas, which are then used in calculating the remapping weights,

Despite this apparent problem, some users may choose to calculate the destination values according to

Both alternatives for computing remapping weights, Eq. (

For the purpose of evaluating the relative merits of the two options, we now consider an example of a simple source grid and an idealized temperature field. It should be said up front that an example has been devised to clearly reveal the consequences of misrepresenting cell shapes and areas. This has dictated that we consider, in the first instance, grid resolutions that are uncommonly coarse. Many climate studies deal with grid cells smaller than a few degrees longitude and latitude, and not tens of degrees, as in the initial example below. It turns out that the size of the remapping errors is generally proportional to the longitudinal cell widths squared so that compared to our coarse-resolution example, errors would commonly be quite a bit smaller. This should be kept in mind in what follows.

For our illustrative example, suppose both the source and destination grids are spherical coordinate grids with the same latitude spacing (

True cell areas (

In this example, correctly remapping a source field to the destination grid is trivial since each destination value is determined solely by the contributions from the two source cells that alone occupy it. Consider a temperature that varies linearly with latitude and is independent of longitude. Then, the destination field is identical to the source field but with half the longitudinal resolution. The temperature dependence on latitude for the case considered is given by the black line labeled “source grid (truth)” in Fig.

For the example described in the text, destination grid cell values resulting from different remapping options. The source data were defined on a longitude by latitude grid of

If, however, we remap this temperature field based on an algorithm that assumes when computing approximate cell areas that the cell boundaries are defined by great circle segments, the destination values will lie on the dashed brown curve in Fig.

Under each option, a global integral can be preserved, according to Eqs. (

On the other hand, it would seem equally unsatisfactory to adopt the true-area option (dashed blue curve of Fig.

It is interesting and somewhat disconcerting to note that with the true-area option, the results of remapping can depend on the units used to express the temperature. The dashed blue curve in Fig.

An objection to using Eq. (

Yet another shortcoming of the true-area option is that its application to a spatially uniform source field can result in a destination field with nonzero spatial variance, which is obviously unrealistic. Consider, for example, a source field that has the value 1 everywhere. For the grid defined earlier (see Table 1), application of Eq. (

For the true-area option, use of Eq. (

Given the shortcomings of both the centered and uncentered variants of the true-area option, we reconsider the approximate-area option, which relies on the remapping algorithm to construct cell shapes and areas assuming that perimeters coincide with great circle segments. The fundamental problem with this approach, as expressed by Eq. (

Since neither of the cell-area choices offered by remapping codes is without shortcomings, it is worth further examining the characteristics of their errors to determine which approach results in the more realistic representation of the original field. For the temperature field considered earlier, Fig.

For the example described in the text, error in destination grid cell values resulting from different calculational options.

For the example described in the text, dependence on the longitude cell width of the rms error in destination cell values, with the error calculated over all latitudes and weighted by area. Only the remapping options that preserve the true global mean are shown. The rms errors have been normalized by the true spatial standard deviation of the variable. Expressed in this way, an error equal to 1 means, for example, that the rms error is as large as the spatial standard deviation of the variable, which in this example is 7.2 K. The mapping is always from a source grid with longitude cell widths half that of the destination grid but the same latitude resolution (

In Fig.

Figure

Recall that when there are some physical limits on a variable (e.g., a fraction confined to the interval 0 to 1), remapping algorithms may not respect those limits. Although with the approximate-area option, the remapping step ensures that all destination values will be within the maximum and minimum values of the source values, the correction to the mean required when applying that option can sometimes push values outside the limits. This issue can be addressed with a refined correction, which will be described in part of the next section.

We now consider the more general procedure for conservative remapping when there might be undefined elements in the source array (e.g., missing or masked elements) or when grid cell values might be defined for only a fractional portion of the source cell (for example, only over the land portion of a cell). For this purpose, we will adopt and generalize the form of the approximate-area option because, as discussed above, it was found to be more accurate than the true-area options and because with this option we can simplify some subsequent formulas using Eq. (

The key to handling data that may represent conditions on only a portion of each grid cell is to specify for each cell the “unmasked” fraction, and when remapping is performed, generate the appropriate destination unmasked fractions. Although sometimes the source grid unmasked fractions are binary (either 0 or 1) and might be inferred from special bit strings indicating “missing” data, if the data are remapped, the unmasked fractions will in general no longer be binary, and thus information will be lost unless the unmasked fractions are carried as an additional field along with the data field. The key to general remapping then is to carefully account for the unmasked fractions and to ensure that they are consistently defined on the destination grid.

Generalizing Eq. (

For some applications, destination fractions may have been imposed as part of the definition of the destination grid. For the purposes of remapping a field, however, it is essential that the destination fractions in Eq. (

As shown earlier, use of approximate areas in computing the weights in Eq. (

In the simplest case, the correction coefficient in Eq. (

More generally, a uniform adjustment of the destination field may result in values that lie outside the range of source values. Returning to our earlier example, we see in Fig.

To remedy this undesirable consequence of a uniform correction,

We first consider the case of a positive definite field, such as the concentration of a trace species. In this case we suggest that rather than applying a uniform increase or decrease in values, the same

There are some cases where certain limits must be strictly enforced. As an example, the fraction of each grid cell covered with sea ice must never be negative or exceed 1. To preserve the global mean while respecting these limits, we can apply Eq. (

For the example described in the text, dependence of the temperature correction,

Ideally, we might choose to distribute a needed correction according to where the grid cell shape misrepresentations are largest (and where the local conservation errors are likely largest). There is, however, no easy way to do this. Instead consider simply distributing the correction according to Eq. (

In the example considered above, the temperature in the cell adjacent to the Equator would, as already noted, exceed the maximum temperature found in the original field by 0.1 K if a uniform correction were applied. To prevent this, the correction needed to preserve the true global mean is distributed according to Eq. (

For the temperature field and various grid resolutions considered here, the

In the case of coarse resolution (with longitude widths

A final adjustment to

Some conservative remapping packages (see Appendix A) may not be designed or may not clearly document how to handle the most general cases considered here (e.g., fields with missing values or grid cells that are partially masked). Those codes may nevertheless be relied on to provide weights defined by Eq. (

Obtain from a remapping package the weights (

Check that for all destination cells the weights satisfy Eq. (

Assign or calculate the source grid's unmasked fractions,

If a source value is meant to represent conditions over the entire cell extent, set

If unmasked fractions have been assigned to source cells prior to remapping, the pre-assigned values should be assigned to

Wherever source cell data are missing, reset the unmasked fraction to 0 (

Assign or calculate the destination grid's unmasked fractions,

If unmasked fractions have been assigned to destination cells prior to initiating the remapping procedure,

If unmasked fractions have not been pre-assigned, generate the fractions with Eq. (

Use Eq. (

When necessary and desirable, correct the destination values,

Initially, attempt to impose a uniform correction to all values by applying Eq. (

If the uniform adjustment is unacceptable, apply Eq. (

In what follows, the above recipe will be referred to as the “standard procedure”. The weights,

Care must be taken when the standard procedure for remapping is applied to a variable representing conditions within layers of the atmosphere or ocean to ensure that mass-weighted means are preserved (as opposed to the usual area-weighted means). Additional complications might be encountered when a variable represents the ratio of two quantities (e.g., specific humidity is the ratio of the mass of water vapor to the mass of air), where, rather than preserving the global mean ratio, it is better to preserve the two quantities themselves. The following guidelines may be helpful in treating these possibly troublesome variables.

To remap a quantity representing a

To conserve a

To remap the

There are applications where the

For most 3-D quantities, remapping should preserve the mass-weighted mean rather than the area-weighted mean. Prior to remapping such variables, the

When the layer pressure thicknesses can be determined, the mass per unit area in the layer is

When the layer thicknesses can be determined, the layer mass per unit area is equal to the product of cell density (

Once the mass per unit area is obtained for each destination grid cell, as just described in (e) above, the formula for preserving

The amount of a substance in a layer of the atmosphere or ocean is often expressed as a ratio. To remap quantities of this kind, separately remap the quantities represented by the numerator and denominator and then form their ratio, as in the following examples.

For

For

For

For

For

For

In remapping

When remapping a 3-D field both vertically and horizontally, the vertical dimension must be handled carefully to preserve a global mass-weighted integral. When coupling component models (e.g., an atmospheric dynamical core with an atmospheric chemistry module) specialized handling might be required, but for the purposes of remapping model results, it might be satisfactory to treat the horizontal and vertical dimensions sequentially. We consider here the specific case of first interpolating from a model's native vertical grid to surfaces of constant mass per unit area and then remapping horizontally.

Compared with the generation of weights needed to remap conservatively in the horizontal, it is much easier to define the weights that will preserve integrals in the vertical. This is because the overlap of source and destination grid cells in the vertical is one-dimensional, and only the cell thicknesses must be considered (not their shapes). For data stored on native model levels, bounds defining the vertical extent of each grid cell are an essential component of the grid definition and should be known. Furthermore, the pressures associated with those interfaces should be derivable. Then the mass per unit area contained within the upper and lower bound of a layer can be calculated by dividing the pressure difference across the layer by

Once the vertical integration has been completed, conservative remapping of each layer can proceed following the standard procedure summarized in the previous section.

Most conservative remapping packages (see Appendix A) generate mapping weights based on grid cells that for certain grids might differ slightly in shape from the true cell shapes. Typically, a remapping algorithm will construct cell polygons with edges that follow great circles and then use these to determine cell areas and mapping weights. On the other hand, many models and analysis grids are constructed on spherical grids with grid cell bounds that follow lines of constant longitude and lines of constant latitude (not great circles). If data are mapped from or to a grid of this kind, the remapping algorithms can fail to preserve the true global mean or integral of a field. The algorithms instead preserve a global mean based on their approximate representations of cell shapes and areas, which generally differs from the true mean. Other packages may assume cell shapes are defined by bounds coinciding with straight lines on a equirectangular projection, and then the cell shapes for the increasingly popular cubed-sphere grid (among many others), which follow great circles, are not accurately represented.

Errors in conservation may especially matter when gauging whether a model, having reached equilibrium, is conserving energy. If the global mean net top-of-the-atmosphere energy flux is in fact zero, as evaluated based on the original grid and correct cell areas, remapping those data and calculating the mean on a new grid could lead to a different conclusion. Similarly, when the mass of a trace species is not preserved, it is impossible to accurately track its changes and possibly determine what the causes of those changes are.

Another limitation of many remapping packages is that although they may be able to treat gridded data where a binary mask applies (e.g., screening regions of missing data or limiting analysis to the ocean or land regions alone), not all are designed to conveniently handle data values that are representative of only a portion of a grid cell (i.e., are partially unmasked). Moreover, often the easiest option offered for handling such cases is to perform the computationally intensive recalculation of weights each time a new mask is imposed.

Here instructions have been provided explaining how to use the weights generated by remapping packages and how to avoid or correct for their deficiencies. For a given pair of source and destination grids, the remapping weights need only be calculated once; the weights are independent of any full or partial masking of the source data. Each destination field can then be calculated via very sparse matrix multiplications. The recipes appearing in Sect. 4 provide step-by-step instructions on how to handle various cases. These recipes apply even when the remapping algorithm has correctly represented the shapes and areas of grid cells; when that is true, the steps involving correction of the mean can be skipped.

Conservative remapping of the kind considered here must always operate on variables that are independent of the cell's area. For example, rather than remap the area of snow cover in grid cells, the areas must first be converted to fractions, which can be conservatively remapped and then converted back to areas. Most variables reported from models are intensive, so such conversions are rarely necessary.

Conservative mapping is obviously required if it is important to preserve the global integrals (or means) of a field. When this is not essential, other methods of interpolating data to a destination grid may lead to a more physically consistent and realistic-looking result. Consider, for example, the geopotential height and wind fields carried on a relatively coarse source grid. If these fields were mapped conservatively to a much finer resolution grid, box-fill contour plots of the resultant fields would look like slightly blurred versions of the box-fill plots of the original fields (often referred to as the mesh-imprinting phenomenon). The sub-cells wholly contained within a given source cell would all share the same value; there would be no variation except for the relatively few cells at the borders of the original source cells. Thus, within the confines of each original source cell, the geopotential height and winds would be constant, and at the borders of original source cells, there would be large gradients. With nonzero wind values but no geopotential gradients within the confines of the original cell, the geostrophic balance generally prevailing outside the tropics would be upset. In general, when mapping from a coarse to a fine grid, a second-order conservative scheme

By way of simple examples, we have shown that certain approaches to applying weights generated with commonly used remapping packages can lead to substantial errors even if the true global mean is preserved. The “standard procedure” recommended here avoids some of the problems, but for some grids it can include a typically small, but perhaps non-negligible, correction to preserve the global mean. For some applications the correction might not be considered large enough to warrant applying it. In this regard it should be remembered that the largest remapping errors illustrated by the simple examples considered above were associated with very coarse grids. Errors are much smaller and perhaps could be considered insignificant for grids of a more usual finer resolution, since the errors scale with the square of the grid cell longitude width.

We have shown that with available remapping packages, careful application of the remapping weights, unmasked fractions, and (when needed) the application of a correction can result in reasonably accurate results with the true global integrals or means of interest preserved. If cell shapes were invariably reconstructed correctly by the remapping algorithms, no correction would be needed to preserve the global mean and the standard remapping procedure could be simplified. This would seem to provide strong motivation for augmenting remapping packages with the option to correctly construct the commonly encountered longitude by latitude grids with cell edges conforming to the true grid cell shapes.

The focus here has been how to accurately preserve the global mean of a field when it is remapped to a different grid. There are, of course, other criteria for judging the relative merits of a remapping scheme unrelated to conservation.

C-Coupler2: this package was developed for use in coupling components of climate models

Climate Data Operators (CDO): this package, designed to manipulate and analyze climate and weather prediction data, includes a conservative remapping option that is based on the YAC package (see below). Documentation is available at

Earth System Modeling Framework (ESMF) Regrid Weight Generator (ERWG): this library contains a number of remapping methods useful in the analysis of climate data, including a conservative option. Cell vertices are connected following great circles. Documentation is available at

Mesh-Oriented datABase (MOAB): this library

NetCDF Operators (NCO): this toolkit manipulates and analyzes data of interest to the geophysical community and includes three options for creating remapping weights: TempestRemap, ESMF (ERWG), and NCO's own conservative weight generator, which assumes cell shapes are defined by great circles. Documentation and guidance are available at

OASIS: this software was developed for coupling components of climate models (

Spherical Coordinate Remapping and Interpolation Package (SCRIP): this is the first library to implement the

TempestRemap: this is a conservative, consistent, and monotone remapping package for arbitrary grid geometry with support for finite volumes and finite elements (see

XML-IO-Server (XIOS): this open-source library handles I/O management in climate codes, and it includes a remapping capability. In constructing grid cells, it connects the cell vertices following great circles. In some cases a cell side that begins and ends at the same latitude and spans a large longitude range can be subdivided into multiple short segments (with each segment following a great circle). This results in a side that more nearly follows a latitude circle, and for some grids this can improve global conservation. Documentation is available at

Yet Another Coupler (YAC): a conservative remapping algorithm is included in this climate model component coupler (

The value of

Sometimes it is possible to uniformly apply the global mean correction,

When the conditions of Eq. (

To prevent a corrected field value from exceeding the imposed limits, we require for all

Next, excluding all remapped cell values of

It can be shown that Eq. (

The differences in the corrections made to the collection of cells are minimized when equality holds in Eq. (

Substituting the expression for

The formula used to improve iteratively on this estimate is derived by setting

The above method of calculating

The calculations performed in support of this research were based on straightforward application of the procedures fully described in the paper, relying on artificial data included in the paper. The results were obtained with the assistance of Excel for Mac (version 16.78). The Excel spreadsheet does not conveniently expose the code that produces its numbers, so the best way to reproduce the results reported in this paper is to independently apply the simple formulas to the input data depicted with a solid black line in Fig. 1. The spreadsheet is not general enough to treat cases different from the one reported on in this paper, rendering it of little value beyond the current study.

The author has declared that there are no competing interests.

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors.

I thank Paul Durack and Paul Ullrich for their helpful comments on the original draft of this article. I am grateful for the thoughtful comments and suggestions offered by the reviewers and for offline exchanges with Moritz Hanke and Charles Zender, who explained certain characteristics of their software libraries and generously shared their considerable knowledge regarding remapping algorithms.

This research was carried out by the Program for Climate Model Diagnosis and Intercomparison (PCMDI) with support from the Regional and Global Modeling Analysis (RGMA) program area under DOE's Biological and Environmental Research Program. The work was performed under the auspices of the US DOE by Lawrence Livermore National Laboratory under contract DEAC52-07NA27344.

This paper was edited by Lele Shu and reviewed by Vijay Mahadevan and two anonymous referees.