Feature #640

Supporting Date/Time as Range of makecpt

Added by Edith almost 3 years ago. Updated almost 3 years ago.

Status:FeedbackStart date:2014-11-15
Priority:NormalDue date:
Assignee:Remko% Done:

0%

Category:-
Target version:Candidate for next minor release
Platform:

Description

I would be most pleased if you would consider in one of the next GMT releases a fix that makecpt can support date/time as Range (-T) as asked/answered in User-Forum makecpt with time? on 11/11/14.

Thank you in advance,
Edith

History

#1 Updated by Florian almost 3 years ago

  • Description updated (diff)

#2 Updated by Remko almost 3 years ago

  • Assignee set to Remko
  • Target version set to Candidate for next minor release
  • Start date changed from 2014-11-11 to 2014-11-15

To be considered for implementation in 5.2.x, but after the release this month.

#3 Updated by Paul almost 3 years ago

  • Status changed from New to Feedback
This is doable but will involve the machinery normally used for axis annotations. For example, running
makecpt -T2010T/2014T/3o

should mean 3-month intervals which have different number of days, just like when -Ba3o is used. Basically, we will then support the same increments as in -B, such as days, weeks, Gregorian weeks, months, etc.
I see the following changes to be involved:
  1. No longer use atof to parse min/max/inc since these could be dates, so use GMT_scanf as elsewhere.
  2. From these, build a coordinate array as is done in basemap plotting. Normally, these will be equidistant but not for time, necessarily.
  3. Set -f0T when min and max contains the "T" used to indicate date-time string so that the i/o machinery will work.
  4. Write date-time strings into the output cpt files (well, if -fo0t is used then relative time is written).
  5. Parsing of CPT files needs to use GMT_scanf since there may be date-strings.

Also available in: Atom PDF