UM Helper Scripts

Revision as of 01:49, 18 March 2019 by (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A number of helper scripts are available at NCI to assist with working with UM files and model runs.

The following scripts are courtesy of Martin Dix from CAWCR. These files are available on Raijin under ~access/apps/pythonlib/umfile_utils


  • -i FILE: Print FILE's header information
  • -i INFILE: Get information about a lateral boundary condition file

Modifying Files

  • Convert from Gregorian to a 360 day calendar
  • Convert from 360 day to Gregorian calendar
  • FILE: Change the file's date
  • -i INFILE -o OUTFILE: Swap between big/little endian format (Files used by the model should be big-endian)
  • -v OLD,NEW FILE: Change the STASH code of variables in the file
  • FILE: Count the number of land points in a land mask
  • FILE: Fix anomalies in polar fields
  • -i INFILE -o OUTFILE -m MASK: Convert all the fields in INFILE to use the grid used by MASK
  • -a AMPLITUDE FILE: Apply a perturbation to an initial conditions file
  • FILE: Check the values at the poles
  • -i INFILE -o OUTFILE -x X0,NX -y Y0,NY: Extract a region from an ancillary file
  • -i FILE -v STASH -n NETCDF -v VAR: Add a variable from a netcdf file to FILE
  • -v STASH FILE: Zero out a field in the file

Conversion and Copying

  • -i INFILE -o OUTFILE -s STASH: Convert a single variable to netcdf format
  • -i INFILE -o OUTFILE: Convert all variables to netcdf format
  • -i AFILE -o BFILE -v STASH: Copy a field from AFILE into BFILE
  • -i INFILE -o OUTFILE: Extract selected variables from INFILE
  • AFILE BFILE OUTFILE: Combine the fields in AFILE and BFILE
  • -i INFILE -o OUTFILE: Convert file to netcdf
  • -i INFILE -o OUTFILE: Convert file with variable grid to netcdf