Home Contact Us Site Map  
 
       
    next up previous contents
Next: 6.15.2 MNC Internals Up: 6.15 NetCDF I/O Integration: Previous: 6.15 NetCDF I/O Integration:   Contents

Subsections

6.15.1 Using MNC

6.15.1.1 MNC Configuration

As with all MITgcm packages, MNC can be turned on or off at compile time using the packages.conf file or the genmake2 -enable=mnc or -disable=mnc switches.

While MNC is likely to work ``as is'', there are a few compile-time constants that may need to be increased for simulations that employ large numbers of tiles within each process. Note that the important quantity is the maximum number of tiles per process. Since MPI configurations tend to distribute large numbers of tiles over relatively large numbers of MPI processes, these constants will rarely need to be increased.

If MNC runs out of space within its ``lookup'' tables during a simulation, then it will provide an error message along with a recommendation of which parameter to increase. The parameters are all located within pkg/mnc/mnc_common.h and the ones that may need to be increased are:

Name Default Description
MNC_MAX_ID 1000 IDs for various low-level entities
MNC_MAX_INFO 400 IDs (mostly for object sizes)
MNC_CW_MAX_I 150 IDs for the ``wrapper'' layer

In those rare cases where MNC ``out-of-memory'' error messages are encountered, it is a good idea to increase the too-small parameter by a factor of 2-10 in order to avoid wasting time on an iterative compile-test sequence.

6.15.1.2 MNC Inputs

For run-time configuration, most of the MNC-related model parameters are contained within a Fortran namelist file called data.mnc. If this file does not exist, then the MNC package will interpret that as an indication that it is not to be used. If the data.mnc file does exist, then it may contain the following parameters:

Name T Default Description
useMNC L .FALSE. overall MNC ON/OFF switch
mnc_echo_gvtypes L .FALSE. echo pre-defined ``types'' (debugging)
mnc_use_outdir L .FALSE. create a directory for output
mnc_outdir_str S 'mnc_' output directory name
mnc_outdir_date L .FALSE. embed date in the output dir name
pickup_write_mnc L .FALSE. use MNC to write (create) pickup files
pickup_read_mnc L .FALSE. use MNC to read pickup files
mnc_use_indir L .FALSE. use a directory (path) for input
mnc_indir_str S '' input directory (or path) name
snapshot_mnc L .FALSE. write snapshot (instantaneous) w/MNC
monitor_mnc L .FALSE. write monitor w/MNC
timeave_mnc L .FALSE. write timeave w/MNC
autodiff_mnc L .FALSE. write autodiff w/MNC

Additional MNC-related parameters are contained within the main data namelist file and in some of the namelist files for individual packages. These options are:

Name T Default Description
Main namelist file: ``data''
snapshot_ioinc L .FALSE. write snapshot ``inclusively''
timeave_ioinc L .FALSE. write timeave ``inclusively''
monitor_ioinc L .FALSE. write monitor ``inclusively''
the_run_name C ``name...'' name is included in all MNC output
Diagnostics namelist file: ``data.diagnostics''
diag_mnc L .FALSE. write diagnostics w/MNC
diag_ioinc L .FALSE. write diagnostics ``inclusively''

By default, turning on MNC for a particular output type will result in turning off all the corresponding (usually, default) MDSIO or STDOUT output mechanisms. In other words, output defaults to being an exclusive selection. To enable multiple kinds of simultaneous output, flags of the form NAME_ioinc have been created where NAME corresponds to the various MNC output flags. When a NAME_ioinc flag is set to .TRUE., then multiple simultaneous forms of output are allowed for the NAME output mechanism. The intent of this design is that typical users will only want one kind of output while people debugging the code (particularly the I/O routines) may want simultaneous types of output.

This ``inclusive'' versus ``exclusive'' design is easily applied in cases where three or more kinds of output may be generated. Thus, it can be readily extended to additional new output types (eg. HDF5).

Input types are always exclusive.

6.15.1.3 MNC Output

While NetCDF files are supposed to be ``self-describing'', it is helpful to note the following:

  • The constraints placed upon the ``unlimited'' (or ``record'') dimension inherent with NetCDF v3.x make it very inefficient to put variables written at potentially different intervals within the same file. For this reason, MNC output is split into a few file ``base names'' which try to reflect the nature of their content.

  • All MNC output is currently done in a ``tile-per-file'' fashion since most NetCDF v3.x implementions cannot write safely within MPI or multi-threaded environments. This tiling is done in a global fashion and the tile numbers are appended to the base names described above. Some scripts to ``assemble'' output are available (MITgcm/utils/matlab). More general manipulations can be accomplished with the
    NetCDF Operators (or ``NCO'') at http://nco.sourceforge.net
    
    which is a very powerful and convenient set of tools for working with all NetCDF files.

  • On many systems, NetCDF has practical file size limits on the order of 2-4GB (the maximium memory addressable with 32bit pointers) due to a lack of operating system, compiler, and/or library support. In cases where this limit is reached, it is generally a good idea to reduce write frequencies or restart from pickups.

  • MNC does not (yet) provide a mechanism for reading information from a single ``global'' file as can be done with the MDSIO package. This is in progress.


next up previous contents
Next: 6.15.2 MNC Internals Up: 6.15 NetCDF I/O Integration: Previous: 6.15 NetCDF I/O Integration:   Contents
mitgcm-support@dev.mitgcm.org
Copyright © 2002 Massachusetts Institute of Technology