function [rmsw,nrms] = rms_jro(obs,model,n1,n2,missing)
%%
%% This program is written for comparing the TIEGCM Wi and JRO VperpN (Viz) data 
%% BA Emery, March 2011
rmsw = 0.;
nrms = 0;
for i=n1:n2
 if (obs(i) > missing) 
  nrms = nrms + 1;
% calculate root mean square
  sqw = (obs(i)-model(i))^2;
  rmsw = rmsw + sqw;
 end
end
% Convert to m/s rms:
if (nrms > 0)
 rmsw = sqrt(rmsw/nrms);
end
