26.11.2012 Views

Download, Configure & Compile, of the HWRF Components

Download, Configure & Compile, of the HWRF Components

Download, Configure & Compile, of the HWRF Components

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2/25/10
<br />

<strong>Download</strong>,
<strong>Configure</strong>
&
<strong>Compile</strong>,
<br />

<strong>of</strong>
<strong>the</strong>
<strong>HWRF</strong>
<strong>Components</strong>
<br />

Donald
Stark
<br />

Na?onal
Center
for
Atmospheric
Research
(NCAR)
<br />

The
Developmental
Testbed
Center
(DTC)
<br />

24
February,
2010
<br />

1



Outline
<br />

• <strong>HWRF</strong>
system
components
<br />

• Where
to
get
<strong>the</strong>
codes
<br />

• User
directory
structure
<br />

• Component
directory
structure
<br />

• Unpacking,
setup,
&
build
<br />

2/25/10
<br />

2



GFS<br />

forecast<br />

NHC storm<br />

message<br />

<strong>Configure</strong> domain<br />

<strong>HWRF</strong>
System
<strong>Components</strong>
<br />

WRF
Preprocessor

<br />

Ini6al
Vortex
<br />

Improvement
<br />

Previous

<br />

6
hr
<br />

forecast
<br />

(if
available)
<br />

Ocean
Ini6aliza6on
<br />

Ini6alize
Gulf
Stream,
wake,
<br />

loop
currents
and
eddies
<br />

Wind
stress
<br />

Heat
fluxes
<br />

Geo-static data<br />

<strong>HWRF</strong>
<br />

ATMOSPHERE

<br />

<strong>HWRF</strong>

<br />

COUPLER
<br />

POM
<br />

OCEAN
<br />

SST
<br />

Post
<br />

Processing
<br />

Vortex
<br />

Tracker



<strong>HWRF</strong>
System
<strong>Components</strong>
<br />

• WRF:
Wea<strong>the</strong>r
Research
&
Forecast
Model
<br />

• WPS:
WRF
Preprocessor
<br />

• WPP:
WRF
Postprocessor
<br />

• <strong>HWRF</strong>
U?li?es:
<strong>HWRF</strong>
u?li?es
&
Vortex
Init
<br />

• POMTC:
Tropical
Cyclone
version
<strong>of</strong>
<strong>the</strong>
Princeton
<br />

Ocean
Model.
<br />

• NCEP
Coupler:
Couples
WRF
&
POMTC
<br />

• GFDL
Vortex
Tracker:
Storm
tracker
for
post
<br />

processing
<br />

2/25/10
<br />

4



<strong>Download</strong>ing
<strong>the</strong>
Source
Code
<br />

• WRF,
WPS,
&
WPP
source
code:
<br />

– hZp://www.dtcenter.org/wrf‐nmm/users/downloads/index.php
<br />

• Addi?onal
<strong>HWRF</strong>
source
code
obtained
from:
<br />

2/25/10
<br />

– hZp://www.dtcenter.org/HurrWRF/users/downloads/index.php
<br />

5



Unpacking
WRF
&
WRF
Tools
<br />

• Create
a
working
directory,
&
unpack
<strong>the</strong>
tarballs:

<br />

– mkdir


$(HOME)/<strong>HWRF</strong>/src/

<br />

– cd


$(HOME)/<strong>HWRF</strong>/src/
<br />

• The
WRF
source
code
consists
<strong>of</strong>
3
tar
files:
<br />

– WRFV3.tar.gz
<br />

– WPSV3.tar.gz
<br />

– WPPV3.tar.gz
<br />

• Unpack
<strong>the</strong>
source
inside
<strong>the</strong>
working
directory

<br />

– Unzip
<strong>the</strong>
files:
gunzip
*.tar.gz
<br />

– Untar
<strong>the</strong>
files
individually:
tar
–zxvf
file.tar
<br />

2/25/10
<br />

6



Unpacking
<strong>the</strong>
Addi?onal
<strong>Components</strong>
<br />

• Create
a
working
directory,
&
unpack
all
<strong>the</strong>
tarballs:

<br />

– mkdir


$(HOME)/<strong>HWRF</strong>/src/

<br />

– cd


$(HOME)/<strong>HWRF</strong>/src/
<br />

• The
<strong>HWRF</strong>
source
code
consists
<strong>of</strong>
4
tar
files:
<br />

– <strong>HWRF</strong>‐UTILITIES.tar.gz
<br />

– POMTC.tar.gz
<br />

– NCEP‐COUPLER.tar.gz
<br />

– GFDL‐VORTEXTRACKER.tar.gz
<br />

• Unpack
<strong>the</strong>
source
inside
<strong>the</strong>
working
directory

<br />

– Unzip
<strong>the</strong>
files:
gunzip
*.tar.gz
<br />

– Untar
<strong>the</strong>
files
individually:
tar
–xvf
file.tar
<br />

2/25/10
<br />

7



<strong>HWRF</strong>
Directory
Structure
<br />

• Seven
directories
(3
from
WRF,
4
from
<strong>HWRF</strong>)
<br />

2/25/10
<br />

– $(HOME)/<strong>HWRF</strong>/src/WRFV3
<br />

– $(HOME)/<strong>HWRF</strong>/src/WPS
<br />

– $(HOME)/<strong>HWRF</strong>/src/WPPV3
<br />

– $(HOME)/<strong>HWRF</strong>/src/hwrf‐u?li?es
<br />

– $(HOME)/<strong>HWRF</strong>/src/pomtc
<br />

– $(HOME)/<strong>HWRF</strong>/src/ncep‐coupler
<br />

– $(HOME)/<strong>HWRF</strong>/src/gfdl‐vortextracker
<br />

8



System
Requirements
<br />

• C
compiler
<br />

• Perl
<br />

• netCDF
V3
(for
WRF,
WPS,
WPP
&
hwrf‐u?li?es)
<br />

• MPI
V1+
<br />

• FORTRAN
90/95
compiler
<br />

• GrADS
(visualiza?on)
<br />

• wgrib
(decode
grib
files)
<br />

2/25/10
<br />

9



2/25/10
<br />

• IBM
AIX
xlf
<br />

Supported
Plagorms
<br />

• Linux
PGI
pgf90
V8
or
V9
<br />

• Linux
Intel
ifort
V9,
V10,
or
V11
<br />

10



Build
Infrastructure
<br />

• /arch
directory
containing
<strong>the</strong>
compile
rules.
<br />

– /arch/configure.defaults
default
plagorm
seings

<br />

• ./clean
script
to
clean
build.
<br />

• ./configure
script
to
create
configura?on
file
<br />

configure.xxx;
contains
info
on
compiler,
MPI,
<br />

&
paths.

<br />

• ./compile
script
to
compile
executable(s).
<br />

• See
WRF
or
<strong>HWRF</strong>
Users’
Guide
for
addi?onal
<br />

details.

<br />

2/25/10
<br />

11



<strong>HWRF</strong>
U?li?es
Directory
Structure
<br />

• /exec
–
hwrf‐u?li?es
executables
<br />

• /libs
–
support
libraries
<br />

• /parm
–
namelists
and
parameter
files

<br />

• /post
–
postprocessing
source
code
<br />

• /scripts
–
run
scripts
<br />

• /vortex_init
–
vortex
ini?aliza?on
source
code
<br />

• /tools
–
grbindex
source
<br />

2/25/10
<br />

12



POM‐TC
Directory
Structure
<br />

• /ocean_exec
–
POMTC
executables
<br />

• /ocean_init
–
ocean
hurricane
init
rou?nes
<br />

• /ocean_main
–
POMTC
ocean
model
source
<br />

• /ocean_parm
–
namelists
and
parameter
files
<br />

• /ocean_plot
–
ocean
ploing
scripts

<br />

• /ocean_scripts
–
run
scripts
for
POMTC
<br />

2/25/10
<br />

13



NCEP
Coupler
Directory
Structure
<br />

• /cpl_exec
–
coupler
executable
<br />

• /hwrf_pwmc
–
coupler
source
code
<br />

2/25/10
<br />

14



Vortex
Tracker
Directory
Structure
<br />

