C***********************************************************************
C********************************  MADISCON  ***************************
C***********************************************************************
C**
C**  NAME:  MADISCON
C**
C**
C**
C**  PURPOSE
C**  =======
C**  INCLUDE FILE                ORIGINAL VERSION   9/14/99  M. BARTH
C**
C**  03/23/00     M. BARTH       ADDED STUFF FOR RAOB, NPN, ACARS 
C**  02/08/01     M. BARTH       - CHANGED MXSFC_P FROM 4500 TO 10000
C**                              - CHANGED SFC_MXSTRF TO HOLD 4 FILES
C**                                FOR EACH SFC DATASET (WAS 2)
C**                              - ADDED VN_P'S FOR SOME GPSMET VARS
C**                              - ADDED VN_P FOR PRECIP RATE
C**                              - CHANGED OLD SFC VN_P'S OF 38 OR
C**                                HIGHER TO +1 (E.G., 38=>39) AS PART
C**                                OF REDEFINING MESONET PRECIP VARS
C**  04/24/01     M. BARTH       - CHANGES:  VAR        OLD     NEW
C**                                 MAX_SUBSRC_P         20      30  
C**                                 ACARSRT_VN_P         30      33
C**                                 MXRAOB_P            650    1000
C**                                 MXRAOBTROP_P          3       4
C**                                 MXRAOBSIGW_P         75      76
C**                                 MXRAOBLEV_P         254     256
C**                               - ADDED:  MXRAOBVAR_P, RAOBST_VN_P
C**  06/27/01     M. BARTH       - ADDED MAX_SUBPVDR_P & SRAD*_VN_P
C**                              - REMOVED GSOS & NPN SFC DATASETS &
C**                                CHANGED MAX_SFCDSET_P FROM 6 TO 4
C**                              - ADDED AWIPS_DB_P, FSL_DB_P
C**                              - ADDED STALOC_VN_P
C**                              - ADDED RAOBP_VN_P
C**                              - REDEFINED NPN VN_P'S
C**                              - CHANGED DEFINITION OF MXUAPT_P TO
C**                                CONFORM WITH G77 COMPILER
C**                              - ADDED MANY ERROR CODES, NEW VN_P'S
C**  07/24/01     M. BARTH       ADDED HYDRO, INV_INTV_P, SKYCOVLB_VN_P,
C**                              RDLFT*VN_P, INV_TTF_P
C**  08/11/01     M. BARTH       CLEANED UP ERROR CODES
C**  02/01/02     M. BARTH       ADDED PCPINT_VN_P, PCPTYPE_VN_P
C**  02/04/22     M. BARTH       ADDED MAP DATASET & ASSOCIATED CHANGES
C**  02/05/24     M. BARTH       - CHANGED MXSFC_P FROM 10000 TO 25000
C**                              - ADDED PCP12_VN_P,PCP18_VN_P
C**                              - ADDED RAOB_MXSTRF
C**                              - CHANGED MAX_SUBSRC_P FROM 40 TO 100
C**  03/03/13     M. BARTH       CHANGED MXACARS_P FROM 10000 TO 60000
C**  03/05/23     M. BARTH       CHANGED MXSFC_P FROM 25000 TO 50000
C**  03/06/25     M. BARTH       - ADDED STUFF FOR THE RDMTR DATASET
C**                              - ADDED THE AH VARIABLE FOR APPLICABLE
C**                                DATASETS, WHICH ALSO CAUSED A CHANGE
C**                                IN RAOBLT_VN_P FROM 13 TO 120.
C**  03/08/26     M. BARTH       ADDED STUFF FOR THE SATW DATASET.
C**  03/09/12     M. BARTH       ADDED NEW SOLAR RADIATION TYPES (7-15).
C**  03/10/10     M. BARTH       ADDED UAPTMR_VN_P
C**  04/03/22     M. BARTH       ADDED STUFF THE NEW COOP DATASET WHICH
C**                              HAS BEEN ADDED AS AN ADDITIONAL SFC
C**                              DATASET.
C**  04/06/16     M. BARTH       - ADDED STUFF FOR THE ACARSP DATASET
C**                              - CHANGED ACARSALT_VN_P FROM 16 TO 47
C**                              - ADDED SUBPVDR_VN_P, PCPTOTL_VN_P
C**                                PCV_P, AND ACARSTT_VN_P
C**                              - CHANGED MAX_UAPT_QCCHK_P FROM 11 TO
C**                                12 & MAX_ACARS_QCCHK_P FROM 10 TO 12
C**  04/08/19     M. BARTH       ADDED NO_TDIR_P & INV_TDIR_P
C**  04/09/27     L.BENJAMIN     ADDED SAT SOUNDING DATA SET
C**                              - ADDED COMMON VARIABLES 
C**                              - INCREASED MAX_DSET_P
C**                              - ADDED MAX_SATS_QCCHK_P
C**  05/05/31     L.BENJAMIN     INCREASED MXDATA_P FOR SATS.  AWIPS  
C**                              FILES ARE 12 HOUR FILES WITH 50 LEVELS,
C**                              SO EXTRA SPACE IS NEEDED TO HANDLE
C**                              READING THE DATA.  THE AWIPS LEVELS
C**                              ARE TRIMMED TO 40.
C**  05/05/31     M. BARTH       ADDED ACARSRH_VN_P AND SRAD0_VN_P.
C**  05/06/15     L. BENJAMIN    CHANGED MXSFC_P FROM 50000 TO 100000
C**  05/09/16     L. BENJAMIN    - CHANGES:  VAR        OLD     NEW
C**                                 MXRAOBSIGT_P        150     175
C**                                 MXRAOBSIGW_P         76      80
C**                                 MXRAOBLEV_P         256     285
C**  05/10/14     M. BARTH       ADDED SOME VARIABLES FOR SNOW.F
C**                              (SNOW DATASET NOT YET ADDED TO API.)
C**  05/10/25     L.BENJAMIN     ADDED SAT RADIANCE DATA SET
C**                              - ADDED COMMON VARIABLES 
C**                              - INCREASED MAX_DSET_P
C**                              - ADDED MAX_SATR_QCCHK_P
C**                              - INCREASED MX3SATS_P 80000
C**  05/11/18     L.BENJAMIN     ADDED SNOW DATA SET
C**                              - CHANGED MXSFC_P FROM 100000 TO 200000
C**  05/11/18     L.BENJAMIN     ADDED MXDBL_P FOR MAXIMUM SIZE OF 
C**                              DOUBLE PRECISION VARIABLES.  CURRENTLY 
C**                              WE ONLY HAVE STATION VARIABLES THAT USE 
C**                              DOUBLE PRECISION.
C**  06/01/20     M. BARTH       - CHANGES:  VAR        OLD     NEW
C**                                 MXRAOBSIGW_P         80     200
C**                                 MXRAOBLEV_P         285     405
C**                              - NEW VARS USED SOLELY WITHIN 
C**                                MRDRAOBLEV:
C**                                 MXRAOBSIGWHT_P = 80 SIGW-BY-HT
C**                                 MXRAOBSIGWP_P = 120 SIGW-BY-P
C**  06/08/01     L. BENJAMIN    ADDED URBANET DATASET UNDER SFC
C**                              CHANGED MAX_SFCDSET_P FROM 5 TO 6
C**                              INCREASED MAX_VARCOD_P FROM 200 TO 230
C**  07/06/14     L. BENJAMIN    ADDED SKYCOV_VN_P FOR SKY COVER
C**                              INCREASED MAX_VARCOD_P FROM 230 TO 240
C**  07/10/17     M. BARTH       ADDED PCP5M_VN_P AND PCP15_VN_P FOR 
C**                              5- AND 15-MIN MESO PRECIP
C**  08/06/14     L. BENJAMIN    MOVE COMMON CONSTANTS WITH UA AND MSAS
C**                              TO INTQC1CON2 AND INTQC1CON1
C**  08/06/23     M. BARTH       ADDED HIGH FREQUENCY METAR DATASET
C**                              UNDER SFC
C**  08/07/29     L. BENJAMIN    CHANGED MXDATA_P TO 32500 BECUASE OF 
C**                              HP COMPILE AND RUN ISSUES.
C**  09/07/20     L. BENJAMIN    ADDED NEPP,HCN-M,CRN SURFACE DATASETS.
C**                              CHANGED MAX_SFCDSET_P FROM 7 TO 10
C**  09/08/09     L. BENJAMIN    CHANGED HYDRO TO 15000. ADDED PRECIP
C**                              VARIABLES
C**  09/09/10     L. BENJAMIN    CHANGED SFC TO 3000000
C**  04/22/13     L. BENJAMIN    CHANGED MXSTA_P TO 6000000 AND
C**                              MXDATA_P = 4*MXSTA_P
c**
C**  CONTAINS CONSTANTS SPECIFIC TO THE MADIS LIBRARY.
C**
C***********************************************************************
C***********************************************************************

C     MAXIMUM DIMENSIONS AND OTHER MISCELLANEOUS CODE NUMBERS:
      INCLUDE 'INTQC1CON2'
      INCLUDE 'MAPCON'
      INCLUDE 'NPNCON'
      INCLUDE 'ACARSCON'
      INCLUDE 'ACARSPCON'
      INCLUDE 'SNOWCON'
      INCLUDE 'SATWCON'
      INCLUDE 'RAOBCON'
      INCLUDE 'RDMTRCON'
      INCLUDE 'POESCON'
      INCLUDE 'SATSCON'
      INCLUDE 'SATRCON'
      INCLUDE 'WISDOMCON'


      INTEGER MXSTA_P
      PARAMETER (MXSTA_P = 600000)

C SETTING IN TMP COMMONS
      INTEGER LDPNAM_P
      PARAMETER (LDPNAM_P = 10)
      INTEGER MAX_CHAR_VLEN_P
      PARAMETER (MAX_CHAR_VLEN_P = 51)


C     MXDATA_P IS THE MAXIMUM NUMBER OF ARRAY ELEMENTS TO USE
C     IN A READ OF A SINGLE VARIABLE FROM A FILE.  HAS TO BE
C     AS BIG AS API NEEDS.

      INTEGER MXDATA_P
c$$$      PARAMETER (MXDATA_P = 32500 * 40)
      PARAMETER (MXDATA_P = 4*MXSTA_P)

C     MXDBL_P IS THE MAXIMUM NUMBER OF ARRAY ELEMENTS TO USE
C     DOUBLE PRECISION IN A READ OF A SINGLE VARIABLE FROM A FILE.
C     RIGHT NOW ONLY STATION VARIABLES USE DOUBLE PRECISION, SO
C     THE NUMBER IS EQUAL TO THE MOST NUMBER OF STATIONS. 

      INTEGER MXDBL_P
      PARAMETER (MXDBL_P = MXSTA_P)



      INTEGER MAX_UAPT_QCCHK_P
      PARAMETER (MAX_UAPT_QCCHK_P = 12)



C     NOTE THAT MXUAPT_P MUST BE EQUAL TO THE LARGEST "MAXSTA" 
C     PARAMETER FOR ANY OF THE UPPER-AIR DATASETS.  WE CAN'T
C     USE THE MAX FUNCTION IN THE PARAMETER DEFINITION BECAUSE
C     G77 WON'T LET US...  SEE {UA}CON.F FILES FOR SETTINGS.

      INTEGER MXUAPT_P
      PARAMETER (MXUAPT_P = 60000)


      INTEGER MAX_VARCOD_P
      INTEGER MAX_SFCDSET_P
      INTEGER MAX_UAPTDSET_P
      INTEGER MAX_HYDRODSET_P

      INTEGER MAX_SFC_QCCHK_P

      INTEGER MAX_QC_STAGE_P

      INTEGER MAX_SUBSRC_P
      INTEGER MAX_SUBPVDR_P

      PARAMETER (MAX_VARCOD_P = 380)
      PARAMETER (MAX_SFCDSET_P = 10)
      PARAMETER (MAX_UAPTDSET_P = 6)
      PARAMETER (MAX_HYDRODSET_P = 1)


      PARAMETER (MAX_SFC_QCCHK_P = 10)

      PARAMETER (MAX_QC_STAGE_P = 3)

      PARAMETER (MAX_SUBSRC_P = 100)
      PARAMETER (MAX_SUBPVDR_P = 200)

      INTEGER INIT_P

      INTEGER SFC_DS_P
      INTEGER HYD_DS_P
      INTEGER MXSFC_P
      INTEGER MXHYDRO_P

      PARAMETER (INIT_P = 12345)
      PARAMETER (SFC_DS_P = 0)
      PARAMETER (HYD_DS_P = 7)

C MXSFC_P IS ALWAYS SET TO THE MAXIMUM NUMBER OF STATION
      PARAMETER (MXSFC_P = MXSTA_P)

      PARAMETER (MXHYDRO_P = 15000)


C     STATUS RETURNS (SUCCESS_P IS ONLY NON-ERROR):

      INTEGER INV_DMA_P
      INTEGER INV_SUB_P
      INTEGER INV_WIN_P
      INTEGER INV_BIGWIN_P
      INTEGER INV_RECWIN_P
      INTEGER BAD_FILE_P
      INTEGER SELSUB_NOTINIT_P
      INTEGER NO_DATA_P
      INTEGER TIME_NOTINIT_P
      INTEGER TOO_MANY_REC_P
      INTEGER INV_VCN_P
      INTEGER INV_PVDR_P
      INTEGER INV_QCT_P
      INTEGER INV_DMT_P
      INTEGER INV_DTYPE_P
      INTEGER SUB_NOTINIT_P
      INTEGER INV_CORT_P
      INTEGER INV_DB_P

      INTEGER NO_SDIR_P
      INTEGER INV_SDIR_P
      INTEGER NO_DDIR_P
      INTEGER INV_DDIR_P
      INTEGER INV_LAT_P
      INTEGER INV_TTF_P
      INTEGER NO_TDIR_P
      INTEGER INV_TDIR_P


C     THESE AREN'T KEPT IN SEQUENCE BECAUSE IT'S TOO MUCH TROUBLE
C     TO KEEP SORTING THEM, BUT THERE IS LOGIC HERE:
C
C     INVALID INPUTS (USER-LEVEL)              1-1000
C     RUN-TIME ENVIRONMENT                     1001-2000
C     SYSTEM FAILURES                          2001-3000
C     PROGRAMMING ERRORS                       3001-4000
C     MADIS INTERNAL ERRORS                    4001-5000

      PARAMETER (INV_DMA_P = 8)
      PARAMETER (INV_SUB_P = 3001)
      PARAMETER (INV_WIN_P = 1)
      PARAMETER (INV_BIGWIN_P = 2)
      PARAMETER (INV_RECWIN_P = 3)
      PARAMETER (BAD_FILE_P = 2002)
      PARAMETER (SELSUB_NOTINIT_P = 3002)
      PARAMETER (NO_DATA_P = 1006)
      PARAMETER (TIME_NOTINIT_P = 3003)
      PARAMETER (TOO_MANY_REC_P = 14)
      PARAMETER (INV_VCN_P = 13)
      PARAMETER (INV_PVDR_P = 5)
      PARAMETER (INV_QCT_P = 6)
      PARAMETER (INV_DMT_P = 7)
      PARAMETER (INV_DTYPE_P = 3004)
      PARAMETER (SUB_NOTINIT_P = 3005)
      PARAMETER (INV_CORT_P = 9)
      PARAMETER (INV_DB_P = 10)
      PARAMETER (NO_SDIR_P = 1001)
      PARAMETER (INV_SDIR_P = 1002)
      PARAMETER (NO_DDIR_P = 1003)
      PARAMETER (INV_DDIR_P = 1004)
      PARAMETER (NO_TDIR_P = 1007)
      PARAMETER (INV_TDIR_P = 1008)
      PARAMETER (INV_LAT_P = 11)
      PARAMETER (INV_TTF_P = 12)

C     VARIABLE CODE NUMBERS:

C     COMMON TO DIFFERENT DATA TYPES:

      INTEGER STANAM_VN_P,WMOID_VN_P,LAT_VN_P,LON_VN_P,ELEV_VN_P
      INTEGER STALOC_VN_P

      PARAMETER (WMOID_VN_P = 14)
      PARAMETER (STANAM_VN_P = 15)
      PARAMETER (ELEV_VN_P = 16)
      PARAMETER (LAT_VN_P = 17)
      PARAMETER (LON_VN_P = 18)
      PARAMETER (STALOC_VN_P = 29)

C     SURFACE:

      INTEGER SFCTD_VN_P,SFCRH_VN_P,PCPUTC_VN_P,SFCQ_VN_P,SFCAH_VN_P
      INTEGER SFCU_VN_P,SFCV_VN_P,SFCFF_VN_P,SFCDD_VN_P,PCHNG_VN_P
      INTEGER SFCMR_VN_P,PCP5M_VN_P,PCP15M_VN_P
      INTEGER ALT_VN_P,SLP_VN_P,VIS_VN_P,PCP1_VN_P,PCHCHR_VN_P
      INTEGER PCP3_VN_P,PCP6_VN_P,PCP24_VN_P,PCPLCL_VN_P,SFCT_VN_P
      INTEGER PRES_WEA_VN_P,GPWV_VN_P,GFE_VN_P,GCPI_VN_P,PCPRATE_VN_P
      INTEGER GTSD_VN_P,GDSD_VN_P,GWSD_VN_P,GMWT_VN_P,SRAD1_VN_P
      INTEGER SRAD2_VN_P,SRAD3_VN_P,SRAD4_VN_P,SRAD5_VN_P,SRAD6_VN_P
      INTEGER SRAD7_VN_P,SRAD8_VN_P,SRAD9_VN_P,SRAD10_VN_P,SRAD11_VN_P
      INTEGER SRAD12_VN_P,SRAD13_VN_P,SRAD14_VN_P,SRAD15_VN_P
      INTEGER SRAD16_VN_P
      INTEGER SFCDPD_VN_P,SFCTV_VN_P,SFCP_VN_P,SKYCOVLB_VN_P,SKYCOV_VN_P
      INTEGER RDLFT1_VN_P,RDLFT2_VN_P,RDLFT3_VN_P,RDLFT4_VN_P
      INTEGER PCPINT_VN_P,PCPTYPE_VN_P,PCP12_VN_P,PCP18_VN_P
      INTEGER DPD1H_VN_P,TD1H_VN_P,RH1H_VN_P,Q1H_VN_P,AH1H_VN_P
      INTEGER TV1H_VN_P,DD1H_VN_P,FF1H_VN_P,U1H_VN_P,V1H_VN_P
      INTEGER DD24H_VN_P,FF24H_VN_P,U24H_VN_P,V24H_VN_P
      INTEGER TMXTIME_VN_P,TMNTIME_VN_P,T1H_VN_P,PCPCDAY_VN_P
      INTEGER DDMAX1H_VN_P,FFMAX1H_VN_P

      INTEGER PCPUDAY_VN_P,SUBPVDR_VN_P,PCPTOTL_VN_P,SRAD0_VN_P
      INTEGER DDGUST_VN_P,FFGUST_VN_P,PLATTYP_VN_P
      INTEGER RH15M_VN_P, TD15M_VN_P, Q15M_VN_P, DPD15M_VN_P, AH15M_VN_P
      INTEGER T15M_VN_P, WVMR15M_VN_P, TV15M_VN_P, P15M_VN_P
      INTEGER ALTS15M_VN_P
      INTEGER TMFOT15M_VN_P,TMLOT15M_VN_P
      INTEGER RH1HCHG_VN_P, TD1HCHG_VN_P, Q1HCHG_VN_P, DPD1HCHG_VN_P
      INTEGER AH1HCHG_VN_P, T1HCHG_VN_P, WVMR1HCHG_VN_P
      INTEGER RAWPATB_VN_P, ARCHPCP_VN_P


      PARAMETER (SFCTD_VN_P = 1)
      PARAMETER (SFCRH_VN_P = 2)
      PARAMETER (ALT_VN_P = 3)
      PARAMETER (PCHNG_VN_P = 4)
      PARAMETER (PCHCHR_VN_P = 5)
      PARAMETER (SLP_VN_P = 6)
      PARAMETER (SFCP_VN_P = 7)
      PARAMETER (SFCT_VN_P = 8)
      PARAMETER (SFCDD_VN_P = 9)
      PARAMETER (SFCFF_VN_P = 10)
      PARAMETER (SFCU_VN_P = 11)
      PARAMETER (SFCV_VN_P = 12)
      PARAMETER (VIS_VN_P = 13)

      PARAMETER (PLATTYP_VN_P = 19)

      PARAMETER (RAWPATB_VN_P = 300)
      PARAMETER (ARCHPCP_VN_P = 299)


      PARAMETER (PCP1_VN_P = 31)
      PARAMETER (PCP3_VN_P = 32)
      PARAMETER (PCP6_VN_P = 33)
      PARAMETER (PCP12_VN_P = 34)
      PARAMETER (PCP18_VN_P = 35)
      PARAMETER (PCP24_VN_P = 36)
      PARAMETER (PCPLCL_VN_P = 37)
      PARAMETER (PCPUTC_VN_P = 38)
      PARAMETER (PCPRATE_VN_P = 39)
      PARAMETER (PCP5M_VN_P = 193)
      PARAMETER (PCP15M_VN_P = 231)
      PARAMETER (PCPINT_VN_P = 40)
      PARAMETER (PCPTYPE_VN_P = 41)
      PARAMETER (PRES_WEA_VN_P = 42)
      PARAMETER (SKYCOVLB_VN_P = 44)
      PARAMETER (SKYCOV_VN_P = 43)

      PARAMETER (DDGUST_VN_P = 57)
      PARAMETER (FFGUST_VN_P = 58)

      PARAMETER (SRAD0_VN_P = 187)
      PARAMETER (SRAD1_VN_P = 74)
      PARAMETER (SRAD2_VN_P = 101)
      PARAMETER (SRAD3_VN_P = 102)
      PARAMETER (SRAD4_VN_P = 103)
      PARAMETER (SRAD5_VN_P = 104)
      PARAMETER (SRAD6_VN_P = 105)
      PARAMETER (SRAD7_VN_P = 132)
      PARAMETER (SRAD8_VN_P = 133)
      PARAMETER (SRAD9_VN_P = 134)
      PARAMETER (SRAD10_VN_P = 135)
      PARAMETER (SRAD11_VN_P = 136)
      PARAMETER (SRAD12_VN_P = 137)
      PARAMETER (SRAD13_VN_P = 138)
      PARAMETER (SRAD14_VN_P = 139)
      PARAMETER (SRAD15_VN_P = 140)
      PARAMETER (SRAD16_VN_P = 207)

      PARAMETER (GPWV_VN_P = 78)
      PARAMETER (GTSD_VN_P = 79)
      PARAMETER (GDSD_VN_P = 80)
      PARAMETER (GWSD_VN_P = 81)
      PARAMETER (GMWT_VN_P = 82)
      PARAMETER (GFE_VN_P = 83)
      PARAMETER (GCPI_VN_P = 84)
      PARAMETER (RDLFT1_VN_P = 89)
      PARAMETER (RDLFT2_VN_P = 90)
      PARAMETER (RDLFT3_VN_P = 91)
      PARAMETER (RDLFT4_VN_P = 92)
      PARAMETER (SFCQ_VN_P = 112)
      PARAMETER (SFCMR_VN_P = 186)
      PARAMETER (SFCDPD_VN_P = 113)
      PARAMETER (SFCTV_VN_P = 114)
      PARAMETER (SFCAH_VN_P = 131)
      PARAMETER (DPD1H_VN_P = 167)
      PARAMETER (TD1H_VN_P = 166)
      PARAMETER (RH1H_VN_P = 144)
      PARAMETER (Q1H_VN_P = 168)
      PARAMETER (AH1H_VN_P = 169)
      PARAMETER (TV1H_VN_P = 170)
      PARAMETER (DD1H_VN_P = 145)
      PARAMETER (FF1H_VN_P = 146)
      PARAMETER (U1H_VN_P = 171)
      PARAMETER (V1H_VN_P = 172)
      PARAMETER (DD24H_VN_P = 149)
      PARAMETER (FF24H_VN_P = 150)
      PARAMETER (U24H_VN_P = 173)
      PARAMETER (V24H_VN_P = 174)
      PARAMETER (TMXTIME_VN_P = 142)
      PARAMETER (TMNTIME_VN_P = 141)
      PARAMETER (T1H_VN_P = 143)
      PARAMETER (DDMAX1H_VN_P = 175)
      PARAMETER (FFMAX1H_VN_P = 176)
      PARAMETER (PCPCDAY_VN_P = 148)
      PARAMETER (PCPUDAY_VN_P = 147)
      PARAMETER (SUBPVDR_VN_P = 25)
      PARAMETER (PCPTOTL_VN_P = 181)
      PARAMETER (TD15M_VN_P = 197)
      PARAMETER (RH15M_VN_P = 215)
      PARAMETER (Q15M_VN_P = 202)
      PARAMETER (DPD15M_VN_P = 200)
      PARAMETER (AH15M_VN_P = 198)
      PARAMETER (T15M_VN_P = 203)
      PARAMETER (WVMR15M_VN_P = 209)
      PARAMETER (TV15M_VN_P = 204)
      PARAMETER (P15M_VN_P = 229)
      PARAMETER (ALTS15M_VN_P = 208)

      PARAMETER (TD1HCHG_VN_P = 224)
      PARAMETER (RH1HCHG_VN_P = 217)
      PARAMETER (Q1HCHG_VN_P = 225)
      PARAMETER (DPD1HCHG_VN_P = 226)
      PARAMETER (AH1HCHG_VN_P = 227)
      PARAMETER (T1HCHG_VN_P = 216)
      PARAMETER (WVMR1HCHG_VN_P = 228)

      PARAMETER (TMFOT15M_VN_P = 219)
      PARAMETER (TMLOT15M_VN_P = 220)



C     UPPER-AIR-POINT DATA TYPES:

      INTEGER UAPTDD_VN_P,UAPTFF_VN_P,UAPTU_VN_P,UAPTV_VN_P,UAPTT_VN_P
      INTEGER UAPTTD_VN_P,UAPTRH_VN_P,UAPTDPD_VN_P,UAPTQ_VN_P
      INTEGER UAPTTV_VN_P,UAPTAH_VN_P,UAPTMR_VN_P

      PARAMETER (UAPTDD_VN_P = 1)
      PARAMETER (UAPTFF_VN_P = 2)
      PARAMETER (UAPTU_VN_P = 3)
      PARAMETER (UAPTV_VN_P = 4)
      PARAMETER (UAPTT_VN_P = 5)
      PARAMETER (UAPTTV_VN_P = 6)
      PARAMETER (UAPTTD_VN_P = 7)
      PARAMETER (UAPTRH_VN_P = 8)
      PARAMETER (UAPTQ_VN_P = 9)
      PARAMETER (UAPTDPD_VN_P = 10)
      PARAMETER (UAPTAH_VN_P = 13)
      PARAMETER (UAPTMR_VN_P = 34)

C     UPPER-AIR-POINT, MAP-SPECIFIC:

      INTEGER MAPABA_1_VN_P,MAPABA_2_VN_P,MAPABA_3_VN_P,MAPABA_4_VN_P 
      INTEGER MAPABA_5_VN_P 
      INTEGER MAPABE_1_VN_P,MAPABE_2_VN_P,MAPABE_3_VN_P,MAPABE_4_VN_P
      INTEGER MAPABE_5_VN_P
      INTEGER MAPBEAM_1_VN_P,MAPBEAM_2_VN_P,MAPBEAM_3_VN_P
      INTEGER MAPBEAM_4_VN_P,MAPBEAM_5_VN_P
      INTEGER MAPCNUM_1_VN_P,MAPCNUM_2_VN_P,MAPCNUM_3_VN_P
      INTEGER MAPCNUM_4_VN_P,MAPCNUM_5_VN_P 
      INTEGER MAPHT_VN_P,MAPLT_VN_P,MAPP_VN_P
      INTEGER MAPRV_1_VN_P,MAPRV_2_VN_P,MAPRV_3_VN_P,MAPRV_4_VN_P
      INTEGER MAPRV_5_VN_P
      INTEGER MAPSNR_1_VN_P,MAPSNR_2_VN_P,MAPSNR_3_VN_P,MAPSNR_4_VN_P 
      INTEGER MAPSNR_5_VN_P 
      INTEGER MAPUGUST_VN_P,MAPVGUST_VN_P,MAPUSDEV_VN_P,MAPVSDEV_VN_P
      INTEGER MAPWSDEV_VN_P,MAPW_VN_P,MAPRW_VN_P
      INTEGER MAPVC_1_VN_P,MAPVC_2_VN_P,MAPVC_3_VN_P
      INTEGER MAPAP_1_VN_P,MAPAP_2_VN_P,MAPAP_3_VN_P
      INTEGER MAPCST_1_VN_P,MAPCST_2_VN_P,MAPCST_3_VN_P,MAPCST_R_VN_P
      INTEGER MAPDG1_1_VN_P,MAPDG1_2_VN_P,MAPDG1_3_VN_P
      INTEGER MAPNL_1_VN_P,MAPNL_2_VN_P,MAPNL_3_VN_P



