Re: [netcdf-java] [Q] Adding new (or overwriting existing) variables from a different file in NcML?

  • To: Antonio S. Cofiño <antonio.cofino@xxxxxxxxx>
  • Subject: Re: [netcdf-java] [Q] Adding new (or overwriting existing) variables from a different file in NcML?
  • From: "H. Joe Lee" <hyoklee@xxxxxxxxxxxx>
  • Date: Thu, 15 Aug 2013 13:12:45 -0500
Thanks, Antonio!

I tried union and it looks promising. However, I got another issue.

I need to remove some conflicting objects (groups, dimensions, and
variables) from data.nc first to make union work.

How can I remove a group and all objects under the group recursively in NcML?

I tried something like:

 <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";
    location="MOD29.A2013196.1250.005.2013196195940.hdf">
   <group name="MOD_Swath_Sea_Ice">
      <remove name="Geolocation_Fields" type="group" />
   </group>
 </netcdf>

for MODIS product at [1] but it doesn't remove group and its objects under it.

My ultimate goal is to merge Geolocation_Fields from [2] with [1] via
NcML and visualize [1] with IDV/Panoply.

[1] 
ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/NASAHDF/MOD29.A2013196.1250.005.2013196195940.hdf
[2] 
ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/NASAHDF/MOD03.A2013196.1250.005.2013196194144.hdf

--
HDF: Software that Powers Science


On Wed, Aug 14, 2013 at 7:09 AM, "Antonio S. Cofiño"
<antonio.cofino@xxxxxxxxx> wrote:
> The Union aggregation is doing that for you
>
> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
>  <aggregation type="union">
>    <netcdf location="data.nc"/>
>    <netcdf location="geo.nc"/>
>  </aggregation>
> </netcdf>
>
> more doc on this:
> http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/Aggregation.html#Union
>
> regards
>
> Antonio
>
> --
> Antonio S. Cofiño
> Grupo de Meteorología de Santander
> Dep. de Matemática Aplicada y
>        Ciencias de la Computación
> Universidad de Cantabria
> http://www.meteo.unican.es
>
>
> El miércoles, 14 de agosto de 2013 6:26:34, H. Joe Lee escribió:
>>
>> Hi,
>>
>>   I'm wondering if the following composition is possible in NcML. I
>> read tutorial on the web but I could not find a solution yet.
>>
>> Let's assume that data.nc has no coordinate variables but geo.nc has.
>> I'd like to create a data.ncml like below to import coordinate
>> variables from a separate NetCDF file (i.e., geo.nc) so that I can
>> visualize data variables in data.nc with IDV by opening data.ncml.
>>
>> <netcdf location="data.nc">
>>    <!-- import geo-location data from external file.  -->
>>    <variable name="Latitude" location="geo.nc">
>>    <variable name="Longitude" location="geo.nc">
>> </netcdf>
>>
>> Is the above scenario possible with NcML via netcdf-java?
>> If so, what NcML tag & attribute should I use to import variables from
>> external files?
>>
>> Regards,
>>
>> --
>> HDF: Software that Powers Science
>>
>> _______________________________________________
>> netcdf-java mailing list
>> netcdf-java@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe, visit:
>> http://www.unidata.ucar.edu/mailing_lists/



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