Skip to content

Commit

Permalink
Merge pull request #11 from E3SM-Project/hsiangheleellnl/chemdyg_check
Browse files Browse the repository at this point in the history
skip NOAA CO plot when simulation period does not match obs.
  • Loading branch information
hsiangheleellnl authored Jun 8, 2023
2 parents 6196684 + 438e9bc commit b3f1304
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chemdyg/templates/chemdyg_noaa_co_comparison.bash
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ for n in range(len(Sta)):
nmonth = np.arange(0,len(CO_sel_1D),1)
mask = ~np.isnan(CO_sel_1D)
if (len(nmonth[mask]) == 0):
continue
slope_e3sm, intercept, r_value, p_value, std_err = linregress(nmonth[mask], CO_sel_1D[mask])
lin_e3sm = nmonth*slope_e3sm+intercept
lin_e3sm_xa = xr.DataArray(lin_e3sm, coords=[time_range_noaa], dims=["time"])
Expand Down

0 comments on commit b3f1304

Please sign in to comment.