<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Nan,</p>
    <p>In my case, I am using my first and last freeze date values to
      calculate growing season lengths. When all the values are on a
      consistent time base, I can do simple subtraction to get the
      season length (first freeze date - last freeze date). The ease of
      use for time since epoch vs time since 'time coordinate variable
      value' varies by application. Each can be derived from the other
      with relative ease. If you use days-in-year, it seems that it
      might be worthwhile to add that as a standard name as well.<br>
    </p>
    <p>I can see the utility of a temperature threshold coordinate for
      freeze date if you require the temperature to drop below, for
      example, -2 C before you count that day as having a freeze.</p>
    <p>Grace and peace,</p>
    <p>Jim<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 3/16/17 2:24 PM, Nan Galbraith
      wrote:<br>
    </div>
    <blockquote cite="mid:6fd4cf33-219b-6f6c-681d-7f461bb176ac@whoi.edu"
      type="cite">I agree that there's a lot of interest, and I have 2
      questions.
      <br>
      <br>
      To make the data most useful, shouldn't the time coordinate
      variable be
      <br>
      Jan 1, and shouldn't the 'days since' (data) variable represent
      the yearday
      <br>
      within that year?
      <br>
      <br>
      My specific concerns with Jim's approach:
      <br>
      <br>
      first_freeze_date:units = "days since 1900-01-01 00:00:00"   -
      This doesn't seem
      <br>
      to me to provide the most easily used data point, wouldn't the
      year-day be more
      <br>
      convenient, for seeing how this value varies over the years?
      <br>
      <br>
      And with Antoio's:
      <br>
      <br>
      first_freeze_date:coordinates="threshold time"; - I don't see how
      threshold,
      <br>
      which is a temperature, can be a coordinate of this variable.
      Also, I'd like to know
      <br>
      why setting   time:units="days since 2000-6-1"; is preferable to
      using 2000-1-1;
      <br>
      doesn't this invite errors in using the time in applications like
      matlab and python?
      <br>
      <br>
      Actually, the metadata doesn't tell me how to interpret the values
      in first_freeze_date -
      <br>
      the short name implies that they're dates, the units implies
      they're elapsed days, but
      <br>
      without a reference date to enable decoding.
      <br>
      <br>
      Cheers - Nan
      <br>
      <br>
      <br>
      On 3/16/17 8:45 AM, Jim Biard wrote:
      <br>
      <blockquote type="cite">
        <br>
        Hi.
        <br>
        <br>
        There is clearly interest here! I agree that day_in_year is
        rather generic, and there should probably be a more precise
        term. I'm not so sure about the cell_methods that were suggested
        below. In my particular case the values are derived from a daily
        Tmin product. Each value is the date of the first Tmin < 0 C
        within the time bounds. If it was a spell length, such as
        growing season length, then I can see the need for a more
        climatological cell_method.
        <br>
        <br>
        We can keep this up and work up some standard_name definitions
        to propose. I'm sure the results will be better if we
        collaborate compared to what I'd do on my own.
        <br>
        <br>
        Grace and peace,
        <br>
        <br>
        Jim
        <br>
        <br>
        <br>
        On 3/16/17 7:23 AM, Antonio S. Cofiño wrote:
        <br>
        <blockquote type="cite">Dear all,
          <br>
          There is no standard_name for the concept but there are 2
          different ones which delimit the approach that it could be
          used as templates for the new one:
          <br>
          *time_when_flood_water_falls_below_threshold
          *(time_when_flood_water_rises_above_threshold and
          time_of_maximum_flood_depth are also good examples )
          <br>
