# A grdmath error

**URL:** <https://forum.generic-mapping-tools.org/t/a-grdmath-error/5453>\
**Category:** Q&A\
**Tags:** gmt\
**Created:** [October 9, 2024, 10:56pm UTC](https://forum.generic-mapping-tools.org/t/a-grdmath-error/5453 "2024-10-09T22:56:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lindahinnov](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@lindahinnov](https://forum.generic-mapping-tools.org/u/lindahinnov)\
**Post date:** [October 9, 2024, 10:56pm UTC](https://forum.generic-mapping-tools.org/t/a-grdmath-error/5453/1 "2024-10-09T22:56:08Z")

</div>

I am using gmt 6.5.0 for Windows. I want to replicate Animation 7 (spinning Earth showing crustal ages).

Things went well up to the command:  
`gmt grdmath intens.grd X ${MOVIE_COL1} SUB SIND 0.8 MUL ADD 0.2 SUB = s.nc`

which gives the error:  
`grdmath [ERROR]: ${MOVIE_COL1} is not a number, operator or file name`

The documentation does not give any hints about ${MOVIE\_COL1} but maybe that’s not the actual problem. Any thoughts?

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [October 10, 2024, 1:19am UTC](https://forum.generic-mapping-tools.org/t/a-grdmath-error/5453/2 "2024-10-10T01:19:11Z")

</div>

I try to run the animation. I couldn’t get the movie but I got other errors. Do you get any other errors or warnings?

If you want to read about `${MOVIE_COL1}` you could read here:

[https://docs.generic-mapping-tools.org/dev/movie.html#parameters](https://docs.generic-mapping-tools.org/dev/movie.html#parameters)

Also, in this paper it is explained better:

[https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2024GC011545](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2024GC011545)

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [October 10, 2024, 2:50am UTC](https://forum.generic-mapping-tools.org/t/a-grdmath-error/5453/3 "2024-10-10T02:50:18Z")

</div>

I found the error. It was something [else](https://github.com/GenericMappingTools/gmt/pull/8598).

How are you running the script on Windows? Are you using Git for windows (or something like that)?

---

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [October 10, 2024, 8:32am UTC](https://forum.generic-mapping-tools.org/t/a-grdmath-error/5453/4 "2024-10-10T08:32:49Z")

</div>

> [@Esteban82](#):
>
> `${MOVIE_COL1}`

this is linux/bash variable syntax while the topic starter runs gmt on windows. The corresponding variable syntax on Windows shell is something like `%MOVIE_COL1%` I believe.

Anyway I have no idea whether Animation 7 can be run on Windows directly or what kind of environment is created when gmt is installed on Windows. Not a windows user (un)fortunately.

---

<div class="post-metadata">

**Author:** ![lindahinnov](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@lindahinnov](https://forum.generic-mapping-tools.org/u/lindahinnov)\
**Post date:** [October 10, 2024, 12:08pm UTC](https://forum.generic-mapping-tools.org/t/a-grdmath-error/5453/5 "2024-10-10T12:08:17Z")

</div>

Good morning! I am running 6.5.0 on Windows with the Command Prompt. I did not get past that MOVIE\_COL1 error and will look at your suggestions shortly and try again soon. Thank you both for the feedback!
