# OpenMeteoApi.NET 1.0.1

**URL:** <https://discourse.pangeo.io/t/openmeteoapi-net-1-0-1/5779>\
**Category:** News & Announcements\
**Created:** [July 7, 2026, 3:02am UTC](https://discourse.pangeo.io/t/openmeteoapi-net-1-0-1/5779 "2026-07-07T03:02:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![edrewitz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/edrewitz/32/3716_2.png) [@edrewitz](https://discourse.pangeo.io/u/edrewitz)\
**Post date:** [July 7, 2026, 3:02am UTC](https://discourse.pangeo.io/t/openmeteoapi-net-1-0-1/5779/1 "2026-07-07T03:02:54Z")

</div>

![Alt text](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/2X/a/aaa2dbf216309edeea2960c45eeaad02fa64dc7e.jpeg) ![Alt text](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/2X/6/6c634b17ca2ee98eca01b8e9a135740d8f77417a.png)

I’ve been casually teaching myself the C# programming language for the past couple of months with the goal of picking up C# as my secondary language to Python.

I am proud to announce that I have successfully published my first ever version of my first ever NuGet package `OpenMeteoApi.NET` to [nuget.org](http://nuget.org) which is a C# interface to the Open-Meteo API to access various types of real-time weather data. I plan on to continue adding to this package as I continue in my journey of learning C# as my second programming language.

`OpenMeteoApi.NET` targets the .NET 10 Framework.

`OpenMeteoApi.NET` can assist C# developers with the back-end of weather-data related C# applications. This package also has built in support for users who need to access data through a VPN/Proxy Server connection.

## Table of Contents

[_ **Documentation** _](https://github.com/edrewitz/OpenMeteoApi.NET/blob/master/README.md#documentation)

[_ **Code Example 1** _](https://github.com/edrewitz/OpenMeteoApi.NET/blob/master/README.md#example-1-openmeteoapinet-console-application-code)

[_ **Code Example 2** _](https://github.com/edrewitz/OpenMeteoApi.NET/blob/master/README.md#example-2-openmeteoapinet-icon-eps-application-code)

[_ **GitHub Repository** _](https://github.com/edrewitz/OpenMeteoApi.NET)

[_ **Installation Guide** _](https://www.nuget.org/packages/OpenMeteoApiNet)

## Documentation

### Forecast Data

[_ **NOAA/NCEP Model Data Access** _](https://github.com/edrewitz/OpenMeteoApi.NET/blob/master/Documentation/noaa.md#national-oceanic-and-atmospheric-administration-noaa)

[_ **ECMWF Model Data Access** _](https://github.com/edrewitz/OpenMeteoApi.NET/blob/master/Documentation/ecmwf.md#european-centre-for-medium-range-weather-forecasts-ecmwf)

[_ **CMC Model Data Access** _](https://github.com/edrewitz/OpenMeteoApi.NET/blob/master/Documentation/cmc.md#canadian-meteorological-centre-cmc)

[_ **DWD Model Data Access** _](https://github.com/edrewitz/OpenMeteoApi.NET/blob/master/Documentation/dwd.md#deutscher-wetterdienst-dwd)

[_ **Meteo France Model Data Access** _](https://github.com/edrewitz/OpenMeteoApi.NET/blob/master/Documentation/meteo%20france.md#meteo-france)

### Current Analysis

[_ **Current Weather** _](https://github.com/edrewitz/OpenMeteoApi.NET/blob/master/Documentation/currentWeather.md#current-weather)

## Code Examples

### _**Example 1 [OpenMeteoApi.NET](http://OpenMeteoApi.NET) Console Application Code**_

```CSharp
/*
 * In this code example, I will use OpenMeteoAPI.NET to build a basic console application that does the following:
 * 
 * - Retrieves the latest 2-meter temperature ECMWF IFS, GFS, GEM & ICON forecast for a given latitude and longitude.
 *  
 */
using OpenMeteoApiNet.ECMWF_IFS;
using OpenMeteoApiNet.GFS;
using OpenMeteoApiNet.ICON;
using OpenMeteoApiNet.GEM;

// Our main program namespace
namespace Program
{
    class Program
    {
        // Our main task in our application
        public static async Task Main(string[] args)
        {
            // Continuous loop until the user manually exits the command prompt. 
            while (true)
            {
                // Prompt the user for latitude and longitude

                Console.WriteLine($"Enter a latitude");
                var latitude = Console.ReadLine();
                Console.WriteLine($"Enter a longitude");
                var longitude = Console.ReadLine();

                // Selects the variable temperature_2m
                string[] variables = new string[] { "temperature_2m" };

                // Retrieve the ECMWF IFS forecast for 1 day
                var ecmwfData = await ifsHourlyForecastApi.GetPointForecast(latitude,
                    longitude,
                    variables: variables,
                    days: 1);

                // Retrieve the GFS forecast for 1 day
                var gfsData = await gfsHourlyForecastApi.GetPointForecast(latitude,
                    longitude,
                    variables: variables,
                    days: 1);

                // Retrieve the GEM forecast for 1 day
                var gemData = await gemHourlyForecastApi.GetPointForecast(latitude,
                    longitude,
                    variables: variables,
                    days: 1);

                // Retrieve the ICON forecast for 1 day
                var iconData = await iconHourlyForecastApi.GetPointForecast(latitude,
                    longitude,
                    variables: variables,
                    days: 1);

                // Prints a no data message if the API returns null.
                if (ecmwfData == null)
                {
                    Console.WriteLine("No ECMWF IFS data returned from the API.");
                    continue;
                }

                if (gfsData == null)
                {
                    Console.WriteLine("No GFS data returned from the API.");
                    continue;
                }

                if (gemData == null)
                {
                    Console.WriteLine("No GEM data returned from the API.");
                    continue;
                }

                if (iconData == null)
                {
                    Console.WriteLine("No ICON data returned from the API.");
                    continue;
                }

                // Prints the various forecasts to the console
                for (int i = 0; i < (ecmwfData.time?.Length ?? 0); i++)
                {
                    var forecastTime = ecmwfData.time?[i] ?? "N/A";

                    // Rounds to the nearest whole number and converts from double to integer.
                    int ecmwfTemp2mInt = (int)Math.Round(ecmwfData.temperature_2m?[i] ?? 0);
                    int gfsTemp2mInt = (int)Math.Round(gfsData.temperature_2m?[i] ?? 0);
                    int gemTemp2mInt = (int)Math.Round(gemData.temperature_2m?[i] ?? 0);
                    int iconTemp2mInt = (int)Math.Round(iconData.temperature_2m?[i] ?? 0);

                    // Rounds to the nearest whole number and converts from double to integer
                    Console.WriteLine($"Time: {forecastTime} | ECMWF IFS: {ecmwfTemp2mInt}°F | GFS: {gfsTemp2mInt}°F | GEM: {gemTemp2mInt}°F | ICON: {iconTemp2mInt}°F");
                }
            }
        }
    }
}

```

_**Example 1 [OpenMeteoApi.NET](http://OpenMeteoApi.NET) Console Application Output**_

 ![Alt text](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/2X/e/ea10ae0ce78dc6262b79cb5f8cdecdec5dbe1f17.png)

### _**Example 2 [OpenMeteoApi.NET](http://OpenMeteoApi.NET) ICON EPS Application Code**_

```CSharp
/*
 * In this code example, I will use OpenMeteoAPI.NET to build a basic console application that does the following:
 * 
 * - Retrieves the latest 2-meter relative humidity for the ICON Ensemble (control + first 5 members)
 *  
 */
using OpenMeteoApiNet.ICON_EPS;

// Our main program namespace
namespace Program
{
    class Program
    {
        // Our main task in our application
        public static async Task Main(string[] args)
        {
            // Continuous loop until the user manually exits the command prompt. 
            while (true)
            {
                // Prompt the user for latitude and longitude

                Console.WriteLine($"Enter a latitude");
                var latitude = Console.ReadLine();
                Console.WriteLine($"Enter a longitude");
                var longitude = Console.ReadLine();

                // Selects the variable temperature_2m
                string[] variables = new string[] { "relative_humidity_2m" };

                // Retrieve the ICON forecast for 1 day
                var iconEPSData = await iconEPSHourlyForecastApi.GetPointForecast(latitude,
                    longitude,
                    variables: variables,
                    days: 1);

                // Prints a no data message if the API returns null.
                if (iconEPSData == null)
                {
                    Console.WriteLine("No ICON EPS data returned from the API.");
                    continue;
                }

                Console.WriteLine($"ICON EPS Forecast\n");

                // Prints the various forecasts to the console
                for (int i = 0; i < (iconEPSData.time?.Length ?? 0); i++)
                {
                    var forecastTime = iconEPSData.time?[i] ?? "N/A";

                    // Rounds to the nearest whole number and converts from double to integer.
                    int RHIntControl = (int)Math.Round(iconEPSData.relative_humidity_2m?[i] ?? 0);
                    int RHIntMember01 = (int)Math.Round(iconEPSData.relative_humidity_2m_member01?[i] ?? 0);
                    int RHIntMember02 = (int)Math.Round(iconEPSData.relative_humidity_2m_member02?[i] ?? 0);
                    int RHIntMember03 = (int)Math.Round(iconEPSData.relative_humidity_2m_member03?[i] ?? 0);
                    int RHIntMember04 = (int)Math.Round(iconEPSData.relative_humidity_2m_member04?[i] ?? 0);
                    int RHIntMember05 = (int)Math.Round(iconEPSData.relative_humidity_2m_member05?[i] ?? 0);

                    // Rounds to the nearest whole number and converts from double to integer
                    Console.WriteLine($"Time: {forecastTime} | Control: {RHIntControl}% | M1: {RHIntMember01}% | M2: {RHIntMember02}% | M3: {RHIntMember03}% | M4: {RHIntMember04}% | M5: {RHIntMember05}%");
                }
            }
        }
    }
}

```

_**Example 2 [OpenMeteoApi.NET](http://OpenMeteoApi.NET) Console Application Output**_

 ![Alt text](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/2X/d/dc45c4cf6312e250e65a7002d349f78ead667bb0.png)
