pro test14_0625,crn,i1,i2,di,dt121,dt122,dt123,dt124,dt1240,COE=coe,P0=p0,CS3=cs3 if n_params( ) lt 1 then begin print,'test14_0625,crn,i1,i2,di,dt121,dt122,dt123,dt124,dt1240,coe=,/p0,/cs3' print,'crn=2075 & crl1=150.550 & crl2=190.505 & coe=1.180' print,'i1=0 & i2=14 & di=1' return endif ; crn=2075 crl1=150.550 & crl2=190.505 ; Specify snp0 snp0=[27.3400,27.3400,27.3300,27.2800,27.2400,27.2100,27.2000,27.2100,27.2300,27.2700,27.2900,27.3000,27.3200,27.3300] ; Specify snp x=[-0.554224354,-0.870084408,-0.996202661,-0.900463399,-0.615854357,-0.204564225,0.264551346,0.663428967,0.927203582,0.999533773,0.861360632,0.523007220,0.078724050] y=[0.750954032,0.435821632,0.010211775,-0.402947513,-0.730959329,-0.907937549,-0.895938146,-0.699028797,-0.359352296,0.055026800,0.458410238,0.722291855,0.903976706] z=[0.325489267,0.188873305,0.004362431,-0.174751924,-0.316952531,-0.395015752,-0.388470635,-0.303102172,-0.155839469,0.023809651,0.198692451,0.334774805,0.391868610] vx=[-14501990,-8461598,-390478,7330288,13365541,16625663,16323805,12717728,6473851,-1229256,-8840223,-14858646,-17428145] vy=[-8940977,-13941116,-15838038,-14208715,-9663982,-3222311,4068588,10283760,14461160,15704543,13636065,8328533,1238079] vz=[-3875321,-6043040,-6865462,-6159132,-4188865,-1396186,1764642,4459151,6270202,6809246,5912498,3611514,537627] vx=vx*1.0E-9 vy=vy*1.0E-9 vz=vz*1.0E-9 rse=fltarr(14) & ve=rse & vs=rse & snp=rse sdp=25.38 for i=0,12 do begin rse(i)=SQRT(x(i)*x(i)+y(i)*y(i)+z(i)*z(i)) ve(i)=SQRT(vx(i)*vx(i)+vy(i)*vy(i)+vz(i)*vz(i)) vs(i)=rse(i)*2*!pi/sdp ;in AU/day ;ve=2*!pi*rse/365. ; snp(i)=sdp+(ve(i)*27.2753)/vs(i) snp(i)=sdp/(1-ve(i)/vs(i)) endfor ;snpc0=[27.3341,27.3185,27.2931,27.2658,27.2416,27.2307,27.2203,27.2275,27.2452,27.2702,27.2973,27.3060,27.3353,27.3400] snp(13)=snp(0) print,'rse:',rse print,'ve:',ve print,'vs:',vs print,'snp:',snp snp(11)=0.5*(snp(10)+snp(12)) ; Calculated snp(11) is wrong! plot,snp0,yrange=[25,30],line=1 oplot,snp crnt=INDGEN(15)+crn dt121=fltarr(15) dt122=fltarr(15) dt123=fltarr(15) dt124=fltarr(15) dt1240=fltarr(15) for ii=i1,i2,di do begin crni=crnt(ii) ; 1 Xuepu print,'crn,crl:',crni,crl1 date_crncrlz1,crni,crl1,date1 print,'crn,crl:',crni,crl2 date_crncrlz1,crni,crl2,date2 fdoy_date,date1,fdoy1,year1 fdoy_date,date2,fdoy2,year2 dt=fdoy2-fdoy1 CASE 1 OF dt gt 54: begin md=year2 MOD 4 if md eq 0 then fdoy1=fdoy1+366 else fdoy1=fdoy1+365 end dt lt -54: begin md=year1 MOD 4 if md eq 0 then fdoy2=fdoy2+366 else fdoy2=fdoy2+365 end else: print,' ' ENDCASE dt1=fdoy2-fdoy1 ; print,'z1-dt1;',dt1 dt121(ii)=dt1 ; print,date1,' ',date2 ; print,'z1-dt1:',dt1 ; 2 times CASE 1 OF crl1 lt 10: scrl1='00'+STRTRIM(crl1,2) crl1 lt 100: scrl1='0'+STRTRIM(crl1,2) else: scrl1=STRTRIM(crl1,2) ENDCASE scrncl0=STRTRIM(crni,2)+':'+scrl1 time_crncl0,scrncl0,date1 CASE 1 OF crl2 lt 10: scrl2='00'+STRTRIM(crl2,2) crl2 lt 100: scrl2='0'+STRTRIM(crl2,2) else: scrl2=STRTRIM(crl2,2) ENDCASE scrncl0=STRTRIM(crni,2)+':'+scrl2 time_crncl0,scrncl0,date2 fdoy_date,date1,fdoy1,year1 fdoy_date,date2,fdoy2,year2 dt=fdoy2-fdoy1 CASE 1 OF dt gt 54: begin md=year2 MOD 4 if md eq 0 then fdoy1=fdoy1+366 else fdoy1=fdoy1+365 end dt lt -54: begin md=year1 MOD 4 if md eq 0 then fdoy2=fdoy2+366 else fdoy2=fdoy2+365 end else: print,' ' ENDCASE dt2=fdoy2-fdoy1 ;print,dt2 dt122(ii)=dt2 ; print,date1,' ',date2 ; print,'z2-dt2:',dt2 ; 4 Roger and improved Roger CASE 1 OF crl1 lt 10: scrl1='00'+STRTRIM(crl1,2) crl1 lt 100: scrl1='0'+STRTRIM(crl1,2) else: scrl1=STRTRIM(crl1,2) ENDCASE scrncl0=STRTRIM(crni,2)+':'+scrl1 time_crncl0,scrncl0,date1 year_sec_date,date1,year1,month1,day1,hh,mm,ss print,'year1,month1,day1:',year1,month1,day1 if keyword_set(p0) then begin CASE 1 OF month1 eq 1 AND day1 gt 15: snr1=snp0(0) month1 eq 2: snr1=snp0(1) month1 eq 3: snr1=snp0(2) month1 eq 4: snr1=snp0(3) month1 eq 5: snr1=snp0(4) month1 eq 6: snr1=snp0(5) month1 eq 7: snr1=snp0(6) month1 eq 8 AND day1 gt 15: snr1=snp0(7) month1 eq 8 AND day1 le 15: snr1=snp0(8) month1 eq 9: snr1=snp0(9) month1 eq 10: snr1=snp0(10) month1 eq 11: snr1=snp0(11) month1 eq 12: snr1=snp0(12) month1 eq 1 AND day1 le 15: snr1=snp0(13) ENDCASE endif else begin CASE 1 OF month1 eq 1 AND day1 gt 15: snr1=snp(0) month1 eq 2: snr1=snp(1) month1 eq 3: snr1=snp(2) month1 eq 4: snr1=snp(3) month1 eq 5: snr1=snp(4) month1 eq 6: snr1=snp(5) month1 eq 7: snr1=snp(6) month1 eq 8 AND day1 gt 15: snr1=snp(7) month1 eq 8 AND day1 le 15: snr1=snp(8) month1 eq 9: snr1=snp(9) month1 eq 10: snr1=snp(10) month1 eq 11: snr1=snp(11) month1 eq 12: snr1=snp(12) month1 eq 1 AND day1 le 15: snr1=snp(13) ENDCASE endelse CASE 1 OF crl2 lt 10: scrl2='00'+STRTRIM(crl2,2) crl2 lt 100: scrl2='0'+STRTRIM(crl2,2) else: scrl2=STRTRIM(crl2,2) ENDCASE scrncl0=STRTRIM(crni,2)+':'+scrl2 time_crncl0,scrncl0,date2 year_sec_date,date2,year2,month2,day2,hh,mm,ss print,'year2,month2,day2:',year2,month2,day2 if keyword_set(p0) then begin CASE 1 OF month2 eq 1 AND day2 gt 15: snr2=snp0(0) month2 eq 2: snr2=snp0(1) month2 eq 3: snr2=snp0(2) month2 eq 4: snr2=snp0(3) month2 eq 5: snr2=snp0(4) month2 eq 6: snr2=snp0(5) month2 eq 7: snr2=snp0(6) month2 eq 8 AND day2 gt 15: snr2=snp0(7) month2 eq 8 AND day2 le 15: snr2=snp0(8) month2 eq 9: snr2=snp0(9) month2 eq 10: snr2=snp0(10) month2 eq 11: snr2=snp0(11) month2 eq 12: snr2=snp0(12) month2 eq 1 AND day2 le 15: snr2=snp0(13) ENDCASE endif else begin CASE 1 OF month2 eq 1 AND day2 gt 15: snr2=snp(0) month2 eq 2: snr2=snp(1) month2 eq 3: snr2=snp(2) month2 eq 4: snr2=snp(3) month2 eq 5: snr2=snp(4) month2 eq 6: snr2=snp(5) month2 eq 7: snr2=snp(6) month2 eq 8 AND day2 gt 15: snr2=snp(7) month2 eq 8 AND day2 le 15: snr2=snp(8) month2 eq 9: snr2=snp(9) month2 eq 10: snr2=snp(10) month2 eq 11: snr2=snp(11) month2 eq 12: snr2=snp(12) month2 eq 1 AND day2 le 15: snr2=snp(13) ENDCASE endelse print,'month1,month2,snr1,snr2:',month1,month2,snr1,snr2 if month1 ne month2 then snr=0.5*(snr1+snr2) else snr=snr1 dct=(1-crl2/360.)-(1-crl1/360.) ; dct4=(1-crl2/360.)*snr2 - (1-crl1/360.)*snr1 dt124(ii)=dct*snr dt1240(ii)=dct*27.2753 if keyword_set(cs3) then begin ; 3 suninfo print,'z3-crn,crl:',crni,crl1 date_crncrlz3,crni,crl1,date1 print,'z3-crn,crl:',crni,crl2 date_crncrlz3,crni,crl2,date2 fdoy_date,date1,fdoy1,year1 fdoy_date,date2,fdoy2,year2 dt=fdoy2-fdoy1 CASE 1 OF dt gt 54: begin md=year2 MOD 4 if md eq 0 then fdoy1=fdoy1+366 else fdoy1=fdoy1+365 end dt lt -54: begin md=year1 MOD 4 if md eq 0 then fdoy2=fdoy2+366 else fdoy2=fdoy2+365 end else: print, ' ' ENDCASE ; print,date1,' ',date2 dt3=fdoy2-fdoy1 dt123(ii)=dt3 ; print,'z3-dt3:',dt3 endif endfor if keyword_set(p0) then plt0625,dt121,dt122,dt123,dt124,dt1240,/p0 $ else plt0625,dt121,dt122,dt123,dt124,dt1240 end