Linux 2.6 have ability to create ramdrive very easy. Ramdrive is in fact seen as disk partition in operating system and thus can be mounted anywhere in filesystem tree. For wrf postprocessing you will need some free RAM for this, but for most people about 1 or 2 gigabytes will be more than sufficient. So, let' go on!
This guide is intended for Centos 5, but also other distros with 2.6 kernel will need the same or very similar procedure.
1.) login as root and do:
Code: Select all
# mkdir /ramdrive
2.) open /etc/fstab and add this line to the end:
Code: Select all
tmpfs /ramdrive tmpfs mode=0777,size=2000M 0 0
3.) I like to work with opengrads, so I download it, and install it into /opt/grads. After every reboot, this should be copied to the ramdrive so grads and its data is read from RAM and not from disk, that will ensure faster execution of code.
4.) If you installed current opengrads, it will be in directory like grads-2.0.a7.oga.3. Now, create nice symlink so you can have more opengrads versions in /opt, then easy change symlink when you upgrade...
Code: Select all
ln -s /opt/grads-2.0.a7.oga.3 /opt/grads
Code: Select all
mkdir /ramdrive/wrfems
mkdir /ramdrive/grads
chown wrf:wrf /ramdrive/wrfems
cp -R /opt/grads/Contents/* /ramdrive/grads
6.) change some wrfems env variables to reflect new grads location. Open /usr1/wrfems/EMS.cshrc and comment out three lines like this:
Code: Select all
# GRADS environment variables
#
# setenv GADDIR $EMS_UTIL/grads/data
# setenv GAUDFT $EMS_UTIL/grads/data/tables/
# setenv GASCRP $EMS_UTIL/grads/scripts
Code: Select all
set path = (. $EMS_STRC $STRC_BIN $DW_BIN $EMS_BIN $EMS_UTIL/bin $NCARG_ROOT/bin $EMS_MPI/bin /ramdrive/grads $path)
That's it, reboot and you shoud have opengrads located in your ramdrive!
To check it after reboot, login as wrf user and execute "grads -b -l". You will see line like this one:
Code: Select all
Starting "/ramdrive/grads/Linux/Versions/2.0.a7.oga.3/x86_64/grads -b -l " ...
Code: Select all
Loading User Defined Extensions table </ramdrive/grads/Linux/Versions/2.0.a7.oga.3/x86_64/gex/udxt> ... ok.
Code: Select all
Contents/Linux/Versions/2.0.a5.oga.3/x86_64/libs
Code: Select all
Contents/Linux/Versions/2.0.a5.oga.3/x86_64/gex

Also, check
Code: Select all
df -h
Code: Select all
tmpfs 2.0G 57M 1.9G 3% /ramdrive
That's all folks. When you create your grads scripts, make sure you use /ramdrive/wrfems/... path for everything you do with grads and all job will be done in RAM without touching hard disks (of course, your grib files will be still read from HDD).
Hope you will find this guide useful.