Library for getting dataset from noaa site
Project description
NOAWClg
Library for getting the world data climate from the data noaa/nasa
Instalation
$ pip3 install noawcgl -U
note: netcdf=1.5.7 | xarray=0.20.1
Examples
getting data
from a point
getting the data:
from noawclg import get_noaa_data as gnd
point = (-9.41,-40.5)
data = gnd.get_data_from_point(point)
# a example for the surface temperature
data = {'time':data['time'],'data':data['tmpsfc']}
print(data)
{'time': <xarray.IndexVariable 'time' (time: 129)>
array(['2022-01-01T00:00:00.000000000', '2022-01-01T03:00:00.000000000',
'2022-01-01T06:00:00.000000000', '2022-01-01T09:00:00.000000000',
'2022-01-01T12:00:00.000000000',
...
keys
>>> from noawclg import get_noaa_data as gnd
>>> gnd().get_noaa_keys()
{'time': 'time',
'lev': 'altitude',
'lat': 'latitude',
'lon': 'longitude',
'absvprs': '** (1000 975 950 925 900.. 10 7 4 2 1) absolute vorticity [1/s] ',
'no4lftxsfc': '** surface best (4 layer) lifted index [k] ',
'acpcpsfc': '** surface convective precipitation [kg/m^2] ',
'albdosfc': '** surface albedo [%] ',
'apcpsfc': '** surface total precipitation [kg/m^2] ',
'capesfc': '** surface convective available potential energy [j/kg] ',
...
example plot wind
from noawclg.main import get_noaa_data as gnd
data_noaa = gnd(gfs='1p00')#,url_data='https://nomads.ncep.noaa.gov/dods/gfs_1p00/gfs20220108/gfs_1p00_00z')
place = 'juazeiro BA'
print(data_noaa.get_noaa_keys())
# ## rain's (mm)
# def fmt(data): return data* 100_000
# data_noaa.plot_data_from_place(place=place,path_file='plot_ch1.png',
# title='Previsão de Chuvas\nPetrolina-PE/Juazeiro-BA',
# ylabel='mm',fmt_data=fmt,key_noaa='prateavesfc')
## temperature (ºC)
def fmt_t(data): return data
data_noaa.plot_data_from_place(place=place,path_file='plot_wind100m.png',
title='Velocidade dos Ventos\nPetrolina-PE/Juazeiro-BA',
ylabel='m/s',fmt_data=fmt_t,key_noaa='vgrdmwl')
result:
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
noawclg-0.0.4.5-py3-none-any.whl
(17.8 kB
view hashes)
Close
Hashes for noawclg-0.0.4.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4b008a5c8939133b9838b5904ef81a3eedf899bffe843fca514a42a30e73be2 |
|
MD5 | 6105e6d6dc43d50fdff3a774e2ed7936 |
|
BLAKE2b-256 | 046d25a4d041db442c6be628524fff804c740f4527b4d80ca283b1aacd6bf8d3 |