Changes between Initial Version and Version 1 of Ticket #2579, comment 10
- Timestamp:
- 2020-12-03T19:01:12+01:00 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #2579, comment 10
initial v1 3 3 The proposal is this BASH/PERl script: 4 4 5 {{{ 6 cat internal_nl_workaround.pl 7 #!/bin/bash 8 # 5 internal_nl_workaround.pl 6 7 {{{#!bash 9 8 INUNITS=( numnam_ref numnam_cfg numnat_ref numnat_cfg numtrc_ref numtrc_cfg numnam_ice_ref numnam_ice_cfg numnamsed_ref numnamsed_cfg numnatp_cfg numnatp_ref ) 10 9 # … … 31 30 done 32 31 }}} 32 33 33 which can be run in the top directory (on freshly checked out code). 34 34 35 35 It should locate all the files containing the listed internal files and edit all the READ statements from the likes of: 36 36 37 {{{ 38 ./internal_nl_workaround.pl 39 40 sdiff -s -w 190 ../trunk/src/OCE/nemogcm.F90 src/OCE/nemogcm.F90 37 {{{#!shell-session 38 $ sdiff -s -w 190 ../trunk/src/OCE/nemogcm.F90 src/OCE/nemogcm.F90 41 39 Before After 42 40 READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) | READ ( numnam_ref(INDEX(numnam_ref,"namctl")-1:), namctl, IOSTAT = ios, ERR = 901 ) … … 45 43 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) | READ ( numnam_cfg(INDEX(numnam_cfg,"namcfg")-1:), namcfg, IOSTAT = ios, ERR = 904 ) 46 44 }}} 45 47 46 If it works, I'll put together the reverse transformation which will have to be used before commiting any code back to the repository. 48 47 This isn't bulletproof; one obvious assumption is that the ampersand is tight with the namelist name (hence the -1 after the index). I think we've been consistent with that but it needs verifying.