function Remap_Parameter_Table(tableversion)
global Parameter_Table 

% overlay table 128 or 129 if tableversion is specified in the pds(4) octet
% note that table 0 is for the old busted para gribs, not an official table

switch tableversion
  case 0
    Parameter_Table{177}={'NLAT', 'Latitude (-90 to +90)', 'deg'};
    Parameter_Table{178}={'ELON', 'East longitude (0-360)', 'deg'};    
  case 128
    Parameter_Table{129}={'AVDEPTH', 'Ocean depth - mean', 'm'};
    Parameter_Table{130}={'DEPTH', 'Ocean depth - instantaneous', 'm'};
    Parameter_Table{131}={'ELEV', 'Ocean surface elevation relative to geoid', 'm'};
    Parameter_Table{132}={'MXEL24', 'Max ocean surface elevation in last 24 hours', 'm'};
    Parameter_Table{133}={'MNEL24', 'Min ocean surface elevation in last 24 hours', 'm'};
    Parameter_Table{134}={'var133', 'Reserved', '-'};
    Parameter_Table{135}={'var134', 'Reserved', '-'};
    Parameter_Table{136}={'O2', 'Oxygen (O2 (aq))', '-'};
    Parameter_Table{137}={'PO4', 'PO4', 'Mol/kg'};
    Parameter_Table{138}={'NO3', 'NO3', 'Mol/kg'};
    Parameter_Table{139}={'SiO4', 'SiO4', 'Mol/kg'};
    Parameter_Table{140}={'CO2aq', 'CO2 (aq)', 'Mol/kg'};
    Parameter_Table{141}={'HCO3', 'HCO3', 'Mol/kg'};
    Parameter_Table{142}={'CO3', 'CO3', 'Mol/kg'};
    Parameter_Table{143}={'TCO2', 'TCO2', 'Mol/kg'};
    Parameter_Table{144}={'TALK', 'TALK', 'Mol/kg'};
    Parameter_Table{145}={'var144', 'Reserved','-'};
    Parameter_Table{146}={'var145', 'Reserved', '-'};
    Parameter_Table{147}={'S11', 'S11 - 1,1 component of ice stress tensor', '-'};
    Parameter_Table{148}={'S12', 'S12 - 1,2 component of ice stress tensor', '-'};
    Parameter_Table{149}={'S22', 'S22 - 2,2 component of ice stress tensor', '-'};
    Parameter_Table{150}={'INV1', 'T1 - First invariant of stress tensor', '-'};
    Parameter_Table{151}={'INV2', 'T2 - Second invariant of stress tensor', '-'};
    Parameter_Table{152}={'var151', 'Reserved', '-'};
    Parameter_Table{153}={'var152', 'Reserved', '-'};
    Parameter_Table{154}={'var153', 'Reserved', '-'};
    Parameter_Table{155}={'var154', 'Reserved', '-'};
    Parameter_Table{156}={'WVRGH', 'Wave Roughness', '-'};
    Parameter_Table{157}={'WVSTRS', 'Wave Stresses', '-'};
    Parameter_Table{158}={'WHITE', 'Whitecap coverage', '-'};
    Parameter_Table{159}={'SWDIRWID', 'Swell direction width', '-'};
    Parameter_Table{160}={'SWFREWID', 'Swell frequency width', '-'};
    Parameter_Table{161}={'WVAGE', 'Wave age', '-'};
    Parameter_Table{162}={'PWVAGE', 'Physical Wave age', '-'};
    Parameter_Table{163}={'var162', 'Reserved', '-'};
    Parameter_Table{164}={'var163', 'Reserved', '-'};
    Parameter_Table{165}={'var164', 'Reserved', '-'};
    Parameter_Table{166}={'LTURB', 'Master length scale (turbulence)', 'm'};
    Parameter_Table{167}={'var166', 'Reserved', '-'};
    Parameter_Table{168}={'var167', 'Reserved', '-'};
    Parameter_Table{169}={'var168', 'Reserved', '-'};
    Parameter_Table{170}={'var169', 'Reserved', '-'};
    Parameter_Table{171}={'AIHFLX', 'Net Air-Ice heat flux', 'W/m^2'};
    Parameter_Table{172}={'AOHFLX', 'Net Air-Ocean heat flux', 'W/m^2'};
    Parameter_Table{173}={'IOHFLX', 'Net Ice-Ocean heat flux', 'W/m^2'};
    Parameter_Table{174}={'IOSFLX', 'Net Ice-Ocean salt flux', 'kg/s'};
    Parameter_Table{175}={'var174', 'Reserved', '-'};
    Parameter_Table{176}={'OMLT', 'Ocean Mixed Layer Temperature', 'K'};
    Parameter_Table{177}={'OMLS', 'Ocean Mixed Layer Salinity', 'kg/kg'};
    Parameter_Table{178}={'OMLPOTDEN', 'Ocean Mixed Layer Potential Density (Referenced to 2000m)', 'kg/m^3'};
    Parameter_Table{179}={'OMLU', 'U Velocity in mixed layer','m/s'};
    Parameter_Table{180}={'OMLV', 'V Velocity in mixed layer', 'm/s'};
    Parameter_Table{181}={'ASHFL', 'Assimilative Heat Flux', 'W/m^2'};
    Parameter_Table{182}={'ASSFL', 'Assimilative Salt Flux', 'mm/day'};
    Parameter_Table{183}={'BOTLD', 'Bottom Layer Depth', 'm'};
    Parameter_Table{184}={'UBARO', 'Barotropic U Velocity', 'm/s'};
    Parameter_Table{185}={'VBARO', 'Barotropic V Velocity', 'm/s'};
    Parameter_Table{186}={'INTFD', 'Interface Depth', 'm'};
    Parameter_Table{187}={'WTMPC', 'Temperature', 'C'};
    Parameter_Table{188}={'SALIN', 'Salinity', 'psu'};
    Parameter_Table{189}={'EMNP', 'Evaporation - Precipitation', 'cm/day'};
    Parameter_Table{190}={'var189', 'Reserved','-'};
    Parameter_Table{191}={'KENG', 'Kinetic Energy', 'J/kg'};
    Parameter_Table{192}={'var191', 'Reserved','-'};
    Parameter_Table{193}={'LAYTH', 'Layer Thickness', 'm'};
    Parameter_Table{194}={'SSTT', 'Sufrace Temperature Trend', 'K/day'};
    Parameter_Table{195}={'SSST', 'Surface Salinity Trend', 'psu/day'};
    Parameter_Table{255}={'RERRVAR', 'Relative Error Variance pure number', '-'};
  case 129
    Parameter_Table{129}={'PAOT', 'Probability anomaly of temperature', '%'};
    Parameter_Table{130}={'PAOP', 'Probability anomaly of precipitation', '%'};
    Parameter_Table{131}={'-', '-', '-'};
    Parameter_Table{132}={'FRAIN', 'Rain fraction of total liquid water', 'non-dim'};
    Parameter_Table{133}={'FICE', 'Ice fraction of total condensate', 'non-dim'};
    Parameter_Table{134}={'FRIME', 'Rime Factor', 'non-dim'};
    Parameter_Table{135}={'CUEFI', 'Convective cloud efficiency', 'non-dim'};
    Parameter_Table{136}={'TCOND', 'Total condensate', 'kg/kg'};
    Parameter_Table{137}={'TCOLW', 'Total column-integrated cloud water', 'kg/m2'};
    Parameter_Table{138}={'TCOLI', 'Total column-integrated cloud ice', 'kg/m2'};
    Parameter_Table{139}={'TCOLR', 'Total column-integrated rain', 'kg/m2'};
    Parameter_Table{140}={'TCOLS', 'Total column-integrated snow', 'kg/m2'};
    Parameter_Table{141}={'TCOLC', 'Total column-integrated condensate', 'kg/m2'};
    Parameter_Table{142}={'PLPL', 'Pressure of level from which parcel was lifted', 'Pa'};
    Parameter_Table{143}={'HLPL', 'Height of level from which parcel was lifted', 'm'};
    Parameter_Table{144}={'CEMS', 'Cloud Emissivity Fraction', '0-1'};
    Parameter_Table{145}={'COPD', 'Cloud Optical Depth', 'non-dim'};
    Parameter_Table{146}={'PSIZ', 'Effective Particle size', 'Microns'};
    Parameter_Table{147}={'TCWAT', 'Total Water Cloud', '%'};
    Parameter_Table{148}={'TCICE', 'Total Ice Cloud', '%'};
    Parameter_Table{149}={'WDIF' 'Wind difference', 'm/s'};
    Parameter_Table{150}={'WSTP', 'Wave Steepness', 'non-dim'};
    Parameter_Table{151}={'PTAN', 'Probability of Temperature being above normal', '%'};
    Parameter_Table{152}={'PTNN', 'Probability of Temperature being near normal', '%'};
    Parameter_Table{153}={'PTBN', 'Probability of Temperature being below normal', '%'};
    Parameter_Table{154}={'PPAN', 'Probability of Precipitation being above normal', '%'};
    Parameter_Table{155}={'PPNN', 'Probability of Precipitation being near normal', '%'};
    Parameter_Table{156}={'PPBN', 'Probability of Precipitation being below normal', '%'};
    Parameter_Table{157}={'PMTC', 'Particulate matter (coarse)', 'µg/m3'};
    Parameter_Table{158}={'PMTF', 'Particulate matter (fine)', 'µg/m3'};
    Parameter_Table{159}={'AETMP', 'Analysis error of temperature', 'K'};
    Parameter_Table{160}={'AEDPT', 'Analysis error of dew point', '%'};
    Parameter_Table{161}={'AESPH', 'Analysis error of specific humidity', 'kg/kg'};
    Parameter_Table{162}={'AEUWD', 'Analysis error of u-wind', 'm/s'};
    Parameter_Table{163}={'AEVWD', 'Analysis error of v-wind', 'm/s'};
    Parameter_Table{164}={'LPMTF', 'Particulate matter (fine)', 'log10(µg/m3)'};
    Parameter_Table{165}={'LIPMF', 'Integrated column particulate matter (fine)', 'log10(µg/m3)'};
    Parameter_Table{166}={'REFZR', 'Derived radar reflectivity backscatter from rain', 'mm6/m3'};
    Parameter_Table{167}={'REFZI', 'Derived radar reflectivity backscatter from ice', 'mm6/m3'};
    Parameter_Table{168}={'REFZC', 'Derived radar reflectivity backscatter from parameterized convection', 'mm6/m3'};
    Parameter_Table{169}={'TCLSW', 'Total column-integrated supercooled liquid water', 'kg/m2'};
    Parameter_Table{170}={'TCOLM', 'Total column-integrated melting ice', 'kg/m2'};
    Parameter_Table{171}={'ELRDI', 'Ellrod Index', 'non-dim'};
    Parameter_Table{172}={'TSEC', 'Seconds prior to initial reference time (defined in octects 18-20)', 'sec'};
    Parameter_Table{173}={'TSECA', 'Seconds after initial reference time (defined in octets 18-20)', 'sec'};
    Parameter_Table{174}={'NUM', 'Number of samples/observations', 'non-dim'};
    Parameter_Table{175}={'AEPRS', 'Analysis error of pressure', 'Pa'};
    Parameter_Table{176}={'ICSEV', 'Icing severity', 'non-dim'};
    Parameter_Table{177}={'ICPRB', 'Icing probability', 'non-dim'};
    Parameter_Table{178}={'LAVNI', 'Low-level aviation interest', 'non-dim'};
    Parameter_Table{179}={'HAVNI', 'High-level aviation interest', 'non-dim'};
    Parameter_Table{180}={'FLGHT', 'Flight Category', 'non-dim'};
    Parameter_Table{181}={'OZCON', 'Ozone concentration', 'PPB'};
    Parameter_Table{182}={'OZCAT', 'Categorical ozone concentration', 'non-dim'};
    Parameter_Table{183}={'VEDH', 'Vertical eddy diffusivity heat exchange (Kh)', 'm2/s'};
    Parameter_Table{184}={'SIGV', 'Sigma level value', 'non-dim'};
    Parameter_Table{185}={'EWGT', 'Ensemble Weight', 'non-dim'};
    Parameter_Table{186}={'CICEL', 'Confidence indicator - Ceiling', 'non-dim'};
    Parameter_Table{187}={'CIVIS', 'Confidence indicator - Visibility', 'non-dim'};
    Parameter_Table{188}={'CIFLT', 'Confidence indicator - Flight Category', 'non-dim'};
    Parameter_Table{189}={'LAVV', 'Latitude of V wind component of velocity', 'deg'};
    Parameter_Table{190}={'LOVV', 'Longitude of V wind component of velocity', 'deg'};
    Parameter_Table{191}={'USCT', 'Scatterometer estimated U wind componenet', 'm/s'};
    Parameter_Table{192}={'VSCT', 'Scatterometer estimated V wind componenet', 'm/s'};
    Parameter_Table{193}={'LAUV', 'Latitude of U wind component of velocity', 'deg'};
    Parameter_Table{194}={'LOUV', 'Longitude of U wind component of velocity', 'deg'};
    Parameter_Table{195}={'TCHP', 'Tropical Cyclone Heat Potential', 'J/m2'};
    Parameter_Table{196}={'DBSS', 'Geometric Depth Below Sea Surface', 'm'};
    Parameter_Table{197}={'ODHA', 'Ocean Dynamic Height Anomaly dynamic', 'm'};
    Parameter_Table{198}={'OHC', 'Ocean Heat Content', 'J/m2'};
    Parameter_Table{199}={'SSHG', 'Sea Surface Height Relative to Geoid', 'm'};
    Parameter_Table{200}={'SLTFL', 'Salt Flux', 'g/cm2/s'};
    Parameter_Table{201}={'DUVB', 'UV-B downward solar flux', 'W/m2'};
    Parameter_Table{202}={'CDUVB', 'Clear sky UV-B downward solar flux', 'W/m2'};
    Parameter_Table{203}={'THFLX', 'Total downward heat flux at surface (downward is positive)', 'W/m2'};
    Parameter_Table{204}={'UVAR', 'U velocity variance','m2/s2'};
    Parameter_Table{205}={'VVAR', 'V velocity variance', 'm2/s2'};
    Parameter_Table{206}={'UVVCC', 'UV Velocity Cross Correlation', 'm2/s2'};
    Parameter_Table{207}={'MCLS', 'Meteorological Correlation Length Scale', 'm'};
    Parameter_Table{208}={'LAPP', 'Latitude of pressure point', 'deg'};
    Parameter_Table{209}={'LOPP', 'Longitude of pressure point', 'deg'};
    Parameter_Table{210}={'-', '-', '-'};
    Parameter_Table{211}={'REFO', 'Observed radar reflectivity', 'dbZ'};
    Parameter_Table{212}={'REFD', 'Derived radar reflectivity', 'dbZ'};
    Parameter_Table{213}={'REFC', 'Maximum/Composite radar reflectivity', 'dbZ'};
    Parameter_Table{214}={'SBT122', 'Simulated Brightness Temperature for GOES12, Channel 2', 'K'};
    Parameter_Table{215}={'SBT123', 'Simulated Brightness Temperature for GOES12, Channel 3', 'K'};
    Parameter_Table{216}={'SBT124', 'Simulated Brightness Temperature for GOES12, Channel 4', 'K'};
    Parameter_Table{217}={'SBT125', 'Simulated Brightness Temperature for GOES12, Channel 5', 'K'};
    Parameter_Table{218}={'MINRH', 'Minimum Relative Humidity', '%'};
    Parameter_Table{219}={'MAXRH', 'Maximum Relative Humidity', '%'};
  otherwise
end
