 
             for(mw = 0; mw < mwaves; mw++)
             {
+                maxcfl = max(maxcfl,fabs(s[mw])*dtdy);
+
                 I_speeds = I + (mwaves + mw)*zs;
                 speeds[I_speeds] = s[mw];
                 for(mq = 0; mq < meqn; mq++)


    int i,j; /* Used for (i,j) indexing in patches  */
    double dtdx, dtdy;
    double maxcfl, cfl;
    double wnorm2,dotr,dotl, wlimitr,r;
    double cqxx;
    double cqyy;


            for(mw = 0; mw < mwaves; mw++)
            {
                maxcfl = max(maxcfl,abs(s[mw]*dtdx));

                I_speeds = I + mw*zs;
                speeds[I_speeds] = s[mw];
                for(mq = 0; mq < meqn; mq++)
