lb_toolkits Library for Meteorology and Remote Sensing
Project description
lb_toolkits
安装命令:
python -m pip install lb_toolkits
python -m pip install --upgrade lb_toolkits
更新记录
更新日期 | 库名 | 文件 | 函数名 | 功能 |
---|---|---|---|---|
2022年8月13日 | tools | modis2tif | modis2tif | 将MODIS产品hdf文件进行投影转换,输出geotif可处理MODIS 5分钟段产品和sin grid产品文件 |
2022年8月6日 | tools | nc2tif | nc2tif | 将NC文件中的数据集转成geotif |
2022年8月6日 | tools | tifpro | readtiff | 读取geotif数据 |
2022年8月6日 | tools | tifpro | writetiff | 写入geotif数据 |
2022年8月1日 | downloadcentre | downloadERA5 | download_era5_profile | 下载ERA5廓线数据 |
2022年8月1日 | downloadcentre | downloadERA5 | download_era5_profile | 下载ERA5地表数据 |
2022年8月1日 | downloadcentre | downloadGFS | downloadGFS | 下载GFS数据 |
2022年8月1日 | downloadcentre | downloadLandsat | searchlandsat | 通过设置查找条件,返回匹配满足条件的数据ID |
2022年8月1日 | downloadcentre | downloadLandsat | downloadlandsat | 根据返回的数据ID,下载相应的文件 |
2022年8月1日 | downloadcentre | downloadSentinel | downloadSentinel | 下载哨兵数据,支持下载Sentinel-1、Sentinel-2、 Sentinel-3、Sentinel-5P |
2022年8月1日 | downloadcentre | downloadH8 | download_ahi8_l1_netcdf | 下载葵花8号卫星L1 NetCDF数据文件 |
2022年8月1日 | downloadcentre | downloadH8 | download_ahi8_l1_hsd | 下载葵花8号卫星L1 HSD数据文件 |
2022年8月1日 | tools | hdfpro | readhdf | 读取hdf5文件, 返回数据(也可返回数据集属性信息) |
2022年8月1日 | tools | hdfpro | readhdf_fileinfo | 读取hdf5文件全局属性, 返回文件全局属性信 |
2022年8月1日 | tools | hdfpro | writehdf | 写入hdf5文件 |
2022年8月1日 | tools | hdfpro | writehdf_fileinfo | 写入hdf5文件全局属性 |
2022年8月1日 | tools | hdf4pro | readhdf4 | 读取hdf4文件, 返回数据(也可返回数据集属性信息) |
2022年8月1日 | tools | hdf4pro | readhdf4sdsattrs | 读取hdf4文件数据集属性信息 |
2022年8月1日 | tools | hdf4pro | readhdf4fileattrs | 读取hdf4文件全局属性信息 |
2022年8月1日 | tools | ncpro | readnc | 读取netcdf4文件, 返回数据(也可返回数据集属性信息) |
2022年8月1日 | tools | ncpro | readnc_fileinfo | 读取netcdf4文件全局属性信息 |
2022年8月1日 | tools | ncpro | readnc_sdsinfo | 读取netcdf4文件数据集属性信息 |
2022年8月1日 | tools | ncpro | writenc | 写入netcdf4文件数据集 |
2022年8月1日 | tools | ncpro | writenc_fileinfo | 写入netcdf4文件全局属性 |
2022年8月1日 | tools | ncpro | writenc_sdsinfo | 写入netcdf4文件数据集属性 |
2022年8月1日 | tools | ncpro | writencfortimes | 写入netcdf4文件**时间戳**数据集 |
2022年8月1日 | tools | jsonpro | readjson | 读取json文件, 返回dict |
2022年8月1日 | tools | jsonpro | writejson | 写入json文件 |
依赖库
库名 | 版本号 |
---|---|
numpy | 1.2.0 |
pyhdf | 0.10.0 |
h5py | 1.0.0 |
netcdf4 | 1.0.0 |
tqdm | 4.0.0 |
gdal | 2.0.0 |
pillow | 7.0.0 |
paramiko | 2.10.0 |
cdsapi | 0.5.0 |
landsatxplore | 0.10.0 |
sentinelsat | 1.1.0 |
downloadcentre
支持各类数据下载,例如:ERA5、GFS、AHI8、LandSat、Sentinel
downloadERA5:
- download_era5_profile: 下载ERA5的大气分层数据
download_era5_profile(strdate,outname, prof_info, area_info=None,m_client=None, redownload=False)
- download_era5_surface: 下载ERA5的地表数据
download_era5_surface(strdate, outname, surf_info, area_info=None, m_client=None, redownload=False)
downloadGFS:
- downloadGFS: 下载GFS的预报数据
downloadGFS(outdir, nowdate, issuetime=0, forecasttime=[0], regoin=[0.0, 360.0, 90.0, -90.0])
downloadLandsat:
- searchlandsat: 通过设置查找条件,匹配满足条件的数据ID
searchlandsat(username, password, product,
longitude=None,
latitude=None,
bbox=None,
cloud_cover_max=None,
startdate=None,
enddate=None,
months=None,
max_results=100)
- downloadlandsat: 根据返回的数据ID,下载相应的文件
downloadlandsat(username, password, Landsat_name, output_dir, scene_id=None, retry=3, timeout=5*60)
downloadSentinel:
- downloadSentinel: 下载哨兵数据,支持下载Sentinel-1、Sentinel-2、 Sentinel-3、Sentinel-5P
downloadSentinel(username, password, starttime, endtime, outpath='./',
platformname='Sentinel-2', producttype='S2MSI2A',
footprint=None, geojson = None, filename='*', **keywords)
tools
1、对hdf4、hdf5、netcdf4、tiff、json、grib1/2、ASCII文件操作
2、通过ftp、sftp、wget、爬虫下载相关文件
hdfpro
- readhdf: 读取hdf5文件, 返回数据(也可返回数据集属性信息)
readhdf(filename, sdsname, dictsdsinfo=None)
- readhdf_fileinfo: 读取hdf5文件全局属性, 返回文件全局属性信息
readhdf_fileinfo(filename)
- writehdf: 写入hdf5文件
writehdf(filename, sdsname, data, overwrite=True,
dictsdsinfo = None, dictfileinfo = None,
compression = 9, info = False)
- writehdf_fileinfo: 写入hdf5文件全局属性
writehdf_fileinfo(filename, sdsname, data, overwrite=True,
dictsdsinfo = None, dictfileinfo = None,
compression = 9, info = False)
hdf4pro
- readhdf4: 读取hdf4文件, 返回数据(也可返回数据集属性信息)
readhdf4(h4file, sdsname, dictsdsattrs=None, dictfileattrs=None)
- readhdf4sdsattrs: 读取hdf4文件数据集属性信息
readhdf4sdsattrs(h4file, sdsname)
- readhdf4fileattrs: 读取hdf4文件全局属性信息
readhdf4fileattrs(h4file)
ncpro
- readnc: 读取netcdf4文件, 返回数据(也可返回数据集属性信息)
readnc(filename, sdsname, dictsdsinfo=None)
- readnc_fileinfo: 读取netcdf4文件全局属性信息
readnc_fileinfo(filename)
- readnc_sdsinfo: 读取netcdf4文件数据集属性信息
readnc_sdsinfo(filename, sdsname)
- writenc: 写入netcdf4文件数据集
writenc(filename, sdsname, srcdata, dimension=None, overwrite=1,
complevel=9, dictsdsinfo=None, fill_value=None,
standard_name=None, long_name=None, description=None, units=None,
valid_range=None,
scale_factor=None, add_offset=None, **kwargs)
- writenc_fileinfo: 写入netcdf4文件全局属性
writenc_fileinfo(filename, dictfileinfo, overwrite=1)
- writenc_sdsinfo: 写入netcdf4文件数据集属性
writenc_sdsinfo(filename, sdsname, dictsdsinfo, overwrite=1)
- writencfortimes: 写入netcdf4文件时间戳数据集
writencfortimes(filename, sdsname, srcdata, overwrite=1,
units = 'hours since 1900-01-01 00:00:00.0',
calendar = "gregorian",
complevel=9, dictsdsinfo=None)
jsonpro
- readjson: 读取json文件, 返回dict
readjson(jsonname, **kwargs)
- writejson: 写入json文件
writejson(jsonname, dict_info, indent=4, chinese=False)
- readbinary: 读取二进制文件
readbinary(filename, shape, dtype=np.float32, offset=0, encodine='utf-8')
- writebinary: 写入二进制文件
writebinary(filename, data, overwrite=1, offset=0, encodine='utf-8')
- readascii: 读取ASCII文件
readascii(filename, dtype=float, comments='#', delimiter=None,
converters=None, skiprows=0, usecols=None, unpack=False,
ndmin=0, encoding='bytes', max_rows=None)
- writeascii: 写入ASCII文件
writeascii(filename, data, fmt='%.18e', delimiter=' ', newline='\n', header='',
footer='', comments='# ', encoding=None)
- loadarray: 读取npy文件
loadarray(file, mmap_mode=None, allow_pickle=False, fix_imports=True, encoding='ASCII')
- savearray: 写入npy文件
savearray(filename, data, allow_pickle=True, fix_imports=True)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lb_toolkits-1.1.10.tar.gz
(7.6 MB
view hashes)
Built Distribution
Close
Hashes for lb_toolkits-1.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e1c6081e14fe7823d110b71cfd50e0c97c89b120b5acdaecce3864b11ffcae0 |
|
MD5 | eec042fef6ee7d63ad2e3e4698e9b438 |
|
BLAKE2b-256 | 6dd8b4b1a288ed85d3da68e359ec3524ab1721e6259639d6b4f2a17fac11e39a |