      subroutine subexmag4c(ayr,amn,ady,aut)
C...............................................................Dec 2023
C
C................................................Nov 2015
C Produce TEC-map in magnetic coordinated from GIM-TEC
C
C Extract JPL TEC map for maglat=-87.5,-85,...,85,87.5  (71 lines)
C                         maglon=0, 5, 10, ..., 355, 360 (0:72 columns)
C Input: <glatgrid1.txt> <glongrid1.txt> =geogr.coords. for mlat,mlon grids
C 
C
C
C ...............................................Jan. 2013
C extract-interpolate from JPL-TEC or UPC-TEC map 
C
	CHARACTER*2 AYR,AMN,ADY,AUT
	CHARACTER*1 fm
	DIMENSION glats(71,0:72),glons(71,0:72),itecm(71,0:72)
	common/BLMAG/glats,glons,itecm
C
  103	nn=1
  	fm='t'
  102	format(73(1X,I4))
C
C
C
C All Mlats for Local noon
  110	DO 100 ilat=1,71
      	DO ilon=0,72 
	glat=glats(ilat,ilon)
	glon=glons(ilat,ilon)
C
C
	call subinterp4c(fm,glat,glon,ayr,amn,ady,aut,res)
	itecm(ilat,ilon)=nint(res)
	   ENDDO
C	write(*,102) (itec(k),k=0,72)
C
  100	continue ! End cycle on ilat

C>	write(*,*) ' DAY =',ADY
	
C>	write(*,121) ayr,amn
  121	format(1X,A2,1X,A2)
c   	pause ' '
   23	RETURN
crem	stop
	end