<a class="moz-txt-link-freetext" href="http://cfconventions.org/Data/cf-standard-names/41/build/cf-standard-name-table.html#time_when_flood_water_falls_below_threshold_tr">http://cfconventions.org/Data/cf-standard-names/41/build/cf-standard-name-table.html#time_when_flood_water_falls_below_threshold_tr</a>
          <br>
          <blockquote type="cite">The quantity with standard name
            *time_when_flood_water_falls_below_threshold*: is the time
            elapsed between the breaking of a levee (origin of flood
            water simulation) and the instant when the depth falls below
            a given threshold for the last time, having already risen to
            its maximum depth, at a given point in space. If a threshold
            is supplied, it should be specified by associating a
            coordinate variable or scalar coordinate variable with the
            data variable and giving the coordinate variable a standard
            name of flood_water_thickness. The values of the coordinate
            variable are the threshold values for the corresponding
            subarrays of the data variable. If no threshold is
            specified, its value is taken to be zero. Flood water is
            water that covers land which is normally not covered by
            water.
            <br>
          </blockquote>
          the problem is the event definition, which is quite different
          to the one it's been considered here which is more like a
          climatological statistics. The good thing is the CF already
          has some good definitions for those climatological statistics,
          like Example 7.11 on CF1.6 document:
          <br>
<a class="moz-txt-link-freetext" href="http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#extreme-statistics-and-spell-lengths-ex">http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#extreme-statistics-and-spell-lengths-ex</a>
          <br>
          <br>
          And more convenient definition of this climatological
          statistics could be:
          <br>
<a class="moz-txt-link-freetext" href="http://cfconventions.org/Data/cf-standard-names/41/build/cf-standard-name-table.html#spell_length_of_days_with_air_temperature_above_threshold_tr">http://cfconventions.org/Data/cf-standard-names/41/build/cf-standard-name-table.html#spell_length_of_days_with_air_temperature_above_threshold_tr</a>
          <br>
          <blockquote type="cite">Air temperature is the bulk
            temperature of the air, not the surface (skin) temperature.
            A spell is the number of consecutive days on which the
            condition X_below|above_threshold is satisified. A variable
            whose standard name has the form
            spell_length_of_days_with_X_below|above_threshold *must have
            a coordinate variable or scalar coordinate variable with the
            a standard name of X to supply the threshold*(s).*It must
            have a climatological time variable, and a cell_method
            entry* for within days which describes the processing of
            quantity X before the threshold is applied. A
            spell_length_of_days is an intensive quantity in time, and
            the cell_methods entry for over days can be any of the
            methods listed in Appendix E appropriate for intensive
            quantities e.g. "maximum", "minimum" or "mean".
            <br>
          </blockquote>
          <br>
          And this definition gives a more appropriate way to encode the
          date of freezing days using a auxiliary coordinate to specify
          the threshold and use a cell_methods attribute along with the
          climatology_bounds attribute on time coordinate to specify an
          statistics over a period.
          <br>
          <br>
          The standard_name should be more like the definition for
          spell_length_of_days, but removing using 'time' as general
          instead of days. This what I would suggest with respect to the
          encoding:
          <br>
          <br>
          variables:
          <br>
            float first_freeze_date(lat,lon);
          <br>
first_freeze_date:standard_name="time_when_air_temperature_below_threshold";
          <br>
              first_freeze_date:coordinates="threshold time";
          <br>
              first_freeze_date:cell_methods="time: minimum within days
          time: minimum over days";
          <br>
              first_freeze_date:units="days";
          <br>
            float last_freeze_date(lat,lon);
          <br>
