下载Anaconda3或者Miniconda3并配置好环境变量,下述过程以Windows10下安装Anaconda举例说明。
Anaconda3-2021.05-Windows-x86_64.exe
,用户具体应该下载哪个版本,根据自己的电脑配置而定。(安装路径)
后,一路Next
即可。安装路径
安装路径/Scripts
安装路径/Library/bin
Win+R
打开cmd,输入以下命令查看conda版本。conda --version
conda info
这一步先略过,大家可以去某宝或者某鱼很轻易的搜索到相关的软件安装教程。
anaconda/envs
文件夹下)。Anaconda Powershell Prompt
),切换到arcgispro-py3环境。conda info --env #查看环境
conda activate arcgispro-py3 #切换到arcgispro-py3环境.
MEIAT-CMAQ所有发行版本下载地址
本次教程所选用的版本为:MEIAT-CMAQv1.2.2 内测版
注意:内测版本的截至时间为2023年6月30日。
M-EIAT-CMAQ_Realease-1.2.2.zip
的压缩包,我们先将其解压到当前文件。allocator
目录,将所有压缩文件解压到当前文件。conda activate <你的环境名称>
进入第一步配置的python+GIS环境。MEIAT-CMAQ
所在目录,通过pip install -r requirement.txt
安装一些必要的库文件。namelist.input
,来调整参数。geotiff_dir
到自己的数据目录就好,可以联系[email protected]
索取,请务必注意不要用中文路径!!!python .\coarse_emission_2_fine_emission.py
如果屏幕打印的信息如图所示,说明运行成功。关于程序运行是否成功的检查方式有很多,我将会在下一次给大家介绍,此部分可以有效的帮助用户排查错误出现的原因。
### This system is developed by Haofan Wang. ###
### Email: [email protected] ###
--------------Fine grid shapefile|> D:\Download\MEIAT-CMAQ-Turorial\M-EIAT-CMAQ_Release-1.2.2/output/shapefile-grid.shp--------------
2023-04-28 20:24:42.445186|> The control of create grid is 1 and processor start creating fine grid.
2023-04-28 20:25:06.279706|> Finish creating fine grid shapefile.
-----------------Grid information|> D:\Download\MEIAT-CMAQ-Turorial\M-EIAT-CMAQ_Release-1.2.2/output/grid_info.csv--------------
2023-04-28 20:25:06.280708|> The control of grid information is 1 and processor start for grid information.
2023-04-28 20:25:15.058852|> Finish creating grid information.
----------------Allocation factor|> D:\Download\MEIAT-CMAQ-Turorial\M-EIAT-CMAQ_Release-1.2.2/output/factor--------------
2023-04-28 20:25:15.058852|> The control of allocation factor is 1 and processor start for allocation factor.
2023-04-28 20:25:15.059853|> There is the process for transportation and the allocator type is line.
2023-04-28 20:25:15.059853|> Allocator | ['motorway.shp', 'primary.shp', 'residential.shp', 'secondary.shp'].
2023-04-28 20:25:15.059853|> Allocator factor | [0.435798, 0.326848, 0.081712, 0.155642].
2023-04-28 20:26:10.217871|> There is the process for residential and the allocator type is raster.
2023-04-28 20:26:10.217871|> Allocator | D:\Download\MEIAT-CMAQ-Turorial\M-EIAT-CMAQ_Release-1.2.2/allocator/roads-nodata-0.tif.
----------------Coarse Emission|> f'D:\Download\MEIAT-CMAQ-Turorial\M-EIAT-CMAQ_Release-1.2.2/output/zoning_statistics'--------------
2023-04-28 20:26:19.566430|> The control of coarse emission is 1 and processor start for coarse emission.
2023-04-28 20:26:20.033683|> Processing for month 01: 100%|██████████████████████████| 135/135 [00:41<00:00, 3.25it/s]
----------------Coarse Emission|> f'D:\Download\MEIAT-CMAQ-Turorial\M-EIAT-CMAQ_Release-1.2.2/output/source'--------------
Processing for month 01.
Create source file of transportation: 100%|████████████████████████████████████████████| 27/27 [01:35<00:00, 3.55s/it]
Create source file of residential: 100%|████████████████████████████████████████████████████████████████| 27/27 [01:35<00:00, 3.55s/it]
2023-04-28 20:30:13.765683|> The control of create source is 1 and processor start for coarse emission.
2023-04-28 20:30:13.765683|> The control of create source is 1.
# ------------------------------------End------------------------------------ #
The program end time :2023-04-28 20:30:13
# --------------------------------------------------------------------------- #
### Time consuming: 331.32852053642273 s ###
python .\Create-CMAQ-Emission-File.py
如果在屏幕尾部出现如下信息说明运行成功。
Populating PNO3
Populating PSI
Populating PSO4
Populating PTI
Populating SO2
Populating SULF
Populating NH3
Populating CO
Populating PMC
Populating NO
Populating NO2
Populating HONO
Populating POC
Populating TFLAG
Done
### Time consuming: 24.172050952911377 s ###