readme_bart_v4.txt

program BART98_v4

This is a processor written by C. Machovec at the Colorado Department of 
Public Health & Environment for generating 98th percentile delta-decview 
values from CALPOST. Review the output files carefully, 
particularly the first time thru, to make sure the code really works 
for your application. Let me know if you find any errors. 
chuck.machovec@state.co.us

Instructions:
Step 1. run "calpost_BART98_v3.exe" or another modified version
   of CALPOST that outputs the file format shown at the end of
   this note (e.g.,the generic filename is "deciview24.dat")
Step 2. create a file named bart98_options.txt (see example file); 
   it should contain 3 variables on separate lines that specify 
   the species to process, the contribution threshold (or a user 
   specified threshold), and an answer about whether "method 2" 
   QA files should be generated.
      
   For Colorado's "subject-to-BART" modeling, the following example
   is recommended:
   ALL
   0.5
   n

   For Colorado's 5-step BART analysis degree of improvement modeling where 
   receptor-by-receptor differences should be quantified, the following example
   is recommended:
   ALL
   0.5
   y

   The options for each line are:
   For line1: ALL, SO4, NO3, EC, OC, PMC, PMF
   For line2: any 'contribution threshold' >0.0 dv
   For line3: 'y' or 'n' ('y' outputs receptor-by-receptor files
   from 'method2'; 'n' only outputs a summary report file with
   results for method1, method2a, and method2b.

Step 3. Run "BART98_v4.exe"
   (to make file management easier, the program will read the CALPOST.LST filename 
   from CALPOST and use it for naming output files)

Step 4. The output file "_dv_report_???.txt" contains summary results; the
   value of ??? = species name specified in bart98_options.txt.

 
Notes:1) The receptor type values from the deciview24.dat file are not used 
         by this program.
      2) If the maximum number of days to be processed exceeds 1826, 
         change "i_mdays" accordingly;
      3) It has not been designed or tested for gridded receptors;
         it has been assumed that discrete receptors are used and 
         that all receptors in the CALPOST run are for a single
         area of interest (e.g., a single Class I federal area).
      4) The entire number of days processed in CALPOST are used
         for calculating the 98th percentiles. If results for 
         only a single year are needed, then run CALPOST separately
         for each year.
      5) If you have year-by-year CALPOST deciview24.dat files 
         but you want 3-year results, append the deciview24.dat files
         for the 2nd and 3rd years to first year and execute BART98_v4.exe 
         with the deciview24.dat file that contains data for all 3 years or whatever; 
         remember to remove the headers from all but the first file. 

Guidance:
"Method 1" should be used for Colorado's "subject-to-BART modeling" 
"Method 2" should be used along with Method 1 for the 5-step BART technology 
analysis.


General methods:
     1. METHOD1: DAY-SPECIFIC 98TH PERCENTILE METHOD.
        For a given Class I area:
        a) Find the highest modeled delta-deciview value for EACH DAY 
           of the simulation from all modeled receptors 
        b) Then, from the distribution of modeled daily maximum values
           (irrespective of receptor location),determine the 98th percentile 
           value. For example, for a 365 day simulation, the 98th percentile
           value would be the "8th high" value (i.e., the top 7 days would be
           ignored, even though the values being ignored may be at different 
           receptors) or something close to the 8th high if a weighted 
           averaging method is used. 

     2. METHOD2: RECEPTOR-SPECIFIC 98TH PERCENTILE METHOD.
        For a given Class I area:
        a) Determine the 98th percentile value at each receptor from the 
           distribution of modeled daily delta-deciview values. This is 
           similar to the approach used for NAAQS and PSD increment modeling.
           For example, for a 365 day simulation, the 98th percentile value 
           for a single receptor would be the "8th high" value (i.e., the 
           top 7 days would be ignored) or something similar if a weighted 
           averaging method is used.
        b) Then, from all receptors, find the receptor with the highest 98th 
           percentile value. For example, for a 365 day simulation, use the 
           "high 8th high" value.

     In addition to the two general methods above that use different sets of 
     data to calculate the 98th percentile value, there are other calculation
     issues relevant to both methods. Specifically, the 98th percentile can 
     be a value extracted directly from the modeled values (e.g., the "closest 
     value", such as the 8th high value for a single year of modeling) or it 
     can be a calculated value using standard statistical techniques such as 
     the "Weighted Average at X[(n+1)p]" method. 
            
     In this code, results for both general methods 1 and 2 are generated.
     For both general method 1 and 2, the "closest" value is generated.
     In addition, for method 2, the "Weighted Average at X[(n+1)p]" approach
     is used.   

 --- The nth high value (jnth) is determined based on the
     number of days modeled. The "nth max" value is determined 
     using the method from 40 CFR 50 Appendix N 
     ("Interpretation of the National Ambient Air Quality Standards for PM2.5")
     for PM2.5 monitoring:

 --- In the EPA method, values are sorted in ascending order instead of 
     decending order as done here. Thus, while the 'closest value' would 
     usually be calculated with the following equation from a data set 
     in ascending order:
       n*P = i + d
               where mdays = number of values (e.g.,n=mdays)
                     p = percentile value divided by 100 = 98/100=0.98
                     i = integer part of "n*p"
                     d = decimal part of "np"
       Then, ignore the decimal part (d) of the value and add 1: i+1

       In this case, since this dataset is sorted in decending order, 
       the method above can be implemented as follows:
       jnth=n-(n*p) --- jnth=days-np
        days=float(mdays)
        np=ifix(days*0.98)
        jnth = mdays - np

This program reads a file named 'deciview24.dat' that contains
24hr delta-deciview data with the following format

            read(*) myr,mjday,irec,xrec,yrec,rdtype,deltadv
                    deltadv_so4,deltadv_no3,deltadv_oc,
                    deltadv_ec,deltadv_pmc,deltadv_pmf 
            format(i4,i6,3x,i8,1x,2f10.3,1x,a4,7f10.6)

            where ndrec=   number of receptors in CALPUFF simulation
                  myr=     year processed
                  mjday=   day processed
                  irec=    receptor number
                  xrec=    receptor x-coordinate
                  yrec=    receptor y-coordinate
                  rdtype=  receptor type
                  deltadv= 24-hour average delta-deciview values for ALL species 
                           processed in CALPOST
                  deltadv_???= 24-hour average delta-deciview values for each of
                           the component species that contribute to "ALL"
for example:

ROM-V.LST                                                             
CALPOST TITLE LINE1
CALPOST TITLE LINE2
CALPOST TITLE LINE3         
  3104
1996     6        196    -47.071   116.942   D   0.021086  0.013607  0.007270  0.000000  0.000000  0.000000  0.000209
1996     6        197    -44.240   116.925   D   0.025738  0.016610  0.008870  0.000000  0.000000  0.000000  0.000257
1996     6        198    -42.824   116.917   D   0.028151  0.018168  0.009701  0.000000  0.000000  0.000000  0.000282
1996     6        199    -38.577   116.895   D   0.036473  0.023541  0.012567  0.000000  0.000000  0.000000  0.000366
1996     6        200    -37.161   116.888   D   0.040095  0.025881  0.013810  0.000000  0.000000  0.000000  0.000404
etc
  
 