[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #UXM-196070]: Regarding NCML Aggregating ( montly axis at fixed date )



Greetings Akshay,

I think the issue is that you are extracting the date from the filename
(good), but are rewriting the information using the NCML ouside of the
aggregation (i.e. <values start="0" increment="1" />). Can you try using
the same NcML you have, but remove this part of the NcML:

<variable name="TIME" type="double" shape="TIME">
        <attribute name="units" value="months since 1960-01-01 00:00:00" />
        <values start="0" increment="1" />
         <attribute name="axis" value="T" />
</variable>

Thanks!

Sean


address@hidden> wrote:

> New Ticket: Regarding NCML Aggregating  ( montly axis at fixed date )
>
> Hi!
>
> This query is regarding time variable declaration in NCML, here my aim
> is to define time axis at 1th of every month that is same as that of
> date stamp in filename.
>
>
> My Input :
>
> I have list of files like below
>
> # ls -1 | head -10
> air_19600101.nc
> air_19600201.nc
> air_19600301.nc
> air_19600401.nc
> air_19600501.nc
> air_19600601.nc
> air_19600701.nc
> air_19600801.nc
> air_19600901.nc
> air_19601001.nc
>
>
> This is what I tried :
>
> Following is my ncml
>
> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
> <variable name="TIME" type="double" shape="TIME">
>         <attribute name="units" value="months since 1960-01-01 00:00:00" />
>         <values start="0" increment="1" />
>          <attribute name="axis" value="T" />
> </variable>
> <aggregation dimName="TIME" type="joinExisting">
>              <scan dateFormatMark="air_#yyyymmdd" location="/path/to/AIR"
> suffix=".nc" subdirs="false" />
> </aggregation>
> </netcdf>
>
>
> This is what I received after restarting thredds data server:
>
> I use ferret for data analysis, this is how time indexes are created
>
> yes? set data "http://127.0.0.1/thredds/dodsC/test/test.nc";
> yes? sh g air
>     GRID GFP1
>  name       axis              # pts   start                end
>  LON       LONGITUDE          120mr   20.5E                139.5E
>  LAT       LATITUDE           115 r   74.5S                39.5N
>  normal    Z
>  TIME      TIME               674 r   01-JAN-1960 12:00    31-JAN-2016
> 12:24
>  normal    E
>  normal    F
> yes? list/l=1:10 t[gt=air]
>              VARIABLE : T
>                         axis TIME
>              FILENAME : test.nc
>              FILEPATH : http://127.0.0.1/thredds/dodsC/test/
>              SUBSET   : 10 points (TIME)
>  01-JAN-1960 /  1:  0.000
>  31-JAN-1960 /  2:  1.000
>  02-MAR-1960 /  3:  2.000
>  01-APR-1960 /  4:  3.000
>  02-MAY-1960 /  5:  4.000
>  01-JUN-1960 /  6:  5.000
>  02-JUL-1960 /  7:  6.000
>  01-AUG-1960 /  8:  7.000
>  31-AUG-1960 /  9:  8.000
>  01-OCT-1960 / 10:  9.000
>
>
> This is expected output :
>
> Here I expect time index to be created like below, at first of every
> month, or else 15th of every month
>
>  01-JAN-1960 /  1:  0.000
>  01-FEB-1960 /  2:  1.000
>  01-MAR-1960 /  3:  2.000
>  01-APR-1960 /  4:  3.000
>  01-MAY-1960 /  5:  4.000
>  01-JUN-1960 /  6:  5.000
>  01-JUL-1960 /  7:  6.000
>  01-AUG-1960 /  8:  7.000
>  01-SEP-1960 /  9:  8.000
>  01-OCT-1960 / 10:  9.000
>
>
> Hope someone can guide me
>
> Thanks in advance.
>
> Have a nice day !
>
> Regards,
> Akshay Hegde
>
>
> Ticket Details
> ===================
> Ticket ID: UXM-196070
> Department: Support netCDF Java
> Priority: Normal
> Status: Open
> Link:
> https://andy.unidata.ucar.edu/esupport/staff/index.php?_m=tickets&_a=viewticket&ticketid=26875
>
>



Ticket Details
===================
Ticket ID: UXM-196070
Department: Support netCDF Java
Priority: Normal
Status: Open