Skip to content

Commit

Permalink
STY: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Several suggestions from code review, including code style and docstring typos.

Co-authored-by: Russell Stoneback <rstoneba@utdallas.edu>
  • Loading branch information
aburrell and rstoneback committed Oct 15, 2020
1 parent d9f3247 commit f316ad9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 5 additions & 6 deletions pysatMadrigal/instruments/gnss_tec.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def init(self):
" Array Center, Institut Geographique National, ",
"France, International GNSS Service, The Crustal ",
"Dynamics Data Information System (CDDIS), National ",
" Geodetic Survey, Instituto Brasileiro de Geografia",
"Geodetic Survey, Instituto Brasileiro de Geografia",
"e Estatística, RAMSAC CORS of Instituto Geográfico",
" Nacional del la República Agentina, Arecibo ",
"Observatory, Low-Latitude Ionospheric Sensor ",
Expand Down Expand Up @@ -128,14 +128,13 @@ def download(date_array, tag='', inst_id='', data_path=None, user=None,
Tag identifier used for particular dataset. This input is provided by
pysat. (default='')
inst_id : string
Satellite ID string identifier used for particular dataset. This input
Instrument ID string identifier used for particular dataset. This input
is provided by pysat. (default='')
data_path : string
Path to directory to download data to. (default=None)
user : string
User string input used for download. Provided by user and passed via
pysat. If an account is required for dowloads this routine here must
error if user not supplied. (default=None)
pysat. (default=None)
password : string
Password for data download. (default=None)
url : string
Expand Down Expand Up @@ -175,11 +174,11 @@ def load(fnames, tag=None, inst_id=None, file_format='netCDF4'):
tag name used to identify particular data set to be loaded.
This input is nominally provided by pysat itself. (default=None)
inst_id : string or NoneType
Satellite ID used to identify particular data set to be loaded.
Instrument ID used to identify particular data set to be loaded.
This input is nominally provided by pysat itself. (default=None)
file_format : string
File format for Madrigal data. Currently only accepts 'hdf5' and
'netCDF4', but any of the Madrigal options may be used here.
'netCDF4', but any of the supported Madrigal options may be used here.
(default='netCDF4')
Returns
Expand Down
2 changes: 1 addition & 1 deletion pysatMadrigal/instruments/jro_isr.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def load(fnames, tag=None, inst_id=None, file_format='hdf5'):
tag name used to identify particular data set to be loaded.
This input is nominally provided by pysat itself. (default=None)
inst_id : string or NoneType
Satellite ID used to identify particular data set to be loaded.
Instrument ID used to identify particular data set to be loaded.
This input is nominally provided by pysat itself. (default=None)
file_format : string
File format for Madrigal data. Currently only accept 'netcdf4' and
Expand Down
4 changes: 3 additions & 1 deletion pysatMadrigal/instruments/methods/madrigal.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def load(fnames, tag=None, inst_id=None, xarray_coords=[], file_format='hdf5'):
xarray_coords=[{('time',): ['year', 'doy'],
('time', 'gdalt'): ['data1', 'data2']}]. (default=[])
file_format : string
File format for Madrigal data. Currently only accept 'netcdf4' and
File format for Madrigal data. Currently only accepts 'netcdf4' and
'hdf5'. (default='hdf5')
Returns
Expand Down Expand Up @@ -101,6 +101,8 @@ def load(fnames, tag=None, inst_id=None, xarray_coords=[], file_format='hdf5'):
meta[name_string.lower()] = {'long_name': name_string,
'units': unit_string,
'desc': desc_string}
# remove any metadata from xarray
file_data[item].attrs = {}

# Add an index
file_data = file_data.rename({'timestamps': 'time'})
Expand Down

0 comments on commit f316ad9

Please sign in to comment.