{
    "mode": "perldoc",
    "parameter": "Geo::METAR",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Geo%3A%3AMETAR/json",
    "generated": "2026-06-14T07:40:54Z",
    "synopsis": "use Geo::METAR;\nuse strict;\nmy $m = new Geo::METAR;\n$m->metar(\"KFDY 251450Z 21012G21KT 8SM OVC065 04/M01 A3010 RMK 57014\");\nprint $m->dump;\nexit;",
    "sections": {
        "NAME": {
            "content": "Geo::METAR - Process aviation weather reports in the METAR format.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Geo::METAR;\nuse strict;\n\nmy $m = new Geo::METAR;\n$m->metar(\"KFDY 251450Z 21012G21KT 8SM OVC065 04/M01 A3010 RMK 57014\");\nprint $m->dump;\n\nexit;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "METAR reports are available on-line, thanks to the National Weather Service. Since reading the\nMETAR format isn't easy for non-pilots, these reports are relatively useles to the common man\nwho just wants a quick glace at the weather. This module tries to parse the METAR reports so the\ndata can be used to create readable weather reports and/or process the data in applications.\n",
            "subsections": []
        },
        "USAGE": {
            "content": "",
            "subsections": [
                {
                    "name": "How you might use this",
                    "content": "Here is how you *might* use the Geo::METAR module.\n\nOne use that I have had for this module is to query the NWS METAR page (using the LWP modules)\nat:\n\n*http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=EHSB*\n\nto get an up-to-date METAR. Then, I scan thru the output, looking for what looks like a METAR\nstring (that's not hard in Perl). Oh, EHSB can be any site location code where there is a\nreporting station.\n\nI then pass the METAR into this module and get the info I want. I can then update my webcam page\nwith the current temperature, sky conditions, or whatnot. See for yourself at\nhttp://webcam.idefix.net/\n\nSee the BUGS section for a remark about multiple passes with the same Geo::METAR object.\n"
                },
                {
                    "name": "Functions",
                    "content": "The following functions are defined in the METAR module. Most of them are *public*, meaning that\nyou're supposed to use them. Some are *private*, meaning that you're not supposed to use them --\nbut I won't stop you. Assume that functions are *public* unless otherwise documented.\n"
                },
                {
                    "name": "metar",
                    "content": "metar() is the function to whwich you should pass a METAR string. It will take care of\ndecomposing it into its component parts converting the units and so on.\n\nExample: \"$m->metar(\"KFDY 251450Z 21012G21KT 8SM OVC065 04/M01 A3010 RMK 57014\");\"\n"
                },
                {
                    "name": "debug",
                    "content": "debug() toggles debugging messages. By default, debugging is turned off. Turn it on if you\nare developing METAR or having trouble with it.\n\ndebug() understands all of the following:\n\nEnable       Disable\n------       -------\n1             0\n'yes'         'no'\n'on'          'off'\n\nIf you contact me for help, I'll likely ask you for some debugging output.\n\nExample: \"$m->debug(1);\"\n"
                },
                {
                    "name": "dump",
                    "content": "dump() will dump the internal data structure for the METAR in a semi-human readable format.\n\nExample: \"$m->dump;\"\n"
                },
                {
                    "name": "version",
                    "content": "version() will print out the current version.\n\nExample: \"print $m->version;\"\n\ntokenize()\nPRIVATE\n\nCalled internally to break the METAR into its component tokens.\n\nprocess()\nPRIVATE\n\nUsed to make sense of the tokens found in tokenize().\n"
                },
                {
                    "name": "Variables",
                    "content": "After you've called metar(), you'd probably like to get at the individual values for things like\ntemperature, dew point, and so on. You do that by accessing individual variables via the METAR\nobject.\n\nThis section lists those variables and what they represent.\n\nIf you call dump(), you'll find that it spits all of these out.\n\nVERSION\nThe version of METAR.pm that you're using.\n\nMETAR\nThe actual, raw METAR.\n\nTYPE\nReport type in English (\"Routine Weather Report\" or \"Special Weather Report\")\n\nSITE\n4-letter site code.\n\nDATE\nThe date (just the day of the month) on which the report was issued.\n\nTIME\nThe time at which the report was issued.\n\nMOD Modifier (AUTO/COR) if any.\n\nWINDDIRENG\nThe current wind direction in English (Southwest, East, North, etc.)\n\nWINDDIRABB\nThe current wind direction in abbreviated English (S, E, N, etc.)\n\nWINDDIRDEG\nThe current wind direction in degrees.\n\nWINDKTS\nThe current wind speed in Knots.\n\nWINDMPH\nThe current wind speed in Miles Per Hour.\n\nWINDMS\nThe current wind speed in Metres Per Second.\n\nWINDGUSTKTS\nThe current wind gusting speed in Knots.\n\nWINDGUSTMPH\nThe current wind gusting speed in Miles Per Hour.\n\nWINDGUSTMS\nThe current wind gusting speed in Metres Per Second.\n\nWINDVAR\nThe wind variation in English\n\nWINDVAR1\nThe first wind variation direction\n\nWINDVARENG1\nThe first wind variation direction in English\n\nWINDVAR2\nThe second wind variation direction\n\nWINDVARENG2\nThe second wind variation direction in English\n\nVISIBILITY\nVisibility information.\n\nWIND\nWind information.\n\nRUNWAY\nRunway information.\n\nWEATHER\nCurrent weather (array)\n\nWEATHERLOG\nCurrent weather log (array)\n\nSKY Current cloud cover (array)\n\nTEMPC\nTemperature in Celsius.\n\nTEMPF\nTemperature in Fahrenheit.\n\nDEWC\nDew point in Celsius.\n\nDEWF\nDew point in Fahrenheit.\n\nHOURLYTEMPF\nHourly current temperature, fahrenheit\n\nHOURLYTEMPC\nHourly current temperature, celcius\n\nHOURLYDEWF\nHourly dewpoint, fahrenheit\n\nHOURLYDEWC\nHourly dewpoint, celcius\n\nALT Altimeter setting (barometric pressure).\n\nALTHP\nAltimeter setting in hectopascals.\n\nREMARKS\nAny remarks in the report.\n"
                }
            ]
        },
        "NOTES": {
            "content": "Test suite is small and incomplete. Needs work yet.\n\nOlder versions of this module were installed as \"METAR\" instaed of \"Geo::METAR\"\n",
            "subsections": []
        },
        "BUGS": {
            "content": "The Geo::METAR is only initialized once, which means you'll get left-over crud in variables when\nyou call the metar() function twice.\n\nWhat is an invalid METAR in one country is a standard one in the next. The standard is\ninterpreted and used by meteorologists all over the world, with local variations. This means\nthere will always be METARs that will trip the parser.\n",
            "subsections": []
        },
        "TODO": {
            "content": "There is a TODO file included in the Geo::METAR distribution listing the outstanding tasks that\nI or others have devised. Please check that list before you submit a bug report or request a new\nfeture. It might already be on the TODO list.\n",
            "subsections": []
        },
        "AUTHORS AND COPYRIGHT": {
            "content": "Copyright 1997-2000, Jeremy D. Zawodny <Jeremy [at] Zawodny.com>\n\nCopyright 2007, Koos van den Hout <koos@kzdoos.xs4all.nl>\n\nGeo::METAR is covered under the GNU Public License (GPL) version 2 or later.\n\nThe Geo::METAR Web site is located at:\n\nhttp://idefix.net/~koos/perl/Geo-METAR/\n",
            "subsections": []
        },
        "CREDITS": {
            "content": "In addition to our work on Geo::METAR, We've received ideas, help, and patches from the\nfollowing folks:\n\n* Ethan Dicks <ethan.dicks [at] gmail.com>\n\nTesting of Geo::METAR at the South Pole. Corrections and pointers\nto interesting cases to test.\n\n* Otterboy <jong [at] watchguard.com>\n\nRandom script fixes and initial debugging help\n\n* Remi Lefebvre <remi [at] solaria.dhis.org>\n\nDebian packaging as libgeo-metar-perl.deb.\n\n* Mike Engelhart <mengelhart [at] earthtrip.com>\n\nWind direction naming corrections.\n\n* Michael Starling <mstarling [at] logic.bm>\n\nWind direction naming corrections.\n\n* Hans Einar Nielssen <hans.einar [at] nielssen.com>\n\nWind direction naming corrections.\n\n* Nathan Neulinger <nneul [at] umr.edu>\n\nLots of enhancements and corrections. Too many to list here.\n",
            "subsections": []
        },
        "RELATED PROJECTS": {
            "content": "lcdproc at http://www.lcdproc.org/ uses Geo::METAR in lcdmetar.pl to display weather data on an\nlcd.\n",
            "subsections": []
        }
    },
    "summary": "Geo::METAR - Process aviation weather reports in the METAR format.",
    "flags": [],
    "examples": [],
    "see_also": []
}