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

The files in this directory enable a user to create
a regular regional or global grid and associated 
land fraction and land mask given a high resolution
input topographic dataset. 

0) Download your required input data in some directory

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.

3) create namelist file (default mkgriddata.namelist).
   must specify settings for either

      mksrf_fnavyoro    - high resolution topo dataset        
      mksrf_lsmlon      - number of longitudes
      mksrf_lsmlat      - number of latitudes
      mksrf_edgen       - northern edge of grid (degrees)
      mksrf_edgee       - eastern edge of grid (degrees)
      mksrf_edges       - southern edge of grid (degrees)
      mksrf_edgew       - western edge of grid (degrees)
   or
      mksrf_fcamfile    - cam topo file
   or 
      mksrf_fccsmdom    - ccsm domain file
   or
      mksrf_fclmgrid    - clm grid or surface dataset file

   make sure datasets in namelist files point to where you
   have untarred your input data.

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

5) move (and rename if appropriate) generated  grid dataset
  (e.g. to /fis/cgd/csm/inputdata/lnd/clm/griddata)


Notes:

1. When using CCSM domain files, sometimes the latitude/longitudes on the domain files
   are slightly inconsistent with the existing clm grid datasets. To make the grid
   coordinates exactly the same as existing grid files, enter a mksrf_fclmgrid as
   well so that the latitudes/longitudes used will be from the clm grid file.
2. File naming conventions need explanation.  An input file from 1.9x2.5 will
   produce an output file of 096x144.  The output griddata file must be renamed to
   the FV naming convention (1.9x2.5) when it is archived under 
   /fs/cgd/csm/inputdata/lnd/clm2/griddata/.

e.g., cp surfdata_096x144.nc /fs/cgd/csm/inputdata/lnd/clm2/surfdata/surfdata_1.9x2.5_061130.nc

3.  Grid files should have LATIXY of 90 at the poles.  The displaced pole (89.*) 
    should not appear in FV grid files, although 90+/-0.25 is used for mapping and 
    domain files.  FV Grid files with something other than 90 at the poles are 
    incorrect and should not be used.

4.  Grid files should have Longitudes between 0.0 and 360.0 -- so that other files that
    use them will have a grids that are consistent and can be easily regridded etcetera.

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
  mkgriddata.ccsm_dom ----- Sample namelist reading in a CCSM domain file
  mkgriddata.namelist ----- Sample namelist for a global grid
  mkgriddata.regional ----- Sample namelist for a regional grid
  mkgriddata.singlept ----- Sample namelist for a single-point grid

