opendrift.readers.reader_cmems

Module Contents

Classes

Reader

A reader for CF-compliant netCDF files. It can take a single file, or a file pattern.

opendrift.readers.reader_cmems.logger
opendrift.readers.reader_cmems.motu_URL = http://nrt.cmems-du.eu/motu-web/Motu
opendrift.readers.reader_cmems.products
class opendrift.readers.reader_cmems.Reader(dataset, product=None, variable_mapping=None, cmems_user=None, cmems_password=None, lon_min=None, lon_max=None, lat_min=None, lat_max=None, depth_min=0, depth_max=3, time_start=datetime.now(), ID='', time_end=datetime.now() + timedelta(days=1))[source]

Bases: opendrift.readers.reader_netCDF_CF_generic.Reader

A reader for CF-compliant netCDF files. It can take a single file, or a file pattern.

Args:
param filename

A single netCDF file, or a pattern of files. The netCDF file can also be an URL to an OPeNDAP server.

type filename

string, requiered.

param name

Name of reader

type name

string, optional

param proj4

PROJ.4 string describing projection of data.

type proj4

string, optional

Example:

from opendrift.readers.reader_netCDF_CF_generic import Reader
r = Reader("arome_subset_16Nov2015.nc")

Several files can be specified by using a pattern:

from opendrift.readers.reader_netCDF_CF_generic import Reader
r = Reader("*.nc")

or an OPeNDAP URL can be used:

from opendrift.readers.reader_netCDF_CF_generic import Reader
r = Reader('https://thredds.met.no/thredds/dodsC/mepslatest/meps_lagged_6_h_latest_2_5km_latest.nc')

Common constructor for all readers

prepare(self, extent, start_time, end_time)[source]

Prepare reader for given simulation coverage in time and space.