Skip to content

Instantly share code, notes, and snippets.

@TakashiUNUMA
TakashiUNUMA / gmtplot.sh
Created June 4, 2013 06:42
Template for GMT plotting.
#!/bin/sh
#
# GMTPLOT
# original script coded by Takashi Unuma, Kyoto Univ.
# Last modified: 2013:06/04
#
infile=Z__C_RJTD_composit_RDR_JMAGPV.out
# setting
@TakashiUNUMA
TakashiUNUMA / FREQ_DIST.awk
Created May 29, 2013 09:20
Make a frequency distribution. USAGE: awk -f FREQ_DIST.awk [input_file]
#!/bin/awk -f
{
if(binsize <= 0) exit
if($1 < 0){
frequency[int($1 / binsize) - 1] ++
}else{
frequency[int($1 / binsize)] ++
}
@TakashiUNUMA
TakashiUNUMA / 10min_2_3hour.sh
Created May 22, 2013 10:05
Change from 10 minute interval time to 3 hour interval time.
#!/bin/sh
#
# program of converting from 10-min. time to 3-hour time
#
# original script coded by Takashi Unuma, Kyoto Univ.
# Last modified: 2013/05/22
#
if test ${#1} -lt 12 ; then
echo "please type following format of date:"
@TakashiUNUMA
TakashiUNUMA / r2z.sh
Created May 22, 2013 09:12
Calculate reflected intensity [dBZ] by the use of Z-R relationship.
#!/bin/sh
#
# Calculate reflected intensity [dBZ] by the use of Z-R relationship.
# original script coded by Takashi Unuma, Kyoto Univ.
#
# -----
# Z = A * R^b
# where, A = 200, b=1.6
#
@TakashiUNUMA
TakashiUNUMA / utc2jst.sh
Created April 26, 2013 10:45
日時処理プログラム。 12桁のUTC時刻を、12桁のJST時刻に変換する。
#!/bin/sh
#
# 日時処理
# Last update: 2012/01/12
#
# 引数があるかどうかチェック
if test $# -lt 1
then
echo "USAGE: utc2jst yyyymmddhhnn"
@TakashiUNUMA
TakashiUNUMA / jst2utc.sh
Created April 26, 2013 10:42
日時処理プログラム。 12桁のJST時刻を、12桁のUTC時刻に変換する。
#!/bin/sh
#
# 日時処理
# Last modified: 2012/04/16
#
# 引数があるかどうかチェック
if test $# -lt 1
then
echo "USAGE: jst2utc yyyymmddhhnn"
@TakashiUNUMA
TakashiUNUMA / cache_free.sh
Last active December 16, 2015 16:49
Chach を解放する、shell script。
#!/bin/sh
echo '# before ------------------------------------------------------------- #'
free
echo ''
echo 3 > /proc/sys/vm/drop_caches
echo '# after -------------------------------------------------------------- #'
free
echo ""