# Is it possible to multiply varibles in gmt movie, or other modules?

**URL:** <https://forum.generic-mapping-tools.org/t/is-it-possible-to-multiply-varibles-in-gmt-movie-or-other-modules/1124>\
**Category:** Q&A\
**Created:** [December 11, 2020, 6:33pm UTC](https://forum.generic-mapping-tools.org/t/is-it-possible-to-multiply-varibles-in-gmt-movie-or-other-modules/1124 "2020-12-11T18:33:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RunningWild](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@RunningWild](https://forum.generic-mapping-tools.org/u/RunningWild)\
**Post date:** [December 11, 2020, 6:33pm UTC](https://forum.generic-mapping-tools.org/t/is-it-possible-to-multiply-varibles-in-gmt-movie-or-other-modules/1124/1 "2020-12-11T18:33:52Z")

</div>

I am trying to multiply variable ${MOVIE\_FRAME} by some factor, let’s say 10.

I’ve taken the example from the cookbook which produces 360 images when run with gmt movie:

gmt begin globe1  
gmt pscoast -Rg -JG${MOVIE\_FRAME}/20/${MOVIE\_WIDTH} -Gtan -Slightblue -A700 -Bg -X0 -Y0  
gmt end show

Is it possible to multiple variable MOVIE\_FRAME by 10 for example, and reduce the number of frames produced to 36?

using:

gmt movie globe.sh -Nglobe **-T36** -Agif -C6ix6ix100

instead of

gmt movie globe.sh -Nglobe **-T360** -Agif -C6ix6ix100

If I append 10\* after -JG in the script it will plot 360 frames centered at longitude 5E, rather than 10, 20, 30…

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [December 11, 2020, 7:01pm UTC](https://forum.generic-mapping-tools.org/t/is-it-possible-to-multiply-varibles-in-gmt-movie-or-other-modules/1124/2 "2020-12-11T19:01:27Z")

</div>

The **-T** _frames_ is only used for the simplest of cases where you can just use **$MOVIE\_FRAME** directly in your script as an integer. For anything more tricky you simply create a table with what values you want, e.g.

`gmt movie -T0/360/5`

and now you need to use **$MOVIE\_COL0** instead to access the longitude. For more fancy stuff you would make a table with **gmt math** and feed it via **-T.**

---

<div class="post-metadata">

**Author:** ![RunningWild](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@RunningWild](https://forum.generic-mapping-tools.org/u/RunningWild)\
**Post date:** [December 11, 2020, 7:42pm UTC](https://forum.generic-mapping-tools.org/t/is-it-possible-to-multiply-varibles-in-gmt-movie-or-other-modules/1124/3 "2020-12-11T19:42:35Z")

</div>

Thank you very much, worked a treat!
