         double fx_0 = 1./8.;
         psipmax = -fx_0/(1.-fx_0)*psipmin;
         std::cout << "psi 1 is          "<<psipmax<<"\n";
-        dg::geo::CurvilinearGridX2d gX2d( generator, fx_0, 0., npsi, Npsi, 360, dg::DIR, dg::NEU);
+        dg::geo::CurvilinearGridX2d gX2d( generator, fx_0, 0., npsi, Npsi, 640, dg::DIR, dg::NEU);
         std::cout << "DONE! Generate X-point flux-aligned grid!\n";
         dg::Average<dg::HVec > avg_eta( gX2d.grid(), dg::coo2d::y);
         std::vector<dg::HVec> coordsX = gX2d.map();

            "Flux surface average of true Kappa curvature Dot Grad Psip");
        map1d.emplace_back( "X_gradPsip_fsa", X_gradPsip_fsa,
            "Flux surface average of |Grad Psip|");
    }

    ///////////////////Compute flux average////////////////////

    err = nc_redef(ncid);
    //////////////////////////////Finalize////////////////////////////////////
    err = nc_close(ncid);
    std::cout << "FILE CLOSED AND READY TO USE NOW!\n";
    std::cout << "Test accuracy of curvatures (values must be close to 0!)\n";
    std::array<dg::HVec, 3> bhat, curvB, curvK;
    dg::pushForward( bhat_.x(), bhat_.y(), bhat_.z(),
            bhat[0], bhat[1], bhat[2], grid3d);
