CAM.in之內容與產生(gen.cs)
Table of contents
背景
(一) CAMx模式的控制檔案
CAMx模式為一常用的網格模式,發展迄今已達7.00版本。由於網格模式涉及輸入、輸出檔案繁多,模式控制參數與機制選項也多,因此有一主控檔,以控制模式的進行,在CAMx為一固定名稱之文字檔,其名稱即為CAMx.in,其內容詳見CAMx模式使用手冊。 由於控制檔為集所有前處理之大成,同時以為後處理之預備動作,因此是整體模式系統的核心,也是掌握模式的鑰匙。 大略上CAMx.in分為7大段落,包括執行控制、時鐘控制、地圖投影、網格系統(各巢狀網格)、模式選項、輸出設定、輸入檔案等。
#$ cat CAMx.in
&CAMx_Control
Run_Message = 'CAMx 7.00 Test Problem -- CB6R4 CF SOAP 20160610',
!--- Model clock control ---
Time_Zone = -8, ! (0=UTC,5=EST,6=CST,7=MST,8=PST)
...
!--- Map projection parameters ---
Map_Projection = 'LAMBERT', ! (LAMBERT,POLAR,RPOLAR,MERCATOR,LATLON,UTM)
...
!--- Parameters for the master (first) grid ---
Number_of_Grids = 1,
...
!--- Parameters for the second grid ---
Nest_Meshing_Factor(2) = 3, ! Cell size relative to master grid
...
!--- Model options ---
Diagnostic_Error_Check = .false., ! True = will stop after 1st timestep
...
!--- Output specifications ---
Root_Output_Name = 'outputs/con10/1610baseE',
...
!--- Input files ---
Chemistry_Parameters = './inputs/chem/CAMx7.0.chemparam.CB6r4_CF2',
...
/
(二) 目標
由於每月執行CAMx、或執行各排放方案,都需要修改CAMx.in檔案,因此如何系統化進行修改、由程式自行產生CAMx.in等構想,為一合理且必要的方式。
(三) 解決方案
使用vi逐一修改每月份之CAMx.in 可參考文書編輯器vim 須反復檢查,以避免編輯錯誤 使用bash替代CAMx.in 模版中的月份(gen.cs) 各排放方案個自有自己的目錄,不致混淆 只需修改排放模版即可,一次確認模版正確即可 使用RAMBOL environ提供的csh 腳本 同時修改排放、時間等所有設定 類似cmaq執行方式,有一致性 (未應用)
二、各段落內容說明
CAMx.in 每段落以!—XXX隔開,每行以=隔開,!—後之文字、=左方之文字皆為reserved keywords,在程式碼內規範,不接受臨時性之更動。
(一)執行控制
起、迄之檔案前綴詞 按照工作站平台略有不同。 以centos而言,為&CAMx_Control及’/’,須視平台及編譯軟體而定。 執行訊息說明文字
&CAMx_Control
Run_Message = 'CAMx 7.00 Test Problem -- CB6R4 CF SOAP 20160610',
(二)時鐘控制
Time_Zone:計算時間之基準。uamiv檔案之檔頭、nc檔之屬性,皆須完全一致 Restart:true表示是由前一模擬的結果繼續執行,不更新污染物(包括radical)濃度(warm start),所有模擬項目由inst、finst檔案提供。false表示是全新的模擬,radical 由模式自行平衡產生,(少數)穩定化合物濃度由ic提供。 Start_Date_Hour /End_Date_Hour:起迄日期時間,詳下述。 timestep :大範圍、長時間模擬可以適度放寬,降低細節、提高效率。 frequencies:與提供檔案一致。
!--- Model clock control ---
Time_Zone = -8, ! (0=UTC,5=EST,6=CST,7=MST,8=PST)
Restart = .true.,
Start_Date_Hour = 2016,07,31,2000, !
End_Date_Hour = 2016,08,31,2000, !
Maximum_Timestep = 15., ! minutes
Met_Input_Frequency = 60., ! minutes
Ems_Input_Frequency = 60., ! minutes
Output_Frequency = 60., ! minutes
(三)地圖投影
須與uamiv檔案之檔頭、nc檔之屬性內容完全一致,至小數至少4位。 UTM_Zone即使沒有必要仍需保留 地圖投影的考量 在排放模式、氣象模式等均須保持一致 範圍越大、直角座標系統在邊界上的誤差會越大
!--- Map projection parameters ---
Map_Projection = 'LAMBERT', ! (LAMBERT,POLAR,RPOLAR,MERCATOR,LATLON,UTM)
UTM_Zone = 0,
Longitude_Pole = 120.9900, ! deg (west<0,south<0)
Latitude_Pole = 23.61000, ! deg (west<0,south<0)
True_Latitude1 = 10., ! deg (west<0,south<0)
True_Latitude2 = 40., ! deg (west<0,south<0, can = True_Latitude1)
(四)網格系統(各巢狀網格)
單位為格數、公里 格點數須符合傳統3n+2規則 氣象、排放、臭氧柱等檔案之格點數須一致
!--- Parameters for the master (first) grid ---
Number_of_Grids = 1,
Master_SW_XCoord = -124.500, ! km or deg, SW corner of cell(1,1)
Master_SW_YCoord = -205.500, ! km or deg, SW corner of cell (1,1)
Master_Cell_XSize = 3., ! km or deg
Master_Cell_YSize = 3., ! km or deg
Master_Grid_Columns = 83,
Master_Grid_Rows =137,
Number_of_Layers = 15,
!--- Parameters for the second grid ---
Nest_Meshing_Factor(2) = 3, ! Cell size relative to master grid
Nest_Beg_I_Index(2) = 20, ! Relative to master grid
Nest_End_I_Index(2) = 40, ! Relative to master grid
Nest_Beg_J_Index(2) = 20, ! Relative to master grid
Nest_End_J_Index(2) = 40, ! Relative to master grid
Nest_Meshing_Factor(3) = 27, ! Cell size relative to master grid
Nest_Beg_I_Index(3) = 29, ! Relative to master grid
Nest_End_I_Index(3) = 31, ! Relative to master grid
Nest_Beg_J_Index(3) = 28, ! Relative to master grid
Nest_End_J_Index(3) = 32, ! Relative to master grid
(五)模式選項
PiG_Submodel耗費時間非常多 7版之Chemistry 無法關閉
Ignore_Emission_Dates:是→至少需24小時之變化,否→逐時、逐日之變化。
!--- Model options ---
Diagnostic_Error_Check = .false., ! True = will stop after 1st timestep
Flexi_Nest = .true., ! True = expect flexi-nested inputs
Advection_Solver = 'PPM', ! (PPM,BO20)
Chemistry_Solver = 'EBI', ! (EBI,LSODE)
PiG_Submodel = 'None', ! (None,GREASD,IRON)
Probing_Tool = 'None', ! (None,SA,31M,HDDM,PA,IPR,IRR,RTRAC,RTCMC)
Chemistry = .true.,
Drydep_Model = 'ZHANG03', ! (None,WESELY89,ZHANG03)
Bidi_NH3_Drydep = .false.,
Wet_Deposition = .true.,
ACM2_Diffusion = .false.,
Surface_Model = .false.,
Inline_Ix_Emissions = .true.,
Super_Stepping = .true.,
Gridded_Emissions = .true.,
Point_Emissions = .true.,
Ignore_Emission_Dates = .false.,
(六)輸出設定
輸出檔案的路徑及主檔名,輸出檔案將會在第1附加(性質、屬性)與第2附加檔名(巢狀網格層數)有差異。
Average_Output_3D:是→輸出地面高空結果,否→只輸出地面
NetCDF_Format_Output:是→直接輸出NC檔,否→輸出uamiv檔案,須再轉換格式。
Output_Species_Names:可選擇反應機制內之化學物質進行輸出。序號須保持一致。
!--- Output specifications ---
Root_Output_Name = 'outputs/con08/1608baseG',
Average_Output_3D = .false.,
NetCDF_Format_Output = .false.,
NetCDF_Use_Compression = .false.,
Output_Species_Names(1) = 'NO',
Output_Species_Names(2) = 'NO2',
Output_Species_Names(3) = 'O3',
...
Output_Species_Names(41) = 'HNO3',
Output_Species_Names(42) = 'CO',
(七)輸入檔案
分為3個小段落 參數、ICBC、RESTART、及高空排放(僅有master grid 一層) 氣象檔案:由wrfcamx程式自wrf轉出。(早期mm5亦有mm5camx程式)。按照層數提供。 地面排放檔案:按照類別及層數提供
!--- Input files ---
Chemistry_Parameters = './inputs/chem/CAMx7.0.chemparam.CB6r4_CF2',
Photolyis_Rates = './inputs/tuv/tuv4.8.camx7.00/tuv.do_CB6.160801.d4',
Ozone_Column = './inputs/toms/o3map.20160801.d4',
Initial_Conditions = './ICBC/bndextr_d2/base.grd02.1608.ic',
Boundary_Conditions = './ICBC/bndextr_d2/base.grd02.1608.bc',
Point_Sources(1) = '/data/TEDS/teds10_camx/HourlyWeighted/ptse/fortBE.413_teds10.ptsE08.nc',
Master_Grid_Restart = 'outputs/con07/1607baseG.inst',
Nested_Grid_Restart = 'outputs/con07/1607baseG.finst',
PiG_Restart = 'outputs/con07/1607baseG.pig',
Surface_Grid(1) = 'met/1608d4.lu',
Met3D_Grid(1) = 'met/1608d4.3d',
Met2D_Grid(1) = 'met/1608d4.2d',
Vdiff_Grid(1) = 'met/1608d4.kv.OB70',
Cloud_Grid(1) = 'met/1608d4.cr',
Emiss_Grid(1,1) = '/data/TEDS/teds10_camx/HourlyWeighted/area/CNTYs/fortBE.413_teds10.area08J.nc',
Emiss_Grid(1,2) = '/data/TEDS/teds10_camx/HourlyWeighted/area/CNTYs/fortBE.413_teds10.area08Q.nc',
Emiss_Grid(1,3) = '/data/TEDS/teds10_camx/HourlyWeighted/area/CNTYs/fortBE.413_teds10.area08Y.nc',
Emiss_Grid(1,4) = '/data/TEDS/teds10_camx/HourlyWeighted/area/CNTYs/fortBE.413_teds10.area08Z.nc',
Emiss_Grid(1,5) = '/data/TEDS/teds10_camx/HourlyWeighted/line/CNTYs/fortBE.413_teds10.line08J.nc',
Emiss_Grid(1,6) = '/data/TEDS/teds10_camx/HourlyWeighted/line/CNTYs/fortBE.413_teds10.line08Q.nc',
Emiss_Grid(1,7) = '/data/TEDS/teds10_camx/HourlyWeighted/line/CNTYs/fortBE.413_teds10.line08Y.nc',
Emiss_Grid(1,8) = '/data/TEDS/teds10_camx/HourlyWeighted/line/CNTYs/fortBE.413_teds10.line08Z.nc',
Emiss_Grid(1,9) = '/data/TEDS/teds10_camx/HourlyWeighted/ship/fortBE.413_teds10.51A_08.nc',
Emiss_Grid(1,10)= '/data/TEDS/teds10_camx/HourlyWeighted/biog/fortBE.413_teds10.biog08.nc',
Emiss_Grid(1,11)= '/data/TEDS/teds10_camx/HourlyWeighted/ptse/fortBE.413_teds10.ptsG08.nc',
/
三、gen.cs程式設計重點
(一)程式邏輯
由於架構上使用每月之執行頻率,因此各輸入、輸出檔案以每月合併、儲存最為合理,只要修改模版的月份數字即可。 此處修改方式以sed進行。
(二)各月份起泣時間之設定
- 每個個案最重要的就是起迄日期、時間的設定。
- 體總
- 起始須符合ic時間、或restart file的時間,結束時間則為下一執行批次的起始時間
- 開始、結束日期時間皆為表列時間sharp,不含任何time step 或delta time。
- 日期
- 模擬期間須在檔案時間範圍之內
- 此處以每月前一日到最後一日止
- 時間
- CAMx未屆定是UTC或LST,有提供Time_Zone供校正。
- 在CAMx模式並沒有規定一定要從0時或幾時開始,但從日出後執行,模式會不穩定,建議還是從夜間開始為宜。
- 此處以2000時開始、結束
- 為避免呼叫其他非標準程式,此處以date之應用為主。(line 2~10)
#$ cat -n gen.cs
1 for MM in {01..12};do
2 nextM=$(date -d "2016${MM}01 +31day" +%m)
3 nextY=$(date -d "2016${MM}01 +31day" +%Y)
4 YY=$(date -d "$nextY${nextM}01 -1day" +%y)
5 DD=$(date -d "$nextY${nextM}01 -1day" +%d)
6 TT=20
7 BY=$(date -d "2016${MM}01 -1day" +%y)
8 BM=$(date -d "2016${MM}01 -1day" +%m)
9 BD=$(date -d "2016${MM}01 -1day" +%d)
10 BT=20
11 RESTART=true
12 #split to 4 machines:
13 a=$(( (10#$MM - 1)*(10#$MM - 4)*(10#$MM - 7)*(10#$MM - 10) ))
14 # a=$(( (10#$MM - 1) ))
15 if [ $a -eq 0 ];then
16 RESTART=false
17 fi
18 echo $BY$BM$BD$BT $YY$MM$DD$TT
19 cp CAMxR.in.loop CAMx.in_$MM
20 for cmd in "s/MM/"$MM/ "s/DD/"$DD/ "s/TT/"$TT/ \
21 "s/BM/"$BM/ "s/BM/"$BM/ "s/BD/"$BD/ "s/BT/"$BT/ \
22 "s/YY/"$YY/ "s/BY/"$BY/ \
23 "s/RESTART/"$RESTART/ \
24 "s/YY/"$YY/ "s/MM/"$MM/ ;do
25 sed -i $cmd CAMx.in_$MM
26 done
27 done
28 exit 0
(三) RESTART之設定(line 11~17)
模式的初始條件對模擬第1日有嚴重的影響,其後的影響程度則會隨時間減少。 不論其影響程度,如果是系統化的處理方式,排放方案的模擬結果之間會有一樣比例的差異,是線性的。 此處應用連乘值為0來判斷整數(月份)之值,以便在每機器上可以以1、4、7、10月份起始(cold start)、其餘月份則為(warm) restart。
四、C shell run.job
此處以RAMBOL environ所提供的執行腳本進行說明
- (一) 執行檔、記憶體、CPU等計算資源之分配與設定(line 5~9)
- (二)設定輸出檔案主檔名及檔案目錄(line 11~15)
- (三)執行批次迴圈(日期)(23~167)
- 產生起迄時間與RESTART flags(24~32)
- 產生CAMx.in檔案(36~160)
- 執行CAMx程式(164~166)
#kuang@centos8 /airapp/camxruns/testcase/runfiles
#$ cat -n run.job
1 #!/bin/csh
2 #
3 # CAMx v6.50
4 #
5 setenv OMP_NUM_THREADS 4
6 setenv MPSTKZ 128M
7 limit stacksize unlimited
8 # CAMx User's Guide Version 6.50 2. The CAMx Modeling System
9 set EXEC = "../../src/camx650/CAMx.v6.50.noMPI.gfortranomp"
10 #
11 set RUN = "v6.50.midwest.36.12.noMPI"
12 set INPUT = "../inputs"
13 set MET = "../inputs/met"
14 set EMIS = "../emiss"
15 set PTSRCE = "../ptsrce"
16 set OUTPUT = "../outputs"
17 #
18 mkdir -p $OUTPUT
19 #
20 # --- set the dates and times ----
21 #
22 set RESTART = "NO"
23 foreach today (03.154 04.155)
24 set JUL = $today:e
25 set CAL = $today:r
26 set YESTERDAY = `echo ${CAL} | awk '{printf("%2.2d",$1-1)}'`
27 #
28 if( ${RESTART} == "NO" ) then
29 set RESTART = "false"
30 else
31 set RESTART = "true"
32 endif
33 #
34 # --- Create the input file (always called CAMx.in)
35 #
36 cat << ieof > CAMx.in
37 &CAMx_Control
38 Run_Message = 'CAMx 6.50 Test Problem -- CB05 CF ISORROPIA $RUN',
39 !--- Model clock control ---
40 Time_Zone = 0,
41 Restart = .${RESTART}.,
42 Start_Date_Hour = 2002,06,${CAL},0000,
43 End_Date_Hour = 2002,06,${CAL},2400,
44 ! (0=UTC,5=EST,6=CST,7=MST,8=PST)
45 ! (YYYY,MM,DD,HHmm)
46 ! (YYYY,MM,DD,HHmm)
47 Maximum_Timestep = 15., ! minutes
48 Met_Input_Frequency = 60., ! minutes
49 Ems_Input_Frequency = 60., ! minutes
50 Output_Frequency = 60., ! minutes
51 !--- Map projection parameters ---
52 Map_Projection = 'LAMBERT', ! (LAMBERT,POLAR,UTM,LATLON)
53 Longitude_Pole = -97.,
54 Latitude_Pole = 40.,
55 True_Latitude1 = 45.,
56 True_Latitude2 = 33.,
57 ! deg (west<0,south<0)
58 ! deg (west<0,south<0)
59 ! deg (west<0,south<0)
60 ! deg (west<0,south<0)
61
62 !--- Parameters for the master (first) grid ---
63 Number_of_Grids = 2,
64 Master_SW_XCoord = -792.,
65 Master_SW_YCoord = -1656.,
66 Master_Cell_XSize = 36.,
67 Master_Cell_YSize = 36.,
68 ! km or deg, SW corner of cell(1,1)
69 ! km or deg, SW corner of cell (1,1)
70 ! km or deg
71 ! km or deg
72 Master_Grid_Columns = 68,
73 Master_Grid_Rows = 68,
74 Number_of_Layers = 16,
75 !--- Parameters for the second grid ---
76 Nest_Meshing_Factor(2) = 3,
77 Nest_Beg_I_Index(2) = 22,
78 Nest_End_I_Index(2) = 51,
79 Nest_Beg_J_Index(2) = 22,
80 Nest_End_J_Index(2) = 58,
81 ! Cell size relative to master grid
82 ! Relative to master grid
83 ! Relative to master grid
84 ! Relative to master grid
85 ! Relative to master grid
86 ! True = will stop after 1st timestep
87 ! (PPM,BOTT)
88 ! (EBI,LSODE)
89 ! (None,GREASD,IRON)
90 ! (None,SA,DDM,HDDM,PA,IPR,IRR,RTRAC,RTCMC)
91 ! (None, WESELY89, ZHANG03)
92 !--- Model options ---
93 Diagnostic_Error_Check = .false.,
94 Advection_Solver = 'PPM',
95 Chemistry_Solver = 'EBI',
96 PiG_Submodel = 'None',
97 Probing_Tool = 'None',
98 Chemistry = .true.,
99 Drydep_Model = 'WESELY89',
100 Wet_Deposition = .true.,
101 ACM2_Diffusion = .false.,
102 Surface_Model = .false.,
103 Super_Stepping = .true.,
104 Gridded_Emissions = .true.,
105 Point_Emissions = .true.,
106 Ignore_Emission_Dates = .true.,
107 !--- Output specifications ---
108 Root_Output_Name = '$OUTPUT/CAMx.$RUN.200206${CAL}',
109 NetCDF_Format_Output = .false.,
110 Average_Output_3D = .false.,
111 Output_Species_Names(1) = 'NO',
112 Output_Species_Names(2) = 'NO2',
113 Output_Species_Names(3) = 'O3',
114 Output_Species_Names(4) = 'SO2',
115 Output_Species_Names(5) = 'H2O2',
116 Output_Species_Names(6) = 'HNO3',
117 Output_Species_Names(7) = 'NH3',
118 Output_Species_Names(8) = 'PNO3',
119 Output_Species_Names(9) = 'PSO4',
120 Output_Species_Names(10) = 'PNH4',
121 Output_Species_Names(11) = 'POA',
122 Output_Species_Names(12) = 'PEC',
123 Output_Species_Names(13) = 'FPRM',
124 Output_Species_Names(14) = 'CPRM',
125 Output_Species_Names(15) = 'CCRS',
126 Output_Species_Names(16) = 'FCRS',
127 Output_Species_Names(17) = 'SOA1',
128 Output_Species_Names(18) = 'SOA2',
129 Output_Species_Names(19) = 'SOA3',
130 Output_Species_Names(20) = 'SOA4',
131 Output_Species_Names(21) = 'SOA5',
132 !--- Input files ---
133 Chemistry_Parameters = '$INPUT/CAMx6.5.chemparam.CB05_CF_SOAP_ISORROPIA',
134 Photolysis_Rates = '$INPUT/tuv.200206.STL.txt',
135 Ozone_Column = '$INPUT/o3col.200206.STL_36_68X68_12_92X113.txt',
136 Initial_Conditions = '$INPUT/IC.vistas_2002gt2a_STL_36_68X68_16L.2002081',
137 Boundary_Conditions = '$INPUT/BC.vistas_2002gt2a_STL_36_68X68_16L.2002${JUL}',
138 Top_Concentrations = ' ',
139 Point_Sources = '$PTSRCE/ptsrce.stl.36km.2002${JUL}.a0.bin',
140 Master_Grid_Restart = '$OUTPUT/CAMx.$RUN.200206${YESTERDAY}.inst',
141 Nested_Grid_Restart = '$OUTPUT/CAMx.$RUN.200206${YESTERDAY}.finst',
142 PiG_Restart = ' ',
143 Srfmod_Grid(1) = ' ',
144 Srfmod_Grid(2) = ' ',
145 Flexi_Nest = .false.
146 Emiss_Grid(1) = '$EMIS/emiss.stl.36km.200206${CAL}.a1.bin',
147 Surface_Grid(1) = '$INPUT/met/camx.lu.36k.bin',
148 Met2D_Grid(1) = '$INPUT/met/camx.2d.200206${CAL}.36k.bin',
149 Met3D_Grid(1) = '$INPUT/met/camx.3d.200206${CAL}.36k.bin',
150 Vdiff_Grid(1) = '$INPUT/met/camx.kv.200206${CAL}.36k.bin',
151 Cloud_Grid(1) = '$INPUT/met/camx.cr.200206${CAL}.36k.bin',
152 Emiss_Grid(2) = '$EMIS/emiss.stl.12kmsmall.200206${CAL}.a1.bin',
153 Surface_Grid(2) = '$INPUT/met/camx.lu.12ksmall.bin',
154 Met2D_Grid(2) = '$INPUT/met/camx.2d.200206${CAL}.12ksmall.bin',
155 Met3D_Grid(2) = '$INPUT/met/camx.3d.200206${CAL}.12ksmall.bin',
156 Vdiff_Grid(2) = '$INPUT/met/camx.kv.200206${CAL}.12ksmall.bin',
157 Cloud_Grid(2) = '$INPUT/met/camx.cr.200206${CAL}.12ksmall.bin',
158 /
159 !-------------------------------------------------------------------------------
160 ieof
161 #
162 # --- Execute the model ---
163 #
164 if( ! { $EXEC } ) then
165 exit
166 endif
167 end
CAMx.in listing
#$ cat -n CAMx.in
1
2 &CAMx_Control
3
4 Run_Message = 'CAMx 7.00 Test Problem -- CB6R4 CF SOAP 20160610',
5
6 !--- Model clock control ---
7
8 Time_Zone = -8, ! (0=UTC,5=EST,6=CST,7=MST,8=PST)
9 Restart = .false.,
10 Start_Date_Hour = 2016,09,30,2000, !
11 End_Date_Hour = 2016,10,31,2000, !
12
13 Maximum_Timestep = 15., ! minutes
14 Met_Input_Frequency = 60., ! minutes
15 Ems_Input_Frequency = 60., ! minutes
16 Output_Frequency = 60., ! minutes
17
18 !--- Map projection parameters ---
19
20 Map_Projection = 'LAMBERT', ! (LAMBERT,POLAR,RPOLAR,MERCATOR,LATLON,UTM)
21 UTM_Zone = 0,
22 Longitude_Pole = 120.9900, ! deg (west<0,south<0)
23 Latitude_Pole = 23.61000, ! deg (west<0,south<0)
24 True_Latitude1 = 10., ! deg (west<0,south<0)
25 True_Latitude2 = 40., ! deg (west<0,south<0, can = True_Latitude1)
26
27 !--- Parameters for the master (first) grid ---
28
29 Number_of_Grids = 1,
30 Master_SW_XCoord = -124.500, ! km or deg, SW corner of cell(1,1)
31 Master_SW_YCoord = -205.500, ! km or deg, SW corner of cell (1,1)
32 Master_Cell_XSize = 3., ! km or deg
33 Master_Cell_YSize = 3., ! km or deg
34 Master_Grid_Columns = 83,
35 Master_Grid_Rows =137,
36 Number_of_Layers = 15,
37
38 !--- Parameters for the second grid ---
39
40 Nest_Meshing_Factor(2) = 3, ! Cell size relative to master grid
41 Nest_Beg_I_Index(2) = 20, ! Relative to master grid
42 Nest_End_I_Index(2) = 40, ! Relative to master grid
43 Nest_Beg_J_Index(2) = 20, ! Relative to master grid
44 Nest_End_J_Index(2) = 40, ! Relative to master grid
45
46 Nest_Meshing_Factor(3) = 27, ! Cell size relative to master grid
47 Nest_Beg_I_Index(3) = 29, ! Relative to master grid
48 Nest_End_I_Index(3) = 31, ! Relative to master grid
49 Nest_Beg_J_Index(3) = 28, ! Relative to master grid
50 Nest_End_J_Index(3) = 32, ! Relative to master grid
51
52
53 !--- Model options ---
54
55 Diagnostic_Error_Check = .false., ! True = will stop after 1st timestep
56 Flexi_Nest = .true., ! True = expect flexi-nested inputs
57 Advection_Solver = 'PPM', ! (PPM,BO20)
58 Chemistry_Solver = 'EBI', ! (EBI,LSODE)
59 PiG_Submodel = 'GREASD', ! (None,GREASD,IRON)
60 Probing_Tool = 'None', ! (None,SA,31M,HDDM,PA,IPR,IRR,RTRAC,RTCMC)
61 Chemistry = .true.,
62 Drydep_Model = 'ZHANG03', ! (None,WESELY89,ZHANG03)
63 Bidi_NH3_Drydep = .false.,
64 Wet_Deposition = .true.,
65 ACM2_Diffusion = .false.,
66 Surface_Model = .false.,
67 Inline_Ix_Emissions = .true.,
68 Super_Stepping = .true.,
69 Gridded_Emissions = .true.,
70 Point_Emissions = .true.,
71 Ignore_Emission_Dates = .false.,
72
73 !--- Output specifications ---
74
75 Root_Output_Name = 'outputs/con10/1610baseE',
76 Average_Output_3D = .false.,
77 NetCDF_Format_Output = .false.,
78 NetCDF_Use_Compression = .false.,
79 Output_Species_Names(1) = 'NO',
80 Output_Species_Names(2) = 'NO2',
81 Output_Species_Names(3) = 'O3',
82 Output_Species_Names(4) = 'SO2',
83 Output_Species_Names(5) = 'NH3',
84 Output_Species_Names(6) = 'PNO3',
85 Output_Species_Names(7) = 'PSO4',
86 Output_Species_Names(8) = 'PNH4',
87 Output_Species_Names(9) = 'POA',
88 Output_Species_Names(10) = 'PEC',
89 Output_Species_Names(11) = 'FPRM',
90 Output_Species_Names(12) = 'CPRM',
91 Output_Species_Names(13) = 'CCRS',
92 Output_Species_Names(14) = 'FCRS',
93 Output_Species_Names(15) = 'SOA1',
94 Output_Species_Names(16) = 'SOA2',
95 Output_Species_Names(17) = 'SOA3',
96 Output_Species_Names(18) = 'SOA4',
97 Output_Species_Names(19) = 'NA',
98 Output_Species_Names(20) = 'PCL',
99 Output_Species_Names(21) = 'PAR',
100 Output_Species_Names(22) = 'ETHA',
101 Output_Species_Names(23) = 'MEOH',
102 Output_Species_Names(24) = 'ETOH',
103 Output_Species_Names(25) = 'ETH',
104 Output_Species_Names(26) = 'OLE',
105 Output_Species_Names(27) = 'IOLE',
106 Output_Species_Names(28) = 'ISOP',
107 Output_Species_Names(29) = 'TERP',
108 Output_Species_Names(30) = 'FORM',
109 Output_Species_Names(31) = 'ALD2',
110 Output_Species_Names(32) = 'ALDX',
111 Output_Species_Names(33) = 'TOL',
112 Output_Species_Names(34) = 'XYL',
113 Output_Species_Names(35) = 'PRPA',
114 Output_Species_Names(36) = 'BENZ',
115 Output_Species_Names(37) = 'ETHY',
116 Output_Species_Names(38) = 'ACET',
117 Output_Species_Names(39) = 'KET',
118 Output_Species_Names(40) = 'N2O5',
119 Output_Species_Names(41) = 'HNO3',
120 Output_Species_Names(42) = 'CO',
121
122 !--- Input files ---
123
124 Chemistry_Parameters = 'inputs/chem/CAMx7.0.chemparam.CB6r4_CF2',
125 Photolyis_Rates = 'inputs/tuv/tuv4.8.camx7.00/tuv.do_CB6.161001.d4',
126 Ozone_Column = 'inputs/toms/o3map.20161001.d4',
127 Initial_Conditions = 'ICBC/bndextr_d2/base.grd02.1610.ic',
128 Boundary_Conditions = 'ICBC/bndextr_d2/base.grd02.1610.bc',
129 Point_Sources(1) = 'ptse/base/fortBE.413_teds10.ptsE10.nc',
130 Point_Sources(2) = 'ptse/XindaG3_v7/fortBE.14_hsinda3Gh80.3.10.nc',
131 Master_Grid_Restart = 'outputs/con09/1609baseE.inst',
132 Nested_Grid_Restart = 'outputs/con09/1609baseE.finst',
133 PiG_Restart = 'outputs/con09/1609baseE.pig',
134
135 Surface_Grid(1) = 'met/1610d4.lu',
136 Met3D_Grid(1) = 'met/1610d4.3d',
137 Met2D_Grid(1) = 'met/1610d4.2d',
138 Vdiff_Grid(1) = 'met/1610d4.kv.OB70',
139 Cloud_Grid(1) = 'met/1610d4.cr',
140 Emiss_Grid(1,1) = 'emis/area/fortBE.413_teds10.area10.nc',
141 Emiss_Grid(1,2) = 'emis/line/fortBE.413_teds10.line10.nc',
142 Emiss_Grid(1,3) = 'emis/ship/fortBE.413_teds10.51A_10.nc',
143 Emiss_Grid(1,4) = 'emis/biog/fortBE.413_teds10.biog10.nc',
144 Emiss_Grid(1,5) = 'ptse/base/fortBE.413_teds10.ptsG10.nc',
145
146 /
參考資料與連結
CAMx
- Users Guide:CAMxUsersGude_v7.00.pdf (2020),http://www.camx.com/files/camxusersguide_v7-00.pdf
- 曠永銓‧王嘉弘‧陳怡伶(2003)空氣汙染排放總量及背景空氣品質預測, (中興工程第八十一期,中興工程顧問社,pp.139~144) https://www.sinotech.org.tw/journal/pdfview.aspx?n=81&s=139
- 中部科學園區后里基地環境影響評估,附錄二十一衍生性空氣污染擴散擬結果模性能評估,https://www.most.gov.tw/most/attachments/b42d0bea-b041-49a0-9da0-7b98da0666de
- 空氣品質模式簡介與操作 - 概說 網格模式 - 複雜化學模式 https://linux.vbird.org/enve/illustration.php#grid
tools
- vi:文書編輯器vim
- sed
- sed wiki, https://zh.wikipedia.org/wiki/Sed
- sed 工具, De-Yu Wang 2020-06-19, https://dywang.csie.cyut.edu.tw/dywang/linuxProgram/node42.html
- date
- Bash shell 的 date 印出「年月日時分秒」的參數, Tsung’s Blog, https://blog.longwin.com.tw/2017/04/bash-shell-date-ymdhis-arg-awk-2017/