      program datngdc2im
C.....................................................................Jan 2023
C GIRO foF2 hmF2 scaled +m3000 (wz)
C produce result = (Xave(UT-30m)+Xave(ut+30m))/2
C
c	DIMENSION im(12)
	character*2 AMN,ADY,st,AMNI
	character*4 AYEAR
C
C
 101   write(*,*) ' Enter ST:'
	read(*,*) ST
	if (ST.eq.'00') STOP 
C
C+       write(*,*) ' Enter AYEAR:'
C+	read(*,*) AYEAR
      AYEAR='2023'
C     AYEAR='2022'
C
   1	continue
C-       write(*,*) ' Enter AMNi <00> STOP:' ! AMNi- inp_mn
C-	read(*,*) AMNI
C-	if (AMNI.eq.'00') goto 52
C
   2         write(*,*) ' Enter AMN ' !AMN - MN for cnt
  	read(*,*) AMN
	AMNI=AMN  !+++++++++
		if (AMNI.eq.'00') goto 101
C
        write(*,*) ' Enter idy1,idy2 stop:'
	read(*,*) idy1,idy2
C?	call blet2(idy1,ADY1)
C?	call subdatngdc(st,AYEAR,AMN,AMNI,ADY1)
C+++++++++++++++++++++++++
       DO 51 idy=idy1,idy2
C?	idy1=idy+1
C?	call blet2(idy1,ADY1)
C?	call subdatngdc(st,AYEAR,AMN,AMNI,ADY1)
	 call blet2(idy,ADY)
	    if ((st.eq.'wz').or.(st.eq.'at').or.(st.eq.'nc')) then          !1
	call subdatngdc2(st,AYEAR,AMN,AMNI,ADY,ifsum)
	if (st.eq.'at') then							   !2
	call subdatngdc1(st,AYEAR,AMN,AMNI,ADY,ifsum)
	endif											   !2
	                                        else		 !1
	call subdatngdc1(st,AYEAR,AMN,AMNI,ADY,ifsum)
                                              endif		 !1
	if (ifsum.eq.0) then								!3
	if ((st.eq.'wz').or.(st.eq.'at').or.(st.eq.'nc')) then				 !4
	call subdatngdc2(st,AYEAR,AMN,AMNI,ADY,ifsum)
	if (st.eq.'at') then								 !5
	call subdatngdc1(st,AYEAR,AMN,AMNI,ADY,ifsum)
	endif												 !5
	else												 !4
      call subdatngdc1(st,AYEAR,AMN,AMNI,ADY,ifsum)
	endif												 !5
	endif												 !3
C
C-	if (st.eq.'wz') then
C-	call subdatngdcm(st,AYEAR,AMN,AMNI,ADY)
C-	 endif
C

   51	CONTINUE
      goto 1
   52	 pause ' '
	STOP
	END