# Grdmath not outputting a grid

**URL:** <https://forum.generic-mapping-tools.org/t/grdmath-not-outputting-a-grid/2170>\
**Category:** Q&A\
**Tags:** gmt\
**Created:** [October 6, 2021, 5:59pm UTC](https://forum.generic-mapping-tools.org/t/grdmath-not-outputting-a-grid/2170 "2021-10-06T17:59:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marem](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@marem](https://forum.generic-mapping-tools.org/u/marem)\
**Post date:** [October 6, 2021, 5:59pm UTC](https://forum.generic-mapping-tools.org/t/grdmath-not-outputting-a-grid/2170/1 "2021-10-06T17:59:28Z")

</div>

Hi,

I am using version 6 of GMT.  
I am inputting a large grid. I would like to take the RMS of every 3x3 grid within my input.  
I have tried this by using grdmath, specifying increments of 3.  
gmt grdmath $name.grd -I3 RMS = $name\_rms.grd

I am not doing this correctly as my output file is empty. I get the error:  
grdimage: Warning: No valid values in grid

Sorry that this is very simple but I cannot find an answer online.

Thanks,  
Zoe

---

<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 6, 2021, 9:38pm UTC](https://forum.generic-mapping-tools.org/t/grdmath-not-outputting-a-grid/2170/2 "2021-10-06T21:38:34Z")

</div>

Hi!!

For the warning message I think that there is a problem with the grid. Can you check this?
