Friday, 17 July 2015

WRF3.7 on gaia

Downloaded and installed on gaia: sweeneyc/Code/WRF3.7

module list

Currently Loaded Modulefiles:
  1) gcc/4.9.24.4.1
  2) openmpi/1.8.4
  3) netcdf/2014_10
  4) mpich2/1.5
  5) netcdf-fortran/

export JASPERLIB=/gaia/software/src/grib2/lib
export JASPERINC=/gaia/software/src/grib2/include
export NETCDF=/gaia/software/src/netcdf-fortran-4.4.1/build
export PHDF5=/gaia/software/src/hdf5-1.8.13/build
export NCARG_ROOT=/gaia/software/src/ncl_ncarg-6.2.1

./clean -a

./configure
#35
#1

./compile em_real

This should produce the following in main/*.exe:
wrf.exe -- model executable
real.exe -- real-data initialization
ndown.exe -- off-line, one-way nesting
tc.exe -- TC bogussing, serial only

cd ../WPS

./clean -a

./configure
#1

vim configure.wps
# WRF_DIR                 =       ../WRFV3p7
# NETCDF                  =       /gaia/software/src/netcdf-c/build
# NETCDFF                 =       /gaia/software/src/netcdf-fortran-4.4.1/build
#WRF_INCLUDE         =   ...
                        -I$(NETCDF)/include\
                        -I$(NETCDFF)/include
#WRF_LIB             =   ...
                        -L$(NETCDF)/lib -lnetcdf \
                        -L$(NETCDFF)/lib -lnetcdff -lgomp
# DM_FC               = mpif90 #-f90=gfortran
# DM_CC               = mpicc #-cc=gcc
#Append -lgomp to LDFLAGS

./compile >& log.compile

This should produce:

geogrid.exe -> geogrid/src/geogrid.exe
ungrib.exe -> ungrib/src/ungrib.exe
metgrid.exe -> metgrid/src/metgrid.exe

TEST RUN

In WPS directory, edit namelist.wps:
max_dom = 1,
geog_data_path = '/gaia/software/src/WPS_geog/'

Check domain:
module load ncl_ncarg
export NCARG_ROOT=/gaia/software/src/ncl_ncarg-6.2.1
ncl util/plotgrids_new.ncl

run ./geogrid.exe then make sure that the static file has been created:

geo_em.d01.nc

Download the Tutorial case study data

Link in the AWIP Vtable:
ln -sf ungrib/Variable_Tables/Vtable.AWIP Vtable

Link-in the GRIB data by making use of the script link_grib.csh

./link_grib.csh ../../../DATA/TESTWRF/2000012

Edit namelist.wps, and set the following:

start_date = '2000-01-24_12:00:00',
end_date = '2000-01-25_12:00:00',
interval_seconds = 21600,

Run ungrib to create the intermediate files:

./ungrib.exe >& ungrib_data.log

Run metgrid.exe to interpolate the input data on our model domain:

# module load netcdf-fortran/4.4.1 
./metgrid.exe

Change into WRF directory.
cd ../WRFV3p7/run

Link-in the met_em files created with metgrid.exe
ln -sf ../../WPS/met_em.d01.2000-01* .

namelist.input should already have default settings. Run real.exe. Check that the following two files have been created:
wrfinput_d01
wrfbdy_d01

Run wrf.exe. Check that the following file has been created:
wrfout_d01_2000-01-24_12:00:00


Move output file to Mac, and plot something with Python: