Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example #14

Closed
zklaus opened this issue Sep 24, 2021 · 6 comments
Closed

Example #14

zklaus opened this issue Sep 24, 2021 · 6 comments

Comments

@zklaus
Copy link
Owner

zklaus commented Sep 24, 2021

Example 1: Only percentile threshold

This example aims to be as close to CF Conventions 1.9, Example 7.12 as possible, while still introducing the concept of percentile threshold.

It differs in the following ways:

  • The second variable, n2 (spell length) has been removed for simplification.
  • The numerical threshold has been replaced by a percentile threshold.
  • The standard name has been changed from ..._below_... to ..._above_... to follow this issue.
  • A (suspected) typo in the climatology bounds values has been corrected.
variables:
  float n1(lat,lon);
    n1:standard_name="number_of_days_with_air_temperature_above_threshold";
    n1:coordinates="percentile_threshold time";
    n1:cell_methods="time: maximum within days time: sum over days";
  float percentile_threshold;
    percentile_threshold:standard_name="cumulative_probability_of_air_temperature";
    percentile_threshold:units="%";
  double time(time);
    time:climatology="climatology_bounds";
    time:units="days since 2000-6-1";
  double climatology_bounds(time,nv);
data: // time coordinates translated to date/time format
  time="2008-1-16 6:00";
  climatology_bounds="2007-12-1 6:00", "2008-3-1 6:00";
  percentile_threshold=95.;

Example 2: Only percentile threshold, timeseries

This example follows on the heels of Example 1. The only change is that here we are talking about a longer timeseries, where we are giving the number of days above a threshold per year for several years running.

variables:
  float n1(time, lat, lon);
    n1:standard_name="number_of_days_with_air_temperature_above_threshold";
    n1:coordinates="percentile_threshold";
    n1:cell_methods="time: maximum within days time: sum over days";
  float percentile_threshold;
    percentile_threshold:standard_name="cumulative_probability_of_air_temperature";
    percentile_threshold:units="%";
  double time(time);
    time:bounds="time_bounds";
    time:units="days since 1951-6-1";
  double time_bounds(time, nv);

data: // time coordinates translated to date/time format
  percentile_threshold=95.;
  time="1951-7-1",
       "1952-7-1",
       ...,
       "2000-7-1",
       "2001-7-1";
  time_bounds="1951-1-1", "1952-1-1",
             "1952-1-1", "1953-1-1",
             ...,
             "2000-1-1", "2001-1-1",
             "2001-1-1", "2002-1-1";

Example 3: Percentile and numerical threshold

The following example contains data that has been computed for a threshold derived from the percentile of a climatology.

  • n1 contains the number of days per year above that threshold. Note that the time coordinate is a dimensional coordinate and not climatological.
  • percentile_threshold is the scalar that gives the percentile that underpins the threshold.
  • threshold is the field of thresholds over space and reference_time, meaning essentially day-of-year, but see reference_time below for details.
  • reference_time gives the reference period that was used for the calculation of the threshold from the percentile. In this case, it is derived from a 5 day window centered on the each day of year over a 30 year climatology.
variables:
  float n1(time, lat, lon);
    n1:standard_name="number_of_days_with_air_temperature_above_threshold";
    n1:coordinates="threshold percentile_threshold";
    n1:cell_methods="time: maximum within days time: sum over days";
  double time(time);
    time:bounds="time_bounds";
    time:units="days since 1951-6-1";
  double time_bounds(time, nv);
  float percentile_threshold;
    percentile_threshold:standard_name="cumulative_probability_of_air_temperature";
    percentile_threshold:units="%";
  float threshold(reference_time, lat, lon);
    threshold:standard_name="air_temperature";
    threshold:units="degree_Celsius";
    threshold:coordinates="percentile_threshold";
  double reference_time(reference_time);
    reference_time:standard_name="reference_epoch";
    reference_time:climatology="reference_time_bounds";
    reference_time:units="days since 1951-6-1";
    reference_time:comment="1961-1990";
  double reference_time_bounds(reference_time, nv);

data: // time coordinates translated to date/time format
  percentile_threshold=95.;
  time="1951-7-1",
       "1952-7-1",
       ...,
       "2000-7-1",
       "2001-7-1";
  time_bounds="1951-1-1", "1952-1-1",
             "1952-1-1", "1953-1-1",
             ...,
             "2000-1-1", "2001-1-1",
             "2001-1-1", "2002-1-1";
  reference_time="1985-1-1", 
                 "1985-1-2", 
                 "1985-1-3",
                 ....
                 "1985-12-29",
                 "1985-12-30",
                 "1985-12-31";
  reference_time_bounds="1960-12-30", "1990-1-3",
                        "1960-12-31", "1990-1-4",
                        "1961-1-1", "1990-1-5",
                        ....
                        "1961-12-27", "1990-12-31",
                        "1961-12-28", "1991-1-1",
                        "1961-12-29", "1991-1-2",
@zklaus
Copy link
Owner Author

zklaus commented Sep 24, 2021

Hej @larsbarring, this is our CF example issue.

@larsbarring
Copy link
Collaborator

As far as I can see there is just one small issue only in the first example :
for data the variable name should be percentile_threshold.
[Will come back to the second example soon]

@larsbarring

This comment has been minimized.

@zklaus
Copy link
Owner Author

zklaus commented Sep 27, 2021

@larsbarring, please feel free to edit the summary at the top as you see fit!

@larsbarring
Copy link
Collaborator

@zklaus, so done. Now it is in your hands to take the next step.

@zklaus
Copy link
Owner Author

zklaus commented Oct 11, 2021

This example has been integrated into cf-convention/vocabularies#19. Discussions will continue there.

@zklaus zklaus closed this as completed Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants