Time series with yyyy_jjj

Hi,
Getting my data timetagged with,eg, 2024_222 I began with
gmt gmtset FORMAT_DATE_MAP yyyy_jjj
before giving my boundaries to psbasemap.
It tells me

psbasemap [ERROR]: Could not parse 2024_222 into Geographical, Cartesian, or Temporal coordinates!
...
psbasemap [ERROR]: Offending option -R2024_222/2024_286/11.5054/11.5424

How could I avoid offending it?

Try using FORMAT_DATE_IN and -fT :

 echo 2024_222 | gmt info --FORMAT_DATE_IN=yyyy_jjj -fT
<Standard Input>: N = 1 <2024-08-09T00:00:00/2024-08-09T00:00:00>
1 Like

Your command works fine in my script.
I had already set FORMAT_DATE_IN and OUT but psbasemap does not accept that format.

It is hard to help you without seeing your code.

The part in your error message behind ... contained detailed explanations:

-R<west>/<east>/<south>/<north>[+r]
...
Use [yyyy[-mm[-dd]]]T[hh[:mm[:ss[.xxx]]]] format for time axes.

Basically you cannot specify date range as YYYY_jjj in the -R option.

some spaghetti bash code according to suggestion by @Esteban82:

gmt basemap -R$(printf "2024_222\n2024_286\n"  | gmt info --FORMAT_DATE_IN=yyyy_jjj -fT -C | awk '{printf"%s/%s", $1,$2}')/11.5054/11.5424 -BWSen -Bafg -png quick --FORMAT_DATE_MAP=yyyy_jjj

1 Like