Created
April 1, 2014 12:30
-
-
Save adcroft/9913006 to your computer and use it in GitHub Desktop.
Plots versions of tidal amplitude file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import netCDF4 | |
| import numpy | |
| import m6plot | |
| lon = netCDF4.Dataset('/archive/gold/datasets/MOM6z_SIS_025/siena/mosaic.unpacked/ocean_hgrid.nc').variables['x'][::2,::2] | |
| lat = netCDF4.Dataset('/archive/gold/datasets/MOM6z_SIS_025/siena/mosaic.unpacked/ocean_hgrid.nc').variables['y'][::2,::2] | |
| area = netCDF4.Dataset('/net2/aja/OWG/ocean_static.nc').variables['area_t'][:] | |
| U26 = netCDF4.Dataset('/net2/aja/MOM6.workdir/MOM6/tools/python/tideamp/tidal_amplitude.v20140326.nc').variables['tideamp'][:] | |
| U28 = netCDF4.Dataset('/archive/gold/datasets/MOM6z_SIS_025/siena/INPUT/tidal_amplitude.v20140328.nc').variables['tideamp'][:] | |
| m6plot.xyplot( U26, lon, lat, area=area, cLim=[0.,.005,.01,.02,.05,.1,.2,.5,1.,2.], colormap='spectral', title=r'$U_{tides}$ [m/s]', suptitle='Original', show=True) | |
| m6plot.xyplot( U28, lon, lat, area=area, cLim=[0.,.005,.01,.02,.05,.1,.2,.5,1.,2.], colormap='spectral', title=r'$U_{tides}$ [m/s]', suptitle='Re-processesed', show=True) | |
| m6plot.xyplot( U28/U26, lon, lat, area=area, colormap='jet', title=r'Ratio new/old of $U_{tides}$', show=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment