ADAS Subroutine metrd
SUBROUTINE METRD(NUTMAX , NUDMAX , NUZMAX , NUMMAX , & MAXT , MAXD , DSNIN , & IZL , IZH , IZ0 , & TEK , DENSA , & METFRC , & NGRD , & IST2 , IST5 ) C C---------------------------------------------------------------------- C C ************ FORTRAN 77 SUBROUTINE METRD ***************************** C C VERSION 1.0 C C PURPOSE: C TO FETCH DATA FROM ADF10 'MET' FILES AND SPLINE ONTO C THE REQUESTED TEMPERATURE/DENSITY GRID. C C CALLING PROGRAM LH404RU C C SUBROUTINE: C C INPUT : (I*4) NUTMAX - OUTPUT ELEMENT MASTER FILE C MAXIMUM NUMBER OF TEMPERATURES C INPUT : (I*4) NUDMAX - OUTPUT ELEMENT MASTER FILE C MAXIMUM NUMBER OF DENSITIES C INPUT : (I*4) NUZMAX - OUTPUT ELEMENT MASTER FILE C MAXIMUM NUMBER OF CHARGE STATES C INPUT : (I*4) NUMMAX - OUTPUT ELEMENT MASTER FILE C MAXIMUM NUMBER OF METASTABLES C INPUT : (I*4) MAXT - OUTPUT ELEMENT MASTER FILE C ACTUAL NUMBER OF TEMPERATURES C INPUT : (I*4) MAXD - OUTPUT ELEMENT MASTER FILE C ACTUAL NUMBER OF DENSITIES C INPUT : (C*80) DSNIN(,) - NAMES OF MASTER CONDENSED FILES C TO BE OPENED C INPUT : (I*4) IZL - LOWEST ION CHARGE TO READ C INPUT : (I*4) IZH - HIGHEST ION CHARGE TO READ C ACTUALLY READ ONE MORE IF IZH<IZ0 C INPUT : (I*4) IZ0 - NUCLEAR CHARGE TO READ C INPUT : (R*8) DENSA()- OUTPUT ELEMENT MASTER FILE C SET OF MAXD DENSITIES C INPUT : (R*8) TEK() - OUTPUT ELEMENT MASTER FILE C SET OF MAXT TEMPERATURES C OUTPUT: (R*8) METFRC(,,,) - METASTABLE POPULATION FRACTIONS, C SPLINED ONTO THE OUTPUT TEMPERATURES C AND DENSITIES C 1ST DIMENSION - DENSITY INDEX C 2ND DIMENSION - TEMPERATURE INDEX C 3RD DIMENSION - CHARGE STATE INDEX C 4TH DIMENSION - METASTABLE INDEX C INPUT : (I*4) NGRD() - NUMBER OF GROUND STATES OF THE FIRST C 50 ISOELECTRONIC SEQUENCES C INPUT : (I*4) IST2 - UNIT NUMBER FOR OUTPUT INFORMATION C AND ERROR MESSAGES C INPUT : (I*4) IST5 - UNIT NUMBER FOR READING MASTER CONDENSED C FILE C C PARAMETER : (I*4) NTDMAX - SIZE OF LOCAL WORKING SPACE C (MUST BE GREATER THAN NUTMAX & NUDMAX) C PARAMETER : (I*4) NDZ1V - MASTER CONDENSED FILE C MAXIMUM NUMBER OF CHARGE STATES C PARAMETER : (I*4) NDTIN - MASTER CONDENSED FILE C MAXIMUM NUMBER OF TEMPERATURES C PARAMETER : (I*4) NDDEN - MASTER CONDENSED FILE C MAXIMUM NUMBER OF DENSITIES C PARAMETER : (I*4) NDMET - MASTER CONDENSED FILE C MAXIMUM NUMBER OF METASTABLES C C : (R*8) DENSR() - INPUT MASTER CONDENSED FILE C SET OF IDE REDUCED DENSITIES C : (R*8) TR() - INPUT MASTER CONDENSED FILE C SET OF ITE REDUCED TEMPERATURES C : (R*8) ZIPT() - INPUT MASTER CONDENSED FILE C SET OF IZE RECOMBINING ION CHARGES C : (R*8) AIPTM(,,) - INPUT MASTER CONDENSED FILE C RATIO OF METASTABLE TO GROUND POP. C 1ST DIMENSION - DENSITY INDEX C 2ND DIMENSION - TEMPERATURE INDEX C 3RD DIMENSION - CHARGE STATE INDEX C 4TH DIMENSION - METASTABLE INDEX C : (R*8) EIA() - INPUT MASTER CONDENSED FILE C SET OF IONISATION POTENTIALS (CM-1) C C : (R*8) ATTY(,) - WORK SPACE FOR INTERPOLATION C - STORES LOG10(INTERPOLATED VALUES) C 1ST DIMENSION - TEMPERATURE C 2ND DIMENSION - DENSITY C : (R*8) ARRAY(,) - STORES LOG10(INTERPOLATED VALUES) C 1ST DIMENSION - TEMPERATURE C 2ND DIMENSION - DENSITY C C ROUTINES: C --------- C XXOPEN - C XXTERM - C XXIN80 - FETCH DATA FROM MASTER CONDENSED FILE C D4SPLN - INTERPOLATE CONDENSED MASTER FILE C UPDATED VERSION OF D1SPLN C C--------------------------------------------- C AUTHOR: LORNE D. HORTON C ROOM K1/1/58, JET JOINT UNDERTAKING C C DATE: 21ST FEBRUARY 1996 C---------------------------------------------------------------------- C UNIX-IDL PORT: C C VERSION: 1.1 DATE: 11-11-96 C MODIFIED: WILLIAM OSBORN (TESSELLA SUPPORT SERVICES PLC) C - FIRST CONVERTED C C VERSION: 1.2 DATE: 20-11-96 C MODIFIED: WILLIAM OSBORN (TESSELLA SUPPORT SERVICES PLC) C - REMOVED DIAGNOSTIC WRITE STATEMENTS C C VERSION: 1.3 DATE: 20-10-97 C MODIFIED: LORNE HORTON C - REMOVED WHITE SPACE FROM DATA FILENAME. C C---------------------------------------------------------------------- C CHARACTER*80 DSNIN(50,10) INTEGER IST2, IST5, IZ0, IZH INTEGER IZL, MAXD, MAXT INTEGER NGRD(50), NUDMAX, NUMMAX, NUTMAX INTEGER NUZMAX REAL*8 DENSA(NUDMAX) REAL*8 METFRC(NUDMAX,NUTMAX,NUZMAX,NUMMAX) REAL*8 TEK(NUTMAX)