Skip to content

Commit

Permalink
Merge branch 'main' into ao_update_precip_var
Browse files Browse the repository at this point in the history
  • Loading branch information
acordonez authored Sep 23, 2024
2 parents d56d373 + ebbc2fe commit 92631c4
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 7 deletions.
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,24 @@
"contributions": [
"code"
]
},
{
"login": "zhangshixuan1987",
"name": "Shixuan Zhang",
"avatar_url": "https://avatars.githubusercontent.com/u/33647254?v=4",
"profile": "https://github.com/zhangshixuan1987",
"contributions": [
"code"
]
},
{
"login": "kristinchang3",
"name": "Kristin Chang",
"avatar_url": "https://avatars.githubusercontent.com/u/143142064?v=4",
"profile": "https://kristinchang.github.io/portfolio/",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ Release Notes and History
[v1.1]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v1.1
[v1.0]: https://github.com/PCMDI/pcmdi_metrics/releases/tag/v1.0

Current Core Team Members at PCMDI/LLNL
---------------------------------------
* Jiwoo Lee
* Ana Ordonez
* Peter Gleckler
* Paul Ullrich
* Bo Dong
* Kristin Chang


Contributors
------------
Expand Down Expand Up @@ -221,7 +230,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://sites.google.com/uw.edu/kimresearchgroup"><img src="https://scholar.googleusercontent.com/citations?view_op=view_photo&user=3xLjsIsAAAAJ&citpid=3?s=100" width="100px;" alt="Daehyun Kim"/><br /><sub><b>Daehyun Kim</b></sub></a><br /><a href="https://github.com/PCMDI/pcmdi_metrics/commits?author=" title="Code">💻</a> <a href="#research" title="Research">🔬</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bosup"><img src="https://avatars.githubusercontent.com/u/130708142?v=4?s=100" width="100px;" alt="Bo"/><br /><sub><b>Bo Dong</b></sub></a><br /><a href="https://github.com/PCMDI/pcmdi_metrics/commits?author=bosup" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bosup"><img src="https://avatars.githubusercontent.com/u/130708142?v=4?s=100" width="100px;" alt="Bo Dong"/><br /><sub><b>Bo Dong</b></sub></a><br /><a href="https://github.com/PCMDI/pcmdi_metrics/commits?author=bosup" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zhangshixuan1987"><img src="https://avatars.githubusercontent.com/u/33647254?v=4?s=100" width="100px;" alt="Shixuan Zhang"/><br /><sub><b>Shixuan Zhang</b></sub></a><br /><a href="https://github.com/PCMDI/pcmdi_metrics/commits?author=zhangshixuan1987" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://kristinchang.github.io/portfolio/"><img src="https://avatars.githubusercontent.com/u/143142064?v=4?s=100" width="100px;" alt="Kristin Chang"/><br /><sub><b>Kristin Chang</b></sub></a><br /><a href="https://github.com/PCMDI/pcmdi_metrics/commits?author=kristinchang3" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion pcmdi_metrics/io/xcdat_openxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def xcdat_open(
# Open an xml file
>>> ds = xcdat_open('mydata.xml')
"""
if isinstance(infile, list):
if isinstance(infile, list) or "*" in infile:
ds = xc.open_mfdataset(infile, data_var=data_var, decode_times=decode_times)
else:
if infile.split(".")[-1].lower() == "xml":
Expand Down
4 changes: 3 additions & 1 deletion pcmdi_metrics/mean_climate/mean_climate_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@
result_dict["Variable"] = dict()
result_dict["Variable"]["id"] = varname
if level is not None:
result_dict["Variable"]["level"] = level * 100 # hPa to Pa
result_dict["Variable"][
"level"
] = level # SZhang: should not "* 100" here # hPa to Pa

result_dict["References"] = dict()

Expand Down
8 changes: 4 additions & 4 deletions pcmdi_metrics/variability_mode/lib/lib_variability_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def subset_time(
eyear = int(eyear)

# First trimming
time1 = f"{syear}-01-01 00:00:00"
time2 = f"{eyear}-12-{eday} 23:59:59"
time1 = f"{syear:04d}-01-01 00:00:00"
time2 = f"{eyear:04d}-12-{eday:02d} 23:59:59"
ds = select_subset(ds, time=(time1, time2))

# Check available time window and adjust again if needed
Expand All @@ -170,8 +170,8 @@ def subset_time(

# Second trimming
if adjust_time_length:
time1 = f"{data_syear}-01-01 00:00:00"
time2 = f"{data_eyear}-12-{eday} 23:59:59"
time1 = f"{data_syear:04d}-01-01 00:00:00"
time2 = f"{data_eyear:04d}-12-{eday:02d} 23:59:59"
ds = select_subset(ds, time=(time1, time2))

return ds
Expand Down

0 comments on commit 92631c4

Please sign in to comment.