#152: Time mean over area fractions which vary with time
-----------------------------+------------------------------
  Reporter:  martin.juckes   |      Owner:  cf-conventions@…
      Type:  enhancement     |     Status:  new
  Priority:  medium          |  Milestone:
 Component:  cf-conventions  |    Version:
Resolution:                  |   Keywords:
-----------------------------+------------------------------

Old description:

> Following a discussion on the mailing list, I'd like to propose adding a
> new example to the CF Convention document to illustrate the use of
> cell_methods to specify different mean quantities when using a mask which
> is time varying (e.g. sea_ice). The qualifier `where` has been introduced
> into the `cell_methods` to specify masked spatial operations, e.g. `area:
> mean where sea_ice` to represent a spatial mean over sea ice. The current
> convention does not explicitly comment on whether the `where` construct
> can be used with other dimensions. For the CMIP6 data request there is a
> requirement to specify the temporal mean of quantities averaged over sea
> ice, and the spatial extent of the sea ice is generally varying in time.
>
> The 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.
>
> The following should be added as a new example in section 7.3.3:
>
> Example 7.8: Time mean over area fractions which vary with time
>
> {{{
> float simple_mean(lat,lon):
>    simple_mean:cell_methods: area: mean where sea_ice time: mean
>
> float weighted_mean(lat,lon):
>    weighted_mean:cell_methods: area: time: mean where sea_ice
>
> float partial_mean(lat,lon):
>    partial_mean:cell_methods: area: mean where sea_ice over sea time:mean
> }}}
>
> When the area fraction is varying with time, there are several different
> ways in which a time mean can be formulated. Three of these are
> illustrated in this example. Suppose, for instance, we are averaging over
> three time steps and the data at one grid point is -10, -6, -2 with area
> fractions .75, .50, .25. The values of the simple_mean, weighted_mean and
> partial mean are, respectively, (-10 -6 -2)/3 = -6, (-10*.75 - 6*.5
> -2*.25)/(.75+.5+.25) = -7.33 , and (-10*.75 - 6*.5 -2*.25)/3 = -3.667.
> The partial mean provides the contribution to the mean over the entire
> grid from a specified area type. The simple mean is weighting each time
> period equally, while the weighted mean provides equal weighting to each
> unit area of `sea_ice`.

New description:

 Following a discussion on the mailing list, I'd like to propose adding a
 new example to the CF Convention document to illustrate the use of
 cell_methods to specify different mean quantities when using a mask which
 is time varying (e.g. sea_ice). The qualifier `where` has been introduced
 into the `cell_methods` to specify masked spatial operations, e.g. `area:
 mean where sea_ice` to represent a spatial mean over sea ice. The current
 convention does not explicitly comment on whether the `where` construct
 can be used with other dimensions. For the CMIP6 data request there is a
 requirement to specify the temporal mean of quantities averaged over sea
 ice, and the spatial extent of the sea ice is generally varying in time.

 The 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.

 == New example for time-varying area fractions ==

 ''The following new example and explanatry text should be added in section
 7.3.3:''

 Example 7.8: Time mean over area fractions which vary with time

 {{{
 float simple_mean(lat,lon):
    simple_mean:cell_methods: area: mean where sea_ice time: mean

 float weighted_mean(lat,lon):
    weighted_mean:cell_methods: area: time: mean where sea_ice

 float partial_mean(lat,lon):
    partial_mean:cell_methods: area: mean where sea_ice over sea time: mean
 }}}

 When the area fraction is varying with time, there are several different
 ways in which a time mean can be formulated. Three of these are
 illustrated in this example. Suppose, for instance, we are averaging over
 three time steps and the data at one grid point is -10, -6, -2 with area
 fractions .75, .50, .25. The values of the simple_mean, weighted_mean and
 partial mean are, respectively, (-10 -6 -2)/3 = -6, (-10*.75 - 6*.5
 -2*.25)/(.75+.5+.25) = -7.33 , and (-10*.75 - 6*.5 -2*.25)/3 = -3.667. The
 partial mean provides the contribution to the mean over the entire grid
 from a specified area type. The simple mean is weighting each time period
 equally, while the weighted mean provides equal weighting to each unit
 area of `sea_ice`.

 In example 7.8, `time` could be replaced by any other coordinate over
 which an average is taken, such as an ensemble index.

--

Comment (by martin.juckes):

 Hello Jonathan,

 The answer to the first question is yes, and I've modified the layout to
 make it a bit clearer.

 On the 2nd point, I'm not sure. What I'm proposing is clarifying the usage
 with time-varying area fractions, or, in principle, area fractions which
 vary with any other coordinate dimension (e.g. an ensemble index). At the
 moment the construct is still dependent on the standard name
 `area_fraction`, so it can only apply to horizonal areas.

 I've added a sentence to the proposed insert to clarify that `time` can be
 replaced by another dimension.

 regards,
 Martin

--
Ticket URL: <http://cf-trac.llnl.gov/trac/ticket/152#comment:2>
CF Metadata <http://cf-convention.github.io/>
CF Metadata

Reply via email to