comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » NetCDF: Converting time variable using start time from "units"
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: NetCDF: Converting time variable using start time from "units" [message #91916 is a reply to message #91904] Tue, 15 September 2015 08:32 Go to previous messageGo to previous message
laura.hike is currently offline  laura.hike
Messages: 87
Registered: September 2013
Member
Thanks! Given that this expression of start time is a standard, you'd think there'd already be an IDL function to read it....


On Monday, September 14, 2015 at 3:29:07 PM UTC-7, Mike Galloy wrote:
> On 9/14/15 2:33 PM, Larry H. wrote:
>> I've been reading and writing NetCDF files using IDL for some time.
>> Now I'm wondering whether there's a better way to convert the values
>> in the "time" variable to real times than by using ncdump to get the
>> units from the attributes and then hard coding the offset into my
>> routines. I can read the units, e.g.,
>>
>> time:units = "minutes since 2007-01-26 01:30:00"
>>
>> using ncdf_attget, but don't know of any way IDL can understand this
>> information and automatically apply the offset to the values in
>> "time". I've heard a rumor that this can be done. Any suggestions?
>> Thanks.
>>
>
> I have a basic routine to do this MG_CF2JULIAN to convert from the CF
> convention in netCDF to Julian time:
>
> https://github.com/mgalloy/mglib/blob/master/src/calendar/mg _cf2julian.pro
>
> This handled my needs, but I think is fairly general. Please let me know
> if there is more you need from it.
>
> Mike
> --
> Michael Galloy
> www.michaelgalloy.com
> Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Interpolate
Next Topic: how to write a for loop that skips over things

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:56:41 PDT 2025

Total time taken to generate the page: 0.00205 seconds