[thredds] Select parts of netcdf files

Hi

Is it possible to extract only some specified values from a netcdf file ?
I want to make a catalog that present the files of a products in a forecast
offset view.
For example:
I have some netcdf files that contain 72 forecast hours (time dimension
length is 72) for each run.
I would like to make one dataset per forecast hour, containing every run
values at this forecast offset.
I tried to redefine the time dimension to have a length of 1 instead of 72,
and the time variable to
have only one value, the forecast offset value.

The catalog looks liks (1 forecast hour offset for 5 runs):

        <dataset name="champs3D_r2_forecast_date_00h"
ID="champs3D_r2_forecast_date_00h" urlPath="champs3D_r2_forecast_date_00h">
            <metadata inherited="true">
                <serviceName>multiService</serviceName>
                <dataType>Grid</dataType>
                <dataFormat>NetCDF</dataFormat>
            </metadata>
            <netcdf xmlns="
http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
                <aggregation dimName="forecast_time" type="joinNew">
                    <variableAgg name="temp"/>
                    <netcdf location="/home/d1/20071001/champs3D.r2_01-
10-2007.nc" coordValue="3400185600">
                        <dimension name="time" length="1"/>
                        <variable name="time" type="double"
shape="time"><values>3400185600</values></variable>
                    </netcdf>
                    <netcdf location="/home/d1/20071002/champs3D.r2_02-
10-2007.nc" coordValue="3400272000">
                        <dimension name="time" length="1"/>
                        <variable name="time" type="double"
shape="time"><values>3400272000</values></variable>
                    </netcdf>
                    <netcdf location="/home/d1/20071003/champs3D.r2_03-
10-2007.nc" coordValue="3400358400">
                        <dimension name="time" length="1"/>
                        <variable name="time" type="double"
shape="time"><values>3400358400</values></variable>
                    </netcdf>
                    <netcdf location="/home/d1/20071004/champs3D.r2_04-
10-2007.nc" coordValue="3400444800">
                        <dimension name="time" length="1"/>
                        <variable name="time" type="double"
shape="time"><values>3400444800</values></variable>
                    </netcdf>
                    <netcdf location="/home/d1/20071005/champs3D.r2_05-
10-2007.nc" coordValue="3400531200">
                        <dimension name="time" length="1"/>
                        <variable name="time" type="double"
shape="time"><values>3400531200</values></variable>
                    </netcdf>
                </aggregation>
            </netcdf>
        </dataset>

The result is that I have the expected time values, but when I compare to
the original files variables values such like
temp, u, v (...)  it looks like these values are the ones corresponding to
the first time value. I think that's normal because
nothing in my catalog specify which values it must extract from the file, so
it takes the first (I thougth that by giving
the time value, Thredds would take the temp and other variables values
corresponding to this time).

Is there any way to specify wich values to take (select variable values for
time=start_indice to time=stop_indice) in a ncml definition ?
I know that it is possible to create a ncml dataset "from scratch" by
setting all the values in it but that would be better if I could
make a selection directly from the netcdf file.

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