[cam-users] CAM history files and mass storage

Jim Rosinski rosinski@cgd.ucar.edu
Tue, 15 Oct 2002 11:52:57 -0600 (MDT)


On Sat, 28 Sep 2002, John Fasullo wrote:

> In running the CAM on our local SGI (without mass storage), I'm trying
> to configure my own archival process. I've turned the mss_irt namelist
> variable to 0 however the NETCDF history files are created by the CAM
> but are still deleted automatically by the CAM each month. Does anyone
> know the keyword or procedure used to turn off the automatic deletion
> of history netcdf files from the camwork directory?

What I've done for running on a machine without mass store access is to write
my own "mswrite" and "msread".  They are csh scripts, but one could use
whatever they like, as long as they are executable from the user's
environment.  They're appended below.  Turns out this is set up for running
on a PC that happens to be at NCAR, and the archival command "msrcp" is
available.  But it could be changed to use "cp" or whatever.

Jim Rosinski
-------------------------------------------------------------------------------
msread:

#!/bin/csh -f

set cmd = /usr/local/dcs-3.3/bin/msrcp

while ( $#argv )
switch ( $1 )
  case -t:
    set cmd = "$cmd -pe $2"
    shift argv
    shift argv
    breaksw
  case -w:
    set cmd = "$cmd -wpwd $2"
    shift argv
    shift argv
    breaksw
  default:
    if ( `echo $1 | cut -c 1-1` == '/' ) then
      set path = "mss:$1"
    else
      set file = "$1"
    endif
    shift argv
endsw
end
set cmd = "$cmd $path $file"
echo "msread script is executing the following:"
echo $cmd
$cmd
-------------------------------------------------------------------------------
mswrite:
#!/bin/csh -f

set cmd = /usr/local/dcs-3.3/bin/msrcp

while ( $#argv )
switch ( $1 )
  case -t:
    set cmd = "$cmd -pe $2"
    shift argv
    shift argv
    breaksw
  case -w:
    set cmd = "$cmd -wpwd $2"
    shift argv
    shift argv
    breaksw
  default:
    if ( `echo $1 | cut -c 1-1` == '/' ) then
      set path = "mss:$1"
    else
      set file = "$1"
    endif
    shift argv
endsw
end
set cmd = "$cmd $file $path"
echo "mswrite script is executing the following:"
echo $cmd
$cmd