$DEBUG PARAMETER (NMAX=1000, MMAX=97) ! DUNG LUONG MAU VA SO BIEN CUC DAI PARAMETER (NFILE=10,NYEAR=150,NMO=12) INTEGER NFIN2,MONY,NTERM,IDX(MMAX),NOW, NMON, IDXENSO CHARACTER *70 FIN1,FIN2(NFILE),FOUT,FRESHQ1,FRESHQ2 CHARACTER*70 FN,FHQ1,FHQ2,TIEUDE, FRESHQ3 CHARACTER TENBIEN(MMAX)*6, VARN(NFILE)*4 INTEGER VUNG,YEUTO REAL PRC COMMON /PRCCONST/ PRC NAMELIST /NFINP2/ NFIN2 1 /FINP/ FIN1,FIN2 2 /FOUTP/ FOUT 3 /MONTH/ MONY,NTERM,NOW, NMON ! NOW=1: THIS YEAR, =0 PREVIOUS YEAR 4 /VARNAME/ VARN !TENBIEN 5 /FRESULT/ FRESHQ1,FRESHQ2,FRESHQ3,VUNG,YEUTO 6 /PRCONST/ PRC 7 /ENSOCO/ IDXENSO 8 /EXTRA/ VUNG REAL X(1:NYEAR,0:NMO,1:NFILE),Y(1:NYEAR,0:NMO),XX(NYEAR,0:MMAX) INTEGER YMN,YMX,NMX, YMNENSO,YMXENSO, IDK(NMO) COMMON /FNAME/ FN,FHQ1,FHQ2,FRESHQ3,VUNG,YEUTO COMMON /MONXMONY/ MONY,NTERM,TIEUDE PARAMETER (YMNENSO=1868, YMXENSO=1999) INTEGER ENSO(YMNENSO:YMXENSO) DATA ENSO /1,-1, 0,-1,-1,-1,-1,-1, 0, 1, 0, 0, 1, 0, 0, 1 0, 0, 0,-1, 0, 1,-1, 0, 0,-1,-1, 0, 0, 1, 0, 2 0, 1, 0, 0, 1,-1, 1, 1,-1, 0,-1,-1,-1, 1, 0, 3 1, 0, 0,-1, 0, 1, 0, 0, 0,-1, 0,-1, 1, 0, 0, 4 0, 1, 1, 0, 0, 0, 0, 0, 0, 0,-1, 0, 1, 0,-1, 5 0,-1, 0, 0, 0, 0,-1, 0, 1, 0, 0,-1,-1,-1, 1, 6 0, 0, 0, 0, 0, 1,-1, 1, 0,-1, 0, 1,-1,-1, 1, 7 -1, 0,-1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 8 -1, 0, 0, 1, 0, 0, 0, 0, 0, 1,-1, 0/ !132 YEARS MONX=0 OPEN (1,FILE='INPUT_HQTB.TXT',STATUS='OLD') READ (1,PRCONST) READ (1,ENSOCO) ! READ IDXENSO: = 0 - NONE ENSO READ (1,NFINP2) ! = 1 - EL NINO READ (1,FINP) ! =-1 - LA NINA READ (1,FOUTP) ! =-999 - ALL READ (1,FRESULT) READ (1,MONTH) READ (1,VARNAME) WRITE(*,FRESULT) ! READ (1,EXTRA) ! WRITE(*,EXTRA) CLOSE(1) END