public static double nashSutcliffe(double[] obs, double[] sim, double pow, double missingValue) {
        sameArrayLen(obs, sim);
        int pre_size = sim.length;

        int steps = pre_size;
        double sum_vd = 0;

        double size = 0;
        for (int i = 0; i < obs.length; i++) {
            if (obs[i] > missingValue) {
                sum_vd += obs[i];
                size++;
            }
        }

        double mean_vd = sum_vd / size;

        /*
         * calculating mean pow deviations
         */
        double td_vd = 0;
        double vd_mean = 0;
        for (int i = 0; i < steps; i++) {
            td_vd += (Math.pow((Math.abs(obs[i] - sim[i])), pow));
            vd_mean += (Math.pow((Math.abs(obs[i] - mean_vd)), pow));
        }

        return 1 - (td_vd / vd_mean);
    }