Skip to content

Instantly share code, notes, and snippets.

@TakashiUNUMA
TakashiUNUMA / Makefile
Created June 6, 2014 07:36
Makefile for compiling with NetCDF library.
#SHELL = /bin/sh
#-----------------------------------------------------------------------------
# NETCDF SECTION
#-----------------------------------------------------------------------------
# - netcdf3
OUTPUTINC = -I/usr/local/netcdf-3.6.3-gnu/include
OUTPUTLIB = -L/usr/local/netcdf-3.6.3-gnu/lib
LINKOPTS = -lnetcdf
# - netcdf4
@TakashiUNUMA
TakashiUNUMA / GoogleForm自動返信スクリプト.gs
Last active September 10, 2018 15:06
Google フォームを用いた自動返信スクリプト (参考 URL: http://creazy.net/2011/03/google_form_mailsend.html) Version 0.1.2
/*
自動返信 Google Apps Script
オリジナルスクリプト:http://swimath2.hatenablog.com/entry/2014/10/11/224320
this script was modified by Takashi Unuma
inspired by Ryohei Kato
last modified: 3rd Mar. 2017
*/
@TakashiUNUMA
TakashiUNUMA / diff_gmt5_vs_gmt4.md
Last active March 6, 2018 04:33
GMT5 と GMT4 とのコマンド参照表

GMT5 と GMT4 とのコマンド参照表

last modified: March 6, 2018

基本方針

  • 各 (GMT4 の) コマンドの先頭に gmt を付加する.
    • ただし,gmtsetgmt set に変更する.
  • GMT4 での .gmtdefaults4 ファイルは,gmt.conf に置き換え.
@TakashiUNUMA
TakashiUNUMA / extract_grib2_pointdata.sh
Created July 22, 2017 12:49
A sample handling script in order to extract point data from a grib2 format data.
#!/bin/bash
#
# extract_grib2_pointdata.sh
#
# original script was coded by Takashi Unuma, Tsu local meteorological office, Japan Meteorological Agency
# last modified: 22nd July 2017
#
# requirements:
# wgrib2, sed, awk (gawk is also available)
#
@TakashiUNUMA
TakashiUNUMA / gplot.sh
Last active July 21, 2017 07:30
A template bash script for gnuplot.
#!/bin/sh
# 描画する元のデータを指定 (gnuplot スクリプトへ引き継がれる)
infile=input.txt
# bash ファイル内での出力ファイル名を指定 (gnuplot スクリプトへ引き継がれる)
epsfile=output.eps
cat > tmp.gnuplot << EOF
# 出力を eps color enhanced に指定するためのおまじない
@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 / makereadme.sh
Created March 28, 2017 13:35
README のひな形を Markdown 形式で出力する bash script です.
#!/bin/bash
echo "# README #"
echo ""
echo "original document was written by USERNAME"
echo "last modified: `LANG=en_US ; date +"%d %B %Y"`"
echo ""
@TakashiUNUMA
TakashiUNUMA / .emacs
Created May 7, 2016 08:43
My .emacs setting file
;;
;; .emacs
;;
;; Last modified: 7th May 2016
;;
;; Load PATH
(add-to-list 'load-path "~/.emacs.d/scripts/")
;; package
@TakashiUNUMA
TakashiUNUMA / insert_fig_to_tex.sh
Created January 4, 2014 03:18
This script prints a LaTeX format that includes bounding box informations.
#!/bin/sh
if test $# -lt 1 ; then
echo "USAGE: sh $(basename $0) [figure(s)]"
exit 1
fi
infiles=$*
WIDTH="140mm"
DIR="pictures/"
@TakashiUNUMA
TakashiUNUMA / get_data_from_JMA.sh
Last active December 31, 2015 00:19
A wrapper script for the sounding data of http://www.data.jma.go.jp/obd/stats/etrn/upper/index.php. The commands of awk and w3m are required to use this script. USAGE: get_data_from_JMA.sh [JSTTIME] [STATION NUMVER] [TYPE] Note: An undef value "///" is replaced with "-999." in this script.
#!/bin/sh
#
# wget wrapper script
#
# original script coded by Takashi Unuma, Kyoto Univ.
# Last modified: 2013/12/11
#
debug_level=100
if test $# -lt 2 ; then