# beo_assim configuration file
# Version 08/24/05
# Assuming a 6-hour forecast cycle, this sample config file puts
# the results of the assimilation in a directory of the form d$ATIME,
# and it looks for the forecast sigma files in a directory of the
# form d($ATIME-6), where $(ATIME-6) means the analysis time minus 6
# hours.  The value 6 is changeable and is specified by fcsttime, below.
# To start an analysis cycle, specify ATIME to be 0, which causes us
# to look for appropriate startup files at starttime, which is specified in the
# format yyyymmddhh.
#
# Strings containing a dollar sign must be placed in single quotation marks.
# Otherwise, quotation marks are optional.
# Exception: the aliases for scriptdir and exedir don't require quoting
# as long as they are constant names that can be expanded at startup.
#
# A "template name" is a file containing the string "%n".  Such files are
# used to index the individual ensemble solutions: %n is replaced by an
# integer from 1 to NSOL, the ensemble size.

#  Where we put the results of this run.
#  The name MUST depend on the analysis time ATIME.
RESULTDIR='/raid3/ejk/results/2004model/tests20n15/d$ATIME'

#  The version of the GFS that we want to use; must be 2001 or 2004 for now
MODEL=2004

#  Number of ensemble solutions.
NSOL=40

#  Verbosity level: 0=silence, 1=brief, 2=chatty; override with -v
VERBLEV=0

#  Nodes to use for the data assimilation.  This list also governs
#  the nodes used to run forecasts: the number of processors used 
#  depends on NSOL and PROCLIST, NOT on NPROC!
PROCLIST=2-11

#  Number of processors for data assimilation.  We may use more processors
#  than this for forecasts!
NPROC=20

#  Longitude radius of grid patch
XWIDTH=3

#  Latitude radius of grid patch
YWIDTH=3

#  Vertical localization data file; leave blank if no vertical localization
#  is desired.  This file must be located in the parent of RESULTDIR.
ZRAD=zrad.dat

#  the sigma file from which we copy the unassimilated values:
#  "nature" from the nature run, and "background" from the last forecast file.
unassim_sigma="background"

#  directory where the required executables are kept
scriptdir=$HOME/lekf/3de/scripts
exedir=$HOME/lekf/3de

#  Default starting date (what we get when 0 is specified)
starttime=2004010100              # starting time for nature run

#  Forecast time (hours)
fcsttime=6

#  Observation directory - "real fake" data from nature run
#OBSDIR=/raid2/gygy/realfake_newmodel.filambda
OBSDIR='$HOME/lekf/3de'

#  Intermediate observation files
#obsfile='$OBSDIR/real_fake_obs.$ATIME'
obsfile='temp.obs'

#  List of observation types to be assimilated.
#  Must be taken from PTUV for surface pressure, virtual temperature,
#  and u- and v-wind components, respectively.
OBSTYPE='PTUV'

#  Observation consistency checks, if any.  Valid options are
#  "none", "whitaker" (for Jeff Whitaker's criterion) or
#  "observation".  In the latter case, we assimilate an observation 
#  provided that its value is within 5 times the maximum of the obs std error
#  and the ensemble std error at the observation location.
obs_consistency_check='observation'

#  Observation temperature units.  The data assimilation program default is
#  Kelvin.
OBS_TEMP_UNITS='K'  # "real fake" data is in K

#  The initial condition at starttime may be defined by sigma files,
#  in which case startsigma should be nonblank, or by physical grid
#  perturbation files, in which startphys should be nonblank.
#  Each should be an absolute pathname and a template filename, and
#  only one should be nonblank.
startsigma='/raid2/ejk/2004climo/pnew%n.00'

#startphys='/raid/szunyogh/perturbations/pert.$starttime.%n'

#  Digital filter parameter (for GFS).  Set to 0.0 to turn it off.
digifilt=3.0   # 3-hr filtering window

#
#  Nature run/NCEP surface file directory, if any (2001 nature run here)
NRDIR='/raid/szunyogh/nature2004'

#  Surface files from the nature run or the NCEP surface analysis files
#  as appropriate.  If sfc (below) is blank, then these are used at
#  each time step.  If sfc is nonblank, then these are used only at startup,
#  and we use the background surface files at time steps after the initial
#  one.  Note: the sfcanl files in /raid/szunyogh/initdat2000 are the 
#  operational surface analysis files and have nothing to do with the 
#  perfect model nature run!
#
naturesfc='$NRDIR/nrsfc.$ATIME'

#  Sigma files from the nature run.  Leave blank when there is no nature run.
truesigma='$NRDIR/nr.$ATIME'

#  "Reference" sigma file from which we get conversion coefficients on startup
refsig='$NRDIR/nr.$starttime'

#  The template name (if any) to use for surface analyses generated from
#  the background.  If blank, then we use the nature run surface files.
#  Results generated from the background go into RESULTDIR.
#  Files of this form are suffixed with the forecast time (to indicate
#  background files) and with .00 to indicate initial conditions, as
#  appropriate, for the GFS.
#  sfc='sfcanl%n'
sfc=

#  Sigma files are template names and are indexed by the ensemble member.
#  The scripts add the appropriate hh suffix.
#  These files go into RESULTDIR.
#  For example, $RESULTDIR/$sigma.00 is the initial condition at ATIME
#  (after the data assimilation step) and $RESULTDIR/$sigma.06 would
#  be a 6-hour forecast from $sigma.  The %n causes the assimilation software
#  to index each sigma file by ensemble member; the forecast and initial
#  condition files for ensemble member K are the name given in $sigma with
#  %n replaced by K, K=1,..,NSOL.
sigma='pnew%n'

#  Flux output filenames are template names and are indexed by ensemble member.
#  The scripts add the appropriate hh suffix.
#  These files go into RESULTDIR.
#flux='sfluxgrbf%n'
flux=

#  GFS logfile names are template names and are indexed by ensemble member.
#  These files go into RESULTDIR.
gfslog='gfslog.%n'

#  The ensemble mean, if any.  (Leave blank if no mean is desired.)
#  These files go into RESULTDIR.
sigma_mean='sigan.$ATIME'
grib_mean='pgban.$ATIME'

#  Outputs from assimilation that we want to keep
#  Diagnostics file, if any (leave blank if no diagnostics are desired).
#  This file goes into RESULTDIR.
diag='diag.$ATIME'

#  Assimilation log file basename.  These files go into RESULTDIR.
log='log'

#  Error log file basename; goes into RESULTDIR.
errlog='errlog'

#  Model grid file.  Leave blank except when debugging.  Goes into RESULTDIR.
debug_egrid_out=

#  Scratch directory on nodes
SCRATCHDIR=/scratch/$USER

#  Physical grid data from nature run, if any; otherwise leave blank.
#  This file goes into RESULTDIR.
natgrid='natgrid'

#  Physical grid data, which are temporary files for the data assimilation.
#  These files go into RESULTDIR.
egrid='egrid'
egrid_out='egrid.out'
yobs='yobs'

#  Basename of Beowulf cluster nodes
NODE=node

#  Number of processors per node
procpernode=2

#  Sequence id: helps keep egrid/yobs/analysis files consistent; 
#  override with -q
SEQID=0

#  Error threshold: if more than ERRTHRESH of the patches have assimilation
#  errors at a given time step, then halt the run.
#
ERRTHRESH=0.95
