[Thread Prev][Thread Next][Index]

Re: [ferret_users] seconds in date-time



Hi Ryo,

The seconds you specify are being used; this is just an issue with the default display of calendar time.  Try changing the seconds you ask for, and the result should also change. Here's a quick example.

yes? define axis/t=1-jan-2020:4-jan-2020:10/units=seconds taxis
yes? let func = randu(L[gt=taxis])


yes? list func[t="2-jan-2020:10:15:10":"2-jan-2020:10:30:05"@ave]
             VARIABLE : RANDU(L[GT=TAXIS])
             TIME     : 02-JAN-2020 10:15 to 02-JAN-2020 10:30 (averaged)
          0.4963

yes? list func[t="2-jan-2020:10:15:10":"2-jan-2020:10:30:55"@ave]
             VARIABLE : RANDU(L[GT=TAXIS])
             TIME     : 02-JAN-2020 10:15 to 02-JAN-2020 10:30 (averaged)
          0.4896

Actually, there's a setting that allows for the whole time spec to be shown in the listing. MODE CALENDAR turns off or on a setting for whether the times shown in listings and on plot labels as a calendar date/time or as time coordinates, and when turned on, it lets you set the resolution used to list the date and time

yes? show mode calendar
      MODE            STATE        ARGUMENT
      CALENDAR         SET         minutes

yes? set mode calendar:seconds

yes? list func[t="2-jan-2020:10:15:10":"2-jan-2020:10:30:05"@ave]
             VARIABLE : RANDU(L[GT=TAXIS])
             TIME     :
02-JAN-2020 10:15:10 to 02-JAN-2020 10:30:05 (averaged)
          0.4963

Ansley

On 5/16/2023 1:59 AM, Ryo Furue wrote:
Dear Ferreters,

I was wondering how the seconds are handled in the date-time specification?

In the example below, I get from LIST

TIME     : 04-AUG-2015 03:06 to 18-AUG-2015 00:26

as the averaging period whereas I specify "2015-08-04T03:06:40":"2015-08-18T00:26:40"@AVE .  Is this just a display issue? Or are the seconds actually ignored?

It's not that the seconds matter in my particular calculation at hand. I'd just like to know.

I'm working with colleagues who just use seconds for their time axis and when I mechanically converted their time range to a date-time range, I got these date-times.

Regards,

Ryo
-----
set data tmp.nc ! !<-- I can send this small file on request.

let t1 = "2015-08-04T03:06:40"
let t2 = "2015-08-18T00:26:40"

let slpmean = slp[t="`t1`":"`t2`"@AVE]
list slpmean

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement