function [ship_id,cr_num,cast_id,st_num]=GM_f_read_ID_sample(ID);

 % Read Sample ID components.
 % Sample ID=@&&&*###, where:
 % @ is R/V ID (1-Oceanus, 2-Tioga);
 % &&& is cruise number;
 % * is CTD cast type (0-regular, 1-high resolution);
 % ### is CTD cast number;
 % E.g.:
 % ID=14251216,
 % then [ship_id,cr_num,cast_id,st_num]=GM_read_ID_sample(ID)
 % returns:
 % ship_id=1 (R/V Oceanus); cr_num=425; cast_id=1 (high resolution); st_num=216
 
st_num=ID-floor(ID/1e+3)*1e+3;
cast_id=floor(ID/1e+3)-floor(ID/1e+4)*10;
cr_num=floor(ID/1e+4)-floor(ID/1e+7)*1e+3;
ship_id=floor(ID/1e+7);
