John Caron wrote:
Since you are explicitly writing the netcdf elements, we were expecting that you could write the correct values there without having to translate through a DateFormat. Is that not so? (see below also)
I guess so, but usually I try to use already implemented ways instead of doing a script on it myself. Less maintainence that way. So there is now way of doing this in the current version?
Unidata Support wrote:
------- Forwarded Message
To: address@hidden From: =?ISO-8859-1?Q?Bj=F8rge_Solli?= <address@hidden> Subject: NcML Aggregation in THREDDS Organization: Nansen Environmental and Remote Sensing Center - Bergen Keywords: 200512201217.jBKCH47s009594 THREDDS NcML aggregation
I am currently rewriting our xml-files to use the new aggregation functionality in Thredds 3.4. I have looked over all the documentation I could find on thredds and NcML but still have one unansvered Q. Hope you can help:
In the old version we used AggServer with an xml-statement like this:
<aggregation serviceName=".." aggType=".." varType=".." varUnit".." dateFormat="yyyy/M/d:hh:mm:ss z">
<fileAccess urlPath="long_name_b20030604_f200305289999.nc" coord="2003/05/28:00:00:00 GMT" />
My remaining Q is where I should write dateFormat now. I have something like this:
<variable name="time" type="int" shape="time">
<attribute name="units" value=".." />
<attribute name="_CoordinateAxisType" value="Time" />
Here you are defining a time coordinate of dataType "int"
I see I omitted the units-value, it is "secs since 1970-01-01 00:00:00". This is a value I don't think my research coworkers want to change since I understand it is some standard in their field. The one in charge are on holidays, so will have to wait till he's back for the definite answer.
yes thats a udunit string, which thredds also uses. but if you use this, then you must write the correct integer values in the coord field.
<aggregation dimName="time" type="joinNew">
<variableAgg name="T" />
netcdf location="long_name_b20030604_f200305289999.nc" coord=""2003/05/28:00:00:00 GMT" />
But you are giving it String values.
I guess I could give it int-values, but that would remove readability.
true, so the ISO 8601 date strings would work better.
Do you have the ability to write ISO 8601 date strings? If so, I would change the type of the time coordinate to String and do that.
Thanks for the advice, I will discuss it with my coworkers.
Since I am not using the scan tag I cannot use the dateFormatMark either (which would not work on this example anyway since the filename is not the same in front of the #-mark, which would have to be after the '_f').
We will also add regular expression matcher for that case.
Regexp is good! Is it possible to use it directly in the xml?
BTW: I'm a programmer, not a researcher, so I don't think I fully understand the implications a change like the one you suggested would have.
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.