;
; Constants used by the Safire system
;
CONST:  nl     =    9000;
CONST:  mir    =      20;
CONST:  ml     =      20;
CONST:  mr     =      60;
CONST:  mrd1   =  262144;
CONST:  mrd2   =  131072;
CONST:  mgg    =      20;
CONST:  mgs    =      10;
CONST:  mpts   =  200000;
CONST:  msiz   =20308180;
CONST:  mqmix  =  ml * mgs;
CONST:  mpmass =  (ml * ml * mgs * 2);
CONST:  mtbs   =  (ml * ml * 2);
CONST:  mpout  =  (26*ml + 11*ml*ml + 2*mgs*ml*ml);
CONST:  mcntrl =  (4 + 2*mgs + 3*ml + 15*mgs*ml);
CONST:  mafgl  =  (1 + 12*mgs + 10*nl);
CONST:  mbnd   =   13000;
CONST:  mhvy   =  (2 + 2*mgs*(11 + 3*mbnd));
CONST:  natmos =       8;
CONST:  nnk    =  30000;
CONST:  ns     =      30;
CONST:  nc     =      10;
CONST:  ch1a   =       0;
CONST:  ch2a   =       1;
CONST:  ch1b   =       2;
CONST:  ch2b   =       3;
INT:  channel  = {ch1a};
;
; Definition of the datasets used by the Safire system
;
;
; Datasets of type STRING
;
;STRING: control  = "mls.con";
STRING: control,infile,outfile,afname,outbug,apdfile,ntrpfile,ifgfile : 64;
STRING: simulate :64 = "simulation";
STRING: atmos    : natmos;
STRING: nam      : 8,mgg;
STRING: name     : 8,mgs;
STRING: filen    : 32,ml;

STRING: sfile    : ns                      ; CHARACTER*ns  sfile
STRING: rfile    : ns                      ; CHARACTER*ns  rfile
STRING: ray      : ns                      ; CHARACTER*ns  ray
STRING: cname    : 10,nc                   ; CHARACTER     cname(nc)*10

;
; Datasets of type DOUBLE (DREAL)
;
DREAL:  vs1,vs2  ;
DREAL:  snr      ={230.0};
DREAL:  snr0,mean,stdev ={0.0};
DREAL:  resmin,bpwn,epwn,bpwnl,epwnl  ;
DREAL:  res      ={0.01}                  ; REAL*8        res
DREAL:  alpha    :={-0.5};
DREAL:  r0                                 ; REAL*8        r0
DREAL:  bwn                                ; REAL*8        bwn
DREAL:  a,b      : 10000                    ; REAL*8        a(2000)
DREAL:  radfull,even,odd  : mrd1;
DREAL:  r        : nnk                     ; REAL*8        r(nnk)
DREAL:  flaser   := {6.33e-05}             ; DATA          flaser /6.33d-5/
DREAL:  ssp      := {20.0}                 ; DATA          ssp /20./
DREAL:  hires    : mpts;
;
; Datasets of type REAL
;
REAL:   dvel     := {0.0};
REAL:   temp     := {0.0};
REAL:   tempbb   := {300.0};
REAL:   za,zt,pt,tt : ml ;
REAL:   re       ;
REAL:   xlat     ;
REAL:   qg       : 2,mqmix;
REAL:   qmix,qmix2,gasb: mqmix;
REAL:   wnmax    := {20.0};
REAL:   zr,pr,tr : mr;
REAL:   tgr,gr   : 2,mr;
REAL:   q        : mr,mgg;
REAL:   qgr      : 2,mr,mgg;
REAL:   odmin    := {0.1E-09};
REAL:   resmax   := {0.0};
REAL:   resfc    := {0.3};
REAL:   pmw,tmw,pb : ml;
REAL:   tbs      : mtbs;
REAL:   pmass,pmasd    : mpmass;
REAL:   fact     :mgs;
REAL:   afgl     : mafgl;
REAL:   cntrl    : mcntrl;
REAL:   crss     : msiz;
REAL:   pout     : mpout;
REAL:   hvy      : mhvy;
;
; Datasets of type INTEGER
;
INT:    debug,k3,npsf,j1,j2,np,iblk,iwrt,ifrst,istatus,iri,ioftr,ncel,ngas,nr,nptspsm,nrun,ngg,iseed    ;
INT:    iwk      : 20;
INT:    lm       := {130};
INT:    il       := {1};
INT:    isi      := {1};
INT:    isign    := {1};
INT:    ietl     :={1};
INT:    iblko    :={0};
INT:    igchng   :={0};
INT:    icnt     :={1};
INT:    icwrt    :={0};
INT:    iunit,iopto : ml;
INT:    idg,igas,igs,igm : mgs;
INT:    isc      := {1};
INT:    isco     := {0};
INT:    iopt     := {1};
INT:    icalc    := {2};
INT:    ioptb    := {1};
INT:    ioptt    := {2};
INT:    ir       : mir ;
INT:    irf      := {1};
INT:    imr      := {2};
INT:    iflag    := {2};
INT:    jtype    := {1};
INT:    lcon     := {5};
INT:    lpr      := {19};
INT:    lout     := {20};
INT:    lafg     := {21};
INT:    lhvy     := {22};
INT:    lbug     := {23};
INT:    lapd     := {10};
INT:    lntrp    := {11};
INT:    lifg     := {12};
INT:    nir      := mir;
INT:    npts     :={mpts};
INT:    nrd1     :={mrd1};
INT:    nrd2     :={mrd2};
INT:    nsr      :={1};
INT:    nmr      :={60};
INT:    itc      :ml,mgs ={mqmix*1};
;

STATIC: afgl,cntrl,crss,pout;
;STATIC: radfull;
