Time series repressentations

I wanted to plot a time series (the time series file has a calendar date and a temperature ) like as shown below. Is it possible to use a polar projection first by assigning each calendar date to represent as azimuth value? Here I assign April month aligned to North (an azimuth of 0) and January month assigned to 90 degrees and, so on. The elevation angle needed for the polar projection comes from the temperature values but first scaling (renormalizing ) between the range 0 - 90 degrees.

Does this work or Is there a simpler/better way in GMT?

I think that you only need to to normalize/scale the dates to 360. This should be easy (or not) depending on the format of the dates.

For the temperatures there is no need to normalize to 0-90. You could plot any values (as long as are all positives).

you could try something like:

#!/bin/bash
year=2020
Tmin=10
Tmax=40
yearMin=$(echo "$year-01-01T00:00:00" | gmt convert -fi0T -fo0t)
yearMax=$(echo "$(($year+1))-01-01T00:00:00" | gmt convert -fi0T -fo0t)
delYear=$(echo "$yearMax-$yearMin" | bc -l)

declare -A month=([01]=Jan [02]=Feb [03]=Mar [04]=Apr [05]=May [06]=Jun
		  [07]=Jul [08]=Aug [09]=Sep [10]=Oct [11]=Nov [12]=Dec)

for m in ${!month[*]}; do
    echo "$year-${m}-01T00:00:00 ag ${month[$m]}"
done | gmt convert -fi0T -fo0t | \
    awk -v o=$yearMin -v s=$delYear '{print (($1-o)/s)*360,$2,$3}' > labels.txt

cat <<EOF > test.dat
2020-03-01T00:00:00 $Tmin
2020-09-25T12:00:00 25
2020-09-01T00:00:00 $Tmax
EOF

gmt begin test png
gmt set FONT_ANNOT_PRIMARY=24p,Helvetica,black MAP_GRID_PEN_PRIMARY=thin,black,-
gmt basemap -X2c -JP18c+f -R-180/180/$Tmin/$Tmax -Bxclabels.txt -Byg10
gmt convert -fi0T,1f -fo0t,1f test.dat | \
    awk -v o=$yearMin -v s=$delYear '{print (($1-o)/s)*360,$2}' | \
    gmt plot -Sc8p -Gorange
gmt end

That results in:

2 Likes

MarceloBanik, Simply brilliant solution. Thank you so much and appreciated.

/Yacob