C     NOTE THIS SPECIAL CASE:  THE WIND MODE PARAMETERS MUST ALL HAVE
C     CONTIGUOUS NUMBERS BETWEEN MAPWMODE_MIN_VN_P & MAPWMODE_MAX_VN_P.

      INTEGER MAPWMODE_MIN_VN_P,MAPWMODE_MAX_VN_P

      PARAMETER (MAPABA_1_VN_P = 124)
      PARAMETER (MAPABA_2_VN_P = 125)
      PARAMETER (MAPABA_3_VN_P = 178)
      PARAMETER (MAPABA_4_VN_P = 179)
      PARAMETER (MAPABA_5_VN_P = 180)
      PARAMETER (MAPABE_1_VN_P = 181)
      PARAMETER (MAPABE_2_VN_P = 182)
      PARAMETER (MAPABE_3_VN_P = 183)
      PARAMETER (MAPABE_4_VN_P = 184)
      PARAMETER (MAPABE_5_VN_P = 133)
      PARAMETER (MAPBEAM_1_VN_P = 134)
      PARAMETER (MAPBEAM_2_VN_P = 135)
      PARAMETER (MAPBEAM_3_VN_P = 136)
      PARAMETER (MAPBEAM_4_VN_P = 137)
      PARAMETER (MAPBEAM_5_VN_P = 138)
      PARAMETER (MAPCNUM_1_VN_P = 13)
      PARAMETER (MAPCNUM_2_VN_P = 96)
      PARAMETER (MAPCNUM_3_VN_P = 19)
      PARAMETER (MAPCNUM_4_VN_P = 22)
      PARAMETER (MAPCNUM_5_VN_P = 25)
      PARAMETER (MAPHT_VN_P = 8)
      PARAMETER (MAPLT_VN_P = 28)
      PARAMETER (MAPP_VN_P = 9)
      PARAMETER (MAPRV_1_VN_P = 95)
      PARAMETER (MAPRV_2_VN_P = 98)
      PARAMETER (MAPRV_3_VN_P = 21)
      PARAMETER (MAPRV_4_VN_P = 24)
      PARAMETER (MAPRV_5_VN_P = 27)
      PARAMETER (MAPSNR_1_VN_P = 94)
      PARAMETER (MAPSNR_2_VN_P = 97)
      PARAMETER (MAPSNR_3_VN_P = 20)
      PARAMETER (MAPSNR_4_VN_P = 23)
      PARAMETER (MAPSNR_5_VN_P = 26)
      PARAMETER (MAPUGUST_VN_P = 118)
      PARAMETER (MAPVGUST_VN_P = 119)
      PARAMETER (MAPUSDEV_VN_P = 120)
      PARAMETER (MAPVSDEV_VN_P = 121)
      PARAMETER (MAPWSDEV_VN_P = 122)
      PARAMETER (MAPW_VN_P = 5)
      PARAMETER (MAPRW_VN_P = 10)
      PARAMETER (MAPWMODE_MIN_VN_P = 150)
      PARAMETER (MAPWMODE_MAX_VN_P = 176)
      PARAMETER (MAPVC_1_VN_P = 185)
      PARAMETER (MAPVC_2_VN_P = 186)
      PARAMETER (MAPVC_3_VN_P = 187)

      PARAMETER (MAPAP_1_VN_P = 190)
      PARAMETER (MAPAP_2_VN_P = 191)
      PARAMETER (MAPAP_3_VN_P = 192)

      PARAMETER (MAPCST_1_VN_P = 194)
      PARAMETER (MAPCST_2_VN_P = 195)
      PARAMETER (MAPCST_3_VN_P = 196)
      PARAMETER (MAPCST_R_VN_P = 193)


      PARAMETER (MAPDG1_1_VN_P = 198)
      PARAMETER (MAPDG1_2_VN_P = 199)
      PARAMETER (MAPDG1_3_VN_P = 200)

      PARAMETER (MAPNL_1_VN_P = 202)
      PARAMETER (MAPNL_2_VN_P = 203)
      PARAMETER (MAPNL_3_VN_P = 204)


C     HYDRO:

      INTEGER HYDPCP5M_VN_P,HYDPCP1_VN_P,HYDPCP3_VN_P,HYDPCP6_VN_P
      INTEGER HYDPCP12_VN_P,HYDPCP24_VN_P

      PARAMETER (HYDPCP5M_VN_P = 1)
      PARAMETER (HYDPCP1_VN_P = 2)
      PARAMETER (HYDPCP3_VN_P = 3)
      PARAMETER (HYDPCP6_VN_P = 4)
      PARAMETER (HYDPCP12_VN_P = 5)
      PARAMETER (HYDPCP24_VN_P = 6)


C     MAP PROJECTION CODE NUMBERS:

      INTEGER PS_P,LC_P

      PARAMETER (PS_P = 1)
      PARAMETER (LC_P = 0)

C     SFC DATASET CODE NUMBERS:

      INTEGER METAR_DS_P,MARITIME_DS_P,SAO_DS_P,MESONET_DS_P,COOP_DS_P
      INTEGER URBANET_DS_P,HFMETAR_DS_P,NEPP_DS_P,HCN_DS_P,CRN_DS_P

      PARAMETER (METAR_DS_P = 1)
      PARAMETER (MARITIME_DS_P = 2)
      PARAMETER (SAO_DS_P = 3)
      PARAMETER (MESONET_DS_P = 4)
      PARAMETER (COOP_DS_P = 5)
      PARAMETER (URBANET_DS_P = 6)
      PARAMETER (HFMETAR_DS_P = 7)
      PARAMETER (NEPP_DS_P = 8)
      PARAMETER (HCN_DS_P = 9)
      PARAMETER (CRN_DS_P = 10)

C     HYDRO DATASET CODE NUMBERS:

      INTEGER LHYDRO_DS_P

      PARAMETER (LHYDRO_DS_P = 1)

C     SNOW DATASET CODE NUMBERS:

      INTEGER LSNOW_DS_P

      PARAMETER (LSNOW_DS_P = 1)



C     NEEDED FOR MARELV'S TOPO-INTERP OF GREAT LAKES MARITIME ELEVS:

      INTEGER NX_TOPO_P,NY_TOPO_P,PROJ_TOPO_P
      REAL X_MIN_TOPO_P,X_MAX_TOPO_P,Y_MIN_TOPO_P,Y_MAX_TOPO_P
      REAL DX_TOPO_P,DY_TOPO_P,X_POLE_TOPO_P,Y_POLE_TOPO_P
      REAL LAT_TRUE_TOPO_P,LON_PS_TOPO_P
      REAL LAT_LL_TOPO_P,LON_LL_TOPO_P
      REAL LON_LC_TOPO_P,LAT_TAN_TOPO_P,ROTCON_TOPO_P

      PARAMETER (X_POLE_TOPO_P = 1854642.0)
      PARAMETER (Y_POLE_TOPO_P = 6691869.0)
      PARAMETER (LAT_TRUE_TOPO_P = 40.0)
      PARAMETER (LON_PS_TOPO_P = -105.0)
      PARAMETER (DX_TOPO_P = 60000.0)
      PARAMETER (DY_TOPO_P = 60000.0)
      PARAMETER (NX_TOPO_P = 81)
      PARAMETER (NY_TOPO_P = 62)
      PARAMETER (X_MAX_TOPO_P = (NX_TOPO_P-1)*DX_TOPO_P)
      PARAMETER (X_MIN_TOPO_P = 0.0)
      PARAMETER (Y_MAX_TOPO_P = (NY_TOPO_P-1)*DY_TOPO_P)
      PARAMETER (Y_MIN_TOPO_P = 0.0)
      PARAMETER (PROJ_TOPO_P = PS_P)
      PARAMETER (LAT_LL_TOPO_P = 22.83730717)
      PARAMETER (LON_LL_TOPO_P = -120.49050192)
      PARAMETER (LON_LC_TOPO_P = 0.0)
      PARAMETER (LAT_TAN_TOPO_P = 0.0)
      PARAMETER (ROTCON_TOPO_P = 1.0)


C     DIMENSIONS NEEDED IN STRCCOM:

      INTEGER SFC_MXSTRF
      PARAMETER (SFC_MXSTRF=MAX_SFCDSET_P*4)

      INTEGER UAPT_MXSTRF
      PARAMETER (UAPT_MXSTRF=7)

      INTEGER HYDRO_MXSTRF
      PARAMETER (HYDRO_MXSTRF=MAX_HYDRODSET_P*4)


C EXPECTED QC STATUS
      INTEGER EQCOK_P, EQCFAILED_P
      PARAMETER (EQCOK_P = 1)
      PARAMETER (EQCFAILED_P = 2)


C     UPPER-AIR-POINT, RAOB-SPECIFIC:

      INTEGER RAOB_DS_P
      PARAMETER (RAOB_DS_P = 1)

      INTEGER RAOBHT_VN_P,RAOBLT_VN_P,RAOBRT_VN_P,RAOBST_VN_P,RAOBP_VN_P

      PARAMETER (RAOBP_VN_P = 11)
      PARAMETER (RAOBHT_VN_P = 12)
      PARAMETER (RAOBLT_VN_P = 120)
      PARAMETER (RAOBST_VN_P = 19)
      PARAMETER (RAOBRT_VN_P = 20)

      INTEGER RAOB_MXSTRF
      PARAMETER (RAOB_MXSTRF=4)

C     UPPER-AIR-POINT, NPN-SPECIFIC:

      INTEGER NPN_DS_P
      PARAMETER (NPN_DS_P = 2)

      INTEGER NPNABA_N_VN_P,NPNABA_E_VN_P,NPNABA_V_VN_P
      INTEGER NPNABE_N_VN_P,NPNABE_E_VN_P,NPNABE_V_VN_P
      INTEGER NPNCNUM_N_VN_P,NPNCNUM_E_VN_P,NPNCNUM_V_VN_P
      INTEGER NPNPP_N_VN_P,NPNPP_E_VN_P,NPNPP_V_VN_P
      INTEGER NPNRV_N_VN_P,NPNRV_E_VN_P,NPNRV_V_VN_P
      INTEGER NPNSW_N_VN_P,NPNSW_E_VN_P,NPNSW_V_VN_P
      INTEGER NPNHT_VN_P,NPNLT_VN_P,NPNCNUM_AV_VN_P
      INTEGER NPNCNUM_AEN_VN_P,NPNPP_AV_VN_P,NPNP_VN_P

      PARAMETER (NPNHT_VN_P = 8)
      PARAMETER (NPNP_VN_P = 22)
      PARAMETER (NPNCNUM_N_VN_P = 9)
      PARAMETER (NPNPP_N_VN_P = 10)
      PARAMETER (NPNRV_N_VN_P = 11)
      PARAMETER (NPNSW_N_VN_P = 12)
      PARAMETER (NPNCNUM_E_VN_P = 13)
      PARAMETER (NPNPP_E_VN_P = 94)
      PARAMETER (NPNRV_E_VN_P = 95)
      PARAMETER (NPNSW_E_VN_P = 96)
      PARAMETER (NPNCNUM_V_VN_P = 97)
      PARAMETER (NPNPP_V_VN_P = 98)
      PARAMETER (NPNRV_V_VN_P = 19)
      PARAMETER (NPNSW_V_VN_P = 20)
      PARAMETER (NPNLT_VN_P = 23)
      PARAMETER (NPNABA_N_VN_P = 83)
      PARAMETER (NPNABE_N_VN_P = 84)
      PARAMETER (NPNABA_E_VN_P = 85)
      PARAMETER (NPNABE_E_VN_P = 86)
      PARAMETER (NPNABA_V_VN_P = 87)
      PARAMETER (NPNABE_V_VN_P = 88)
      PARAMETER (NPNCNUM_AV_VN_P = 99)
      PARAMETER (NPNCNUM_AEN_VN_P = 21)
      PARAMETER (NPNPP_AV_VN_P = 100)

C     UPPER-AIR-POINT, ACARS-SPECIFIC:

      INTEGER ACARS_DS_P
      PARAMETER (ACARS_DS_P = 3)

      INTEGER ACARSRT_VN_P,ACARSP_VN_P,ACARSALT_VN_P,ACARSTT_VN_P
      INTEGER ACARSRH_VN_P
      INTEGER ACARSDSRC_VN_P

      PARAMETER (ACARSRH_VN_P = 28)
      PARAMETER (ACARSRT_VN_P = 33)
      PARAMETER (ACARSP_VN_P = 35)
      PARAMETER (ACARSDSRC_VN_P = 40)
      PARAMETER (ACARSALT_VN_P = 47)
      PARAMETER (ACARSTT_VN_P = 53)

C     POINT, RDMTR-SPECIFIC:
      INTEGER RDMTR_DS_P
      PARAMETER (RDMTR_DS_P = 5)

      INTEGER RDMTRHT_VN_P,RDMTRP_VN_P

      PARAMETER (RDMTRHT_VN_P = 11)
      PARAMETER (RDMTRP_VN_P = 12)


C     UPPER-AIR-POINT, ACARSP-SPECIFIC:
      INTEGER ACARSP_DS_P
      PARAMETER (ACARSP_DS_P = 6)

      INTEGER ACARSPP_VN_P,ACARSPALT_VN_P,ACARSPAPT_VN_P

      PARAMETER (ACARSPP_VN_P = 35)
      PARAMETER (ACARSPALT_VN_P = 31)
      PARAMETER (ACARSPAPT_VN_P = 27)

