"""Test method :meth:`~vacumm.data.misc.dataset.Dataset.get_grid` on MENOR""" # Inits ncfile = "menor.nc" # Imports from vcmq import DS, data_sample # Open ds = DS(data_sample(ncfile), 'mars', logger_level='critical') # Read grids grid = ds.get_grid() grid_t = ds.get_grid_t() grid_u = ds.get_grid_u() grid_v = ds.get_grid_v() # Read with selection subgrid = ds.get_grid(lon=(4, 5))
from vcmq import DS, data_sample, map2 # Initialisation ds = DS(data_sample('menor.nc'), 'mars', lon=(4, 5), lat=(42.5, 43.5), log_level='debug') print ds.dataset # Logging ds.info('Pratique') # -> ESSAYER WARNING ds.set_loglevel('debug') # Coordonnees lon = ds.get_lon() # -> ESSAYER AU POINT U grid = ds.get_grid() # Variables temp = ds.get_temp(level=slice(-1, None), squeeze=True) sst = ds.get_sst(squeeze=True) # -> VERIFIER ATTRIBUTS ds.info('Plot SST') map2(sst) sal = ds.get_sal(lon=(4., 4.5)) print temp.shape, sal.shape # Generique ds2 = DS(data_sample('mfs.nc'), 'nemo', lon=(4, 5), lat=(42.5, 43.5)) sst2 = ds2.get_sst(squeeze=True) # -> VERIFIER ATTRIBUTS # Plus evolue