function findvarname,ddtype,spnum,spec ;+ ; Function findvarname is called by read_combo.pro. It uses the file datatype (e.g. ; 'idaily' or 'amonthly' or 'overpass2') and the species number to figure out ; what variable this species is called by in the netcdf file. For example, daily ; O3 is stored in the variable 'const_freq1'. Temperature in the overpass files ; is stored in 'kel_overpass'. Variable name is returned. ; ; Modified 4/21/08 by SES ; ;- ; 'ddtype' has 8 possibililties. For each one (a data type), there are several ; possible variable names. Use 'spec' to figure this out. fdtype=['amonthly','idaily','overpass1','overpass2','overpass3','overpass4','hourlyoz','column','rst'] ; Monthly Average if ddtype eq fdtype(0) or ddtype eq fdtype(8) then begin if spnum gt 0 and spnum lt 125 then varname='const' if spnum eq 126 then varname='kel' if spnum eq 125 then print, 'No monthly potential vorticity available.' endif ; Daily instantaneous if ddtype eq fdtype(1) then begin ; if spnum ge 1 and spnum le 13 then varname='const_freq1' ; if spnum eq 14 then varname='potentialVorticity_freq1' ; if spnum eq 15 then varname='kel_freq1' varname='const_freq1' if spec eq 'TEMP' then varname='kel_freq1' if spec eq 'PV' then varname='potentialVorticity_freq1' endif ; Overpass1 if ddtype eq fdtype(2) or ddtype eq fdtype(3) or ddtype eq fdtype(4) or ddtype eq fdtype(5) then begin if spnum ge 1 and spnum le 6 then varname='const_overpass' if spnum eq 7 then varname='kel_overpass' endif if ddtype eq fdtype(6) then print, 'Hourly Ozone is not readable at this time.' if ddtype eq fdtype(7) and spnum le 3 then varname='constColTrop_freq3' if ddtype eq fdtype(7) and spnum gt 3 then begin varname='constColCombo_freq3' spnum=spnum-3 endif return,varname end