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

[IDV #RLV-572542]: Error loading .nc files using "Aggregate Grids by Time"



Alexa,

NcML can work a lot of magic, but in your case you may be out of luck. I 
noticed the data are not evenly spaced along the grid (is this true?) in the 
longitude dimension. If the data had been evenly spaced you could maybe have 
used 
http://www.unidata.ucar.edu/software/thredds/v4.4/netcdf-java/ncml/Cookbook.html#values
 to fix the grid values.

But the root issue is you need to fix the data file. After all, someone may use 
your data down the road and get tripped up over this longitude problem.

I actually think you can fix these data fairly easily with a bit of Python. In 
fact here is that bit of Python:

import netCDF4
f = netCDF4.Dataset('/tmp/netCDF_PIC_119.nc', 'r+')
lon = f.variables['lon']
lon[:] = lon[:]*-1
f.close()

When I open your NcML aggregation, the data end up over Kenai, Alaska (Mt. 
Redoubt?)

Best Wishes,

Unidata IDV Support

> Thank you so much for your reply. This works perfectly!
> 
> I wonder - can I also write a little script in the NCML to read in the
> longtitude as degrees west (instead of the default degrees east)? I should
> have used a negative number (instead of positive) to specify the latitude
> the Alaskan volcano in my simulation, so now the data are plotting
> somewhere in Russia.
> 
> Thanks again - I really appreciate your help, this has opened up so many
> possibilities for our work on eruption dynamics.
> 
> All the best
> 
> Alexa
> 
> 
> address@hidden> wrote:
> 
> > Alexa,
> >
> > Sorry for the delayed response. We have been short-staffed here on account
> > of the AGU conference.  The IDV is trying to aggregate the data but can't
> > find an aggregation dimension of "time". This can be solved fairly simply
> > by writing your own NcML (
> > http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/ncml/v2.2/Aggregation.html).
> > Attached you will find an example NcML file that should work for your data.
> > Note I replaced the aggregation dimension "dimName" from "time" to "date".
> > Please give that a try. It looks like you are working with interesting
> > volcanic data.
> >
> > Please keep us up-to-date on your progress.
> >
> > Best Wishes,
> >
> > Unidata IDV Support
> >
> >
> > > Hi there - thanks for your reply.
> > >
> > > I've uploaded two of the NetCDF files I'm been working with. I'm not
> > > actually sure where the NCML is located, however, I'm using the latest
> > > release of the IDV (v 4.1) so I assume there is a default location for
> > it?
> > >
> > > All the best
> > >
> > > Alexa
> > >
> > >
> > > address@hidden> wrote:
> > >
> > > > Alexa,
> > > >
> > > > Sorry for the delayed response. Please upload the netCDF sample data
> > here (
> > > > http://motherlode.ucar.edu/repository/alias/idvupload) along with the
> > > > NCML. Let us know when it is uploaded by responding to this message.
> > > >
> > > > Also, I don't know if this is the problem, but you may wish to
> > familiarize
> > > > yourself with the Time Coordinate of the NetCDF Climate and Forecast
> > (CF)
> > > > Metadata Conventions (
> > > >
> > http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html#time-coordinate
> > > > ).
> > > >
> > > > Best Wishes,
> > > >
> > > > Unidata IDV Support
> > > >
> > > >
> > > > > Greetings IDV support,
> > > > >
> > > > > I've just started using IDV to analyze netCDF files from 3d
> > atmospheric
> > > > > simulations and I am very impressed with the program. Thank you for
> > all
> > > > > your hard work.
> > > > >
> > > > > I have multiple files that vary only by time, and would like to try
> > to
> > > > load
> > > > > them in using the "Aggregate Grids by Time" option under data source
> > type
> > > > > (goal = plot the same field at different time steps and generate an
> > > > > animation). I've gotten the following error:
> > > > >
> > > > > -----------
> > > > > There was an error loading the data:
> > > > > Error creating data source:aggregated.netcdf.grid with:
> > > > > [/home/avaneaton/output/netCDF_PIC_106.nc,
> > > > > /home/avaneaton/output/netCDF_PIC_107.nc]
> > > > > Grid data source failed making data set:
> > > > >
> > > >
> > /home/avaneaton/.unidata/idv/DefaultIdv/tmp/multigrid_b7c4c046-ee15-428c-9af3-09f0db845a590.ncml
> > > > > AggregationExisting: no coordinate variable for agg
> > > > > dimension= time
> > > > > ------------
> > > > >
> > > > > So it looks like the ncml script does not recognize the time stamp
> > in my
> > > > > files. Any suggestions for troubleshooting this issue?
> > > > >
> > > > > All the best
> > > > >
> > > > > Alexa
> > > > >
> > > > >
> > > >
> > > >
> > > > Ticket Details
> > > > ===================
> > > > Ticket ID: RLV-572542
> > > > Department: Support IDV
> > > > Priority: Normal
> > > > Status: Closed
> > > >
> > > >
> > >
> > >
> > > --
> > > Alexa Van Eaton
> > > NSF Postdoctoral Fellow
> > > U.S. Geological Survey
> > > David A. Johnston Cascades Volcano Observatory
> > > 1300 SE Cardinal Court, Bldg 10, Suite 100
> > > Vancouver, Washington 98683 USA
> > > Office (360) 993 8921
> > > Mobile (208) 596 8265
> > >
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: RLV-572542
> > Department: Support IDV
> > Priority: Normal
> > Status: Closed
> 
> 
> 
> 
> --
> Alexa Van Eaton
> NSF Postdoctoral Fellow
> U.S. Geological Survey
> David A. Johnston Cascades Volcano Observatory
> 1300 SE Cardinal Court, Bldg 10, Suite 100
> Vancouver, Washington 98683 USA
> Office (360) 993 8921
> Mobile (208) 596 8265
> 
> 


Ticket Details
===================
Ticket ID: RLV-572542
Department: Support IDV
Priority: Normal
Status: Closed