|
| 1 | +--- |
| 2 | +title: Open-Meteo API NICAM16_8S Climate Reanalysis & Forecasts |
| 3 | +--- |
| 4 | +[***Return To WxData Wiki Main Page***](https://github.com/edrewitz/WxData/wiki) |
| 5 | +# Open-Meteo API NICAM16_8S Climate Reanalysis & Forecasts |
| 6 | + |
| 7 | +```python |
| 8 | +def nicam16_8s(latitude, |
| 9 | + longitude, |
| 10 | + start_date='1950-01-01', |
| 11 | + end_date='2050-12-31', |
| 12 | + temperature_units='fahrenheit', |
| 13 | + wind_speed_units='mph', |
| 14 | + precipitation_units='inch', |
| 15 | + variables=['temperature_2m_max', |
| 16 | + 'temperature_2m_mean', |
| 17 | + 'temperature_2m_min', |
| 18 | + 'wind_speed_10m_mean', |
| 19 | + 'wind_speed_10m_max', |
| 20 | + 'cloud_cover_mean', |
| 21 | + 'shortwave_radiation_sum', |
| 22 | + 'relative_humidity_2m_mean', |
| 23 | + 'dew_point_2m_mean', |
| 24 | + 'precipitation_sum', |
| 25 | + 'rain_sum', |
| 26 | + 'snowfall_sum', |
| 27 | + 'pressure_msl_mean', |
| 28 | + 'relative_humidity_2m_max', |
| 29 | + 'relative_humidity_2m_min', |
| 30 | + 'dew_point_2m_min', |
| 31 | + 'dew_point_2m_max'], |
| 32 | + proxies=None, |
| 33 | + to_csv=False, |
| 34 | + path=f"Open Meteo Data/Climate/NICAM16_8S", |
| 35 | + filename=f"NICAM16_8S.csv"): |
| 36 | +``` |
| 37 | + |
| 38 | +This function retrieves daily NICAM16_8S climate data from the Open-Meteo API for a given point of latitude/longitude. |
| 39 | + |
| 40 | +Required Arguments: |
| 41 | + |
| 42 | +1) latitude (Float or Integer) - Latitude in decimal degrees. |
| 43 | + |
| 44 | +2) longitude (Float or Integer) - Longitude in decimal degrees. |
| 45 | + |
| 46 | +Optional Arguments: |
| 47 | + |
| 48 | +1) start_date (String) - Default='1950-01-01'. Start date in the format of 'YYYY-mm-dd'. Record begins at 1950-01-01. |
| 49 | + |
| 50 | +2) end_date (String) - Default='2050-12-31'. End date in the format of 'YYYY-mm-dd'. Record ends at 2050-12-31. |
| 51 | + |
| 52 | +3) temperature_units (String) - Default='fahrenheit'. The units for temperature. |
| 53 | + |
| 54 | + Valid Temperature Units |
| 55 | + ----------------------- |
| 56 | + |
| 57 | + 1) fahrenheit |
| 58 | + 2) celsius |
| 59 | + |
| 60 | +4) wind_speed_units (String) - Default='mph'. The units for wind speed. |
| 61 | + |
| 62 | + Valid Wind Speed Units |
| 63 | + ---------------------- |
| 64 | + |
| 65 | + 1) mph - miles per hour |
| 66 | + 2) kmh - kilometers per hour |
| 67 | + 3) ms - meters per second |
| 68 | + 4) kn - knots |
| 69 | + |
| 70 | +5) precipitation_units (String) - Default='inch'. The units for precipitation amounts. |
| 71 | + |
| 72 | + Valid Precipitation Units |
| 73 | + ------------------------- |
| 74 | + |
| 75 | + 1) inch - inches |
| 76 | + 2) mm - millimeters |
| 77 | + |
| 78 | +6) variables (String List) - Default=['temperature_2m_max', |
| 79 | + 'temperature_2m_mean', |
| 80 | + 'temperature_2m_min', |
| 81 | + 'wind_speed_10m_mean', |
| 82 | + 'wind_speed_10m_max', |
| 83 | + 'cloud_cover_mean', |
| 84 | + 'shortwave_radiation_sum', |
| 85 | + 'relative_humidity_2m_mean', |
| 86 | + 'dew_point_2m_mean', |
| 87 | + 'precipitation_sum', |
| 88 | + 'rain_sum', |
| 89 | + 'snowfall_sum', |
| 90 | + 'pressure_msl_mean', |
| 91 | + 'relative_humidity_2m_max', |
| 92 | + 'relative_humidity_2m_min', |
| 93 | + 'dew_point_2m_min', |
| 94 | + 'dew_point_2m_max'] |
| 95 | + |
| 96 | +7) proxies (dict or None) - Default=None. If the user is using a proxy server, the user must change the following: |
| 97 | + ```python |
| 98 | + proxies=None ---> proxies={ |
| 99 | + 'http':'http://your-proxy-address:port', |
| 100 | + 'https':'http://your-proxy-address:port' |
| 101 | + } |
| 102 | + ``` |
| 103 | +8) to_csv (Boolean) - Default=False. When set to True the data will be saved as a CSV file to {path} with {filename} |
| 104 | + |
| 105 | +9) path (String) - The path where the CSV file is saved to. |
| 106 | + |
| 107 | +10) filename (String) - The filename for the CSV file. |
| 108 | + |
| 109 | +**Returns** |
| 110 | + |
| 111 | +A `Pandas.DataFrame` of the NICAM16_8S time series for point latitude/longitude. |
0 commit comments