
Claude Skills by OCHA-DAP
github.com/OCHA-DAPThis notebook explores the Ranked Probability Skill Score (RPSS) for IRI's seasonal forecast. In the end results were not really used. Interactive tool several skill measurements: https://iri.columbia.edu/our-expertise/climate/forecasts/verification/ Data description RPSS: http://iridl.ldeo.columbia.edu/maproom/Global/Forecasts/skill_precip_seasonal.html Data files RPSS: http://iridl.ldeo.columbia.edu/home/.jingyuan/.NMME_seasonal_hindcast_verification/.monthly_RPSS_seasonal_hindcast_precip_E...
start = '2001-01-01' end = '2001-10-31' version = 2 rf_list_slice = da_glofas_reforecast_interp[version].sel(time=slice(start,end)) ra_slice = da_glofas_reanalysis[version].sel(time=slice(start, end)) rf_list_slice.mean(axis=1).plot.line( x='time', add_legend=True) ra_slice.plot.line(label='Historical', c='k') plt.show() ``` We'll compute forecast skill using the ```xskillscore``` library and focus on the CRPS (continuous ranked probability score) value, which is similar to the mean absolute ...
def plot_hist(da_observations, da_forecast, station_name, rp=None, leadtimes=None): if leadtimes is None: leadtime = da_forecast.leadtime.values fig, ax = plt.subplots() for leadtime in leadtimes: observations, forecast = utils.get_same_obs_and_forecast(da_observations, da_forecast, leadtime) rank = utils.get_rank(observations.values, forecast.values) ax.hist(rank, histtype='step', label=int(leadtime), bins=np.arange(0.5, max(rank)+1.5, 1), alpha=0.8) ax.legend(loc=9, title="Lead time (days)"...
def plot_hist(da_observations, da_forecast, station_name, rp=None, leadtimes=None): if leadtimes is None: leadtime = da_forecast.leadtime.values fig, ax = plt.subplots() for leadtime in leadtimes: observations, forecast = utils.get_same_obs_and_forecast(da_observations, da_forecast, leadtime) rank = utils.get_rank(observations.values, forecast.values) ax.hist(rank, histtype='step', label=int(leadtime), bins=np.arange(0.5, max(rank)+1.5, 1), alpha=0.8) ax.legend(loc=9, title="Lead time (days)"...