Commit dfb8333c authored by Ian Boyd's avatar Ian Boyd
Browse files

Upload New File

parent 0abec463
;---------------------------------------------------------------------------------------------------
;
; name: cds_LIDAR.pro
; description: Wrapper for AVDC CDS LIDAR tool
;
; 2011-06-01, v1.0 Christian Retscher
; 2011-08-14, v1.1 Ian Boyd - Add special case for 1988 Table Mountain measurements, which should not be processed,
; Returns an error_code of 3
; 2011-08-16, v1.5 Ian Boyd - Change NDACC_Lidar_HDF4.pro call to NDACC_Lidar_HDF.pro
;
;---------------------------------------------------------------------------------------------------
FUNCTION cds_LIDAR, chFileOrig, chFileGEOMSTE, metadir, tav, hdfdir, iDataType
; derive ames dir
amesdir=FILE_DIRNAME(chFileOrig)+'/'
chFileOrigBase=FILE_BASENAME(chFileOrig)
chFileOrigBaseArr= STRSPLIT(chFileOrigBase, '.', ESCAPE='\', /EXTRACT)
; determine pi, date, and filter
site = STRLOWCASE(STRMID(chFileOrigBase, 0, 2))
species = STRLOWCASE(STRMID(chFileOrigBase, 2, 2))
year = STRMID(chFileOrigBase, 4, 2)
month = STRMID(chFileOrigBase, 6, 2)
pi = STRLOWCASE(STRMID(chFileOrigBaseArr(1), 0, 2))
if ( year ge 80 ) then begin
year='19'+string(year)
end else begin
year='20'+string(year)
end
; special case - do not process 1988 measurements from Table Mountain
iDoNotProcess=0
if (year eq '1988') and (site eq 'tm') then iDoNotProcess=1
chFileGEOMSTEBase=FILE_BASENAME(chFileGEOMSTE)
chFileGEOMSTEBaseArr= STRSPLIT(STRUPCASE(chFileGEOMSTEBase), '-.', ESCAPE='\', /EXTRACT)
if iDoNotProcess eq 0 then begin
if ((chFileGEOMSTEBaseArr(2) eq 'LIDAR') and (pi eq 'mg')) then begin
if (chFileGEOMSTEBaseArr(3) eq 'O3') and (species eq 'tg') then chgas='o3' $
else if (chFileGEOMSTEBaseArr(3) eq 'TEMPERATURE') and (species eq 'tg') then chgas='te' $
else if (chFileGEOMSTEBaseArr(3) eq 'TEMPERATURE') and (species eq 't2') then chgas='te' $
else return, 3
print, 'LIDAR: McGee filter '+chgas+': '+species
if ( iDataType eq 'h5' ) then begin
NDACC_Lidar_HDF,site,chgas,year,month,pi,mcgee=species,ames_dir=amesdir,meta_dir=metadir,hdf_dir=hdfdir,tav=tav,h5='h5'
end else if ( iDataType eq 'nc' ) then begin
NDACC_Lidar_HDF,site,chgas,year,month,pi,mcgee=species,ames_dir=amesdir,meta_dir=metadir,hdf_dir=hdfdir,tav=tav,nc='nc'
end else begin
NDACC_Lidar_HDF,site,chgas,year,month,pi,mcgee=species,ames_dir=amesdir,meta_dir=metadir,hdf_dir=hdfdir,tav=tav
end
end else begin
if ( iDataType eq 'h5' ) then begin
NDACC_Lidar_HDF,site,species,year,month,pi,ames_dir=amesdir,meta_dir=metadir,hdf_dir=hdfdir,tav=tav,h5='h5'
end else if ( iDataType eq 'nc' ) then begin
NDACC_Lidar_HDF,site,species,year,month,pi,ames_dir=amesdir,meta_dir=metadir,hdf_dir=hdfdir,tav=tav,nc='nc'
end else begin
NDACC_Lidar_HDF,site,species,year,month,pi,ames_dir=amesdir,meta_dir=metadir,hdf_dir=hdfdir,tav=tav
end
end
return, 0
endif else return, 3
END
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment