      SUBROUTINE routs(NHW,NHE,NVN,NVS)
C
C     THIS SUBROUTINE READS SOIL CHECKPOINT FILES TO
C     RE-INITILIAZE THE MODEL FROM A SELECTED DATE IN AN EARLIER RUN
C
      include "parameters.h"
      include "filec.h"
      include "files.h"
      include "blkc.h"
      include "blk2a.h"
      include "blk2b.h"
      include "blk2c.h"
      include "blk5.h"
      include "blk8a.h"
      include "blk8b.h"
      include "blk11a.h"
      include "blk11b.h"
      include "blk13a.h"
      include "blk13b.h"
      include "blk13c.h"
      include "blk16.h"
      include "blk18a.h"
      include "blk18b.h"
      include "blk19a.h"
      include "blk19b.h"
      include "blk19c.h"
      include "blk19d.h"
      CHARACTER*16 DATA(30),DATAC(30,250,250),DATAP(JP,JY,JX)
     2,DATAM(JP,JY,JX),DATAX(JP),DATAY(JP),DATAZ(JP,JY,JX)
     3,OUTS(10),OUTP(10),OUTFILS(10,JY,JX),OUTFILP(10,JP,JY,JX)
      CHARACTER*3 CHOICE(102,20)
      CHARACTER*8 CDATE
      REWIND(21)
      REWIND(22)
      REWIND(23)
      REWIND(24)
      REWIND(25)
C
C     INITIALIZE MANAGEMENT ARRAYS
C
      IF(IMNG.EQ.0)THEN
      DO 7980 NX=NHW,NHE
      DO 7975 NY=NVN,NVS
      IFLGS(NY,NX)=1
      DO 7990 M=1,366
      ITILL(M,NY,NX)=0
      DCORP(M,NY,NX)=0.0
      DO 7985 N=1,24
      RRIG(N,M,NY,NX)=0.0
7985  CONTINUE
      DO 7995 N=1,20
      FERT(N,M,NY,NX)=0.0
7995  CONTINUE
7990  CONTINUE
7975  CONTINUE
7980  CONTINUE
      ENDIF
