Changeset 7148
- Timestamp:
- 2016-10-27T17:37:22+02:00 (8 years ago)
- Location:
- branches/2016/dev_r6393_NOC_WAD/NEMOGCM/TOOLS/MISCELLANEOUS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r6393_NOC_WAD/NEMOGCM/TOOLS/MISCELLANEOUS/README_uspcfg
r7117 r7148 22 22 local copies reflect any changes made in the remote sources. 23 23 24 The proce edure requires the following steps:24 The procedure requires the following steps: 25 25 26 26 1. From the target NEMOGCM directory on your target system copy the following … … 53 53 54 54 ls -1R ISOMIP_ARCHIVE 55 cpp_ISOMIP.fcm - downloaded from remote server56 def_wget - newly constructed script57 local .ctl- file list modified for local copy58 uspcfg_local .txt- a copy of uspcfg.txt with modification for local copy59 remote_file.list - downloaded from remote server60 set_local_uspcfg - newly constructed script61 EXP00 - new subdirectory62 MY_SRC - new subdirectory55 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 63 63 64 64 ./EXP00: 65 iodef.xml - downloaded from remote server66 namelist_cfg - downloaded from remote server65 iodef.xml - downloaded from remote server 66 namelist_cfg - downloaded from remote server 67 67 68 68 ./MY_SRC: 69 domzgr.F90 - downloaded from remote server70 istate.F90 - downloaded from remote server69 domzgr.F90 - downloaded from remote server 70 istate.F90 - downloaded from remote server 71 71 72 72 4. The final stage is to enter the directory and execute the set_local_uspcfg script. 73 73 This script will prompt for a full path to the target CONFIG directory and then: 74 74 75 a. Edit the local.ctl and uspcfg_local.txt files to insert the full path76 t o the archive directory (i.e. the current working directory)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 77 b. move uspcfg_local.txt to the named CONFIG directory 78 78 c. rename any existing uspcfg.txt file in the CONFIG directory to uspcfg_remote.txt 79 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 copy80 e. redefine/define wget as an exported bash function to simply copy 81 81 82 82 This last action is needed so that subsequent use of makenemo with the -u argument … … 92 92 . ./def_wget 93 93 94 [ Tip: check that the definition/re-definition of wget has worked correctly by 95 issuing this command: 96 97 wget a b c 98 99 If you get messages such as: 100 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 . 107 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: 110 111 wget a b c 112 Expected wget usage: wget src -O dest 113 -O not found. No action taken 114 115 if the environment is set correctly 116 ] 117 94 118 5. The setup is now complete and moving to the CONFIG directory and issuing a command 95 119 such as: 96 120 97 ./makenemo -n MYISOMIP -u ISOMIP -m target_arch121 ./makenemo -n MYISOMIP -u ISOMIP -m target_arch 98 122 99 123 should correctly configure from local archives only. 100 124 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.: 129 130 ./makenemo -n MYISOMIP -m target_arch 131 132 will not require any of the preceeding steps in future sessions. 133 ] 134 -
branches/2016/dev_r6393_NOC_WAD/NEMOGCM/TOOLS/MISCELLANEOUS/make_usp_tar.sh
r7117 r7148 116 116 if [ $remfile == 'create_directory' ] ;then 117 117 mkdir $locfile 118 echo $remfile " " $locfile >> local .ctl118 echo $remfile " " $locfile >> local_template.ctl 119 119 else 120 120 wget $remfile -O $locfile 121 121 remfile=$(echo $remfile | sed -e "s;.*$locfile;SET_LOCAL_DIRECTORY_HERE/$locfile;") 122 echo $remfile " " $locfile >> local .ctl122 echo $remfile " " $locfile >> local_template.ctl 123 123 fi 124 124 done … … 134 134 #---------------------------------------------------------------- 135 135 # 136 grep -v "$2 " $1 > uspcfg_local .txt136 grep -v "$2 " $1 > uspcfg_local_template.txt 137 137 # 138 138 #---------------------------------------------------------------- … … 140 140 #---------------------------------------------------------------- 141 141 # 142 cat cfg.tmp | sed -e "s;http.*$;SET_LOCAL_DIRECTORY_HERE/local.ctl;" >> uspcfg_local .txt142 cat cfg.tmp | sed -e "s;http.*$;SET_LOCAL_DIRECTORY_HERE/local.ctl;" >> uspcfg_local_template.txt 143 143 # 144 144 # … … 161 161 # Edit the local.ctl file to set the local directory path 162 162 # 163 ed - local.ctl << EOFA 164 g/SET_LOCAL_DIRECTORY_HERE/s;SET_LOCAL_DIRECTORY_HERE;\$basedir; 165 w 166 q 167 EOFA 163 sed -e "s;SET_LOCAL_DIRECTORY_HERE;\$basedir;" local_template.ctl > local.ctl 168 164 # 169 165 # Edit the uspcfg_local.txt file to set the local directory path 170 166 # 171 ed - uspcfg_local.txt << EOFB 172 /SET_LOCAL_DIRECTORY_HERE/s;SET_LOCAL_DIRECTORY_HERE;\$basedir; 173 w 174 q 175 EOFB 167 sed -e "s;SET_LOCAL_DIRECTORY_HERE;\$basedir;" uspcfg_local_template.txt > uspcfg_local.txt 168 # 169 # Install local versions in the named CONFIG directory 170 # 176 171 if [ -f \$confdir/uspcfg.txt ] && [ ! -L \$confdir/uspcfg.txt ]; then 177 172 mv \$confdir/uspcfg.txt \$confdir/uspcfg_remote.txt … … 196 191 fi 197 192 } 193 export -f wget 198 194 EOF 199 195 #---------------------------------------------------------------- … … 217 213 fi 218 214 } 215 export -f wget 219 216 EOFC 220 217 #----------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.