scripts/PTCLM/README                                            7/15/2010

PTCLM is a python tool built on top of CESM1.0 for running CLM "I" cases
for supported single-point grids, and for data from Ameriflux Tower-sites,
or other user-supplied single-point datasets.

Original Authors:

Daniel M. Ricciuto, Dali Wang, Peter E. Thornton, Wilfred M. Post

Environmental Sciences Division, Oak Ridge National Laboratory (ORNL)

R. Quinn Thomas

Cornell University

Modified by:

Erik Kluzek (NCAR)

General Directory structure:

  scripts/ccsm_utils/Tools/lnd/clm/PTCLM/PTCLM.py -------- Main script
  scripts/ccsm_utils/Tools/lnd/clm/PTCLM/PTCLM_sitedata  - Site data files of 
        static information latitude, longitude, soil info., and PFT information 
        for each site Also different "groups" of site-data lists, and the script to
        convert the transient years pftdyn files into pftdyn text files that
        mksurfdata can use.
  scripts/ccsm_utils/Tools/lnd/clm/PTCLM/usr_files ------- namelist template files
  scripts/ccsm_utils/Tools/lnd/clm/PTCLM/testcases.csh --- Test PTCLM script to run most
        configurations, input options, and compsets

Quickstart:

# ASSUMPTIONS:
# For this example I'm running the default ICN case on bluefire using  
# CSMDATA in the standard location
# For our case we will set MYCSMDATA=$HOME/inputdata (change as needed)
# Finally we use the 6-digit AmeriFlux site code for the University of Mich. Biological
# Station US-UMB (data for this station is checked into the inputdata repository).
# I also assume you are using UNIX C-shell, and GNU make is called gmake
setenv CSMDATA   /fis/cgd/cseg/csm/inputdata
setenv MYCSMDATA $HOME/inputdata
setenv SITE      US-UMB

# First link the standard input files to a location you have write access
cd scripts
./link_dirtree $CSMDATA $MYCSMDATA

# Next build all of the clm tools you will need
# NOTE: you do need to "gmake clean" between the mkgriddata and mksurfdata build
cd ../models/lnd/clm/tools/mksurfdata
gmake
gmake clean
cd ../mkdatadomain
gmake
gmake clean
cd ../mkgriddata
gmake
gmake clean

# Next copy the towersite meterology datafiles into your $MYCSMDATA space
# (For the US-UMB station you can skip this step as the .build step will bring the data over)

cd $MYCSMDATA/atm/datm7/CLM1PT_data
mkdir 1x1pt_$SITE
# Copy meteorology data NetCDF files into 1x1pt_$SITE sub-directory 
# (with filenames of yyyy-mm.nc)
# The variables assumed to be on the files are: 
#     ZBOT, TBOT, RH, WIND, PRECTmms, FSDS, PSRF, FLDS
# (if other fields are available or with different names this can be changed by
#  editing the streams file created after PTCLM.py is run)

# next run PTCLM (NOTE -- MAKE SURE python IS IN YOUR PATH)
cd ../../../../../scripts/ccsm_utils/Tools/lnd/clm/PTCLM
setenv MYCASE "testPTCLM"
./PTCLM.py -m bluefire --case=$MYCASE --site=$SITE --csmdata=$MYCSMDATA \
 --aerdepgrid --ndepgrid
# NOTE: --aerdepgrid --ndepgrid currently are required so that you use the global
# aerosol and Nitrogen deposition files rather than site-specific ones.

# Finally configure, build, and run the case as normal
cd ../../../../../$MYCASE
./configure -case
./$MYCASE.bluefire.build
./$MYCASE.bluefire.submit (or use the $MYCASE.run script to run interactively)
