bashrc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # .bashrc
  2. # Source global definitions
  3. if [ -f /etc/bashrc ]; then
  4. . /etc/bashrc
  5. fi
  6. configure_ecearth()
  7. {
  8. # Configure GRIBEX paths
  9. export LOCAL_DEFINITION_TEMPLATES=/projects/acad/ecearth/opt/gribex/lib/gribtemplates
  10. export ECMWF_LOCAL_TABLE_PATH=/projects/acad/ecearth/opt/gribex/lib/gribtables
  11. # Configure grib api paths
  12. export GRIB_DEFINITION_PATH=/projects/acad/ecearth/opt/grib_api/share/definitions
  13. export GRIB_SAMPLES_PATH=/projects/acad/ecearth/opt/grib_api/share/ifs_samples/grib1
  14. export GRIB_BIN_PATH=/projects/acad/ecearth/opt/grib_api/bin
  15. # Configure and load modules
  16. pre_load_modules_cmd="module purge"
  17. module_list="compiler/intel/comp_and_lib/2016.2.181 intelmpi/5.1.3.181/64 hdf5/1.8.18-el6/intel_2016.2.181/intelmpi_5.1.3.181"
  18. if [ -n "${pre_load_modules_cmd}" ]
  19. then
  20. ${pre_load_modules_cmd}
  21. fi
  22. module load ${module_list}
  23. # Add directories to the shared library search path
  24. export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}"/projects/acad/ecearth/opt/grib_api/lib:/projects/acad/ecearth/opt/openjpeg/lib:/projects/acad/ecearth/opt/netcdf/frontal1/2016.2.181/lib"
  25. export CPATH=${CPATH:+${CPATH}:}"/projects/acad/ecearth/opt/netcdf/frontal1/2016.2.181/include"
  26. }
  27. # User specific aliases and functions
  28. if [ `hostname` = "frontal1" ]; then
  29. [[ -f ~/.configure_ecearth ]] && configure_ecearth
  30. [[ -f ~/.configure_ecearth ]] && rm ~/.configure_ecearth
  31. fi
  32. # Path/variables
  33. # --------------
  34. export HOST=`uname -n`
  35. export HISTFILESIZE=6000
  36. export HISTSIZE=6000
  37. # Display
  38. # -------
  39. export PS1="\[\033[1;39m\]\u@\h\[\033[0;0m\] \t \[\033[0;34m\]\w \[\033[2;31m\]\# \[\033[0;0m\]> "
  40. # alias
  41. # -----
  42. alias vi='vim'
  43. alias l='ls --color -lh -o'
  44. alias ll='ls --color -AlF --time-style=long-iso -hs'
  45. alias lt='ls --color -lh -o -s -rt'
  46. alias la='ls --color -ah -o -F'
  47. alias ps="ps --forest"
  48. alias rm="rm -i"
  49. alias cd..="cd .."
  50. alias dc="cd"
  51. alias sl='ls'
  52. alias h='history'
  53. alias df='df -hT -x tmpfs -x devtmpfs -x squashfs'