-
Notifications
You must be signed in to change notification settings - Fork 162
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
Fix several incorrect argument ranks in calls to WRF I/O API routines #184
Fix several incorrect argument ranks in calls to WRF I/O API routines #184
Conversation
…module.F In calls to ext_{int,ncd,gr1}_put_dom_ti_{integer,real} in output_module.F, the 'Data' dummy argument is an array, but a scalar actual argument was provided. This error was picked up by the GNU Fortran 11.1.0 compiler: output_module.f90:1733:41: 1733 | var_value, & | 1 ...... 1761 | var_value, & | 2 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) output_module.f90:1678:41: 1678 | var_value, & | 1 ...... 1706 | var_value, & | 2 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) The fix adopted by this commit is to simply make the scalar var_value into a temporary size-1 array with (/var_value/).
…odule.F In calls to ext_{int,ncd,gr1}_get_dom_ti_{integer,real} in input_module.F, the 'Data' dummy argument is an array, but a scalar actual argument was provided. This error was picked up by the GNU Fortran 11.1.0 compiler: input_module.f90:881:41: 881 | var_value, & | 1 ...... 909 | var_value, & | 2 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) input_module.f90:822:41: 822 | var_value, & | 1 ...... 854 | var_value, & | 2 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) The fix adopted by this commit is to declare a local array for use as the actual argument, and to copy the first element of this array to var_value after a successful call to ext_{int,ncd,gr1}_get_dom_ti_{integer,real}.
@mgduda Is there a reason why some of these arrays you went the direction of I ask, because likely what you do here we will need to conventionally put into the WRF model, as we have the exact same complaints of argument mismatches with the newer GNU compilers. |
@mgduda |
@mgduda I tested the following from inside the standard WRF-system docker container (GNU 9.3.1). This is expected to work since gnu 9 does not make mismatched variables a fatal error.
I tested the following with GNU 11.1.0 on cheyenne, where I expected to see an impact.
|
@davegill Once this PR has been merged, I was planning to create one more PR for the v4.3.1 release that adds |
@mgduda |
This PR corrects the actual argument rank in several calls to WRF I/O API
routines for reading and writing domain time-independent attributes.