Thursday, August 24, 2017

Research Note #7 - WRF Chem Installation

Finally getting face to face with this model once more. Here comes summary for its installation. I had quite problems while installing it, but overall, it was an easy procedure.

Library Needed
--------------
1. NetCDF --> for WRF/WPS, NetCDF Fortran, version >=4.4
2. MPICH --> for multiprocessor
3. zlib --> for WPS
4. libpng --> for WPS
5. Jasper --> for WPS 

Download: http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php

Environment Variables
---------------------
1. Before Any/NetCDF Installation
   DIR=/home/ardhi/Build_WRF/LIBRARIES
   CC=gcc
   CXX=g++
   FC=gfortran
   FCFLAGS=-m64
   F77=gfortran
   FFLAGS=-m64
   
2. After NetCDF Installation
   PATH=$DIR/netcdf/bin:$PATH
   NETCDF=$DIR/netcdf
   
3. After MPICH Installation
   PATH=$DIR/mpich/bin:$PATH
   
4. Before zlib Installation
   LDFLAGS=-L$DIR/grib2/lib 
   CPPFLAGS=-I$DIR/grib2/include

Library Compatibility Tests --> http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php
----------------------------------------------------------------------------------------------------
   
Building WRF
------------
1. Without Chem
   setenv WRF_CHEM=0
   setenv J "-j 2"
   setenv LD_LIBRARY_PATH $DIR/mpich/lib64:$DIR/netcdf/lib64 (for 64bit)
   ./configure --> Serial (32)/ dmpar (34), nesting 0 or 1
   configure.wrf --> LIB_EXTERNAL --> -L/home/ardhi/Build_WRF/LIBRARIES/netcdf/lib64 -lnetcdff -lnetcdf (for 64bit)

2. With Chem
   Same WRF version with Chem (e.g. both V.3.8.1)
   setenv WRF_KPP 0
   setenv WRF_CHEM 1
   setenv EM_CORE 1
   setenv NMM_CORE 0
   setenv J "-j 2"
   setenv LD_LIBRARY_PATH $DIR/mpich/lib64:$DIR/netcdf/lib64 (for 64bit)
   ./configure --> Serial (32)/ dmpar (34), nesting 0 or 1 
   configure.wrf --> LIB_EXTERNAL --> -L/home/ardhi/Build_WRF/LIBRARIES/netcdf/lib64 -lnetcdff -lnetcdf (for 64bit)  

Building WPS
-----------
   setenv JASPERLIB $DIR/grib2/lib
   setenv JASPERINC $DIR/grib2/include
   ./configure --> Serial, GRIB2 (1) or dmpar, GRIB2 (3)
   configure.wps --> WRF_LIB -->  -L$(NETCDF)/lib64  -lnetcdff -lnetcdf (for 64bit)  


Some useful LINUX/UNIX commands during installation:

  • setenv (csh,tcsh), export (bash) : sets environment variables
  • setenv (csh,tcsh), env | more/less : shows environment variables
  • . ~/.bashrc (bash) : run configuration script/permanent environment variables 
  • echo $0 : shows the type of current shell 
  • lscpu : shows cpu, core and thread numbers (total cpu=socket x core x thread)
  • uname -r : shows kernel release version
  • uname -m, arch : shows whether linux is 32bit or 64bit
  • lsb_release -a : shows distribution release name


Thursday, June 22, 2017

Gaijin Story #10 - Income Tax Return dan Asuransi Kesehatan Nasional Jepang


Februari 2017 adalah salah satu bulan tersibuk selama saya tinggal di Jepang. Saat itu anak pertama lahir dan saya lumayan kelimpungan mengurus berkas kelahirannya, mulai dari rumah sakit, municipal office, kantor imigrasi sampai KBRI. Ujung-ujungnya, saya melupakan salah satu hal paling penting yang harus dilakukan setiap orang-terutama kepala keluarga-di Jepang setiap tahun: melaporkan pajak pendapatan alias income tax return ke municipal office. 

Laporan ini bisa dilakukan dengan mengisi form yang dikirimkan municipal office ke rumah via pos, atau datang langsung ke kantornya, dan biasanya deadlinenya adalah tanggal 15 Maret. Laporan pajak pendapatan ini wajib dilakukan setiap orang, terlepas apakah ybs memiliki pendapatan atau tidak. Mahasiswa yang hidupnya bergantung pada beasiswa seperti saya termasuk yang tidak memiliki pendapatan, tapi tetap diwajibkan untuk melapor. Tapi seberapa penting laporan pajak ini?

Informasi pendapatan yang ada di laporan tersebut akan menjadi dasar perhitungan berbagai subsidi yang akan diterima dari pemerintah. Salah satunya adalah asuransi kesehatan nasional (NHI/hokensho). Bagi yang tidak memiliki pendapatan (0 Yen income), akan mendapat diskon premi asuransi yang jumlahnya lumayan. Selain itu laporan ini juga dibutuhkan untuk memperoleh subsidi pengobatan anak dari pemerintah kota.  

Saya baru ngeh atas kealpaan melaporkan income tax ini ketika menerima slip pembayaran hokensho terbaru bulan Juni 2017. Tahun lalu, saya membayar sekitar 24,000 Yen untuk premi hokensho selama 10 bulan, untuk dua orang (saya dan istri). Alhasil, matapun terbelalak ketika menerima tagihan baru hokensho sebesar 120,000 Yen untuk 10 bulan. Itu artinya 12,000 Yen per bulan. Bagi mahasiswa MEXT yang beasiswanya pas-pasan seperti saya, tentu tagihan sebanyak itu bisa mencekik leher. 

Slip Premi Hokensho

Income Tax Return Form (Kashiwa-shi)
Kejadian lupa melaporkan income tax seperti ini lumrah terjadi di Jepang, terutama oleh foreigner, dan untungnya, pemerintah kota masih "berbaik hati" memberikan kesempatan kedua bagi orang-orang yang alpa tersebut. Setelah datang langsung ke municipal office dan melaporkan pendapatan ke bagian pajak, saya pun melapor ke bagian asuransi. Pihak asuransi nantinya akan menyesuaikan tagihan premi dan mengirimkan slip baru ke rumah. Berita bagus lainnya, tidak ada denda atau pungutan atas keteledoran saya. Alhamdulillah.

