pro annulv1,crl2,dt122,dt1240,P0=p0 crn=2075 & crl1=180.000 i1=0 & i2=14 & di=1 ; 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] crnt=INDGEN(15)+crn ;dt121=fltarr(15) dt1220=fltarr(15) dt122=fltarr(15) ; dt124=fltarr(15) dt1240=fltarr(15) ; ; 1 Xuepu print,'Start Xuepu' ;SPAWN,'date' ;for ii=i1,i2,di do begin ; crni=crnt(ii) ; ; 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 ; dt121(ii)=dt1 ;endfor ; 2 ctimes print,'start Phil' ;SPAWN,'date' for ii=i1,i2,di do begin crni=crnt(ii) 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,date10 time_crncl0_ctimes,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,date20 time_crncl0_ctimes,scrncl0,date2 fdoy_date,date10,fdoy10,year10 fdoy_date,date20,fdoy20,year20 dt0=fdoy20-fdoy10 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 begin fdoy10=fdoy10+366 fdoy1=fdoy1+366 endif else begin fdoy10=fdoy10+365 fdoy1=fdoy1+365 endelse end dt lt -54: begin md=year1 MOD 4 if md eq 0 then begin fdoy20=fdoy20+366 fdoy2=fdoy2+366 endif else begin fdoy20=fdoy20+365 fdoy2=fdoy2+365 endelse end else: print,' ' ENDCASE dt20=fdoy20-fdoy10 dt2=fdoy2-fdoy1 dt1220(ii)=dt20 dt122(ii)=dt2 endfor ; 4 Roger and improved Roger print,'start Roger' ;spawn,'date' ; Specify snp rseve_xyzvxvyvz0701,rse,ve,rse366,ve366 vs=fltarr(366) & snp=vs sdp=25.38 for i=0,365 do begin vs(i)=rse366(i)*2*!pi/sdp ;in AU/day ; snp(i)=sdp+(ve(i)*27.2753)/vs(i) snp(i)=sdp/(1-ve366(i)/vs(i)) ;snp=sdp+Ve*snp/Vs endfor for ii=i1,i2,di do begin crni=crnt(ii) 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 ; dmy2doy,year1,month1,day1,doy1 ; snr1=snp(doy1) ;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 ; dmy2doy,year2,month2,day2,doy2 ; snr2=snp(doy2) ; ;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 ; snr=0.5*(snr1+snr2) ; print,'doy1,doy2,snr1,snr2,snr:',doy1,doy2,snr1,snr2,snr ;dct4=(1-crl2/360.)*snr2 - (1-crl1/360.)*snr1 dct=(1-crl2/360.)-(1-crl1/360.) ; dt124(ii)=dct*snr dt1240(ii)=dct*27.2753 endfor end