C     UPPER-AIR-POINT, SATWND-SPECIFIC:
      INTEGER SATW_DS_P
      PARAMETER (SATW_DS_P = 8)

      INTEGER HDW_DS_P,HDW1H_DS_P
      PARAMETER (HDW_DS_P = 1)
      PARAMETER (HDW1H_DS_P = 2)

      INTEGER MAX_SATWDSET_P
      PARAMETER (MAX_SATWDSET_P = 2)
      INTEGER SATW_MXSTRF
      PARAMETER (SATW_MXSTRF=MAX_SATWDSET_P*4)


      INTEGER SATWDD_VN_P,SATWFF_VN_P,SATWU_VN_P,SATWV_VN_P,SATWHT_VN_P
      INTEGER SATWLT_VN_P

      PARAMETER (SATWDD_VN_P = 1)
      PARAMETER (SATWFF_VN_P = 2)
      PARAMETER (SATWU_VN_P = 3)
      PARAMETER (SATWV_VN_P = 4)
      PARAMETER (SATWHT_VN_P = 5)
      PARAMETER (SATWLT_VN_P = 10)


C     UPPER-AIR-POINT, SATSND-SATRAD-SPECIFIC:
      INTEGER POES_DS_P
      PARAMETER (POES_DS_P = 1)

C     UPPER-AIR-POINT, SATSND-SPECIFIC:
      INTEGER SATS_DS_P
      PARAMETER (SATS_DS_P = 10)

      INTEGER MAX_SATSDSET_P
      PARAMETER (MAX_SATSDSET_P = 1)

      INTEGER SATS_MXSTRF
      PARAMETER (SATS_MXSTRF=MAX_SATSDSET_P*4)

      INTEGER   SATSMR_VN_P,SATSHT_VN_P
      INTEGER   SATST_VN_P,SATSTD_VN_P,SATSP_VN_P,SATSTV_VN_P
      INTEGER   SATSRH_VN_P,SATSDPD_VN_P,SATSQ_VN_P,SATSAH_VN_P


      PARAMETER (SATSP_VN_P = 20)
      PARAMETER (SATST_VN_P = 41)
      PARAMETER (SATSMR_VN_P = 44)
      PARAMETER (SATSHT_VN_P = 48)
      PARAMETER (SATSTV_VN_P = 94)
      PARAMETER (SATSAH_VN_P = 95)
      PARAMETER (SATSQ_VN_P = 96)
      PARAMETER (SATSDPD_VN_P = 97)
      PARAMETER (SATSRH_VN_P = 98)
      PARAMETER (SATSTD_VN_P = 99)



C     UPPER-AIR-POINT, SATRAD-SPECIFIC:
      INTEGER SATR_DS_P
      PARAMETER (SATR_DS_P = 11)

      INTEGER MAX_SATRDSET_P
      PARAMETER (MAX_SATRDSET_P = 1)

      INTEGER SATRAD_DS_P
      PARAMETER (SATRAD_DS_P = 1)

      INTEGER SATRCN_VN_P,SATRBT_VN_P
      PARAMETER (SATRCN_VN_P = 50)
      PARAMETER (SATRBT_VN_P = 51)

      INTEGER SATR_MXSTRF
      PARAMETER (SATR_MXSTRF=MAX_SATRDSET_P*4)

C     SNOW-SPECIFIC:
      INTEGER SNOW_DS_P
      PARAMETER (SNOW_DS_P = 12)

      INTEGER MAX_SNOWDSET_P
      PARAMETER (MAX_SNOWDSET_P = 1)

      INTEGER SNOW_MXSTRF
      PARAMETER (SNOW_MXSTRF=MAX_SNOWDSET_P*4)

      INTEGER SNOW6H_VN_P,SNOW24H_VN_P,SNOWC_VN_P
      PARAMETER (SNOWC_VN_P = 73) 
      PARAMETER (SNOW6H_VN_P = 161)
      PARAMETER (SNOW24H_VN_P = 178)

      INTEGER SNOWSD_VN_P,SNOWSF6_VN_P,SNOWSF24_VN_P,SNOWSWED_VN_P
      INTEGER SNOWSWE24_VN_P,SNOWSW6_VN_P

      PARAMETER (SNOWSD_VN_P = 30)
      PARAMETER (SNOWSF6_VN_P = 161)
      PARAMETER (SNOWSF24_VN_P = 178)
      PARAMETER (SNOWSWED_VN_P = 31)
      PARAMETER (SNOWSWE24_VN_P = 32)
      PARAMETER (SNOWSW6_VN_P = 33)



C     UPPER-AIR-POINT, WISDOM-SPECIFIC:
      INTEGER WISDOM_DS_P
      PARAMETER (WISDOM_DS_P = 13)

      INTEGER MAX_WISDOMDSET_P
      PARAMETER (MAX_WISDOMDSET_P = 1)

      INTEGER WISDOM_MXSTRF
      PARAMETER (WISDOM_MXSTRF=MAX_WISDOMDSET_P*4)

      INTEGER WISDOMDD_VN_P,WISDOMFF_VN_P,WISDOMU_VN_P,WISDOMV_VN_P
      INTEGER WISDOMHT_VN_P,WISDOMP_VN_P

      PARAMETER (WISDOMDD_VN_P = 1)
      PARAMETER (WISDOMFF_VN_P = 2)
      PARAMETER (WISDOMU_VN_P = 3)
      PARAMETER (WISDOMV_VN_P = 4)
      PARAMETER (WISDOMHT_VN_P = 16)
      PARAMETER (WISDOMP_VN_P = 35)

C     AGGREGATE COMPONENTS

      INTEGER MAX_DSET_P
      INTEGER MAX_DTYPE_P
      PARAMETER (MAX_DSET_P = MAX_SFCDSET_P + MAX_UAPTDSET_P +
     1           MAX_HYDRODSET_P + MAX_SATWDSET_P + MAX_SATSDSET_P + 
     2     MAX_SATRDSET_P + MAX_SNOWDSET_P + MAX_WISDOMDSET_P)

      PARAMETER (MAX_DTYPE_P = 1 + MAX_UAPTDSET_P + 1 + MAX_SATWDSET_P
     1      + MAX_SATSDSET_P + MAX_SATRDSET_P + MAX_SNOWDSET_P + 1)
