function [l, u, ln] = assign_long_info_met(the_fields, nfields)

%%% function to assign long info, units, and long variable names to the variables of cruise data
l = cell(nfields,1);     
u = cell(nfields,1);     
ln = cell(nfields,1);    

%%% save calibration info from data loggers, serial numbers
%%% we can make sure Sergio's aware we need that info
%%% calibrate more consistently, when cals are done and by whom
%%% each cruise, get list of each serial number and cal... used to be in
%%% log book manually. Sergio might keep a separate log of serials. To
%%% submit variations in whatever sensors that we put on. 

%% long info
l(ismember(the_fields,'ID_Ftsg_s'))={'seawater flow rate ID for TSG: 1 = good, 0 = bad (F < 1.75 L/min or F > 3.5) main lab TSG'};
l(ismember(the_fields,'ID_Ftsg1_s'))={'seawater flow rate ID for bow TSG: 1 = good, 0 = bad (F < 1.75 L/min or F > 3.5) main lab TSG'};
l(ismember(the_fields,'ID_Ftsg2_s'))={'seawater flow rate ID for seachest TSG: 1 = good, 0 = bad (F < 1.75 L/min or F > 3.5) main lab TSG'};
l(ismember(the_fields,'ID_tsg_s'))  ={'0 = do not use tsg data during switch over, 1 = before switch, 2 = after switch'};
l(ismember(the_fields,'Ctsg_s'))    ={'ship thermosalinograph SBE 45 conductivity at depth ztsg_ship, S/m'};
l(ismember(the_fields,'Ctsg1_s'))   ={'ship bow thermosalinograph SBE 45 conductivity at depth ztsg1_ship, S/m'};
l(ismember(the_fields,'Ctsg2_s'))   ={'ship seachest thermosalinograph SBE 45 conductivity at depth ztsg2_ship, S/m'};
l(ismember(the_fields,'Ftsg_s'))    ={'ship thermpsalinograph flow rate at depth ztsg_ship, L/min'};
l(ismember(the_fields,'Ftsg1_s'))   ={'ship bow thermpsalinograph flow rate at depth ztsg1_ship, L/min'};
l(ismember(the_fields,'Ftsg2_s'))   ={'ship seachest thermpsalinograph flow rate at depth ztsg2_ship, L/min'};
l(ismember(the_fields,'FLtsg_s'))   ={'ship thermpsalinograph fluorometer dry value at depth ztsg_ship, micrograms/L'};
l(ismember(the_fields,'FLtsg1_s'))  ={'ship bow thermpsalinograph fluorometer dry value at depth ztsg1_ship, micrograms/L'};
l(ismember(the_fields,'FLtsg2_s'))  ={'ship seachest thermpsalinograph fluorometer dry value at depth ztsg2_ship, micrograms/L'};
l(ismember(the_fields,'Stsg_s'))    ={'ship thermosalinograph SBE 45 salinity at depth ztsg_ship, psu'};
l(ismember(the_fields,'Stsg1_s'))   ={'ship bow thermosalinograph SBE 45 salinity at depth ztsg1_ship, psu'};
l(ismember(the_fields,'Stsg2_s'))   ={'ship seachest thermosalinograph SBE 45 salinity at depth ztsg2_ship, psu'};
l(ismember(the_fields,'Ta'))        ={'air T at height zt, C'};
l(ismember(the_fields,'Ta_s'))      ={'ship air T at height zt_ship, C'};
l(ismember(the_fields,'Td_s'))      ={'ship air dewpoint T at height zt_ship, C'};
l(ismember(the_fields,'Tskin'))     ={'skin T of seawater from ROSR infrared radiometer, C (true SST felt by atmosphere)'};
l(ismember(the_fields,'Tsnk'))      ={'sea snake T at depth zsnk, C'};
l(ismember(the_fields,'Tsonic'))    ={'air Tv virtual temp of 3D sonic anemometer at height zu, C'};
l(ismember(the_fields,'Ttsg_int_s'))={'ship thermosalinograph SBE 45 internal T, C (use for instrument calibration only)'};
l(ismember(the_fields,'Ttsg_s'))    ={'ship thermosalinograph SBE 38 T at depth ztsg_ship, C'};
l(ismember(the_fields,'Ttsg1_s'))   ={'ship bow thermosalinograph SBE 38 T at depth ztsg1_ship, C'};
l(ismember(the_fields,'Ttsg2_s'))   ={'ship seachest thermosalinograph SBE 38 T at depth ztsg2_ship, C'};
l(ismember(the_fields,'aspir_TRH'))={'fan speed of aspirator on T/RH Vaisala sensor, rpm'};
l(ismember(the_fields,'cog'))       ={'course over ground, deg'};
l(ismember(the_fields,'cog_s'))     ={'ship course over ground, deg'};
l(ismember(the_fields,'day'))       ={'day'};
l(ismember(the_fields,'heave'))     ={'heave, m'};
l(ismember(the_fields,'heave_s'))   ={'ship heave, m'};
l(ismember(the_fields,'hed'))       ={'heading, deg'};
l(ismember(the_fields,'hed_s'))     ={'ship heading, deg'};
l(ismember(the_fields,'hedE'))      ={'heading eastward, deg'};
l(ismember(the_fields,'hedN'))      ={'heading northward, deg'};
l(ismember(the_fields,'hedE_s'))    ={'ship heading northward, deg'};
l(ismember(the_fields,'hedN_s'))    ={'ship heading northward, deg'};
l(ismember(the_fields,'hour'))      ={'hour'};
l(ismember(the_fields,'jd'))        ={'decimal julian date'};
l(ismember(the_fields,'lat'))       ={'lat, deg'};
l(ismember(the_fields,'lat_s'))     ={'ship lat, deg'};
l(ismember(the_fields,'lon'))       ={'lon, deg'};
l(ismember(the_fields,'lon_s'))     ={'ship lon, deg'};
l(ismember(the_fields,'lw_dn'))     ={'downwelling longwave radiation (best unit), W/m2'};
l(ismember(the_fields,'lw_dn_1'))   ={'downwelling longwave radiation unit #1, W/m2'};
l(ismember(the_fields,'lw_dn_2'))   ={'downwelling longwave radiation unit #2, W/m2'};
l(ismember(the_fields,'lw_dn_clr'))={'calculated clear-sky downwelling longwave radiation, W/m2'};
l(ismember(the_fields,'lw_dn_s'))   ={'ship downwelling longwave radiation, W/m2'};
l(ismember(the_fields,'lw_T_case_1'))={'T of lw unit #1 case, C'};
l(ismember(the_fields,'lw_T_dome_1'))={'T of lw unit #1 dome, C'};
l(ismember(the_fields,'lw_therm_1'))={'thermopile output of lw unit #1, mV'};
l(ismember(the_fields,'lw_T_case_2'))={'T of lw unit #2 case, C'};
l(ismember(the_fields,'lw_T_dome_2'))={'T of lw unit #2 dome, C'};
l(ismember(the_fields,'lw_therm_2'))={'thermopile output of lw unit #2, mV'};
l(ismember(the_fields,'lw_T_case_s'))={'ship T of lw unit case, C'};
l(ismember(the_fields,'lw_T_dome_s'))={'ship T of lw unit dome, C'};
l(ismember(the_fields,'lw_therm_s'))={'ship thermopile output of lw unit, mV'};
l(ismember(the_fields,'minute'))    ={'minute'};
l(ismember(the_fields,'month'))     ={'month'};
l(ismember(the_fields,'pitch'))     ={'pitch, deg'};
l(ismember(the_fields,'pitch_s'))   ={'ship pitch, deg'};
l(ismember(the_fields,'prate'))     ={'10-min avg precipitation rate from optical rain gauge, mm/hour'};
l(ismember(the_fields,'prate_s'))   ={'ship precipitation rate from ?, mm/hour'};
l(ismember(the_fields,'paccum'))    ={'precipitation accumulation from optical rain gauge, mm'};
l(ismember(the_fields,'paccum_s'))  ={'ship precipitation accumulation from ?, mm'};
l(ismember(the_fields,'P'))         ={'barometric pressure at height zp, mb'};
l(ismember(the_fields,'P_s'))       ={'ship barometric pressure at height zp_ship, mb'};
l(ismember(the_fields,'qa'))        ={'air specific humidity at height zt, zq, zp, g/kg'};
l(ismember(the_fields,'qa_s'))      ={'ship air specific humidity at height zt, zq, zp, g/kg'};
l(ismember(the_fields,'qsnk'))      ={'saturation specific humidity calculated with sea snake value Tsnk, g/kg'};
l(ismember(the_fields,'raw_p'))     ={'optical rain gauge raw uncorrected measurement'};
l(ismember(the_fields,'raw_p_despike'))={'optical rain gauge raw uncorrected measurement despiked'};
l(ismember(the_fields,'rdir'))      ={'relative wind direction, deg, 3D sonic anemometer'};
l(ismember(the_fields,'rdir_raw'))  ={'relative wind direction, deg, 3D sonic anemometer'};
l(ismember(the_fields,'rdir_f_s'))  ={'ship relative wind direction, deg, foremast rotating propellor'};
l(ismember(the_fields,'rdir_p_s'))  ={'ship relative wind direction, deg, port 2D sonic anemometer'};
l(ismember(the_fields,'rdir_s_s'))  ={'ship relative wind direction, deg, starboard 2D sonic anemometer'};
l(ismember(the_fields,'rdir_s'))    ={'ship relative wind direction, deg, 2D sonic anemometer'};
l(ismember(the_fields,'rh'))        ={'relative humidity at height zq, %'};
l(ismember(the_fields,'rh_s'))      ={'ship relative humidity at height zq_ship, %'};
l(ismember(the_fields,'roll'))      ={'roll, deg'};
l(ismember(the_fields,'roll_s'))    ={'ship roll, deg'};
l(ismember(the_fields,'rspd'))      ={'relative wind speed, m/s 3D sonic anemometer'};
l(ismember(the_fields,'rspd_raw'))  ={'raw relative wind speed, m/s 3D sonic anemometer'};
l(ismember(the_fields,'rspd_dir'))  ={'relative wind speed, m/s 3D sonic anemometer'};
l(ismember(the_fields,'rspd_f_s'))  ={'ship relative wind speed, m/s, foremast rotating propellor'};
l(ismember(the_fields,'rspd_p_s'))  ={'ship relative wind speed, m/s, port 2D sonic anemometer'};
l(ismember(the_fields,'rspd_s_s'))  ={'ship relative wind speed, m/s, starboard 2D sonic anemometer'};
l(ismember(the_fields,'rspd_s'))    ={'ship relative wind speed, m/s, 2D sonic anemometer'};
l(ismember(the_fields,'slp'))       ={'barometric pressure for sea level altitude, mb'};
l(ismember(the_fields,'slp_reported_s'))={'ship reported barometric pressure for sea level altitude, mb'};
l(ismember(the_fields,'slp_s'))     ={'ship corrected barometric pressure for sea level altitude, mb'};
l(ismember(the_fields,'sog'))       ={'speed over ground, m/s'};
l(ismember(the_fields,'sogE'))      ={'eastward component of speed over ground, m/s'};
l(ismember(the_fields,'sogE_s'))    ={'ship eastward component of speed over ground, m/s'};
l(ismember(the_fields,'sogN'))      ={'northward component of speed over ground, m/s'};
l(ismember(the_fields,'sogN_s'))    ={'ship northward component of speed over ground, m/s'};
l(ismember(the_fields,'sog_s'))     ={'ship speed over ground, m/s'};
l(ismember(the_fields,'spd_log_u_s'))={'ship eastward actual speed log, m/s'};
l(ismember(the_fields,'spd_log_v_s'))={'ship northward actual speed log, m/s'};
l(ismember(the_fields,'spd_log_s'))  ={'ship actual speed log, m/s'};
l(ismember(the_fields,'sw_dn'))     ={'downwelling shortwave radiation best, W/m2'};
l(ismember(the_fields,'sw_dn_2'))   ={'downwelling shortwave radiation from unit #1, W/m2'};
l(ismember(the_fields,'sw_dn_1'))   ={'downwelling shortwave radiation from unit #2, W/m2'};
l(ismember(the_fields,'sw_dn_clr'))={'calculated clear-sky downwelling shortwave radiation, W/m2'};
l(ismember(the_fields,'sw_dn_s'))   ={'ship downwelling shortwave radiation, W/m2'};
l(ismember(the_fields,'t'))         ={'matlab datetime'};
l(ismember(the_fields,'wdir'))      ={'true wind direction, deg, 3D sonic anemometer'};
l(ismember(the_fields,'wdir_raw'))  ={'true wind direction, deg, 3D sonic anemometer'};
l(ismember(the_fields,'wdir_f_s'))  ={'ship true wind direction, deg, foremast rotating propellor'};
l(ismember(the_fields,'wdir_p_s'))  ={'ship true wind direction, deg, port 2D sonic anemometer'};
l(ismember(the_fields,'wdir_s_s'))  ={'ship true wind direction, deg, starboard 2D sonic anemometer'};
l(ismember(the_fields,'wdir_s'))    ={'ship true wind direction, deg, 2D sonic anemometer'};
l(ismember(the_fields,'wspd'))      ={'wind speed, m/s, 3D sonic anemometer'};
l(ismember(the_fields,'wspd_raw'))  ={'wind speed, m/s, 3D sonic anemometer'};
l(ismember(the_fields,'wspd_f_s'))  ={'ship true wind speed, m/s, foremast rotating propellor'};
l(ismember(the_fields,'wspd_p_s'))  ={'ship true wind speed, m/s, port 2D sonic anemometer'};
l(ismember(the_fields,'wspd_s_s'))  ={'ship true wind speed, m/s, starboard 2D sonic anemometer'};
l(ismember(the_fields,'wspd_s'))    ={'ship true wind speed, m/s, 2D sonic anemometer'};
l(ismember(the_fields,'Tsnk_best'))    ={'Tsnk filled with either ROSR (plus cool skin) or TSG, C'};
l(ismember(the_fields,'Ta_best'))      ={'Ta from, with holes filled by ship, C'};
l(ismember(the_fields,'qa_best'))      ={'qa from, with holes filled by ship, g/kg'};
l(ismember(the_fields,'rh_best'))      ={'rh from, with holes filled by ship, %'};
l(ismember(the_fields,'lw_dn_best'))   ={'lw_dn from, W/m2'};
l(ismember(the_fields,'sw_dn_best'))   ={'sw_dn from, with holes filled by ship, C'};
l(ismember(the_fields,'slp_best'))     ={'slp from, with holes filled by ship, mb'};
l(ismember(the_fields,'wspd_best'))    ={'wspd from, with holes filled by ship, m/s'};
l(ismember(the_fields,'rspd_best'))    ={'rspd from, with holes filled by ship, m/s'};
l(ismember(the_fields,'sog_std_s'))    ={'standard deviation of ship SOG, m/s'};
l(ismember(the_fields,'sog_min_s'))    ={'min of ship SOG, m/s'};
l(ismember(the_fields,'sog_max_s'))    ={'max of ship SOG, m/s'};
l(ismember(the_fields,'cog_std_s'))    ={'standard deviation of ship COG, deg'};
l(ismember(the_fields,'cog_min_s'))    ={'min of ship COG, deg'};
l(ismember(the_fields,'cog_max_s'))    ={'max of ship COG, deg'};
l(ismember(the_fields,'hed_std_s'))    ={'standard deviation of ship heading, deg'};
l(ismember(the_fields,'hed_min_s'))    ={'min of ship heading, deg'};
l(ismember(the_fields,'hed_max_s'))    ={'max of ship heading, deg'};
l(ismember(the_fields,'cog_std'))      ={'standard deviation of COG, deg'};
l(ismember(the_fields,'sog_std'))      ={'standard deviation of SOG, m/s'};
l(ismember(the_fields,'hed_std'))      ={'standard deviation of heading, deg'};
l(ismember(the_fields,'hnet'))         ={'net heat flux, positive warming ocean, W/m2'};
l(ismember(the_fields,'lw_net'))       ={'net long wave flux, positive warming ocean, W/m2'};
l(ismember(the_fields,'sw_net'))       ={'net short wave flux, positive warming ocean, W/m2'};
l(ismember(the_fields,'lw_up'))        ={'upwelling long wave flux, W/m2'};
l(ismember(the_fields,'sw_up'))        ={'upwelling short wave flux, W/m2'};
l(ismember(the_fields,'dT'))           ={'SST - T10 = air sea T difference, C'};
l(ismember(the_fields,'dq'))           ={'SSQ - q10 = air sea q difference, g/kg'};
l(ismember(the_fields,'SSQ'))          ={'sea surface specific humidity, g/kg'};
l(ismember(the_fields,'rhoa'))         ={'air density, kg/m3'};
l(ismember(the_fields,'rhoa_s'))       ={'air density ship, kg/m3'};
l(ismember(the_fields,'H2O'))          ={'H2O number concentration Vaisala, mmol/m3'};
l(ismember(the_fields,'H2O_s'))        ={'H2O number concentration ship met, mmol/m3'};
l(ismember(the_fields,'licor_AGC'))    ={'Licor box T, aka AGC value used for quality control. Good data have AGC < 60.'};
l(ismember(the_fields,'licor_rhoa'))   ={'Licor air density, kg/m3'};
l(ismember(the_fields,'licor_rh'))     ={'Licor relative humidity, %'};
l(ismember(the_fields,'licor_qa'))     ={'Licor specific humidity, g/kg'};
l(ismember(the_fields,'licor_H2O'))    ={'Licor H2O number concentration, mmol/m3'};
l(ismember(the_fields,'licor_H2O_MR'))={'Licor H2O mixing ratio, mol/mol'};
l(ismember(the_fields,'licor_Tbox'))   ={'Licor box T, C'};
l(ismember(the_fields,'licor_Pbox'))   ={'Licor box P, kPa'};
l(ismember(the_fields,'licor_H2O_std'))={'Licor H2O standard deviation, mmol/m3'};
l(ismember(the_fields,'licor_Pbox_std'))={'Licor Pbox stanard deviation, kPa'};
l(ismember(the_fields,'wspd_wxt'))     ={'WXT met station true wind speed, m/s'};
l(ismember(the_fields,'wdir_wxt'))     ={'WXT met station true wind direction, deg'};
l(ismember(the_fields,'rspd_wxt'))     ={'WXT met station relatve wind speed, m/s'};
l(ismember(the_fields,'rdir_wxt'))     ={'WXT met station relative wind direction, deg'};
l(ismember(the_fields,'Ta_wxt'))       ={'WXT met station air T, C'};
l(ismember(the_fields,'qa_wxt'))       ={'WXT met station air specific humidity, g/kg'};
l(ismember(the_fields,'rh_wxt'))       ={'WXT met station relative humidity, m/s'};
l(ismember(the_fields,'rhoa_wxt'))     ={'WXT met station air density, m/s'};
l(ismember(the_fields,'H2O_wxt'))      ={'WXT met station H2O concentration, mmol/m3'};
l(ismember(the_fields,'prate_wxt'))    ={'WXT met station precip rate, mm/hr'};
l(ismember(the_fields,'paccum_wxt'))   ={'WXT met station precip accumlulation, mm'};
l(ismember(the_fields,'slp_wxt'))      ={'WXT met station sea level pressure, mb'};
l(ismember(the_fields,'P_wxt'))        ={'WXT met station measured pressure, mb'};
l(ismember(the_fields,'S_0p85'))       ={'salinity measured by OSU Otter at 0.85 m depth, psu'};
l(ismember(the_fields,'ID_wh_otter'))  ={'OSU otter present = 1'};
l(ismember(the_fields,'ID_modflow'))   ={'1 = moderate to poor wind directions: absolute value of rdir > 90 deg'};
l(ismember(the_fields,'ID_badflow'))   ={'1 = bad wind directions: absolute value of rdir > 120 deg'};
l(ismember(the_fields,'Ptsg_s'))       ={'seawater pressure at ship TSG, dbar'};
l(ismember(the_fields,'RHOtsg_s'))     ={'seawater density at ship TSG, kg/m3'};
l(ismember(the_fields,'wspd_min_s'))   ={'min ship true wind speed, m/s'};
l(ismember(the_fields,'wspd_max_s'))   ={'max ship true wind speed, m/s'};
l(ismember(the_fields,'wspd_std_s'))   ={'standard deviation ship true wind speed, m/s'};
l(ismember(the_fields,'wdir_min_s'))   ={'min ship true wind direction, deg'};
l(ismember(the_fields,'wdir_max_s'))   ={'max ship true wind direction, deg'};
l(ismember(the_fields,'wdir_std_s'))   ={'standard deviation ship true wind direction, deg'};
l(ismember(the_fields,'lw_dn_std'))    ={'standard deviation of lw_dn_best, W/m2'};
l(ismember(the_fields,'sw_dn_std'))    ={'standard deviation of lw_dn_best, W/m2'};
l(ismember(the_fields,'usr'))          ={'u_star, m/s'};
l(ismember(the_fields,'usr_s'))        ={'u_star ship, m/s'};
l(ismember(the_fields,'tau'))          ={'bulk wind stress, N/m2'};
l(ismember(the_fields,'tau_s'))        ={'bulk wind stress ship, N/m2'};
l(ismember(the_fields,'tau_cov'))      ={'direct covariance wind stress, N/m2'};
l(ismember(the_fields,'tau_ida'))      ={'inertial dissipation method b wind stress, N/m2'};
l(ismember(the_fields,'tau_idb'))      ={'inertial dissipation method a stress, N/m2'};
l(ismember(the_fields,'hs'))           ={'bulk sensible heat flux, W/m2'};
l(ismember(the_fields,'hs_s'))         ={'bulk sensible heat flux ship, W/m2'};
l(ismember(the_fields,'hl'))           ={'bulk latent heat flux, W/m2'};
l(ismember(the_fields,'hl_s'))         ={'bulk latent heat flux ship, W/m2'};
l(ismember(the_fields,'hlwebb'))       ={'Webb correction W/m2 for latent heat flux'};
l(ismember(the_fields,'hlwebb_s'))     ={'Webb correction ship W/m2 for latent heat flux'};
l(ismember(the_fields,'tsr'))          ={'T_star temperature scaling parameter, K'};
l(ismember(the_fields,'tsr_s'))        ={'T_star temperature scaling parameter ship, K'};
l(ismember(the_fields,'qsr'))          ={'q_star specific humidity scaling parameter, g/kg'};
l(ismember(the_fields,'qsr_s'))        ={'q_star specific humidity scaling parameter ship, g/kg'};
l(ismember(the_fields,'zot'))          ={'z over t roughness length with respect to T, m'};
l(ismember(the_fields,'zot_s'))        ={'z over t roughness length with respect to T ship, m'};
l(ismember(the_fields,'zoq'))          ={'z over t roughness length with respect to q, m'};
l(ismember(the_fields,'zoq_s'))        ={'z over t roughness length with respect to q ship, m'};
l(ismember(the_fields,'Cd'))           ={'drag coefficient, momentum transfer coefficient'};
l(ismember(the_fields,'Cd_s'))         ={'drag coefficient, momentum transfer coefficient ship'};
l(ismember(the_fields,'Ch'))           ={'Stanton number, sensible heat transfer coefficient'};
l(ismember(the_fields,'Ch_s'))         ={'Stanton number, sensible heat transfer coefficient'};
l(ismember(the_fields,'Ce'))           ={'Dalton number, latent heat transfer coefficient'};
l(ismember(the_fields,'Ce_s'))         ={'Dalton number, latent heat transfer coefficient'};
l(ismember(the_fields,'L'))            ={'Monin-Obukhov length scale ship, m'};
l(ismember(the_fields,'L_s'))          ={'Monin-Obukhov length scale ship, m'};
l(ismember(the_fields,'zet'))          ={'Monin-Obukhov stability parameter zu/L, unitless'};
l(ismember(the_fields,'zet_s'))        ={'Monin-Obukhov stability parameter zu/L ship, unitless'};
l(ismember(the_fields,'dT_skin'))      ={'T difference skin and snake, C'};
l(ismember(the_fields,'dT_skin_s'))    ={'T difference skin and ship TSG, C'};
l(ismember(the_fields,'dq_skin'))      ={'q difference skin and snake, g/kg'};
l(ismember(the_fields,'dq_skin_s'))    ={'q difference skin and ship TSG, g/kg'};
l(ismember(the_fields,'dz_skin'))      ={'cool skin thickness to snake, m'};
l(ismember(the_fields,'dz_skin_s'))    ={'cool skin thickness to ship TSG, m'};
l(ismember(the_fields,'hr'))           ={'rain heat flux, W/m2'};
l(ismember(the_fields,'hr_s'))         ={'rain heat flux ship, W/m2'};
l(ismember(the_fields,'Cdn_10'))       ={'drag coefficient neutral stability 10 m height, momentum transfer coefficient'};
l(ismember(the_fields,'Cdn_10_s'))     ={'drag coefficient neutral stability 10 m height, momentum transfer coefficient ship'};
l(ismember(the_fields,'Chn_10'))       ={'Stanton number neutral stability 10 m height, sensible heat transfer coefficient'};
l(ismember(the_fields,'Chn_10_s'))     ={'Stanton number neutral stability 10 m height, sensible heat transfer coefficient'};
l(ismember(the_fields,'Cen_10'))       ={'Dalton number neutral stability 10 m height, latent heat transfer coefficient'};
l(ismember(the_fields,'Cen_10_s'))     ={'Dalton number neutral stability 10 m height, latent heat transfer coefficient'};
l(ismember(the_fields,'U10'))          ={'wind speed adjusted to 10 m, m/s'};
l(ismember(the_fields,'U10_s'))        ={'wind speed adjusted to 10 m ship, m/s'};
l(ismember(the_fields,'erate'))         ={'Evaporation rate 10 min average, mm/hr'};
l(ismember(the_fields,'erate_s'))       ={'Evaporation rate ship mm/hr'};
l(ismember(the_fields,'T10'))          ={'Ta adjusted to 10 m, m/s'};
l(ismember(the_fields,'T10_s'))        ={'Ta adjusted to 10 m ship, m/s'};
l(ismember(the_fields,'q10'))          ={'qa adjusted to 10 m, g/kg'};
l(ismember(the_fields,'q10_s'))        ={'qa adjusted to 10 m ship, g/kg'};
l(ismember(the_fields,'rh10'))         ={'rh adjusted to 10 m, %'};
l(ismember(the_fields,'rh10_s'))       ={'rh adjusted to 10 m ship, %'};
l(ismember(the_fields,'dz_warm'))      ={'warm layer thickness, m'};
l(ismember(the_fields,'dT_warm'))      ={'warming across entire warm layer, C'};
l(ismember(the_fields,'dsea_warm'))    ={'heating due to warm layer at selected depth of TSG, C'};
l(ismember(the_fields,'usid_a'))       ={'ustar from inertial dissipation method a, m/s'};
l(ismember(the_fields,'usid_b'))       ={'ustar from inertial dissipation method a, m/s'};
l(ismember(the_fields,'qsid_a'))       ={'qstar from inertial dissipation method a, g/kg'};
l(ismember(the_fields,'qsid_b'))       ={'qstar from inertial dissipation method a, g/kg'};
l(ismember(the_fields,'tsid_a'))       ={'Tstar from inertial dissipation method a, K'};
l(ismember(the_fields,'tsid_b'))       ={'Tstar from inertial dissipation method a, K'};
l(ismember(the_fields,'Lid_a'))        ={'L output zu over zet inertial dissipation method a, m/s'};
l(ismember(the_fields,'Lid_b'))        ={'L output zu over zet inertial dissipation method a, m/s'};
l(ismember(the_fields,'hs_id'))        ={'inertial dissipation sensible heat flux, W/m2'};
l(ismember(the_fields,'hs_cov'))       ={'direct covariance sensible heat flux, W/m2'};
l(ismember(the_fields,'hs_cov_sds'))   ={'direct covariance sensible heat flux (Simon de Szoeke method), W/m2'};
l(ismember(the_fields,'hl_id'))        ={'inertial dissipation latent heat flux, W/m2'};
l(ismember(the_fields,'hl_cov'))       ={'direct covariance latent heat flux, W/m2'};
l(ismember(the_fields,'hl_covW'))      ={'direct covariance latent heat flux (Webb method), W/m2 '};
l(ismember(the_fields,'hl_cov_sds'))   ={'direct covariance latent heat flux (Simon de Szoeke method), W/m2'};
l(ismember(the_fields,'wu_cov'))       ={'w prime u prime bar covariance, m2/s2'};
l(ismember(the_fields,'wv_cov'))       ={'w prime v prime bar covariance, m2/s2'};
l(ismember(the_fields,'wq_cov'))       ={'w prime q prime bar covariance , m/s'};
l(ismember(the_fields,'wT_cov'))       ={'w prime T prime bar covariance (Simon de Szoeke method), m K/s'};
l(ismember(the_fields,'wq_sds'))       ={'w prime q prime bar covariance (Simon de Szoeke method), m/s'};
l(ismember(the_fields,'wT_sds'))       ={'w prime T prime bar covariance (Simon de Szoeke method), m K/s'};
l(ismember(the_fields,'uplat_std'))     ={'platform velocity std deviations stern-to-bow direction for u, m/s'};
l(ismember(the_fields,'vplat_std'))    ={'platform velocity std deviations port-to-starboard for v, m/s'};
l(ismember(the_fields,'wplat_std'))    ={'platform velocity std deviations z-direction for w, m/s'};
l(ismember(the_fields,'tilt'))         ={'tilt angle from first rotation, radians'};
l(ismember(the_fields,'azm'))          ={'azimuth angle from first rotation, radians'};
l(ismember(the_fields,'missing'))      ={'sonic anemometer missing points'};
l(ismember(the_fields,'badPnts'))      ={'sonic anemometer bad points'};
l(ismember(the_fields,'uvar'))         ={'variance of u (stern to bow) from sonic anemometer, m2/s2'};
l(ismember(the_fields,'vvar'))         ={'variance of v (port to starboard) from sonic anemometer, m2/s2'};
l(ismember(the_fields,'wvar'))         ={'variance of w (stern to bow) from sonic anemometer, m2/s2'};
l(ismember(the_fields,'Tvar'))         ={'variance of Tv from sonic anemometer, C2'};
l(ismember(the_fields,'Ubar'))         ={'streamwise mean flow, rotated into flow so no cross flow, m/s'};
l(ismember(the_fields,'Tson_noise'))   ={'noise of sonic anemometer for Tv, C'};
l(ismember(the_fields,'shed_s_std'))   ={'standard deviation of sine of heading from ship, m/s'};
l(ismember(the_fields,'ched_s_std'))   ={'standard deviation of cosine of heading from ship, m/s'};
l(ismember(the_fields,'Cu2a'))         ={'Cu method a structure function parameter'};
l(ismember(the_fields,'Cu2b'))         ={'Cu method b structure function parameter'};
l(ismember(the_fields,'Cw2a'))         ={'Cw method a structure function parameter'};
l(ismember(the_fields,'Cw2b'))         ={'Cw method b structure function parameter'};
l(ismember(the_fields,'Ct2a'))         ={'Ct method a structure function parameter'};
l(ismember(the_fields,'Ct2b'))         ={'Ct method b structure function parameter'};
l(ismember(the_fields,'Cq2a'))         ={'Cq method a structure function parameter'};
l(ismember(the_fields,'Cq2b'))         ={'Cq method b structure function parameter'};
l(ismember(the_fields,'cspd'))         ={'current speed at near-surface ADCP ship, m/s'};
l(ismember(the_fields,'cdir'))         ={'current direction (direction to) at near-surface ADCP ship, deg'};
l(ismember(the_fields,'wspd_sfc'))     ={'wind speed with respect to moving surface, m/s'};
l(ismember(the_fields,'wdir_sfc'))     ={'wind direction with respect to moving surface, deg'};
l(ismember(the_fields,'SST'))          ={'COARE calculated SST equal to Tsnk-dT_skin, C'};
l(ismember(the_fields,'year'))         ={'year'};
l(ismember(the_fields,'U10_sfc'))      ={'U10 with respect to moving surface, m/s'};
l(ismember(the_fields,'Hsig'))           ={'significant wave height from Reigel 1D radar altimeter, m'};
l(ismember(the_fields,'cspd'))         ={'near surface current speed ADCP ship, m/s'};
l(ismember(the_fields,'cdir'))         ={'near surface current dir ADCP ship, deg'};
l(ismember(the_fields,'cp'))           ={'phase speed dominant waves from Reigel 1D radar altimeter, m/s'};
l(ismember(the_fields,'Ta_flag'))      ={'flag 1 for T air data corrected for bad winds, 1 corrected; 0 not corrected'};
l(ismember(the_fields,'U_flag'))       ={'flag 1 for wind data corrected for bad winds, 1 corrected; 0 not corrected'};
l(ismember(the_fields,'cov_flag'))     ={'flag 1 for bad covariance fluxes, 1 bad; 0 good'};
l(ismember(the_fields,'tau_cov_cross'))={'covariance stress crossstream, N/m2'};

