#!/bin/csh -f # # Version @(#)$Id: smk_pt_nctox.csh,v 1.5 2005/11/28 03:09:07 cseppan Exp $ # Path $Source: /afs/isis/depts/cep/emc/apps/archive/smoke/smoke/scripts/run/smk_pt_nctox.csh,v $ # Date $Date: 2005/11/28 03:09:07 $ # # This script sets up needed environment variables for processing point source # emissions in SMOKE and calls the scripts that run the SMOKE programs. # # Script created by : M. Houyoux, CEP Environmental Modeling Center # #********************************************************************* ## Set Assigns file name setenv ASSIGNS_FILE $SMKROOT/assigns/ASSIGNS.bsr.cmaq.cb4p25.36km_rpo.20081215 rm /usr/apps/edss/data/inventory/bsr/pnts.ncf rm /usr/apps/edss/data/inventory/bsr/pnts_dat/*.ncf ## Set source category setenv SMK_SOURCE P # source category to process setenv MRG_SOURCE P # source category to merge ## Set programs to run... ## Time-independent programs setenv RUN_SMKINVEN Y # run inventory import program setenv RUN_SPCMAT Y # run speciation matrix program setenv RUN_GRDMAT Y # run gridding matrix program ## Time-dependent programs setenv RUN_TEMPORAL Y # run temporal allocation program setenv RUN_ELEVPOINT N # run elevated/PinG sources selection program setenv RUN_LAYPOINT Y # run layer fractions program setenv RUN_SMKMERGE Y # run merge program ## Quality assurance setenv RUN_SMKREPORT N # run emissions reporting program ## Program-specific controls... ## For Smkinven setenv CHECK_STACKS_YN N # Y checks if stack parameters are missing or invalid setenv FILL_ANNUAL N # Y fills annual data with average-day data setenv FLOW_RATE_FACTOR 15878 # factor to calculate hourly flow rates from CEM data setenv HOURLY_TO_DAILY N # Y treats hour-specific input as day-specific data setenv HOURLY_TO_PROFILE N # Y treats hour-specific input as hour-specific temporal profiles setenv IMPORT_AVEINV_YN Y # Y imports annual inventory data setenv RAW_DUP_CHECK N # Y checks for duplicate records setenv SMK_BASEYR_OVERRIDE 0 # year to override the base year of the inventory setenv SMK_DEFAULT_TZONE 5 # default time zone for sources not in the COSTCY file #setenv SMK_NHAPEXCLUDE_YN Y # Y uses NHAPEXCLUDE file when integrating toxic sources #setenv SMKINVEN_FORMULA "PMC=PM10-PM2_5" # formula for computing emissions value setenv WEST_HSPHERE Y # Y converts longitudes to negative values setenv WKDAY_NORMALIZE N # Y treats average-day emissions as weekday only setenv WRITE_ANN_ZERO Y # Y writes zero emission values to intermediate inventory # DAY_SPECIFIC_YN see "Multiple-program controls" below # HOUR_SPECIFIC_YN see "Multiple-program controls" below # INVNAME1 set by make_invdir.csh script # INVNAME2 set by make_invdir.csh scripts # OUTZONE see "Multiple-program controls" below # SMK_MAXERROR see "Multiple-program controls" below # SMK_MAXWARNING see "Multiple-program controls" below # SMK_TMPDIR set by assigns/set_dirs.scr script # VELOC_RECALC see "Multiple-program controls" below ## For Grdmat # IOAPI_ISPH set by Assigns file ## For Spcmat setenv POLLUTANT_CONVERSION Y # Y uses the GSCNV pollutant conversion file # REPORT_DEFAULTS see "Multiple-program controls" below ## For Elevpoint setenv SMK_ELEV_METHOD 0 # 1 uses PELVCONFIG file to determine elevated sources setenv UNIFORM_STIME -1 # indicates day start time; -1 uses time zones # IOAPI_ISPH set by Assigns file # SMK_PING_METHOD see "Multiple-program controls" below ## For Temporal setenv RENORM_TPROF Y # Y normalizes the temporal profiles setenv UNIFORM_TPROF_YN N # Y uses uniform temporal profiles for all sources setenv ZONE4WM Y # Y applies temporal profiles using time zones # DAY_SPECIFIC_YN see "Multiple-program controls" below # HOUR_SPECIFIC_YN see "Multiple-program controls" below # OUTZONE see "Multiple-program controls" below # REPORT_DEFAULTS see "Multiple-program controls" below # SMK_AVEDAY_YN see "Multiple-program controls" below # SMK_MAXERROR see "Multiple-program controls" below # SMK_MAXWARNING see "Multiple-program controls" below # For Laypoint setenv FIRE_AREA 0. # daily area burned; only needed when processing fires setenv FIRE_HFLUX 0. # hourly heat flux; only needed when processing fires setenv FIRE_PLUME_YN N # Y uses fire-specific plume rise calculations setenv HOUR_PLUMEDATA_YN Y # Y reads hourly plume rise data from the PHOUR file setenv HOURLY_FIRE_YN N # Y reads fire data from the PTMP and PDAY files setenv REP_LAYER_MAX -1 # layer number for reporting high plume rise setenv SMK_SPECELEV_YN N # Y uses the PELV file to set elevated sources setenv VERTICAL_SPREAD 0 # sets the vertical spread method for plume heights # EXPLICIT_PLUMES_YN see "Multiple-program controls" below # IOAPI_ISPH set by Assigns file # SMK_EMLAYS see "Multiple-program controls" below # VELOC_RECALC see "Multiple-program controls" below ## For Smkmerge setenv MRG_LAYERS_YN Y # Y produces layered output setenv MRG_SPCMAT_YN Y # Y produces speciated output setenv MRG_TEMPORAL_YN Y # Y produces temporally allocated output setenv MRG_GRDOUT_YN Y # Y produces a gridded output file setenv MRG_REPCNY_YN N # Y produces a report of emission totals by county setenv MRG_REPSTA_YN N # Y produces a report of emission totals by state setenv MRG_GRDOUT_UNIT moles/s # units for the gridded output file setenv MRG_TOTOUT_UNIT moles/day # units for the state and county reports setenv SMK_ASCIIELEV_YN N # Y creates an ASCII elevated point sources file setenv SMK_REPORT_TIME 230000 # hour for reporting daily emissions # EXPLICIT_PLUMES_YN see "Multiple-program controls" below # SMK_AVEDAY_YN see "Multiple-program controls" below # SMK_EMLAYS see "Multiple-program controls" below # SMK_PING_METHOD see "Multiple-program controls" below ## For Smkreport setenv REPORT_ZERO_VALUES N # Y outputs entries with all zero values # Multiple-program controls setenv DAY_SPECIFIC_YN N # Y imports and uses day-specific inventory data setenv EXPLICIT_PLUMES_YN N # Y processes only sources using explicit plume rise setenv HOUR_SPECIFIC_YN Y # Y imports and uses hour-specific inventory data setenv OUTZONE 0 # time zone of output emissions setenv REPORT_DEFAULTS N # Y reports sources that use default cross-reference setenv SMK_EMLAYS 12 # number of emissions layers setenv SMK_AVEDAY_YN N # Y uses average-day emissions instead of annual emissions setenv SMK_MAXERROR 100 # maximum number of error messages in log file setenv SMK_MAXWARNING 100 # maximum number of warning messages in log file setenv SMK_PING_METHOD 0 # 1 processes and outputs PinG sources setenv VELOC_RECALC N # Y recalculates stack velocity using flow and diameter ## Script settings setenv SRCABBR pt # abbreviation for naming log files setenv QA_TYPE part1 # type of QA to perform [none, all, part1, part2, or custom] setenv PROMPTFLAG N # Y prompts for user input setenv AUTO_DELETE Y # Y automatically deletes I/O API NetCDF output files setenv AUTO_DELETE_LOG Y # Y automatically deletes log files setenv DEBUGMODE N # Y runs program in debugger setenv DEBUG_EXE pgdbg # debugger to use when DEBUGMODE = Y ## Assigns file override settings # setenv SPC_OVERRIDE cmaq.cb4p25 # chemical mechanism override # setenv YEAR_OVERRIDE # base year override # setenv INVTABLE_OVERRIDE # inventory table override ############################################################################## ## Run Smkinven, Spcmat, and Grdmat # setenv RUN_PART1 Y source $ASSIGNS_FILE # Invoke Assigns file # Reset NHAPEXCLUDE file to exclude all sources # This is needed for now because the stationary area criteria and non-point # toxics inventories are not consistent and should not be integrated. setenv NHAPEXCLUDE $INVDIR/other/nhapexclude.all.txt source smk_run.csh # Run programs source qa_run.csh # Run QA for part 1 setenv RUN_PART1 N ## Loop through days to run Temporal # setenv RUN_PART2 Y set cnt = 0 set g_stdate_sav = $G_STDATE while ( $cnt < $EPI_NDAY ) @ cnt = $cnt + $NDAYS source $ASSIGNS_FILE # Invoke Assigns file to set new dates source smk_run.csh # Run programs source qa_run.csh # Run QA for part 2 setenv G_STDATE_ADVANCE $cnt end setenv RUN_PART2 N unsetenv G_STDATE_ADVANCE ## Run Elevpoint # setenv RUN_PART3 Y setenv G_STDATE $g_stdate_sav setenv ESDATE `$IOAPIDIR/datshift $G_STDATE 0` source $ASSIGNS_FILE # Invoke Assigns file to set new dates source smk_run.csh # Run programs source qa_run.csh # Run QA for part 3 setenv RUN_PART3 N ## Loop through dats to run Laypoint and Smkmerge setenv RUN_PART4 Y set cnt = 0 while ( $cnt < $EPI_NDAY ) @ cnt = $cnt + $NDAYS source $ASSIGNS_FILE # Invoke Assigns file to set new dates source smk_run.csh # Run programs source qa_run.csh # Run QA for part 4 setenv G_STDATE_ADVANCE $cnt rm $SMKDAT/run_bsr/scenario/play.$ESDATE.1.36km_rpo.36km_rpo_bsr.ncf rm $SMKDAT/run_bsr/scenario/ptmp.bsr.$G_STDATE.ncf rm $SMKDAT/run_bsr/scenario/ptsup.bsr.$G_STDATE.txt end setenv RUN_PART4 N unsetenv G_STDATE_ADVANCE # ## Ending of script # exit( 0 )