Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page is under construction...explanation and links will be added in the coming days and weeks...feedback welcome!

...

1. ACME adopted flawed FV-style gridfiles that omitted a small strip of longitude to the east of Greenwich. This problem was identified independently by Charles Doutriaux and myself. For FV 129x256, this amounted to 0.2% of global area, that might appear as a gap or blank strip when plotted. Maps based on the flawed grids somehow reapportion area so that total area is conserved (4*pi sr), yet this necessarily redistributes weights from their true positions. This causes a mismatch between "area"- and "gw"- weighted statistics. The proper solution here is to correct the grids to avoid gaps, in this case, to restore the longitude strip to the west of Greenwich in the first zonal gridcell, and to base maps on those grids. With these grids, the gap disappears and "area"- and "gw"-weighted statistics can agree to double-precision (see examples below). 

2. SCRIP introduced, and CESM and ACME inherited, coordinate storage in double precision (yay!). Unfortunately, every Gaussian grid that I have examined has grid center latitudes (= sine of the Gaussian quadrature points) accurate to no greater than eight digits. This problem appears in files in the SCRIP distribution, and in all files produced by NCL that I have examined. The solution is to base latitudes on quadrature points (i.e., Legendre solutions) computed to full double precision. NCO now generates SCRIP-format Gaussian grids accurate to sixteen digits, the best that double precision can reach.

3. All SCRIP and CESM-maintained Gaussian grids that I have examined (T42, T62, and T85) infer gridcell interfaces as midpoints between Gaussian quadrature points/angles. Software then infers the gridcell areas from gridcell interfaces. The problem is that interfaces defined by the midpoint rule will always produce areas inconsistent with those implied by the quadrature weights. This causes a mismatch between "area"- and "gw"- weighted statistics. NCO now uses Newton-Raphson iteration (instead of the quadrature midpoints) to determine the gridcell interface location that exactly matches areas determined by the (now double-precision) Gaussian weights. The Newton-Raphson iteration moves interfaces by, typically, a few tenths of a degree (for moderate resolution Gaussian grids) from their previous locations as quadrature midpoints. With these grids, "area"- and "gw"-weighted statistics are can be consistent and agree to double-precision (see examples below).

4. Some equi-angular lat/lon grids historically produced and used in the CESM community utilize the continuous form of the weighting function (i.e., cosine(lat)) evaluated on the discretized grid, rather than the exact discretized weight function (i.e., the difference of the sine of the latitudes bounding the zone). And some of these equi-angular lat/lon grids are used as staggered/offset grids for FV dynamics variables (e.g., U, V). All equi-angular lat/lon grids must have the same functional form for weights as the FV grid itself, since they are simply offsets of eachother. Without this correction, statistics of variables computed on the FV dynamics grid may be misdiagnosed (fxm: last sentence not yet verified). Users of all equi-angular grids, including staggered FV grids, should ensure their grids were produced with the correct weighting function. One way to do this is to verify the "area" variable, if present, exactly matches the area between the gridcell interfaces. If unsure, consider generating a new grid with the instructions below, or ask me and I will be happy to generate one for you and keep it in a standard location where others may access it.

...

...

 

Weightingmap_ne30np4_to_ t42_aave.001005.ncmap_ne30np4_to_ t42_aave.20150901.ncmap_ne30np4_to_ t42_aave_ua.20150901.nc
Native2.441241149902344e+022.441241149902344e+022.441241149902344e+02
area2.441241149902344e+022.441241149902344e+022.441241149902344e+02
gw
2.441290893554688e+02
2.441119842529297e+02
2.441241149902344e+02

Ignore the last column (with --user_area = "_ua" mapfiles) for now. The alert reader will see that the first two rows of both tables are identical, i.e., weighting by "area" produces identical answers whether or not one migrates to the new mapfiles. This surprised us because issues 1, 2, and 3 described above are that the old grid has a gap (for FV maps) and non-precise weights with mis-positioned centers and interfaces (for Gaussian maps). How can global-mean area-weighted answers from the flawed maps agree to double-precision with the updated maps? There are two reasons for this. First, ERWG, by default, constructs its own areas for all grids it receives. Here it somehow decides that the grids it receives are global (even though the FV grids are missing a longitude strip), and it builds its own internal representation of these grids with total surface = 4*pi sr. Second, it imposes the normalization requirement for first-order conservative remapping, meaning that it guarantees global integrals on the source and destination grids agree. In other words, it adjusts the output values of the field (FSNT, in this case) such that the integral of those values times its internally-diagnosed area-weights equals the input global integral. Some local values of FSNT in the output file are therefore scaled by an unrealistic factor, and this is non-obvious from looking at only the global integral.

The third row of both tables shows that the "gw"-weighted answers change when migrating, and that both old and new "gw"-weighted answers are incorrect, i.e., they do not agree to double-precision with the native grid. Here "gw" is the name of the variable holding the latitude-weights (which may or may not be Gaussian weights) for the output grid. Hence we prefer to call the contents of "gw" the latitude-weights. Latitude-weights are diagnosed from the user-specified gridcell interfaces of the output grid. The latitude-weighted answers change (from old to new) if the latitude-interfaces change. Latitude interfaces do not change for FV grids, and do change for Gaussian grids. All latitude-weighted answers are (still) incorrect with the new map-files (i.e., the middle column) because the latitude-weights are applied to the field-values (e.g., FSNT) consistent with the internally diagnosed area, and that area embodies the approximation that gridcell vertices are connected by great-circle arcs (whereas small-circles not great-circles connect points with the same latitude in FV and Gaussian grids). In other words, the new latitude-weights are correct but ERWG has adjusted the fields to be consistent with its internal notion of area, which is based on great-circles and is therefore incorrect for rectangular lat/lon grids.

The answers in the third column all agree to double-precision, yet we do not recommend using those mapfiles which look identical to those in the second column except that ERWG received a single additional argument, --user_areas, in producing them. This argument tells ERWG to normalize with respect to (and to output) the areas provided in the user-supplied grid-files, rather than to generate its own based on the provided grid boundares. However, ERWG can only perform remapping in a manner consistent with its internal assumption of great-circle (not small-circle) connected gridpoints so it still internally generates and uses its own area, though it outputs the user-specified area. The --user_areas switch forces ERWG to adjust the field values so that the global sum of each value, times the ratio of its user-supplied area to its internal area, is the same on input and output grids. Since the correct grid interfaces are present in the new map-files, the correct latitude-weights are diagnosed. And these weights times the fields times the area ratios are correctly normalized globally. 

Why then do we not recommend and use the mapfiles in the third column? Because they produce correct global integrals, but the have worse local precision than the middle column. Here is why: Consider a constant field, say 1.0, on the native grid. The values on the output grid must satisfy the imposed global conservation the user-supplied areas. Thus the regridding remaps 1.0 to 1.0*area_ESGF/area_True where area_ESGF is the internally diagnosed area (i.e., great-circle-based area) and area_True is the user-provided, true area (i.e., small-circle-base in latitude, great-circle-based in longitude). Although the ratio area_ESGF/area_True is near but not equal to 1.0. Thus the remapping turns a constant input field 1.0 into a spatially varying output value 1.0+epsilon where epsilon depends on latitude. Error characteristics of this remapping, such as the L2-norm, are inferior to those of the middle column. Moreover, a plot of the formerly constant field shows an artificial dependence on latitude which though small, is visually distracting.

To summarize, there is not yet a weight-generator which correctly handles both unstructured (great-circle-connected) grids and rectangular (small-circle-connected) lat/lon grids. In the absence of that, the mapfiles produce weights with some drawbacks. We advocate using the map-file with the best overall error characteristics for the job at-hand. For general-purpose regridding, that is the mapfile shown in the middle-column above. If you want weights exactly valid for remapping lat/lon grids with unstructured grids (i.e., eliminating the great-circle-connected approximation), please comment below or contact Charlie Zender who will attempt to prioritize the necessary work accordingly.