Added boundary checks to the SMC input files for ww3_grid#6
Conversation
ukmo-ansaulter
left a comment
There was a problem hiding this comment.
Thanks Lewis,
I'm generally happy - although note that you've had to use EXIT(65) here rather than EXTCDE(65) in order to make the exit and error messaging work cleanly. If you could just summarize that reasoning in the comments, so we have it captured, then I'm good to approve.
Cheers
Andy
Hi Andy, Thanks for bringing this to my attention, the change was for an earlier practice with the code and has now been reverted back to EXTCDE instead of EXIT. This has been updated in the latest git commit. Best regards, Lewis. |
That looks good now Lewis, I'll approve |
9fbf2ca to
3ab0b0c
Compare
ukmo-ccbunney
left a comment
There was a problem hiding this comment.
Hi Lewis,
Looking at this, I wonder if we could make the error message slightly clearer.
It would also be nice to include ISEA so the user can see exactly which line caused the issue.
I think something like this would be better:
*** WAVEWATCH-III ERROR IN W3GRID
SMC CELL LONGITUDE RANGE OUTSIDE BASE GRID RANGE:
ISEA = XXX; IX = XXX:XXX; NX = XXX
and similarly for latitude.
This would require you to provide some extra parameters to the write statement, i.e. on line 4415:
WRITE (NDSE,1014) ISEA, IX, IX+IK-1, NX
to ensure they comply with the limits of the nameslist.
f5b3a19 to
0d721de
Compare
Added boundary checks to the SMC grid input files for ww3_grid, to ensure they comply with the limits of the nameslist.
Regrestion tests complete: