Link Search Menu Expand Document

EDGARv5之下載與處理

Table of contents

背景

下載方式及格式

批次檔

  • 直接到EDGAR官網點選下載nc連結,製做批次檔如下。
for cat in TOTALS ENE REF_TRF IND \
        TNR_Aviation_CDS TNR_Aviation_CRS TNR_Aviation_LTO TNR_Aviation_SPS \
        TRO_noRES TRO_RES TNR_Other TNR_Ship RCO PRO NMM CHE IRO NFE NEU PRU_SOL FOO_PAP \
        MNM AWB AGS SWD_LDF SWD_INC WWT FFF;do
  for i in BC CO NH3 NMVOC NOx OC PM10 PM2.5 SO2;do
    https=https://cidportal.jrc.ec.europa.eu/ftp/jrc-opendata/EDGAR/datasets/v50_AP/${i}/${cat}
    if [ $cat == 'TOTALS' ];then
      filez=v50_${i}_2015.0.1x0.1.zip
    elif [ $cat == 'TNR_Aviation_SPS' ];then
      filez=${cat}_nc.zip
    else
      filez=v50_${i}_2015_monthly_${cat}_nc.zip
    fi
    zz=${https}/${filez}
    wget -q --no-check-certificate $zz
    if [ -e ${filez} ];then unzip -q -o ${filez};fi
  done
done

類別資訊

  • EDGAR參照IPCC之分類方式進行排放推估,共28種類別。
  • 因排放類別可對照時間變化、成分特性等訊息,具有發展成排放模式之潛能
Abb.Category
TOTALSall the categories
ENEPower industry
REF_TRFOil refineries and Transformation industry
INDCombustion for manufacturing
TNR_Aviation_CDSAviation climbing&descent
TNR_Aviation_CRSAviation cruise
TNR_Aviation_LTOAviation landing&takeoff
TNR_Aviation_SPSAviation supersonic
TRO_noRESRoad transportation no resuspension
TRO_RESRoad transportation resuspension
TNR_OtherRailways pipelines and off-road transport
TNR_ShipShipping
RCOEnergy for buildings
PROFuel exploitation
NMMNon-metallic minerals production
CHEChemical processes
IROIron and steel production
NFENon-ferrous metals production
NEUNon energy use of fuels
PRU_SOLSolvents and products use
FOO_PAPFood and Paper
MNMManure management
AWBAgricultural waste burning
AGSAgricultural soils
SWD_LDFSolid waste landfills
SWD_INCSolid waste incineration
WWTWaste water handling
FFFFossil Fuel Fires

座標資訊

  • 其經緯度的起始點及點數為:
    • 經度:0.05 (3600點)
    • 緯度:-89.5 (1800點)

內插程式說明

EDGAR2cmaqD2.py

  • 採用與reas2cmaqD2.py類似的方式進行內插。
  • 由於EDGAR已經是網格化的nc檔案了,因此讀取較為單純。

    調用模組

  • EDGAR資料解析度為0.1度,在台灣地區約為10公里,對3公里之網格系統仍需內插。此處採griddata線性內插。
kuang@master /nas1/TEDS/EDGARv5
$ cat EDGAR2cmaqD2.py
import numpy as np
import netCDF4
import sys, os
from pandas import *
from pyproj import Proj
from scipy.interpolate import griddata

讀取各物種之總量檔案

  • 簡要開始
  • 加上一個新物質名稱:粗粒物PMC,以對應到排放量CCRS或CPRM
spec='BC CO NH3 NMVOC NOx OC PM10 PM2.5 SO2'.split()
nspec=len(spec)
specn={spec[i]:i for i in range(nspec)}

ny,nx=1800,3600
var=np.zeros(shape=(9+1,ny,nx))
for s in spec:
  fname='v50_'+s+'_2015.0.1x0.1.nc'
  nc = netCDF4.Dataset(fname,'r')
  v='emi_'+s.lower()
  var[specn[s],:,:]=nc[v][:,:]
var[-1,:,:]=var[specn['PM10'],:,:]-var[specn['PM2.5'],:,:]
var=np.where(var<0,0,var)
spec+=['PMC']
specn.update({'PMC':len(spec)-1})

lonM=[  0.05+i*0.1 for i in range(nx)]
latM=[-89.95+i*0.1 for i in range(ny)]
lonm, latm = np.meshgrid(lonM, latM)

讀取排放量檔案之模版

  • 將EDGAR之網格經緯度座標值轉到模版檔案的網格系統
  • 找到在模版範圍內的EDGAR座標點(idx),準備進行griddata內插
DD=sys.argv[1]
#interpolation indexing from template  # get the argument
tail=DD+'.nc'
fname='template'+tail
nc = netCDF4.Dataset(fname, 'r')
V=[list(filter(lambda x:nc.variables[x].ndim==j, [i for i in nc.variables])) for j in [1,2,3,4]]
nt,nlay,nrow,ncol=nc.variables[V[3][0]].shape
x1d=[nc.XORIG+nc.XCELL*i for i in range(ncol)]
y1d=[nc.YORIG+nc.YCELL*i for i in range(nrow)]
x1,y1=np.meshgrid(x1d,y1d)
maxx,maxy=x1[-1,-1],y1[-1,-1]
minx,miny=x1[0,0],y1[0,0]

pnyc = Proj(proj='lcc', datum='NAD83', lat_1=10, lat_2=40, lat_0=nc.YCENT, lon_0=nc.XCENT, x_0=0, y_0=0.0)
x,y=pnyc(lonm,latm, inverse=False)

boo=(x<=maxx+nc.XCELL*10) & (x>=minx-nc.XCELL*10) & (y<=maxy+nc.YCELL*10) & (y>=miny-nc.YCELL*10)
idx = np.where(boo)
mp=len(idx[0])
xyc= [(x[idx[0][i],idx[1][i]],y[idx[0][i],idx[1][i]]) for i in range(mp)]

污染項目之對照

  • 此處將所有NOx先放在NO2,未來再予以調整
  • VOCs另行處理(使用REAS的排放比例)
# spec name dict
EDGAR2EMIS={'BC':'PEC','OC':'POA','PM2.5':'FPRM','PMC':'CPRM'}

spec='BC CO NH3 NMVOC NOx OC PM10 PM2.5 SO2'.split()
mw={i:1 for i in EDGAR2EMIS}
mw.update({'CO':28,'NH3':17,'NMVOC':58,'NOx':46,'SO2':64})
EDGAR2EMIS.update({'NOx':'NO2'})
EDGAR2EMIS.update({i:i for i in 'CO NH3 SO2'.split()})
VOCs=['ALD2','ALDX','BENZ','ETH','ETHA','ETHY','ETOH','FORM','HONO','IOLE','ISOP','KET','MEOH','OLE','PAR','PRPA','TERP','TOL','XYL']
nv=len(VOCs)

複製模版、內插、先處理一般污染物

  • 單位轉換:kg/m2/s → gmole/cell/s
fname='EDGAR'+tail
os.system('cp template'+tail+' '+fname)
nc = netCDF4.Dataset(fname, 'r+')

# elongate the new ncf
# fill the new nc file
for v in V[3]:
  nc[v][:]=0.

#interpolation scheme, for D0/D2 resolution(15Km/27Km)
for v in spec:
  if v not in EDGAR2EMIS.keys():continue #(PM10 and NMVOC)
  ispec=specn[v]
  vc=EDGAR2EMIS[v]
  if vc not in V[3]:continue
  zz=np.zeros(shape=(nrow,ncol))
  c = np.array([var[ispec,idx[0][i], idx[1][i]] for i in range(mp)])
  zz[:,: ] = griddata(xyc, c[:], (x1, y1), method='linear')
  zz=np.where(np.isnan(zz),0,zz)
  nc[vc][0,0,:,:] =zz[:,:]/mw[v]*1000.*nc.XCELL*nc.YCELL
  print (v)

處理VOCs之成分

  • 此處借用REAS的成分比例做為EDGAR VOCs的計算
  • 如果REAS網格沒有VOCs,則以一平均之分布代之
fname='2015_'+DD+'.nc'
nc0 = netCDF4.Dataset(fname, 'r')
Vspl=np.zeros(shape=(nv,nrow,ncol))
for v in VOCs:
  iv=VOCs.index(v)
  Vspl[iv,:,:]+=np.sum(nc0[v][:,0,:,:],axis=0)
vss=np.sum(Vspl[:,:,:],axis=0)
iidx=np.where(vss>0)
Vspl_mean=np.array([np.mean(Vspl[i,iidx[0],iidx[1]]) for i in range(nv)])
Vspl_mean/=sum(Vspl_mean)

iidx=np.where(vss==0)
vss=np.where(vss==0,1,vss)
Vspl[:,:,:]/=vss[None,:,:]
for i in range(nv):
  Vspl[i,iidx[0],iidx[1]]=Vspl_mean[i]
v='NMVOC'
zz=np.zeros(shape=(nrow,ncol))
c = np.array([var[specn[v],idx[0][i], idx[1][i]] for i in range(mp)])
zz[:,: ] = griddata(xyc, c[:], (x1, y1), method='linear')
zz=np.where(np.isnan(zz),0,zz)/mw[v]*1000.*nc.XCELL*nc.YCELL
for v in VOCs:
  iv=VOCs.index(v)
  nc[v][0,0,:,:]=zz[:,:]*Vspl[iv,:,:]

nc.close()

程式下載

Results

NOx_EastAsia.PNGNO2_D6.PNG
圖 Ding(2017) 衛星反衍東亞地區NOx排放之分布圖 HUADON_3k範圍EDGARv5 NO2排放之分布(log gmole/s)

Reference

  • Ding, J., Miyazaki, K., van der A, R.J., Mijling, B., Kurokawa, J., Cho, S., Janssens-Maenhout, G., Zhang, Q., Liu, F., and Levelt, P.F. (2017). Intercomparison of NOx emission inventories over East Asia. Atmos. Chem. Phys. 17 (16):10125–10141. doi:10.5194/acp-17-10125-2017.