• /trk_exec
–
vortex
tracker
executables
<br />

• /trk_plot
–
ATCF
Plot,
tracker
ploing
<br />

• /trk_src
–
vortex
tracker
source
code
<br />

2/25/10
<br />

– /hwrf_geZrk
–
source
code
<br />

15



Build
Process
<br />

• Based
on
<strong>the</strong>
WRF
build
system.
See
<strong>the</strong>
<br />

<strong>HWRF</strong>
Users’
Guide
for
full
details.

<br />

• Clean
<strong>the</strong>
component
directory
./clean
–a.
<br />

• Set
necessary
library
paths,
if
needed.
<br />

• Run
<strong>the</strong>
configure
script
./configure
&
select
<br />

any
plagorm
specific
op?ons.
Creates
a
<br />

component
specific
configura?on
file
<br />

configure.componentname.
<br />

• Run
<strong>the</strong>
compile
script
./compile.
<br />

2/25/10
<br />

16



Configura?on
File
<br />

• The
configura?on
file
configure.component
is
<br />

built
from
3
pieces
within
<strong>the</strong>
arch
directory.
<br />

2/25/10
<br />

1. preamble:
uniform
requirements
for
<strong>the</strong>
code,
<br />

such
as
word
size,
etc.

<br />

2. configure.defaults:
selec?on
<strong>of</strong>
compiler,
<br />

parallel,
communica?on
layer
<br />

3. postamble:
standard
make
rules
&
dependencies
<br />

17



Clean
Compila?on
<br />

• To
remove
all
object
files
and
executables,
<br />

type: 
clean
<br />

• To
remove
all
built
files,
including
<strong>the</strong>
<br />

configure
file,
type:
clean
–a
<br />

2/25/10
<br />

– strongly
suggested
if
<br />

• Compila?on
failed
<br />

• Want
to
change
configura?on
file
<br />

18



Building
WRF
<strong>Components</strong>
for
<strong>HWRF</strong>
<br />

• WRF
components
consist
<strong>of</strong>:
<br />

– WRF
<br />

– WPS
(WRF
preprocessor)
<br />

– WPP
(WRF
post
processor)
<br />

• WPS,
WPP,
&
<strong>HWRF</strong>
u?li?es
requires
WRF
I/O
object
<br />

files.

<br />

– For
WPS,
<strong>the</strong>
build
searches
<strong>the</strong>
directory
containing
<strong>the</strong>
<br />

WPS
directory
for
<strong>the</strong>
WRF
directory.
Therefore
<strong>the</strong>
WRF
&
<br />

WPS
directories
must
must
be
at
<strong>the</strong>
same
directory
level,
<br />

with
names
unchanged.

<br />

– WPP
&
<strong>HWRF</strong>
u?li?es
finds
<strong>the</strong>
object
files
by
looking
at
<br />

<strong>the</strong>
loca?on
defined
by
<strong>the</strong>
path
variable
WRF_DIR.
In
csh/<br />

tcsh
type:
setenv
WRF_DIR
$(HOME)/<strong>HWRF</strong>/src/WRFV3
<br />

2/25/10
<br />

19



• WRF
<br />

– WPS
<br />

– WPP
<br />

<strong>HWRF</strong>
dependencies

<br />

– <strong>HWRF</strong>
U?li?es
<br />

• POM‐TC
<br />

• GFDL‐Tracker
<br />

• NCEP‐Coupler
<br />

2/25/10
<br />

20



Building
WRF
NMM
<br />

• Type
cd
./WRFV3
<br />

• Type
./clean
–a
<br />

• Set
library
paths
and
system
variables,
for
csh
<br />

– setenv
<strong>HWRF</strong>
1
<br />

– setenv
NETCDF
/path_to_netcdf_lib/
<br />

– setenv
WRF_NMM_CORE
1

<br />

– setenv
WRF_NMM_NEST
1
<br />

• For
full
details,
see
<strong>the</strong>
WRF‐NMM
Users’
Guide
<br />

– hZp://www.dtcenter.org/wrf‐nmm/users/downloads/<br />

index.php
<br />

2/25/10
<br />

21