C
C     READ CHECKPOINT FILES UP TO DATE OF RE-INITIALIZATION
C
8000  READ(21,90,END=1001)IDATE,IYR,CRAIN,TSEDOU
     2,HEATIN,OXYGIN,TORGF,TORGN,TORGP,CO2GIN,ZN2GIN,VOLWOU,CEVAP
     3,CRUN,HEATOU,OXYGOU,TCOU,TZOU,TPOU,TZIN,TPIN,XCSN,XZSN,XPSN 
      DO 9995 NX=NHW,NHE
      DO 9990 NY=NVN,NVS
      READ(21,95)IDATE,IYR,(TDTPX(NY,NX,N),N=1,12)
     2,(TDTPN(NY,NX,N),N=1,12),(TDRAD(NY,NX,N),N=1,12)
     3,(TDWND(NY,NX,N),N=1,12),(TDHUM(NY,NX,N),N=1,12)
     4,(TDPRC(NY,NX,N),N=1,12),(TDIRI(NY,NX,N),N=1,12)
     5,(TDCO2(NY,NX,N),N=1,12),(TDCN4(NY,NX,N),N=1,12)
     6,(TDCNO(NY,NX,N),N=1,12)
      READ(21,93)IDATE,IYR,IFLGT(NY,NX),IFNHB(NY,NX),IDTBL(NY,NX)
     2,IFNOB(NY,NX),IFPOB(NY,NX),IUTYP(NY,NX) 
     3,ZT(NY,NX),TFLWC(NY,NX),TSED(NY,NX) 
     3,ZS(NY,NX),THRMC(NY,NX),THRMG(NY,NX),TCNET(NY,NX),TVOLWC(NY,NX) 
     4,VOLWG(NY,NX),URAIN(NY,NX),ARLFC(NY,NX),ARSTC(NY,NX),PPT(NY,NX)
     5,VOLWD(NY,NX),ZM(NY,NX),UCO2G(NY,NX),UCH4G(NY,NX),UOXYG(NY,NX)
     6,UN2GG(NY,NX),UN2OG(NY,NX),UNH3G(NY,NX),UN2GS(NY,NX)
     7,UCO2F(NY,NX),UCH4F(NY,NX),UOXYF(NY,NX),UN2OF(NY,NX)
     8,UNH3F(NY,NX),UPO4F(NY,NX),UORGF(NY,NX),UFERTN(NY,NX)
     9,UFERTP(NY,NX),UVOLO(NY,NX),UEVAP(NY,NX),URUN(NY,NX)
     1,UDOCQ(NY,NX),UDOCD(NY,NX),UDONQ(NY,NX),UDOND(NY,NX)
     2,UDOPQ(NY,NX),UDOPD(NY,NX),UDICQ(NY,NX),UDICD(NY,NX)
     3,UDINQ(NY,NX),UDIND(NY,NX),UDIPQ(NY,NX),UDIPD(NY,NX)
     4,UXCSN(NY,NX),UXZSN(NY,NX),UXPSN(NY,NX),UCOP(NY,NX)
     5,UDRAIN(NY,NX),ZDRAIN(NY,NX),PDRAIN(NY,NX),DPNH4(NY,NX)
     6,DPNO3(NY,NX),DPPO4(NY,NX),DETS(NY,NX),DETE(NY,NX)
     7,CER(NY,NX),XER(NY,NX),USEDOU(NY,NX),ROWN(NY,NX),ROWO(NY,NX)
     8,ROWP(NY,NX),DTBLZ(NY,NX),DTBLD(NY,NX),TNBP(NY,NX),VOLR(NY,NX)
     9,SED(NY,NX),TGPP(NY,NX),TRAU(NY,NX),TNPP(NY,NX),THRE(NY,NX)
     1,TCAN(NY,NX),TLEC(NY,NX),TSHC(NY,NX),DYLN(NY,NX),DYLX(NY,NX) 
     2,DTBLX(NY,NX),DTBLY(NY,NX),(RC0(K,NY,NX),K=0,5)
     3,VOLSS(NY,NX),VOLWS(NY,NX),VOLIS(NY,NX),VOLS(NY,NX)
     4,DPTHS(NY,NX),ENGYP(NY,NX)
      READ(21,91)IDATE,IYR,(VOLSSL(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(VOLISL(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(VOLWSL(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(VOLSL(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(DENSS(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(DLYRS(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(VHCPW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(TKW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(TCW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(CO2W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(CH4W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(OXYW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZNGW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZN2W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZN4W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZN3W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZNOW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(Z1PW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZHPW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(FHOL(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(DLYR(3,L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CDPTH(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CDPTHZ(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(BKDSI(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(BKDS(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CORGC(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(POROS(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(FC(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(WP(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(SCNV(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(SCNH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(SAND(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(SILT(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CLAY(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VOLW(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VOLWX(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VOLI(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VOLP(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VOLA(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VOLY(L,NY,NX),L=0,NLI(NY,NX))
C     READ(21,91)IDATE,IYR,(GKC4(L,NY,NX),L=1,NLI(NY,NX))
C     READ(21,91)IDATE,IYR,(GKCH(L,NY,NX),L=1,NLI(NY,NX))
C     READ(21,91)IDATE,IYR,(GKCA(L,NY,NX),L=1,NLI(NY,NX))
C     READ(21,91)IDATE,IYR,(GKCM(L,NY,NX),L=1,NLI(NY,NX))
C     READ(21,91)IDATE,IYR,(GKCN(L,NY,NX),L=1,NLI(NY,NX))
C     READ(21,91)IDATE,IYR,(GKCK(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XCEC(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XAEC(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(TCS(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(TKS(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VHCP(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VHCM(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CO2G(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CO2S(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CO2SH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CH4G(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CH4S(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CH4SH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ROXYF(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RCO2F(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ROXYL(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RCH4F(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RCH4L(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(H2GG(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(H2GS(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(OXYG(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(OXYS(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(OXYSH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ROXYX(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RNH4X(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RNO3X(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RNO2X(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RN2OX(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RPO4X(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RP14X(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RNHBX(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RN3BX(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RN2BX(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RPOBX(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RP1BX(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,95)IDATE,IYR,((ROQCX(K,L,NY,NX),L=0,NLI(NY,NX)),K=0,4)
      READ(21,95)IDATE,IYR,((ROQAX(K,L,NY,NX),L=0,NLI(NY,NX)),K=0,4)
      READ(21,91)IDATE,IYR,(VOLWH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VOLIH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VOLAH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(RTDNT(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZL(L,NY,NX),L=0,JC)
      READ(21,91)IDATE,IYR,(ARLFT(L,NY,NX),L=1,JC)
      READ(21,91)IDATE,IYR,(ARSTT(L,NY,NX),L=1,JC)
      READ(21,91)IDATE,IYR,(WGLFT(L,NY,NX),L=1,JC)
      READ(21,91)IDATE,IYR,(VLNH4(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VLNHB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VLNO3(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VLNOB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VLPO4(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(VLPOB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XN4(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XNB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XOH0(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XOH1(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XOH2(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XH1P(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XH2P(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XOH0B(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XOH1B(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XOH2B(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XH1PB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XH2PB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PALPO(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PFEPO(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PCAPD(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PCAPH(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PCAPM(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PALPB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PFEPB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PCPDB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PCPHB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PCPMB(L,NY,NX),L=0,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(CION(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZAL(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFE(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZHY(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA(L,NY,NX),L=1,NLI(NY,NX))
      IF(ISALTG.NE.0)THEN
      READ(21,91)IDATE,IYR,(ZALW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZFEW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZHYW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZCAW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZMGW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZNAW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZKAW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZOHW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZSO4W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZCLW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZCO3W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZHCO3W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZALH1W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZALH2W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZALH3W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZALH4W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZALSW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZFEH1W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZFEH2W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZFEH3W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZFEH4W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZFESW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZCAOW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZCACW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZCAHW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZCASW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZMGOW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZMGCW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZMGHW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZMGSW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZNACW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZNASW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZKASW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(H0PO4W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(H3PO4W(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZFE1PW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZFE2PW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZCA0PW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZCA1PW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZCA2PW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZMG1PW(L,NY,NX),L=1,JS)
      READ(21,91)IDATE,IYR,(ZMG(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZNA(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZKA(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZOH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZSO4(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCL(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCO3(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZHCO3(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALOH1(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALOH2(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALOH3(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALOH4(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALS(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFEOH1(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFEOH2(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFEOH3(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFEOH4(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFES(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCAO(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCAC(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCAH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCAS(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMGO(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMGC(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMGH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMGS(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZNAC(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZNAS(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZKAS(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(H0PO4(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(H3PO4(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFE1P(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFE2P(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA0P(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA1P(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA2P(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMG1P(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(H0POB(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(H3POB(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFE1PB(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFE2PB(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA0PB(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA1PB(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA2PB(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMG1PB(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFEH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZHYH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCCH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMGH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZNAH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZKAH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZOHH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZSO4H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCLH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCO3H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZHCO3H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALO1H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALO2H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALO3H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALO4H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZALSH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFEO1H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFEO2H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFEO3H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFEO4H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFESH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCAOH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCACH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCAHH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCASH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMGOH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMGCH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMGHH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMGSH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZNACH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZNASH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZKASH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(H0PO4H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(H3PO4H(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFE1PH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFE2PH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA0PH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA1PH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA2PH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMG1PH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(H0POBH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(H3POBH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFE1BH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZFE2BH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA0BH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA1BH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZCA2BH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(ZMG1BH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XHY(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XAL(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XFE(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XCA(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XMG(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XNA(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(XKA(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PALOH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PFEOH(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PCACO(L,NY,NX),L=1,NLI(NY,NX))
      READ(21,91)IDATE,IYR,(PCASO(L,NY,NX),L=1,NLI(NY,NX))
      ENDIF
      DO 9985 K=0,5
      DO 9985 N=1,7
      READ(22,91)IDATE,IYR,(ROXYS(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RVMX4(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RVMX3(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RVMX2(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RVMX1(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RVMB4(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RVMB3(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RVMB2(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RINHO(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RINOO(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RIPOO(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RINHB(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RINOB(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(RIPBO(N,K,L,NY,NX),L=0,NLI(NY,NX))
      IF(K.LE.4)THEN
      READ(22,91)IDATE,IYR,(ROQCS(N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ROQAS(N,K,L,NY,NX),L=0,NLI(NY,NX))
      ENDIF
      READ(22,91)IDATE,IYR,RINHOR(N,K,NY,NX)
      READ(22,91)IDATE,IYR,RINOOR(N,K,NY,NX)
      READ(22,91)IDATE,IYR,RIPOOR(N,K,NY,NX)
      DO 9985 M=1,3
      READ(22,91)IDATE,IYR,(OMC(M,N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OMN(M,N,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OMP(M,N,K,L,NY,NX),L=0,NLI(NY,NX))
9985  CONTINUE
      DO 9980 K=0,4
      DO 9975 M=1,2
      READ(22,91)IDATE,IYR,(ORC(M,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ORN(M,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ORP(M,K,L,NY,NX),L=0,NLI(NY,NX))
9975  CONTINUE
      READ(22,91)IDATE,IYR,(OQC(K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OQN(K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OQP(K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OQA(K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OQCH(K,L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OQNH(K,L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OQPH(K,L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OQAH(K,L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OHC(K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OHN(K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OHP(K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OHA(K,L,NY,NX),L=0,NLI(NY,NX))
      DO 9970 M=1,4
      READ(22,91)IDATE,IYR,(OSC(M,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OSA(M,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OSN(M,K,L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(OSP(M,K,L,NY,NX),L=0,NLI(NY,NX))
9970  CONTINUE
9980  CONTINUE
      READ(22,91)IDATE,IYR,(RVMXC(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ORGC(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ORGR(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH4FA(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH3FA(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNHUFA(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNO3FA(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH4FB(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH3FB(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNHUFB(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNO3FB(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(Z2GG(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(Z2GS(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(Z2GSH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(Z2OG(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(Z2OS(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(Z2OSH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH3G(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH4S(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH4SH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH3S(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH3SH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNO3S(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNO3SH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNO2S(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNO2SH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(H1PO4(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(H2PO4(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(H1PO4H(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(H2PO4H(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH4B(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH4BH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH3B(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNH3BH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNO3B(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNO3BH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNO2B(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNO2BH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(H1POB(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(H2POB(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(H1POBH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(H2POBH(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(WDNHB(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(DPNHB(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(WDNOB(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(DPNOB(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(WDPOB(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(DPPOB(L,NY,NX),L=1,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNHUI(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNHU0(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNFNI(L,NY,NX),L=0,NLI(NY,NX))
      READ(22,91)IDATE,IYR,(ZNFN0(L,NY,NX),L=0,NLI(NY,NX))
9990  CONTINUE
9995  CONTINUE
      IF(IDATE.LT.IDAYR.OR.IYR.LT.IYRR)THEN
      GO TO 8000
      ELSEIF(IDATE.GE.IDAYR.AND.IYR.EQ.IYRR)THEN
      IDAYR=IDATE
      ISTART=IDATE+1
      GO TO 1000
      ENDIF
1001  CONTINUE
      IDAYR=IDATE
      ISTART=IDATE+1
      IYR=IYRR
      DATA(20)='NO'
      CALL STARTS(NHW,NHE,NVN,NVS)
      GO TO 1000
1000  RETURN
90    FORMAT(2I4,15E17.8E3,/,15E17.8E3,/,15E17.8E3
     2,/,15E17.8E3,/,15E17.8E3,/,15E17.8E3)
91    FORMAT(2I4,21E17.8E3)
92    FORMAT(2I4,15E17.8E3,/,15E17.8E3,/,15E17.8E3
     2,/,15E17.8E3,/,15E17.8E3,/,15E17.8E3)
93    FORMAT(8I4,15E17.8E3,/,15E17.8E3,/,15E17.8E3,/,15E17.8E3
     2,/,15E17.8E3,/,15E17.8E3,/,15E17.8E3,/,15E17.8E3,/,15E17.8E3)
95    FORMAT(2I4,15E17.8E3,/,15E17.8E3,/,15E17.8E3,/,15E17.8E3
     2,/,15E17.8E3,/,15E17.8E3,/,15E17.8E3,/,15E17.8E3)
      RETURN
      END
