geoschem / integrated_methane_inversion

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

[Bugfix] 0.25 x 0.3125 resolution-specific code in make_state_vector_file.py #141

Closed nicholasbalasus closed 8 months ago

nicholasbalasus commented 1 year ago

Name and Institution (Required)

Name: Nick Balasus Institution: Harvard University

Description of your issue or question

The code below is specific to 0.25 x 0.3125. https://github.com/geoschem/integrated_methane_inversion/blob/477b8d745cfd4b534b532c9a81dbddaeeb4eacb8/src/utilities/make_state_vector_file.py#L85

The fix is probably just an if statement for using 0.03125 (for 0.25 x 0.3125) or 0.0625 (for 0.5 x 0.625) depending on the resolution. But we might need to consider the global-scale resolutions as well. The code doesn't fail as is for 0.5 x 0.625 because it filters based on index (below), but maybe it should fail (adding in an assert for lc and hd have the same lat/lon grid might catch future issues). https://github.com/geoschem/integrated_methane_inversion/blob/477b8d745cfd4b534b532c9a81dbddaeeb4eacb8/src/utilities/make_state_vector_file.py#L125-L129

nicholasbalasus commented 1 year ago

I think this is an issue with how the HEMCO standalone grids are defined. Once this is fixed and we regenerate the standalone diagnostic files, we can ignore this issue.

https://github.com/geoschem/HEMCO/issues/228

nicholasbalasus commented 8 months ago

Fixed in #182.

msulprizio commented 1 month ago

Note: The above fix has been removed in #255 now that we're using updated HEMCO standalone output