Last active
August 29, 2015 14:00
-
-
Save brews/87dc9c6edd4be7ec6618 to your computer and use it in GitHub Desktop.
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
#! /usr/bin/env bash | |
# 2014-05-02 | |
# S. B. Malevich <[email protected]> | |
# Dump netCDF files in CWD to a text CDF file. Change `time = 1 ;` dimension | |
# to `time = UNLIMITED`, and then convert the CDF back into a netCDF file, | |
# overwriting the original. | |
for f in *.nc; do | |
cp $f $f.original # Make copy for safety. Might want to comment this out. | |
ncdump $f | sed 's/time \= 1/time \= UNLIMITED/' | ncgen -o $f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment