davrg - 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. In theory 2 times the simulation begins, ends, and 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 subtracted 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 subtracted. The program would not check if something different. It could cause erroneous reading and calculating.
###Usage
FILE3 = FILE1 - FILE2
davrg FILE1 FILE2 FILE3
###Examples
Calculate the difference between 4G case and background(Hs), repeat for 12 months:
for i in {01..12};do export a=con$i/10$i''Hs'.S.grd02D'; export b=con$i/10$i''4G'.S.grd02D';export c=con$i/'4G.S.grd02D';
davrg
$b $a $c ;done&
Doing deviations of incremental from background concentration(Hs) for 4G/6C4G cases in spring season:
$ for i in 4G 6C4G Hs;do mv MAM_$i.S.grd02L MAMbN2_$i.S.grd02L;done !rename firstly, let the names be with "b" respect to backgrounds.
$ for i in 4G 6C4G;do davrg
MAMbN2_$i.S.grd02L MAM_Hs.S.grd02L MAM_$i.S.grd02L;done
$ davrg
MAM_6C4G.S.grd02L MAM_4G.S.grd02L MAM_6C.S.grd02L !6C = 6C4G - 4G
###Versions
Current version of davrg0.par.f is edited in parallel form。
###Notice
Since this version of davrg
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 subtracting or time averaging is do first, the results will be the same (in accordance with the distributive and collective laws in 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 subtracted first, and then calculate the maximum.