      program extvsmlat9
C..................................................................................Dec. 2018
C Extract Vs index at geogr. lats (~ 9 mlats) at ranges of glongs for IONEX -180:5:180
C     (1) mlat < -70
C     (2) mlat -70:-50
C     (3) mlat -50:-30
C     (4) mlat -30:-10
C     (5) mlat -10: 10
C     (6) mlat  10: 30
C     (7) mlat  30: 50
C     (8) mlat  50: 70
C     (9) mlat  >= 70
C Data : dip.txt (geogr. lats of mdip =0 deg. at geogr. longs -180:5: 180)
C Output: Vsp,% (positive),Vsn,% (negative),Vst,% (total) occurrence 0:23 UT hrs&daily mean
      dimension IM(12)
      CHARACTER*2 AYR,AMN
      DATA IM/31,28,31,30,31,30,31,31,30,31,30,31/
C
C Year cycle
C         
      DO 50 iyear=1994,2018
	iyr=iyear-(iyear/100)*100
	call blet2(iyr,AYR)
c	AYR=AYEAR(3,4)
c		read(ayr,*) year
c 	iyr=int(year)
          ryr=float(iyr)
	if(int(ryr/4.)*4.eq.iyr) THEN 
	ndnr=366
	im(2)=29
	                          ELSE
	ndnr=365
	im(2)=28
	ENDIF

C
      DO 51 imn=1,12
	call blet2(imn,AMN)
	IDYs=1
	IDYS2=im(imn)
	if ((iyear.eq.1994).and.(imn.eq.1)) idys=16
       call subprobjvs9(AYR,AMN,IDYS,IDYS2)
   51 CONTINUE
C
   50 CONTINUE
C
C output results
	pause ' '
	STOP
	END

c===============================================================================
