Description
When a standard name is:
- 111 characters, capgen dies at line 218 of fortran_write.py -
line_continue = outstr[best+1:].lstrip()[0] != '!'because outstr.len() == best + 1
- greater than 111 characters, capgen tries to wrap the standard name
Steps to Reproduce
Basically, replace any standard name that appears in the variable lists in ccpp_physics_suite_variables with a name that is >= 111 characters. Here's what I did:
cd test/capgen_test
for f in *; do [ -f "$f" ] && sed -i 's/potential_temperature_at_interface/potential_temperature_at_interfaces_with_respect_to_the_smallest_hairs_on_robert_redfords_beautiful_blonde_head/g' "$f"; done (to change to a 111 character name)
./run_test - observe the error
git stash - reset
for f in *; do [ -f "$f" ] && sed -i 's/potential_temperature_at_interface/potential_temperature_at_interfaces_with_respect_to_the_smallest_hairs_on_robert_redfords_beautiful_blonde_heads/g' "$f"; done (to change to a 112 character name)
./run_test - test will error, but don't worry about that.
vi ct_test/ccpp/test_host_ccpp_cap.F90 (observe the attempted wrapping on line 364)
Provide the tag or hash of the CCPP Framework used to reproduce the bug
Have you make any modifications to the CCPP Framework code?
Nope. this is on the head of development - 9254784f55757cdc8386509fedc7e6fdd02517ab
Output
variable_list(4) = &
'potential_temperature_at_interfaces_with_respect_to_the_smallest_hairs_on_robert_redfords_beautiful_blonde_heads&
&'
Description
When a standard name is:
line_continue = outstr[best+1:].lstrip()[0] != '!'because outstr.len() == best + 1Steps to Reproduce
Basically, replace any standard name that appears in the variable lists in ccpp_physics_suite_variables with a name that is >= 111 characters. Here's what I did:
cd test/capgen_testfor f in *; do [ -f "$f" ] && sed -i 's/potential_temperature_at_interface/potential_temperature_at_interfaces_with_respect_to_the_smallest_hairs_on_robert_redfords_beautiful_blonde_head/g' "$f"; done(to change to a 111 character name)./run_test- observe the errorgit stash- resetfor f in *; do [ -f "$f" ] && sed -i 's/potential_temperature_at_interface/potential_temperature_at_interfaces_with_respect_to_the_smallest_hairs_on_robert_redfords_beautiful_blonde_heads/g' "$f"; done(to change to a 112 character name)./run_test- test will error, but don't worry about that.vi ct_test/ccpp/test_host_ccpp_cap.F90(observe the attempted wrapping on line 364)Provide the tag or hash of the CCPP Framework used to reproduce the bug
Have you make any modifications to the CCPP Framework code?
Nope. this is on the head of development - 9254784f55757cdc8386509fedc7e6fdd02517ab
Output