Skip to content

Commit 544c60b

Browse files
committed
Warning and error message.
The warn message is appearing if Origin is defined. The error message is shown when the origin is set up wrongly. -> Since the error can be fixed easily I add also the solution: 1) Not defying origin; 2) Defyning origin correctly
1 parent f222ea4 commit 544c60b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Setup_geometry.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ function AddBox!(Phase, Temp, Grid::AbstractGeneralGrid; # requi
201201
Origin = (xlim[1], ylim[1], zlim[2]) # upper-left corner
202202
end
203203

204+
if Origin != nothing & T==McKenzie_subducting_slab
205+
@warn "McKenzie temperature field requires that Origin = [xmin,ymin,zmax] of the box."
206+
if Origin[1] != xlim[1] | Origin[2] != ylim[1] | Origin[3] != zlim[2]
207+
@error "Origin is not set up correctly. For fixing the problem Origin can be left blank or Origin = [xmin,ymin,zmax] of the box"
208+
end
209+
end
210+
204211
# Perform rotation of 3D coordinates:
205212
Xrot = X .- Origin[1];
206213
Yrot = Y .- Origin[2];

0 commit comments

Comments
 (0)