# .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific environment PATH="$HOME/.local/bin:$HOME/bin:$PATH" export PATH # Uncomment the following line if you don't like systemctl's auto-paging feature: # export SYSTEMD_PAGER= # User specific aliases and functions module load gcc module load slurm if [ "$TERM" = "screen" ]; then export TERM=xterm fi export CLICOLOR=1 export LSCOLORS=ExFxCxDxBxegedabagacad #--- custom variables here - you shouldn't need to change anything above here ---# PROMPT="power" # sets prompt style. choices: power or anything else to disable #--- end custom variables, you shouldn't need to change anything below here --# HOST=$(hostname) # for host info function # X DISPLAY settings XSERVER=$(who am i | awk '{print $NF}' | tr -d ')''(' ) XSERVER=${XSERVER%%:*} #if [ -z ${DISPLAY:=""} ]; then # if [[ -z ${XSERVER} || ${XSERVER} == $(hostname) || ${XSERVER} == "unix" ]]; then # export DISPLAY=":0.0" # else # export DISPLAY=${XSERVER}:0.0 # fi #fi if [[ ! -z $DISPLAY ]]; then if [ $SHLVL = 1 ]; then rm -f $HOME/.display echo $DISPLAY > $HOME/.display # echo "DISPLAY has been set to $DISPLAY" elif [ $SHLVL -gt 1 ]; then if [ -e $HOME/.display ]; then DISPLAY_FIX=$(cat $HOME/.display) if [ $DISPLAY != $DISPLAY_FIX ]; then export DISPLAY=$DISPLAY_FIX echo "screen/DISPLAY mismatch detected. DISPLAY has been adjusted to $DISPLAY" fi fi fi fi export GREP_OPTIONS=--color alias ls='ls -F --color=tty' alias ll='ls -alF --color=tty' alias requestdebug='srun --partition=debug --pty --nodes=1 --ntasks-per-node=1 -t 00:30:00 --wait=0 --export=ALL /bin/bash' alias matlab='matlab -nodisplay -nosplash ' set -o vi set -o emacs # Bash settings #umask 077 #ulimit -S -c 0 # Don't want any coredumps #set -o notify # notify when jobs running in background terminate #set -o noclobber # prevents catting over file #set -o ignoreeof # can't c-d out of shell #set -o nounset # attempt to use undefined variable outputs error message and forces exit #set -o xtrace # useful for debuging # Enable options: shopt -s cdspell # auto fixes cd / spelling mistakes #shopt -s cdable_vars #shopt -s checkhash #shopt -s checkwinsize #shopt -s cmdhist #shopt -u mailwarn #shopt -s sourcepath #shopt -s no_empty_cmd_completion # bash>=2.04 only #shopt -s histappend histreedit histverify #shopt -s extglob # necessary for programmable completion #stty stop undef #stty start undef alias pg="ps -ef | grep yhweng" alias squeue="squeue -u xhu2 --long" alias ll="ls -l" alias tail="tail -n 25" # Black 0;30 Dark Gray 1;30 # Blue 0;34 Light Blue 1;34 # Green 0;32 Light Green 1;32 # Cyan 0;36 Light Cyan 1;36 # Red 0;31 Light Red 1;31 # Purple 0;35 Light Purple 1;35 # Brown 0;33 Yellow 1;33 # Light Gray 0;37 White 1;37 red='\e[0;31m' RED='\e[1;31m' blue='\e[0;34m' BLUE='\e[1;34m' cyan='\e[0;36m' CYAN='\e[1;36m' green='\e[0;32m' GREEN='\e[1;32m' NC='\e[0m' #no color THRESHOLD_LOAD=50 COLOUR_LOW=$GREEN COLOUR_HIGH=$RED ONE=$(uptime | sed -e "s/.*load average: \(.*\...\),\(.*\...\),\(.*\...\)/\1/" -e "s/ //g") ONEHUNDRED=$(echo -e "scale=0 \n $ONE/0.01 \nquit \n" | bc) if [ $ONEHUNDRED -gt $THRESHOLD_LOAD ] then HOST_COLOR=$COLOUR_HIGH else HOST_COLOR=$COLOUR_LOW fi if [ $TERM == "xterm" ]; then echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007" fi # if [ $PROMPT = "power" ]; then # if [ "$UID" -eq 0 ]; then # PS1="[\[${HOST_COLOR}\]\t\[${NC}\]][\[${red}\]\u@\h:\w]\$\[${NC}\] " # else # PS1="[\[${HOST_COLOR}\]\t\[${NC}\]][\[${cyan}\]\u\[${NC}\]@\[${red}\]\h\[${NC}\]:\w]\$ " ## PS1="\[${cyan}\]\u\[${NC}\]@\[${red}\]\H.tamu.edu\[${NC}\]:\w\$ " ## PS1="${USER}@${HOSTNAME}:${PWD} " # fi # else # if [ "$UID" -eq 0 ]; then # PS1="[\t][\[${red}\]\u@\H:\w]\$\[${NC}\] " # else # PS1="[\t][\[${cyan}\]\u\[${NC}\]@\[${red}\]\H\[${NC}\]:\w]\$ " # fi # fi PS1="\[${cyan}\]\u\[${NC}\]@\[${red}\]\H\[${NC}\]:\w\$ " # export PS1="\[${cyan}\]\u\[${NC}\]@\[${red}\]\H.tamu.edu\[${NC}\]:\w\$ " #export PS1="\[${cyan}\]\u\[${NC}\]@\[${red}\]\H.tamu.edu\[${NC}\]:${PWD##*/home/paul}$ " #export PS1="\u@"`hostname|sed 's/\([^.]\)\..*/\1:/'`':${PWD##*/home/paul}$ ' #------------------------------------------------------------------------------------------------- # Set LIB envirement #export LIB_path=/home/yhweng/.LIB # #export NETCDF=/opt/netcdf/4.6.1/intel/mvapich2_ib #export NETCDF=/opt/netcdf/4.6.1/intel/intelmpi export NETCDF=/home/xhu2/tools/NetCDF #export HDF5=/opt/hdf5/1.10.3/intel/intelmpi #export NETCDF=/share/apps/compute/netcdf/4.3.2/intel/intelmpi #export BIN=Linux2_x86pg #export BIN=Linux2_x86_64pg_gcc_nomp export BIN=Linux2_x86_64pg_pgcc_nomp #export BIN=Linux2_x86pg_gcc_nomp #export GADDIR=$LIB_path/data #export GASCRP=$LIB_path/lib #export GEOG_DATAROOT=/home/yhweng/.LIB/GEOG export NETCDF4=1 export WRF_EM_CORE=1 export NCARG_COLORMAPS=/home/xhu2/tools/ncl_ncarg-6.4.0/lib/ncarg/colormaps export WRF_NMM_CORE=0 export EM_CORE=1 #export WRF_CHEM=1 #export WRF_KPP=1 #export SCRIPTS=$EDSS_ROOT/subsys/smokev1/scripts #export SMKROOT=$EDSS_ROOT/subsys/smokev1 #export SMK_BIN=$SMKROOT/Linux2_x86pgf90 export PATH=.:/home/xhu/tools/vapor/vapor-2.5.0/bin:/usr/local/netcdf-4.0.1/bin:/home/xhu/tools/CDO/cdo-1.6.5/bin:/usr/bin:/home/xhu/tools/p7zip/bin:/home/meteo/xgh5015/tools/byacc/bin:/micromet/s1/xgh5015/Models/WRFV3_chem_forWestSenegal/ARWpost/WRF2VIS5D:/usr/local/hdf/bin:/usr/local/nco/bin::$WRF2GrADS:$WRF2VIS5D:$NCARG_ROOT/bin:$RIP_ROOT:$PATH export PATH=/home/xhu2/tools/flex/v2.6.4/bin:$PATH export LD_LIBRARY_PATH=/home/xhu2/tools/flex/v2.6.4/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH="$TACC_NETCDF_DIR/lib:$TACC_HDF5_DIR/lib:$LD_LIBRARY_PATH" export FLEX_LIB_DIR=/usr/lib64 export FLEX_LIB_DIR=/home/xhu2/tools/flex/v2.6.4/lib #unset limits #export MP_STACK_SIZE=64000000 export MP_STACK_SIZE=536870912 #export OMP_NUM_THREADS=2 #export P4_GLOBMEMSIZE=536870912 export P4_GLOBMEMSIZE=1073741824 #export TMPDIR=/home/xhu2 alias gomcip="cd /risk/s0/meteo526/xgh5015/MCIP3/mcip3" alias goweb_hfip="cd /wave/s5/www/html" alias goemission="cd /nsftor/xhu/WRF-UCM/code/3.2.1_goodforEmissionGeneration/WRFV3/test/em_real" alias goprechem="cd /nsftor/xhu/BeijingO3_MaZhiQiang/global_emissions" alias goweb="cd /nsftor/xhu/public_html" #alias cdw="cd /oasis/projects/nsf/uok114/xhu2" alias cdw="cd /expanse/lustre/projects/uok114/xhu2" alias cdw1="cd /nsftor1/xhu/" alias cdw2="cd /cnproj1/xhu/" alias box="cd /micromet/s1/xgh5015/1999KWAJEX/BOX_model/BoxRACM_xhu_withBr" # List directories in columns alias pg="ps -ef | grep xhu" alias tail="tail -n 50" alias cds="cd /expanse/lustre/scratch/$USER/temp_project" alias detail="scontrol show job" #alias show_quota="lfs quota -u $USER /oasis/scratch/comet -h" alias show_quota="lfs quota -u $USER /expanse/lustre/scratch -h" alias lfs_quota="lfs quota -u $USER -h" alias show_quotansf="lfs quota -g uok114 /expanse/lustre/projects/ -h" alias loadncl="source activate ncl_stable" export WRFIO_NCD_LARGE_FILE_SUPPORT=1 export MODULEPATH=/share/apps/compute/modulefiles/applications:$MODULEPATH #module load ncl_ncarg module load cpu module load gcc module load openmpi module load netcdf-c module load ncview #module unload intel #module load netcdf #module load gnutools #module load intelmpi # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/home/xhu2/miniconda2/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/home/xhu2/miniconda2/etc/profile.d/conda.sh" ]; then . "/home/xhu2/miniconda2/etc/profile.d/conda.sh" else export PATH="/home/xhu2/miniconda2/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<<