openghg / openghg_inversions

University of Bristol Atmospheric Chemistry Research Group RHIME Inversion code (with openghg dependency)
MIT License
5 stars 0 forks source link

specify the directory of country-EUROPE-UKMO-landsea-2023.nc in _weighted.py #99

Closed hdelongueville closed 2 weeks ago

hdelongueville commented 2 months ago

The line 14 in [openghg_inversions/openghg_inversions/basis/algorithms/_weighted.py, branch Iss55-fix-outer-regions] should specify the whole path of country-EUROPE-UKMO-landsea-2023.nc.

For now it is:

landsea_indices = xr.open_dataset("../countries/country-EUROPE-UKMO-landsea-2023.nc")

and should be changed to:

landsea_indices = xr.open_dataset("/group/chem/acrg/LPDM/countries/country-EUROPE-UKMO-landsea-2023.nc")

to avoid error like, for example,

FileNotFoundError: [Errno 2] No such file or directory: '/user/home/qq24644/countries/country-EUROPE-UKMO-landsea-2023.nc')

brendan-m-murphy commented 2 months ago

Sorry I just noticed this. To work in different settings, we probably need this to point to a path inside of openghg inversions, and have the file there (e.g. the default country file location is openghg_inversions/countries), or allow a path to be passed in.

The first option, combined with distributing the file with openghg inversions might be simplest.

brendan-m-murphy commented 2 months ago

This is related to issue #56.

brendan-m-murphy commented 2 months ago

It looks like this is fixed by PR #101. I'll either split that fix out or just get that PR merged in soon.