geoschem / integrated_methane_inversion

Integrated Methane Inversion workflow repository.
https://imi.readthedocs.org
MIT License
25 stars 19 forks source link

fix regridding bug for domains with missing lat/lon data #162

Closed laestrada closed 11 months ago

laestrada commented 11 months ago

Name and Institution (Required)

Name: Lucas Estrada Institution: Harvard ACMG

Describe the update

This fixes a bug in the visualization notebook where regridding would fail if there were no observations at a particular lat/lon coordinate at .1 degree intervals, causing uneven spacing of the xarray coordinates and failure to regrid via xesmf.

This creates a dummy dataframe with even spacing, merges it to the actual data with a left join and then generates the xarray dataset.