Building
WRF
NMM
(con?nued)
<br />

• Type
./configure
<br />

– 12
compiler
op?ons
for
Linux;
select
ei<strong>the</strong>r
PGI
or
<br />

Intel
dmpar
op?on

<br />

– 4
for
IBM;
select
<strong>the</strong>
xlf
dmpar
op?on
<br />

– Select
op?on
(2)
preset
moves
for
nes?ng
<br />

– Creates
configura?on
file
configure.wrf
<br />

• For
csh
type

<br />

– ./compile
nmm_real
|&
tee
wrf.log
<br />

• Successful
compila?on
will
produce:
<br />

– Two
executables,
real_nmm.exe
&
wrf.exe,
in
/main
<br />

2/25/10
<br />

22



Building
<strong>the</strong>
remaining
<strong>Components</strong>
<br />

• <strong>HWRF</strong>
consists
<strong>of</strong>
WRF
components
&
<strong>the</strong>
<br />

remaining
<strong>HWRF</strong>
components:
<br />

– <strong>HWRF</strong>
U?li?es
<br />

– POMTC
<br />

– NCEP
Coupler
<br />

– GFDL
Vortex
Tracker
<br />

• <strong>HWRF</strong>‐U?li?es
requires
WRF‐NMM
to
build,
&
<br />

includes
<strong>the</strong>
support
libs
needed
by
<strong>the</strong>
o<strong>the</strong>r
3
<br />

components.
It
must
be
built
first.

<br />

• Remaining
components
can
be
built
in
any
order.
<br />

2/25/10
<br />

23



Building
<strong>HWRF</strong>
u?li?es
<br />

• Type
cd
./hwrf‐uVliVes

<br />

• Type
./clean
–a
<br />

• Set
path
to
WRF
(WRF_DIR)
&
check
that
netCDF
<br />

library
path
NETCDF
is
set.
<br />

• Type
./configure
<br />

– Two
compiler
op?ons
for
Linux,
one
for
IBM

<br />

– Creates
file
configure.hwrf

<br />

• For
csh
type
./compile
|&
tee
hwrf‐uVl.log
<br />

• Successful
compila?on
will
produce:
<br />

