How to use the pysat.instruments.methods.nasa_cdaweb.list_files 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 / jro_isr.py View on Github external
'drifts_ave': pysat.datetime(2010, 1, 19),
                   'oblique_stan': pysat.datetime(2010, 4, 19),
                   'oblique_rand': pysat.datetime(2000, 11, 9),
                   'oblique_long': pysat.datetime(2010, 4, 12)}}

# support list files routine
# use the default CDAWeb method
jro_fname1 = 'jro{year:4d}{month:02d}{day:02d}'
jro_fname2 = '.{version:03d}.hdf5'
supported_tags = {ss: {'drifts': jro_fname1 + "drifts" + jro_fname2,
                       'drifts_ave': jro_fname1 + "drifts_avg" + jro_fname2,
                       'oblique_stan': jro_fname1 + jro_fname2,
                       'oblique_rand': jro_fname1 + "?" + jro_fname2,
                       'oblique_long': jro_fname1 + "?" + jro_fname2}
                  for ss in sat_ids.keys()}
list_files = functools.partial(cdw.list_files,
                               supported_tags=supported_tags)

# madrigal tags
madrigal_inst_code = 10
madrigal_tag = {'': {'drifts': 1910, 'drifts_ave': 1911, 'oblique_stan': 1800,
                     'oblique_rand': 1801, 'oblique_long': 1802}, }

# support listing files currently available on remote server (Madrigal)
list_remote_files = functools.partial(mad_meth.list_remote_files,
                                      supported_tags=supported_tags,
                                      inst_code=madrigal_inst_code)

# 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)
github pysat / pysat / pysat / instruments / gold_limb.py View on Github external
test_dates = {'cha': {'': pysat.datetime(2019, 1, 1),
                      'l2c': pysat.datetime(2019, 1, 1)}}

# specify using xarray (not using pandas)
pandas_format = False
multi_file_day = True

# specify file names
fname = ''.join(('GOLD_L1C_CHA_LIM_{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
github pysat / pysat / pysat / instruments / rocsat1_ivm.py View on Github external
import pysat

from .methods import nasa_cdaweb as cdw

platform = 'rocsat1'
name = 'ivm'
tags = {'': ''}
sat_ids = {'': ['']}
_test_dates = {'': {'': pysat.datetime(2002, 1, 1)}}


# support list files routine
# use the default CDAWeb method
fname = 'rs_k0_ipei_{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/rocsat/ipei',
             '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)
github pysat / pysat / pysat / instruments / timed_saber.py View on Github external
# We need to define a filename format string for every
# supported combination of sat_id and tag string
# fname1 = 'cnofs_vefi_bfield_1sec_{year:04d}{month:02d}{day:02d}_v05.cdf'
# fname2 = 'cnofs_vefi_acfield_1sec_{year:04d}{month:02d}{day:02d}_v05.cdf'
# supported_tags = {'sat1':{'tag1':fname1},
#                   'sat2':{'tag2':fname2}}
# you can use format keywords year, month, day, hour, min, sec,
# version and revision
# see code docstring for latest
fname = ''.join(('timed_l2av207_saber_{year:04d}{month:02d}{day:02d}',
                 '????_v01.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)

# 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
github pysat / pysat / pysat / instruments / iss_fpmu.py View on Github external
import pysat

from .methods import nasa_cdaweb as cdw

platform = 'iss'
name = 'fpmu'
tags = {'': ''}
sat_ids = {'': ['']}
_test_dates = {'': {'': pysat.datetime(2017, 10, 1)}}

# support list files routine
# use the default CDAWeb method
fname = 'iss_sp_fpmu_{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/international_space_station_iss/sp_fpmu',
             '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)
github pysat / pysat / pysat / instruments / erg_hep.py View on Github external
platform = 'erg'
name = 'hep'

# dictionary of data 'tags' and corresponding description
tags = {'': 'omni flux data'}
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,
github pysat / pysat / pysat / instruments / cnofs_plp.py View on Github external
import pysat
from .methods import nasa_cdaweb as cdw

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)
github pysat / pysat / pysat / instruments / cnofs_vefi.py View on Github external
import numpy as np

import pysat
from .methods import nasa_cdaweb as cdw

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)
github pysat / pysat / pysat / instruments / gold_occ.py View on Github external
test_dates = {'cha': {'': pysat.datetime(2019, 1, 1),
                      'l2c': pysat.datetime(2019, 1, 1)}}

# specify using xarray (not using pandas)
pandas_format = False
multi_file_day = True

# 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
github pysat / pysat / pysat / instruments / erg_mepi.py View on Github external
platform = 'erg'
name = 'mepi'

# dictionary of data 'tags' and corresponding description
tags = {'': 'omni flux data'}
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,