C+ C NAME: C program ashi_img_present C PURPOSE: C To input the processed ASHI image files and present them, including differences, in different formats. C CALLING SEQUENCE: C ./ashi_img_present C INPUTS: C C FUNCTIONS/SUBROUTINES: C ashi_img C read_grd_image C write_p_grd_image C C MODIFICATION HISTORY: C October 2023, Bernard Jackson (UCSD) C- program ashi_img_present parameter(NOBS = 4591) ! Potential Number of valid images parameter(NXY = 2048) ! Maximum number of x or y values in each input grd image parameter(ihead = 5) ! # of lines in the GRD file header parameter(NRA = 3600) ! size in RA of images parameter(NDEC = 1800) ! size in Dec of images parameter(NIMG = 100) ! largest number of possible input images character cpfileii*47 /'./ASHI_grd_files/ASHI_processed_img_0000e.grd '/ ! Location and name of an input file if there is one character cpfilehii*47 /'./ASHI_grd_files/ASHI_processed_img_0000h.grd '/ ! Location and name of an input heliospheric input file character cpfilei(NIMG)*47 character crfileoo*47 /'./ASHI_grd_files/ASHI_reduced_img_0000e.grd '/ ! Location and name of one or more pro output files character crfilehoo*47 /'./ASHI_grd_files/ASHI_reduced_img_0000h.grd '/ ! Location and name of one or more pro output files character crfileo(NIMG)*47 character cdfiledo*47 /'./ASHI_grd_files/ASHI_differenced_img_0000e.grd'/ ! Location and name of one or more pro output files character cdfilehdo*47 /'./ASHI_grd_files/ASHI_differenced_img_0000h.grd'/ ! Location and name of one or more pro output files character cdfileo(NIMG)*47 character cimghead(ihead)*9 ! Grd file 5 line header as outoput character cimagehd*9 ! Grd file 5 line header as outoput real aimage (NXY,NXY,NIMG), ! input images to use & aimageout (NXY,NXY,NIMG), ! output images & aimagedif (NXY,NXY,NIMG) ! output difference images real aimagexyrd(NXY,NXY), & aimagexyre(NXY,NXY), & aimagexyrb(NXY,NXY) print*, 'In Program ashi_img_present' IMGIN = 3 ! Number of input images Iinc = nint(4541. - 641.)/float(IMGIN) ifile = 641 cimghead(1) = 'DSAA' cimagehd =' ' write(cimagehd(1:4),'(I4)') NXY write(cimagehd(6:9),'(I4)') NXY cimghead(2) = cimagehd cimagehd =' ' write(cimagehd(1:1),'(I1)') 0 write(cimagehd(3:6),'(I4)') NXY cimghead(3) = cimagehd cimagehd =' ' write(cimagehd(1:1),'(I1)') 0 write(cimagehd(3:6),'(I4)') NXY cimghead(4) = cimagehd cimghead(5) = '20 1000 ' print*, cimghead(1) print*, cimghead(2) print*, cimghead(3) print*, cimghead(4) print*, cimghead(5) C ihelio = 1 ihelio = 0 if(ihelio.eq.0) then do I=1,IMGIN if(ifile.lt.1000) then write(cpfileii(38:40),'(I3)') ifile write(crfileoo(36:38),'(I3)') ifile write(cdfiledo(40:42),'(I3)') ifile else write(cpfileii(37:40),'(I4)') ifile write(crfileoo(35:38),'(I4)') ifile write(cdfiledo(39:42),'(I4)') ifile end if cpfilei(I) = cpfileii crfileo(I) = crfileoo cdfileo(I) = cdfiledo ifile = ifile + Iinc end do else do I=1,IMGIN if(ifile.lt.1000) then write(cpfilehii(38:40),'(I3)') ifile write(crfilehoo(36:38),'(I3)') ifile write(cdfilehdo(40:42),'(I3)') ifile else write(cpfilehii(37:40),'(I4)') ifile write(crfilehoo(35:38),'(I4)') ifile write(cdfilehdo(39:42),'(I4)') ifile end if cpfilei(I) = cpfileii crfileo(I) = crfileoo cdfileo(I) = cdfiledo ifile = ifile + Iinc end do end if do I=1,IMGIN write(*,'(A,I2,2A)') 'cpfilei',I,' is ', cpfilei(I) write(*,'(A,I2,2A)') 'crfileo',I,' is ', crfileo(I) write(*,'(A,I2,2A)') 'cdfileo',I,' is ', cdfileo(I) end do call ashi_img(iproc,IMGIN,cpfilei,crfileo,cdfileo,NXY,NXY,dmax,cimghead,aimage,aimageout,aimagedif) stop end