Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ncep nbm model #38

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
abddf25
feat: Add ECMWF 0.25 IFS and AIFS models
colinnuk Mar 12, 2024
c5a9636
feat: Add Hourly units for ECMWF 0.25 models
colinnuk Mar 12, 2024
a8c5996
Merge branch 'AlienDwarf:master' into master
colinnuk Mar 12, 2024
cbd5d2c
fix: Reduce number of calls made to the open-meteo API in the tests -…
colinnuk Mar 13, 2024
748665f
feat: Add elevation API & tests
colinnuk Mar 13, 2024
6973bfb
fix: comment typos
colinnuk Mar 13, 2024
a56afca
Update package-and-deploy.yml
colinnuk Mar 22, 2024
47aa235
Delete .github/workflows/test-dev-build.yml
colinnuk Mar 22, 2024
4feb257
Merge pull request #1 from colinnuk/feature/elevation_api
colinnuk Mar 22, 2024
0eb818b
Update build-and-test.yml
colinnuk Mar 22, 2024
a8d10e6
Update package-and-deploy.yml
colinnuk Mar 22, 2024
e94bb0a
Update build-and-test.yml
colinnuk Mar 22, 2024
b00e779
Update OpenMeteo.csproj
colinnuk Mar 22, 2024
19dace5
Handle the OpenMeteo error responses more accurately
colinnuk Mar 22, 2024
0cee91b
Add models
colinnuk Mar 22, 2024
111b33e
Small tweak to error handling
colinnuk Mar 22, 2024
2fd56d2
Add gfs_graphcast025
colinnuk Apr 5, 2024
4ada501
Change to only log errors if we have set to rethrow exceptions
colinnuk Apr 9, 2024
8ad1b3f
Revert "Change to only log errors if we have set to rethrow exceptions"
colinnuk Apr 9, 2024
0f46876
Change errors to warnings - client code will have to log this if it n…
colinnuk Apr 9, 2024
3b47c1a
Upgrade lib to dotnet 8
colinnuk Apr 30, 2024
9fb4019
Merge pull request #2 from colinnuk/dotnet_8
colinnuk Apr 30, 2024
4dc5c11
Add pressure height params
colinnuk Apr 30, 2024
91f9d4f
Add new pressure level options
colinnuk May 1, 2024
cffdca2
Fix warning
colinnuk May 1, 2024
6b91bde
Add UK Met Office models
colinnuk Aug 27, 2024
aea8796
Merge pull request #3 from colinnuk/uk_met_office
colinnuk Aug 27, 2024
c1ac2f1
Fix UK model name
colinnuk Aug 27, 2024
4456015
Add apiKey to the constructor and remove rethrowExceptions from the c…
colinnuk Aug 29, 2024
0ed740f
Move the WeatherCode method to its own class
colinnuk Aug 29, 2024
7e802f0
Refactor URL builder code into its own class and support apiKeys
colinnuk Aug 29, 2024
db1eb80
Merge pull request #4 from colinnuk/enable_commerical_use
colinnuk Aug 30, 2024
1ac61f7
Remove APIKEY from logs
colinnuk Aug 30, 2024
65da3d1
Merge pull request #5 from colinnuk/sanitise_logs
colinnuk Aug 30, 2024
ee90997
Add log to confirm API Key is being used
colinnuk Aug 30, 2024
11aa7f4
Fix issue when passing in empty string - if string is empty then it'l…
colinnuk Aug 30, 2024
02abbc5
Update package-and-deploy.yml
colinnuk Aug 30, 2024
1dfb30b
Upgrade vulnerable package
colinnuk Oct 19, 2024
c953107
Add a method to get the weather forecast metadata
colinnuk Oct 19, 2024
cbbffe8
Merge pull request #6 from colinnuk/model_update_timestamps
colinnuk Oct 19, 2024
c24224c
Add NCEP NBM model
colinnuk Oct 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ on:
paths:
- '**/*.cs'
- '**/*.csproj'
workflow_dispatch:

env:
DOTNET_VERSION: '6.x.x' # The .NET SDK version to use
DOTNET_VERSION: '8.x.x' # The .NET SDK version to use

jobs:
build-and-test:
Expand All @@ -22,7 +23,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest]

steps:
- name: Checkout Code
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/package-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Package, Deploy and create new release

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
Expand Down Expand Up @@ -51,5 +52,5 @@ jobs:
- name: Package nuget
run: dotnet pack ./OpenMeteo/OpenMeteo.csproj --configuration release -o:package /p:PackageVersion=${{ steps.gitversion.outputs.AssemblySemVer }}

- name: Push generated package to NuGet.org
run: dotnet nuget push ./package/*.nupkg --api-key ${{ secrets.API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Push generated package to Github Packages
run: dotnet nuget push ./package/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/colinnuk/index.json --skip-duplicate
49 changes: 0 additions & 49 deletions .github/workflows/test-dev-build.yml

This file was deleted.

12 changes: 12 additions & 0 deletions OpenMeteo/ElevationApiResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace OpenMeteo
{
/// <summary>
/// Elevation API response
/// </summary>
public class ElevationApiResponse
{
/// <summary>
/// Elevation array in meters - this library currently only supports 1 input elevation so this will always be a single value array
public float[]? Elevation { get; set; }
}
}
21 changes: 21 additions & 0 deletions OpenMeteo/ElevationOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace OpenMeteo
{
public class ElevationOptions
{
public ElevationOptions(float latitude, float longitude)
{
Latitude = latitude;
Longitude = longitude;
}

/// <summary>
/// Geographical WGS84 coordinate of the location
/// </summary>
public float Latitude { get; set; }

/// <summary>
/// Geographical WGS84 coordinate of the location
/// </summary>
public float Longitude { get; set; }
}
}
13 changes: 13 additions & 0 deletions OpenMeteo/ErrorResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Text.Json.Serialization;

namespace OpenMeteo
{
internal class ErrorResponse
{
[JsonPropertyName("reason")]
public string? Reason { get; set; }

[JsonPropertyName("error")]
public bool Error { get; set; }
}
}
44 changes: 44 additions & 0 deletions OpenMeteo/Hourly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,21 @@ public class Hourly
public float?[]? Temperature_950hPa { get; set; }
public float?[]? Temperature_925hPa { get; set; }
public float?[]? Temperature_900hPa { get; set; }
public float?[]? Temperature_875hPa { get; set; }
public float?[]? Temperature_850hPa { get; set; }
public float?[]? Temperature_825hPa { get; set; }
public float?[]? Temperature_800hPa { get; set; }
public float?[]? Temperature_775hPa { get; set; }
public float?[]? Temperature_750hPa { get; set; }
public float?[]? Temperature_725hPa { get; set; }
public float?[]? Temperature_700hPa { get; set; }
public float?[]? Temperature_675hPa { get; set; }
public float?[]? Temperature_650hPa { get; set; }
public float?[]? Temperature_625hPa { get; set; }
public float?[]? Temperature_600hPa { get; set; }
public float?[]? Temperature_575hPa { get; set; }
public float?[]? Temperature_550hPa { get; set; }
public float?[]? Temperature_525hPa { get; set; }
public float?[]? Temperature_500hPa { get; set; }
public float?[]? Temperature_400hPa { get; set; }
public float?[]? Temperature_300hPa { get; set; }
Expand Down Expand Up @@ -105,10 +116,21 @@ public class Hourly
public int?[]? Relativehumidity_950hPa { get; set; }
public int?[]? Relativehumidity_925hPa { get; set; }
public int?[]? Relativehumidity_900hPa { get; set; }
public int?[]? Relativehumidity_875hPa { get; set; }
public int?[]? Relativehumidity_850hPa { get; set; }
public int?[]? Relativehumidity_825hPa { get; set; }
public int?[]? Relativehumidity_800hPa { get; set; }
public int?[]? Relativehumidity_775hPa { get; set; }
public int?[]? Relativehumidity_750hPa { get; set; }
public int?[]? Relativehumidity_725hPa { get; set; }
public int?[]? Relativehumidity_700hPa { get; set; }
public int?[]? Relativehumidity_675hPa { get; set; }
public int?[]? Relativehumidity_650hPa { get; set; }
public int?[]? Relativehumidity_625hPa { get; set; }
public int?[]? Relativehumidity_600hPa { get; set; }
public int?[]? Relativehumidity_575hPa { get; set; }
public int?[]? Relativehumidity_550hPa { get; set; }
public int?[]? Relativehumidity_525hPa { get; set; }
public int?[]? Relativehumidity_500hPa { get; set; }
public int?[]? Relativehumidity_400hPa { get; set; }
public int?[]? Relativehumidity_300hPa { get; set; }
Expand All @@ -124,10 +146,21 @@ public class Hourly
public int?[]? Cloudcover_950hPa { get; set; }
public int?[]? Cloudcover_925hPa { get; set; }
public int?[]? Cloudcover_900hPa { get; set; }
public int?[]? Cloudcover_875hPa { get; set; }
public int?[]? Cloudcover_850hPa { get; set; }
public int?[]? Cloudcover_825hPa { get; set; }
public int?[]? Cloudcover_800hPa { get; set; }
public int?[]? Cloudcover_775hPa { get; set; }
public int?[]? Cloudcover_750hPa { get; set; }
public int?[]? Cloudcover_725hPa { get; set; }
public int?[]? Cloudcover_700hPa { get; set; }
public int?[]? Cloudcover_675hPa { get; set; }
public int?[]? Cloudcover_650hPa { get; set; }
public int?[]? Cloudcover_625hPa { get; set; }
public int?[]? Cloudcover_600hPa { get; set; }
public int?[]? Cloudcover_575hPa { get; set; }
public int?[]? Cloudcover_550hPa { get; set; }
public int?[]? Cloudcover_525hPa { get; set; }
public int?[]? Cloudcover_500hPa { get; set; }
public int?[]? Cloudcover_400hPa { get; set; }
public int?[]? Cloudcover_300hPa { get; set; }
Expand Down Expand Up @@ -181,10 +214,21 @@ public class Hourly
public float?[]? Geopotential_height_950hPa { get; set; }
public float?[]? Geopotential_height_925hPa { get; set; }
public float?[]? Geopotential_height_900hPa { get; set; }
public float?[]? Geopotential_height_875hPa { get; set; }
public float?[]? Geopotential_height_850hPa { get; set; }
public float?[]? Geopotential_height_825hPa { get; set; }
public float?[]? Geopotential_height_800hPa { get; set; }
public float?[]? Geopotential_height_775hPa { get; set; }
public float?[]? Geopotential_height_750hPa { get; set; }
public float?[]? Geopotential_height_725hPa { get; set; }
public float?[]? Geopotential_height_700hPa { get; set; }
public float?[]? Geopotential_height_675hPa { get; set; }
public float?[]? Geopotential_height_650hPa { get; set; }
public float?[]? Geopotential_height_625hPa { get; set; }
public float?[]? Geopotential_height_600hPa { get; set; }
public float?[]? Geopotential_height_575hPa { get; set; }
public float?[]? Geopotential_height_550hPa { get; set; }
public float?[]? Geopotential_height_525hPa { get; set; }
public float?[]? Geopotential_height_500hPa { get; set; }
public float?[]? Geopotential_height_400hPa { get; set; }
public float?[]? Geopotential_height_300hPa { get; set; }
Expand Down
Loading
Loading