– 8
libraries;
ls
–l
hwrf‐uVliVes/libs/*.a
|
wc
<br />

– 22
executables;
ls
–l
hwrf‐uVliVes/exec/*.exe
|
wc
<br />

2/25/10
<br />

24



Building
<strong>the</strong>
remaining
<strong>Components</strong>
<br />

The
remaining
components
need
<strong>the</strong>
following
<br />

external
libraries
to
build:

<br />

• POMTC:
W3,
SP,
SFCIO,
&
BLAS
on
non‐IBM
<br />

plagorms.
<br />

• Coupler:
none
<br />

• Vortex
Tracker:
W3,
BACIO
<br />

These
five
libraries
are
provided
in
<strong>the</strong>

<br />

$(HOME)/<strong>HWRF</strong>/src/hwrf‐uVliVes/libs
directory.
<br />

2/25/10
<br />

25



Building
<strong>the</strong>
remaining
<strong>Components</strong>
<br />

• Set
<strong>the</strong>
following
library
path
variables
to
<strong>the</strong>
<br />

absolute
path
<strong>of</strong>
<strong>the</strong>
hwrf‐uVliVes/libs
directory.
<br />

2/25/10
<br />

– LIB_W3_PATH
<br />

– LIB_SP_PATH
<br />

– LIB_SFCIO_PATH
<br />

– LIB_BACIO_PATH
<br />

– LIB_BLAS_PATH
for
non‐IBM
AIX
plagorms.

<br />

In
csh,
<strong>the</strong>
syntax
to
set
a
path
is:
<br />

setenv
LIB_W3_PATH
$(HOME)/<strong>HWRF</strong>/src/hwrf‐uVliVes/libs/
<br />

26



Building
<strong>the</strong>
POM‐TC
Component
<br />

• Type
cd
./pomtc

<br />

• Type
./clean
–a
<br />

• Set
library
paths
for
W3,
SP,
SFCIO,
&
BLAS
for
<br />

Linux
<br />

• Type
./configure
<br />

– Three
op?ons
for
Linux,
one
for
IBM

<br />

– Creates
configure
file
configure.pom
<br />

• For
csh
type
./compile
|&
tee
pomtc.log
<br />

• Successful
compila?on
produces
6
executables:
<br />

– in
pomtc/ocean_exec.
<br />

2/25/10
<br />

27



Building
<strong>the</strong>
Coupler
Component
<br />

• Type
cd
./ncep‐coupler

<br />

• Type
./clean
–a
<br />

• Type
./configure
<br />

– Three
op?ons
for
Linux,
one
for
IBM
<br />

– Creates
configure
file
configure.cpl

<br />

• For
csh
type
./compile
|&
tee
cpl.log
<br />

• Successful
compila?on
produces:
<br />

2/25/10
<br />

– an
executable
hwrf_pwmc.exe
in
cpl_exec
<br />

28



Building
<strong>the</strong>
Tracker
Component
<br />

• Type
cd
./gfdl‐vortextracker

<br />

• Type
./clean
–a
<br />

• Set
library
paths
for
W3,
SP,
&
BACIO.
<br />

• Type
./configure
<br />

– Three
op?ons
for
Linux,
one
for
IBM

<br />

– Creates
configura?on
file
configure.trk
<br />

• Type
./compile
|&
tee
tracker.log
<br />

• Successful
compila?on
produces
one
executabe:
<br />

– hwrf_geZrk.exe
in
trk_exec.
<br />

2/25/10
<br />

29



Building
WPS
for
<strong>HWRF</strong>
<br />

• Requires
WRF‐NMM,
must
be
compiled
first.
<br />

• Type
cd
./WPSV3

<br />

• Type
./clean
–a
<br />

• Type
./configure
<br />

– 15
compiler
op?ons
for
Linux,
4
for
IBM

<br />

– Creates
configura?on
file
configure.wps
<br />

• For
csh
type
./compile
|&
tee
wps.log
<br />

• Successful
compila?on
produces
3
executables:
<br />

– In
WPS/
geogrid.exe,
ungrib.exe,
&
metgrid.exe
<br />

2/25/10
<br />

30



Building
WPP
for
<strong>HWRF</strong>
<br />

• Type
cd
./WPPV3
<br />

• Type
./clean
–a
<br />

• Set
library
paths
<br />

– setenv
WRF_DIR
/path_to_WRF_dir/
<br />

– setenv
<strong>HWRF</strong>
1
<br />

• Type
./configure
<br />

– 3
compile
op?ons
for
Linux,
1
for
IBM

<br />

– Creates
configura?on
file
configure.wpp
<br />

• For
csh
type
./compile
|&
tee
wpp.log
<br />

• Successful
compila?on
produces
3
executables:
<br />

– In
exec/
wrfpost.exe,
ndate.exe,
&
copygb.exe.
<br />

2/25/10
<br />

31



Support
<br />

• For
more
detailed
informa?on
on
installa?on,
<br />

please
see:
<br />

– NMM
Users’
Guide
<br />

– www.dtcenter.org/wrf‐nmm/users/downloads/<br />

index.php
<br />

– <strong>HWRF</strong>
Users’
Guide
<br />

– www.dtcenter.org/HurrWRF/users
<br />

• For
fur<strong>the</strong>r
assistance
contact:
<br />

– wroelp@ucar.edu
<br />

2/25/10
<br />

32



Summary
<br />

• Follow
<strong>the</strong>
steps
in
order.
<br />

• <strong>Download</strong>
<strong>the</strong>
latest
tarballs.

<br />

• Don’t
mix
and
match
components
from
different
<br />

releases.

<br />

• Build
components
in
proper
order
<br />

– i.e.
WRF
before
hwrf‐u?li?es.
<br />

– i.e.
hwrf‐u?li?es
before
pomtc,
coupler,
&
vortex
tracker.
<br />

– i.e.
WRF
before
WPS
&
WPP.
<br />

• Must
set
environment
paths
<br />

• When
all
else
fails,
read
<strong>the</strong>
Users’
Guide.
<br />

2/25/10
<br />

33


Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!