MIM - Tutorial
Directory & File List
Name | Explanation |
---|---|
Makefile src/Makefile | Makefile for make command. |
src/*.f90 | Fortran 90 source code. |
web/ | Document (same as website) |
Readme_namelist_en.txt | Namelist syntax |
Readme_namelist_jp.txt | Namelist syntax (in Japanese) |
Readme_history_jp.txt | Change logs (in Japanese) |
input-sample/ | Sample data (NCEP/NCAR reanalysis; Kalnay et al., 1996). |
output-sample/ | Analysis results of sample data. |
sample.sh | Shell script for sample data analysis. |
Required Variables
- u-wind
- v-wind
- air temperature
- geopotential height
- surface pressure
- surface altitude
- diabatic heating (optional)
- vertical velocity (optional)
If diabatic heating is not specified, then time derivative of potential temperature, which is necessary for EP flux calculation, is estimated as total differential of potential temperature. If both diabatic heating and vertical velocity is not specified, then vertical velocity is assumed to be zero during the estimation of total differential of potential temperature.
How to Compile & Analyze Sample Data (Quick Start)
1. Edit Makefile
Specify compiler in Makefile. ifort (intel) and f90 (fujitsu) have already been checked.
2. Compile
$ make clean <- if necessary $ make
Executable file "MIM" will be created.
3. Analyze Sample Data (input-ncep/)
$ ./sample.sh
You can see analysis results in output-ncep/.
How to download, compile & analyze NCEP/NCAR reanalysis
Note: You can also apply below process to NCEP/DOE reanalysis.
1. Download & Extract Data
Visit NOAA's website and get data required for MIM analysis. For example,
$ wget ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis/pressure/uwnd.2007.nc $ wget ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis/pressure/vwnd.2007.nc $ wget ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis/pressure/air.2007.nc $ wget ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis/pressure/hgt.2007.nc $ wget ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis/surface/pres.sfc.2007.nc $ wget ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis.derived/surface/hgt.sfc.nc $ wget ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis/pressure/omega.2007.nc
Convert data format from NetCDF to GrADS. Sample programs are below for each variable (NetCDF library is needed).
- uwnd_netcdf_to_grads.f90
- vwnd_netcdf_to_grads.f90
- air_netcdf_to_grads.f90
- hgt_netcdf_to_grads.f90
- pres.sfc_netcdf_to_grads.f90
- hgt.sfc_netcdf_to_grads.f90
- omega_netcdf_to_grads.f90
If your compiler is ifort (intel),
$ ifort -assume byterecl uwnd_netcdf_to_grads.f90 -lnetcdf $ ./a.out
and so on.
2. Edit Makefile
Specify compiler in Makefile. ifort (intel) and f90 (fujitsu) have already been checked.
3. Compile
$ make clean <- if necessary $ make
Executable file "MIM" will be created.
4. Create Namelist
Namelist is a set of parameters to specify filenames, coordinates, timestep etc. Below is a sample namelist for NCEP/NCAR reanalysis. In the sample namelist, NCEP/NCAR reanalysis is assumed to be in ./input-ncep and the resulting data in ./output-ncep. See Readme.namelist.en for details about namelist syntax.
5. Analyze
$ ./MIM < namelist-ncep
You can see analysis results in output-ncep/. Sample control files for GrADS are below.
Hint for Analyzing other data
You can analyze various kind of GrADS data by editing namelist. Please read Readme_namelist_en.txt for details on how to write namelist.