Pelajaran berharganya, kalo anda mahasiswa di Jepang dan tiba-tiba dapat tagihan premi asuransi membengkak, coba cek lagi, apakah income tax anda sudah dilaporkan. Intinya ya jangan sampai lupa lapor pajak setiap tahunnya (=  

Wednesday, June 21, 2017

Gaijin Story #9 - V-Preca, Kartu Kredit Pra-bayar di Jepang


Kartu kredit mungkin adalah metode pembayaran paling populer di dunia saat ini, termasuk di Jepang. Hampir semua transaksi di negeri sakura mendukung pembayaran dengan kartu kredit, baik on-the-spot maupun via online. Namun, mendapatkan kartu kredit di Jepang bukan hal yang mudah, terutama bagi gaijin (foreigner). Selain proses screening yang ketat, aplikasi kartu kredit di bank juga butuh kemampuan bahasa Jepang yang cukup, dan penolakan aplikasi oleh bank juga tidak jarang terjadi. Umumnya, foreigner yang ingin mendapatkan kartu kredit akan membawa temannya yang orang Jepang untuk membantu komunikasi dengan pihak Bank.

Nah, salah satu hal menarik yang saya temui di Jepang adalah kartu kredit pra-bayar. Ya, pra-bayar dan bisa diisi ulang seperti pulsa ponsel yang ada di Indonesia. Kartu kredit jenis ini bisa dibeli dengan mudah di berbagai convenient store dalam beberapa nominal, mulai dari 2000 - 10000 Yen, dan tentu saja, tidak perlu aplikasi yang ribet seperti di bank. Tinggal bayar di kasir, isi via website dan anda langsung bisa menggunakannya untuk berbagai transaksi. Sayangnya, kartu kredit jenis ini hanya bisa digunakan untuk transaksi online.

Voucher V-Preca
Salah satu kartu kredit pra-bayar yang saya gunakan di Jepang adalah V-Preca (Lifecard), yang bisa digunakan untuk transaksi di berbagai merchant online yang menerima pembayaran dengan kartu kredit VISA. Walaupun namanya kartu kredit, tapi V-Preca ini lebih mirip voucher. Untuk bisa menggunakannya, kita perlu melakukan registrasi via website dan memasukkan kode yang ada pada voucher tadi sebelum menggunakannya untuk transaksi. Untuk proses registrasi, anda harus memiliki nomor telepon Jepang yang bisa dihubungi, karena kode konfirmasi akan dikirimkan via SMS.

Kartu V-Preca Gift
Bagi yang tidak punya nomor telepon Jepang, tersedia juga V-Preca Gift dalam bentuk kartu yang bisa langsung digunakan untuk transaksi, namun hanya sekali pakai dan nominalnya berbeda dengan V-Preca biasa.

V-Preca bisa digunakan untuk transaksi online di dalam maupun luar Jepang, misalnya di Amazon.com atau ETS (untuk test TOEFL/GRE). Hal penting yang perlu diperhatikan, pada beberapa situs yang membutuhkan registrasi kartu kredit (untuk pembayaran berkala), V-Preca tidak bisa digunakan, karena nomor kartunya akan berubah setiap kali diisi ulang. 

Keunggulan V-Preca:
  • Bisa dibeli di berbagai convenient store
  • Bisa digunakan pada berbagai merchant online yang menerima pembayaran dengan VISA
  • Registrasi mudah dan disposable, cocok bagi foreigner/mahasiswa asing
  • Tidak ada bunga atau biaya aneh-aneh, jadi tak perlu khawatir belanja berlebihan atau debt collector ;-)
  • Bagi yang tidak punya nomor telepon Jepang, bisa menggunakan V-Preca Gift Card
Kekurangan V-Preca:
  • Hanya untuk transaksi online
  • Nominal yang terbatas
  • Tidak bisa digunakan untuk pembayaran berkala, misal untuk fee registrasi bulanan di Yahoo!Auction.
  • Website untuk registrasi/isi ulang, 90% dalam bahasa Jepang
Website V-Preca : http://vpc.lifecard.co.jp/en/

Monday, June 12, 2017

Melakukan Reset Pada Windows Folder Security

Salah satu hal paling menyebalkan ketika bekerja dengan Windows adalah berurusan dengan security setting pada folder/direktori. Pada UNIX-based OS, konfigurasi security pada direktori bisa dengan mudah dilakukan dengan perintah CHMOD. Di Windows, hal ini jadi lebih rumit, karena selain permission, pengguna juga harus berurusan dengan konfigurasi lain seperti ownership atau auditing, dan masing-masing konfigurasi ini bisa berdiri sendiri. Akibatnya, tidak jarang hal konyol terjadi, misalnya: saya adalah administrator dan pemilik folder "A" , namun karena suatu dan lain hal (misalnya windows explorer error), nama saya tidak tercantum dalam daftar pengguna/grup yang mendapat permission untuk melakukan perubahan pada folder tersebut. Maka saya tidak akan bisa melakukan perubahan, walaupun saya adalah admin sekaligus owner folder. Masalah ini sering muncul ketika kita ingin melakukan perubahan pada media (harddisk) dengan file system NTFS, dengan OS selain Windows.

Cara paling mudah untuk mengatasi hal tersebut adalah dengan melakukan reset pada security setting NTFS melalui command prompt windows. Konfigurasi via security setting (klik kanan) tidak dianjurkan karena berpotensi membingungkan, di mana pengguna harus berurusan dengan konfigurasi permission, ownership dll. Selain itu, proses via dekstop ini cukup menyita waktu, apalagi kalau folder tersebut berisi ribuan file. Jadi, daripada ribet dan lama, lebih baik di-reset saja sekalian.

1. Jalankan command prompt Windows, sebagai Administrator.
2. Masuk ke direktori yang ingin di-reset security-nya.
3. Ambil alih ownership isi folder tersebut dengan perintah berikut:

          takeown /R /F *

4. Reset permission setting seluruh isi folder tersebut dengan perintah tersebut:

          icacls * /T /Q /C /RESET

Tunggu sampai seluruh proses selesai, dan perubahan pada folder akan bisa dilakukan.




Thursday, May 11, 2017

Research Note #2 - draft

2017/05/30:
  • Bila draft dijalankan pada Cygwin 64-bit, akan ada masalah pada sistem permission file. Lebih baik dijalankan pada Cygwin 32-bit. Pastikan menjalankan Cygwin dalam sebagai Administrator di Windows untuk mencegah masalah permission pada file data.
2017/05/11:
<OMG HAMPIR TEPAT SETAHUN SEJAK TULISAN INI DIUPDATE!!>
  • Draft harus dijalankan dengan c-shell (csh). Bila dengan bash, penulisan file binary (file size) akan bermasalah, dan baru ketahuan setelah dijalankan dengan GrADS.
2016/05/13:
  • [Script] Bila proses dilakukan langsung, maka file lama hasil proses akan langsung di overwrite oleh file baru. Jadi file lama tidak perlu dihapus (untuk keperluan tes/ujicoba)
2016/05/12:
  • [Script] File CTL hanya mewakili satu tanggal saja (tiap direktori). Dengan sedikit modifikasi, 1 file CTL bisa dibuat untuk mewakili semua tanggal.
  • [Script] Untuk radar furuno selama IOP 2016, waktu observasi adalah tiap 5 menit, berarti 1 jam ada 12 observasi, atau 288 observasi selama 24 jam. Itu artinya TDEF di file CTL untuk 1 hari observasi adalah 288. Bila 30 hari TDEFnya 8640.
  • [Script] Data yang kosong akan menghasilkan error bila dibuka dengan GrADS. Cara mengatasinya kemungkinan adalah dengan membuat data set baru dengan dimensi yang sama (dengan data yg tidak kosong) dan diberi nilai -999 (no data) untuk waktu observasi tersebut. Masalahnya adalah, bagaimana cara membuat data kosong dengan dimensi yang sama persis dengan data yang dihasilkan draft.
Error pada data kosong

2016/05/11:
  • [Script] Proses untuk 24 jam akan menghasilkan 24 data CAPPI per jamnya dalam format binary GrADS, dengan 1 file CTL.
  • [Script] Proses untuk 24 jam akan tetap menghasilkan 24 data CAPPI, walaupun ada data yang tidak lengkap. Misal data jam 3 tidak ada, maka file data pada jam tersebut akan memiliki ukuran 0 kb.
  • [Script] Seluruh data CAPPI akan diletakkan pada direktori dengan yang sama dengan parameter hasil konversi, misal : /converted/dBuZ/20160124/.
  • [Script] Proses akan menghasilkan direktori data per jamnya dan direktori untuk menampung seluruh file CAPPI. Kedua direktori ini aman dihapus untuk menghemat space.
2016/05/09:
  • Merupakan kumpulan tool yang berfungsi untuk melakukan berbagai proses pada data/file dalam format draft (rt), misalnya membuat data CAPPI atau 3D.
  • Link download source code.
  • Bisa diinstal pada sistem 32-bit maupun 64-bit.
  • Instalasi pada Cygwin 32-bit di Windows 32-bit sudah dicoba berkali-kali dan tidak ada masalah.
  • Instalasi pada Cygwin 32-bit di Windows 64-bit sudah dicoba sekali dan tidak ada masalah.
Instalasi draft pada Cygwin 32-bit di Windows 64-bit
  • Instalasi langsung pada Cygwin 64-bit di Windows 64-bit bermasalah, karena script configure tidak mengenali system build type. Masalah ini (ternyata) bisa diselesaikan dengan menambahkan parameter build dengan nilai 'i686-pc-linux-gnu' pada perintah configure.
./configure F77=gfortran CC=gcc --build=i686-pc-linux-gnu

Error instalasi draft pada Cygwin 64-bit di Windows 64-bit
Penambahan parameter build pada configure untuk mengatasi error ketika instalasi di sistem 64-bit
  • Sebagai catatan, pada Cygwin 32-bit, system build typenya adalah 'i686-pc-cygwin'.
  • Bila draft tetap tidak bisa diinstall, kemungkinan alternatifnya adalah dengan menggunakan (copy) file executable dari tool yang sudah diinstall pada sistem yang berjalan. Tapi ini masih sebatas dugaan karena belum pernah dicoba.

Saturday, March 4, 2017

Gaijin Story #8 - Registering Newborn Child in Japan (for Foreign Students)

Having a child in Japan is definitely one of the most unique and memorable life experience ever. While the living is complicated enough, cultural and regulation differences, as well as the language barrier could be really challenging for foreigners, especially students, to conceive and raise children in Japan. One thing that could bring anxiety is probably the registration procedure for children being born in the country. Complicated paper works and the penalty (for anybody who fail the rules) may sound scary, but as long as you stick with it and prepare the necessary documents, everything should be OK. 

I'm a foreign student and my son was born in Kashiwa last February, and this time, I would like to share my experience about how to register your newborn child in Japan.

Basically, there are three things you should do after your child was born:      

1. Registering Your Newborn Child to City Ward

This is the very first step you should ever do. Why? Because he/she only has 14-days since the birth for being registered to the city ward. More than that, there will be troubles. How bad? There could be penalty, complicated paper works or even a visit by police to your home. So, do it as soon as possible after your child is discharged from the hospital.

Some documents you should prepare (bold ones are the most important):
  • Birth certificate (出生証明書: Shusseishoumeisho) and Birth registration (出生届: Shusshoutodoke). For my case, these two documents are printed in one paper, and should be handed by the hospital where your child was born. Shusseishoumeisho will be filled by hospital with birth data of your child (date, time, weight, height etc.), while Shusshoutodoke should be filled by you when you register your child to city ward. These are extremely important documents and you will need them again for obtaining visa for your child. Therefore, make sure you receive it from the hospital.
  • Mother and child health handbook (母子健康手帳: Boshikenkoutechou or simply, boshitechou). You should be familiar with this book, as it's been used since the pregnancy.
  • Residence cards (Zairyu) of  the representative parent.
  • National Health Insurance card (国民健康保険:Kokuminkenkouhoken) of the househead (father) for making child's NHI card.
  • Your university student ID.
  • Passports of both parents. You will need them for registering child support system from city ward (you could receive 15,000 Yen/month subsidy for raising your child).
  • Your bank book or cash card. Needed for child support system registration and expenses reimbursement (if you need it). 
  • Hospital receipts for birth expenses, in case you didn't use direct payment system and want the money reimbursed. Otherwise, you can omit this.
Birth certificate (right side) and birth registration (left side) from hospital
Visit the city ward with the documents and register your child. Asked for help from the city ward staff if you need it. During the registration, make sure you also apply to get these following documents:
  • Acceptance certificate (受理証明書: Jurishoumeishou). This document is a prove that your child has been registered at city ward. You'll need this document for applying your child's visa (and register him/her at your national embassy in Japan). It will costs 350 yen for 1 copy of jurishoumeishou. Apply at least 2 copies of it for future uses.
  • Residence record (住民票: Juuminhyou). You should be also familiar with this one, because it's a very important document for opening bank account and registering for NHI. This time, you'll need the updated Juuminhyou for registering NHI and applying visa for your child. The cost will be 300 yen for 1 copy of juuminhyou. Apply at least 2 copies of it for future uses.
  • Copy of Birth certificate and birth registration. The original documents will be kept by city ward, thus don't forget to get the copies to apply your child visa.
Jurishoumeisho, the acceptance ceritificate.
After the registration is completed, you should have those three kinds of documents above. The city ward staff should return the boshitechou to you with stamp of city major on the first page, acknowledging the registration of your child.

