noawclg


Namenoawclg JSON
Version 0.0.7.1 PyPI version JSON
download
home_pagehttps://github.com/reinanbr/noawclg
SummaryLibrary for getting dataset from noaa site
upload_time2024-01-07 21:53:26
maintainer
docs_urlNone
authorReinan Br
requires_python
licenseGPLv3
keywords climate weather noaa
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<h1 align='center'>NOAWClg</h1>
<p align='center'>

<br/>
<a href="https://github.com/perseu912"><img title="Autor" src="https://img.shields.io/badge/Autor-reinan_br-blue.svg?style=for-the-badge&logo=github"></a>
<!-- <br/>
<a href='http://dgp.cnpq.br/dgp/espelhogrupo/0180330616769073'><img src='https://shields.io/badge/cnpq-grupo_de_fisica_computacional_ifsertao--pe-blueviolet?logo=appveyor&style=for-the-badge'></a> -->

<p align='center'>
<!-- github dados --
<!-- sites de pacotes -->
<a href='https://pypi.org/project/noaawc/'><img src='https://img.shields.io/pypi/v/noawclg'></a>
<a href='#'><img src='https://img.shields.io/pypi/wheel/noawclg'></a>
<a href='#'><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/noawclg"></a>
<img alt="PyPI - License" src="https://img.shields.io/pypi/l/noawclg">
<br/>
<!-- outros premios e analises -->
<!-- <a href='#'><img alt="CodeFactor Grade" src="https://img.shields.io/codefactor/grade/github/perseu912/noawclg?logo=codefactor">
</a> -->
<!-- redes sociais -->
<a href='https://instagram.com/gpftc_ifsertao/'><img src='https://shields.io/badge/insta-gpftc_ifsertao-darkviolet?logo=instagram&style=flat'></a>
<a href='https://discord.gg/pFZP86gvEm'><img src='https://img.shields.io/discord/856582838467952680.svg?label=discord&logo=discord'></a>

</p>
</p>
<p align='center'> <b>Library for getting  the world data climate from the data noaa/nasa</b></p>
<hr/>

## Instalation

```sh
$ pip3 install noawcgl -U
```

<br>

#### Problem with netcdf?


try:

```sh
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libhdf5-serial-dev
sudo apt-get install libnetcdf-dev


export HDF5_DIR=/usr/local/hdf5
export HDF5_DIR=/usr/include/hdf5

pip install netcdf4
```

or

```sh
sudo apt-get install libhdf5-serial-dev netcdf-bin libnetcdf-dev

export HDF5_DIR=/usr/local/hdf5
export HDF5_DIR=/usr/include/hdf5

pip install netcdf4
```
<hr>

## Examples
### getting data
<br>

#### from a point
getting the data:
```py
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)
```

```sh
{'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
you can see the all keys in <a href='https://github.com/reinanbr/noawclg/blob/main/key.log'>it page.</a> 
```py
>>> 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
```py
import noawclg.main as main
from noawclg.main import get_noaa_data as gnd
from noawclg.plot import plot_data_from_place as pdp
import matplotlib.pyplot as plt
#plt.style.use('dark_background')
#reinan voltou, porrrrraaaaaaaaa

date_base = '12/01/2023'

main.set_date(date_base)
data_noaa = gnd()#,url_data='https://nomads.ncep.noaa.gov/dods/gfs_1p00/gfs20220108/gfs_1p00_00z')

place = 'juazeiro BA'

jua_pet = pdp(place=place,data=data_noaa)

jua_pet.path_file='plot_wind100m.png'

jua_pet.key_noaa='tmp80m'
jua_pet.title='Temperatura do Ar\nPetrolina-PE/Juazeiro-BA'
jua_pet.ylabel='°C'
jua_pet.xlabel='Janeiro de 2023'

def fmt_data(data): return data-273
jua_pet.fmt_data =  fmt_data

jua_pet.render()
#plt.show()



```
result:
<img src='https://raw.githubusercontent.com/reinanbr/noawclg/main/plot_wind100m.png'/>



