rdgen  27 September 2004

If the program compiles OK but fails instantly at run time, e.g. with a segementation fault, then one possibility is that the preset array sizes are too big for your system. The way around this is to edit the file 'vp_sizes.f' so that the array sizes are smaller.  Most quantities can be ignored, but the following parts of the file can be changed to suit your application:


.....
* MAXimum Wavelength Coefficient Order (and resolution polynomial!)
* This is also the array size for wavelength tables.
      integer maxwco
      parameter ( maxwco = 208000)
Change to whatever is maximum array length
* MAXimum Orders in Spectrum File
* NB  this is used in wavelength coefficient readin only.
* If single spectrum per file then maxosf=1 is fine.

      integer maxosf
      parameter ( maxosf = 1)
* MAXimum Number FIles (old value: 60)
      integer maxnfi
      parameter ( maxnfi = 60 )
For rdgen this quantity can be 1, so change to  parameter ( maxnfi = 1 )
* MAXimum Number CHunks
* NB this should be the same as maxnfi for now
      integer maxnch
      parameter ( maxnch = 60 )
For rdgen this quantity can be 1, so change to  parameter ( maxnch = 1 )
* MAXimum FIle Size (default: 20800)
      integer maxfis
      parameter ( maxfis = 208000 )
Change to whatever is maximum array length
* MAXimum CHunk Size
      integer maxchs
      parameter ( maxchs = 15000 )
* MAXimum Wavelength Coefficents per Chunk
* Set as maxwco pending full separation in program
      integer maxwcc
      parameter ( maxwcc = 208000 )
Change to whatever is maximum array length
.....

The main gain is in not having to use two-dimensional arrays in RDGEN  - maxnfi and maxnch need be two-dimensional arrays only for VPFIT.