Beruflich Dokumente
Kultur Dokumente
WRF advantages
Better numerics than MM5
Arakawa C grid, R-K scheme, odd order advection
w/ implicit diffusion
Much less diffusive, larger effective resolution,
permits longer time steps
Further advantages
MPI from the ground up
Allows real data and idealized simulations in
same framework
Plug-in architecture (different groups will
supply WRF cores)
Recently added: moving nests and nudging
NetCDF output - many great tools such as
NetCDF operators: http://nco.sourceforge.net/
WRF disadvantages
Bleeding edge
Smaller range of physics choices (tho more
modern)
Software design is unintuitive for physical
scientists
Can take hours to compile
But does not need frequent recompiling
WRF-ARW model
Single node and MPI
Web resources
WRF model users site
http://www.mmm.ucar.edu/wrf/users/user_main.html
Tutorial presentations
http://www.mmm.ucar.edu/wrf/users/tutorial/tutorial_presentati
on.htm
My resources
This presentation (PPT format)
http://www.atmos.ucla.edu/~fovell/WRF/wrf_tutorial_
2007.ppt
WRF on Mac OS X
http://www.atmos.ucla.edu/~fovell/WRF/WRF_ports.h
tml
http://macwrf.blogspot.com
Setup on hurricane
machines
Presumed:
tcsh environment
Intel Fortran compiler (64-bit)
my environment setup employed
precompiled versions of WRF, WPS, RIP and wrf_to_grads
Environment setup
> is the command line prompt
#RGFadditions[abridged]
setenvRIP_ROOT/home/fovell/RIP4
setenvGADDIR/home/fovell/lib/grads
setenvGASCRP/home/fovell/gradslib
#
aliaslsm'lsalt|more'
aliasrm'rmi'
aliascp'cpi'
aliasmv'mvi'
aliastrsl'tailfrsl.out.0000'
aliasmpirun'nohuptime/home/fovell/mpich1.2.7p1/bin/mpirun'
aliasw2g'/home/fovell/WRF2GrADS/wrf_to_grads'
setenvP4_GLOBMEMSIZE4096000
setenvP4_SOCKBUFSIZE65536
unlimit
limitcoredumpsize0
WPS overview
Tasks
(1) set up a domain (can be reused)
geogrid.exe
Controlled by namelist.wps
namelist.wps
&share
wrf_core='ARW',
max_dom=1,
start_date='20070902_00:00:00','20070902_00:00:00',
end_date='20070903_12:00:00','20070903_12:00:00',
interval_seconds=10800,
io_form_geogrid=2,
/
namelist.wps (cont.)
&geogrid
parent_id=1,1,
parent_grid_ratio=1,3,
i_parent_start=1,53,
j_parent_start=1,65,
e_we=70,259,
e_sn=40,199
geog_data_res='2m','2m',
dx=36000,
dy=36000,
map_proj='lambert',
ref_lat=15.0
ref_lon=75.0,
truelat1=29.6,
truelat2=29.6,
stand_lon=75.0,
geog_data_path='/home/fovell/WPS_GEOG/geog'
/
there is more
gmeta file
>ncdumpgeo_em.d01.nc|more
netcdfgeo_em.d01{
dimensions:
Time=UNLIMITED;//(1currently)
DateStrLen=19;
west_east=69;
south_north=39;
south_north_stag=40;
west_east_stag=70;
land_cat=24;
soil_cat=16;
month=12;
variables:
charTimes(Time,DateStrLen);
floatXLAT_M(Time,south_north,west_east);
XLAT_M:FieldType=104;
XLAT_M:MemoryOrder="XY";
XLAT_M:units="degreeslatitude";
XLAT_M:description="Latitudeonmassgrid";
XLAT_M:stagger="M";
namelist.input
&time_control
run_days=0,
run_hours=36,
run_minutes=0,
run_seconds=0,
start_year=2007,2007,
start_month=09,09,
start_day=02,02,
start_hour=00,00,
start_minute=00,00,
start_second=00,00,
end_year=2007,2007,
end_month=09,09,
end_day=03,03,
end_hour=12,12,
end_minute=00,00,
end_second=00,00,
namelist.input (cont.)
interval_seconds=10800
input_from_file=.true.,.true.,
history_interval=60,60,
frames_per_outfile=6,6,
restart=.false.,
restart_interval=5000,
namelist.input (cont.)
&domains
time_step=150,
time_step_fract_num=0,
time_step_fract_den=1,
max_dom=1,
s_we=1,1,1,
e_we=70,259,94,
s_sn=1,1,1,
e_sn=40,199,91,
s_vert=1,1,1,
e_vert=31,31,31,
num_metgrid_levels=27
dx=36000,12000,333,
dy=36000,12000,333,
grid_id=1,2,3,
parent_id=0,1,2,
i_parent_start=0,53,30,
j_parent_start=0,65,30,
parent_grid_ratio=1,3,3,
parent_time_step_ratio=1,3,3,
namelist.input (cont.)
&physics
mp_physics[Microphysics]=1,1,
ra_lw_physics[Longwaverad]=1,1,
ra_sw_physics[Shortwaverad]=1,1,
radt[Radiationtimestep;min]=10,10,
sf_sfclay_physics[Surfacelayer]=1,1,
sf_surface_physics[Surface]=1,1,
bl_pbl_physics[Boundarylayer]=1,1,
bldt[Boundarylayertimestep;min]=0,0,
cu_physics[cumulusscheme]=1,0,
cudt[cumulustimestep;min]=5,
isfflx=1,
ifsnow=0,
icloud=1,
surface_input_source=1,
num_soil_layers=5,
mp_zero_out=0,
Notes on physics
Need to use SAME microphysics (mp)
scheme in each domain, but can use
different cumulus (cu) schemes
Some physics combinations work better
than others, some dont work at all -this is only lightly documented
bldt = 0 means boundary layer scheme
is called every time step
namelist.input (cont.)
&dynamics
w_damping=0,
diff_opt[subgridturbulence]=1,
km_opt[]=4,
diff_6th_opt[numericalsmoothing]=0,
diff_6th_factor[]=0.12,
base_temp=290.
damp_opt=0,
zdamp=5000.,5000.,5000.,
dampcoef=0.01,0.01,0.01
khdif=0,0,0,
kvdif=0,0,0,
http://www.mmm.ucar.edu/wrf/users/tutorial/200707/WRF_Physics_Dudhia.pdf
real.exe
Has changed a lot since version 2.1.2
Number of vertical model levels now specified
w/ real.exe
e_vert=31,31,31,
num_metgrid_levels=27
Run real.exe
>mpirunnp2real.exe
wrf@iniki.atmos.ucla.edu'spassword:
startingwrftask0of2
startingwrftask1of2
2.624u1.248s0:12.6330.5%0+0k0+0io0pf+0w
>tailrsl.out.0000
>extrapolatingTEMPERATUREnearsfc:i,j,psfc,ptarget
d0120070903_12:00:00forcingartificialsiltyclayloam
LANDCHANGE=0
WATERCHANGE=0
d0120070903_12:00:00Timingforprocessing0s.
LBCvalidbetweenthesetimes20070903_09:00:00.000020070903_
d0120070903_12:00:00Timingforoutput0s.
d0120070903_12:00:00Timingforloop#13=0s.
d0120070903_12:00:00real_em:SUCCESSCOMPLETEREAL_EMINIT
Aside: password-less
execution
Last slides mpirun command asked for
2 cpus (np2)
By default, 2 cpus on same workstation
are accessed
To avoid being asked for password:
>cd~/.ssh
>sshkeygentdsa[thenhitreturn4times]
Yourpublickeyhasbeensavedin/home/wrf/.ssh/id_dsa.pub.
Thekeyfingerprintis:
cc:78:50:1e:77:23:ca:8f:81:3d:f0:d2:a4:8a:2e:a7wrf@iniki.atmos.ucla.edu
>cpid_dsa.pubauthorized_keys[ifdoesnotalreadyexist]
>cd../FELIX
Run wrf.exe
Output of real.exe is wrfbdy_d01 and
wrfinput_d01 (NetCDF files)
Additional wrfinput files created for nests if
max_dom > 1
FELIX output
Namelist set up to do 36 h run
Look for at end of rsl.out.0000 file:
d0120070903_12:00:00wrf:SUCCESSCOMPLETEWRF
RIP
RIP operates in batch mode, using input
scripts
RIP can overlay fields, do arbitrary crosssections, calculate trajectories, and create
Vis5D output files
RIP tasks include
Unpack model output data (ripdp_wrf)
Create RIP plotting scripts (rip.in files)
Execute scripts (rip)
RIP procedure
>ripdp_wrfrun1allwrfout_d01*
[thiscreatesanewdatasetcalledrun1
andusesallwrfout_d01filescreated]
>riprun1rip.T2.in
[therip.T2.infileisascriptcontaining
RIPplottingcommands]
[theoutputfile,rip.T2.cgm,isagraphics
metafile]
>Youcanviewthecgmfileusingidtorictrans
36 h forecast
(2 m T - color; SLP - contour; 10 m winds - vector)
RIP script
==========================================================================
feld=T2;ptyp=hc;vcor=s;levs=1fb;cint=0.5;cmth=fill;>
arng;cbeg=283;cend=309;cosq=0,violet,12.5,blue,25,green,37.5,>
light.green,50,white,62.5,yellow,75,orange,87.5,red,100,brown
feld=U10,V10;ptyp=hv;vcmx=20.0;colr=black;linw=1;intv=2;
feld=slp;ptyp=hc;vcor=s;levs=1fb;cint=4;nohl;colr=blue;linw=2;nolb
feld=map;ptyp=hb;colr=dark.blue;linw=2;
feld=tic;ptyp=hb
==========================================================================
http://www.mmm.ucar.edu/mm5/documents/ripug_V4.html
GrADS procedure
Copy control_file from
/home/fovell/WRFtutorial and edit
control_file
3!timestoputinGrADSfile,negativeignoresthis
00010101_00:00:00
00010101_00:05:00
00010101_00:10:00
end_of_time_list
!3DvariablelistforGrADSfile
!indentonespacetoskip
U!UCompomentofwind
V!VComponentofwind
UMET!UCompomentofwindrotated(diagnostic)
VMET!VComponentofwindrotated(diagnostic)
W!WComponentofwind
THETA!Theta
TK!TemperatureinK
TC!TemperatureinC
control_file(cont.)
!Alllistoffilestoreadhere
!Indentnottoread
!FullpathOK
wrfout_d01_20070902_00:00:00
wrfout_d01_20070902_06:00:00
wrfout_d01_20070902_12:00:00
wrfout_d01_20070902_18:00:00
wrfout_d01_20070903_00:00:00
wrfout_d01_20070903_06:00:00
wrfout_d01_20070903_12:00:00
end_of_file_list
!Nowwechecktoseewhattodowiththedata
real!real(input/output)/ideal/static
1!0=nomapbackgroundingrads,1=mapbackgroundingrads
1!specifygradsverticalgrid
!0=cartesian,
!1=interptozfromlowesth
!1listlevels(eitherheightinkm,orpressureinmb)
1000.0
950.0
900.0
850.0
800.0
750.0
Running GrADS
>gradsncl
[GrADSgraphicsoutputwindowopens]
ga>openrun1g
[ga>isGrADSenvironmentprompt]
ga>/home/fovell/WRFtutorial/T2_movie.gs
[executesthisGrADSscript;
hitreturntoadvanceaframe]
ga>quit
[toexit]
36 h forecast
(2 m T and 10 m winds)
= end =