From a52bf994415cceb4bee9dd572d3b022cf08e8109 Mon Sep 17 00:00:00 2001 From: Navid Constantinou Date: Thu, 28 Jan 2021 17:04:18 +1100 Subject: [PATCH] use FourierFlows.on_grid() --- src/barotropicqgql.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/barotropicqgql.jl b/src/barotropicqgql.jl index 2b89d2c5..5d03edc2 100644 --- a/src/barotropicqgql.jl +++ b/src/barotropicqgql.jl @@ -98,10 +98,9 @@ end Constructor for `params` that accepts a generating function for the topographic PV, `eta`. """ function Params(grid::AbstractGrid{T, A}, β, eta::Function, μ, ν, nν, calcF) where {T, A} - x, y = gridpoints(grid) - eta_on_grid = A([eta(grid.x[i], grid.y[j]) for i=1:grid.nx, j=1:grid.ny]) + eta_on_grid = FourierFlows.on_grid(eta, grid) etah_on_grid = rfft(eta_on_grid) - Params(β, eta_on_grid, etah_on_grid, μ, ν, nν, calcF) + Params(β, A(eta_on_grid), A(etah_on_grid), μ, ν, nν, calcF) end