NCAR / IPT

Emissions Model Interface Tool
Apache License 2.0
11 stars 8 forks source link

Python scripts for regridding data #11

Closed zxdawn closed 3 years ago

zxdawn commented 4 years ago

Hi! Recently, I have written Python scripts of making emission data for WRF-Chem using MEIC emission inventory.

It supports nearest and IDW resample methods for distributing emissions. Maybe, it could be modified for other models.

Best regards,

Xin

AndrewJConley commented 4 years ago

Thanks for this. We are using some temporary scripts to provide offline regridding at the moment. These look well written and could be useful. In particular the cleaner code and interfaces could be useful.

All of our regridding requires mass conservation. So the IDW resampling is not the direction we are going. The nearest-neighbor regridding could be useful. When we have a testing set, would you be willing to test your scripts?

In the long term, we will be using NUOPC to provide regridding as part of an online model run. http://www.cesm.ucar.edu/events/workshops/ws.2018/presentations/sewg/dunlap.pdf

We are also using meshes in our future models, rather than lat/lon grids. Our three model grids are likely to be MPAS, FV3, and Spectral Element with regional refinement.

zxdawn commented 4 years ago

@AndrewJConley Thanks for the information.

For the conservative resampling, I think xESMF developed by @JiaweiZhuang supports that. He has compared several resampling methods here.

I guess pyresample doesn't support conservative method yet. @mraspaud right?

But, as shown in the example given by @JiaweiZhuang , the nearest method seems to get the same result as the conservative method.

As mention in Page 13 of that PDF given by @AndrewJConley above, ESMF supports two kinds of conservative methods: First-order and Second-order conservative. It seems the conservative method in xESMF is the First-order conservative.

zxdawn commented 4 years ago

@AndrewJConley BTW, do you plan to resample the emission data generated by SMOKE or just the original gridded emission files?

AndrewJConley commented 3 years ago

There does not seem to be interest in addressing this issue by the team. So I am closing this issue for now. It can be reopened if there is interest in further discussion.