<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks Karl,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">The code is fixed in the repository to do the right thing with only one time-slice but I'm glad we shouldn't be seeing these files in general as other bits
 of the pipeline could be affected.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Stephen.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">---<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">Stephen Pascoe&nbsp; &#43;44 (0)1235 445980<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">Centre of Environmental Data Archival<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1F497D">STFC Rutherford Appleton Laboratory, Harwell Oxford, Didcot OX11 0QX, UK<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"> Karl Taylor [mailto:taylor13@llnl.gov]
<br>
<b>Sent:</b> 09 February 2012 16:40<br>
<b>To:</b> Estanislao Gonzalez<br>
<b>Cc:</b> Pascoe, Stephen (STFC,RAL,RALSP); legutke@dkrz.de; go-essp-tech@ucar.edu; Charles Doutriaux<br>
<b>Subject:</b> Re: [Go-essp-tech] DRS question - temporal subset<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Hi Estani and Charles,<br>
<br>
Unless only a single time-slice is stored, both the beginning and ending times should be included in the file name, so the file you are considering has an incorrect name.&nbsp; The bit about &quot;sufficient suffixes&quot; relates to the precision with which the times are
 specified (stopping, for example, at month for monthly means, but going all the way to minutes for sub-hourly).&nbsp;
<br>
<br>
I don't think drslib needs to handle the case of a single time-slice for CMIP5 because I think CMOR invariably includes both the beginning and ending times (even if they are identical).&nbsp; Were the files written with CMOR?&nbsp;
<br>
<br>
Charles can tell us if I've said anything incorrect.<br>
<br>
thanks,<br>
Karl&nbsp; <br>
<br>
<br>
<br>
<br>
On 2/9/12 4:30 AM, Estanislao Gonzalez wrote: <o:p></o:p></p>
<pre>Sure,<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>trans.filename_to_drs('clmcalipso_cf3hr_MPI-ESM-LR_amip_r1i1p1_200810221030.nc')<o:p></o:p></pre>
<pre>Traceback (most recent call last):<o:p></o:p></pre>
<pre>&nbsp;&nbsp; File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<o:p></o:p></pre>
<pre>&nbsp;&nbsp; File <o:p></o:p></pre>
<pre>&quot;/usr/local/cdat/lib/python2.6/site-packages/drslib-0.3.0a3-py2.6.egg/drslib/translate.py&quot;, <o:p></o:p></pre>
<pre>line 413, in filename_to_drs<o:p></o:p></pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp; t.filename_to_drs(context)<o:p></o:p></pre>
<pre>&nbsp;&nbsp; File <o:p></o:p></pre>
<pre>&quot;/usr/local/cdat/lib/python2.6/site-packages/drslib-0.3.0a3-py2.6.egg/drslib/translate.py&quot;, <o:p></o:p></pre>
<pre>line 355, in filename_to_drs<o:p></o:p></pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp; context.drs.subset = (_to_date(n1), _to_date(n2), clim)<o:p></o:p></pre>
<pre>&nbsp;&nbsp; File <o:p></o:p></pre>
<pre>&quot;/usr/local/cdat/lib/python2.6/site-packages/drslib-0.3.0a3-py2.6.egg/drslib/translate.py&quot;, <o:p></o:p></pre>
<pre>line 503, in _to_date<o:p></o:p></pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp; mo = re.match(r'(\d{4})(\d{2})?(\d{2})?(\d{2})?(\d{2})?', date_str)<o:p></o:p></pre>
<pre>&nbsp;&nbsp; File &quot;/usr/local/cdat/lib/python2.6/re.py&quot;, line 137, in match<o:p></o:p></pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp; return _compile(pattern, flags).match(string)<o:p></o:p></pre>
<pre>TypeError: expected string or buffer<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>But I'm more concern with the question of how should it be. Missing that <o:p></o:p></pre>
<pre>info will cause that in some particular cases you can't infer the end <o:p></o:p></pre>
<pre>date, and thus the start date of the next junk, without knowing the <o:p></o:p></pre>
<pre>calender type. If you need to get the file to read the calender type and <o:p></o:p></pre>
<pre>*then* infer the name, the usefulness of having a naming scheme would be <o:p></o:p></pre>
<pre>diminished.<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>As always I think we should comply with whatever rules and guidelines we <o:p></o:p></pre>
<pre>have, as a computer scientist I can't help but seeing the benefits of <o:p></o:p></pre>
<pre>homogeneity and the burden caused by exceptions.<o:p></o:p></pre>
<pre>That's why my question is: how should it be? I'm not sure I'm <o:p></o:p></pre>
<pre>interpreting the documentation properly.<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>Thanks,<o:p></o:p></pre>
<pre>Estani<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>Am 09.02.2012 13:14, schrieb <a href="mailto:stephen.pascoe@stfc.ac.uk:">stephen.pascoe@stfc.ac.uk:</a><o:p></o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>I think drslib will cope -- if not it's a bug -- but the product deduction code often needs both time bounds.<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>Can you send me the error message.<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>Thanks,<o:p></o:p></pre>
<pre>Stephen.<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>---<o:p></o:p></pre>
<pre>Stephen Pascoe&nbsp; &#43;44 (0)1235 445980<o:p></o:p></pre>
<pre>Centre of Environmental Data Archival<o:p></o:p></pre>
<pre>STFC Rutherford Appleton Laboratory, Harwell Oxford, Didcot OX11 0QX, UK<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>-----Original Message-----<o:p></o:p></pre>
<pre>From: <a href="mailto:go-essp-tech-bounces@ucar.edu">go-essp-tech-bounces@ucar.edu</a> [<a href="mailto:go-essp-tech-bounces@ucar.edu">mailto:go-essp-tech-bounces@ucar.edu</a>] On Behalf Of Estanislao Gonzalez<o:p></o:p></pre>
<pre>Sent: 09 February 2012 11:06<o:p></o:p></pre>
<pre>To: <a href="mailto:go-essp-tech@ucar.edu">go-essp-tech@ucar.edu</a><o:p></o:p></pre>
<pre>Cc: Stephanie Legutke<o:p></o:p></pre>
<pre>Subject: [Go-essp-tech] DRS question - temporal subset<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>Hi all,<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>This is what the DRS reference says:<o:p></o:p></pre>
<pre>&quot;Temporal Subsets: Time instants and periods (N1(-N2))<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>Time instants and periods will be represented by<o:p></o:p></pre>
<pre>‘yyyy[mm[dd[hh][mm]]][-clim]’, where ‘yyyy’,<o:p></o:p></pre>
<pre>‘mm’, ‘dd’, ‘hh’ ‘mm’ are integer year, month, day, hour, and minute,<o:p></o:p></pre>
<pre>respectively, and enough<o:p></o:p></pre>
<pre>(and just enough) of the suffixes should be added to unambiguously<o:p></o:p></pre>
<pre>resolve the interval between<o:p></o:p></pre>
<pre>time-samples contained in the file or virtual file URL. (For example,<o:p></o:p></pre>
<pre>monthly mean data would<o:p></o:p></pre>
<pre>include “mm”, but not “dd”, “hh”, or “mm”; “subhr” data would include<o:p></o:p></pre>
<pre>all suffixes.) The<o:p></o:p></pre>
<pre>optional “-clim” is appended when the file contains a climatology. For<o:p></o:p></pre>
<pre>example, a file with<o:p></o:p></pre>
<pre>sampling frequency of “mo” and the time designation 196001-198912-clim<o:p></o:p></pre>
<pre>represents the<o:p></o:p></pre>
<pre>monthly mean climatology (12 time values) computed for the period<o:p></o:p></pre>
<pre>extending from 1/1960-<o:p></o:p></pre>
<pre>12/1989. Note that the DRS does not explicitly specify the calendar type<o:p></o:p></pre>
<pre>(e.g., Julian,<o:p></o:p></pre>
<pre>Gregorian), but the calendar will be indicated by one of the attributes<o:p></o:p></pre>
<pre>in each netCDF file.&quot;[1]<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>&nbsp; From the title I infer that only the start point is required as part of<o:p></o:p></pre>
<pre>the temporal subset, though the text speaks about &quot;enough information to<o:p></o:p></pre>
<pre>unambiguously resolve the interval between<o:p></o:p></pre>
<pre>time-samples&quot;.<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>The problem is that I get 3hr and subhr data with only the starting<o:p></o:p></pre>
<pre>time-stamp, the drslib cannot cope with this.<o:p></o:p></pre>
<pre>Should the drslib be adapted to accept that case or all files renamed?<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>What about the rest of the system? Have anyone already tried publishing<o:p></o:p></pre>
<pre>such files? Make sense?<o:p></o:p></pre>
<pre>And what was the intention with the parenthesis in the Temporal Subsets<o:p></o:p></pre>
<pre>title?<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>Thanks,<o:p></o:p></pre>
<pre>Estani<o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
<pre>[1] - <a href="http://cmip-pcmdi.llnl.gov/cmip5/docs/cmip5_data_reference_syntax.pdf">http://cmip-pcmdi.llnl.gov/cmip5/docs/cmip5_data_reference_syntax.pdf</a><o:p></o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
</blockquote>
<pre><o:p>&nbsp;</o:p></pre>
<pre><o:p>&nbsp;</o:p></pre>
</div>
</body>
</html>