New URL for NEMO forge!

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.

source: trunk/NEMOGCM/TOOLS/MISCELLANEOUS/README_uspcfg @ 7161

Last change on this file since 7161 was 7161, checked in by acc, 6 years ago

#1790 Add and README_uspcfg to TOOLS/MISCELLANEOUS (trunk) in order to provide a work-around for using unsupported configurations on systems without wget access to the internet. Full instructions are in README_uspcfg

File size: 5.8 KB
1Instructions for using unsupported configurations on systems without wget access to
2the internet
4The unsupported configurations in NEMO are provided as a way for users to provide
5alternative configurations to the wider community without having to rely on system team
6sponsership and support. The idea is to provide minimal but sufficient information
7with the standard distribution to allow ancillary files to be fetched from remote
8servers at compile time. Thus a makenemo command such as:
10./makenemo -n MYISOMIP -u ISOMIP -m some_arch
12will create a new configuration called MYISOMIP with MY_SRC and EXP00 directories
13populated from a remote server. It does this by first using the wget command to fetch a
14list of remote files and then using wget repeatedly to fetch each of the files listed
15therein. The location of the remote list is contained in one line of information held
16in the uspcfg.txt file (in CONFIG).
18These instructions provide a work-around for systems without direct access to the
19internet or on which wget has been disabled/not installed. On these systems it is
20possible to create local copies of the remote files and replace the wget function
21with a local copy command. It will be the user's responsibility to ensure that the
22local copies reflect any changes made in the remote sources.
24The procedure requires the following steps:
261. From the target NEMOGCM directory on your target system copy the following
27   files into a working directory on a system that does have internet access
28   and a working wget command:
31      b. CONFIG/uspcfg.txt
332. On that alternative system and in the working directory containing the newly
34   copied files, run the script. The script takes three arguments:
36      a. The name of the uspcfg.txt file
37      b. The name of the unsupported configuration you wish to use
38      c. The name of a directory that will be created and filled with the remote
39         files in the current working directory. This directory will be tarred and
40         eventually transferred to the target system. There it will be unpacked and
41         will form the local archive for this configuration. A meaningful name is
42         therefore recommended.
44   For example:
46   ./ uspcfg.txt ISOMIP ISOMIP_ARCHIVE
483. Copy the resulting tarball (in this case: ISOMIP_ARCHIVE.tar) to the target
49   system and unpack (tar xvf ISOMIP_ARCHIVE.tar) in a location that is visible to
50   the node on which you intend to compile nemo. The unpacked directory will contain
51   the files retrieved from the remote server, modified versions of the file list and
52   uspcfg.txt files and two new scripts. For example:
55   cpp_ISOMIP.fcm             - downloaded from remote server
56   def_wget                   - newly constructed script
57   local_template.ctl         - file list modified for local copy
58   uspcfg_local_template.txt  - a copy of uspcfg.txt with modification for local copy
59   remote_file.list           - downloaded from remote server
60   set_local_uspcfg           - newly constructed script
61   EXP00                      - new subdirectory
62   MY_SRC                     - new subdirectory
64   ./EXP00:
65   iodef.xml                  - downloaded from remote server
66   namelist_cfg               - downloaded from remote server
68   ./MY_SRC:
69   domzgr.F90                 - downloaded from remote server
70   istate.F90                 - downloaded from remote server
724. The final stage is to enter the directory and execute the set_local_uspcfg script.
73   This script will prompt for a full path to the target CONFIG directory and then:
75   a. Edit the templates and create local.ctl and uspcfg_local.txt files by inserting
76      the full path to the archive directory (i.e. the current working directory)
77   b. move uspcfg_local.txt to the named CONFIG directory
78   c. rename any existing uspcfg.txt file in the CONFIG directory to uspcfg_remote.txt
79   d. insert symbolic link (uspcfg.txt) to uspcfg_local.txt in the CONFIG directory
80   e. redefine/define wget as an exported bash function to simply copy
82   This last action is needed so that subsequent use of makenemo with the -u argument
83   will not invoke wget. For this to be effective the set_local_usp script should be run
84   within the same bash shell as makenemo will be run in. I.e.:
86   . ./set_local_usp
88   If this is not possible or the makenemo command is run at a later date, then the
89   def_wget script should be run in the bash shell before any attempt to use the -u
90   option of makenemo. I.e.:
92   . ./def_wget
94   [ Tip: check that the definition/re-definition of wget has worked correctly by
95     issuing this command:
97     wget a b c
99     If you get messages such as:
101       wget a b c
102       --2016-10-27 10:14:52--  http://a/
103       Resolving a... failed: Name or service not known.
104       wget: unable to resolve host address `a'
105       .
106       .
108     then the re-definition of wget has not been retained by the current shell. Run
109     . ./def_wget and try again. You should get a response such as:
111     wget a b c
112     Expected wget usage: wget src -O dest
113     -O not found. No action taken
115     if the environment is set correctly
116   ]
1185. The setup is now complete and moving to the CONFIG directory and issuing a command
119   such as:
121    ./makenemo -n MYISOMIP -u ISOMIP -m target_arch
123   should correctly configure from local archives only.   
125   [ Tip: the -u argument ( and hence the need to switch wget to local copies on isolated
126     systems ) is only required when compiling for the first time. Subsequent compilations
127     following code changes in the MYISOMIP directories can be carried out in your
128     default nemo environment. I.e.:
130     ./makenemo -n MYISOMIP -m target_arch
132     will not require any of the preceeding steps in future sessions.
133   ]
Note: See TracBrowser for help on using the repository browser.