- Timestamp:
- Feb 4, 2025, 5:05:25 AM (15 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install/install_lmdz.sh
r5521 r5522 47 47 filename=$(basename "$url") 48 48 49 wget --no-check-certificate -nv "http://lmdz.lmd.jussieu.fr/pub/$url" 49 # Path on local computer where to look for the datafile 50 if [ -f /u/lmdz/WWW/LMDZ/pub/$1 ] ; then 51 \cp -f -p /u/lmdz/WWW/LMDZ/pub/$1 . 52 elif [ -f $save_pub_dir/$1 ] ; then 53 \cp -f -p $save_pub_dir/$1 . 54 else 55 echo wget --no-check-certificate -nv "http://lmdz.lmd.jussieu.fr/pub/$url" 56 wget --no-check-certificate -nv "http://lmdz.lmd.jussieu.fr/pub/$url" 57 if [ $save_pub = 1 ] ; then # saving wget files on $save_pub_dir 58 dir=$save_pub_dir/`dirname $1` ; mkdir -p $dir 59 cp -r `basename $1` $dir 60 fi 61 fi 62 50 63 if [[ $filename =~ .*\.(ba)?sh ]]; then chmod +x "$filename"; fi 51 64 } … … 139 152 jobcmd="" 140 153 verbose=0 154 155 save_pub=0 156 save_pub_dir=$HOME/LMDZ/pub 141 157 } 142 158 … … 146 162 while (($# > 0)); do 147 163 case $1 in 148 "-v") version=$2; shift ; shift;;149 "-r") svn_lmdz=$2; shift ; shift;;150 "-d") grid_resolution=$2; shift ; shift;;164 "-v") version=$2; shift 2 ;; 165 "-r") svn_lmdz=$2; shift 2 ;; 166 "-d") grid_resolution=$2; shift 2 ;; 151 167 "-unstable") trusting="unstable"; shift;; 152 168 "-cosp") cosp=$2 153 169 case $cosp in 154 "none"|"v1"|"v2") cosp=$2; shift ; shift;;170 "none"|"v1"|"v2") cosp=$2; shift 2 ;; 155 171 *) echo "Only none v1 v2 for cosp option"; exit 1 156 172 esac;; … … 159 175 "-rad") rad=$2 160 176 case $rad in 161 "oldrad"|"rrtm"|"ecrad") rad=$2; shift ; shift;;177 "oldrad"|"rrtm"|"ecrad") rad=$2; shift 2 ;; 162 178 *) echo "Only oldrad rrtm ecrad for rad option"; exit 1 163 179 esac;; 164 180 "-parallel") parallel=$2 165 181 case $parallel in 166 "none"|"mpi"|"omp"|"mpi_omp") parallel=$2; shift ; shift;;182 "none"|"mpi"|"omp"|"mpi_omp") parallel=$2; shift 2 ;; 167 183 *) echo "Only none mpi omp mpi_omp for the parallel option"; exit 1 168 184 esac;; 169 "-bench") bench=$2; shift ; shift;;185 "-bench") bench=$2; shift 2 ;; 170 186 "-debug") optim_flag="-debug"; shift;; 171 "-name") MODEL=$2; shift ; shift;;172 "-netcdf") netcdf=$2; shift ; shift;;173 "-benchphysiq") benchphysiq=$2; shift ; shift;;174 "-compilephysiq") compphysiq=$2; shift ; shift;;187 "-name") MODEL=$2; shift 2 ;; 188 "-netcdf") netcdf=$2; shift 2 ;; 189 "-benchphysiq") benchphysiq=$2; shift 2 ;; 190 "-compilephysiq") compphysiq=$2; shift 2 ;; 175 191 "-xios") with_xios=1; shift;; 176 "-arch") arch=$2; shift; shift;; 177 "-arch_dir") arch_dir=$2; shift; shift;; 178 "-veget") veget=$2; shift; shift;; 179 "-spla") aerosols=1; shift;; 180 "-strataer") strataer=1; shift;; 181 "-inlandsis") inlandsis=1; shift;; 182 "-make_j") make_j=$2; shift; shift;; 183 "-jobcmd") jobcmd=$2; shift; shift;; 184 "-noclean") clean_install=0; shift;; 185 "-icolmdz") icolmdz=1; shift;; 186 "-verbose") verbose=1; shift;; 192 "-arch") arch=$2; shift 2 ;; 193 "-arch_dir") arch_dir=$2; shift 2 ;; 194 "-veget") veget=$2; shift 2 ;; 195 "-spla") aerosols=1; shift ;; 196 "-strataer") strataer=1; shift ;; 197 "-inlandsis") inlandsis=1; shift ;; 198 "-make_j") make_j=$2; shift 2 ;; 199 "-jobcmd") jobcmd=$2; shift 2 ;; 200 "-noclean") clean_install=0; shift ;; 201 "-icolmdz") icolmdz=1; shift ;; 202 "-verbose") verbose=1; shift ;; 203 "-save_pub") save_pub=1 ; shift ;; 204 "-save_pub_dir") save_pub_dir=$2 ; shift 2 ;; 187 205 "-h" | *) cat <<........fin 188 206 $0 [ -v version ] [ -r svn_release ] … … 235 253 236 254 -jobcmd command prepended to fcm compile jobs, e.g. "srun" (default <$jobcmd>) 255 256 -save_pub Saves files from local mirror of http://lmdz.lmd.jussieu.fr/pub 257 258 -save_pub_dir for saving/geting files from local mirror of http://lmdz.lmd.jussieu.fr/pub 237 259 238 260 -noclean will only download necessary files (but no thorough check is made on the integrity of existing files), and will recompile everything (very quick if it's already been compiled before)
Note: See TracChangeset
for help on using the changeset viewer.