Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDS: Array size mismatch? #1097

Closed
ukmo-ccbunney opened this issue Oct 13, 2023 · 5 comments · Fixed by #1098
Closed

NDS: Array size mismatch? #1097

ukmo-ccbunney opened this issue Oct 13, 2023 · 5 comments · Fixed by #1098
Assignees
Labels
bug Something isn't working

Comments

@ukmo-ccbunney
Copy link
Collaborator

I think there is a discrepancy between the size of the NDS variable (used to hold file unit numbers) defined in w3odatmd here as size 15:

TBPI0(2), TBPIN(2), NDS(15), OFILES(7)

and elsewhere as size 13, e.g.

INTEGER :: NDSF(-7:9), NDS(13), NTRACE(2), NDT(7:9), &

This is resulting in an array bounds mismatch in w3initmd:

NDS = MDS

MDS is of size 13 in this case and NDS is size 15.

@ukmo-ccbunney ukmo-ccbunney added the bug Something isn't working label Oct 13, 2023
@ukmo-ccbunney ukmo-ccbunney self-assigned this Oct 13, 2023
@ukmo-ccbunney
Copy link
Collaborator Author

I think this bug was introduced in #1089
W3ODATMD was updated to increase the size of NDS to 15, but MDS/NDS is still sized as 13 in the W3INIT parameter list and in ww3_shel.f90

@MatthewMasarik-NOAA
Copy link
Collaborator

Very nice catch, @ukmo-ccbunney. I see you self-assigned, may I ask if you're also working on a fix? I had many unexpected non-b4b's with matrix.comp for the next PR (#1083), I'm hoping resolving this may help with that.

@ukmo-ccbunney
Copy link
Collaborator Author

@MatthewMasarik-NOAA Yes - I'm happy to put a fix together for this. Watch this space :)

@MatthewMasarik-NOAA
Copy link
Collaborator

Awesome, thanks so much @ukmo-ccbunney !

@ukmo-ccbunney
Copy link
Collaborator Author

Also, I think the ASCII output unit numbers are not actually set when running ww3_shel, i.e. NDS(14) and NDS(15) are not defined as far as I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants