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

[IDV #SUF-224604]: netcdf file formatting issue



> Hello, I need help with my netcdf file.  It does not appear that I am 
> formatting the time variable correctly, because IDV does not recognize that 
> variable when i read my file in.  I can send a netcdf file I have made as an 
> example.
> 
> Thank you,
> 
> Sonja


You didn't have any attribute for the time variable. At least you need to add 

:units = "hours since 1970-01-01";
:_CoordinateAxisType = "Time";


Yuan

> ________________________________________
> From: Behnke, Sonja
> Sent: Friday, May 09, 2014 12:24 PM
> To: address@hidden
> Subject: RE: [IDV #SUF-224604]: netcdf file formatting issue
> 
> Thanks again.  I believe I added a time dimension/variable according to your 
> instructions, but I still don't see the time in IDV.  Can you tell me what I 
> am doing wrong?  I attached a file that should have a time variable in it.
> 
> Thank you
> 
> Sonja
> ________________________________________
> From: Unidata IDV Support [address@hidden]
> Sent: Friday, May 09, 2014 12:11 PM
> To: Behnke, Sonja
> Cc: address@hidden
> Subject: [IDV #SUF-224604]: netcdf file formatting issue
> 
> > Thank you for your help.
> >
> > I have been able to make a file that IDV reads in.  One thing I did not yet 
> > include in my netcdf file is the date/time that the data correspond to.  
> > Should this be a variable or an attribute of a variable?  When I look at my 
> > colleague's data in the 'field selector' if IDV I see the time in the box 
> > below the displays box.  How should time be stored in the netcdf file?  are 
> > seconds of day ok?  julian day?
> >
> > Thank you,
> >
> > Sonja
> 
> Sonja,
> The time dimension associates with a time variable, and the data/time 
> information is stored in this time variable. There are many way to do this, 
> basically, the most important information is the unit of this variable, for 
> example:
> 
> double time(time=10);
> :long_name = "reference time";
> :units = "hours since 1970-01-01";
> :_CoordinateAxisType = "Time";
> 
> 
> if its unit is seconds,
> 
> double time(time=10);
> :long_name = "time of stroke";
> :units = "seconds since 1970-01-01 00:00:00";
> :_CoordinateAxisType = "Time";
> 
> 
> Hope this can help.
> 
> 
> Yuan
> > ________________________________________
> > From: Unidata IDV Support [address@hidden]
> > Sent: Wednesday, May 07, 2014 12:43 PM
> > To: Behnke, Sonja
> > Cc: address@hidden
> > Subject: [IDV #SUF-224604]: netcdf file formatting issue
> >
> > > I uploaded two files.  The other was called 
> > > lma_Redoubt_20090323_1230_ev.nc
> > >
> > > This one has a 200x200 element array, representing pixels on a map, and 
> > > the value is the number of events in the pixel.  I have not yet gone to 
> > > the trouble to extract the lat/lon coordinates for each array element.
> > >
> > > However, the data from the file you looked at is data and contains "real 
> > > variables."  My data is the lat/lon/time of radiation events by 
> > > lightning.  I want to overlay their location onto other data my 
> > > colleagues have (who use IDV). If you wanted, I could just make another 
> > > dummy variable with the same length as the lat/lon and fill it with ones, 
> > > but I don't see the point in that.  Alternatively, you could consider the 
> > > time variable the "real variable."
> > >
> > > Sonja
> >
> >
> > Sonja,
> > The second file is not a good netCDF file too. Only a variable and two 
> > dimensions in this file. To construct a good netCDF file, you need to have 
> > dimensions and associated variables, and projection, "real variables", and 
> > global attributes. Each variable should has its own attribute, such as 
> > unit, standard name, coordinate axises, and  so on.... In general, the 
> > structure of lat lon projection gridded dataset is the simplest.
> > Here is the web page for more details information: http://cfconventions.org/
> >
> >
> > Yuan
> >
> > > ________________________________________
> > > From: Unidata IDV Support [address@hidden]
> > > Sent: Tuesday, May 06, 2014 5:28 PM
> > > To: Behnke, Sonja
> > > Cc: address@hidden
> > > Subject: [IDV #SUF-224604]: netcdf file formatting issue
> > >
> > > > Hello,
> > > >
> > > > Thank you.  I have uploaded the two netcdf files I discuss below.
> > > >
> > > > Sonja
> > >
> > >
> > > I am checking the dataset named lma_Redoubt_20090323_1230.nc, is this the 
> > > one you uploaded? The problem is that there is no
> > > grided variable in this file, only lat/lon/time coordinate variables. You 
> > > need to add at least one real variable, such as temperature or pressure, 
> > > based on these coordinate variables.
> > >
> > >
> > >
> > > Yuan
> > > > ________________________________________
> > > > From: Unidata IDV Support [address@hidden]
> > > > Sent: Friday, May 02, 2014 7:59 PM
> > > > To: Behnke, Sonja
> > > > Cc: address@hidden
> > > > Subject: [IDV #SUF-224604]: netcdf file formatting issue
> > > >
> > > > Sonja,
> > > >
> > > > Can you upload your data here and let us know when it is uploaded?
> > > >
> > > > http://motherlode.ucar.edu/repository/alias/idvupload
> > > >
> > > > Best,
> > > >
> > > > Unidata IDV Support
> > > >
> > > >
> > > > > Hello,
> > > > >
> > > > > I am trying to collaborate with a colleague who uses IDV to visualize 
> > > > > her modeling results.  I have my own data that I would like to 
> > > > > overlay on hers using IDV.  I use IDL, and I am trying to export my 
> > > > > data into netCDF format.  I know how to do this, but I don't know 
> > > > > what IDV is expecting of me.  Let me describe my data:
> > > > >
> > > > > At simplest I have three arrays: time, latitude and longitude.
> > > > >
> > > > > time[i] = time of event
> > > > > latitude[i] = latitude of event
> > > > > longitude[i] = longitude of event
> > > > >
> > > > > I wrote a program in IDL to make a netcdf file of three variables: 
> > > > > time, latitude, and longitude.  I know I did this correctly because I 
> > > > > reread the file back in to IDL and was able to extract my arrays.
> > > > >
> > > > > But, IDV doesn't know what to do with my data.  It complains that I 
> > > > > don't have any "gridded" data in my file.  So, I took my data in IDL 
> > > > > and made a 200x200 element array of the density of my events with 
> > > > > respect to lat and lon.  So each element of the array is a pixel on a 
> > > > > map, and the value represents how many events were in that pixel. I 
> > > > > saved that 200x200 array in a netcdf file, but alas, IDV doesn't get 
> > > > > it.
> > > > >
> > > > > So, I realize I don't know what IDV is expecting here with my data, 
> > > > > but I would like to format my data so that it understands it and I 
> > > > > could use IDV to plot it on a map.
> > > > >
> > > > > Can you help with this?
> > > > >
> > > > > Thank you,
> > > > >
> > > > > Sonja Behnke
> > > > >
> > > >
> > > >
> > > > Ticket Details
> > > > ===================
> > > > Ticket ID: SUF-224604
> > > > Department: Support IDV
> > > > Priority: Normal
> > > > Status: Open
> > > >
> > > >
> > >
> > >
> > > Ticket Details
> > > ===================
> > > Ticket ID: SUF-224604
> > > Department: Support IDV
> > > Priority: Normal
> > > Status: Open
> > >
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: SUF-224604
> > Department: Support IDV
> > Priority: Normal
> > Status: Closed
> >
> >
> 
> 
> Ticket Details
> ===================
> Ticket ID: SUF-224604
> Department: Support IDV
> Priority: Normal
> Status: Closed
> 
> 

Ticket Details
===================
Ticket ID: SUF-224604
Department: Support IDV
Priority: High
Status: Open