avrg2grads - sinotec2/CAMx_utility GitHub Wiki
Transform 5-dimensional CAMx(UAM) unformatted file into GrADS unformatted 2-d binary file(one spec on one file) to generate the gridded data plots.
- avrg file name(eg. ROOT.S.grd), with all extension, case sensitive.
- species sequence number(if from *S.grd, they are: 1O3 2NO2 3SO2 4VOC 5PM25 6PM10 7PNO3 8PSO4)
- number of interval hours (1 for O3, 24 for PM's 720/744 for month average)
ROOTspecnam.ga (big_endian binary gridded data file for GrADS)
ROOTspecnam.ctl (grads control file)
-
slim
/shk
/dmavrg
/tmavrg
... etc preparation - for i in 5 6;do
avrg2grads
1309_Hs.S.grd02LD $i 24;done (for PM2.5 and PM10) -
grads
-p -b -c 'run XX.gs' (generate the png's) -
~/bin/monpm.cs
amn (amn=jan~dec) montage 4 in one page and merge into multipage pdf_file, OR - for i in {01..31};do -geometry +4+4 ??L$i"DEC2010.png" $i.pdf;done; pdf_all ?? dec_O3
- the resultant files: amn_spec.pdf (amn=jan~dec) (spec=O3,PM2.5, PM10 ...)
- color.gs cbar.gs
- TWN_COUNTY.dbf TWN_COUNTY.prj TWN_COUNTY.shp TWN_COUNTY.shx
Relative scripts
[kuang@master con09]$ cat ~/bin/monpm.cs
for sp in PM10 PM25;do
for n in {1..8};do
m=$(( n*4 ))
montage
-geometry +4+4 $(ls -rt *$sp".png" |head -n$m|tail -n4) $n".pdf"
done
pdf_all
? $1_$sp
done
montage
is a linux command of ImageMagick package.
pdf_all
Joint all the single page .pdf together to a volume pdf file.