For Loop in GRASS GIS console

34 views Asked by At

I am trying to do a for loop in the Grass GIS 8.3 console and keep getting and error. How to execute a for loop in Grass GIS console? Attached is an example of the error.Error in GRASS GIS console

I wanted to execute a for loop in the console and think that this is not the right way.

1

There are 1 answers

0
Tony Markov On
FOR %%i IN (00 03 06 09 12 15 18 21) DO (
  gdal_translate -of GTiff NETCDF:"GLDAS_NOAH025_3H_A20220124.%%i00.nc4":Qair Qair_f_inst_GLDAS_NOAH025_3H_A20220124.%%i00_Qair.tif
)

I think this would be the correct way to transfer the bash format into batch. As I am an linux user this is my POV. I hope you got my point.