public static double ioa(double[] obs, double[] sim, double pow, double missingValue) {
        sameArrayLen(obs, sim);
        int steps = sim.length;
        double sum_obs = 0;

        double len = 0.0;

        for (int i = 0; i < steps; i++) {
            if (obs[i] > missingValue) {
                sum_obs += obs[i];
                len++;
            }
        }

        // calculating mean values for both data sets
        double mean_obs = sum_obs / len;

        // calculating absolute squared sum of deviations from verification mean
        double td_vd = 0;
        double abs_sqDevi = 0;
        for (int i = 0; i < steps; i++) {
            if (obs[i] > missingValue) {
                td_vd += (Math.pow((Math.abs(obs[i] - sim[i])), pow));
                abs_sqDevi += Math.pow(Math.abs(sim[i] - mean_obs) + Math.abs(obs[i] - mean_obs), pow);
            }
        }
        return 1.0 - (td_vd / abs_sqDevi);
    }