New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Ticket Comment Diff – NEMO

Changes between Initial Version and Version 1 of Ticket #2579, comment 10


Ignore:
Timestamp:
2020-12-03T19:01:12+01:00 (3 years ago)
Author:
nemo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2579, comment 10

    initial v1  
    33The proposal is this BASH/PERl script: 
    44 
    5 {{{ 
    6 cat internal_nl_workaround.pl 
    7 #!/bin/bash 
    8 # 
     5internal_nl_workaround.pl 
     6 
     7{{{#!bash 
    98INUNITS=( 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 ) 
    109# 
     
    3130done 
    3231}}} 
     32 
    3333which can be run in the top directory (on freshly checked out code). 
    3434 
    3535It should locate all the files containing the listed internal files and edit all the READ statements from the likes of: 
    3636 
    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 
    4139                            Before                                                                              After 
    4240      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 )      |   READ  ( numnam_ref(INDEX(numnam_ref,"namctl")-1:), namctl, IOSTAT = ios, ERR = 901 ) 
     
    4543      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 )      |   READ  ( numnam_cfg(INDEX(numnam_cfg,"namcfg")-1:), namcfg, IOSTAT = ios, ERR = 904 ) 
    4644}}} 
     45 
    4746If it works, I'll put together the reverse transformation which will have to be used before commiting any code back to the repository.  
    4847This 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.