addavrg - sinotec2/CAMx_utility GitHub Wiki

Purpose

Due to regulatory requirements, air quality simulation results after the change of designated emissions must be calculated by the time must, before the grid by changing the simulation results and subtraction, it is necessary to establish a suitable tool. Theoretically the time of simulations begin, end must be consistent, however, this program can also accept a different start and end time, and only to those who have a common time, are additioned in order to maintain the flexibility of the program. In addition, the dimensions of 2 files, species names and order of data formats (endian) must be exactly the same in order to be summed. The program would not check if something different. It could cause erroneous reading and calculating.

Usage

FILE3 = FILE1 + FILE2     
addavrg FILE1 FILE2 FILE3    

Examples

Calculate the summation of 4G case and 4C case, repeat for 12 months:

for i in {01..12};do export a=con$i/10$i''4G'.S.grd02D'; export b=con$i/10$i''4C'.S.grd02D';export c=con$i/'4G4C.S.grd02D';addavrg $b $a $c ;done&

Versions

Current version of addavrg.f is edited in parallel form。

Notice

Since this version of addavrg does not screen specific time for certain type of material, such as delete night time for ozone calculations, so the results should be treated with special attention.
In case of the other time-structure such as 24-hour average or eight hours average value, no matter addition or time averaging is do first, the results will be the same (in accordance with the distributive and collective laws in linear mathematics).
However, if it is to take the maximum value, the order of these two operations on the result will make a big difference. In accordance with the regulations, two files must be added first, and then calculate the maximum.