-
Notifications
You must be signed in to change notification settings - Fork 371
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 format for nlmaps_exclude_fields in seq_infodata_print #6167
Conversation
|
Please note that the F0A format is fine for character variables, but this is a character array. The corresponding output looks like:
I also tried a slightly more elegant solution to fill a temporary character variable with the excluded fields, and the corresponding output looks like:
if it matters |
Thanks. Sorry I missed that in my original PR. |
What do others think of this approach, which doesn't require a temporary character array: write(logunit,'(2A)',advance='no') subname,'nlmaps_exclude_fields = '
do i = 1, size(infodata%nlmaps_exclude_fields)
if (len(trim(infodata%nlmaps_exclude_fields(i))) == 0) cycle
write(logunit,'(3A)',advance='no') ' ', trim(infodata%nlmaps_exclude_fields(i))
end do
write(logunit,'(A)') '' It produces
|
@ambrad - That's some pretty elegant Fortran for a C++ programmer! And very much like what I had played with, though I had been loading a temporary string. I'll implement it and change my branch to match -- thanks |
Fix format for nlmaps_exclude_fields in seq_infodata_print The format for printing out nlmaps_exclude_fields in seq_infodata_print is currently F0I (for an integer value) but the variable is a character array. This type mismatch causes a failure when the seq_infodata_print subroutine is called, from cime_comp_mod.F90 when info_debug > 1. This PR uses a formatting suggested by Andrew Bradley to more elegantly print out this array. Fixes #6165 [BFB
passes sanity testing and re-confirmed the format change merged to next |
merged to master |
The format for printing out nlmaps_exclude_fields in seq_infodata_print is currently F0I (for an integer value) but the variable is a character array. This type mismatch causes a failure when the seq_infodata_print subroutine is called, from cime_comp_mod.F90 when info_debug > 1. This PR uses a formatting suggested by Andrew Bradley to more elegantly print out this array.
Fixes #6165
[BFB]