models/lnd/clm/tools/mksurfdata/README		Mar/13/2008

The routines in this directory create a surface dataset.
The output grid is read in from the input namelist and
can correspond to either a global or regional grid (depending
on the setting of the namelist variables mksrf_gridtype).
The input grid file should have been generated by the 
mkgriddata tool.

The following steps provide a method to create the executable
and generate the surface dataset:

0) untar your input data

1) cd to this directory 

2) run gmake

NOTE: In order to successfully build, some source files are required from
      other clm src directories. See the Filepath for the expected path of
      required files.

      By default code compiles non-optimized so that you can use the debugger,
      and with bounds-checking, and float trapping on. To speed up do the following...

   gmake OPT=TRUE  

3) create namelist file :
   (sample namelists are: mksurfdata.namelist, mksurfdata.regional, or mksurfdata.singlept)

    ! ======================================
    ! Must specify settings for either:
    ! ======================================
    !    mksrf_fgrid
    ! ======================================
    ! Must specify settings for:
    ! ======================================
    !    mksrf_fvegtyp
    !    mksrf_fsoitex
    !    mksrf_fsoicol
    !    mksrf_flanwat
    !    mksrf_fglacier
    !    mksrf_furban
    !    mksrf_firrig
    !    mksrf_flai
    ! ======================================
    ! Optionally specify setting for:
    ! ======================================
    !    mksrf_gridtype  (default is 'global')
    !    mksrf_fdynuse
    !    outnc_large_files
    ! ======================================================================

   make sure the datasets in the namelist correspond to the full path of where
   you downloaded your input datasets.

   Sample namelists (using /fs/cgd/csm as the root location where inputdata was untarred) are:

   mksurfdata.namelist   ----- Standard global dataset
   mksurfdata.regional   ----- Regional dataset 
                               (assumes you ran the regional namelist for the mkgridata tool)
   mksurfdata.singlept   ----- Dataset for a single point
                               (assumes you ran the singlept namelist for the mkgridata tool)


4) run code (e.g.):
        mksurfdata < mksurfdata.namelist >&! mksurfdat.out

5) move (and rename if appropriate) generated surface dataset
   to /fis/cgd/csm/inputdata/lnd/clm/surfdata, etc.


Important files:

  Makefile ---------------- GNU makefile
  Srcfiles ---------------- List of source files needed (includes files outside this directory)
  Filepath ---------------- Filepath location to source files needed
  misc.h ------------------ CPP preprocess file required by outside source code
  preproc.h --------------- CPP preprocess file required by outside source code
  mksrfdat.fdynfile ------- Sample namelist to create a dynamic PFT surface dataset (PFT changes in time)
  mksurfdata.namelist ----- Samele global grid namelist
  mksurfdata.regional ----- Samele regional grid namelist
  mksurfdata.singlept ----- Samele single-point namelist

