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.
README_uspcfg in branches/2016/dev_r6393_NOC_WAD/NEMOGCM/TOOLS/MISCELLANEOUS – NEMO

source: branches/2016/dev_r6393_NOC_WAD/NEMOGCM/TOOLS/MISCELLANEOUS/README_uspcfg @ 7117

Last change on this file since 7117 was 7117, checked in by acc, 7 years ago

Added script and README to help with unsupported configurations on systems without direct internet or wget access (TOOLS/MISCELLANEOUS/make_usp_tar.sh and README_uspcfg)

File size: 4.7 KB
Line 
1Instructions for using unsupported configurations on systems without wget access to
2the internet
3
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:
9
10./makenemo -n MYISOMIP -u ISOMIP -m some_arch
11
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).
17
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.
23
24The proceedure requires the following steps:
25
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:
29
30      a. TOOLS/MISCELLANEOUS/make_usp_tar.sh
31      b. CONFIG/uspcfg.txt
32
332. On that alternative system and in the working directory containing the newly
34   copied files, run the make_usp_tar.sh script. The script takes three arguments:
35
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.
43
44   For example:
45
46   ./make_usp_tar.sh uspcfg.txt ISOMIP ISOMIP_ARCHIVE
47
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:
53
54   ls -1R ISOMIP_ARCHIVE
55   cpp_ISOMIP.fcm           - downloaded from remote server
56   def_wget                 - newly constructed script
57   local.ctl                - file list modified for local copy
58   uspcfg_local.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
63
64   ./EXP00:
65   iodef.xml                - downloaded from remote server
66   namelist_cfg             - downloaded from remote server
67
68   ./MY_SRC:
69   domzgr.F90               - downloaded from remote server
70   istate.F90               - downloaded from remote server
71
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:
74
75   a. Edit the local.ctl and uspcfg_local.txt files to insert the full path
76      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 a bash function to simply copy
81
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.:
85
86   . ./set_local_usp
87
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.:
91
92   . ./def_wget
93
945. The setup is now complete and moving to the CONFIG directory and issuing a command
95   such as:
96
97   ./makenemo -n MYISOMIP -u ISOMIP -m target_arch
98
99   should correctly configure from local archives only.   
100
Note: See TracBrowser for help on using the repository browser.