; ; Gets the sounding data ; pro get_sonde,filename,base_time,time_offset,$ pres,tdry,dp,wspd,deg,rh,u_wind,v_wind,alt,$ lat,lon ; ; Open the netcdf file ; cdfid=ncdf_open(filename) ; ; Get the dimension id's ; time_did=ncdf_dimid(cdfid,'time') ; ; Get the dimension sizes ; if time_did ne -1 then ncdf_diminq,cdfid,time_did,char_strng,num_times ; ; Get the variable id's ; base_time_id=ncdf_varid(cdfid,'base_time') time_offset_id=ncdf_varid(cdfid,'time_offset') pres_id=ncdf_varid(cdfid,'pres') tdry_id=ncdf_varid(cdfid,'tdry') dp_id=ncdf_varid(cdfid,'dp') wspd_id=ncdf_varid(cdfid,'wspd') deg_id=ncdf_varid(cdfid,'deg') rh_id=ncdf_varid(cdfid,'rh') u_wind_id=ncdf_varid(cdfid,'u_wind') v_wind_id=ncdf_varid(cdfid,'v_wind') alt_id=ncdf_varid(cdfid,'alt') lat_id=ncdf_varid(cdfid,'lat') lon_id=ncdf_varid(cdfid,'lon') ; ; Get the variables ; if base_time_id ne -1 then ncdf_varget,cdfid,base_time_id,base_time if time_offset_id ne -1 then ncdf_varget,cdfid,time_offset_id,time_offset if pres_id ne -1 then ncdf_varget,cdfid,pres_id,pres if tdry_id ne -1 then ncdf_varget,cdfid,tdry_id,tdry if dp_id ne -1 then ncdf_varget,cdfid,dp_id,dp if wspd_id ne -1 then ncdf_varget,cdfid,wspd_id,wspd if deg_id ne -1 then ncdf_varget,cdfid,deg_id,deg if rh_id ne -1 then ncdf_varget,cdfid,rh_id,rh if u_wind_id ne -1 then ncdf_varget,cdfid,u_wind_id,u_wind if v_wind_id ne -1 then ncdf_varget,cdfid,v_wind_id,v_wind if alt_id ne -1 then ncdf_varget,cdfid,alt_id,alt if lat_id ne -1 then ncdf_varget,cdfid,lat_id,lat if lon_id ne -1 then ncdf_varget,cdfid,lon_id,lon ; ; Zip up the data files ; ;unix_command='gzip -fq '+armfile ;zip the data files ;spawn,unix_command ;unix_command='gunzip -fq *gif.gz' ;unzip any gif files unintentionally zipped ;spawn,unix_command ;unix_command='chmod 664 '+armfile ;change permissions ;spawn,unix_command ;unix_command='chgrp met-mace '+armfile ;change group ;spawn,unix_command return end