NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdf-java] grid copied upside down

  • Subject: Re: [netcdf-java] grid copied upside down
  • From: andrea antonello <andrea.antonello@xxxxxxxxx>
  • Date: Wed, 14 Apr 2010 14:38:55 +0200
Hi John,
I am still struggling a bit around the issue. It seems that one of the
start datasets, from which I take the data to copy over, has inverted
axes and data insertion indexes. So that seems to be the issue, I
guess the format is not exactly CF. The second dataset, from which I
take only the variable, using the axes of the first dataset, therefore
is somehow mirrored. I was only checking the axes sizes, but will
definitely have to check a bit deeper.
I will have to check further. But at least the code seems to be ok.

Thanks for the reply,
Andrea



On Wed, Apr 14, 2010 at 1:25 AM, John Caron <caron@xxxxxxxxxxxxxxxx> wrote:
> On 4/11/2010 4:06 PM, andrea antonello wrote:
>>
>> Hi all,
>> I have a strange problem.
>> I have two netcdf file, both containing a grid. The grids have both
>> lat and lon dimansions and they happen to be of the same size.
>>
>> I want to merge the two programmatically and do it by adding to the
>> new netcdfwritable the dimansions of the first file and then add the
>> grid variable of every file:
>>
>>                 netcdfwrtitable.write(var1.getName(), var1.read());
>>                 netcdfwrtitable.write(var2.getName(), var2.read());
>>
>> The result is that I get the first map properly, while the second
>> shows up upside-down.
>>
>> I checked thousand times the starting maps and the resulting
>> variables, all seems ok, but the data are copied over upside-down in
>> the second case.
>>
>> Anyone an idea what I might have scrambled?
>> Thanks,
>> Andrea
>>
>> _______________________________________________
>> netcdf-java mailing list
>> netcdf-java@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe, visit:
>> http://www.unidata.ucar.edu/mailing_lists/
>>
>
> hi andrea: cant tell what the problem is, can you make a small test case
> that reproduces it? thanks
>
> _______________________________________________
> netcdf-java mailing list
> netcdf-java@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/



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