Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regridding.ipynb: work-around for Jenkins (nbval/issues/204)
Work-around for computationalmodelling/nbval#204 Have to use NBVAL_IGNORE_OUTPUT because the sanitize file seems to not be working in this case, see the issue above. ``` _ pavics-sdi-fix_nbs_jupyter_alpha_refresh_output/docs/source/notebooks/regridding.ipynb::Cell 4 _ Notebook cell execution failed Cell 4: Cell outputs differ Input: ds_tgt.cf.plot.scatter(x="longitude", y="latitude", s=0.1) plt.title("Target regular grid"); Traceback: dissimilar number of outputs for key "text/plain"<<<<<<<<<<<< Reference outputs from ipynb file: <Figure size LENGTHxWIDTH with N Axes> ============ disagrees with newly computed (test) output: Text(0.5, 1.0, 'Target regular grid') <Figure size LENGTHxWIDTH with N Axes> >>>>>>>>>>>> _ pavics-sdi-fix_nbs_jupyter_alpha_refresh_output/docs/source/notebooks/regridding.ipynb::Cell 6 _ Notebook cell execution failed Cell 6: Cell outputs differ Input: reg_bil = xe.Regridder(ds_in, ds_tgt, "bilinear") reg_bil # Show information about the regridding Traceback: Missing output fields from running code: {'stderr'} _ pavics-sdi-fix_nbs_jupyter_alpha_refresh_output/docs/source/notebooks/regridding.ipynb::Cell 7 _ Notebook cell execution failed Cell 7: Cell outputs differ Input: # xesmf/frontend.py:476: FutureWarning: ``output_sizes`` should be given in the ``dask_gufunc_kwargs`` parameter. It will be removed as direct parameter in a future version. warnings.filterwarnings("ignore", category=FutureWarning) # Apply the regridding weights to the input sea ice concentration data sic_bil = reg_bil(ds_in.siconc) # Plot the results sic_bil.isel(time=0).plot(cmap=cmap) plt.title("Regridded sic data (Jan 2020)"); Traceback: dissimilar number of outputs for key "text/plain"<<<<<<<<<<<< Reference outputs from ipynb file: <Figure size LENGTHxWIDTH with N Axes> ============ disagrees with newly computed (test) output: Text(0.5, 1.0, 'Regridded sic data (Jan 2020)') <Figure size LENGTHxWIDTH with N Axes> >>>>>>>>>>>> _ pavics-sdi-fix_nbs_jupyter_alpha_refresh_output/docs/source/notebooks/regridding.ipynb::Cell 20 _ Notebook cell execution failed Cell 20: Cell outputs differ Input: reg_mask_cons = xe.Regridder(ds_in_mask, ds_tgt_mask, "conservative") tasmin_mask_cons = reg_mask_cons(ds_in_mask.tasmin) fig, ax = plt.subplots(figsize=(6, 4)) tasmin_mask_cons.plot(cmap=cmap, ax=ax) ax.set_xlim(210, 320) ax.set_ylim(38, 86) ax.set_title("Conservative regridding without normalization - zoom on Canada") ax.annotate( "Some values are close to 0 Kelvins.\nCanada can get cold, but not that cold!", (280, 40), xytext=(1.3, 0.3), xycoords="data", textcoords="axes fraction", fontsize="x-large", arrowprops=dict(arrowstyle="->", connectionstyle="arc3, rad=-0.3"), ); Traceback: dissimilar number of outputs for key "text/plain"<<<<<<<<<<<< Reference outputs from ipynb file: <Figure size LENGTHxWIDTH with N Axes> ============ disagrees with newly computed (test) output: Text(1.3, 0.3, 'Some values are close to 0 Kelvins.\nCanada can get cold, but not that cold!') <Figure size LENGTHxWIDTH with N Axes> >>>>>>>>>>>> _ pavics-sdi-fix_nbs_jupyter_alpha_refresh_output/docs/source/notebooks/regridding.ipynb::Cell 27 _ Notebook cell execution failed Cell 27: Cell outputs differ Input: # Now we can plot easily the results as a choropleth map! ax = shapes_data.plot( "tasmin", legend=True, legend_kwds={"label": "Minimal temperature 1993-05-20 [K]"} ) ax.set_ylabel("Latitude") ax.set_xlabel("Longitude"); Traceback: dissimilar number of outputs for key "text/plain"<<<<<<<<<<<< Reference outputs from ipynb file: <Figure size LENGTHxWIDTH with N Axes> ============ disagrees with newly computed (test) output: Text(0.5, 91.20243008191655, 'Longitude') <Figure size LENGTHxWIDTH with N Axes> >>>>>>>>>>>> ```
- Loading branch information