table_3_0 = {
'0':'Specified in Code Table 3.1',
'1':'Predetermined Grid Definition - Defined by Originating Center',
'2-191':'Reserved',
'192-254':'Reserved for Local Use',
'255':'A grid definition does not apply to this product.',
}

table_3_1 = {
'0':'Latitude/Longitude',
'1':'Rotated Latitude/Longitude',
'2':'Stretched Latitude/Longitude',
'3':'Rotated and Stretched Latitude/Longitude',
'4':'Variable Resolution Latitude/longitude ',
'5':'Variable Resolution Rotated Latitude/longitude ',
'6-9':'Reserved',
'10':'Mercator',
'11':'Reserved',
'12':'Transverse Mercator ',
'13':'Mercator with modelling subdomains definition ',
'14-19':'Reserved',
'20':'Polar Stereographic Projection (Can be North or South)',
'21-22':'Reserved',
'23':'Polar Stereographic with modelling subdomains definition ',
'24-29':'Reserved',
'30':'Lambert Conformal (Can be Secant, Tangent, Conical, or Bipolar)',
'31':'Albers Equal Area',
'32':'Reserved',
'33':'Lambert conformal with modelling subdomains definition ',
'34-39':'Reserved',
'40':'Gaussian Latitude/Longitude',
'41':'Rotated Gaussian Latitude/Longitude',
'42':'Stretched Gaussian Latitude/Longitude',
'43':'Rotated and Stretched Gaussian Latitude/Longitude',
'44-49':'Reserved',
'50':'Spherical Harmonic Coefficients',
'51':'Rotated Spherical Harmonic Coefficients',
'52':'Stretched Spherical Harmonic Coefficients',
'53':'Rotated and Stretched Spherical Harmonic Coefficients',
'54-59':'Reserved',
'60':'Cubed-Sphere Gnomonic ',
'61':'Spectral Mercator with modelling subdomains definition ',
'62':'Spectral Polar Stereographic with modelling subdomains definition ',
'63':'Spectral Lambert conformal with modelling subdomains definition ',
'64-89':'Reserved',
'90':'Space View Perspective or Orthographic',
'91-99':'Reserved',
'100':'Triangular Grid Based on an Icosahedron',
'101':'General Unstructured Grid (see Template 3.101)',
'102-109':'Reserved',
'110':'Equatorial Azimuthal Equidistant Projection',
'111-119':'Reserved',
'120':'Azimuth-Range Projection',
'121-139':'Reserved',
'140':'Lambert Azimuthal Equal Area Projection ',
'141-149':'Reserved',
'150':'Hierarchical Equal Area isoLatitude Pixelization grid (HEALPix) ',
'151-203':'Reserved',
'204':'Curvilinear Orthogonal Grids',
'205-999':'Reserved',
'1000':'Cross Section Grid with Points Equally Spaced on the Horizontal ',
'1001-1099':'Reserved',
'1100':'Hovmoller Diagram with Points Equally Spaced on the Horizontal',
'1101-1199':'Reserved',
'1200':'Time Section Grid',
'1201-32767':'Reserved',
'32768-65534':'Reserved for Local Use',
'32768':'Rotated Latitude/Longitude (Arakawa Staggered E-Grid)',
'32769':'Rotated Latitude/Longitude (Arakawa Non-E Staggered Grid)',
'65535':'Missing',
}

table_3_2 = {
'0':'Earth assumed spherical with radius = 6,367,470.0 m',
'1':'Earth assumed spherical with radius specified (in m) by data producer',
'2':'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)',
'3':'Earth assumed oblate spheriod with major and minor axes specified (in km) by data producer',
'4':'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)',
'5':'Earth assumed represented by WGS84 (as used by ICAO since 1998) (Uses IAG-GRS80 as a basis)',
'6':'Earth assumed spherical with radius = 6,371,229.0 m',
'7':'Earth assumed oblate spheroid with major and minor axes specified (in m) by data producer',
'8':'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',
'9':'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.',
'10':'Earth model assumed WGS84 with corrected geomagnetic coordinates (latitude and longitude) defined by Gustafsson et al., 1992".',
'11':'Sun assumed spherical with radius = 695 990 000 m (Allen, C.W., Astrophysical Quantities, 3rd ed.; Athlone: London, 1976) and Stonyhurst latitude and longitude system with origin at the intersection of the solar central meridian (as seen from Earth) and the solar equator (Thompson, W., Coordinate systems for solar image data, Astron. Astrophys. 2006, 449, 791-803)',
'12-191':'Reserved',
'192-254':'Reserved for Local Use',
'255':'Missing',
}

table_3_11 = {
'0':'There is no appended list',
'1':'Numbers define number of points corresponding to full coordinate circles (i.e. parallels). Coordinate values on each circle are multiple of the circle mesh, and extreme coordinate values given in grid definition may not be reached in all rows.',
'2':'Numbers define number of points corresponding to coordinate lines delimited by extreme coordinate values given in grid definition which are present in each row.',
'3':'Numbers define the actual latitudes for each row in the grid. The list of numbers are integer values of the valid latitudes in microdegrees (scale by 106) or in unit equal to the ratio of the basic angle and the subdivisions number for each row, in the same order as specified in the "scanning mode flag" (bit no. 2)',
'4-254':'Reserved',
'255':'Missing',
}

table_earth_params = {
'0':{'shape':'spherical','radius':6367470.0},
'1':{'shape':'spherical','radius':None},
'2':{'shape':'oblateSpheriod','major_axis':6378160.0,'minor_axis':6356775.0,'flattening':1.0/297.0},
'3':{'shape':'oblateSpheriod','major_axis':None,'minor_axis':None,'flattening':None},
'4':{'shape':'oblateSpheriod','major_axis':6378137.0,'minor_axis':6356752.314,'flattening':1.0/298.257222101},
'5':{'shape':'ellipsoid','major_axis':6378137.0,'minor_axis':6356752.3142,'flattening':1.0/298.257222101},
'6':{'shape':'spherical','radius':6371229.0},
'7':{'shape':'oblateSpheriod','major_axis':None,'minor_axis':None,'flattening':None},
'8':{'shape':'spherical','radius':6371200.0},
}
for i in range(9,256):
    table_earth_params[str(i)] = {'shape':'unknown','radius':None}