last_freeze_date:standard_name="time_when_air_temperature_below_threshold";
          <br>
          last_freeze_date:coordinates="threshold time";
          <br>
          last_freeze_date:cell_methods="time: minimum within days time:
          maximum over days";
          <br>
          last_freeze_date:units="days";
          <br>
            float threshold;
          <br>
              threshold:standard_name="air_temperature";
          <br>
              threshold:units="degC";
          <br>
            double time;
          <br>
              time:climatology="climatology_bounds";
          <br>
              time:units="days since 2000-6-1";
          <br>
            double climatology_bounds(time,nv);
          <br>
          data: // time coordinates translated to date/time string type
          format
          <br>
            time="2008-01-16T00:00";
          <br>
            climatology_bounds="2007-08-01T00:00", "2008-05-31T00:00";
          <br>
            threshold=0.;
          <br>
          <br>
          The time: minimum over days, on first_freeze_date cell_methods
          attribute represents the shortest time minimum daily
          temperature (time: minimum within days) is below threshold.
          <br>
          Equivalent for the last_freeze_date, but in this cas
          represents the longest time (time: maximum over days).
          <br>
          <br>
          Regards
          <br>
          <br>
          Antonio
          <br>
          <br>
          <br>
          <br>
          <br>
          -- <br>
          Antonio S. Cofiño
          <br>
          Associate Professor and Researcher
          <br>
          Grupo de Meteorología de Santander
          <br>
          Dep. of Applied Mathematics and Computer Sciences
          <br>
          Universidad de Cantabria (Spain)
          <br>
          <br>
          Academic Visitor
          <br>
          National Centre for Atmospheric Science
          <br>
          Department of Meteorology
          <br>
          School of Mathematical, Physical and Computational Sciences
          <br>
          University of Reading (UK)
          <br>
          <br>
          <a class="moz-txt-link-freetext" href="http://antonio.cofino.es">http://antonio.cofino.es</a>
          <br>
          On 15/03/17 18:16, Jim Biard wrote:
          <br>
          <blockquote type="cite">
            <br>
            Dan,
            <br>
            <br>
            How about that? I'm working on similar products. We haven't
            even considered standard names for them.
            <br>
            <br>
            I went ahead and used 'days since YYYY-MM-DD 00:00:00' for
            my first and last frost dates, since they are valid dates.
            My files are structured as (example for first frost date):
            <br>
            <br>
                dimensions:
            <br>
                        time = UNLIMITED ; // (56 currently)
            <br>
                        lon = 960 ;
            <br>
                        lat = 490 ;
            <br>
                        bnds = 2 ;
            <br>
                variables:
            <br>
                        double time(time) ;
            <br>
                                time:standard_name = "time" ;
            <br>
                                time:long_name = "time" ;
            <br>
                                time:axis = "T" ;
            <br>
                                time:units = "days since 1900-01-01
            00:00:00" ;
            <br>
                                time:calendar = "gregorian" ;
            <br>
                                time:bounds = "time_bounds" ;
            <br>
                        double time_bounds(time, bnds) ;
            <br>
                        double lon(lon) ;
            <br>
                                lon:standard_name = "longitude" ;
            <br>
                                lon:long_name = "longitude" ;
            <br>
                                lon:units = "degrees_east" ;
            <br>
                                lon:modulo = 360. ;
            <br>
                                lon:axis = "X" ;
            <br>
                                lon:bounds = "lon_bounds" ;
            <br>
                        double lon_bounds(lon, bnds) ;
            <br>
                        double lat(lat) ;
            <br>
                                lat:standard_name = "latitude" ;
            <br>
                                lat:long_name = "latitude" ;
            <br>
                                lat:units = "degrees_north" ;
            <br>
                                lat:axis = "Y" ;
            <br>
                                lat:bounds = "lat_bounds" ;
            <br>
                        double lat_bounds(lat, bnds) ;
            <br>
                        float first_freeze_date(time, lat, lon) ;
            <br>
                                first_freeze_date:_FillValue = 1.e+20f ;
            <br>
                                first_freeze_date:missing_value =
            1.e+20f ;
            <br>
                                first_freeze_date:comment = "Date of the
            first
            <br>
                day with a minimum temperature at or below 0 degrees C
            over the
            <br>
                9 month period starting Aug 1 of each year." ;
            <br>
                                first_freeze_date:flag_meanings =
            <br>
                "No_Freeze_Following" ;
            <br>
                                first_freeze_date:long_name = "First
            freeze date" ;
            <br>
                                first_freeze_date:valid_min = 0. ;
            <br>
                                first_freeze_date:flag_values = -2. ;
            <br>
                                first_freeze_date:units = "days since
            1900-01-01
            <br>
                00:00:00" ;
            <br>
                                first_freeze_date:calendar = "standard"
            ;
            <br>
            <br>
            with the time bounds reflecting 1 Aug to 1 May for each
            year.
            <br>
            <br>
            On 3/15/17 1:50 PM, Hollis, Dan wrote:
            <br>
            <blockquote type="cite">
              <br>
              Hi Jon,
              <br>
              <br>
              I’d be interested to know how to tackle this problem too.
              I’ve recently been generating some datasets of “date of
              first frost” and “date of last frost” and have no idea how
              to describe them in a CF-compliant way.
              <br>
              <br>
              Jim’s suggestion of ‘day_of_year’ is better than just
              ‘days’, however this doesn’t capture what the “something”
              is that has happened, nor that is the first/last/Nth
              occurrence of that event. What sort of events are you
              looking at?
              <br>
              <br>
              In my application I’m just looking at UK data, hence my
              “year” runs from 1^st July to 30^th June (to span the N
              Hemisphere winter). It’s easy enough to use the bounds to
              indicate this, but I’m then not sure what values to store
              in the data array. Number of days since 1^st July maybe?
              Or ordinal date (1^st Jan = 1, 31^st Dec = 365)?
              <br>
              <br>
              Dan
              <br>
              <br>
              PS I have a whole bunch of other metrics that I’m looking
              at e.g. length of the longest spell, number of spells
              greater then N days etc. These seem even more complicated
              to describe using CF. Something for another post I
              think...
              <br>
              <br>
              *From:*CF-metadata
              [<a class="moz-txt-link-freetext" href="mailto:cf-metadata-bounces@cgd.ucar.edu">mailto:cf-metadata-bounces@cgd.ucar.edu</a>] *On Behalf Of
              *Jim Biard
              <br>
              *Sent:* 15 March 2017 16:28
              <br>
              *To:* <a class="moz-txt-link-abbreviated" href="mailto:cf-metadata@cgd.ucar.edu">cf-metadata@cgd.ucar.edu</a>
              <br>
              *Subject:* Re: [CF-metadata] Recording "day of year on
              which something happens"
              <br>
              <br>
              Jon,
              <br>
              <br>
              I agree that a cell_methods attribute doesn't seem to be
              necessary. A new standard_name like 'day_in_year' or
              'day_of_year' would likely make things clearer.
              <br>
              <br>
              Jim
              <br>
              <br>
              On 3/15/17 11:22 AM, Jon Blower wrote:
              <br>
              <br>
                  Thanks Jim, that’s very helpful. Is cell_methods
              necessary in
              <br>
                  this case (for the time axis bounds) – probably not
              since this
              <br>
                  isn’t a statistical quantity like an average, but a
              value
              <br>
                  that’s “representative” of the year.
              <br>
              <br>
                  I seem to remember from a while back that there was a
              proposal
              <br>
                  to allow time axes to use “calendar years since X” (as
              opposed
              <br>
                  to “years since X”, which uses a fixed-length UDUNITS
              year),
              <br>
                  which might handle this use case. I have been out of
              the loop
              <br>
                  for a while, but I can’t find mention of that in the
              CF spec,
              <br>
                  so maybe that didn’t go through.
              <br>
              <br>
                  I might consider requesting a new standard name –
              “days” is
              <br>
                  good, but I wonder if a more specific one would be
              helpful.
              <br>
              <br>
                  Best wishes,
              <br>
                  Jon
              <br>
              <br>
                  *From: *CF-metadata
              <a class="moz-txt-link-rfc2396E" href="mailto:cf-metadata-bounces@cgd.ucar.edu"><cf-metadata-bounces@cgd.ucar.edu></a>
              <br>
                  <a class="moz-txt-link-rfc2396E" href="mailto:cf-metadata-bounces@cgd.ucar.edu"><mailto:cf-metadata-bounces@cgd.ucar.edu></a> on
              behalf of Jim
              <br>
                  Biard <a class="moz-txt-link-rfc2396E" href="mailto:jbiard@cicsnc.org"><jbiard@cicsnc.org></a>
              <a class="moz-txt-link-rfc2396E" href="mailto:jbiard@cicsnc.org"><mailto:jbiard@cicsnc.org></a>
              <br>
                  *Date: *Tuesday, 14 March 2017 15:12
              <br>
                  *To: *<a class="moz-txt-link-rfc2396E" href="mailto:cf-metadata@cgd.ucar.edu">"cf-metadata@cgd.ucar.edu"</a>
              <br>
                  <a class="moz-txt-link-rfc2396E" href="mailto:cf-metadata@cgd.ucar.edu"><mailto:cf-metadata@cgd.ucar.edu></a>
              <a class="moz-txt-link-rfc2396E" href="mailto:cf-metadata@cgd.ucar.edu"><cf-metadata@cgd.ucar.edu></a>
              <br>
                  <a class="moz-txt-link-rfc2396E" href="mailto:cf-metadata@cgd.ucar.edu"><mailto:cf-metadata@cgd.ucar.edu></a>
              <br>
                  *Subject: *Re: [CF-metadata] Recording "day of year on
              which
              <br>
                  something happens"
              <br>
              <br>
                  Jon,
              <br>
              <br>
                  1) I'd use 'days'. It is a valid standard name apart
              from the
              <br>
                  'days since date' formalism. It's not perfect, but
              it's legal.
              <br>
                  You could, alternatively, request a new standard name.
              <br>
              <br>
                  2) Use a time_bounds variable. I would tend to set the
              time to
              <br>
                  be July 1 at midnight for each year, and set the
              bounds for
              <br>
                  each year to Jan 1 of that year and Jan 1 of the next
              year.
              <br>
              <br>
                  Grace and peace,
              <br>
              <br>
                  Jim
              <br>
              <br>
                  On 3/14/17 10:43 AM, Jon Blower wrote:
              <br>
              <br>
                      Hi all,
              <br>
              <br>
                        <br>
                      We need to structure a NetCDF file that will hold
              a variable that represents the day of the year on which an
              event happened (integers from 0 to 366). This value is
              recorded every year for a number of years. I have a couple
              of questions about how best to do this:
              <br>
              <br>
                        <br>
                      1. What is the best standard name to use for the
              day of the year? I didn’t find anything in the standard
              name table, although I might have missed it.
              <br>
              <br>
                        <br>
                      2. What would be the best way to define the time
              axis? Each point along the axis would represent a whole
              year, rather than an instant in time. I could simply pick
              an arbitrary instant (e.g. midnight on 1st Jan) to
              represent the year, but is there a better way?
              <br>
              <br>
                        <br>
                      Thanks in advance for any help!
              <br>
              <br>
                        <br>
                      Jon
              <br>
              <br>
                        <br>
              <br>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
      <br>
      <br>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <div style="color: rgb(0, 0, 0); font-family: Helvetica;
        font-size: medium; font-style: normal; font-variant: normal;
        font-weight: normal; letter-spacing: normal; line-height:
        normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-size-adjust: auto;
        -webkit-text-stroke-width: 0px; word-wrap: break-word;
        -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;
        ">
        <span class="Apple-style-span" style="border-collapse: separate;
          color: rgb(0, 0, 0); font-family: Helvetica; font-style:
          normal; font-variant: normal; font-weight: normal;
          letter-spacing: normal; line-height: normal; orphans: 2;
          text-align: -webkit-auto; text-indent: 0px; text-transform:
          none; white-space: normal; widows: 2; word-spacing: 0px;
          border-spacing: 0px; -webkit-text-decorations-in-effect: none;
          -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
          0px; ">
          <div style="word-wrap: break-word; -webkit-nbsp-mode: space;
            -webkit-line-break: after-white-space; ">
            <span class="Apple-style-span" style="border-collapse:
              separate; font-family: Helvetica; font-style: normal;
              font-variant: normal; font-weight: normal; letter-spacing:
              normal; line-height: normal; orphans: 2; text-align:
              -webkit-auto; text-indent: 0px; text-transform: none;
              white-space: normal; widows: 2; word-spacing: 0px;
              border-spacing: 0px; -webkit-text-decorations-in-effect:
              none; -webkit-text-size-adjust: auto;
              -webkit-text-stroke-width: 0px; ">
              <div style="color: rgb(0, 0, 0); font-family: Helvetica;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; line-height: normal;
                orphans: 2; text-align: -webkit-auto; text-indent: 0px;
                text-transform: none; white-space: normal; widows: 2;
                word-spacing: 0px; -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px; word-wrap: break-word;
                -webkit-nbsp-mode: space; -webkit-line-break:
                after-white-space; ">
                <table style="max-width: 100%; border-collapse:
                  collapse; border-spacing: 0px; color: rgb(51, 51, 51);
                  font-size: 14px; font-family: Times; line-height:
                  12px; " border="0" cellpadding="2" cellspacing="2"
                  width="500">
                  <tbody>
                    <tr>
                      <td align="center" height="71" width="71">
                        <span style="font-size: 11px; ">
                          <span style="font-family: arial, helvetica,
                            sans-serif; ">
                            <a href="http://www.cicsnc.org/"
                              style="color: rgb(38, 58, 143);
                              text-decoration: none; font-weight: bold;
                              ">
                              <img alt="CICS-NC"
                                src="cid:part1.D62D5AA4.0726C056@cicsnc.org"
                                style="max-width: 80%; height: auto;
                                vertical-align: middle; border: 0px; ">
                            </a>
                            Visit us on
                            <br>
                            <a href="http://www.facebook.com/cicsnc"
                              style="color: rgb(38, 58, 143);
                              text-decoration: none; font-weight: bold;
                              ">
                              Facebook
                            </a>
                          </span>
                        </span>
                      </td>
                      <td valign="top">
                        <span style="font-size: 11px; "><span
                            style="font-family: arial, helvetica,
                            sans-serif; ">
                            <b>Jim Biard</b>
                            <br>
                            <b>Research Scholar</b>
                            <br>
                            <a href="http://cicsnc.org/" style="color:
                              rgb(38, 58, 143); text-decoration: none;
                              font-weight: bold; ">
                              Cooperative Institute for Climate and
                              Satellites NC
                            </a>
                            <br>
                            <a href="http://ncsu.edu/" style="color:
                              rgb(38, 58, 143); text-decoration: none;
                              font-weight: bold; ">
                              North Carolina State University
                            </a>
                            <br>
                            <a href="http://ncdc.noaa.gov/"
                              style="color: rgb(38, 58, 143);
                              text-decoration: none; font-weight: bold;
                              ">
                              NOAA National Centers for Environmental
                              Information
                            </a>
                            <br>
                            <i>formerly NOAA’s National Climatic Data
                              Center</i>
                            <br>
                            151 Patton Ave, Asheville, NC 28801
                            <br>
                            e: <a href="mailto:jbiard@cicsnc.org"
                              style="color: rgb(38, 58, 143); ">jbiard@cicsnc.org</a>
                            <br>
                            o: +1 828 271 4900
                            <br>
                            <br>
                            <i style="color:Gray">Connect with us on
                              Facebook for <a
                                href="https://www.facebook.com/NOAANCEIclimate"
                                style="color: rgb(38, 58, 143);">climate</a>
                              and
                              <a
                                href="https://www.facebook.com/NOAANCEIoceangeo"
                                style="color: rgb(38, 58, 143); ">ocean
                                and geophysics</a>
                              information, and follow us on Twitter at
                              <a
                                href="https://twitter.com/NOAANCEIclimate"
                                style="color: rgb(38, 58, 143); ">@NOAANCEIclimate</a>
                              and
                              <a
                                href="https://twitter.com/NOAANCEIocngeo"
                                style="color: rgb(38, 58, 143); ">@NOAANCEIocngeo</a>.
                            </i>
                          </span>
                        </span>
                      </td>
                    </tr>
                  </tbody>
                </table>
                <br>
              </div>
            </span>
          </div>
        </span>
      </div>
    </div>
  </body>
</html>