pro read_velocities @common_blocks.inc old_var_index = var_index if vel.read eq 1 then return cons_vel = fltarr(2) ; find velocity fields sds_in = var_index found_at = 0 FOR i=0,N_ELEMENTS(list_str)-1 DO BEGIN ; magnetic field or velocities? if (vector_field_b GT 0) then check = STRPOS(list_str(i),'Bx') else $ check = STRPOS(list_str(i),'elocity') pcheck = STRPOS(list_str(i),'articl') if ((check ge 0) and (pcheck eq -1) and (found_at eq 0)) THEN found_at = i ENDFOR ; assume it is 3D and the following are y and z os = where(slice_ori lt 1.e-15) IF (N_ELEMENTS(os) eq 2) THEN BEGIN sds_num = found_at + os(0) + 1 var_index = sds_num - 1 vel_one = construct_interpolated_slice_data() sds_num = found_at + os(1) + 1 var_index = sds_num - 1 vel_two = construct_interpolated_slice_data() END sds_num = sds_in var_index = sds_num - 1 vel.read = 1 var_index = old_var_index RETURN END ;.compile read_velocities.pro