Skip to content

Commit cffd8a2

Browse files
committed
Update projections.jl
1 parent 4aa55c8 commit cffd8a2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/projections.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,10 @@ function map_to_grid(lon, lat, xshift, yshift)
3939
x[:,j] .+= xshift * (x[2, j] - x[1, j])
4040
end
4141

42+
# center the x-grid
43+
for j = 1:size(lon,2)
44+
x[:, j] .+= - dlon_m[:, j].* (lon[end, j] - lon[1, j])/2
45+
end
46+
4247
return x, y
4348
end

0 commit comments

Comments
 (0)