<!-- the truest Reinan 13/01/23 01:58 :siga a rotina criada -->
<!-- N se molde por ninguem e pra ninguem -->
<!-- se precisar, abndone todos os complexos-->
<!-- fique com qualquer uma, transe com quiem quiser transar ctg 10:15 14/01/23-->
<!-- e demonstre isso em suas redes sociais, para vim mais-->

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/reinanbr/noawclg",
    "name": "noawclg",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "climate weather noaa",
    "author": "Reinan Br",
    "author_email": "slimchatuba@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "\n<h1 align='center'>NOAWClg</h1>\n<p align='center'>\n\n<br/>\n<a href=\"https://github.com/perseu912\"><img title=\"Autor\" src=\"https://img.shields.io/badge/Autor-reinan_br-blue.svg?style=for-the-badge&logo=github\"></a>\n<!-- <br/>\n<a href='http://dgp.cnpq.br/dgp/espelhogrupo/0180330616769073'><img src='https://shields.io/badge/cnpq-grupo_de_fisica_computacional_ifsertao--pe-blueviolet?logo=appveyor&style=for-the-badge'></a> -->\n\n<p align='center'>\n<!-- github dados --\n<!-- sites de pacotes -->\n<a href='https://pypi.org/project/noaawc/'><img src='https://img.shields.io/pypi/v/noawclg'></a>\n<a href='#'><img src='https://img.shields.io/pypi/wheel/noawclg'></a>\n<a href='#'><img alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/noawclg\"></a>\n<img alt=\"PyPI - License\" src=\"https://img.shields.io/pypi/l/noawclg\">\n<br/>\n<!-- outros premios e analises -->\n<!-- <a href='#'><img alt=\"CodeFactor Grade\" src=\"https://img.shields.io/codefactor/grade/github/perseu912/noawclg?logo=codefactor\">\n</a> -->\n<!-- redes sociais -->\n<a href='https://instagram.com/gpftc_ifsertao/'><img src='https://shields.io/badge/insta-gpftc_ifsertao-darkviolet?logo=instagram&style=flat'></a>\n<a href='https://discord.gg/pFZP86gvEm'><img src='https://img.shields.io/discord/856582838467952680.svg?label=discord&logo=discord'></a>\n\n</p>\n</p>\n<p align='center'> <b>Library for getting  the world data climate from the data noaa/nasa</b></p>\n<hr/>\n\n## Instalation\n\n```sh\n$ pip3 install noawcgl -U\n```\n\n<br>\n\n#### Problem with netcdf?\n\n\ntry:\n\n```sh\nsudo add-apt-repository universe\nsudo apt-get update\nsudo apt-get install libhdf5-serial-dev\nsudo apt-get install libnetcdf-dev\n\n\nexport HDF5_DIR=/usr/local/hdf5\nexport HDF5_DIR=/usr/include/hdf5\n\npip install netcdf4\n```\n\nor\n\n```sh\nsudo apt-get install libhdf5-serial-dev netcdf-bin libnetcdf-dev\n\nexport HDF5_DIR=/usr/local/hdf5\nexport HDF5_DIR=/usr/include/hdf5\n\npip install netcdf4\n```\n<hr>\n\n## Examples\n### getting data\n<br>\n\n#### from a point\ngetting the data:\n```py\nfrom noawclg import get_noaa_data as gnd\n\npoint = (-9.41,-40.5)\n\ndata = gnd.get_data_from_point(point)\n\n# a example for the surface temperature\ndata = {'time':data['time'],'data':data['tmpsfc']}\n\nprint(data)\n```\n\n```sh\n{'time': <xarray.IndexVariable 'time' (time: 129)>\narray(['2022-01-01T00:00:00.000000000', '2022-01-01T03:00:00.000000000',\n       '2022-01-01T06:00:00.000000000', '2022-01-01T09:00:00.000000000',\n       '2022-01-01T12:00:00.000000000', \n...\n```\n\n### keys\nyou can see the all keys in <a href='https://github.com/reinanbr/noawclg/blob/main/key.log'>it page.</a> \n```py\n>>> from noawclg import get_noaa_data as  gnd\n\n>>> gnd().get_noaa_keys()\n\n\n{'time': 'time', \n'lev': 'altitude', \n'lat': 'latitude', \n'lon': 'longitude', \n'absvprs': '** (1000 975 950 925 900.. 10 7 4 2 1) absolute vorticity [1/s] ',\n 'no4lftxsfc': '** surface best (4 layer) lifted index [k] ', \n 'acpcpsfc': '** surface convective precipitation [kg/m^2] ', \n 'albdosfc': '** surface albedo [%] ',\n  'apcpsfc': '** surface total precipitation [kg/m^2] ', \n  'capesfc': '** surface convective available potential energy [j/kg] ', \n...\n```\n\n### example plot wind\n```py\nimport noawclg.main as main\nfrom noawclg.main import get_noaa_data as gnd\nfrom noawclg.plot import plot_data_from_place as pdp\nimport matplotlib.pyplot as plt\n#plt.style.use('dark_background')\n#reinan voltou, porrrrraaaaaaaaa\n\ndate_base = '12/01/2023'\n\nmain.set_date(date_base)\ndata_noaa = gnd()#,url_data='https://nomads.ncep.noaa.gov/dods/gfs_1p00/gfs20220108/gfs_1p00_00z')\n\nplace = 'juazeiro BA'\n\njua_pet = pdp(place=place,data=data_noaa)\n\njua_pet.path_file='plot_wind100m.png'\n\njua_pet.key_noaa='tmp80m'\njua_pet.title='Temperatura do Ar\\nPetrolina-PE/Juazeiro-BA'\njua_pet.ylabel='\u00b0C'\njua_pet.xlabel='Janeiro de 2023'\n\ndef fmt_data(data): return data-273\njua_pet.fmt_data =  fmt_data\n\njua_pet.render()\n#plt.show()\n\n\n\n```\nresult:\n<img src='https://raw.githubusercontent.com/reinanbr/noawclg/main/plot_wind100m.png'/>\n\n\n\n<!-- the truest Reinan 13/01/23 01:58 :siga a rotina criada -->\n<!-- N se molde por ninguem e pra ninguem -->\n<!-- se precisar, abndone todos os complexos-->\n<!-- fique com qualquer uma, transe com quiem quiser transar ctg 10:15 14/01/23-->\n<!-- e demonstre isso em suas redes sociais, para vim mais-->\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Library for getting dataset from noaa site",
    "version": "0.0.7.1",
    "project_urls": {
        "Homepage": "https://github.com/reinanbr/noawclg"
    },
    "split_keywords": [
        "climate",
        "weather",
        "noaa"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "684eeb6a7bab7d44bd19597f20fb0dba2d04c9f37eae6d8ca65e9dc87089ed8b",
                "md5": "b00282315b7faa04f14fa14991f4d7d3",
                "sha256": "4ce7c2f8ea471260fc07cadea41abedf79ba00204c30ed88181434225b35be67"
            },
            "downloads": -1,
            "filename": "noawclg-0.0.7.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b00282315b7faa04f14fa14991f4d7d3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18734,
            "upload_time": "2024-01-07T21:53:26",
            "upload_time_iso_8601": "2024-01-07T21:53:26.951516Z",
            "url": "https://files.pythonhosted.org/packages/68/4e/eb6a7bab7d44bd19597f20fb0dba2d04c9f37eae6d8ca65e9dc87089ed8b/noawclg-0.0.7.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-07 21:53:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "reinanbr",
    "github_project": "noawclg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "noawclg"
}
        
Elapsed time: 0.38663s