Replies: 1 comment 2 replies
-
I am unsure what that statement means. Typically python users use the excellent I think your code to get visibility is right, what makes you think it is wrong? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m having some issues getting the data from here. If I’m using something like the lines below it works just fine, but I haven’t found a way to get the METAR string via URL so far. Is there any function/method I should look into?
code = ("METAR KEWR 111851Z VRB03G19KT 2SM R04R/3000VP6000FT TSRA BR FEW015 " "BKN040CB BKN065 OVC200 22/22 A2987 RMK AO2 PK WND 29028/1817 WSHFT " "1812 TSB05RAB22 SLP114 FRQ LTGICCCCG TS OHD AND NW-N-E MOV NE P0013 " "T02270215" )By using
station_file_url = http://www.noaa.gov/nsd_cccc.txtI haven’t gotten any data, so my guess is that I’m missing something here.On the other hand, is there an easy way to get
Visibilitydata andCloud Ceiling Heightdata as integer values in order to compare them against some other int variables? I feel like the approach I tried below might not be the most efficient.from metar import Metar code = ("METAR KEWR 111851Z VRB03G19KT 2SM R04R/3000VP6000FT TSRA BR FEW015 " "BKN040CB BKN065 OVC200 22/22 A2987 RMK AO2 PK WND 29028/1817 WSHFT " "1812 TSB05RAB22 SLP114 FRQ LTGICCCCG TS OHD AND NW-N-E MOV NE P0013 " "T02270215") obs = Metar.Metar(code) vis = int(obs.visibility()[0]) vis > 1I'm sorry if my post is beyond the scope of this library and if the question is not properly asked (I just started coding last week as a hobby), I'm just curious if what I asked above is doable.
Beta Was this translation helpful? Give feedback.
All reactions