How to use the pysat.instruments.methods.nasa_cdaweb.load function in pysat

To help you get started, we’ve selected a few pysat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pysat / pysat / pysat / instruments / erg_lepe.py View on Github external
sat_ids = {'': ['']}
test_dates = {'': {'': pysat.datetime(2017, 4, 1)}}

remote_site = 'https://ergsc.isee.nagoya-u.ac.jp'
fname = 'erg_lepe_l2_omniflux_{year:04d}{month:02d}{day:02d}_v01_00.cdf'
supported_tags = {'': {'': fname}}
# use the CDAWeb methods list files routine
# the command below presets some of the methods inputs, leaving
# those provided by pysat available when invoked
list_files = functools.partial(cdw.list_files,
                               supported_tags=supported_tags)

# use the default CDAWeb method
# no other information needs to be supplied here
# pysatCDF is used to load data
load = cdw.load
basic_tag = {'dir': '/data/ergsc/satellite/erg/lepe/l2/omniflux/',
             'remote_fname': '{year:4d}/{month:2d}/' + fname,
             'local_fname': fname}
supported_tags = {'': {'': basic_tag}}
download = functools.partial(cdw.download, supported_tags,
                             remote_site=remote_site)

# support listing files currently on CDAWeb
list_remote_files = functools.partial(cdw.list_remote_files,
                                      remote_site=remote_site,
                                      supported_tags=supported_tags)


# code should be defined below as needed
def default(self):
    """Default customization function.
github pysat / pysat / pysat / instruments / timed_see.py View on Github external
fake_daily_files_from_monthly=True)

# support download routine
# use the default CDAWeb method
basic_tag = {'dir': '/pub/data/timed/see/data/level3a_cdf',
             'remote_fname': '{year:4d}/{month:02d}/'+fname,
             'local_fname': fname}
supported_tags = {'': {'': basic_tag}}
download = functools.partial(cdw.download, supported_tags)
# support listing files currently on CDAWeb
list_remote_files = functools.partial(cdw.list_remote_files,
                                      supported_tags=supported_tags)

# support load routine
# use the default CDAWeb method
load = functools.partial(cdw.load, fake_daily_files_from_monthly=True)


def clean(inst):
    """Routine to return TIMED SEE data cleaned to the specified level

    Parameters
    -----------
    inst : (pysat.Instrument)
        Instrument class object, whose attribute clean_level is used to return
        the desired level of data selectivity.

    Returns
    --------
    Void : (NoneType)
        data in inst is modified in-place.
github pysat / pysat / pysat / instruments / timed_saber.py View on Github external
supported_tags=supported_tags)

# let pysat know that data is spread across more than one file
multi_file_day = True

# Set to False to specify using xarray (not using pandas)
# Set to True if data will be returned via a pandas DataFrame
pandas_format = True

#
# support load routine
#
# use the default CDAWeb method
# no other information needs to be supplied here
# pysatCDF is used to load data
load = cdw.load

#
# support download routine
#
# to use the default CDAWeb method
# we need to provide additional information
# directory location on CDAWeb ftp server
# formatting template for filenames on CDAWeb
# formatting template for files saved to the local disk
# a dictionary needs to be created for each sat_id and tag
# combination along with the file format template
# outer dict keyed by sat_id, inner dict keyed by tag
basic_tag = {'dir': '/pub/data/timed/saber/level2a_v2_07_cdf',
             'remote_fname': '{year:4d}/{month:02d}/' + fname,
             'local_fname': fname}
supported_tags = {'': {'': basic_tag}}
github pysat / pysat / pysat / instruments / erg_mepe.py View on Github external
sat_ids = {'': ['']}
test_dates = {'': {'': pysat.datetime(2017, 4, 1)}}

remote_site = 'https://ergsc.isee.nagoya-u.ac.jp'
fname = 'erg_mepe_l2_omniflux_{year:04d}{month:02d}{day:02d}_v02_00.cdf'
supported_tags = {'': {'': fname}}
# use the CDAWeb methods list files routine
# the command below presets some of the methods inputs, leaving
# those provided by pysat available when invoked
list_files = functools.partial(cdw.list_files,
                               supported_tags=supported_tags)

# use the default CDAWeb method
# no other information needs to be supplied here
# pysatCDF is used to load data
load = cdw.load
basic_tag = {'dir': '/data/ergsc/satellite/erg/mepe/l2/omniflux/',
             'remote_fname': '{year:4d}/{month:2d}/' + fname,
             'local_fname': fname}
supported_tags = {'': {'': basic_tag}}
download = functools.partial(cdw.download, supported_tags,
                             remote_site=remote_site)

# support listing files currently on CDAWeb
list_remote_files = functools.partial(cdw.list_remote_files,
                                      remote_site=remote_site,
                                      supported_tags=supported_tags)


# code should be defined below as needed
def default(self):
    """Default customization function.
github pysat / pysat / pysat / instruments / gold_occ.py View on Github external
# specify file names
fname = ''.join(('GOLD_L1C_CHA_DLR_{year:4d}_{doy:03d}_{hour:02d}_',
                 '{minute:02d}_v01_r01_c01.nc'))
supported_tags = {'cha': {'': fname,
                          'l2c': fname}}

# use the CDAWeb methods list files routine
list_files = functools.partial(cdw.list_files,
                               supported_tags=supported_tags)

#
# support load routine
#
# use the default CDAWeb method
load = cdw.load

#
# support download routine
#
# to use the default CDAWeb method
# we need to provide additional information
# directory location on CDAWeb ftp server
# formatting template for filenames on CDAWeb
# formatting template for files saved to the local disk
# a dictionary needs to be created for each sat_id and tag
# combination along with the file format template
# outer dict keyed by sat_id, inner dict keyed by tag
basic_tag = {'dir': '/pub/data/gold/level1c',
             'remote_fname': '{year:4d}/{doy:03d}/' + fname,
             'local_fname': fname}
supported_tags = {'cha': {'': basic_tag}}
github pysat / pysat / pysat / instruments / cnofs_vefi.py View on Github external
platform = 'cnofs'
name = 'vefi'
tags = {'dc_b': 'DC Magnetometer data - 1 second'}
sat_ids = {'': ['dc_b']}
_test_dates = {'': {'dc_b': pysat.datetime(2009, 1, 1)}}

# support list files routine
# use the default CDAWeb method
fname = 'cnofs_vefi_bfield_1sec_{year:04d}{month:02d}{day:02d}_v05.cdf'
supported_tags = {'': {'dc_b': fname}}
list_files = functools.partial(cdw.list_files,
                               supported_tags=supported_tags)
# support load routine
# use the default CDAWeb method
load = cdw.load

# support download routine
# use the default CDAWeb method
basic_tag = {'dir': '/pub/data/cnofs/vefi/bfield_1sec',
             'remote_fname': '{year:4d}/' + fname,
             'local_fname': fname}
supported_tags = {'': {'dc_b': basic_tag}}
download = functools.partial(cdw.download, supported_tags)
# support listing files currently on CDAWeb
list_remote_files = functools.partial(cdw.list_remote_files,
                                      supported_tags=supported_tags)


def clean(inst):
    """Routine to return VEFI data cleaned to the specified level
github pysat / pysat / pysat / instruments / erg_hep.py View on Github external
sat_ids = {'': ['']}
test_dates = {'': {'': pysat.datetime(2017, 4, 1)}}

remote_site = 'https://ergsc.isee.nagoya-u.ac.jp'
fname = 'erg_hep_l2_omniflux_{year:04d}{month:02d}{day:02d}_v02_00.cdf'
supported_tags = {'': {'': fname}}
# use the CDAWeb methods list files routine
# the command below presets some of the methods inputs, leaving
# those provided by pysat available when invoked
list_files = functools.partial(cdw.list_files,
                               supported_tags=supported_tags)

# use the default CDAWeb method
# no other information needs to be supplied here
# pysatCDF is used to load data
load = cdw.load
basic_tag = {'dir': '/data/ergsc/satellite/erg/mepi/l2/omniflux/',
             'remote_fname': '{year:4d}/{month:2d}/' + fname,
             'local_fname': fname}
supported_tags = {'': {'': basic_tag}}
download = functools.partial(cdw.download, supported_tags,
                             remote_site=remote_site)

# support listing files currently on CDAWeb
list_remote_files = functools.partial(cdw.list_remote_files,
                                      remote_site=remote_site,
                                      supported_tags=supported_tags)


# code should be defined below as needed
def default(self):
    """Default customization function.
github pysat / pysat / pysat / instruments / gold_day.py View on Github external
# specify file names
fname = ''.join(('GOLD_L1C_CHA_DAY_{year:4d}_{doy:03d}_{hour:02d}_',
                 '{minute:02d}_v01_r01_c01.nc'))
supported_tags = {'cha': {'': fname,
                          'l2c': fname}}

# use the CDAWeb methods list files routine
list_files = functools.partial(cdw.list_files,
                               supported_tags=supported_tags)

#
# support load routine
#
# use the default CDAWeb method
load = cdw.load

#
# support download routine
#
# to use the default CDAWeb method
# we need to provide additional information
# directory location on CDAWeb ftp server
# formatting template for filenames on CDAWeb
# formatting template for files saved to the local disk
# a dictionary needs to be created for each sat_id and tag
# combination along with the file format template
# outer dict keyed by sat_id, inner dict keyed by tag
basic_tag = {'dir': '/pub/data/gold/level1c',
             'remote_fname': '{year:4d}/{doy:03d}/' + fname,
             'local_fname': fname}
supported_tags = {'cha': {'': basic_tag}}
github pysat / pysat / pysat / instruments / cnofs_plp.py View on Github external
platform = 'cnofs'
name = 'plp'
tags = {'': ''}
sat_ids = {'': ['']}
_test_dates = {'': {'': pysat.datetime(2009, 1, 1)}}


# support list files routine
# use the default CDAWeb method
fname = 'cnofs_plp_plasma_1sec_{year:04d}{month:02d}{day:02d}_v01.cdf'
supported_tags = {'': {'': fname}}
list_files = functools.partial(cdw.list_files,
                               supported_tags=supported_tags)
# support load routine
# use the default CDAWeb method
load = cdw.load

# support download routine
# use the default CDAWeb method
basic_tag = {'dir': '/pub/data/cnofs/plp/plasma_1sec',
             'remote_fname': '{year:4d}/' + fname,
             'local_fname': fname}
supported_tags = {'': {'': basic_tag}}
download = functools.partial(cdw.download, supported_tags)
# support listing files currently on CDAWeb
list_remote_files = functools.partial(cdw.list_remote_files,
                                      supported_tags=supported_tags)


def clean(inst):
    """Routine to return C/NOFS PLP data cleaned to the specified level
github pysat / pysat / pysat / instruments / erg_mepi.py View on Github external
sat_ids = {'': ['']}
test_dates = {'': {'': pysat.datetime(2017, 4, 1)}}

remote_site = 'https://ergsc.isee.nagoya-u.ac.jp'
fname = 'erg_mepi_l2_omniflux_{year:04d}{month:02d}{day:02d}_v01_00.cdf'
supported_tags = {'': {'': fname}}
# use the CDAWeb methods list files routine
# the command below presets some of the methods inputs, leaving
# those provided by pysat available when invoked
list_files = functools.partial(cdw.list_files,
                               supported_tags=supported_tags)

# use the default CDAWeb method
# no other information needs to be supplied here
# pysatCDF is used to load data
load = cdw.load
basic_tag = {'dir': '/data/ergsc/satellite/erg/mepi/l2/omniflux/',
             'remote_fname': '{year:4d}/{month:2d}/' + fname,
             'local_fname': fname}
supported_tags = {'': {'': basic_tag}}
download = functools.partial(cdw.download, supported_tags,
                             remote_site=remote_site)

# support listing files currently on CDAWeb
list_remote_files = functools.partial(cdw.list_remote_files,
                                      remote_site=remote_site,
                                      supported_tags=supported_tags)


# code should be defined below as needed
def default(self):
    """Default customization function.