/[MITgcm]/MITgcm/utils/scripts/xplodemnc
ViewVC logotype

Diff of /MITgcm/utils/scripts/xplodemnc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by baylor, Wed Nov 8 18:50:08 2006 UTC revision 1.4 by jmc, Fri Aug 14 21:07:44 2009 UTC
# Line 1  Line 1 
1  #!/bin/bash  #! /usr/bin/env bash
2    #
3    # $Header$
4    # $Name$
5    
6  # This is a shell script to separate an MITgcm mnc output file into  # This is a shell script to separate an MITgcm mnc output file into
7  # one file per multi-dimensional variable.  # one file per multi-dimensional variable.
8  # The file should be in one directory, where this script is run.  # The file should be in one directory, where this script is run.
# Line 29  do Line 33  do
33  #   echo $somevar1  #   echo $somevar1
34     vars=${vars}$somevar1' '     vars=${vars}$somevar1' '
35    done    done
   echo Variables to extract: $vars iter  
36    IFS=' '    IFS=' '
37      withIter=$(ncdump -h $somefile | grep -c 'int iter(' )
38      if [ $withIter -gt 0 ]; then vars=${vars}iter ; fi
39      echo Variables to extract: $vars
40    for somevar in $vars    for somevar in $vars
41    do    do
42      ncks $DEBUG -v $somevar $somefile $somevar.$somefile      ncks $DEBUG -v $somevar $somefile $somevar.$somefile
43    done    done
   ncks $DEBUG -v iter $somefile iter.$somefile  
44  done  done

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22