Changes between Version 17 and Version 18 of Ticket #152


Ignore:
Timestamp:
11/21/16 11:54:22 (2 years ago)
Author:
martin.juckes
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #152 – Description

    v17 v18  
    33The proposal is to make it clear that use of `where` for non-spatial dimensions is allowed by adding examples in section 7. It is also necessary to provide these examples to clarify the subtle differences implied by different formulations of the `cell_methods` statement.
    44
    5 == Replace text of section 7.3.3 (first 3 paragraphs) ==
     5
     6== 1. Replace text of section 7.3.3 (first 3 paragraphs) ==
    67
    78By default, the statistical method indicated by cell_methods is assumed to have been evaluated over the entire horizontal area of the cell. Sometimes, however, it is useful to limit consideration to only a portion of a cell (e.g. a mean over the sea-ice area). The portion concerned is constant in time in some cases, but it could be time-varying. Grid cell “portions” that can be considered are only those permitted to be associated with the   `standard_name` of `area_type`. There are two options for indicating when a quantity represents a portion of a cell.
     
    1112The second method for indicating that a statistic applies to only a portion of a cell is more general because it can reference multiple area-types.  This may be needed when a variable has a dimension that ranges across various area types.  In this case, the cell_methods entry is of the form `name: method where typevar`. Here `typevar` is a string-valued auxiliary coordinate variable or string-valued scalar coordinate variable (see Section 6.1, "Labels") with a `standard_name` of `area_type`. The variable `typevar` contains the name(s) of the selected portion(s) of the grid cell to which the method is applied. This method provides a convenient way to store output from land surface models, for example, since they deal with many area types within each surface gridbox (e.g., vegetation, bare_ground, snow, etc.).
    1213
    13 == Caption of example 7.6
     14== 2. Caption of example 7.6
    1415
    1516If the method is `mean`, various ways of calculating the mean can be distinguished in the `cell_methods` attribute with a string of the form `mean where type1 [over type2]`. Here, type1 can be any of the possibilities allowed for typevar or type (as specified in the two paragraphs preceding above Example). The same options apply to type2, except it is not allowed to be the name of an auxiliary coordinate variable with a dimension greater than one (ignoring the dimension accommodating the maximum string length).
     
    1718A cell_methods attribute with a string of the form `area: mean where type1 over type2` indicates the mean is calculated by integrating over the type1 portion of the cell and dividing by the area of the type2 portion.  When `over type2` is omitted, it is assumed to be the same as type1.
    1819
    19 == Clarification at start of section 7.3.3 (not needed if above is accepted) ==
     20== 3. Addtional text for masks which vary over additional dimensions (e.g. time) .. form proposed by Karl ==
     21
     22When the “where” construct is used, and when “area” is not the only “dimension” to which it applies, the interpretation more generally is that a “weighted” mean is reported. Specifically, the quantity of interest is integrated over the additional dimension(s) with weights proportional to the fraction of “type1” area_type that exists, and then this is divided by the integral over the same dimension(s) of the fraction of “type2” area_type that exists.   [Note that certain variables might be undefined if the fraction of the area_type considered is 0; for example the temperature of sea ice is not defined if there is no sea ice.  In this case, a time-mean value can still be computed for cells containing some sea ice during at least a portion of the averaging interval because no matter what the value assumed for temperature when sea ice is missing, those values are given zero weight in computing the time-mean.]
     23
     24Note that "`all_area_types” is one of the valid strings permitted for a variable with the standard_name area_type,  so a cell_methods string of the form “area: mean over type1 where all_area_types” indicates the mean is calculated by integrating over the type1 portion of the grid cell and dividing by the entire area of the grid cell.
     25
     26The following three examples illustrate cases when one might want to use “where” or “where … over” in defining the cell_methods:
     27
     281. Suppose that in a grid cell the fractional sea ice varies over time, but there is interest in the time-mean surface temperature of the sea ice. The time-samples, each representing a spatially-averaged sea ice temperature can be summed and then divided by the number of samples to obtain an unweighted mean where sea ice exists. This would be indicated with:
     29cell_methods = “area: mean where sea_ice time: mean”
     30
     312. Suppose there is interest in recording the mean fractional area covered by sea ice and the mean sea ice thickness in such a way that their product would equal the time-mean volume of sea ice in each grid cell. In this case the sea ice area would be reported as an unweighted time-mean, while the mean sea ice thickness would be calculated with time samples weighted by the fractional area of sea ice. Thus, for sea ice thickness:
     32cell_methods = “area: time: mean where sea_ice”
     33
     343. Suppose the time-mean contributions to total heat flux from different portions of a grid cell (e.g., ice-free and ice-covered) are of interest, and there are reasons to report these in such a way that the total heat flux is the sum of the individual contributions. Then the cell_methods attribute would be defined:
     35cell_methods=”area: mean where sea_ice over all_area_types time: mean”
     36
     37In some cases a variable referencing a specific area_type will actually be defined even in the absence of that area_type (i.e., over the entire grid cell).  Consider the surface_snow_thickness, which could sensibly be considered to be 0 in the absence of snow.  In this case one might in some instances want to report “area: time: mean where snow” (giving a measure of the typical snow depth when snow exists) and in other instances “area: time: mean where snow over all_area_types” (which in this case would be identical to “area: time: mean”) or “area: time: mean where snow over land”.
     38
     39
     40== 4. Clarification at start of section 7.3.3 (not needed if above is accepted) ==
    2041
    2142''Add a clarification after this sentence in the first paragraph of 7.3.3 "Sometimes, however, it is useful to limit consideration to only a portion of a cell (e.g. a mean over the sea-ice area)", to introduce the idea of time-varying area fractions:''
     
    2344The portion concerned is constant in time in many cases, but it could be time-varying.
    2445
    25 == New example for time-varying area fractions ==
     46== 5. New example for time-varying area fractions ==
    2647
    2748''The following new example and explanatry text should be added in section 7.3.3:''