;load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl" ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/conDIVibuted.ncl" load "$NCARG_ROOT/lib/lingjian.ncl" begin fname = "EM.events.txt" str = asciiread(fname,-1,"string") tmp = asciiread(fname,-1,"float") NT = dimsizes(tmp) / 15 events = onedtond(tmp,(/NT,15/)) speed = events(:,1) range = events(:,5) ini_date = events(:,6) life = events(:,8) ; fname = "EM.events.zonal.scale.txt" ; scale = asciiread(fname,-1,"float") ; ; ; combine the results together ; str(0) = str(0) + " zonal scale" ; do i = 0 , NT - 1 ; str(i+1) = str(i+1) + " " + sprintf("%6.1f",scale(i)) ; end do ; ; fname = "EM.events.v2.txt" ; system("rm -rf " + fname) ; asciiwrite(fname,str) ; the final adjustment do i = 0 , NT - 1 ; propgate more than 50 deg at least if (.not. ismissing(events(i,5)) .and. events(i,5) .lt. 50) then events(i,:) = events@_FillValue end if ; speed is between 3 and 7 m/s if (.not. ismissing(events(i,1)) .and. (events(i,1) .le. 2 .or. events(i,1) .gt. 7)) then events(i,:) = events@_FillValue end if end do ; ; the gap for the initiation time must larger than 20 days, ; if not chose the one with largest amplitude do i = 0 , NT - 2 do j = i + 1, NT - 1 ;found two events that the termination and initiation gap is smaller than 5 days if (.not. ismissing(events(j,6)) .and. .not. ismissing(events(i,6)) .and. events(j,6) .lt. events(i,6) + 20) then ;put the weaker one as missing data if (events(j,2) .gt. events(i,2)) then events(i,:) = events@_FillValue else events(j,:) = events@_FillValue end if end if end do end do str_fnl = new(NT+1,string) str_fnl(0) = str(0) idx = 0 do i = 0 , NT - 1 if (.not. ismissing(events(i,0))) then str_fnl(idx+1) = str(i+1) idx = idx + 1 end if end do fname = "MJO.events.txt" system("rm -rf " + fname) asciiwrite(fname,str_fnl(0:idx)) end