[ncl-talk] ESMF regridding of global emissions: getting 300-800 times lower values on destination grid

Tabish Ansari tabishumaransari at gmail.com
Tue Oct 4 08:17:42 MDT 2022


Hi

I've got global emissions of various air pollutants for multiple years on a
0.1 x 0.1 degrees rectilinear grid which I'm trying to regrid at a coarser
resolution of 1.9x2.5 degrees for a model run. I'm using the ESMF_regrid()
and ESMF_regrid_with_weights() functions to achieve the desired output but
on evaluation I find that the output files have much lower magnitudes of
emissions inside: sum of all grid boxes on the destination grid is roughly
300-800 times lower than that for the source grid . The units are in
tons/month.

Here's my first script that I use to generate the weights file:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"

begin
    sfile =
addfile("/data/sync/modelinput/HTAPv3-Emissions-tan/edgar_HTAPv3_2018_NOx.nc","r")
    nox  = sfile->HTAPv3_1_International_Shipping(0,:,:)

    Opt                = True
    Opt at ForceOverwrite = True
    Opt at InterpMethod   = "conserve"
    Opt at DstGridType    = "1.9x2.5"
    Opt at DstURCorner    = (/  90, 357.5/)
    Opt at DstLLCorner    = (/ -90,   0/)

    nox_regrid = ESMF_regrid(nox,Opt)
    printVarSummary(nox_regrid)
end

This creates 3 files: destination_grid_file.nc  source_grid_file.nc
weights_file.nc

Further, I utilize the weights_file.nc to perform the regridding using the
following script:

begin

SDIR = "/data/sync/modelinput/HTAPv3-Emissions-tan/"
DDIR = "/data/sync/modelinput/HTAPv3-Emissions-tan_regridMC/"
prefix = "edgar_HTAPv3_20"
yeararray =
(/"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18"/)
polarray =  (/"CO","NMVOC","NOx","SO2","NH3","OC","BC","PM2.5","PM10"/)



do t=0,18 ;LOOP OVER YEARS
 do p=0,8 ;LOOP OVER POLLUTANTS

   fname = prefix+yeararray(t)+"_"+polarray(p)+".nc"
   print("Regridding: "+fname)

   sfile = addfile(SDIR+fname,"r")
   dfile = addfile(DDIR+fname,"c")

   sec1 = sfile->HTAPv3_1_International_Shipping
   sec2 = sfile->HTAPv3_2_1_Domestic_Aviation
   sec3 = sfile->HTAPv3_2_2_International_Aviation
   sec4 = sfile->HTAPv3_3_Energy
   sec5 = sfile->HTAPv3_4_1_Industry
   sec6 = sfile->HTAPv3_4_2_Fugitive
   sec7 = sfile->HTAPv3_4_3_Solvents
   sec8 = sfile->HTAPv3_5_1_Road_Transport
   if(p.gt.4)then
   sec9 = sfile->HTAPv3_5_2_Brake_and_Tyre_wear
   end if
   sec10 = sfile->HTAPv3_5_3_Domestic_shipping
   sec11 = sfile->HTAPv3_5_4_Other_ground_transport
   sec12 = sfile->HTAPv3_6_Residential
   sec13 = sfile->HTAPv3_7_Waste
   sec14 = sfile->HTAPv3_8_1_Agricultural_waste_burning
   sec15 = sfile->HTAPv3_8_3_Agriculture_crops

   ;REGRIDDING
   sec1_regrid = ESMF_regrid_with_weights(sec1,"weights_file.nc",False)
   sec2_regrid = ESMF_regrid_with_weights(sec2,"weights_file.nc",False)
   sec3_regrid = ESMF_regrid_with_weights(sec3,"weights_file.nc",False)
   sec4_regrid = ESMF_regrid_with_weights(sec4,"weights_file.nc",False)
   sec5_regrid = ESMF_regrid_with_weights(sec5,"weights_file.nc",False)
   sec6_regrid = ESMF_regrid_with_weights(sec6,"weights_file.nc",False)
   sec7_regrid = ESMF_regrid_with_weights(sec7,"weights_file.nc",False)
   sec8_regrid = ESMF_regrid_with_weights(sec8,"weights_file.nc",False)
   if(p.gt.4)then
   sec9_regrid = ESMF_regrid_with_weights(sec9,"weights_file.nc",False)
   end if
   sec10 = sfile->HTAPv3_5_3_Domestic_shipping
   sec11 = sfile->HTAPv3_5_4_Other_ground_transport
   sec12 = sfile->HTAPv3_6_Residential
   sec13 = sfile->HTAPv3_7_Waste
   sec14 = sfile->HTAPv3_8_1_Agricultural_waste_burning
   sec15 = sfile->HTAPv3_8_3_Agriculture_crops

;STORING
  dfile->HTAPv3_1_International_Shipping = sec1_regrid
  dfile->HTAPv3_2_1_Domestic_Aviation = sec2_regrid
  dfile->HTAPv3_2_2_International_Aviation = sec3_regrid
  dfile->HTAPv3_3_Energy = sec4_regrid
  dfile->HTAPv3_4_1_Industry = sec5_regrid
  dfile->HTAPv3_4_2_Fugitive = sec6_regrid
  dfile->HTAPv3_4_3_Solvents = sec7_regrid
  dfile->HTAPv3_5_1_Road_Transport = sec8_regrid
  if(p.gt.4)then
  dfile->HTAPv3_5_2_Brake_and_Tyre_wear = sec9_regrid
  end if
  dfile->HTAPv3_5_3_Domestic_shipping = sec10_regrid
  dfile->HTAPv3_5_4_Other_ground_transport = sec11_regrid
  dfile->HTAPv3_6_Residential = sec12_regrid
  dfile->HTAPv3_7_Waste = sec13_regrid
  dfile->HTAPv3_8_1_Agricultural_waste_burning = sec14_regrid
  dfile->HTAPv3_8_3_Agriculture_crops = sec15_regrid
 end do
end do
end

I'd be grateful if you could please point out what's going wrong here.

Thanks a lot.

Cheers,

Tabish


-------------------------------
Dr Tabish Ansari
Research Associate
Air Quality Modelling Group
IASS-Potsdam
Germany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20221004/4a07653a/attachment.htm>


More information about the ncl-talk mailing list