Changeset 4890
- Timestamp:
- Apr 3, 2024, 12:58:58 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install_amaury/install_lmdz.sh
r4873 r4890 66 66 # surface/vegetation scheme treatment 67 67 # controlled by the single variable veget which can have the following values 68 # - NONE: bucket scheme (default)68 # - none: bucket scheme (default) 69 69 # - CMIP6: orchidee version used in CMIP exercise, rev 5661 70 70 # - number: orchidee version number 71 veget=" NONE"71 veget="none" 72 72 # choose the resolution for the bench runs 73 73 # grid_resolution= 32x24x11 or 48x36x19 for tests (test without ORCHIDEE) … … 97 97 compile_with_fcm=1 98 98 99 #Compilation with Cosp (cosp= NONE/v1/v2; default=NONE)100 cosp=" NONE"99 #Compilation with Cosp (cosp=none/v1/v2; default=none) 100 cosp="none" 101 101 opt_cosp="" 102 102 … … 208 208 209 209 # Check on veget version 210 if [[ $veget != ' NONE' && $veget != "CMIP6" ]]; then210 if [[ $veget != 'none' && $veget != "CMIP6" ]]; then 211 211 re='^[0-9]+$' 212 212 if ! [[ $veget =~ $re ]]; then … … 216 216 217 217 #Define veget-related suffix for gcm name 218 if [[ $veget = ' NONE' ]]; then218 if [[ $veget = 'none' ]]; then 219 219 suff_orc='' 220 220 #For use with tutorial, orchidee_rev is also defined (will be … … 302 302 } 303 303 304 function download_model_AMAURY { 304 function download_model_AMAURY { # TODO 305 305 MODEL=$(readlink -f "$MODEL"); echo "$MODEL" # absolute path 306 306 … … 313 313 } 314 314 315 function check_arch {315 function install_arch { 316 316 # TODO if [[ $(gfortran -dumpversion | cut -d. -f1) -ge 10 ]]; then allow_arg_mismatch="-fallow-argument-mismatch"; fi 317 317 … … 334 334 # check compiler 335 335 compiler=$(< "$fcm_path" grep "%COMPILER" | sed -e "s/%COMPILER\s*//") 336 337 # Copy arch to different components 338 # TODO check that this doesn't error if the source and destination are the same 339 \cp -f "$arch_dir/arch-$arch.fcm" "$MODEL/modipsl/modeles/IOIPSL/arch" 340 \cp -f "$arch_dir/arch-$arch.path" "$MODEL/modipsl/modeles/IOIPSL/arch" 341 \cp -f "$arch_dir/arch-$arch.fcm" "$MODEL/modipsl/modeles/ORCHIDEE/arch" 342 \cp -f "$arch_dir/arch-$arch.path" "$MODEL/modipsl/modeles/ORCHIDEE/arch" 343 344 # TODO TEMP compat w/ old orch version - make a proper case later 345 sed -i'' -e "s/-I//" -e "s/-L//" "$MODEL/modipsl/modeles/ORCHIDEE/arch/arch-$arch.path" # /!\ we only replace first occurence on purpose 336 346 } 337 347 … … 348 358 ifort) opt1="-compiler intel"; opt2="-CC icc -FC ifort -CXX icpc";; 349 359 pgf90) opt1="-compiler pgf90"; opt2="-CC pgcc -FC pgf90 -CXX pgCC";; 350 *) echo "unexpected compiler $compiler " for netcdf; exit 1360 *) echo "unexpected compiler $compiler for netcdf"; exit 1 351 361 esac 352 362 … … 415 425 echo "Compiling IOIPSL, the interface library with Netcdf $(date) (log: $ioipsllog)" 416 426 417 if ! ./makeioipsl_fcm -arch "$arch" - arch_path "$arch_dir" -job 8 > "$ioipsllog" 2>&1; then418 echo "IOIPSL compile failed, exiting"; exit 1427 if ! ./makeioipsl_fcm -arch "$arch" -job 8 > "$ioipsllog" 2>&1; then 428 echo "IOIPSL compile failed, exiting"; exit 1 419 429 fi 420 430 cp lib/* ../../lib … … 457 467 458 468 function get_orchidee_version { # Set / Check ORCHIDEE version 459 if [[ $veget = " NONE" ]]; then469 if [[ $veget = "none" ]]; then 460 470 veget_version="false" 461 471 elif [[ $veget = "CMIP6" ]]; then … … 489 499 get_orchidee_version 490 500 491 if [[ $veget != " NONE" ]]; then501 if [[ $veget != "none" ]]; then 492 502 cd "$MODEL/modipsl/modeles/ORCHIDEE" 493 503 … … 511 521 fi 512 522 513 # TODO debug 514 echo "./makeorchidee_fcm $xios_orchid $opt_orc -parallel none -arch $arch -arch_path $arch_dir" 515 516 if ! ./makeorchidee_fcm "$xios_orchid" "$opt_orc" -parallel none -arch "$arch" -arch_path "$arch_dir" > "$orchideelog" 2>&1; then 523 if ! ./makeorchidee_fcm "$xios_orchid" "$opt_orc" -parallel none -arch "$arch" > "$orchideelog" 2>&1; then 517 524 echo "ORCHIDEE seq compilation failed, exiting"; exit 1 518 525 fi … … 527 534 #download_model 528 535 download_model_AMAURY 529 check_arch536 install_arch 530 537 check_available_software 531 538 install_netcdf … … 675 682 676 683 veget_version=false 677 if [[ $veget != ' NONE' ]]; then684 if [[ $veget != 'none' ]]; then 678 685 cd "$MODEL/modipsl/modeles/ORCHIDEE" 679 686 … … 750 757 fi # of "if [[ -d tools ]]" 751 758 echo "install_lmdz.sh orchidee_compil_seq_OK $(date)" 752 fi # of if [[ "$veget" != ' NONE' ]]759 fi # of if [[ "$veget" != 'none' ]] 753 760 754 761 … … 951 958 # 952 959 cd "$ORCHPATH" 953 if [[ -d src_parallel && $veget != ' NONE' ]]; then960 if [[ -d src_parallel && $veget != 'none' ]]; then 954 961 cd arch 955 962 sed \ … … 980 987 -arch $arch >> "$orchideelog" 2>&1 981 988 echo "End of ORCHIDEE compilation in parallel mode $(date)" 982 elif [[ $veget != ' NONE' ]]; then989 elif [[ $veget != 'none' ]]; then 983 990 echo '##########################################################' 984 991 echo ' Orchidee version too old ' … … 986 993 echo '##########################################################' 987 994 exit 1 988 fi #�of [ -d src_parallel && $veget != ' NONE' ]995 fi #�of [ -d src_parallel && $veget != 'none' ] 989 996 990 997 # LMDZ
Note: See TracChangeset
for help on using the changeset viewer.