Skip to main content.

Post-processing tools

Convert DaViE .dg files to netCDF .nc files. This is useful for extracting variables for quick viewing with ncview, but can also convert an entire dg file (assuming standard diagnostics)
! Invocation is:
!      dg2nc afile.dgXXXX [-im] [-o <>] [-v <variable>]
! Flags:
!         -o <>   Send output to (If this option is 
!                          not used, the default output is to
!         -v <variable>    Only get data for <variable>
!                          N.B. This can have multiple specifications
!         -i               Force writing over existing file
!         -m               Modify existing file rather than recreating
! Example usage:
!      dg2nc -v THBAR file1.dg0001 -o
!  This invocation will output the variable VBAR from file1.dg0001 to
!  the output file (Note all dimensional information is written
!  to not just that required for THBAR. will be 
!  created if it doesn't already exist else the user will be prompted
!  whether to overwrite.  If the user wishes to modify they
!  should use the -m flag (see next example).
!      dg2nc file1.dg0020 -i -m -v UBAR -v VBAR -o
!  This invocation takes the variables UBAR and VBAR from the DaViE
!  file file1.dg0020 and modifies the existing netCDF file 
!  N.B. The existing must already contain the correct 
!  dimension information for the variables UBAR and VBAR