UNPKG

vgrib2

Version:

[![npm version](https://badge.fury.io/js/vgrib2.svg)](https://badge.fury.io/js/vgrib2)

1 lines 63.7 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("buffer/");function r(){return(r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}function a(e,r){if(null==e)return{};var a,n,t={},s=Object.keys(e);for(n=0;n<s.length;n++)r.indexOf(a=s[n])>=0||(t[a]=e[a]);return t}var n=function e(r){if(0===r.length)return[];var a=Number(r.slice(8,16).readBigUInt64BE(0));return[r.slice(0,a)].concat(e(r.slice(a)))},t=function(e){return r({},e[0].contents,e[1].contents,e[3].contents,e[4].contents,e[5].contents,e[6].contents,e[7].contents,e[8].contents)},s=function(e){switch(e){case 0:return"Meteorological Products";case 1:return"Hydrological Products";case 2:return"Land Surface Products";case 3:return'Satellite Remote Sensing Products (formerly "Space Products")';case 4:return"Space Weather Products";case 10:return"Oceanographic Products";default:throw new Error("Table 0.0 missing code value: "+e)}},i=function(e){return r({},e,{contents:r({},e.contents,{discipline:s(e.contents.discipline)})})},o=function(e){switch(e){case 1:case 2:case 3:return"Melbourne (WMC)";case 4:case 5:case 6:return"Moscow (WMC)";case 7:return"US National Weather Service - NCEP (WMC)";case 8:return"US National Weather Service - NWSTG (WMC)";case 9:return"US National Weather Service - Other (WMC)";case 10:case 11:return"Cairo (RSMC/RAFC)";case 12:case 13:return"Dakar (RSMC/RAFC)";case 14:case 15:return"Nairobi (RSMC/RAFC)";case 16:return"Casablanca (RSMC)";case 17:return"Tunis (RSMC)";case 18:case 19:return"Tunis-Casablanca (RSMC)";case 20:return"Las Palmas (RAFC)";case 21:return"Algiers (RSMC)";case 22:return"ACMAD";case 23:return"Mozambique (NMC)";case 24:return"Pretoria (RSMC)";case 25:return"La Reunion (RSMC)";case 26:case 27:return"Khabarovsk (RSMC)";case 28:case 29:return"New Delhi (RSMC/RAFC)";case 30:case 31:return"Novosibirsk (RSMC)";case 32:return"Tashkent (RSMC)";case 33:return"Jeddah (RSMC)";case 34:case 35:return"Tokyo (RSMC), Japanese Meteorological Agency";case 36:return"Bankok";case 37:return"Ulan Bator";case 38:case 39:return"Beijing (RSMC)";case 40:return"Seoul";case 41:case 42:return"Buenos Aires (RSMC/RAFC)";case 43:case 44:return"Brasilia (RSMC/RAFC)";case 45:return"Santiago";case 46:return"Brazilian Space Agency - INPE";case 47:return"Columbia (NMC)";case 48:return"Ecuador (NMC)";case 49:return"Peru (NMC)";case 50:return"Venezuela (NMC)";case 51:return"Miami (RSMC/RAFC)";case 52:return"Miami (RSMC), National Hurricane Center";case 53:case 54:return"Canadian Meteorological Service - Montreal (RSMC)";case 55:return"San Francisco";case 56:return"ARINC Center";case 57:return"US Air Force - Air Force Global Weather Center";case 58:return"Fleet Numerical Meteorology and Oceanography Center,Monterey,CA,USA";case 59:return"The NOAA Forecast Systems Lab, Boulder, CO, USA";case 60:return"National Center for Atmospheric Research (NCAR), Boulder, CO";case 61:return"Service ARGOS - Landover, MD, USA";case 62:return"US Naval Oceanographic Office";case 63:return"International Research Institude for Climate and Society";case 64:return"Honolulu";case 65:case 66:return"Darwin (RSMC)";case 67:return"Melbourne (RSMC)";case 69:case 70:return"Wellington (RSMC/RAFC)";case 71:return"Nadi (RSMC)";case 72:return"Singapore";case 73:return"Malaysia (NMC)";case 74:case 75:return"U.K. Met Office - Exeter (RSMC)";case 76:return"Moscow (RSMC/RAFC)";case 78:case 79:return"Offenbach (RSMC)";case 80:case 81:return"Rome (RSMC)";case 82:case 83:return"Norrkoping";case 84:case 85:return"French Weather Service - Toulouse";case 86:return"Helsinki";case 87:return"Belgrade";case 88:return"Oslo";case 89:return"Prague";case 90:return"Episkopi";case 91:return"Ankara";case 92:return"Frankfurt/Main (RAFC)";case 93:return"London (WAFC)";case 94:return"Copenhagen";case 95:return"Rota";case 96:return"Athens";case 97:return"European Space Agency (ESA)";case 98:return"European Center for Medium-Range Weather Forecasts (RSMC)";case 99:return"De Bilt, Netherlands";case 100:return"Brazzaville";case 101:return"Abidjan";case 102:return"Libyan Arab Jamahiriya (NMC)";case 103:return"Madagascar (NMC)";case 104:return"Mauritius (NMC)";case 105:return"Niger (NMC)";case 106:return"Seychelles (NMC)";case 107:return"Uganda (NMC)";case 108:return"United Republic of Tanzania (NMC)";case 109:return"Zimbabwe (NMC)";case 110:return"Hong-Kong";case 111:return"Afghanistan (NMC)";case 112:return"Bahrain (NMC)";case 113:return"Bangladesh (NMC)";case 114:return"Bhutan (NMC)";case 115:return"Cambodia (NMC)";case 116:return"Democratic People's Republic of Korea (NMC)";case 117:return"Islamic Republic of Iran (NMC)";case 118:return"Iraq (NMC)";case 119:return"Kazakhstan (NMC)";case 120:return"Kuwait (NMC)";case 121:return"Kyrgyz Republic (NMC)";case 122:return"Lao People's Democratic Republic (NMC)";case 123:return"Macao, China";case 124:return"Maldives (NMC)";case 125:return"Myanmar (NMC)";case 126:return"Nepal (NMC)";case 127:return"Oman (NMC)";case 128:return"Pakistan (NMC)";case 129:return"Qatar (NMC)";case 130:return"Yemen (NMC)";case 131:return"Sri Lanka (NMC)";case 132:return"Tajikistan (NMC)";case 133:return"Turkmenistan (NMC)";case 134:return"United Arab Emirates (NMC)";case 135:return"Uzbekistan (NMC)";case 136:return"Viet Nam (NMC)";case 140:return"Bolivia (NMC)";case 141:return"Guyana (NMC)";case 142:return"Paraguay (NMC)";case 143:return"Suriname (NMC)";case 144:return"Uruguay (NMC)";case 145:return"French Guyana";case 146:return"Brazilian Navy Hydrographic Center";case 147:return"National Commission on Space Activities - Argentina";case 148:return"Brazilian Department of Airspace Control - DECEA";case 150:return"Antigua and Barbuda (NMC)";case 151:return"Bahamas (NMC)";case 152:return"Barbados (NMC)";case 153:return"Belize (NMC)";case 154:return"British Caribbean Territories Center";case 155:return"San Jose";case 156:return"Cuba (NMC)";case 157:return"Dominica (NMC)";case 158:return"Dominican Republic (NMC)";case 159:return"El Salvador (NMC)";case 160:return"US NOAA/NESDIS";case 161:return"US NOAA Office of Oceanic and Atmospheric Research";case 162:return"Guatemala (NMC)";case 163:return"Haiti (NMC)";case 164:return"Honduras (NMC)";case 165:return"Jamaica (NMC)";case 166:return"Mexico City";case 167:return"Netherlands Antilles and Aruba (NMC)";case 168:return"Nicaragua (NMC)";case 169:return"Panama (NMC)";case 170:return"Saint Lucia (NMC)";case 171:return"Trinidad and Tobago (NMC)";case 172:return"French Departments in RA IV";case 173:return"US National Aeronautics and Space Administration (NASA)";case 174:return"Integrated System Data Management/Marine Environmental Data Service (ISDM/MEDS) - Canada";case 176:return"US Cooperative Institude for Meteorological Satellite Studies";case 190:return"Cook Islands (NMC)";case 191:return"French Polynesia (NMC)";case 192:return"Tonga (NMC)";case 193:return"Vanuatu (NMC)";case 194:return"Brunei (NMC)";case 195:return"Indonesia (NMC)";case 196:return"Kiribati (NMC)";case 197:return"Federated States of Micronesia (NMC)";case 198:return"New Caledonia (NMC)";case 199:return"Niue";case 200:return"Papua New Guinea (NMC)";case 201:return"Philippines (NMC)";case 202:return"Samoa (NMC)";case 203:return"Solomon Islands (NMC)";case 204:return"Narional Institude of Water and Atmospheric Research - New Zealand";case 210:return"Frascati (ESA/ESRIN)";case 211:return"Lanion";case 212:return"Lisbon";case 213:return"Reykjavik";case 214:return"Madrid";case 215:return"Zurich";case 216:return"Service ARGOS - Toulouse";case 217:return"Bratislava";case 218:return"Budapest";case 219:return"Ljubljana";case 220:return"Warsaw";case 221:return"Zagreb";case 222:return"Albania (NMC)";case 223:return"Armenia (NMC)";case 224:return"Austria (NMC)";case 225:return"Azerbaijan (NMC)";case 226:return"Belarus (NMC)";case 227:return"Belgium (NMC)";case 228:return"Bosnia and Herzegovina (NMC)";case 229:return"Bulgaria (NMC)";case 230:return"Cyprus (NMC)";case 231:return"Estonia (NMC)";case 232:return"Georgia (NMC)";case 233:return"Dublin";case 234:return"Israel (NMC)";case 235:return"Jordan (NMC)";case 236:return"Latvia (NMC)";case 237:return"Lebanon (NMC)";case 238:return"Lithuania (NMC)";case 239:return"Luxembourg";case 240:return"Malta (NMC)";case 241:return"Monaco";case 242:return"Romania (NMC)";case 243:return"Syrian Arab Republic (NMC)";case 244:return"The former Yugoslav Republic of Macedonia (NMC)";case 245:return"Ukraine (NMC)";case 246:return"Republic of Moldova (NMC)";case 247:return"Operational Programme for the Exchange of Weather RAdar Information (OPERA) - EUMETNET";case 250:return"COnsortium for Small scale MOdelling (COSMO)";case 254:return"EUMETSAT Operations Center";case 255:return"Missing Value";default:throw new Error("Table 0 missing code value: "+e)}},u=function(e){switch(e){case 2:return"Ultra Violet Index Model";case 3:return"NCEP/ARL Transport and Dispersion Model";case 4:return"NCEP/ARL Smoke Model";case 5:return"Satellite Derived Precipitation and temperatures, from IR (See PDS Octet 41 ... for specific satellite ID)";case 6:return"NCEP/ARL Dust Model";case 10:return"Global Wind-Wave Forecast Model";case 11:return"Global Multi-Grid Wave Model (Static Grids)";case 12:return"Probabilistic Storm Surge (P-Surge)";case 13:return"Hurricane Multi-Grid Wave Model";case 14:return"Extra-tropical Storm Surge Atlantic Domain";case 15:return"Nearshore Wave Prediction System (NWPS)";case 16:return"Extra-Tropical Storm Surge (ETSS)";case 17:return"Extra-tropical Storm Surge Pacific Domain";case 18:return"Probabilistic Extra-Tropical Storm Surge (P-ETSS)";case 19:return"Limited-area Fine Mesh (LFM) analysis";case 20:return"Extra-tropical Storm Surge Micronesia Domain";case 25:return"Snow Cover Analysis";case 30:return"Forecaster generated field";case 31:return"Value added post processed field";case 42:return"Global Optimum Interpolation Analysis (GOI) from GFS model";case 43:return'Global Optimum Interpolation Analysis (GOI) from "Final" run';case 44:return"Sea Surface Temperature Analysis";case 45:return"Coastal Ocean Circulation Model";case 46:return"HYCOM - Global";case 47:return"HYCOM - North Pacific basin";case 48:return"HYCOM - North Atlantic basin";case 49:return"Ozone Analysis from TIROS Observations";case 52:return"Ozone Analysis from Nimbus 7 Observations";case 53:return"LFM-Fourth Order Forecast Model";case 64:return"Regional Optimum Interpolation Analysis (ROI)";case 68:return"80 wave triangular, 18-layer Spectral model from GFS model";case 69:return'80 wave triangular, 18 layer Spectral model from "Medium Range Forecast" run';case 70:return"Quasi-Lagrangian Hurricane Model (QLM)";case 71:return"Hurricane Weather Research and Forecasting (HWRF) Model";case 72:return"Hurricane Non-Hydrostatic Multiscale Model on the B Grid (HNMMB)";case 73:return"Fog Forecast model - Ocean Prod. Center";case 74:return"Gulf of Mexico Wind/Wave";case 75:return"Gulf of Alaska Wind/Wave";case 76:return"Bias corrected Medium Range Forecast";case 77:return"126 wave triangular, 28 layer Spectral model from GFS model";case 78:return'126 wave triangular, 28 layer Spectral model from "Medium Range Forecast" run';case 79:return"Backup from the previous run";case 80:return'62 wave triangular, 28 layer Spectral model from "Medium Range Forecast" run';case 81:return"Analysis from GFS (Global Forecast System)";case 82:return"Analysis from GDAS (Global Data Assimilation System)";case 83:return"High Resolution Rapid Refresh (HRRR)";case 84:return"MESO NAM Model (currently 12 km)";case 85:return"Real Time Ocean Forecast System (RTOFS)";case 86:return"Early Hurricane Wind Speed Probability Model";case 87:return"CAC Ensemble Forecasts from Spectral (ENSMB)";case 88:return"NOAA Wave Watch III (NWW3) Ocean Wave Model";case 89:return"Non-hydrostatic Meso Model (NMM) (Currently 8 km)";case 90:return'62 wave triangular, 28 layer spectral model extension of the "Medium Range Forecast" run';case 91:return"62 wave triangular, 28 layer spectral model extension of the GFS model";case 92:return'62 wave triangular, 28 layer spectral model run from the "Medium Range Forecast" final analysis';case 93:return'62 wave triangular, 28 layer spectral model run from the T62 GDAS analysis of the "Medium Range Forecast" run';case 94:return"T170/L42 Global Spectral Model from MRF run";case 95:return"T126/L42 Global Spectral Model from MRF run";case 96:return"Global Forecast System Model T1534 - Forecast hours 00-384 T574 - Forecast hours 00-192 T190 - Forecast hours 204-384";case 98:return"Climate Forecast System Model -- Atmospheric model (GFS) coupled to a multi level ocean model. Currently GFS spectral model at T62, 64 levels coupled to 40 level MOM3 ocean model.";case 99:case 100:return"Miscellaneous Test ID";case 101:return"Conventional Observation Re-Analysis (CORE)";case 104:return"National Blend GRIB";case 105:return"Rapid Refresh (RAP)";case 107:return"Global Ensemble Forecast System (GEFS)";case 108:return"LAMP";case 109:return"RTMA (Real Time Mesoscale Analysis)";case 110:return"NAM Model - 15km version";case 111:return"NAM model, generic resolution (Used in SREF processing)";case 112:return"WRF-NMM model, generic resolution (Used in various runs) NMM=Nondydrostatic Mesoscale Model (NCEP)";case 113:return"Products from NCEP SREF processing";case 114:return"NAEFS Products from joined NCEP, CMC global ensembles";case 115:return"Downscaled GFS from NAM eXtension";case 116:return"WRF-EM model, generic resolution (Used in various runs) EM - Eulerian Mass-core (NCAR - aka Advanced Research WRF)";case 117:return"NEMS GFS Aerosol Component";case 118:return"URMA (UnRestricted Mesoscale Analysis)";case 119:return"WAM (Whole Atmosphere Model)";case 120:return"Ice Concentration Analysis";case 121:return"Western North Atlantic Regional Wave Model";case 122:return"Alaska Waters Regional Wave Model";case 123:return"North Atlantic Hurricane Wave Model";case 124:return"Eastern North Pacific Regional Wave Model";case 125:return"North Pacific Hurricane Wave Model";case 126:return"Sea Ice Forecast Model";case 127:return"Lake Ice Forecast Model";case 128:return"Global Ocean Forecast Model";case 129:return"Global Ocean Data Analysis System (GODAS)";case 130:return"Merge of fields from the RUC, NAM, and Spectral Model";case 131:return"Great Lakes Wave Model";case 132:return"High Resolution Ensemble Forecast (HREF)";case 133:return"Great Lakes Short Range Wave Model";case 134:return"Rapid Refresh Forecast System (RRFS)";case 135:return"Hurricane Analysis and Forecast System (HAFS)";case 140:return"North American Regional Reanalysis (NARR)";case 141:return"Land Data Assimilation and Forecast System";case 150:return"NWS River Forecast System (NWSRFS)";case 151:return"NWS Flash Flood Guidance System (NWSFFGS)";case 152:return"WSR-88D Stage II Precipitation Analysis";case 153:return"WSR-88D Stage III Precipitation Analysis";case 180:return"Quantitative Precipitation Forecast generated by NCEP";case 181:return"River Forecast Center Quantitative Precipitation Forecast mosaic generated by NCEP";case 182:return"River Forecast Center Quantitative Precipitation estimate mosaic generated by NCEP";case 183:return"NDFD product generated by NCEP/HPC";case 184:return"Climatological Calibrated Precipitation Analysis - CCPA";case 190:return"National Convective Weather Diagnostic generated by NCEP/AWC";case 191:return"Current Icing Potential automated product genterated by NCEP/AWC";case 192:return"Analysis product from NCEP/AWC";case 193:return"Forecast product from NCEP/AWC";case 195:return"Climate Data Assimilation System 2 (CDAS2)";case 196:return"Climate Data Assimilation System 2 (CDAS2) - used for regeneration runs";case 197:return"Climate Data Assimilation System (CDAS)";case 198:return"Climate Data Assimilation System (CDAS) - used for regeneration runs";case 199:return"Climate Forecast System Reanalysis (CFSR) -- Atmospheric model (GFS) coupled to a multi level ocean, land and seaice model. Currently GFS spectral model at T382, 64 levels coupled to 40 level MOM4 ocean model.";case 200:return"CPC Manual Forecast Product";case 201:return"CPC Automated Product";case 210:return"EPA Air Quality Forecast - Currently North East US domain";case 211:return"EPA Air Quality Forecast - Currently Eastern US domain";case 215:return"SPC Manual Forecast Product";case 220:return"NCEP/OPC automated product";case 255:return"Missing";default:throw new Error("Table A missing code value: "+e)}},c=function(e){switch(e){case 0:return null;case 1:return"NCEP Re-Analysis Project";case 2:return"NCEP Ensemble Products";case 3:return"NCEP Central Operations";case 4:return"Environmental Modeling Center";case 5:return"Weather Prediction Center";case 6:return"Ocean Prediction Center";case 7:return"Climate Prediction Center";case 8:return"Aviation Weather Center";case 9:return"Storm Prediction Center";case 10:return"National Hurricane Center";case 11:return"NWS Techniques Development Laboratory";case 12:return"NESDIS Office of Research and Applications";case 13:return"Federal Aviation Administration";case 14:return"NWS Meteorological Development Laboratory";case 15:return"North American Regional Reanalysis Project";case 16:return"Space Weather Prediction Center";case 17:return"ESRL Global Systems Division";default:throw new Error("Table C missing code value: "+e)}},l=function(e){switch(e){case 0:return"Analysis";case 1:return"Start of Forecast";case 2:return"Verifying Time of Forecast";case 3:return"Observation Time";case 255:return"Missing";default:throw new Error("Table 1.2 missing code value: "+e)}},m=function(e){switch(e){case 0:return"Analysis Products";case 1:return"Forecast Products";case 2:return"Analysis and Forecast Products";case 3:return"Control Forecast Products";case 4:return"Perturbed Forecast Products";case 5:return"Control and Perturbed Forecast Products";case 6:return"Processed Satellite Observations";case 7:return"Processed Radar Observations";case 8:return"Event Probability";case 192:return"Experimental Products";case 255:return"Missing";default:throw new Error("Table 1.4 missing code value: "+e)}},d=function(e){return r({},e,{contents:r({},e.contents,{center:o(e.contents.center),subcenter:c(e.contents.subcenter),significanceOfRT:l(e.contents.subcenter),typeOfProcessedData:m(e.contents.typeOfProcessedData)})})},b=function(e){switch(e){case 0:return"Latitude/Longitude (Also called Equidistant Cylindrical or Plate Caree)";case 1:return"Rotated Latitude/Longitude";case 2:return"Stretched Latitude/Longitude";case 3:return"Rotated and Stretched Latitude/Longitude";case 4:return"Variable Resolution Latitude/longitude";case 5:return"Variable Resolution Rotated Latitude/longitude";case 10:return"Mercator";case 11:return"Reserved";case 12:return"Transverse Mercator";case 13:return"Mercator with modelling subdomains definition";case 20:return"Polar Stereographic Projection (Can be North or South)";case 23:return"Polar Stereographic with modelling subdomains definition";case 30:return"Lambert Conformal (Can be Secant, Tangent, Conical, or Bipolar)";case 31:return"Albers Equal Area";case 32:return"Reserved";case 33:return"Lambert conformal with modelling subdomains definition";case 40:return"Gaussian Latitude/Longitude";case 41:return"Rotated Gaussian Latitude/Longitude";case 42:return"Stretched Gaussian Latitude/Longitude";case 43:return"Rotated and Stretched Gaussian Latitude/Longitude";case 50:return"Spherical Harmonic Coefficients";case 51:return"Rotated Spherical Harmonic Coefficients";case 52:return"Stretched Spherical Harmonic Coefficients";case 53:return"Rotated and Stretched Spherical Harmonic Coefficients";case 60:return"Cubed-Sphere Gnomonic Validation";case 61:return"Spectral Mercator with modelling subdomains definition";case 62:return"Spectral Polar Stereographic with modelling subdomains definition";case 63:return"Spectral Lambert conformal with modelling subdomains definition";case 90:return"Space View Perspective or Orthographic";case 100:return"Triangular Grid Based on an Icosahedron";case 101:return"General Unstructured Grid";case 110:return"Equatorial Azimuthal Equidistant Projection";case 120:return"Azimuth-Range Projection";case 140:return"Lambert Azimuthal Equal Area Projection";case 204:return"Curvilinear Orthogonal Grids";case 1e3:return"Cross Section Grid with Points Equally Spaced on the Horizontal";case 1100:return"Hovmoller Diagram with Points Equally Spaced on the Horizontal";case 1200:return"Time Section Grid";case 32768:return"Rotated Latitude/Longitude(Arakawa Staggered E-Grid)";case 32769:return"Rotated Latitude/Longitude(Arakawa Non-E Staggered Grid)";case 65535:return"Missing";default:throw new Error("Table 3.1 missing code value: "+e)}},v=function(e){switch(e){case 0:return"Earth assumed spherical with radius = 6,367,470.0 m";case 1:return"Earth assumed spherical with radius specified (in m) by data producer";case 2:return"Earth assumed oblate spheriod with size as determined by IAU in 1965 (major axis = 6,378,160.0 m, minor axis = 6,356,775.0 m, f = 1/297.0)";case 3:return"Earth assumed oblate spheriod with major and minor axes specified (in km) by data producer";case 4:return"Earth assumed oblate spheriod as defined in IAG-GRS80 model (major axis = 6,378,137.0 m, minor axis = 6,356,752.314 m, f = 1/298.257222101)";case 5:return"Earth assumed represented by WGS84 (as used by ICAO since 1998) (Uses IAG-GRS80 as a basis)";case 6:return"Earth assumed spherical with radius = 6,371,229.0 m";case 7:return"Earth assumed oblate spheroid with major and minor axes specified (in m) by data producer";case 8:return"Earth model assumed spherical with radius 6,371,200 m, but the horizontal datum of the resulting Latitude/Longitude field is the WGS84 reference frame";case 9:return"Earth represented by the OSGB 1936 Datum, using the Airy_1830 Spheroid, the Greenwich meridian as 0 Longitude, the Newlyn datum as mean sea level, 0 height.";case 255:return"Missing";default:throw new Error("Table 3.2 missing code value: "+e)}},f=function(e){switch(e){case 0:return h;default:throw new Error("Template 3."+e+" lookup table not defined")}},p=function(e){var r=e.readUInt32BE(38),a=e.readUInt32BE(42),n=0===r?1e-6:r/a;return{shape:e.readUInt8(14),nx:e.readUInt32BE(30),ny:e.readUInt32BE(34),basicAngle:r,subdivisions:a,la1:(e.readInt32BE(46)<0?-(2147483648^e.readInt32BE(46)):e.readInt32BE(46))*n,lo1:e.readInt32BE(50)*n,resolution:e.readUInt8(54),la2:(e.readInt32BE(55)<0?-(2147483648^e.readInt32BE(55)):e.readInt32BE(55))*n,lo2:e.readInt32BE(59)*n,dx:e.readInt32BE(63)*n,dy:e.readInt32BE(67)*n,scanMode:e.readUInt8(71),gridUnits:"degrees"}},h=function(e){return r({},e,{shape:v(e.shape)})},C=function(e){var a=e.contents.gridDefinitionTemplate;return r({},e,{contents:r({},e.contents,{gridDefinitionTemplate:b(a),gridDefinition:f(a)(e.contents.gridDefinition)})})},M=function(e){switch(e){case 0:return"Analysis or forecast at a horizontal level or in a horizontal layer at a point in time.";case 1:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time.";case 2:return"Derived forecasts based on all ensemble members at a horizontal level or in a horizontal layer at a point in time.";case 3:return"Derived forecasts based on a cluster of ensemble members over a rectangular area at a horizontal level or in a horizontal layer at a point in time.";case 4:return"Derived forecasts based on a cluster of ensemble members over a circular area at a horizontal level or in a horizontal layer at a point in time.";case 5:return"Probability forecasts at a horizontal level or in a horizontal layer at a point in time.";case 6:return"Percentile forecasts at a horizontal level or in a horizontal layer at a point in time.";case 7:return"Analysis or forecast error at a horizontal level or in a horizontal layer at a point in time.";case 8:return"Average, accumulation, extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval.";case 9:return"Probability forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval.";case 10:return"Percentile forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval.";case 11:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval.";case 12:return"Derived forecasts based on all ensemble members at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval.";case 13:return"Derived forecasts based on a cluster of ensemble members over a rectangular area at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval.";case 14:return"Derived forecasts based on a cluster of ensemble members over a circular area at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval.";case 15:return"Average, accumulation, extreme values or other statistically-processed values over a spatial area at a horizontal level or in a horizontal layer at a point in time.";case 20:return"Radar product";case 30:return"Satellite product  NOTE: This template is deprecated. Template 4.31 should be used instead.";case 31:return"Satellite product";case 32:return"Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for simulate (synthetic) satellite data";case 33:return"Individual Ensemble Forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for simulated (synthetic) satellite data";case 34:return"Individual Ensemble Forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval for simulated (synthetic) satellite data";case 35:return"Satellite product with or without associated quality values";case 40:return"Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents.";case 41:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents.";case 42:return"Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents.";case 43:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval for atmospheric chemical constituents.";case 44:return"Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for aerosol.";case 45:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval for aerosol.";case 46:return"Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol.";case 47:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval for aerosol.";case 48:return"Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for aerosol.";case 49:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for optical properties of aerosol.";case 51:return"Categorical forecast at a horizontal level or in a horizontal layer at a point in time.";case 53:return"Partitioned names at a horizontal level or horizontal layer at a point in time.";case 54:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for partitioned names.";case 55:return"Spatio-temporal changing tiles at a horizontal level or horizontal layer at a point in time";case 56:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for spatio-temporal changing tile names.";case 57:return"Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents based on a distribution function";case 58:return"Individual Ensemble Forecast, Control and Perturbed, at a horizontal level or in a horizontal layer at a point in time interval for Atmospheric Chemical Constituents based on a distribution function";case 59:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for spatio-temporal changing tile names (corrected version of template 4.56 - See Template 4.59)";case 60:return"Individual Ensemble Reforecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time.";case 61:return"Individual Ensemble Reforecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval";case 62:return"Average, Accumulation and/or Extreme values or other Statistically-processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for spatio-temporal changing tiles at a horizontal level or horizontal layer at a point in time";case 63:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for spatio-temporal changing tiles";case 67:return"Average, accumulation and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents based on a distribution function";case 68:return"Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents based on a distribution function.";case 70:return"Post-processing analysis or forecast at a horizontal level or in a horizontal layer at a point in time.";case 71:return"Post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time.";case 72:return"Post-processing average, accumulation, extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval.";case 73:return"Post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval.";case 91:return"Categorical forecast at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval.";case 254:return"CCITT IA5 character string";case 1e3:return"Cross-section of analysis and forecast at a point in time.";case 1001:return"Cross-section of averaged or otherwise statistically processed analysis or forecast over a range of time.";case 1002:return"Cross-section of analysis and forecast, averaged or otherwise statistically-processed over latitude or longitude.";case 1100:return"Hovmoller-type grid with no averaging or other statistical processing";case 1101:return"Hovmoller-type grid with averaging or other statistical processing";case 65535:return"Missing";default:throw new Error("Table 4.0 missing code value: "+e)}},S=function(e,r){switch(e){case 0:switch(r){case 0:return"Temperature";case 1:return"Moisture";case 2:return"Momentum";case 3:return"Mass";case 4:return"Short-wave radiation";case 5:return"Long-wave radiation";case 6:return"Cloud";case 7:return"Thermodynamic Stability indicies";case 8:return"Kinematic Stability indicies";case 9:return"Temperature Probabilities*";case 10:return"Moisture Probabilities*";case 11:return"Momentum Probabilities*";case 12:return"Mass Probabilities*";case 13:return"Aerosols";case 14:return"Trace gases (e.g. Ozone, CO2)";case 15:return"Radar";case 16:return"Forecast Radar Imagery";case 17:return"Electrodynamics";case 18:return"Nuclear/radiology";case 19:return"Physical atmospheric properties";case 20:return"Atmospheric chemical Constituents";case 190:return"CCITT IA5 string";case 191:return"Miscellaneous";case 192:return"Covariance";case 255:return"Missing";default:throw new Error("Table 4.1 with discipline "+e+" missing code value "+r)}default:throw new Error("Table 4.1 missing discipline value: "+r)}},g=function(e,r,a){var n=new Error("Table 4.2 missing discipline value: "+a),t=new Error("Table 4.2 with discipline "+e+" missing category value "+r),s=new Error("Table 4.2 with discipline "+e+" and category value "+r+" missing code value "+a);switch(e){case 0:switch(r){case 0:switch(a){case 0:return{name:"Temperature",units:"K",abbrev:"TMP"};case 1:return{name:"Virtual Temperature",units:"K",abbrev:"VTMP"};case 2:return{name:"Potential Temperature",units:"K",abbrev:"POT"};case 3:return{name:"Pseudo-Adiabatic Potential Temperature (or Equivalent Potential Temperature)",units:"K",abbrev:"EPOT"};case 4:return{name:"Maximum Temperature*",units:"K",abbrev:"TMAX"};case 5:return{name:"Minimum Temperature*",units:"K",abbrev:"TMIN"};case 6:return{name:"Dew Point Temperature",units:"K",abbrev:"DPT"};case 7:return{name:"Dew Point Depression (or Deficit)",units:"K",abbrev:"DEPR"};case 8:return{name:"Lapse Rate",units:"K m-1",abbrev:"LAPR"};case 9:return{name:"Temperature Anomaly",units:"K",abbrev:"TMPA"};case 10:return{name:"Latent Heat Net Flux",units:"W m-2",abbrev:"LHTFL"};case 11:return{name:"Sensible Heat Net Flux",units:"W m-2",abbrev:"SHTFL"};case 12:return{name:"Heat Index",units:"K",abbrev:"HEATX"};case 13:return{name:"Wind Chill Factor",units:"K",abbrev:"WCF"};case 14:return{name:"Minimum Dew Point Depression*",units:"K",abbrev:"MINDPD"};case 15:return{name:"Virtual Potential Temperature",units:"K",abbrev:"VPTMP"};case 16:return{name:"Snow Phase Change Heat Flux",units:"W m-2",abbrev:"SNOHF"};case 17:return{name:"Skin Temperature",units:"K",abbrev:"SKINT"};case 18:return{name:"Snow Temperature (top of snow)",units:"K",abbrev:"SNOT"};case 19:return{name:"Turbulent Transfer Coefficient for Heat",units:"Numeric",abbrev:"TTCHT"};case 20:return{name:"Turbulent Diffusion Coefficient for Heat",units:"m2s-1",abbrev:"TDCHT"};case 21:return{name:"Apparent Temperature **",units:"K",abbrev:"APTMP"};case 22:return{name:"Temperature Tendency due to Short-Wave Radiation",units:"K s-1",abbrev:"TTSWR"};case 23:return{name:"Temperature Tendency due to Long-Wave Radiation",units:"K s-1",abbrev:"TTLWR"};case 24:return{name:"Temperature Tendency due to Short-Wave Radiation, Clear Sky",units:"K s-1",abbrev:"TTSWRCS"};case 25:return{name:"Temperature Tendency due to Long-Wave Radiation, Clear Sky",units:"K s-1",abbrev:"TTLWRCS"};case 26:return{name:"Temperature Tendency due to nameizations",units:"K s-1",abbrev:"TTPARM"};case 27:return{name:"Wet Bulb Temperature",units:"K",abbrev:"WETBT"};case 28:return{name:"Unbalanced Component of Temperature",units:"K",abbrev:"UCTMP"};case 29:return{name:"Temperature Advection",units:"K s-1",abbrev:"TMPADV"};case 192:return{name:"Snow Phase Change Heat Flux",units:"W m-2",abbrev:"SNOHF"};case 193:return{name:"Temperature Tendency by All Radiation",units:"K s-1",abbrev:"TTRAD"};case 194:return{name:"Relative Error Variance",units:"",abbrev:"REV"};case 195:return{name:"Large Scale Condensate Heating Rate",units:"K s-1",abbrev:"LRGHR"};case 196:return{name:"Deep Convective Heating Rate",units:"K s-1",abbrev:"CNVHR"};case 197:return{name:"Total Downward Heat Flux at Surface",units:"W m-2",abbrev:"THFLX"};case 198:return{name:"Temperature Tendency by All Physics",units:"K s-1",abbrev:"TTDIA"};case 199:return{name:"Temperature Tendency by Non-radiation Physics",units:"K s-1",abbrev:"TTPHY"};case 200:return{name:"Standard Dev. of IR Temp. over 1x1 deg. area",units:"K",abbrev:"TSD1D"};case 201:return{name:"Shallow Convective Heating Rate",units:"K s-1",abbrev:"SHAHR"};case 202:return{name:"Vertical Diffusion Heating rate",units:"K s-1",abbrev:"VDFHR"};case 203:return{name:"Potential Temperature at Top of Viscous Sublayer",units:"K",abbrev:"THZ0"};case 204:return{name:"Tropical Cyclone Heat Potential",units:"Jm-2K",abbrev:"TCHP"};case 205:return{name:"Effective Layer (EL) Temperature",units:"C",abbrev:"ELMELT"};case 255:return{name:"Missing",units:"",abbrev:""};default:throw s}case 2:switch(a){case 0:return{name:"Wind Direction (from which blowing)",units:"°",abbrev:"WDIR"};case 1:return{name:"Wind Speed",units:"m s-1",abbrev:"WIND"};case 2:return{name:"U-Component of Wind",units:"m s-1",abbrev:"UGRD"};case 3:return{name:"V-Component of Wind",units:"m s-1",abbrev:"VGRD"};case 4:return{name:"Stream Function",units:"m2 s-1",abbrev:"STRM"};case 5:return{name:"Velocity Potential",units:"m2 s-1",abbrev:"VPOT"};case 6:return{name:"Montgomery Stream Function",units:"m2 s-2",abbrev:"MNTSF"};case 7:return{name:"Sigma Coordinate Vertical Velocity",units:"s-1",abbrev:"SGCVV"};case 8:return{name:"Vertical Velocity (Pressure)",units:"Pa s-1",abbrev:"VVEL"};case 9:return{name:"Vertical Velocity (Geometric)",units:"m s-1",abbrev:"DZDT"};case 10:return{name:"Absolute Vorticity",units:"s-1",abbrev:"ABSV"};case 11:return{name:"Absolute Divergence",units:"s-1",abbrev:"ABSD"};case 12:return{name:"Relative Vorticity",units:"s-1",abbrev:"RELV"};case 13:return{name:"Relative Divergence",units:"s-1",abbrev:"RELD"};case 14:return{name:"Potential Vorticity",units:"K m2 kg-1 s-1",abbrev:"PVORT"};case 15:return{name:"Vertical U-Component Shear",units:"s-1",abbrev:"VUCSH"};case 16:return{name:"Vertical V-Component Shear",units:"s-1",abbrev:"VVCSH"};case 17:return{name:"Momentum Flux, U-Component",units:"N m-2",abbrev:"UFLX"};case 18:return{name:"Momentum Flux, V-Component",units:"N m-2",abbrev:"VFLX"};case 19:return{name:"Wind Mixing Energy",units:"J",abbrev:"WMIXE"};case 20:return{name:"Boundary Layer Dissipation",units:"W m-2",abbrev:"BLYDP"};case 21:return{name:"Maximum Wind Speed *",units:"m s-1",abbrev:"MAXGUST"};case 22:return{name:"Wind Speed (Gust)",units:"m s-1",abbrev:"GUST"};case 23:return{name:"U-Component of Wind (Gust)",units:"m s-1",abbrev:"UGUST"};case 24:return{name:"V-Component of Wind (Gust)",units:"m s-1",abbrev:"VGUST"};case 25:return{name:"Vertical Speed Shear",units:"s-1",abbrev:"VWSH"};case 26:return{name:"Horizontal Momentum Flux",units:"N m-2",abbrev:"MFLX"};case 27:return{name:"U-Component Storm Motion",units:"m s-1",abbrev:"USTM"};case 28:return{name:"V-Component Storm Motion",units:"m s-1",abbrev:"VSTM"};case 29:return{name:"Drag Coefficient",units:"Numeric",abbrev:"CD"};case 30:return{name:"Frictional Velocity",units:"m s-1",abbrev:"FRICV"};case 31:return{name:"Turbulent Diffusion Coefficient for Momentum",units:"m2 s-1",abbrev:"TDCMOM"};case 32:return{name:"Eta Coordinate Vertical Velocity",units:"s-1",abbrev:"ETACVV"};case 33:return{name:"Wind Fetch",units:"m",abbrev:"WINDF"};case 34:return{name:"Normal Wind Component **",units:"m s-1",abbrev:"NWIND"};case 35:return{name:"Tangential Wind Component **",units:"m s-1",abbrev:"TWIND"};case 36:return{name:"Amplitude Function for Rossby Wave Envelope for Meridional Wind ***",units:"m s-1",abbrev:"AFRWE"};case 37:return{name:"Northward Turbulent Surface Stress ****",units:"N m-2 s",abbrev:"NTSS"};case 38:return{name:"Eastward Turbulent Surface Stress ****",units:"N m-2 s",abbrev:"ETSS"};case 39:return{name:"Eastward Wind Tendency Due to nameizations",units:"m s-2",abbrev:"EWTPARM"};case 40:return{name:"Northward Wind Tendency Due to nameizations",units:"m s-2",abbrev:"NWTPARM"};case 41:return{name:"U-Component of Geostrophic Wind",units:"m s-1",abbrev:"UGWIND"};case 42:return{name:"V-Component of Geostrophic Wind",units:"m s-1",abbrev:"VGWIND"};case 43:return{name:"Geostrophic Wind Direction",units:"°",abbrev:"GEOWD"};case 44:return{name:"Geostrophic Wind Speed",units:"m s-1",abbrev:"GEOWS"};case 45:return{name:"Unbalanced Component of Divergence",units:"s-1",abbrev:"UNDIV"};case 46:return{name:"Vorticity Advection",units:"s-2",abbrev:"VORTADV"};case 192:return{name:"Vertical Speed Shear",units:"s-1",abbrev:"VWSH"};case 193:return{name:"Horizontal Momentum Flux",units:"N m-2",abbrev:"MFLX"};case 194:return{name:"U-Component Storm Motion",units:"m s-1",abbrev:"USTM"};case 195:return{name:"V-Component Storm Motion",units:"m s-1",abbrev:"VSTM"};case 196:return{name:"Drag Coefficient",units:"non-dim",abbrev:"CD"};case 197:return{name:"Frictional Velocity",units:"m s-1",abbrev:"FRICV"};case 198:return{name:"Latitude of U Wind Component of Velocity",units:"deg",abbrev:"LAUV"};case 199:return{name:"Longitude of U Wind Component of Velocity",units:"deg",abbrev:"LOUV"};case 200:return{name:"Latitude of V Wind Component of Velocity",units:"deg",abbrev:"LAVV"};case 201:return{name:"Longitude of V Wind Component of Velocity",units:"deg",abbrev:"LOVV"};case 202:return{name:"Latitude of Presure Point",units:"deg",abbrev:"LAPP"};case 203:return{name:"Longitude of Presure Point",units:"deg",abbrev:"LOPP"};case 204:return{name:"Vertical Eddy Diffusivity Heat exchange",units:"m2 s-1",abbrev:"VEDH"};case 205:return{name:"Covariance between Meridional and Zonal Components of the wind.",units:"m2 s-2",abbrev:"COVMZ"};case 206:return{name:"Covariance between Temperature and Zonal Components of the wind.",units:"K*m s-1",abbrev:"COVTZ"};case 207:return{name:"Covariance between Temperature and Meridional Components of the wind.",units:"K*m s-1",abbrev:"COVTM"};case 208:return{name:"Vertical Diffusion Zonal Acceleration",units:"m s-2",abbrev:"VDFUA"};case 209:return{name:"Vertical Diffusion Meridional Acceleration",units:"m s-2",abbrev:"VDFVA"};case 210:return{name:"Gravity wave drag zonal acceleration",units:"m s-2",abbrev:"GWDU"};case 211:return{name:"Gravity wave drag meridional acceleration",units:"m s-2",abbrev:"GWDV"};case 212:return{name:"Convective zonal momentum mixing acceleration",units:"m s-2",abbrev:"CNVU"};case 213:return{name:"Convective meridional momentum mixing acceleration",units:"m s-2",abbrev:"CNVV"};case 214:return{name:"Tendency of vertical velocity",units:"m s-2",abbrev:"WTEND"};case 215:return{name:"Omega (Dp/Dt) divide by density",units:"K",abbrev:"OMGALF"};case 216:return{name:"Convective Gravity wave drag zonal acceleration",units:"m s-2",abbrev:"CNGWDU"};case 217:return{name:"Convective Gravity wave drag meridional acceleration",units:"m s-2",abbrev:"CNGWDV"};case 218:return{name:"Velocity Point Model Surface",units:"",abbrev:"LMV"};case 219:return{name:"Potential Vorticity (Mass-Weighted)",units:"1/s/m",abbrev:"PVMWW"};case 220:return{name:"Hourly Maximum of Upward Vertical Velocity",units:"m s-1",abbrev:"MAXUVV"};case 221:return{name:"Hourly Maximum of Downward Vertical Velocity",units:"m s-1",abbrev:"MAXDVV"};case 222:return{name:"U Component of Hourly Maximum 10m Wind Speed",units:"m s-1",abbrev:"MAXUW"};case 223:return{name:"V Component of Hourly Maximum 10m Wind Speed",units:"m s-1",abbrev:"MAXVW"};case 224:return{name:"Ventilation Rate",units:"m2 s-1",abbrev:"VRATE"};case 225:return{name:"Transport Wind Speed",units:"m s-1",abbrev:"TRWSPD"};case 226:return{name:"Transport Wind Direction",units:"Deg",abbrev:"TRWDIR"};case 227:return{name:"Earliest Reasonable Arrival Time (10% exceedance)",units:"s",abbrev:"TOA10"};case 228:return{name:"Most Likely Arrival Time (50% exceedance)",units:"s",abbrev:"TOA50"};case 229:return{name:"Most Likely Departure Time (50% exceedance)",units:"s",abbrev:"TOD50"};case 230:return{name:"Latest Reasonable Departure Time (90% exceedance)",units:"s",abbrev:"TOD90"};case 231:return{name:"Tropical Wind Direction",units:"°",abbrev:"TPWDIR"};case 232:return{name:"Tropical Wind Speed",units:"m s-1",abbrev:"TPWSPD"};case 233:return{name:"Inflow Based (ESFC) to 50% EL Shear Magnitude",units:"kt",abbrev:"ESHR"};case 234:return{name:"U Component Inflow Based to 50% EL Shear Vector",units:"kt",abbrev:"UESH"};case 235:return{name:"V Component Inflow Based to 50% EL Shear Vector",units:"kt",abbrev:"VESH"};case 236:return{name:"U Component Bunkers Effective Right Motion",units:"kt",abbrev:"UEID"};case 237:return{name:"V Component Bunkers Effective Right Motion",units:"kt",abbrev:"VEID"};case 255:return{name:"Missing",units:"",abbrev:""};default:throw s}default:throw t}default:throw n}},y=function(e){switch(e){case 0:return"Analysis";case 1:return"Initialization";case 2:return"Forecast";case 3:return"Bias Corrected Forecast";case 4:return"Ensemble Forecast";case 5:return"Probability Forecast";case 6:return"Forecast Error";case 7:return"Analysis Error";case 8:return"Observation";case 9:return"Climatological";case 10:return"Probability-Weighted Forecast";case 11:return"Bias-Corrected Ensemble Forecast";case 12:return"Post-processed Analysis (See Note)";case 13:return"Post-processed Forecast (See Note)";case 14:return"Nowcast";case 15:return"Hindcast";case 16:return"Physical Retrieval";case 17:return"Regression Analysis";case 18:return"Difference Between Two Forecasts";case 192:return"Forecast Confidence Indicator";case 193:return"Probability-matched Mean";case 194:return"Neighborhood Probability";case 195:return"Bias-Corrected and Downscaled Ensemble Forecast";case 196:return"Perturbed Analysis for Ensemble Initialization";case 197:return"Ensemble Agreement Scale Probability";case 198:return"Post-Processed Deterministic-Expert-Weighted Forecast";case 199:return"Ensemble Forecast Based on Counting";case 200:return"Local Probability-matched Mean";case 255:return"Missing";default:throw new Error("Table 4.3 missing code value: "+e)}},T=function(e){switch(e){case 0:return"Minute";case 1:return"Hour";case 2:return"Day";case 3:return"Month";case 4:return"Year";case 5:return"Decade (10 Years)";case 6:return"Normal (30 Years)";case 7:return"Century (100 Years)";case 10:return"3 Hours";case 11:return"6 Hours";case 12:return"12 Hours";case 13:return"Second";case 255:return"Missing";default:throw new Error("Table 4.4 missing code value: "+e)}},N=function(e){switch(e){case 1:return{name:"Ground or Water Surface",units:null};case 2:return{name:"Cloud Base Level",units:null};case 3:return{name:"Level of Cloud Tops",units:null};case 4:return{name:"Level of 0o C Isotherm",units:null};case 5:return{name:"Level of Adiabatic Condensation Lifted from the Surface",units:null};case 6:return{name:"Maximum Wind Level",units:null};case 7:return{name:"Tropopause",units:null};case 8:return{name:"Nominal Top of the Atmosphere",units:null};case 9:return{name:"Sea Bottom",units:null};case 10:return{name:"Entire Atmosphere",units:null};case 11:return{name:"Cumulonimbus Base (CB)",units:"m"};case 12:return{name:"Cumulonimbus Top (CT)",units:"m"};case 13:return{name:"Lowest level where vertically integrated cloud cover exceeds the specified percentage (cloud base for a given percentage cloud cover)",units:"%"};case 14:return{name:"Level of free convection (LFC)",units:null};case 15:return{name:"Convection condensation level (CCL)",units:null};case 16:return{name:"Level of neutral buoyancy or equilibrium (LNB)",units:null};case 20:return{name:"Isothermal Level",units:"K"};case 21:return{name:"Lowest level where mass density exceeds the specified value (base for a given threshold of mass density)",units:"kg m-3"};case 22:return{name:"Highest level where mass density exceeds the specified value (top for a given threshold of mass density)",units:"kg m-3"};case 23:return{name:"Lowest level where air concentration exceeds the specified value (base for a given threshold of air concentration",units:"Bq m-3"};case 24:return{name:"Highest level where air concentration exceeds the specified value (top for a given threshold of air concentration)",units:"Bq m-3"};case 25:return{name:"Highest level where radar reflectivity exceeds the specified value (echo top for a given threshold of reflectivity)",units:"dBZ"};case 100:return{name:"Isobaric Surface",units:"Pa"};case 101:return{name:"Mean Sea Level",units:null};case 102:return{name:"Specific Altitude Above Mean Sea Level",units:"m"};case 103:return{name:"Specified Height Level Above Ground",units:"m"};case 104:return{name:"Sigma Level",units:null};case 105:return{name:"Hybrid Level",units:null};case 106:return{name:"Depth Below Land Surface",units:"m"};case 107:return{name:"Isentropic (theta) Level",units:"K"};case 108:return{name:"Level at Specified Pressure Difference from Ground to Level",units:"Pa"};case 109:return{name:"Potential Vorticity Surface",units:"K m2 kg-1 s-1"};case 111:return{name:"Eta Level",units:null};case 113:return{name:"Logarithmic Hybrid Level",units:null};case 114:return{name:"Snow Level",units:"Numeric"};case 115:return{name:"Sigma height level (see Note 4)",units:null};case 117:return{name:"Mixed Layer Depth",units:"m"};case 118:return{name:"Hybrid Height Level",units:null};case 119:return{name:"Hybrid Pressure Level",units:null};case 150:return{name:"Generalized Vertical Height Coordinate (see Note 4)",units:null};case 151:return{name:"Soil level (See Note 5)",units:"Numeric"};case 160:return{name:"Depth Below Sea Level",units:"m"};case 161:return{name:"Depth Below Water Surface",units:"m"};case 162:return{name:"Lake or River Bottom",units:null};case 163:return{name:"Bottom Of Sediment Layer",units:null};case 164:return{name:"Bottom Of Thermally Active Sediment Layer",units:null};case 165:return{name:"Bottom Of Sediment Layer Penetrated By Thermal Wave",units:null};case 166:return{name:"Mixing Layer",units:null};case 167:return{name:"Bottom of Root Zone",u