Skip to content

Commit

Permalink
Merge pull request #125 from openghg/pass-met-model-as-list
Browse files Browse the repository at this point in the history
Pass met_model as a list to get_footprint
  • Loading branch information
brendan-m-murphy committed May 17, 2024
2 parents 4db6bc5 + 9a5bf50 commit a48f35e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
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

0 comments on commit a48f35e

Please sign in to comment.