After you finished registering your child, don't forget to do these next important things at the city ward:
  • Apply for NHI for you child. You'll need your NHI card and Juuminhyou as mentioned above. You could also ask for reimbursement for hospital expenses if you need to.
  • Apply for Child support/subsidy system by the city ward. As mentioned above you could get 15,000 yen/month support from the city. For my case, the paper works need bank account information (bank book/cash card) and passport/visa from both parents. So make sure you prepared these documents.
  • Apply for immunization and medical support to have free (primary) immunization and free medication for your child.
Basically, after child registration at city ward is finished, and the next important step is applying visa for your child at the immigration bureau office closest to your city to obtain residence status for your child, and you must do this no more than 30 days after the birth. Some documents you obtained at city ward will be used for the visa application. 


2. Applying Child's Visa at Japan Immigration Bureau

This is the next mandatory step you MUST do after registering your child to city ward and you MUST do this no more than 30 days after the birth. Otherwise, your child will be considered as an "overstayer" or even an illegal resident which could lead to deportation from Japan. Scary it may sound, the visa application process is in fact not so complicated, as long as you prepare the necessary documents. It's not necessary to have your child passport for the visa application.

What I will write here is the process I took to get my son's visa at Regional Immigration Bureau in Shinagawa, Tokyo. There might be few differences with other immigration offices, but overall the process should be similar.

Before applying visa, make sure to prepare these documents:      
  • Application form for permission to acquire status of residence in Japan. You could get the form on this link. Any other documents you need to submit also shown on that page (even though the description is quite ambiguous). It's better to fill this form before you visit the immigration office.
  • Your residence card (Zairyu), as the legal representative of your child.
  • Acceptance certificate (Jurishoumeisho) from city ward.
  • Registration record (Juuminhyou) from city ward.
  • Copy of birth certificate (Shusseishoumeisho) from city ward.
  • Copy of birth registration (Shusshotodoke) from city ward.
  • Copy of mother and child health hand book (boshitechou). Just copy the pages which state the birth of your child.
  • Copy of your marriage certificate.
  • Certificate of enrollment from your university. This document is a prove of your student status in Japan and it MUST be the most recent one. It should be issued in maximum 3 months before your visa application date.
  • Any documents which indicates your incomes. For scholarship awardee, you should prepare the most recent scholarship acceptance certificate, e.g. MEXT certificate etc.
What you should know during the visa application at immigration office:
  • It's obvious that immigration office is always crowded. Therefore, make a visit at your earliest convenience. At Shinagawa office, there are so many people even before the working hours started (at 9 AM) because the ticket number counter is already open, and the queue is ridiculously long. I came around 9:45 AM, got ticket number 302 and finally called to the counter at 4:10 PM!
  • Monday and Friday are usually the most crowded day.
  • If there are more than one immigration office near your city, visit the closest and smaller one. I live in Kashiwa, and I was applying CoE for my wife a year ago at Chiba immigration office. The queue was much shorter than Shinagawa, even though I visited the office around 1 PM.
  • The immigration office will send notice (postcard) to inform you that the application result has been finished. I got mine after 1 week. Return to the same immigration office after you received the post card, together with visa application receipt. Don't forget to bring your resident card and documents which prove your relationship with your child (ex. Juuminhyou and Jurishoumeishou).
  • It's also recommended that you come early to pick the result (in this case, your child's resident card). While the queue is not as long as the application one, it will still take time to wait for your number to be called.
Return to the immigration office after you received this post card in your mail box
Visa application receipt
Finally, resident card for your child

3. Making Passport for Your Child

This is the final step you should conduct after getting visa for your child. The regulations for passport application might be different for each embassy, thus I will not describe it in details here. Anyway, as other steps mentioned above, some documents should be prepared and you should check the specific information on your nation's embassy in Japan.

Some embassies (like mine) require the child to be presented for the passport application (taking photo and bio-metrics), thus you should better make a visit when your newborn child is strong enough to be brought outside. No need to rush on the passport, because as long as your child has visa, he/she should be considered legal to stay in Japan. Nevertheless, don't forget to apply for passport, especially if you plan to travel outside Japan with your child.