Re: [netcdf-java] problem with aggregation of files with relative time axis

Hi

another question, would it be harmful to set timeUnitsChange="true" when
loading datasets which do NOT have relative time axis?

I am asking this to know if it is safe for a software which generates
ncml files to set by default timeUnitsChange=true (instead of the ncml
default which is false I assume).

Thanks

Etienne


On 01/08/2018 07:18 PM, Don Murray (NOAA Affiliate) wrote:
> You're welcome.  I just looked at how we did it in the IDV. ;-)
>
> Glad it's working for you.
>
> Don
>
> On 1/8/18 11:17 AM, Etienne Tourigny wrote:
>> On 01/08/2018 06:56 PM, Don Murray (NOAA Affiliate) wrote:
>>> Hi Etienne-
>>>
>>> Add the timeUnitsChange attribute to the aggregation element:
>>>
>>>
>>> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
>>>    <aggregation dimName="time" type="joinExisting"
>>> timeUnitsChange="true">
>>>      <scan location="/esarchive/scratch/etourign/work/loader/tmp/"
>>> suffix=".nc" />
>>>    </aggregation>
>>> </netcdf>
>>>
>>> and you will get the right dates.
>>>
>> Brillant! thank you so much, I was sure there was a way to fix this
>> easily.
>>
>> Somehow I overlooked this piece of information which is clearly
>> documented in the NcML Aggregation docs.
>>
>> If you do not specify a coordinate variable, one must exist in each of
>> the nested datasets, and the coordinate values will be read from it,
>> just like any other aggregation variable. In this case, when the units
>> of the aggregation coordinate change on the existing coordinate
>> variables, you must add timeUnitsChange="true" on the aggregation
>> element:
>>
>> many thanks,
>> Etienne
>>
>>> Don Murray
>>>
>>>
>>>
>>> On 1/8/18 10:38 AM, Etienne Tourigny wrote:
>>>> Hi all,
>>>>
>>>> I have problems reading a collection of netcdf files which use a
>>>> relative time axis, and each file has a time axis relative to a
>>>> different date.
>>>>
>>>> When reading the aggregated files using a ncml file, the computed
>>>> dates
>>>> are random and most of the time wrong.
>>>>
>>>> For example, if I have 3 files with a time axis relative to the 1st of
>>>> January, February and March, sometimes netcdf-java decides that the
>>>> collection starts on March 1st, and sometimes on January 1st.
>>>>
>>>> If I modify the files to all have a time axis relative to the same
>>>> date
>>>> (e.g. January 1st) then things are fine.
>>>>
>>>> Any hints?
>>>>
>>>> Attaching the netcdf files (a spatial subset of the actual files) and
>>>> the ncml file, hope they go through.
>>>>
>>>> Many thanks,
>>>>
>>>> Etienne
>>>>
>>>>
>>>>
>>>> http://bsc.es/disclaimer
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> NOTE: All exchanges posted to Unidata maintained email lists are
>>>> recorded in the Unidata inquiry tracking system and made publicly
>>>> available through the web.  Users who post to any of the lists we
>>>> maintain are reminded to remove any personal information that they
>>>> do not want to be made public.
>>>>
>>>>
>>>> netcdf-java mailing list
>>>> netcdf-java@xxxxxxxxxxxxxxxx
>>>> For list information or to unsubscribe, visit:
>>>> http://www.unidata.ucar.edu/mailing_lists/
>>>>
>>>
>>
>>
>> http://bsc.es/disclaimer
>>
>


http://bsc.es/disclaimer



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