dmavrg - sinotec2/CAMx_utility GitHub Wiki

###Objective
CAMx simulation outputs are in the architecture of hourly time-frame, but the air quality standards in the aerosol-related items are in the daily average time-frame. Also the model simulation guideline requires the day-averaged contour plots, so one need to carry out the simulation results as daily average. As for ozone, air quality standards do not regulate its daily average, but the daily maximum values, so this routine do more for ozone, marked as the last one species, the variable name is O3_DE (daily extreme).

Use

    dmavrg FILE

Result files

dmavrg execution result will produce a file, which name is FILED, is also [CAMx (UAM)] (https://github.com/sinotec2/camxruns/wiki/CAMx(UAM)%E7%9A%84%E6%AA%94%E6%A1%88%E6%A0%BC%E5%BC%8F) file format.

Usage examples

[Kuang @ master con09] $ pick 1009_bs.S.grd02
 1009_bs.S.grd02
 BEG & END jules: 10243 10273
 BEG & END dates: 100831 100930
 BEG & END times: 20 20
   120.9900 23.61000 0 -124500.0 -205500.0
   3000.000 3000.000
   120.9900 23.61000 0 -124500.0 -205500.0
   3000.000 3000.000 8313712
           0 10.00000 40.00000 0.0000000E + 00
   1O3 2NO2 3SO2 4VOC 5PM25 6PM10 7PNO3 8PSO4
[Kuang @ master con09] $ dmavrg 1009_bs.S.grd02
 1009_bs.S.grd02
 1009_bs.S.grd02D
 normal end
[Kuang @ master con09] $ pick 1009_bs.S.grd02D
 1009_bs.S.grd02D
 BEG & END jules: 10243 10273
 BEG & END dates: 100831 100930
 BEG & END times: 0 23
   120.9900 23.61000 0 -124500.0 -205500.0
   3000.000 3000.000
   120.9900 23.61000 0 -124500.0 -205500.0
   3000.000 3000.000 8313712
           0 10.00000 40.00000 0.0000000E + 00
   1O3D 2NO2D 3SO2D 4VOCD 5PM25D 6PM10D 7PNO3D 8PSO4D 9O3_DE

Parallelization

The current version of [dmavrg.f] (https://github.com/sinotec2/CAMx_utility/blob/master/dmavrg.f) has been edited in parallelized formulation.

Note

1. Insufficient of 24 hour values

If the single-batch simulation not starts and ends at 0:00 exactly, the daily average calculation will be wrong due to insufficient number of hours. Although the program has been considered in such of case, it precisely calculate the actual number of hours of the day as average denominator, however due to lack certain hour simulation results, the daily averages of begin or end days are still incorrect. Suggested remedy: first link all the simulation results to a annual-based file by using ([cbin] (https://github.com/sinotec2/CAMx_utility/blob/master/cbin_avrg.par.f)), then doing dmavrg. So one can eliminate this error.

2. File suffix confusion

Both the suffixes of dmavrg and depo results file names are fileD, but the deposition file name should contain .depn., and therefore will not cause confusion.