refine pendulum example, and add resolver for netcdf