table_3_1 = {
'0':'Latitude/Longitude (See Template 3.0) Also called Equidistant Cylindrical or Plate Caree',
'1':'Rotated Latitude/Longitude (See Template 3.1)',
'2':'Stretched Latitude/Longitude (See Template 3.2)',
'3':'Rotated and Stretched Latitude/Longitude (See Template 3.3)',
'4':'Variable Resolution Latitude/longitude  (See Template 3.4)',
'5':'Variable Resolution Rotated Latitude/longitude  (See Template 3.5)',
'6-9':'Reserved',
'10':'Mercator (See Template 3.10)',
'11':'Reserved',
'12':'Transverse Mercator  (See Template 3.12)',
'13':'Mercator with modelling subdomains definition  (See Template 3.13)',
'14-19':'Reserved',
'20':'Polar Stereographic Projection (Can be North or South) (See Template 3.20)',
'21-22':'Reserved',
'23':'Polar Stereographic with modelling subdomains definition  (See Template 3.23)',
'24-29':'Reserved',
'30':'Lambert Conformal (Can be Secant, Tangent, Conical, or Bipolar) (See Template 3.30)',
'31':'Albers Equal Area (See Template 3.31)',
'32':'Reserved',
'33':'Lambert conformal with modelling subdomains definition  (See Template 3.33)',
'34-39':'Reserved',
'40':'Gaussian Latitude/Longitude (See  Template 3.40)',
'41':'Rotated Gaussian Latitude/Longitude (See Template 3.41)',
'42':'Stretched Gaussian Latitude/Longitude (See Template 3.42)',
'43':'Rotated and Stretched Gaussian Latitude/Longitude (See Template 3.43)',
'44-49':'Reserved',
'50':'Spherical Harmonic Coefficients (See Template 3.50)',
'51':'Rotated Spherical Harmonic Coefficients (See Template 3.51)',
'52':'Stretched Spherical Harmonic Coefficients (See Template 3.52)',
'53':'Rotated and Stretched Spherical Harmonic Coefficients (See Template 3.53)',
'54-59':'Reserved',
'60':'Cubed-Sphere Gnomonic  (See Template 3.60) Validation',
'61':'Spectral Mercator with modelling subdomains definition  (See Template 3.61)',
'62':'Spectral Polar Stereographic with modelling subdomains definition  (See Template 3.62)',
'63':'Spectral Lambert conformal with modelling subdomains definition  (See Template 3.63)',
'64-89':'Reserved',
'90':'Space View Perspective or Orthographic (See Template 3.90)',
'91-99':'Reserved',
'100':'Triangular Grid Based on an Icosahedron (See Template 3.100)',
'101':'General Unstructured Grid (see Template 3.101)',
'102-109':'Reserved',
'110':'Equatorial Azimuthal Equidistant Projection (See Template 3.110)',
'111-119':'Reserved',
'120':'Azimuth-Range Projection (See Template 3.120)',
'121-139':'Reserved',
'140':'Lambert Azimuthal Equal Area Projection  (See Template 3.140)',
'141-203':'Reserved',
'204':'Curvilinear Orthogonal Grids (See Template 3.204)',
'205-999':'Reserved',
'1000':'Cross Section Grid with Points Equally Spaced on the Horizontal (See Template 3.1000)',
'1001-1099':'Reserved',
'1100':'Hovmoller Diagram with Points Equally Spaced on the Horizontal (See Template 3.1100)',
'1101-1199':'Reserved',
'1200':'Time Section Grid (See Template 3.1200)',
'1201-32767':'Reserved',
'32768-65534':'Reserved for Local Use',
'32768':'Rotated Latitude/Longitude  (Arakawa Staggered E-Grid) (See Template 3.32768)',
'32769':'Rotated Latitude/Longitude  (Arakawa Non-E Staggered Grid) (See Template 3.32769)',
'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',
}

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':'oblateSpheriod','major_axis':6378137.0,'minor_axis':6356752.3142,'flattening':1.0/298.257223563},
'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):
    earth_params[str(i)] = {'shape':'unknown','radius':None}
