%  mmp_inp.m
%
%  RUN THIS FIRST IN SEQUENCE inside of MMP_pgrid_script.sh
%  EDIT ALL OF THE FOLLOWING TO REPRESENT YOUR DATA!!!
%
%  Serial # ID's of Instruments
%
      MMP_id='9999';
      CTD_id='9999';
      ACM_id='9999';
%
%  Cruise info
%
      experiment_name='JAMSTEC';
      mooring_position='[33 5.64, 146 27.62 ]';
      mag_dev=4.8167;
%
%  Stations to process
%
%      stas_text='[0:10]';
%      stas_text='[11:1007]';
%      (really [11:764])

       stas_text='[0:19]';

%  input/output directories
%  (make sure they already exist)
%
      directory='/j2/data/mvp/test_shell_process/matfmt';
      outdir='/j2/data/mvp/test_shell_process/grdfmt';
%
%  grid min/max/step
%
      gmin=1;
      gmax=1500;
      gstep=2;
%
% minimum number of scans needed to process file
%
      nscans_test=5000;
%
% Cal file names   (these cal files made with 
% create_ctd_calfile.m and create_acm_calfile.m)
%
ctd_cal_filename='/j2/data/mvp/jamstec_mmp1_1/prgs/jamstec_ctd_calfile.mat';
acm_cal_filename='/j2/data/mvp/jamstec_mmp1_1/prgs/jamstec_acm_calfile.mat';
%
% min/max bounds for processing
%
      p_bounds=[0 1500];
      t_bounds=[0 35];
      c_bounds=[20 60];
      vel_bounds=[-100 100];
%    
%
%  !!!  YOU ARE ALL DONE WITH CRUISE SPECIFIC EDITTING   !!!
%  !!!  THE FOLLOWING OUTPUT to SCREEN for VERIFICATION  !!!
%
disp(['RUNNING SHELL SCRIPT :  MMP_pgrid_script.sh']);
disp([sprintf('\n'),'MMP_id =   ',MMP_id]);
disp(['CTD_id =   ',CTD_id]);
disp(['ACM_id =   ',ACM_id]);
disp([sprintf('\n'),'Experiment: ',experiment_name]);
disp([sprintf('\n'),'Position:            ',mooring_position]);
disp(['Magnetic Deviation : ',num2str(mag_dev)]);
disp([sprintf('\n'),'Processing stations: ',stas_text]);
disp([sprintf('\n'),'Input directory:  ',directory]);
disp(['Output directory:  ',outdir]);
disp([sprintf('\n'),'grid min/max/step :  [',num2str(gmin),':',num2str(gmax),':',num2str(gstep),']']);
disp([sprintf('\n'),'pres bounds : ',num2str(p_bounds)]);
disp(['temp bounds : ',num2str(t_bounds)]);
disp(['cond bounds : ',num2str(c_bounds)]);
disp(['vel bounds : ',num2str(vel_bounds),sprintf('\n'),sprintf('\n')]);

disp([sprintf('\n'),sprintf('\n'),'ctd cal file  :  ',ctd_cal_filename]);
eval(['load ',ctd_cal_filename]);
disp(['     p_coefs  :  ',num2str(p_coefs)]);
disp(['     c_coefs  :  ',num2str(c_coefs)]);
disp(['     t_coefs  :  ',num2str(t_coefs)]);
disp(['     tlag     :  ',num2str(tlag)]);

disp([sprintf('\n'),sprintf('\n'),'acm cal file  :  ',acm_cal_filename]);
eval(['load ',acm_cal_filename]);
disp(['     Hx_bias  :  ',num2str(Hx_bias)]);
disp(['     Hx_range :  ',num2str(Hx_range)]);
disp(['     Hy_bias  :  ',num2str(Hy_bias)]);
disp(['     Hy_range :  ',num2str(Hy_range)]);
disp(['     Vab_bias :  ',num2str(Vab_bias)]);
disp(['     Vcd_bias :  ',num2str(Vcd_bias)]);
disp(['     Vef_bias :  ',num2str(Vef_bias)]);
disp(['     Vgh_bias :  ',num2str(Vgh_bias)]);
disp([' Compass bias :  ',num2str(compass_bias)]);
disp(['     Dir_sign :  ',num2str(dir_sign)]);
disp(['Velocity_scale:  ',num2str(velocity_scale),sprintf('\n'),sprintf('\n')]);