l(ismember(the_fields,'P10'))={'Pair adjusted to 10 m, mb'};
l(ismember(the_fields,'rh2'))={'rh adjusted to 2 m, %'};
l(ismember(the_fields,'q2'))={'q adjusted to 2 m, g/kg'};
l(ismember(the_fields,'T2'))={'Tair adjusted to 2 m, deg C'};
l(ismember(the_fields,'sw_dn_no_atm'))={'downwelling solar radiation calculated if no atmosphere existed, W/m2'};
l(ismember(the_fields,'eaccum'))={'accumulted evaporation, mm'};
l(ismember(the_fields,'sw_dn_diffuse'))={'measured diffuse downwelling shortwave radiation, W/m2'};
l(ismember(the_fields,'zenith'))={'solar zenith angle, deg'};
l(ismember(the_fields,'depth'))={'depths of ocean data 0 to 350 m'};
l(ismember(the_fields,'dTdz'))={'vertical T gradient ocean Chameleon and T-chain near surface, deg C/m'};
l(ismember(the_fields,'dSdz'))={'vertical S gradient ocean Chameleon, psu/m'};
l(ismember(the_fields,'dSIGdz'))={'vertical potential density gradient ocean Chameleon and T-chain near surface, kg/m4'};
l(ismember(the_fields,'S'))={'S ocean Chameleon, psu'};
l(ismember(the_fields,'T'))={'T ocean Chameleon and T-chain near surface, deg C'};
l(ismember(the_fields,'SIG'))={'potential density ocean Chameleon and T-chain near surface, kg/m3'};
l(ismember(the_fields,'N2T'))={'buoyancy freqency due to T ocean, s^-2'};
l(ismember(the_fields,'N2S'))={'buoyancy freqency due to S ocean, s^-2'};
l(ismember(the_fields,'N2'))={'buoyancy freqency due to T and S ocean, s^-2'};
l(ismember(the_fields,'N2T_smooth'))={'buoyancy freqency due to T ocean with 3 m vertical running mean smoothing, s^-2'};
l(ismember(the_fields,'N2S_smooth'))={'buoyancy freqency due to S ocean with 3 m vertical running mean smoothing, s^-2'};
l(ismember(the_fields,'N2_smooth'))={'buoyancy freqency due to T and S ocean with 3 m vertical running mean smoothing, s^-2'};
l(ismember(the_fields,'B'))={'buoyancy flux positive into ocean total, m2/s3'};
l(ismember(the_fields,'B_Salt'))={'buoyancy flux positive into ocean due to P-E (salt), m2/s3'};
l(ismember(the_fields,'B_Heat'))={'buoyancy flux positive into ocean due to heat, m2/s3'};
l(ismember(the_fields,'B_Train'))={'buoyancy flux positive into ocean due to T of rain, m2/s3'};
l(ismember(the_fields,'PR'))={'precipitation mass flux, kg/m2/s'};
l(ismember(the_fields,'EV'))={'evaporation mass flux, kg/m2/s'};
l(ismember(the_fields,'hStable'))={'observed uppermost stable layer top depth, m'};
l(ismember(the_fields,'hStable_hat'))={'estimated uppermost stable layer top depth from Eq 9 Thompson et al. 2019 scaling, m'};
l(ismember(the_fields,'hTC'))={'observed thermocline/pycnocline top depth, m'};
l(ismember(the_fields,'hB'))={'observed barrier layer top depth, m'};
l(ismember(the_fields,'hZ'))={'thickness of uppermost stable layer, m'};
l(ismember(the_fields,'US'))={'U10 wind limit for stable layers above 5 m, i.e. hStable = 5 m, m/s'};
l(ismember(the_fields,'alpha'))={'thermal contraction coefficient, 1/degC'};
l(ismember(the_fields,'beta'))={'haline expansion coefficient, 1/psu'};
l(ismember(the_fields,'Fatm'))={'buoyancy flux positive into atmosphere, W/m2'};
l(ismember(the_fields,'c_sw'))={'specific heat of surface seawater for given water conditions, J/kg/K'};
l(ismember(the_fields,'thetav2'))={'virtual potential temperature adjusted to 2 m height, K'};
l(ismember(the_fields,'SSRHO'))={'sea surface density ocean using SST and Stsg_s, kg/m3'};
l(ismember(the_fields,'Tw'))={'wet bulb temp, approx temp of rain drops degC'};
l(ismember(the_fields,'dT_rain'))={'Tw-SST, approx T difference rain to ocean, deg C'};
l(ismember(the_fields,'rmm1'))={'1st RMM component'};
l(ismember(the_fields,'rmm2'))={'2nd RMM component'};
l(ismember(the_fields,'mjo_phase'))={'MJO phase according to the 2 RMM components of the EOF analysis'};
l(ismember(the_fields,'mjo_amp'))={'amplitude of MJO according to the 2 RMM components of the EOF analysis'};
l(ismember(the_fields,'Pcombo_1min'))={'maximum 1-min rain rate observed by ship guage or within 8 km upstream or 2 km surrounding the ship with radar (see Thompson et al. 2019), mm/hr'};

l(ismember(the_fields,'in_stable'))={'flag = 1 when any stable layer present'};
l(ismember(the_fields,'in_clear'))={'flag = 1 when no stable layers present'};
l(ismember(the_fields,'in_dwl'))={'flag = 1 when warm layer present'};
l(ismember(the_fields,'in_rl'))={'flag = 1 when rain layer present'};
l(ismember(the_fields,'in_both'))={'flag = 1 when both warm and rain layer present'};
l(ismember(the_fields,'in_orl'))={'flag = 1 when only rain layer present'};
l(ismember(the_fields,'in_odwl'))={'flag = 1 when only warm layer present'};
l(ismember(the_fields,'in_supp'))={'flag = 1 when suppressed MJO period'};
l(ismember(the_fields,'in_dist'))={'flag = 1 when disturbed MJO period'};
l(ismember(the_fields,'in_acti'))={'flag = 1 when active MJO (contains WWBs)'};
l(ismember(the_fields,'in_wwb'))={'flag = 1 when WWB westerly wind burst'};
l(ismember(the_fields,'in_mjo'))={'flag = 1 when MJO phase classifiable as either supp dist acti wwb'};
l(ismember(the_fields,'in_supp1'))={'flag = 1 when first suppressed MJO period'};
l(ismember(the_fields,'in_supp2'))={'flag = 1 when second suppressed MJO period'};
l(ismember(the_fields,'in_dist1'))={'flag = 1 when first disturbed MJO period'};
l(ismember(the_fields,'in_dist2'))={'flag = 1 when second disturbed MJO period'};
l(ismember(the_fields,'in_acti1'))={'flag = 1 when first active MJO period'};
l(ismember(the_fields,'in_acti2'))={'flag = 1 when second active MJO period'};
l(ismember(the_fields,'in_wwb1'))={'flag = 1 when first WWB'};
l(ismember(the_fields,'in_wwb2'))={'flag = 1 when second WWB'};
l(ismember(the_fields,'in_wwb3'))={'flag = 1 when third WWB'};
l(ismember(the_fields,'in_octtime'))={'flag = 1 when data analyzed from first cruise in October'};
l(ismember(the_fields,'in_novtime'))={'flag = 1 when data analyzed from second cruise in November'};

l(ismember(the_fields,'dwl_start'))={'time index warm layer starting'};
l(ismember(the_fields,'dwl_end'))={'time index warm layer ending'};
l(ismember(the_fields,'dwl_dur'))={'duration warm layer, hours'};
l(ismember(the_fields,'rl_start'))={'time index rain layer starting'};
l(ismember(the_fields,'rl_end'))={'time index rain layer ending'};
l(ismember(the_fields,'rl_dur'))={'duration rain layer, hours'};
l(ismember(the_fields,'both_start'))={'time index combo warm and rain layer starting'};
l(ismember(the_fields,'both_end'))={'time index combo warm and rain layer ending'};
l(ismember(the_fields,'both_dur'))={'duration combo warm and rain layer, hours'};
l(ismember(the_fields,'stable_start'))={'time index any stable layer starting'};
l(ismember(the_fields,'stable_end'))={'time index any stable layer ending'};
l(ismember(the_fields,'stable_dur'))={'duration all stable layers, hours'};

l(ismember(the_fields,'stable_dwl'))={'ID of stable layers that are warm layers'};
l(ismember(the_fields,'stable_rl'))={'ID of stable layers that are rain layers'};
l(ismember(the_fields,'stable_both'))={'ID of stable layers that are combo warm rain layers'};
l(ismember(the_fields,'dwl_start_supp'))={'ID of warm layers starting in supp period'};
l(ismember(the_fields,'dwl_start_dist'))={'ID of warm layers starting in dist period'};
l(ismember(the_fields,'dwl_start_acti'))={'ID of warm layers starting in active period'};
l(ismember(the_fields,'dwl_start_wwb'))={'ID of warm layers starting in wwb period'};
l(ismember(the_fields,'rl_start_supp'))={'ID of rain layers starting in supp period'};
l(ismember(the_fields,'rl_start_dist'))={'ID of rain layers starting in dist period'};
l(ismember(the_fields,'rl_start_acti'))={'ID of rain layers starting in acti period'};
l(ismember(the_fields,'rl_start_wwb'))={'ID of rain layers starting in wwb period'};
l(ismember(the_fields,'both_start_supp'))={'ID of combo warm rain layers starting in supp period'};
l(ismember(the_fields,'both_start_dist'))={'ID of combo warm rain layers starting in dist period'};
l(ismember(the_fields,'both_start_acti'))={'ID of combo warm rain layers starting in acti period'};
l(ismember(the_fields,'both_start_wwb'))={'ID of combo warm rain layers starting in wwb period'};

