NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [thredds] NcML Aggregation

Gang,

I think the <promoteGlobalAttribute> would work if you had a global
attribute of type {int,float,double} that indicated some number of
time units (hours, days, seconds) from a common origin.

Then those attributes would be promoted to a variable on aggregation,
and you could then define the units.

But if your global attribute is defined time as a string, then
promoteGlobalAttribute wouldn't help you get a numeric CF-compliant
time array.

-Rich

On Tue, Mar 19, 2013 at 4:09 PM, Roy Mendelssohn - NOAA Federal
<roy.mendelssohn@xxxxxxxx> wrote:
> I should add that this arises only because the dateFormatMark  when used in 
> aggregation creates a string for time, rather than a number, and therefore 
> breaks tools looking for CF compliance.  This issue has been brought up 
> several times before.
>
> Even more curious, under  TDS 4.3.15, if i have a GRIB featureCollection and 
> use dateFormatMark  on the file name to aggregate times, the times are 
> numbers in the usual "units-since-some-basetime"
>
> So, can we either get GRIDS under featureCollections with the dateFormatMark  
> behaving in a similar manner, or at least have the option in the normal scan 
> aggregation to tell dateFormatMark to return the time as a number?  Without 
> naming names, I know there are others who would benefit from this.
>
> Thanks,
>
> -Roy
> On Mar 19, 2013, at 12:36 PM, Bob Simons - NOAA Federal <bob.simons@xxxxxxxx> 
> wrote:
>
>> Is there a way to promote a global numeric attribute to be a new coordinate 
>> variable?
>> I read the bottom of
>> http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/Cookbook.html
>> but I am confused (time vs times? and why dateFormatMark which also seems to 
>> be creating an ISO 8601 time axis?).
>> Can someone provide a more complete, less confusing, working example?
>>
>> My best guess at the ncml is:
>>
>> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
>>  <variable name="time" type="int" shape="time" >
>>    <attribute name="units" value="days since 2012-12-31"/>
>>    <attribute name="_CoordinateAxisType" value="Time" />
>>  </variable>
>>  <aggregation dimName="time" type="joinNew" recheckEvery="15 min" >
>>    <variableAgg name="chla"/>
>>    <promoteGlobalAttribute name="time" orgName="startDay" />
>>    <scan location="/testFiles/" suffix=".hdf" subdirs="false" />
>>  </aggregation>
>> ...
>>
>> I have tried lots of variations, to no avail.
>> I have tried lots of variations with joinExisting, with and without the 
>> <variable>, to no avail.
>> They almost all generate an unhelpful error message like:
>>
>> Exception in thread "main" java.lang.NullPointerException
>>        at 
>> ucar.nc2.ncml.AggregationOuterDimension.promoteGlobalAttributes(AggregationOuterDimension.java:176)
>>        at 
>> ucar.nc2.ncml.AggregationNew.buildNetcdfDataset(AggregationNew.java:73)
>>        at ucar.nc2.ncml.Aggregation.finish(Aggregation.java:404)
>>        at ucar.nc2.ncml.NcMLReader.readNetcdf(NcMLReader.java:492)
>>        at ucar.nc2.ncml.NcMLReader.readNcML(NcMLReader.java:437)
>>        at ucar.nc2.ncml.NcMLReader.access$100(NcMLReader.java:60)
>>        at 
>> ucar.nc2.ncml.NcMLReader$NcmlElementReader.open(NcMLReader.java:1406)
>>        at 
>> ucar.nc2.ncml.NcMLReader$NcmlElementReader.open(NcMLReader.java:1394)
>>        at ucar.nc2.dataset.NetcdfDataset.acquireFile(NetcdfDataset.java:625)
>>        at ucar.nc2.ncml.Aggregation$Dataset.acquireFile(Aggregation.java:634)
>>        at 
>> ucar.nc2.ncml.AggregationUnion.buildNetcdfDataset(AggregationUnion.java:65)
>>        at ucar.nc2.ncml.Aggregation.finish(Aggregation.java:404)
>>        at ucar.nc2.ncml.NcMLReader.readNetcdf(NcMLReader.java:492)
>>        at ucar.nc2.ncml.NcMLReader.readNcML(NcMLReader.java:437)
>>        at ucar.nc2.ncml.NcMLReader.readNcML(NcMLReader.java:252)
>>        at ucar.nc2.ncml.NcMLReader.readNcML(NcMLReader.java:202)
>>        at ucar.nc2.dataset.NetcdfDataset.acquireNcml(NetcdfDataset.java:847)
>>        at 
>> ucar.nc2.dataset.NetcdfDataset.openOrAcquireFile(NetcdfDataset.java:686)
>>        at ucar.nc2.dataset.NetcdfDataset.openFile(NetcdfDataset.java:563)
>>        at ucar.nc2.NCdumpW.print(NCdumpW.java:212)
>>
>>
>> Any suggestions?
>>
>> Thank you.
>>
>> Sincerely,
>>
>> Bob Simons
>> IT Specialist
>> Environmental Research Division
>> NOAA Southwest Fisheries Science Center
>> 1352 Lighthouse Ave
>> Pacific Grove, CA 93950-2079
>> Phone: (831)658-3205
>> Fax:   (831)648-8440
>> Email: bob.simons@xxxxxxxx
>>
>> The contents of this message are mine personally and
>> do not necessarily reflect any position of the
>> Government or the National Oceanic and Atmospheric
>> Administration.
>> <>< <>< <>< <>< <>< <>< <>< <>< <><
>>
>> _______________________________________________
>> thredds mailing list
>> thredds@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe,  visit: 
>> http://www.unidata.ucar.edu/mailing_lists/
>
> **********************
> "The contents of this message do not reflect any position of the U.S. 
> Government or NOAA."
> **********************
> Roy Mendelssohn
> Supervisory Operations Research Analyst
> NOAA/NMFS
> Environmental Research Division
> Southwest Fisheries Science Center
> 1352 Lighthouse Avenue
> Pacific Grove, CA 93950-2097
>
> e-mail: Roy.Mendelssohn@xxxxxxxx (Note new e-mail address)
> voice: (831)-648-9029
> fax: (831)-648-8440
> www: http://www.pfeg.noaa.gov/
>
> "Old age and treachery will overcome youth and skill."
> "From those who have been given much, much will be expected"
> "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
>
> _______________________________________________
> thredds mailing list
> thredds@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit: 
> http://www.unidata.ucar.edu/mailing_lists/



-- 
Dr. Richard P. Signell   (508) 457-2229
USGS, 384 Woods Hole Rd.
Woods Hole, MA 02543-1598



  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: