Commit 4871ae5d authored by PStar User Account's avatar PStar User Account
Browse files

moved mdatapuptechsas from scripts to here

 Committer: PStar User Account <pstar@192.168.122.1>

 On branch dy113

	modified:   source/mextras/mcoxyhyst.m
        modified:   source/mextras/mcoxyhyst_reverse.m
	new file:   source/mtechsas/mdatapuptechsas.m
	modified:   source/mtechsas/mtnames.m
	modified:   source/unfinished/mplxyed.m
parent 3e4bf1b3
......@@ -20,16 +20,12 @@ function [oxygen_out C D]=mcoxyhyst(oxygen_sbe,time,press,H1in,H2in,H3in,sensor)
% H1 H2 H3 are now arrays. Default is single, passed-in
% value, uniform with pressure. Option is now to vary with depth. Should be
% fully backwards compatible.
% sensor is not used but kept to be backwards compatible
m_common % on and after dy040, identify cruise from m_setup
scriptname = 'mcoxyhyst';
mcruise = MEXEC_G.MSCRIPT_CRUISE_STRING;
if nargin == 6
% sensor not defined in call, assume sensor = 1, which is backwards compatible
sensor = 1;
end
oxygen_out=oxygen_sbe;
D = nan(size(oxygen_sbe));
......@@ -67,7 +63,7 @@ for k=kfirst+1:length(time)
D(k)=1+H1(k)*(exp(press(k)/H2(k))-1);
C(k)=exp(-1*(time(k)-time(klastgood))/H3(k));
oxygen_out(k)=((oxygen_sbe(k)+(oxygen_out(klastgood)*C(k)*D(k)))-(oxygen_sbe(klastgood)*C(k)))/D(k);
oxygen_out(k)=(oxygen_sbe(k)+oxygen_out(klastgood)*C(k)*D(k)-oxygen_sbe(klastgood)*C(k))/D(k);
klastgood = k;
end
......
......@@ -16,6 +16,6 @@ for k=2:length(time)
D=1+H1*(exp(press(k)/H2)-1);
C=exp(-1*(time(k)-time(k-1))/H3);
oxygen_rev(k)=D*(oxygen_sbe(k)-C*oxygen_sbe(k-1))+C*oxygen_rev(k-1);
oxygen_rev(k) = D*(oxygen_sbe(k)-C*oxygen_sbe(k-1)) + C*oxygen_rev(k-1);
end;
\ No newline at end of file
function mdatapup(startyy,startddd,starttime,endyy,endddd,endtime,flags,instream,otfile,varlist)
% function mdatapup(startyy,startddd,starttime,endyy,endddd,endtime,flags,instream,otfile,varlist)
%
% the components of start and end time are numeric
% the time argument must be hhmmss
% all other arguments are strings to be offered directly to datapup
% eg mdatapup(09,020,000000,09,020,235959,' ','gps_nmea','./gpstmp','-')
% eg mdatapup('jruj','/users/pstar/b_king_test','/users/pstar/b_king_test',09,020,000000,09,020,235959,'-k GOOD -i 60','gps_nmea','./gpstmp','-')
% 'remote_machine' is target machine for rsh command
% 'directory_r' is directory for output file on the remote machine, and must be found in remote
% shell when using cd command. It is safest to construct this
% as an absolute path name in the calling program.
% 'directory_l' is the name of directory_r on the local machine. It may be
% different frm directory_r, depending on the details of cross-mounting
m_common
% build start string
strstart = ['-s' sprintf('%02d%03d%06d',startyy,startddd,starttime)];
strend = ['-e' sprintf('%02d%03d%06d',endyy,endddd,endtime)];
strall = ['datapup ' strstart ' ' strend ' ' flags ' ' instream ' ' otfile ' ' varlist];
starthh = floor(starttime/10000);
startmm = floor((starttime-10000*starthh)/100);
startss = starttime-10000*starthh - 100*startmm;
dn1 = datenum([2000+startyy 1 1 0 0 0]) + (startddd-1) + starthh/24 + startmm/1440 + startss/86400;
dv1 = datevec(dn1);
dvstring1 = sprintf('[%4d %02d %02d %02d %02d %4.1f]',dv1)
% datestr(dn1)
endhh = floor(endtime/10000);
endmm = floor((endtime-10000*endhh)/100);
endss = endtime-10000*endhh - 100*endmm;
dn2 = datenum([2000+endyy 1 1 0 0 0]) + (endddd-1) + endhh/24 + endmm/1440 + endss/86400;
dv2 = datevec(dn2);
dvstring2 = sprintf('[%4d %02d %02d %02d %02d %4.1f]',dv2)
% datestr(dn2)
tstream = mtresolve_stream(instream);
dataname = 'null_from_techsas';
%--------------------------------
% 2009-04-08 15:19:16
% techsas_to_mstar2
% input files
% Filename Data Name : <version> <site>
% output files
% Filename wk.nc Data Name : wk <version> 25 <site> jc032
MEXEC_A.MARGS_IN = {
tstream
dvstring1
dvstring2
varlist
otfile
dataname
};
techsas_to_mstar2
%--------------------------------
return
\ No newline at end of file
......@@ -117,11 +117,11 @@ switch MEXEC_G.Mship
% 'gpsfugro' ' ' 's9200G2s-FUGRO.GPS'
'gpsfugro' 'cnav' 'cnav-FUGRO.GPS'
'posmvpos' 'posmvpos' 'position-Applanix_GPS_DY1.gps'
'seapath' 'seapath' 'position-Seapath330_DY1.gps'
'seapos' 'seapos' 'position-Seapath330_DY1.gps'
'satinfoposmv' ' ' 'satelliteinfo-Applanix_GPS_DY1.gps'
'satinfocnav' ' ' 'satelliteinfo-CNAV.GPS'
'satinfofugro' ' ' 'satelliteinfo-FUGRO.GPS'
'satinfoseapath' ' ' 'satelliteinfo-Seapath330_DY1.gps'
'satinfosea' ' ' 'satelliteinfo-Seapath330_DY1.gps'
'attposmv' 'attposmv' 'shipattitude-Applanix_TSS_DY1.att'
'attposmvaux' 'attposmv' 'shipattitude_aux-Applanix_TSS_DY1.att'
'attphins' ' ' 'shipattitude-Phins_TSS_DY1.att'
......
......@@ -70,7 +70,7 @@ MEXEC_A.Mhistory_in{1} = hist;
m = 'Type the number of the variable you wish to edit from the list below ';
fprintf(MEXEC_A.Mfidterm,'%s\n',m)
h = m_read_header(pdfot.ncfile.name);
ynumlist = m_getvlist(pdfot.ylist,h);
for k = 1:length(hplot)
......@@ -79,6 +79,7 @@ for k = 1:length(hplot)
end
m = sprintf('%s',': ');
varedstr = m_getinput(m,'s');
if length(str2num(varedstr))==0; varedstr = m_getinput('try again (number): ', 's'); end
eval(['vared = ' varedstr ';']);
% yname = h.fldnam{ynumlist(vared)};
yname = pdfot.ylist;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment