function [giproff,gii]=find_profile_fromstat(giprofi,gistat)
%selects profiles for stations listed in gistat
%assuming this convention: giprof=100*stat+cast;
giproff=[];
gii=[];
for ii=1:length(gistat)
    gii=[gii;find(floor(giprofi/100)==gistat(ii))];
    giproff=[giproff;giprofi(find(floor(giprofi/100)==gistat(ii)))];
end