Created
June 4, 2016 00:43
-
-
Save nikmolnar/239ccc7bbb6c00d14925d55996ec021b to your computer and use it in GitHub Desktop.
Bash script to convert all GeoTIFF files in a directory to NetCDF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for filename in ./*.tif; do | |
if [[ $filename =~ Y_([a-zA-Z0-9_]+)\.tif$ ]] | |
then | |
variable="${BASH_REMATCH[1]}" | |
clover to_netcdf $filename netcdf/$variable.nc $variable | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment