Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass met_model as a list to get_footprint #125

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Version 0.2.0

- `met_model` is now used by `data_processing_surface_notracer`; it is an optional argument, passed as a list with the same length as the number of sites. [#PR 125](https://github.com/openghg/openghg_inversions/pull/125)

- Updated `pblh` filter to work with new variable names in footprints. [#PR 101](https://github.com/openghg/openghg_inversions/pull/101)

- NaNs are filled before converting to numpy and passing data to the inversion. This partly addresses [Issue#97](https://github.com/openghg/openghg_inversions/issues/97). [#PR 101](https://github.com/openghg/openghg_inversions/pull/101)
Expand Down
9 changes: 6 additions & 3 deletions openghg_inversions/get_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def data_processing_surface_notracer(
inlet=None,
instrument=None,
calibration_scale=None,
met_model=None,
met_model: Optional[list] = None,
fp_model=None,
fp_height=None,
fp_species=None,
Expand Down Expand Up @@ -96,8 +96,8 @@ def data_processing_surface_notracer(
(length must match number of sites)
calibration_scale (str):
Convert measurements to defined calibration scale
met_model (str/opt):
Meteorological model used in the LPDM.
met_model (list/opt):
Meteorological model used in the LPDM. List must be same length as number of sites.
fp_model (str):
LPDM used for generating footprints.
fp_height (list/str):
Expand Down Expand Up @@ -143,6 +143,8 @@ def data_processing_surface_notracer(
fp_height = [None] * nsites
if obs_data_level is None:
obs_data_level = [None] * nsites
if met_model is None:
met_model = [None] * nsites

fp_all = {}
fp_all[".species"] = species.upper()
Expand Down Expand Up @@ -207,6 +209,7 @@ def data_processing_surface_notracer(
height=fp_height[i],
domain=domain,
model=fp_model,
met_model=met_model[i],
start_date=start_date,
end_date=end_date,
store=footprint_store,
Expand Down
4 changes: 2 additions & 2 deletions openghg_inversions/hbmcmc/hbmcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def fixedbasisMCMC(
obs_store="user",
footprint_store="user",
emissions_store="user",
met_model=None,
met_model: Optional[list] = None,
fp_model=None, # Changed to none. When "NAME" specified FPs are not found
fp_height=None,
fp_species=None,
Expand Down Expand Up @@ -200,7 +200,7 @@ def fixedbasisMCMC(
emissions_store (str):
Name of object store containing emissions/flux files

met_model (str):
met_model (list):
Meteorological model used in the LPDM (e.g. 'ukv')

fp_model (str):
Expand Down
Loading