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

Bugfix: missing colon in dz_m in CAMx reader #203

Merged
merged 2 commits into from
Oct 8, 2024
Merged
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
4 changes: 2 additions & 2 deletions monetio/models/_camx_mm.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def add_met_data_3D(d_chem, d_met):
"var_desc": "pressure",
}
if ("z" in d_met.variables) or ("ZGRID_M" in d_met.variables):
d_chem["alt_agl_m_mid"], d_chem["layer_height_agl"] = _calc_midlayer_height_agl(d_met)
d_chem["alt_agl_m_mid"], d_chem["dz_m"] = _calc_midlayer_height_agl(d_met)
else:
warnings.warn("No altitude AGL was found.")

Expand Down Expand Up @@ -461,7 +461,7 @@ def _calc_midlayer_height_agl(dset):

dz_m = xr.zeros_like(layer_height_agl)
dz_m[:, 0, :, :] = layer_height_agl[:, 0, :, :].values
dz_m[:, 1:, :, :] = layer_height_agl[:, 1, :, :].values - layer_height_agl[:, :-1, :, :].values
dz_m[:, 1:, :, :] = layer_height_agl[:, 1:, :, :].values - layer_height_agl[:, :-1, :, :].values
dz_m.attrs["long_name"] = "dz in meters"
dz_m.attrs["var_desc"] = "Layer thickness in meters"
return alt_agl_m_mid, layer_height_agl
Expand Down