%% units
u(ismember(the_fields,'ID_Ftsg_s'))={'flag'};
u(ismember(the_fields,'ID_Ftsg1_s'))={'flag'};
u(ismember(the_fields,'ID_Ftsg2_s'))={'flag'};
u(ismember(the_fields,'ID_tsg_s'))  ={'flag'};
u(ismember(the_fields,'Ctsg_s'))    ={'S/m'};
u(ismember(the_fields,'Ctsg1_s'))   ={'S/m'};
u(ismember(the_fields,'Ctsg2_s'))   ={'S/m'};
u(ismember(the_fields,'Ftsg_s'))    ={'L/min'};
u(ismember(the_fields,'Ftsg1_s'))   ={'L/min'};
u(ismember(the_fields,'Ftsg2_s'))   ={'L/min'};
u(ismember(the_fields,'FLtsg_s'))   ={'micrograms/L'};
u(ismember(the_fields,'FLtsg1_s'))  ={'micrograms/L'};
u(ismember(the_fields,'FLtsg2_s'))  ={'micrograms/L'};
u(ismember(the_fields,'Stsg_s'))    ={'psu'};
u(ismember(the_fields,'Stsg1_s'))   ={'psu'};
u(ismember(the_fields,'Stsg2_s'))   ={'psu'};
u(ismember(the_fields,'Ta'))        ={'deg_C'};
u(ismember(the_fields,'Ta_s'))      ={'deg_C'};
u(ismember(the_fields,'Td'))        ={'deg_C'};
u(ismember(the_fields,'Td_s'))      ={'deg_C'};
u(ismember(the_fields,'Tskin'))     ={'deg_C'};
u(ismember(the_fields,'Tsnk'))      ={'deg_C'};
u(ismember(the_fields,'Tsonic'))    ={'deg_C'};
u(ismember(the_fields,'Ttsg_int_s'))={'deg_C'};
u(ismember(the_fields,'Ttsg_s'))    ={'deg_C'};
u(ismember(the_fields,'Ttsg1_s'))   ={'deg_C'};
u(ismember(the_fields,'Ttsg2_s'))   ={'deg_C'};
u(ismember(the_fields,'aspir_TRH'))={'rpm'};
u(ismember(the_fields,'cog'))       ={'deg_azimuth'};
u(ismember(the_fields,'cog_s'))     ={'deg_azimuth'};
u(ismember(the_fields,'day'))       ={'day'};
u(ismember(the_fields,'heave'))     ={'m'};
u(ismember(the_fields,'heave_s'))   ={'m'};
u(ismember(the_fields,'hed'))       ={'deg_azimuth'};
u(ismember(the_fields,'hed_s'))     ={'deg_azimuth'};
u(ismember(the_fields,'hedE'))      ={'deg_azimuth'};
u(ismember(the_fields,'hedN'))      ={'deg_azimuth'};
u(ismember(the_fields,'hedE_s'))    ={'deg_azimuth'};
u(ismember(the_fields,'hedN_s'))    ={'deg_azimuth'};
u(ismember(the_fields,'hour'))      ={'hour'};
u(ismember(the_fields,'jd'))        ={'decimal_date'};
u(ismember(the_fields,'lat'))       ={'deg_lat'};
u(ismember(the_fields,'lat_s'))     ={'deg_lat'};
u(ismember(the_fields,'lon'))       ={'deg_lon'};
u(ismember(the_fields,'lon_s'))     ={'deg_lon'};
u(ismember(the_fields,'lw_dn'))     ={'W/m2'};
u(ismember(the_fields,'lw_dn_1'))   ={'W/m2'};
u(ismember(the_fields,'lw_dn_2'))   ={'W/m2'};
u(ismember(the_fields,'lw_dn_clr'))={'W/m2'};
u(ismember(the_fields,'lw_dn_s'))   ={' W/m2'};
u(ismember(the_fields,'lw_T_case_1'))={'deg_C'};
u(ismember(the_fields,'lw_T_dome_1'))={'deg_C'};
u(ismember(the_fields,'lw_therm_1'))={'W/m2'};
u(ismember(the_fields,'lw_T_case_2'))={'deg_C'};
u(ismember(the_fields,'lw_T_dome_2'))={'deg_C'};
u(ismember(the_fields,'lw_therm_2'))={'W/m2'};
u(ismember(the_fields,'lw_T_case_s'))={'deg_C'};
u(ismember(the_fields,'lw_T_dome_s'))={'deg_C'};
u(ismember(the_fields,'lw_therm_s'))={'W/m2'};
u(ismember(the_fields,'minute'))    ={'min'};
u(ismember(the_fields,'month'))     ={'month'};
u(ismember(the_fields,'pitch'))     ={'deg_from_level'};
u(ismember(the_fields,'pitch_s'))   ={'deg_from_level'};
u(ismember(the_fields,'prate'))     ={'mm/hour'};
u(ismember(the_fields,'prate_s'))   ={'mm/hour'};
u(ismember(the_fields,'paccum'))    ={'mm'};
u(ismember(the_fields,'paccum_s'))  ={'mm'};
u(ismember(the_fields,'P'))         ={'mb'};
u(ismember(the_fields,'P_s'))       ={'mb'};
u(ismember(the_fields,'qa'))        ={'g/kg'};
u(ismember(the_fields,'qa_s'))      ={'g/kg'};
u(ismember(the_fields,'qsnk'))      ={'g/kg'};
u(ismember(the_fields,'raw_p'))     ={'V'};
u(ismember(the_fields,'raw_p_despike'))={'V'};
u(ismember(the_fields,'rdir'))      ={'deg_azimuth'};
u(ismember(the_fields,'rdir'))      ={'deg_azimuth'};
u(ismember(the_fields,'rdir_f_s'))  ={'deg_azimuth'};
u(ismember(the_fields,'rdir_p_s'))  ={'deg_azimuth'};
u(ismember(the_fields,'rdir_s_s'))  ={'deg_azimuth'};
u(ismember(the_fields,'rdir_s'))    ={'deg_azimuth'};
u(ismember(the_fields,'rh'))        ={'%'};
u(ismember(the_fields,'rh_s'))      ={'%'};
u(ismember(the_fields,'roll'))      ={'deg_from_level'};
u(ismember(the_fields,'roll_s'))    ={'deg_from_level'};
u(ismember(the_fields,'rspd'))      ={'m/s'};
u(ismember(the_fields,'rspd_raw'))  ={'m/s'};
u(ismember(the_fields,'rspd_f_s'))  ={'m/s'};
u(ismember(the_fields,'rspd_p_s'))  ={'m/s'};
u(ismember(the_fields,'rspd_s_s'))  ={'m/s'};
u(ismember(the_fields,'rspd_s'))    ={'m/s'};
u(ismember(the_fields,'slp'))       ={'mb'};
u(ismember(the_fields,'slp_reported_s'))={'mb'};
u(ismember(the_fields,'slp_s'))     ={'mb'};
u(ismember(the_fields,'sog'))       ={'m/s'};
u(ismember(the_fields,'sogE'))      ={'m/s'};
u(ismember(the_fields,'sogE_s'))    ={'m/s'};
u(ismember(the_fields,'sogN'))      ={'m/s'};
u(ismember(the_fields,'sogN_s'))    ={'m/s'};
u(ismember(the_fields,'sog_s'))     ={'m/s'};
u(ismember(the_fields,'spd_log_u_s'))={'m/s'};
u(ismember(the_fields,'spd_log_v_s'))={'m/s'};
u(ismember(the_fields,'spd_log_s'))  ={'m/s'};
u(ismember(the_fields,'sw_dn_2'))   ={'W/m2'};
u(ismember(the_fields,'sw_dn_1'))   ={'W/m2'};
u(ismember(the_fields,'sw_dn'))     ={'W/m2'};
u(ismember(the_fields,'sw_dn_clr'))={'W/m2'};
u(ismember(the_fields,'sw_dn_s'))   ={'W/m2'};
u(ismember(the_fields,'t'))         ={'matlab'};
u(ismember(the_fields,'wdir'))      ={'deg_azimuth'};
u(ismember(the_fields,'wdir_raw'))  ={'deg_azimuth'};
u(ismember(the_fields,'wdir_f_s'))  ={'deg_azimuth'};
u(ismember(the_fields,'wdir_p_s'))  ={'deg_azimuth'};
u(ismember(the_fields,'wdir_s_s'))  ={'deg_azimuth'};
u(ismember(the_fields,'wdir_s'))    ={'deg_azimuth'};
u(ismember(the_fields,'wspd'))      ={'m/s'};
u(ismember(the_fields,'wspd_raw'))  ={'m/s'};
u(ismember(the_fields,'wspd_f_s'))  ={'m/s'};
u(ismember(the_fields,'wspd_p_s'))  ={'m/s'};
u(ismember(the_fields,'wspd_s_s'))  ={'m/s'};
u(ismember(the_fields,'wspd_s'))    ={'m/s'};
u(ismember(the_fields,'year'))      ={'year'};
u(ismember(the_fields,'Tsnk_best'))    ={'deg_C'};
u(ismember(the_fields,'Ta_best'))      ={'deg_C'};
u(ismember(the_fields,'qa_best'))      ={'g/kg'};
u(ismember(the_fields,'rh_best'))      ={'%'};
u(ismember(the_fields,'lw_dn_best'))   ={'W/m2'};
u(ismember(the_fields,'sw_dn_best'))   ={'deg_C'};
u(ismember(the_fields,'slp_best'))     ={'mb'};
u(ismember(the_fields,'wspd_best'))    ={'m/s'};
u(ismember(the_fields,'rspd_best'))    ={'m/s'};
u(ismember(the_fields,'sog_std_s'))    ={'m/s'};
u(ismember(the_fields,'sog_min_s'))    ={'m/s'};
u(ismember(the_fields,'sog_max_s'))    ={'m/s'};
u(ismember(the_fields,'cog_std_s'))    ={'deg_azimuth'};
u(ismember(the_fields,'cog_min_s'))    ={'deg_azimuth'};
u(ismember(the_fields,'cog_max_s'))    ={'deg_azimuth'};
u(ismember(the_fields,'hed_std_s'))    ={'deg_azimuth'};
u(ismember(the_fields,'hed_min_s'))    ={'deg_azimuth'};
u(ismember(the_fields,'hed_max_s'))    ={'deg_azimuth'};
u(ismember(the_fields,'cog_std'))      ={'deg_azimuth'};
u(ismember(the_fields,'sog_std'))      ={'m/s'};
u(ismember(the_fields,'hed_std'))      ={'deg_azimuth'};
u(ismember(the_fields,'hnet'))         ={'W/m2'};
u(ismember(the_fields,'lw_net'))       ={'W/m2'};
u(ismember(the_fields,'sw_net'))       ={'W/m2'};
u(ismember(the_fields,'lw_up'))        ={'W/m2'};
u(ismember(the_fields,'sw_up'))        ={'W/m2'};
u(ismember(the_fields,'dT'))           ={'deg_C'};
u(ismember(the_fields,'dq'))           ={'g/kg'};
u(ismember(the_fields,'SSQ'))          ={'g/kg'};
u(ismember(the_fields,'rhoa'))         ={'kg/m3'};
u(ismember(the_fields,'rhoa_s'))       ={'kg/m3'};
u(ismember(the_fields,'H2O'))          ={'mmol/m3'};
u(ismember(the_fields,'H2O_s'))        ={'mmol/m3'};
u(ismember(the_fields,'licor_AGC'))    ={'deg_C'};
u(ismember(the_fields,'licor_rhoa'))   ={'kg/m3'};
u(ismember(the_fields,'licor_rh'))     ={'%'};
u(ismember(the_fields,'licor_qa'))     ={'g/kg'};
u(ismember(the_fields,'licor_H2O'))    ={'mmol/m3'};
u(ismember(the_fields,'licor_H2O_MR'))={'mol/mol'};
u(ismember(the_fields,'licor_Tbox'))   ={'deg_C'};
u(ismember(the_fields,'licor_Pbox'))   ={'kPa'};
u(ismember(the_fields,'licor_H2O_std'))={'mmol/m3'};
u(ismember(the_fields,'licor_Pbox_std'))={'kPa'};
u(ismember(the_fields,'wspd_wxt'))     ={'m/s'};
u(ismember(the_fields,'wdir_wxt'))     ={'deg_azimuth'};
u(ismember(the_fields,'rspd_wxt'))     ={'m/s'};
u(ismember(the_fields,'rdir_wxt'))     ={'deg_azimuth'};
u(ismember(the_fields,'Ta_wxt'))       ={'deg_C'};
u(ismember(the_fields,'qa_wxt'))       ={'g/kg'};
u(ismember(the_fields,'rh_wxt'))       ={'m/s'};
u(ismember(the_fields,'rhoa_wxt'))     ={'m/s'};
u(ismember(the_fields,'H2O_wxt'))      ={'mmol/m3'};
u(ismember(the_fields,'prate_wxt'))    ={'mm/hr'};
u(ismember(the_fields,'paccum_wxt'))   ={'mm'};
u(ismember(the_fields,'slp_wxt'))      ={'mb'};
u(ismember(the_fields,'P_wxt'))        ={'mb'};
u(ismember(the_fields,'S_0p85'))       ={'psu'};
u(ismember(the_fields,'ID_wh_otter'))  ={'flag'};
u(ismember(the_fields,'ID_modflow'))   ={'flag'};
u(ismember(the_fields,'ID_badflow'))   ={'flag'};
u(ismember(the_fields,'Ptsg_s'))       ={'dbar'};
u(ismember(the_fields,'SIGtsg_s'))     ={'kg/m3'};
u(ismember(the_fields,'wspd_min_s'))   ={'m/s'};
u(ismember(the_fields,'wspd_max_s'))   ={'m/s'};
u(ismember(the_fields,'wspd_std_s'))   ={'m/s'};
u(ismember(the_fields,'wdir_min_s'))   ={'deg_azimuth'};
u(ismember(the_fields,'wdir_max_s'))   ={'deg_azimuth'};
u(ismember(the_fields,'wdir_std_s'))   ={'deg_azimuth'};
u(ismember(the_fields,'lw_dn_std'))    ={'W/m2'};
u(ismember(the_fields,'sw_dn_std'))    ={'W/m2'};
u(ismember(the_fields,'usr'))          ={'m/s'};
u(ismember(the_fields,'usr_s'))        ={'m/s'};
u(ismember(the_fields,'tau'))          ={'N/m2'};
u(ismember(the_fields,'tau_s'))        ={'N/m2'};
u(ismember(the_fields,'tau_cov'))      ={'N/m2'};
u(ismember(the_fields,'tau_ida'))      ={'N/m2'};
u(ismember(the_fields,'tau_idb'))      ={'N/m2'};
u(ismember(the_fields,'hs'))           ={'W/m2'};
u(ismember(the_fields,'hs_s'))         ={'W/m2'};
u(ismember(the_fields,'hl'))           ={'W/m2'};
u(ismember(the_fields,'hl_s'))         ={'W/m2'};
u(ismember(the_fields,'hlwebb'))       ={'W/m2'};
u(ismember(the_fields,'hlwebb_s'))     ={'W/m2'};
u(ismember(the_fields,'tsr'))          ={'K'};
u(ismember(the_fields,'tsr_s'))        ={'K'};
u(ismember(the_fields,'qsr'))          ={'g/kg'};
u(ismember(the_fields,'qsr_s'))        ={'g/kg'};
u(ismember(the_fields,'zot'))          ={'m'};
u(ismember(the_fields,'zot_s'))        ={'m'};
u(ismember(the_fields,'zoq'))          ={'m'};
u(ismember(the_fields,'zoq_s'))        ={'m'};
u(ismember(the_fields,'Cd'))           ={'unitless'};
u(ismember(the_fields,'Cd_s'))         ={'unitless'};
u(ismember(the_fields,'Ch'))           ={'unitless'};
u(ismember(the_fields,'Ch_s'))         ={'unitless'};
u(ismember(the_fields,'Ce'))           ={'unitless'};
u(ismember(the_fields,'Ce_s'))         ={'unitless'};
u(ismember(the_fields,'L'))            ={'m'};
u(ismember(the_fields,'L_s'))          ={'m'};
u(ismember(the_fields,'zet'))          ={'unitless'};
u(ismember(the_fields,'zet_s'))        ={'unitless'};
u(ismember(the_fields,'dT_skin'))      ={'deg_C'};
u(ismember(the_fields,'dT_skin_s'))    ={'deg_C'};
u(ismember(the_fields,'dq_skin'))      ={'g/kg'};
u(ismember(the_fields,'dq_skin_s'))    ={'g/kg'};
u(ismember(the_fields,'dz_skin'))      ={'m'};
u(ismember(the_fields,'dz_skin_s'))    ={'m'};
u(ismember(the_fields,'hr'))           ={'W/m2'};
u(ismember(the_fields,'hr_s'))         ={'W/m2'};
u(ismember(the_fields,'Cdn_10'))       ={'unitless'};
u(ismember(the_fields,'Cdn_10_s'))     ={'unitless'};
u(ismember(the_fields,'Chn_10'))       ={'unitless'};
u(ismember(the_fields,'Chn_10_s'))     ={'unitless'};
u(ismember(the_fields,'Cen_10'))       ={'unitless'};
u(ismember(the_fields,'Cen_10_s'))     ={'unitless'};
u(ismember(the_fields,'U10'))          ={'m/s'};
u(ismember(the_fields,'U10_s'))        ={'m/s'};
u(ismember(the_fields,'erate'))         ={'mm/hr'};
u(ismember(the_fields,'erate_s'))       ={'mm/hr'};
u(ismember(the_fields,'T10'))          ={'m/s'};
u(ismember(the_fields,'T10_s'))        ={'m/s'};
u(ismember(the_fields,'q10'))          ={'g/kg'};
u(ismember(the_fields,'q10_s'))        ={'g/kg'};
u(ismember(the_fields,'rh10'))         ={'%'};
u(ismember(the_fields,'rh10_s'))       ={'%'};
u(ismember(the_fields,'dz_warm'))      ={'m'};
u(ismember(the_fields,'dT_warm'))      ={'deg_C'};
u(ismember(the_fields,'dsea_warm'))    ={'deg_C'};
u(ismember(the_fields,'usid_a'))       ={'m/s'};
u(ismember(the_fields,'usid_b'))       ={'m/s'};
u(ismember(the_fields,'qsid_a'))       ={'g/kg'};
u(ismember(the_fields,'qsid_b'))       ={'g/kg'};
u(ismember(the_fields,'tsid_a'))       ={'K'};
u(ismember(the_fields,'tsid_b'))       ={'K'};
u(ismember(the_fields,'Lid_a'))        ={'m/s'};
u(ismember(the_fields,'Lid_b'))        ={'m/s'};
u(ismember(the_fields,'hs_id'))        ={'W/m2'};
u(ismember(the_fields,'hs_cov'))       ={'W/m2'};
u(ismember(the_fields,'hs_cov_sds'))   ={'W/m2'};
u(ismember(the_fields,'hl_id'))        ={'W/m2'};
u(ismember(the_fields,'hl_cov'))       ={'W/m2'};
u(ismember(the_fields,'hl_covW'))      ={'W/m2 '};
u(ismember(the_fields,'hl_cov_sds'))   ={'W/m2'};
u(ismember(the_fields,'wu_cov'))       ={'m2/s2'};
u(ismember(the_fields,'wv_cov'))       ={'m2/s2'};
u(ismember(the_fields,'wq_cov'))       ={'m/s'};
u(ismember(the_fields,'wT_cov'))       ={'K/s'};
u(ismember(the_fields,'wq_sds'))       ={'m/s'};
u(ismember(the_fields,'wT_sds'))       ={'K/s'};
u(ismember(the_fields,'uplat_std'))    ={'m/s'};
u(ismember(the_fields,'vplat_std'))    ={'m/s'};
u(ismember(the_fields,'wplat_std'))    ={'m/s'};
u(ismember(the_fields,'tilt'))         ={'radians'};
u(ismember(the_fields,'azm'))          ={'radians'};
u(ismember(the_fields,'missing'))      ={'unitless'};
u(ismember(the_fields,'badPnts'))      ={'unitless'};
u(ismember(the_fields,'uvar'))         ={'m2/s2'};
u(ismember(the_fields,'vvar'))         ={'m2/s2'};
u(ismember(the_fields,'wvar'))         ={'m2/s2'};
u(ismember(the_fields,'Tvar'))         ={'C^2'};
u(ismember(the_fields,'Ubar'))         ={'m/s'};
u(ismember(the_fields,'Tson_noise'))   ={'deg_C'};
u(ismember(the_fields,'shed_s_std'))   ={'m/s'};
u(ismember(the_fields,'ched_s_std'))   ={'m/s'};
u(ismember(the_fields,'Cu2a'))         ={'unitless'};
u(ismember(the_fields,'Cu2b'))         ={'unitless'};
u(ismember(the_fields,'Cw2a'))         ={'unitless'};
u(ismember(the_fields,'Cw2b'))         ={'unitless'};
u(ismember(the_fields,'Ct2a'))         ={'unitless'};
u(ismember(the_fields,'Ct2b'))         ={'unitless'};
u(ismember(the_fields,'Cq2a'))         ={'unitless'};
u(ismember(the_fields,'Cq2b'))         ={'unitless'};
u(ismember(the_fields,'cspd'))         ={'m/s'};
u(ismember(the_fields,'cdir'))         ={'deg_azimuth'};
u(ismember(the_fields,'wspd_sfc'))     ={'m/s'};
u(ismember(the_fields,'wdir_sfc'))     ={'deg_azimuth'};
u(ismember(the_fields,'SST'))          ={'deg_C'};
u(ismember(the_fields,'U10_sfc'))      ={'m/s'};
u(ismember(the_fields,'Hsig'))           ={'m'};
u(ismember(the_fields,'cspd'))         ={'m/s'};
u(ismember(the_fields,'cdir'))         ={'deg_azimuth'};
u(ismember(the_fields,'cp'))           ={'m/s'};
u(ismember(the_fields,'Ta_flag'))      ={'flag'};
u(ismember(the_fields,'U_flag'))       ={'flag'};
u(ismember(the_fields,'cov_flag'))     ={'flag'};
u(ismember(the_fields,'tau_cov_cross'))={'N/m2'};


u(ismember(the_fields,'P10'))={'mb'};
u(ismember(the_fields,'rh2'))={'%'};
u(ismember(the_fields,'q2'))={'g/kg'};
u(ismember(the_fields,'T2'))={'deg_C'};
u(ismember(the_fields,'sw_dn_no_atm'))={'W/m2'};
u(ismember(the_fields,'eaccum'))={'accumulted evaporation, mm'};
u(ismember(the_fields,'sw_dn_diffuse'))={'W/m2'};
u(ismember(the_fields,'zenith'))={'deg_from_vertical'};
u(ismember(the_fields,'depth'))={'m'};
u(ismember(the_fields,'dTdz'))={'deg_C/m'};
u(ismember(the_fields,'dSdz'))={'psu/m'};
u(ismember(the_fields,'dSIGdz'))={'kg/m4'};
u(ismember(the_fields,'S'))={'psu'};
u(ismember(the_fields,'T'))={'deg_C'};
u(ismember(the_fields,'SIG'))={'kg/m3'};
u(ismember(the_fields,'N2T'))={'s^-2'};
u(ismember(the_fields,'N2S'))={'s^-2'};
u(ismember(the_fields,'N2'))={'s^-2'};
u(ismember(the_fields,'N2T_smooth'))={'s^-2'};
u(ismember(the_fields,'N2S_smooth'))={'s^-2'};
u(ismember(the_fields,'N2_smooth'))={'s^-2'};
u(ismember(the_fields,'B'))={'m2/s3'};
u(ismember(the_fields,'B_Salt'))={'m2/s3'};
u(ismember(the_fields,'B_Heat'))={'m2/s3'};
u(ismember(the_fields,'B_Train'))={'m2/s3'};
u(ismember(the_fields,'PR'))={'kg/m2/s'};
u(ismember(the_fields,'EV'))={'kg/m2/s'};
u(ismember(the_fields,'hStable'))={'m'};
u(ismember(the_fields,'hStable_hat'))={'m'};
u(ismember(the_fields,'hTC'))={'m'};
u(ismember(the_fields,'hB'))={'m'};
u(ismember(the_fields,'hZ'))={'m'};
u(ismember(the_fields,'US'))={'m/s'};
u(ismember(the_fields,'alpha'))={'degC^-1'};
u(ismember(the_fields,'beta'))={'psu^-1'};
u(ismember(the_fields,'Fatm'))={'W/m2'};
u(ismember(the_fields,'c_sw'))={'J/kg/K'};
u(ismember(the_fields,'thetav2'))={'K'};
u(ismember(the_fields,'SSRHO'))={'kg/m3'};
u(ismember(the_fields,'Tw'))={'deg_C'};
u(ismember(the_fields,'dT_rain'))={'deg_C'};
u(ismember(the_fields,'rmm1'))={'amplitude'};
u(ismember(the_fields,'rmm2'))={'amplitude'};
u(ismember(the_fields,'mjo_phase'))={'phase'};
u(ismember(the_fields,'mjo_amp'))={'amplitude'};
u(ismember(the_fields,'Pcombo_1min'))={'mm/hr'};

u(ismember(the_fields,'in_stable'))={'flag'};
u(ismember(the_fields,'in_clear'))={'flag'};
u(ismember(the_fields,'in_dwl'))={'flag'};
u(ismember(the_fields,'in_rl'))={'flag'};
u(ismember(the_fields,'in_both'))={'flag'};
u(ismember(the_fields,'in_orl'))={'flag'};
u(ismember(the_fields,'in_odwl'))={'flag'};
u(ismember(the_fields,'in_supp'))={'flag'};
u(ismember(the_fields,'in_dist'))={'flag'};
u(ismember(the_fields,'in_acti'))={'flag'};
u(ismember(the_fields,'in_wwb'))={'flag'};
u(ismember(the_fields,'in_mjo'))={'flag'};
u(ismember(the_fields,'in_supp1'))={'flag'};
u(ismember(the_fields,'in_supp2'))={'flag'};
u(ismember(the_fields,'in_dist1'))={'flag'};
u(ismember(the_fields,'in_dist2'))={'flag'};
u(ismember(the_fields,'in_acti1'))={'flag'};
u(ismember(the_fields,'in_acti2'))={'flag'};
u(ismember(the_fields,'in_wwb1'))={'flag'};
u(ismember(the_fields,'in_wwb2'))={'flag'};
u(ismember(the_fields,'in_wwb3'))={'flag'};
u(ismember(the_fields,'in_octtime'))={'flag'};
u(ismember(the_fields,'in_novtime'))={'flag'};

u(ismember(the_fields,'dwl_start'))={'time_ID'};
u(ismember(the_fields,'dwl_end'))={'time_ID'};
u(ismember(the_fields,'dwl_dur'))={'hours'};
u(ismember(the_fields,'rl_start'))={'time_ID'};
u(ismember(the_fields,'rl_end'))={'time_ID'};
u(ismember(the_fields,'rl_dur'))={'hours'};
u(ismember(the_fields,'both_start'))={'time_ID'};
u(ismember(the_fields,'both_end'))={'time_ID'};
u(ismember(the_fields,'both_dur'))={'hours'};
u(ismember(the_fields,'stable_start'))={'time_ID'};
u(ismember(the_fields,'stable_end'))={'time_ID'};
u(ismember(the_fields,'stable_dur'))={'hours'};

u(ismember(the_fields,'stable_dwl'))={'stable_ID'};
u(ismember(the_fields,'stable_rl'))={'stable_ID'};
u(ismember(the_fields,'stable_both'))={'stable_ID'};
u(ismember(the_fields,'dwl_start_supp'))={'dwl_ID'};
u(ismember(the_fields,'dwl_start_dist'))={'dwl_ID'};
u(ismember(the_fields,'dwl_start_acti'))={'dwl_ID'};
u(ismember(the_fields,'dwl_start_wwb'))={'dwl_ID'};
u(ismember(the_fields,'rl_start_supp'))={'rl_ID'};
u(ismember(the_fields,'rl_start_dist'))={'rl_ID'};
u(ismember(the_fields,'rl_start_acti'))={'rl_ID'};
u(ismember(the_fields,'rl_start_wwb'))={'rl_ID'};
u(ismember(the_fields,'both_start_supp'))={'both_ID'};
u(ismember(the_fields,'both_start_dist'))={'both_ID'};
u(ismember(the_fields,'both_start_acti'))={'both_ID'};
u(ismember(the_fields,'both_start_wwb'))={'both_ID'};


%% long_name

ln(ismember(the_fields,'SST'))       ={'SST_equal_to_Tsnk-dT_skin'};
ln(ismember(the_fields,'ID_Ftsg_s'))={'seawater_flow_rate_ID_for_TSG'};
ln(ismember(the_fields,'ID_Ftsg1_s'))={'seawater_flow_rate_ID_for_bow_TSG'};
ln(ismember(the_fields,'ID_Ftsg2_s'))={'seawater_flow_rate_ID_for_seachest_TSG'};
ln(ismember(the_fields,'ID_tsg_s'))  ={'see_info_for_explaination'};
ln(ismember(the_fields,'Ctsg_s'))    ={'ship_thermosalinograph_conductivity'};
ln(ismember(the_fields,'Ctsg1_s'))   ={'ship_bow_thermosalinograph_conductivity'};
ln(ismember(the_fields,'Ctsg2_s'))   ={'ship_seachest_thermosalinograph_conductivity'};
ln(ismember(the_fields,'Ftsg_s'))    ={'ship_thermosalinograph_flow_rate'};
ln(ismember(the_fields,'Ftsg1_s'))   ={'ship_bow_thermosalinograph_flow_rate'};
ln(ismember(the_fields,'Ftsg2_s'))   ={'ship_seachest_thermosalinograph_flow_rate'};
ln(ismember(the_fields,'FLtsg_s'))   ={'ship_thermosalinograph_fluorometer_dry_value'};
ln(ismember(the_fields,'FLtsg1_s'))  ={'ship_bow_thermosalinograph_fluorometer_dry_value'};
ln(ismember(the_fields,'FLtsg2_s'))  ={'ship_seachest_thermosalinograph_fluorometer_dry_value'};
ln(ismember(the_fields,'Stsg_s'))    ={'ship_thermosalinograph_salinity'};
ln(ismember(the_fields,'Stsg1_s'))   ={'ship_bow_thermosalinograph_salinity'};
ln(ismember(the_fields,'Stsg2_s'))   ={'ship_seachest_thermosalinograph_salinity'};
ln(ismember(the_fields,'Ta'))        ={'air_T'};
ln(ismember(the_fields,'Ta_s'))      ={'ship_air_T'};
ln(ismember(the_fields,'Td'))        ={'air_dewpoint_T'};
ln(ismember(the_fields,'Td_s'))      ={'ship_air_dewpoint_T'};
ln(ismember(the_fields,'Tskin'))     ={'skin_T_of_seawater_from_ROSR_infrared_radiometer'};
ln(ismember(the_fields,'Tsnk'))      ={'sea_snake_T'};
ln(ismember(the_fields,'Tsonic'))    ={'air_Tv_virtual_temp_3D_sonic_anemometer'};
ln(ismember(the_fields,'Ttsg_int_s'))={'ship_thermosalinograph_internal_T'};
ln(ismember(the_fields,'Ttsg_s'))    ={'ship_thermosalinograph_T'};
ln(ismember(the_fields,'Ttsg1_s'))   ={'ship_bow_thermosalinograph_T'};
ln(ismember(the_fields,'Ttsg2_s'))   ={'ship_seachest_thermosalinograph_T'};
ln(ismember(the_fields,'aspir_TRH'))={'fan_speed_aspirator_on_T_RH_Vaisala_sensor'};
ln(ismember(the_fields,'cog'))       ={'course_over_ground'};
ln(ismember(the_fields,'cog_s'))     ={'ship_course_over_ground'};
ln(ismember(the_fields,'day'))       ={'day'};
ln(ismember(the_fields,'heave'))     ={'heave'};
ln(ismember(the_fields,'heave_s'))   ={'ship_heave'};
ln(ismember(the_fields,'hed'))       ={'heading'};
ln(ismember(the_fields,'hed_s'))     ={'ship_heading'};
ln(ismember(the_fields,'hedE'))      ={'heading_eastward'};
ln(ismember(the_fields,'hedN'))      ={'heading_northward'};
ln(ismember(the_fields,'hedE_s'))    ={'ship_heading_eastward'};
ln(ismember(the_fields,'hedN_s'))    ={'ship_heading_northward'};
ln(ismember(the_fields,'hour'))      ={'hour'};
ln(ismember(the_fields,'jd'))        ={'decimal_julian_date'};
ln(ismember(the_fields,'lat'))       ={'lat'};
ln(ismember(the_fields,'lat_s'))     ={'ship_lat'};
ln(ismember(the_fields,'lon'))       ={'lon'};
ln(ismember(the_fields,'lon_s'))     ={'ship_lon'};
ln(ismember(the_fields,'lw_dn'))     ={'downwelling_longwave_radiation_best'};
ln(ismember(the_fields,'lw_dn_1'))   ={'downwelling_longwave_radiation_unit_1'};
ln(ismember(the_fields,'lw_dn_2'))   ={'downwelling_longwave_radiation_unit_2'};
ln(ismember(the_fields,'lw_dn_clr'))={'calculated_clear_sky_downwelling_longwave_radiation'};
ln(ismember(the_fields,'lw_dn_s'))   ={'ship_downwelling_longwave_radiation'};
ln(ismember(the_fields,'lw_T_case_1'))={'T_of_lw_unit_1_case'};
ln(ismember(the_fields,'lw_T_dome_1'))={'T_of_lw_unit_1_dome'};
ln(ismember(the_fields,'lw_therm_1'))={'thermopile_of_lw_unit_1'};
ln(ismember(the_fields,'lw_T_case_2'))={'T_of_lw_unit_2_case'};
ln(ismember(the_fields,'lw_T_dome_2'))={'T_of_lw_unit_2_dome'};
ln(ismember(the_fields,'lw_therm_2'))={'thermopile_of_lw_unit_2'};
ln(ismember(the_fields,'lw_T_case_s'))={'ship_T_of_lw_unit_case'};
ln(ismember(the_fields,'lw_T_dome_s'))={'ship_T_of_lw_unit_dome'};
ln(ismember(the_fields,'lw_therm_s'))={'ship_thermopile_of_lw_unit'};
ln(ismember(the_fields,'minute'))    ={'minute'};
ln(ismember(the_fields,'month'))     ={'month'};
ln(ismember(the_fields,'pitch'))     ={'pitch'};
ln(ismember(the_fields,'pitch_s'))   ={'ship_pitch'};
ln(ismember(the_fields,'prate'))     ={'10min_avg_precipitation_rate'};
ln(ismember(the_fields,'prate_s'))   ={'ship_precipitation_rate'};
ln(ismember(the_fields,'paccum'))    ={'precipitation_accumulation'};
ln(ismember(the_fields,'paccum_s'))  ={'ship_precipitation_accumulation'};
ln(ismember(the_fields,'P'))         ={'barometric_pressure'};
ln(ismember(the_fields,'P_s'))       ={'ship_barometric_pressure'};
ln(ismember(the_fields,'qa'))        ={'air_specific_humidity'};
ln(ismember(the_fields,'qa_s'))      ={'ship_air_specific_humidity'};
ln(ismember(the_fields,'qsnk'))      ={'saturation_specific_humidity_calculated_with_sea_snake_value_Tsnk'};
ln(ismember(the_fields,'raw_p'))     ={'optical_rain_gauge_raw_uncorrected_measurement'};
ln(ismember(the_fields,'raw_p_despike'))={'optical_rain_gauge_raw_uncorrected_measurement_despiked'};
ln(ismember(the_fields,'rdir'))      ={'relative_wind_direction_3D_sonic_anemometer'};
ln(ismember(the_fields,'rdir_raw'))  ={'relative_wind_direction_3D_sonic_anemometer'};
ln(ismember(the_fields,'rdir_f_s'))  ={'ship_relative_wind_direction_foremast_rotating_propellor'};
ln(ismember(the_fields,'rdir_p_s'))  ={'ship_relative_wind_direction_port_2D_sonic_anemometer'};
ln(ismember(the_fields,'rdir_s_s'))  ={'ship_relative_wind_direction_starboard_2D_sonic_anemometer'};
ln(ismember(the_fields,'rdir_s'))    ={'ship relative_wind_direction_2D sonic_anemometer'};
ln(ismember(the_fields,'rh'))        ={'relative_humidity'};
ln(ismember(the_fields,'rh_s'))      ={'ship_relative_humidity'};
ln(ismember(the_fields,'roll'))      ={'roll'};
ln(ismember(the_fields,'roll_s'))    ={'ship_roll'};
ln(ismember(the_fields,'rspd'))      ={'relative_wind_speed_3D_sonic_anemometer'};
ln(ismember(the_fields,'rspd_raw'))  ={'raw_relative_wind_speed_3D_sonic_anemometer'};
ln(ismember(the_fields,'rspd_f_s'))  ={'ship_relative_wind_speed_foremast_rotating_propellor'};
ln(ismember(the_fields,'rspd_p_s'))  ={'ship_relative_wind_speed_port_2D_sonic_anemometer'};
ln(ismember(the_fields,'rspd_s_s'))  ={'ship_relative_wind_speed_starboard_2D_sonic_anemometer'};
ln(ismember(the_fields,'rspd_s'))    ={'ship_relative_wind_speed_2D_sonic_anemometer'};
ln(ismember(the_fields,'slp'))       ={'barometric_pressure_for_sea_level_altitude'};
ln(ismember(the_fields,'slp_reported_s'))={'ship_reported_barometric_pressure_for_sea_level_altitude'};
ln(ismember(the_fields,'slp_s'))     ={'ship_corrected_barometric_pressure_for_sea_level_altitude'};
ln(ismember(the_fields,'sog'))       ={'speed_over_ground'};
ln(ismember(the_fields,'sogE'))      ={'eastward_component_of_speed_over_ground'};
ln(ismember(the_fields,'sogE_s'))    ={'ship_eastward_component_of_speed_over_ground'};
ln(ismember(the_fields,'sogN'))      ={'northward_component_of_speed_over_ground'};
ln(ismember(the_fields,'sogN_s'))    ={'ship_northward_component_of_speed_over_ground'};
ln(ismember(the_fields,'sog_s'))     ={'ship_speed_over_ground'};
ln(ismember(the_fields,'spd_log_u_s'))={'ship_eastward_actual_speed_log'};
ln(ismember(the_fields,'spd_log_v_s'))={'ship_northward_actual_speed_log'};
ln(ismember(the_fields,'spd_log_s'))={'ship_actual_speed_log'};
ln(ismember(the_fields,'sw_dn_2'))   ={'downwelling_shortwave_radiation_from_unit_1'};
ln(ismember(the_fields,'sw_dn_1'))   ={'downwelling_shortwave_radiation_from_unit_2'};
ln(ismember(the_fields,'sw_dn'))     ={'downwelling_shortwave_radiation_best'};
ln(ismember(the_fields,'sw_dn_clr'))={'calculated_clear_sky_downwelling_shortwave_radiation'};
ln(ismember(the_fields,'sw_dn_s'))   ={'ship_downwelling_shortwave_radiation'};
ln(ismember(the_fields,'t'))         ={'matlab_datetime'};
ln(ismember(the_fields,'wdir'))      ={'true_wind_direction_3D_sonic_anemometer'};
ln(ismember(the_fields,'wdir_raw'))  ={'true_wind_direction_3D_sonic_anemometer'};
ln(ismember(the_fields,'wdir_f_s'))  ={'ship_true_wind_direction_foremast_rotating_propellor'};
ln(ismember(the_fields,'wdir_p_s'))  ={'ship_true_wind_direction_port_2D_sonic_anemometer'};
ln(ismember(the_fields,'wdir_s_s'))  ={'ship_true_wind_direction_starboard_2D_sonic_anemometer'};
ln(ismember(the_fields,'wdir_s'))    ={'ship_true_wind_direction_2D_sonic_anemometer'};
ln(ismember(the_fields,'wspd'))      ={'wind_speed_3D_sonic_anemometer'};
ln(ismember(the_fields,'wspd_raw'))  ={'wind_speed_3D_sonic_anemometer'};
ln(ismember(the_fields,'wspd_f_s'))  ={'ship_true_wind_speed_foremast_rotating_propellor'};
ln(ismember(the_fields,'wspd_p_s'))  ={'ship_true_wind_speed_port_2D_sonic_anemometer'};
ln(ismember(the_fields,'wspd_s_s'))  ={'ship_true_wind_speed_starboard_2D_sonic_anemometer'};
ln(ismember(the_fields,'wspd_s'))    ={'ship_true_wind_speed_2D_sonic_anemometer'};
ln(ismember(the_fields,'year'))      ={'year'};
ln(ismember(the_fields,'Tsnk_best'))    ={'Tsnk_filled_ROSR_TSG'};
ln(ismember(the_fields,'Ta_best'))      ={'Ta_filled_ship'};
ln(ismember(the_fields,'qa_best'))      ={'qa_filled_ship'};
ln(ismember(the_fields,'rh_best'))      ={'rh_filled_ship'};
ln(ismember(the_fields,'lw_dn_best'))   ={'lw_dn_best'};
ln(ismember(the_fields,'sw_dn_best'))   ={'sw_dn_best'};
ln(ismember(the_fields,'slp_best'))     ={'slp_filled_ship'};
ln(ismember(the_fields,'wspd_best'))    ={'wspd_filled_ship'};
ln(ismember(the_fields,'rspd_best'))    ={'rspd_filled_ship'};
ln(ismember(the_fields,'sog_std_s'))    ={'ship_standard deviation_SOG'};
ln(ismember(the_fields,'sog_min_s'))    ={'ship_min_SOG'};
ln(ismember(the_fields,'sog_max_s'))    ={'ship_max_SOG'};
ln(ismember(the_fields,'cog_std_s'))    ={'ship_standard deviation_COG'};
ln(ismember(the_fields,'cog_min_s'))    ={'ship_min_COG'};
ln(ismember(the_fields,'cog_max_s'))    ={'ship_max_COG'};
ln(ismember(the_fields,'hed_std_s'))    ={'ship_standard_deviation_heading'};
ln(ismember(the_fields,'hed_min_s'))    ={'ship_min_heading'};
ln(ismember(the_fields,'hed_max_s'))    ={'ship_max_heading'};
ln(ismember(the_fields,'cog_std'))      ={'standard_deviation_of_COG'};
ln(ismember(the_fields,'sog_std'))      ={'standard_deviation_of_SOG'};
ln(ismember(the_fields,'hed_std'))      ={'standard_deviation_of_heading'};
ln(ismember(the_fields,'hnet'))         ={'net_heat_flux_positive_warming_ocean'};
ln(ismember(the_fields,'lw_net'))       ={'net_long_wave_flux_positive_warming_ocean'};
ln(ismember(the_fields,'sw_net'))       ={'net_short_wave_flux_positive_warming_ocean'};
ln(ismember(the_fields,'lw_up'))        ={'upwelling_long_wave_flux'};
ln(ismember(the_fields,'sw_up'))        ={'upwelling_short_wave_flux'};
ln(ismember(the_fields,'dT'))           ={'SST-T10_air_sea_T_difference'};
ln(ismember(the_fields,'dq'))           ={'SSQ-q10_air_sea_q_difference'};
ln(ismember(the_fields,'SSQ'))          ={'sea surface specific humidity'};
ln(ismember(the_fields,'rhoa'))         ={'air_density'};
ln(ismember(the_fields,'rhoa_s'))       ={'ship_air_density'};
ln(ismember(the_fields,'H2O'))          ={'H2O_number_concentration_Vaisala'};
ln(ismember(the_fields,'H2O_s'))        ={'ship_H2O_number_concentration_met'};
ln(ismember(the_fields,'licor_AGC'))    ={'Licor_box_T_AGC_value'};
ln(ismember(the_fields,'licor_rhoa'))   ={'Licor_air_density'};
ln(ismember(the_fields,'licor_rh'))     ={'Licor_relative_humidity'};
ln(ismember(the_fields,'licor_qa'))     ={'Licor_specific_humidity'};
ln(ismember(the_fields,'licor_H2O'))    ={'Licor_H2O_number_concentration'};
ln(ismember(the_fields,'licor_H2O_MR'))={'Licor_H2O_mixing_ratio'};
ln(ismember(the_fields,'licor_Tbox'))   ={'Licor_box_T'};
ln(ismember(the_fields,'licor_Pbox'))   ={'Licor_box_P'};
ln(ismember(the_fields,'licor_H2O_std'))={'Licor_H2O_standard_deviation'};
ln(ismember(the_fields,'licor_Pbox_std'))={'Licor_Pbox_stanard_deviation'};
ln(ismember(the_fields,'wspd_wxt'))     ={'WXT_true_wind_speed'};
ln(ismember(the_fields,'wdir_wxt'))     ={'WXT_true_wind_direction'};
ln(ismember(the_fields,'rspd_wxt'))     ={'WXT_relatve_wind_speed'};
ln(ismember(the_fields,'rdir_wxt'))     ={'WXT_relative_wind_direction'};
ln(ismember(the_fields,'Ta_wxt'))       ={'WXT_air_T'};
ln(ismember(the_fields,'qa_wxt'))       ={'WXT_air_specific_humidity'};
ln(ismember(the_fields,'rh_wxt'))       ={'WXT_relative_humidity'};
ln(ismember(the_fields,'rhoa_wxt'))     ={'WXT_air_density'};
ln(ismember(the_fields,'H2O_wxt'))      ={'WXT_H2O_concentration'};
ln(ismember(the_fields,'prate_wxt'))    ={'WXT_precip_rate'};
ln(ismember(the_fields,'paccum_wxt'))   ={'WXT_precip_accumlulation'};
ln(ismember(the_fields,'slp_wxt'))      ={'WXT_sea_level_pressure'};
ln(ismember(the_fields,'P_wxt'))        ={'WXT_measured_pressure'};
ln(ismember(the_fields,'S_0p85'))       ={'salinity_OSU_Otter_0p85_m_depth'};
ln(ismember(the_fields,'ID_wh_otter'))  ={'OSU_otter_present'};
ln(ismember(the_fields,'ID_modflow'))   ={'poor_wind_direction_over_90_deg'};
ln(ismember(the_fields,'ID_badflow'))   ={'bad_wind_directions_over_120_deg'};
ln(ismember(the_fields,'Ptsg_s'))       ={'ship_seawater_pressure_at_TSG'};
ln(ismember(the_fields,'SIGtsg_s'))     ={'ship_seawater_density_at_TSG'};
ln(ismember(the_fields,'wspd_min_s'))   ={'ship_min_true_wind_speed'};
ln(ismember(the_fields,'wspd_max_s'))   ={'ship_max_true_wind_speed'};
ln(ismember(the_fields,'wspd_std_s'))   ={'ship_standard_deviation_true_wind_speed'};
ln(ismember(the_fields,'wdir_min_s'))   ={'ship_min_true_wind_direction'};
ln(ismember(the_fields,'wdir_max_s'))   ={'ship_max_true_wind_direction'};
ln(ismember(the_fields,'wdir_std_s'))   ={'ship_standard_deviation_true_wind_direction'};
ln(ismember(the_fields,'lw_dn_std'))    ={'standard_deviation_of_lw_dn_best'};
ln(ismember(the_fields,'sw_dn_std'))    ={'standard_deviation_of_sw_dn_best'};
ln(ismember(the_fields,'usr'))          ={'u_star'};
ln(ismember(the_fields,'usr_s'))        ={'ship_u_star'};
ln(ismember(the_fields,'tau'))          ={'bulk_wind_stress'};
ln(ismember(the_fields,'tau_s'))        ={'ship_bulk_wind_stress'};
ln(ismember(the_fields,'tau_cov'))      ={'direct_covariance_wind_stress_streamwise'};
ln(ismember(the_fields,'tau_ida'))      ={'inertial_dissipation_a_wind_stress_streamwise'};
ln(ismember(the_fields,'tau_idb'))      ={'inertial_dissipation_b_wind_stress_streamwise'};
ln(ismember(the_fields,'hs'))           ={'bulk_sensible_heat_flux'};
ln(ismember(the_fields,'hs_s'))         ={'ship_bulk_sensible_heat_flux'};
ln(ismember(the_fields,'hl'))           ={'bulk_latent_heat_flux'};
ln(ismember(the_fields,'hl_s'))         ={'ship_bulk_latent_heat_flux'};
ln(ismember(the_fields,'hlwebb'))       ={'Webb_correction_for_latent_heat_flux'};
ln(ismember(the_fields,'hlwebb_s'))     ={'ship_Webb_correction_for_latent_heat_flux'};
ln(ismember(the_fields,'tsr'))          ={'T_star_temperature_scaling_parameter'};
ln(ismember(the_fields,'tsr_s'))        ={'ship_T_star_temperature_scaling_parameter'};
ln(ismember(the_fields,'qsr'))          ={'q_star_specific_humidity_scaling_parameter'};
ln(ismember(the_fields,'qsr_s'))        ={'ship_q_star_specific_humidity_scaling_parameter'};
ln(ismember(the_fields,'zot'))          ={'z_over_T_roughness_length_with_respect_to_T'};
ln(ismember(the_fields,'zot_s'))        ={'ship_z_over_T_roughness_length_with_respect_to_T'};
ln(ismember(the_fields,'zoq'))          ={'z_over_q_roughness_length_with_respect_to_q'};
ln(ismember(the_fields,'zoq_s'))        ={'ship_z_over_q_roughness_length_with_respect_to_q'};
ln(ismember(the_fields,'Cd'))           ={'drag_coefficient_momentum_transfer_coefficient'};
ln(ismember(the_fields,'Cd_s'))         ={'ship_drag_coefficient_momentum_transfer_coefficient'};
ln(ismember(the_fields,'Ch'))           ={'Stanton_number_sensible_heat_transfer_coefficient'};
ln(ismember(the_fields,'Ch_s'))         ={'ship_Stanton_number_sensible_heat_transfer_coefficient'};
ln(ismember(the_fields,'Ce'))           ={'Dalton_number_latent_heat_transfer_coefficient'};
ln(ismember(the_fields,'Ce_s'))         ={'ship_Dalton_number_latent_heat_transfer_coefficient'};
ln(ismember(the_fields,'L'))            ={'Monin-Obukhov_length_scale'};
ln(ismember(the_fields,'L_s'))          ={'ship_Monin-Obukhov_length_scale'};
ln(ismember(the_fields,'zet'))          ={'Monin-Obukhov_stability_parameter_zu_over_L'};
ln(ismember(the_fields,'zet_s'))        ={'ship_Monin-Obukhov_stability_parameter_zu_over_L'};
ln(ismember(the_fields,'dT_skin'))      ={'T_difference_skin_to_snake'};
ln(ismember(the_fields,'dT_skin_s'))    ={'ship_T_difference_skin_to_TSG'};
ln(ismember(the_fields,'dq_skin'))      ={'q_difference_skin_to_snake'};
ln(ismember(the_fields,'dq_skin_s'))    ={'ship_q_difference_skin_to_TSG'};
ln(ismember(the_fields,'dz_skin'))      ={'cool_skin_thickness_to_snake'};
ln(ismember(the_fields,'dz_skin_s'))    ={'ship_cool_skin_thickness_to_TSG'};
ln(ismember(the_fields,'hr'))           ={'rain_heat_flux'};
ln(ismember(the_fields,'hr_s'))         ={'ship_rain_heat_flux'};
ln(ismember(the_fields,'Cdn_10'))       ={'drag_coefficient_neutral_stability_10m_height'};
ln(ismember(the_fields,'Cdn_10_s'))     ={'ship_drag_coefficient_neutral_stability_10m_height'};
ln(ismember(the_fields,'Chn_10'))       ={'Stanton_number_neutral_stability_10m_height'};
ln(ismember(the_fields,'Chn_10_s'))     ={'ship_Stanton_number_neutral_stability_10m_height'};
ln(ismember(the_fields,'Cen_10'))       ={'Dalton_number_neutral_stability_10m_height'};
ln(ismember(the_fields,'Cen_10_s'))     ={'ship_Dalton_number_neutral_stability_10m_height'};
ln(ismember(the_fields,'U10'))          ={'wind_speed_adjusted_10m'};
ln(ismember(the_fields,'U10_s'))        ={'ship_wind_speed_adjusted_10m'};
ln(ismember(the_fields,'erate'))         ={'10min_avg_evaporation_rate'};
ln(ismember(the_fields,'erate_s'))       ={'ship_evaporation_rate'};
ln(ismember(the_fields,'T10'))          ={'Ta_adjusted_10m'};
ln(ismember(the_fields,'T10_s'))        ={'ship_Ta_adjusted_10m'};
ln(ismember(the_fields,'q10'))          ={'qa_adjusted_10m'};
ln(ismember(the_fields,'q10_s'))        ={'ship_qa_adjusted_10m'};
ln(ismember(the_fields,'rh10'))         ={'rh_adjusted_10m'};
ln(ismember(the_fields,'rh10_s'))       ={'ship_rh_adjusted_10m'};
ln(ismember(the_fields,'dz_warm'))      ={'warm_layer_thickness'};
ln(ismember(the_fields,'dT_warm'))      ={'warming_across_entire_warm_layer'};
ln(ismember(the_fields,'dsea_warm'))    ={'heating_due_to_warm_layer_at_selected_depth_of_TSG'};
ln(ismember(the_fields,'usid_a'))       ={'ustar_inertial_dissipation_method_a'};
ln(ismember(the_fields,'usid_b'))       ={'ustar_inertial_dissipation_method_b'};
ln(ismember(the_fields,'qsid_a'))       ={'qstar_inertial_dissipation_method_a'};
ln(ismember(the_fields,'qsid_b'))       ={'qstar_inertial_dissipation_method_b'};
ln(ismember(the_fields,'tsid_a'))       ={'Tstar_inertial_dissipation_method_a'};
ln(ismember(the_fields,'tsid_b'))       ={'Tstar_inertial_dissipation_method_b'};
ln(ismember(the_fields,'Lid_a'))        ={'L_output_inertial_dissipation_method_a'};
ln(ismember(the_fields,'Lid_b'))        ={'L_output_inertial_dissipation_method_b'};
ln(ismember(the_fields,'hs_id'))        ={'inertial_dissipation_sensible_heat flux'};
ln(ismember(the_fields,'hs_cov'))       ={'direct_covariance_sensible_heat_flux'};
ln(ismember(the_fields,'hs_cov_sds'))   ={'direct_covariance sensible_heat_flux_SimondeSzoeke_method'};
ln(ismember(the_fields,'hl_id'))        ={'inertial_dissipation_latent_heat flux'};
ln(ismember(the_fields,'hl_cov'))       ={'direct_covariance_latent_heat flux'};
ln(ismember(the_fields,'hl_covW'))      ={'direct_covariance_latent_heat_flux_Webb_method'};
ln(ismember(the_fields,'hl_cov_sds'))   ={'direct_covariance_latent_heat_flux_SimondeSzoeke_method'};
ln(ismember(the_fields,'wu_cov'))       ={'wu_covariance'};
ln(ismember(the_fields,'wv_cov'))       ={'wv_ovariance'};
ln(ismember(the_fields,'wq_cov'))       ={'wq_covariance'};
ln(ismember(the_fields,'wT_cov'))       ={'wT_covariance_SimondeSzoeke_method'};
ln(ismember(the_fields,'wq_sds'))       ={'wq_covariance_SimondeSzoeke_method'};
ln(ismember(the_fields,'wT_sds'))       ={'wT_covariance_SimondeSzoeke_method'};
ln(ismember(the_fields,'uplat_std'))    ={'platform_velocity_std_deviations_stern_to_bow_direction_u'};
ln(ismember(the_fields,'vplat_std'))    ={'platform_velocity_std_deviations_port_to_starboard_direction_v'};
ln(ismember(the_fields,'wplat_std'))    ={'platform_velocity_std_deviations_vertical_direction_w'};
ln(ismember(the_fields,'tilt'))         ={'tilt_angle_from_first_rotation'};
ln(ismember(the_fields,'azm'))          ={'azimuth_angle_from_first_rotation'};
ln(ismember(the_fields,'missing'))      ={'sonic_anemometer_missing points'};
ln(ismember(the_fields,'badPnts'))      ={'sonic_anemometer_bad_points'};
ln(ismember(the_fields,'uvar'))         ={'variance_stern_to_bow_from_sonic_anemometer_u'};
ln(ismember(the_fields,'vvar'))         ={'variance_port_to_starboard_from_sonic anemometer_v'};
ln(ismember(the_fields,'wvar'))         ={'variance_vertical_from_sonic_anemometer_w'};
ln(ismember(the_fields,'Tvar'))         ={'variance_Tv_from_sonic_anemometer'};
ln(ismember(the_fields,'Ubar'))         ={'streamwise_mean_flow'};
ln(ismember(the_fields,'Tson_noise'))   ={'noise_sonic_anemometer_Tv'};
ln(ismember(the_fields,'shed_s_std'))   ={'ship_standard_deviation_sine_heading'};
ln(ismember(the_fields,'ched_s_std'))   ={'ship_standard_deviation_cosine_heading'};
ln(ismember(the_fields,'Cu2a'))         ={'Cu_method a_structure_function_parameter'};
ln(ismember(the_fields,'Cu2b'))         ={'Cu_method_b_structure_function_parameter'};
ln(ismember(the_fields,'Cw2a'))         ={'Cw_method a_structure_function_parameter'};
ln(ismember(the_fields,'Cw2b'))         ={'Cw_method_b_structure_function_parameter'};
ln(ismember(the_fields,'Ct2a'))         ={'Ct_method a_structure_function_parameter'};
ln(ismember(the_fields,'Ct2b'))         ={'Ct_method_b_structure_function_parameter'};
ln(ismember(the_fields,'Cq2a'))         ={'Cq_method a_structure_function_parameter'};
ln(ismember(the_fields,'Cq2b'))         ={'Cq_method_b_structure_function_parameter'};
ln(ismember(the_fields,'cspd'))         ={'current_speed_ADCP'};
ln(ismember(the_fields,'cdir'))         ={'current_direction_ADCP'};
ln(ismember(the_fields,'wspd_sfc'))     ={'wind_speed_with_respect_to_moving_surface'};
ln(ismember(the_fields,'wdir_sfc'))     ={'wind_direction_with_respect_to_moving_surface'};
ln(ismember(the_fields,'U10_sfc'))      ={'U10_with_respect_to_moving_surface'};
ln(ismember(the_fields,'Hsig'))           ={'significant_wave_height_Reigel_1D_altimeter'};
ln(ismember(the_fields,'cspd'))         ={'near_surface_current_speed_ADCP_ship'};
ln(ismember(the_fields,'cdir'))         ={'near_surface_current_dir_ADCP_ship'};
ln(ismember(the_fields,'cp'))           ={'phase_speed_dominant_waves_Reigel_1D_altimeter'};
ln(ismember(the_fields,'Ta_flag'))      ={'flag_1_for_T_air_data_corrected_for_bad_winds'};
ln(ismember(the_fields,'U_flag'))       ={'flag_1_for_wind_data_corrected_for_bad_winds'};
ln(ismember(the_fields,'cov_flag'))     ={'flag_1_for_bad_covariance_fluxes'};
ln(ismember(the_fields,'tau_cov_cross'))={'covariance_stress_crossstream'};

ln(ismember(the_fields,'P10'))={'Pair_adjusted_to 10_m'};
ln(ismember(the_fields,'rh2'))={'rh_adjusted_to_2_m'};
ln(ismember(the_fields,'q2'))={'q_adjusted_to_2_m'};
ln(ismember(the_fields,'T2'))={'Tair_adjusted_to_2_m'};
ln(ismember(the_fields,'sw_dn_no_atm'))={'downwelling_solar_radiation_calculated_if_no_atmosphere_existed'};
ln(ismember(the_fields,'eaccum'))={'accumulted_evaporation'};
ln(ismember(the_fields,'sw_dn_diffuse'))={'measured_diffuse_downwelling_shortwave_radiation'};
ln(ismember(the_fields,'zenith'))={'solar_zenith_angle'};
ln(ismember(the_fields,'depth'))={'depths_of_ocean_data'};
ln(ismember(the_fields,'dTdz'))={'vertical_T_gradient_ocean_Chameleon_and_Tchain_near_surface'};
ln(ismember(the_fields,'dSdz'))={'vertical_S_gradient_ocean_Chameleon'};
ln(ismember(the_fields,'dSIGdz'))={'vertical_potential_density_gradient_ocean_Chameleon_and_Tchain_near_surface'};
ln(ismember(the_fields,'S'))={'S_ocean_Chameleon'};
ln(ismember(the_fields,'T'))={'T_ocean_Chameleon_and_Tchain_near_surface'};
ln(ismember(the_fields,'SIG'))={'potential_density_ocean_Chameleon_and_Tchain_near_surface'};
ln(ismember(the_fields,'N2T'))={'buoyancy_freqency_due_to_T_ocean'};
ln(ismember(the_fields,'N2S'))={'buoyancy_freqency_due_to_S_ocean'};
ln(ismember(the_fields,'N2'))={'buoyancy_freqency_due_to_T_and_S_ocean'};
ln(ismember(the_fields,'N2T_smooth'))={'buoyancy_freqency_due_to_T_ocean_smoothed'};
ln(ismember(the_fields,'N2S_smooth'))={'buoyancy_freqency_due_to_S_ocean_smoothed'};
ln(ismember(the_fields,'N2_smooth'))={'buoyancy_freqency_due_to_T_and_S_ocean_smoothed'};
ln(ismember(the_fields,'B'))={'buoyancy_flux_positive_into_ocean_total'};
ln(ismember(the_fields,'B_Salt'))={'buoyancy_flux_positive_into_ocean_due_to_P_E_salt'};
ln(ismember(the_fields,'B_Heat'))={'buoyancy_flux_positive_into_ocean_due_to_heat'};
ln(ismember(the_fields,'B_Train'))={'buoyancy_flux_positive_into_ocean_due_to_T_of_rain'};
ln(ismember(the_fields,'PR'))={'precipitation_mass_flux'};
ln(ismember(the_fields,'EV'))={'evaporation_mass_flux'};
ln(ismember(the_fields,'hStable'))={'observed_uppermost_stable_layer_top_depth'};
ln(ismember(the_fields,'hStable_hat'))={'estimated_uppermost_stable_layer_top_depth'};
ln(ismember(the_fields,'hTC'))={'observed_thermocline_pycnocline_top_depth'};
ln(ismember(the_fields,'hB'))={'observed_barrier_layer_top_depth'};
ln(ismember(the_fields,'hZ'))={'thickness_of_uppermost_stable_layer'};
ln(ismember(the_fields,'US'))={'U10_wind_limit_for_stable_layers_above_5_m'};
ln(ismember(the_fields,'alpha'))={'thermal_contraction_coefficient'};
ln(ismember(the_fields,'beta'))={'haline_expansion_coefficient'};
ln(ismember(the_fields,'Fatm'))={'buoyancy_flux_positive_into_atmosphere'};
ln(ismember(the_fields,'c_sw'))={'specific_heat_of_surface_seawater'};
ln(ismember(the_fields,'thetav2'))={'virtual_potential_temperature_adjusted_to_2_m'};
ln(ismember(the_fields,'SSRHO'))={'sea_surface_density_ocean_using_SST_and_Stsg_s'};
ln(ismember(the_fields,'Tw'))={'wet_bulb_T_approx_rain_drop_T'};
ln(ismember(the_fields,'dT_rain'))={'T_difference_rain_Tw_minus_ocean_SST'};
ln(ismember(the_fields,'rmm1'))={'RMM_component_1_amplitude'};
ln(ismember(the_fields,'rmm2'))={'RMM_component_2_amplitude'};
ln(ismember(the_fields,'mjo_phase'))={'MJO_phase'};
ln(ismember(the_fields,'mjo_amp'))={'MJO_amplitude'};
ln(ismember(the_fields,'Pcombo_1min'))={'maximum_1min_rain_rate_upstream_radar_and_gauge'};

