%% plasimod.m can be used to either run several new GPID simulations, or to 
%% continue an existing one. The main code is in plasimod1.m

clear all
close all

disp(' ')
disp('The following will run the GPID model to produce the daily data arrays')
disp('that are stored on the computer hard drive')
disp(' ')

nos=input('Number of simulations to be conducted? ');

dnom=zeros(1,nos);
yearm=dnom;
daytm=dnom;
iricfm=dnom;
gmsm=dnom;
ctrm=dnom;
hesm=dnom;

for i=1:nos
 disp(' ')  
 disp(['Data for run ',int2str(i),' of ',int2str(nos)])   
 dnom(i)=input('Starting day number of run (if continuation run then last day previously calculated)? ');
 yearm(i)=input('Starting year of run (if continuation run then year of last day previously calculated)? ');
 daytm(i)=input('Number of days to run? ');
 iricf=menu('IRI coefficents to use','CCIR','URSI');
 iricfm(i)=iricf-1;
 gmsm(i)=menu('Include IRI2001 geomagnetic storm model?','no','yes');
 gmsm(i)=gmsm(i)-1;
 hesm(i)=menu('Include He+?','no','yes');
 hesm(i)=hesm(i)-1;
 hesm(i)=menu('Use which version of MSIS','MSIS-90','NRLMSIS2000');
 hesm(i)=hesm(i)-1;
 ctr=menu('Is this run a continuation of a previous run (file name must end with x)?','no','yes');
 ctrm(i)=ctr-1;
end

for i=1:nos
 plasimod1(dnom(i),yearm(i),daytm(i),iricfm(i),gmsm(i),hesm(i),ctrm(i))
end   
