Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    Station upload API v2 - wind direction

    Scheduled Pinned Locked Moved Windy Stations
    6 Posts 4 Posters 278 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mcrossley
      last edited by

      The new API only accepts wind direction values in the range 0-359.

      Cumulus MX defaults to the common convention of using 0-360 for direction, where zero is used for no direction when the wind speed is zero. But 0 or 360 is commonly used for north.

      This worked fine with the v1 API, but users are now getting uploads rejected when they report the direction as 360.

      Gkikas LGPZG ulerioU 2 Replies Last reply Reply Quote 2
      • Gkikas LGPZG Online
        Gkikas LGPZ Moderator Meteorologist @mcrossley
        last edited by

        @mcrossley
        Generally, in meteorological codes (SYNOP, METAR ...)
        0 stands for calm
        360 for wind from north.

        1 Reply Last reply Reply Quote 1
        • ulerioU Offline
          ulerio @mcrossley
          last edited by

          @mcrossley It is possible to normalize a wind direction from the 0–360 range to the 0–359 standard using the modulo operator. When calculating the remainder of the division by 360, the value 360 ​​automatically becomes 0, closing the compass cycle. For example: 180 % 360 = 180 and 360 % 360 = 0.

          M 1 Reply Last reply Reply Quote 0
          • M Offline
            mcrossley @ulerio
            last edited by

            @ulerio I know I can fix it at my end, but really, I think Windy should accept 0-360 which is the normal range in meteorology.

            marekdM 1 Reply Last reply Reply Quote 1
            • marekdM Offline
              marekd Windy Staff @mcrossley
              last edited by

              @mcrossley Thank you for the feedback. It is now possible to send 360 for wind direction.

              M 1 Reply Last reply Reply Quote 2
              • M Offline
                mcrossley @marekd
                last edited by

                @marekd Thank you.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Windy Community  |  Powered by excellent NodeBB
                Terms of Use     Privacy Policy     Windy.com