ln(ismember(the_fields,'in_stable'))={'flag_1_when_any_stable_layer_present'};
ln(ismember(the_fields,'in_clear'))={'flag_1_when_no_stable_layers_present'};
ln(ismember(the_fields,'in_dwl'))={'flag_1_when_warm_layer_present'};
ln(ismember(the_fields,'in_rl'))={'flag_1_when_rain_layer_present'};
ln(ismember(the_fields,'in_both'))={'flag_1_when_both_warm_and_rain_layer_present'};
ln(ismember(the_fields,'in_orl'))={'flag_1_when_only_rain_layer_present'};
ln(ismember(the_fields,'in_odwl'))={'flag_1_when_only_warm_layer_present'};
ln(ismember(the_fields,'in_supp'))={'flag_1_when_suppressed_MJO_period'};
ln(ismember(the_fields,'in_dist'))={'flag_1_when_disturbed_MJO_period'};
ln(ismember(the_fields,'in_acti'))={'flag_1_when_active_MJO_including_WWBs'};
ln(ismember(the_fields,'in_wwb'))={'flag_1_when_WWB_westerly_wind_burst'};
ln(ismember(the_fields,'in_mjo'))={'flag_1_when_MJO_phase_classifiable_as_either_supp_dist_acti_wwb'};
ln(ismember(the_fields,'in_supp1'))={'flag_1_when_first_suppressed_MJO_period'};
ln(ismember(the_fields,'in_supp2'))={'flag_1_when_second_suppressed_MJO_period'};
ln(ismember(the_fields,'in_dist1'))={'flag_1_when_first_disturbed_MJO_period'};
ln(ismember(the_fields,'in_dist2'))={'flag_1_when_second_disturbed_MJO_period'};
ln(ismember(the_fields,'in_acti1'))={'flag_1_when_first_active_MJO_period'};
ln(ismember(the_fields,'in_acti2'))={'flag_1_when_second_active_MJO_period'};
ln(ismember(the_fields,'in_wwb1'))={'flag_1_when_first_WWB'};
ln(ismember(the_fields,'in_wwb2'))={'flag_1_when_second_WWB'};
ln(ismember(the_fields,'in_wwb3'))={'flag_1_when_third_WWB'};
ln(ismember(the_fields,'in_octtime'))={'flag_1_when_data_analyzed_from_first_cruise_in_October'};
ln(ismember(the_fields,'in_novtime'))={'flag_1_when_data_analyzed_from_second_cruise_in_November'};

ln(ismember(the_fields,'dwl_start'))={'time_index_warm_layer_starting'};
ln(ismember(the_fields,'dwl_end'))={'time_index_warm_layer_ending'};
ln(ismember(the_fields,'dwl_dur'))={'duration_warm_layer'};
ln(ismember(the_fields,'rl_start'))={'time_index_rain_layer_starting'};
ln(ismember(the_fields,'rl_end'))={'time_index_rain_layer_ending'};
ln(ismember(the_fields,'rl_dur'))={'duration_rain_layer'};
ln(ismember(the_fields,'both_start'))={'time_index_combo_warm_and_rain_layer_starting'};
ln(ismember(the_fields,'both_end'))={'time_index_combo_warm_and_rain_layer_ending'};
ln(ismember(the_fields,'both_dur'))={'duration_combo_warm_and_rain_layer'};
ln(ismember(the_fields,'stable_start'))={'time_index_any_stable_layer_starting'};
ln(ismember(the_fields,'stable_end'))={'time_index_any_stable_layer_ending'};
ln(ismember(the_fields,'stable_dur'))={'duration_all_stable_layers'};

ln(ismember(the_fields,'stable_dwl'))={'ID_of_stable_layers_that_are_warm_layers'};
ln(ismember(the_fields,'stable_rl'))={'ID_of_stable_layers_that_are_rain_layers'};
ln(ismember(the_fields,'stable_both'))={'ID_of_stable_layers_that_are_combo_warm_rain_layers'};

ln(ismember(the_fields,'dwl_start_supp'))={'ID_of_warm_layers_starting_in_supp_period'};
ln(ismember(the_fields,'dwl_start_dist'))={'ID_of_warm_layers_starting_in_dist_period'};
ln(ismember(the_fields,'dwl_start_acti'))={'ID_of_warm_layers_starting_in_active_period'};
ln(ismember(the_fields,'dwl_start_wwb'))={'ID_of_warm_layers_starting_in_wwb_period'};
ln(ismember(the_fields,'rl_start_supp'))={'ID_of_rain_layers_starting_in_supp_period'};
ln(ismember(the_fields,'rl_start_dist'))={'ID_of_rain_layers_starting_in_dist_period'};
ln(ismember(the_fields,'rl_start_acti'))={'ID_of_rain_layers_starting_in_acti_period'};
ln(ismember(the_fields,'rl_start_wwb'))={'ID_of_rain_layers_starting_in_wwb_period'};
ln(ismember(the_fields,'both_start_supp'))={'ID_of_combo_warm_rain_layers_starting_in_supp_period'};
ln(ismember(the_fields,'both_start_dist'))={'ID_of_combo_warm_rain_layers_starting_in_dist_period'};
ln(ismember(the_fields,'both_start_acti'))={'ID_of_combo_warm_rain_layers_starting_in_acti_period'};
ln(ismember(the_fields,'both_start_wwb'))={'ID_of_combo_warm_rain_layers_starting_in_wwb_period'};
