Code Monkey home page Code Monkey logo

mettoolbox's Introduction

Tests Test Coverage Latest release BSD-3 clause license mettoolbox downloads PyPI - Python Version

mettoolbox

The mettoolbox is set of command line and Python tools for the analysis and calculation of meteorologic data.

Installation

Should be as easy as running pip install mettoolbox or easy_install mettoolbox at any command line.

Usage - Command Line

Just run 'mettoolbox --help' to get a list of subcommands:

usage: mettoolbox [-h] [-v] {disaggregate,pet,ret,indices,about} ...

positional arguments:
  {disaggregate,pet,ret,indices,about}
    disaggregate        disaggregate subcommand
    pet                 pet subcommand
    ret                 ret subcommand
    indices             indices subcommand
    about               Display version number and system information.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit

Usage - Python

from mettoolbox import mettoolbox
df = mettoolbox.disaggregate.temperature('sine_min_max', ['degC', 'degC'], temp_min_col=1, temp_max_col=2)

mettoolbox's People

Contributors

deepsourcebot avatar sourcery-ai[bot] avatar tbongiov avatar timcera avatar timothycera-noaa avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tbongiov

mettoolbox's Issues

temp_min_col and temp_max_col should accept column names

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [36], in <cell line: 7>()
    153     bias = np.mean(temp_ts.Tmin - temp_ts_fill.Tmin)
    154     temp_ts["Tmin"].fillna(temp_ts_fill["Tmin"] + bias, inplace=True)
--> 156 temp_disaggregate = met.disaggregate.temperature(
    157     input_ts=temp_ts,
    158     temp_min_col="Tmin",
    159     temp_max_col="Tmax",
    160     method="sine_min_max",
    161     min_max_time="sun_loc",
    162     source_units=["degF", "degF"],
    163     lat=station["Latitude"],
    164     lon=station["Longitude"],
    165     target_units=["degF"],
    166 )
    167 missing_info.iloc[i, 4] = len(temp_ts["Tmax"][temp_ts["Tmax"].isna()])
    168 missing_info.iloc[i, 5] = len(temp_ts["Tmin"][temp_ts["Tmin"].isna()])

File /beohome/a/ScientificProgramSupport/local/pythons/python3.8.6/lib64/python3.8/site-packages/typic/api.py:189, in wrap.<locals>.func_wrapper(*args, **kwargs)
    186 @functools.wraps(func)
    187 def func_wrapper(*args, **kwargs):
    188     args, kwargs = enforcer(*args, **kwargs)
--> 189     return func(*args, **kwargs)

File /beohome/a/ScientificProgramSupport/local/pythons/python3.8.6/lib64/python3.8/site-packages/mettoolbox/disaggregate.py:135, in temperature(method, source_units, min_max_time, mod_nighttime, input_ts, start_date, end_date, dropna, clean, round_index, skiprows, index_type, names, print_input, target_units, max_delta, temp_min_col, temp_max_col, temp_mean_col, lat, lon, hourly)
    133 columns = []
    134 try:
--> 135     temp_min_col = int(temp_min_col)
    136 except TypeError:
    137     pass

ValueError: invalid literal for int() with base 10: 'Tmin'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.