Tutorial WRF

You might also like

Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 20

Basic Software Installation

sudo apt-get install csh && sudo apt-get install gfortran && sudo apt-get
install m4 && sudo apt-get install mpich && sudo apt-get install libhdf5-
mpich-dev && sudo apt-get install libpng-dev && sudo apt-get install
libjasper-dev && sudo apt-get install libnetcdff-dev && sudo apt-get install
netcdf-bin

System Environment Tests


which gfortran && which cpp && which gcc && mkdir Build_WRF && cd Build_WRF
&&mkdir LIBRARIES TEST && cd TEST && wget
https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compile_tutorial/tar_files/Fort
ran_C_tests.tar && tar -xvf Fortran_C_tests.tar && gfortran
TEST_1_fortran_only_fixed.f && ./a.out && gfortran
TEST_2_fortran_only_free.f90 && ./a.out && gcc TEST_3_c_only.c && ./a.out &&
gcc -c -m64 TEST_4_fortran+c_c.c && gfortran -c -m64 TEST_4_fortran+c_f.f90
&&gfortran -m64 TEST_4_fortran+c_f.o TEST_4_fortran+c_c.o && ./a.out &&
./TEST_csh.csh && ./TEST_perl.pl && ./TEST_sh.sh

#WRF environment variables


export DIR=/home/wahyu/WRF/LIBRARIES
export CC=gcc
export CXX=g++
export FC=gfortran
export FCFLAGS=-m64
export F77=gfortran
export FFLAGS=-m64

wget
https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compile_tutorial/tar_files/Fort
ran_C_NETCDF_MPI_tests.tar && tar -xvf Fortran_C_NETCDF_MPI_tests.tar && cp
${NETCDF}/include/netcdf.inc . && gfortran -c 01_fortran+c+netcdf_f.f && gcc
-c 01_fortran+c+netcdf_c.c && gfortran 01_fortran+c+netcdf_f.o
01_fortran+c+netcdf_c.o -L${NETCDF}/lib -lnetcdff -lnetcdf && ./a.out && cp
${NETCDF}/include/netcdf.inc . && mpif90 -c 02_fortran+c+netcdf+mpi_f.f &&
mpicc -c 02_fortran+c+netcdf+mpi_c.c && mpif90 02_fortran+c+netcdf+mpi_f.o
02_fortran+c+netcdf+mpi_c.o -L${NETCDF}/lib -lnetcdff -lnetcdf && mpirun
./a.out

hdf hdf5 hdf5-1.10.1


WRF Installation
./configure
Pilih no. 34 (dmpar GNU)
Pilih no. 1 (basic)

./compile em_real >& compile.log & tail -f compile.log && ls -ls main/*.exe

./clean && sudo nano ~/.bashrc

export JASPERLIB=$DIR/grib2/lib
export JASPERINC=$DIR/grib2/include

source ~bashrc && ./configure

./compile >& compile.log & tail -f compile.log && ls -ls *.exe

ls -ls && ./configure

-L$(NETCDF)/lib -lnetcdf -lnetcdff -I$(NETCDF)/include -lnetcdf

CFLAGS = -fPIC -m64


CPP = /lib/cpp -P -traditional

./compile && ls -ls *.exe


Mengatasi Laptop Hang (Freeze) saat di Ubuntu:
Menekan tombol Alt+PrtSc dan diikuti tombol R+E+I+S+U+B
R = MENGAMBIL ALIH KEYBOARD DARI RAW
E = MENGIRIM SINYAL SIGTERM KE SEMUA PROSES SELAIN INIT
I = MENGIRIM SINYAL SIGKILL KE SEMUA PROSES SELAIN INIT
S = MENYINGKRONISASI FILESYSTEM
U = MENDROP FILESYSTEM YANG ADA PADA READ ONLY MODE
B = MELAKUKAN REBOOT UNTUK SISTEM

Tutorial Download Data csh


chmod +x download_ds083.2.csh
./download_ds083.2.csh dunia123

Cek Data Parameter FNL


sudo apt-get install cdo
sudo apt-get install grads
cdo -f nc copy fnl_20171126_18_00.grib2 fnl_20171126_18_00.nc

grads
sdfopen fnl_20171126_18_00.nc
q file
Descriptor: fnl_20171126_18_00.nc
Binary: fnl_20171126_18_00.nc
Type = Gridded
Xsize = 360 Ysize = 181 Zsize = 1 Tsize = 1 Esize = 1
Number of Variables = 26
u 1 t,z,y,x U component of wind
v 1 t,z,y,x V component of wind
vrate 1 t,z,y,x Ventilation Rate
gust 0 t,y,x Wind speed (gust)
hindex 0 t,y,x Haines Index
mslet 0 t,y,x MSLP (Eta model reduction)
sp 0 t,y,x Surface pressure
orog 0 t,y,x Orography
t_2 0 t,y,x Temperature
sdwe 0 t,y,x Water equivalent of accumulated snow depth (deprecated)
sde 0 t,y,x Snow depth
cpofp 0 t,y,x Percent frozen precipitation
wilt 0 t,y,x Wilting Point
fldcp 0 t,y,x Field Capacity
sunsd 0 t,y,x Sunshine Duration
lftx 0 t,y,x Surface lifted index
cape 0 t,y,x Convective available potential energy
cin 0 t,y,x Convective inhibition
gh_4 0 t,y,x Geopotential Height
r_3 0 t,y,x Relative humidity
4lftx 0 t,y,x Best (4-layer) lifted index
hpbl 0 t,y,x Planetary boundary layer height
lsm 0 t,y,x Land-sea mask
ci 0 t,y,x Sea ice area fraction
prmsl 0 t,y,x Pressure reduced to MSL
landn 0 t,y,x Land-sea coverage (nearest neighbor) [land=1,sea=0]
WPS Running with WRFDomainWizard
Masuk folder WRFDomainWizard
./run_DomainWizard
AWS Digi Stamet Maritim Tanjung Mas Semarang -6.95; 110.41817
Mercator
Grid point 27 km
nesting:
domain 2 = 3 ; 2m
domain 3 = 3 ; 30s

Set:
&time_control
run_days = 2,
run_hours = 0,
run_minutes = 0,
run_seconds = 0,
start_year = 2021, 2021, 2021,
start_month = 02, 02, 02,
start_day = 04, 04, 04,
start_hour = 06, 06, 06,
start_minute = 00, 00, 00,
start_second = 00, 00, 00,
end_year = 2021, 2021, 2021,
end_month = 02, 02, 02,
end_day = 06, 06, 06,
end_hour = 06, 06, 06,
end_minute = 00, 00, 00,
end_second = 00, 00, 00,
interval_seconds = 21600,
input_from_file = .true., .true., .true.,
history_interval = 180, 60, 60,
frames_per_outfile = 1000, 1000, 1000,

&domains
time_step = 150,
time_step_fract_num = 0,
time_step_fract_den = 1,
max_dom = 3,
e_we = 100, 88, 76,
e_sn = 100, 88, 76,
e_vert = 35, 35, 35,
num_metgrid_levels = 34,
dx = 27000, 9000, 3000,
dy = 27000, 9000, 3000,

&physics
mp_physics = 6, 6, 6,
ra_lw_physics = 4, 4, 4,
ra_sw_physics = 4, 4, 4,
radt = 30, 30, 30,
sf_sfclay_physics = 91, 91, 91,
sf_surface_physics = 2, 2, 2,
bl_pbl_physics = 1, 1, 1,
cu_physics = 16, 16, 0,
WPS Running
Manual
(Open Terminal di Folder WRF)
mkdir latihan1
cd latihan1
mkdir arwpost
mkdir data
mkdir ARW
cd ARW
ln -sf /home/wahyu/WRF/WPS/link_grib.csh /home/wahyu/WRF/WPS/geogrid
/home/wahyu/WRF/WPS/geogrid/geogrid.exe /home/wahyu/WRF/WPS/metgrid
/home/wahyu/WRF/WPS/metgrid.exe /home/wahyu/WRF/WPS/ungrib
/home/wahyu/WRF/WPS/ungrib/ungrib.exe /home/wahyu/WRF/WRFV4/run/*.TBL
/home/wahyu/WRF/WRFV4/run/*.exe /home/wahyu/WRF/WRFV4/run/RRTM*
/home/wahyu/WRF/WRFV4/run/ozone* .

ln -sf /home/wahyu/WRF/WPS/metgrid/METGRID.TBL .
ln -sf /home/wahyu/WRF/WPS/geogrid/GEOGRID.TBL .

cp /home/wahyu/WRF/WPS/namelist.wps ~/WRF/WPS/util/plotgrids_new.ncl .
cp /home/wahyu/WRF/WPS/ungrib/Variable_Tables/Vtable.GFS Vtable
cp /home/wahyu/WRF/WRFV4/run/namelist.input namelist.input

cd ..
cd arwpost
ln -sf /home/wahyu/WRF/ARWpost /home/wahyu/WRF/ARWpost/src/ARWpost.exe .
ln -sf /home/wahyu/WRF/ARWpost/src .
ln -sf /home/wahyu/WRF/ARWpost/script .
cp /home/wahyu/WRF/ARWpost/namelist.ARWpost .

Selanjutnya pindahkan file input (FNL/GFS) ke folder latihan1/data


Kemudian: masuk ke folder ARW → digunakan untuk me-running WPS
Kemudian: mengedit namelist.wps sesuai dengan namelist.wps WRFDomainWizard
Kemudian: simpan dan keluar
Contoh:
Kemudian: Simpan dan keluar dari proses edit namelist.wps
Selanjutnya: mengedit namelist.input sesuai dengan konfigurasi yang akan
digunakan
Kemudian: Simpan dan keluar dari proses edit namelist.input

(Open Terminal di WRF/latihan1/ARW)


./geogrid.exe
./link_grib.csh /home/wahyu/WRF/bismillahTA/data/ .
./ungrib.exe
./metgrid.exe
Error WPS Running 1 Juni 2021
1. geogrid → permasalahan pada wps geog yang tidak lengkap disarankan untuk
mengunduh file tambahan selain “Mandatory Static Data”
https://www2.mmm.ucar.edu/wrf/users/download/get_sources_wps_geog.html

Berikut beberapa yang harus didownload dan di ekstrak pada folder wps geog
WPS Geographical Input Data Mandatory for Specific Applications
Thompson28 and Chem Tar File
Urban Tar File (Urban Physics (sf_urban_physics=1, 2, or 3)) dan SSiB LSM
(sf_surface_physics=8)
Lake Model (sf_lake_physics=1)
NMM Dynamical Core
Optional WPS Geographical Input Data
Simulations Older than Year 2000
Alternative Data Source for all LSM's

2. metgrid → permasalahan pada error while loading shared libraries:


libpng12.so.0
Berikut link untuk menyelesaikan permasalahan:
https://askubuntu.com/questions/895897/error-while-loading-shared-libraries-
libpng12-so-0

Berikut source code:


wget
http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng_1.2.54.orig.tar.xz

tar xvf libpng_1.2.54.orig.tar.xz

cd libpng-1.2.54
./autogen.sh
./configure
make -j8
sudo make install

then update the links with:


sudo ldconfig

prior to any of this assure you machine has these preliminary packages installed ... baseline for any
dev kit
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libtool autoconf build-essential pkg-config automake tcsh
WRF Running 2 Juni 2021
Manual
(Open Terminal di folder /WRF/latihan1/ARW)
./real.exe
mpirun -np 4 ./wrf.exe
Membuka Terminal Lain, lalu ketikkan: tail -f rsl.out.0000
Contoh Error:

Hasil WPS menggunakan WRFDomainWizard


Buka Terminal pada folder studi kasus
ln -sf ~/WRF/WRFV4/run/*.TBL ~/WRF/WRFV4/run/*.exe ~/WRF/WRFV4/run/RRTM*
~/WRF/WRFV4/run/CLM* ~/WRF/WRFV4/run/ozone* .
cp ~/WRF/WPS/util/plotgrids_new.ncl .
./real.exe
mpirun -np 4 ./wrf.exe
*keterangan: 4 menunjukkan bahwa RAM yang digunakan adalah 4GB
Buka Terminal pada folder studi kasus (yang lain) untuk mengetahui perkembangan
tail -f rsl.out.0000
Untuk mencari solusi permasalahan:
https://forum.mmm.ucar.edu/phpBB3/index.php?sid=a1f942ba3cb745f473c02cadb2e87040
Post-Processing (9 Jun 2021)

ln -sf ~/WRF/ARWpost ~/WRF/ARWpost/src/ARWpost.exe .


ln -sf /home/wahyu/WRF/ARWpost/src .
ln -sf /home/wahyu/WRF/ARWpost/script .
cp ~/WRF/ARWpost/namelist.ARWpost .

&datetime
start_date = '2021-02-04_06:00:00',
end_date = '2021-02-06_06:00:00',
interval_seconds = 3600,
tacc = 0,
debug_level = 0,
/

&io
input_root_name = './wrfout_d03_2021-02-04_06:00:00'
output_root_name = './D3'
plot = 'all_list'
fields =
'height,geopt,theta,tc,tk,td,td2,rh,rh2,umet,vmet,pressure,u10m,v10m,wdir,wspd,wd10,ws10,sl
p,mcape,mcin,lcl,lfc,cape,cin,dbz,max_dbz,clfr'

Menjalankan ARWpost
./ARWpost.exe

Skrip CAPE
reinit
open D3.ctl
set grid off
set arrlab off
set grads off
set timelab off
set csmooth on
set font 1
set time 19Z05FEB2021
set map 1 1 3
set xlint 5.0
set ylint 2.0
set gxout shaded
set clevs 500 1000 1500 2000 2500 3000 3500
d CAPE
/home/wahyu/grads/cbarn.gs
draw xlab LONGITUDE
set strsiz 0.13
set string 1 bl 6 0
draw string 9.4 1.8 (J/kg)
draw title CAPE 19 UTC 05-02-2021
printim CAPE1905.png white
c
;----------------------------------------------------------------------
; WRF_pcp_2.ncl
;
; Concepts illustrated:
; - Plotting WRF data
; - Overlaying WRF precipitation on terrain map using gsn_csm functions
; - Setting the correct WRF map projection using wrf_map_resources
; - Creating two contour plots with two sets of filled contours
; - Explicitly setting contour levels
; - Drawing fully transparent filled contours
; - Turning the tickmarks inward on the X and Y axes
; - Moving the contour informational label into the plot
; - Customizing the contour informational label
;----------------------------------------------------------------------
; This script shows how to plot WRF rain totals on a WRF terrain map,
; using transparency for all rain totals below a certain level.
;----------------------------------------------------------------------
; This script was contributed by Xiao-Ming Hu (xhu@ou.edu)
; Center for Analysis and Prediction of Storms
; University of Oklahoma
;----------------------------------------------------------------------
; These files are loaded by default in NCL V6.2.0 and newer
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
; load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin
idomain = 3 ; 3,3

;---Rain data
f0 = addfile("wrfout_d0"+idomain+"_2021-02-06_00:00:00.nc","r")
Times = f0->Times
dims = dimsizes(Times)
RAINC = f0->RAINC(0,:,:)
RAINNC = f0->RAINNC(0,:,:)
RainTotal = RAINC(:,:)

;---Terrain data
fmap = addfile("wrfinput_d0"+idomain+".nc","r")
HGT = fmap->HGT(0,:,:)
HGT =(/HGT/1000./)

;---Start the graphics


wks = gsn_open_wks("png" ,"CH0600")

;---Set resources for terrain plot


res_ter = True ; plot mods desired

res_ter@gsnFrame = False
res_ter@gsnDraw = False

res_ter@cnFillOn = True ; color plot desired


res_ter@cnFillPalette = "gsltod" ; Select grayscale colormap
res_ter@cnLinesOn = False ; turn off contour lines
res_ter@cnLineLabelsOn = False ; turn off contour labels
res_ter@cnFillMode = "RasterFill"
res_ter@cnFillOpacityF = 1.
res_ter@lbLabelBarOn = False
res_ter@gsnRightString = ""

res_ter = wrf_map_resources(fmap, res_ter) ; set map resources to match


those on WRF file

res_ter@tfDoNDCOverlay = True
res_ter@mpOutlineBoundarySets = "AllBoundaries"
res_ter@mpDataSetName = "Earth..4" ; Gives us provincial
boundaries
res_ter@mpGeophysicalLineThicknessF = 1.5 ; thickness of map outlines
res_ter@mpProvincialLineThicknessF = 2.
res_ter@mpProvincialLineColor = "black"

res_ter@pmTickMarkDisplayMode = "Always" ; turn on nicer tickmarks


res_ter@tmXBLabelFontHeightF = 0.018
res_ter@tmYLLabelFontHeightF = 0.018
res_ter@tmYLLabelStride = 2 ; label every other tickmark
res_ter@tmXBLabelStride = 2

;---Point the tickmarks inward


res_ter@tmYRMajorOutwardLengthF = 0
res_ter@tmYLMajorOutwardLengthF = 0
res_ter@tmXBMajorOutwardLengthF = 0
res_ter@tmXBMinorOutwardLengthF = 0
res_ter@tmXTOn = True
res_ter@tmYROn = True
res_ter@tmYRLabelsOn = False
res_ter@tmXTLabelsOn = False

;---Set resources for rain total contour plot


res_tot = True
res_tot@gsnFrame = False
res_tot@gsnDraw = False

cmap := read_colormap_file("BlAqGrYeOrReVi200")
cmap(0,:) = (/0,0,0,0/) ; make first color fully transparent

res_tot@cnFillOn = True
res_tot@cnFillMode = "RasterFill"
res_tot@cnFillPalette = cmap
res_tot@cnLinesOn = False ; turn off contour lines
res_tot@cnLineLabelsOn = False ; turn off contour labels
res_tot@cnFillOpacityF = 1. ; .85

res_tot@tfDoNDCOverlay = True

res_tot@cnLevelSelectionMode = "ManualLevels"
res_tot@cnMaxLevelValF = 42
res_tot@cnMinLevelValF = 2
res_tot@cnLevelSpacingF = 4

res_tot@pmLabelBarHeightF = 0.08 ; Make labelbar less thick


res_tot@lbLabelFontHeightF = 0.014
res_tot@pmLabelBarOrthogonalPosF = -0.008

res_tot@cnInfoLabelOn = True
res_tot@cnInfoLabelString = "Min= $ZMN$ Max= $ZMX$"
res_tot@cnInfoLabelOrthogonalPosF = -0.104 ; move info label into plot

res_tot@tiMainFont = "Helvetica-bold"
res_tot@tiMainFontHeightF = 0.018
res_tot@gsnRightString = "RAIN, mm"
res_tot@gsnLeftString = ""

do ihour = 18,18 ; 0, dims(0)-2


istart = ihour
iend = ihour+6

RainTotal = (/(f0->RAINC(iend,:,:) + f0->RAINNC(iend,:,:) - \


(f0->RAINC(istart,:,:) + f0->RAINNC(istart,:,:)))/1. /)

res_tot@tiMainString = "6-hourly RAINC+RAINNC " +chartostring(f0-


>Times(iend,:))
plot_terrain = gsn_csm_contour_map(wks,HGT,res_ter)
plot_raintot = gsn_csm_contour(wks,RainTotal,res_tot)

overlay(plot_terrain, plot_raintot)
draw(plot_terrain)
frame(wks)
end do ; ihour
end

menjalankannya dengan
ncl SkripNCL.ncl
Untuk mengecek urutan waktu pada WRFout (untuk mengisi waktu awal hujan di Skrip NCL)
ncdump -v Times wrfout_d03_2021-02-17_18\:00\:00
Hasilnya:
Times =
0 "2021-02-04_06:00:00",
1 "2021-02-04_07:00:00",
2 "2021-02-04_08:00:00",
3 "2021-02-04_09:00:00",
4 "2021-02-04_10:00:00",
5 "2021-02-04_11:00:00",
6 "2021-02-04_12:00:00",
7 "2021-02-04_13:00:00",
8 "2021-02-04_14:00:00",
9 "2021-02-04_15:00:00",
10 "2021-02-04_16:00:00",
11 "2021-02-04_17:00:00",
12 "2021-02-04_18:00:00",
13 "2021-02-04_19:00:00",
14 "2021-02-04_20:00:00",
15 "2021-02-04_21:00:00",
16 "2021-02-04_22:00:00",
17 "2021-02-04_23:00:00",
18 "2021-02-05_00:00:00",
19 "2021-02-05_01:00:00",
20 "2021-02-05_02:00:00",
21 "2021-02-05_03:00:00",
22 "2021-02-05_04:00:00",
23 "2021-02-05_05:00:00",
24 "2021-02-05_06:00:00",
25 "2021-02-05_07:00:00",
26 "2021-02-05_08:00:00",
27 "2021-02-05_09:00:00",
28 "2021-02-05_10:00:00",
29 "2021-02-05_11:00:00",
30 "2021-02-05_12:00:00",
31 "2021-02-05_13:00:00",
32 "2021-02-05_14:00:00",
33 "2021-02-05_15:00:00",
34 "2021-02-05_16:00:00",
35 "2021-02-05_17:00:00",
36 "2021-02-05_18:00:00",
37 "2021-02-05_19:00:00",
38 "2021-02-05_20:00:00",
39 "2021-02-05_21:00:00",
40 "2021-02-05_22:00:00",
41 "2021-02-05_23:00:00",
42 "2021-02-06_00:00:00",
43 "2021-02-06_01:00:00",
44 "2021-02-06_02:00:00",
45 "2021-02-06_03:00:00",
46 "2021-02-06_04:00:00",
47 "2021-02-06_05:00:00",
48 "2021-02-06_06:00:00" ;
}

NCL masih belum paham untuk setting waktu


Aktivasi NCL gunakan perintah: source activate ncl_stable

Instalasi wrf-python:
conda install -c conda-forge wrf-python

Mengaktifkan conda di terminal:


conda activate

CTRL+Z digunakan untuk menutup proses yang sedang berjalan


from netCDF4 import Dataset
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.cm import get_cmap
import cartopy.crs as crs
from cartopy.feature import NaturalEarthFeature

from wrf import (getvar, interplevel, to_np, latlon_coords, get_cartopy,


cartopy_xlim, cartopy_ylim)

# Open the NetCDF file


ncfile = Dataset("wrfout_d03_2021-02-04_06:00:00")

# Extract the pressure, geopotential height, and wind variables


p = getvar(ncfile, "pressure", timeidx=36)
z = getvar(ncfile, "z", units="dm", timeidx=36)
ua = getvar(ncfile, "ua", units="kt", timeidx=36)
va = getvar(ncfile, "va", units="kt", timeidx=36)
wspd = getvar(ncfile, "wspd_wdir", units="kts", timeidx=36)[0,:]

# Interpolate geopotential height, u, and v winds to 500 hPa


ht_500 = interplevel(z, p, 500)
u_500 = interplevel(ua, p, 500)
v_500 = interplevel(va, p, 500)
wspd_500 = interplevel(wspd, p, 500)

# Get the lat/lon coordinates


lats, lons = latlon_coords(ht_500)

# Get the map projection information


cart_proj = get_cartopy(ht_500)

# Create the figure


fig = plt.figure(figsize=(12,9))
ax = plt.axes(projection=cart_proj)

# Download and add the states and coastlines


states = NaturalEarthFeature(category="cultural", scale="50m",
facecolor="none",
name="admin_1_states_provinces_shp")
ax.add_feature(states, linewidth=0.5, edgecolor="black")
ax.coastlines('50m', linewidth=0.8)

# Add the 500 hPa geopotential height contours


levels = np.arange(520., 580., 6.)
contours = plt.contour(to_np(lons), to_np(lats), to_np(ht_500),
levels=levels, colors="black",
transform=crs.PlateCarree())
plt.clabel(contours, inline=1, fontsize=10, fmt="%i")

# Add the wind speed contours


levels = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 25]
wspd_contours = plt.contourf(to_np(lons), to_np(lats), to_np(wspd_500),
levels=levels,
cmap=get_cmap("rainbow"),
transform=crs.PlateCarree())
plt.colorbar(wspd_contours, ax=ax, orientation="horizontal", pad=.05)

# Add the 500 hPa wind barbs, only plotting every 125th data point.
plt.barbs(to_np(lons[::5,::5]), to_np(lats[::5,::5]),
to_np(u_500[::5, ::5]), to_np(v_500[::5, ::5]),
transform=crs.PlateCarree(), length=6)

# Set the map bounds


ax.set_xlim(cartopy_xlim(ht_500))
ax.set_ylim(cartopy_ylim(ht_500))

ax.gridlines()

plt.title("500 MB Height (dm), Wind Speed (kt), Barbs (kt)")

plt.show()

set t 20 43
set lat -6.97611
set lon 110.378

Pastikan python 3 versi terbaru sudah terinstall untuk menjalankan Anaconda Navigator

source ~/anaconda3/bin/activate root


WRF-Chem Installation
WRF dan WPS Source Code : 4.2
Prep_Chem_Sources
Global Emissions_v3
WPS GEOG: geog complete, albedo_modis, maxsnowalb_modis, greenfrac_modis_5m_with_lakes,
topo_gmted2010_5m
https://www2.mmm.ucar.edu/wrf/src/wps_files/

Persiapan:
Libraries: jasper-1.900.1, libpng-1.2.5-, mpich-3.0.4, netcdf4-4.1.3, zlib-1.2.7, hdf5-1.10.4
Download:
www.ece.uvic.ca/-frodo/jasper
www.libpng.org/pub/png/libpng.html
www.mpich.org/downloads/
www.unidata.ucar.edu/software/netcdf/
www.zlib.net/
https://support.hdfgroup.org/
Building Libraries
FNL Data
NCEP Global Analyses on 1x1 degree grids are available every six hours. The analyses are from the
NCEP Final Analyses (FNL). These were operationally prepared by NCEP, but are available for
download from NCAR/RDA.
For further information about the FNL archives at NCAR: See, http://rda.ucar.edu/datasets/ds083.2.
Type: GRIB2 data
Resolution:
1deg global data
Output frequency 6 hourly
34 pressure levels
Availability: These data are available at NCAR/RDA since July 30, 1999
From the web:
http://rda.ucar.edu/datasets/ds083.2
Follow the tab to "Data Access -> Internet Download". You must register (it is free) to
access the data.
 
Vtable: Vtable.GFS
Sample data (Boulder, CO, U.S. Snowstorm, Nov. 2019)
These data are available for the period November 25 at 12 UTC, through November 27 at 00 UTC,
2019 (data frequency is 6 hourly).

Notes on running UNGRIB for this data


1. Download data and place in directory ../DATA/boulder_snow, and then unpack the file
tar xzvf boulder_snow_fnl.tar.gz

2. Examine the GRIB files, e.g.,


./util/g2print.exe ../DATA/boulder_snow/fnl_20191125_12_00.grib2

3. ln -sf ungrib/Variable_Tables/Vtable.GFS Vtable


4. ./link_grib.csh ../DATA/boulder_snow/fnl_2019
5. Edit namelist.wps
start_date = '2019-11-25_12:00:00',
end_date = '2019-11-27_00:00:00',
interval_seconds = 21600,
prefix = 'FILE',

6. ./ungrib.exe
This will create an ungrib.log for your records.
7. Examine the intermediate files, e.g.,
./util/rd_intermediate.exe FILE:2019-11-25_12
ncl /util/plotfmt.ncl 'filename="FILE:2019-11-25_12"'

Sumber: https://www2.mmm.ucar.edu/wrf/OnLineTutorial/DATA/FNL/fnl.php

GFS Data
GFS (Global Forecast System) is a model product from NCEP.
Type: GRIB1 / GRIB2 data
Resolution:
0.25 deg global data
Output frequency 3 hourly
34 pressure levels
Availability:
From NCAR's RDA site: https://rda.ucar.edu/datasets/ds084.1/
Since Jan 15, 2015
Vtable: Vtable.GFS
Sample data (Colorado, U.S. Blizzard, Nov-Dec. 2019)
These data are GRIB2, with output frequency of 3 hourly.
The data are available for the period November 29 at 12 UTC, through December
01 at 00 UTC, 2019.
Notes on running UNGRIB for this data
1. Download data and place in directory ../DATA/co_blizzard, and then
unpack the file

tar xzvf co_blizzard_0p25.tar.gz

2. Examine the GRIB files, e.g.,

./util/g2print.exe
../DATA/co_blizzard/gfs.0p25.2019112912.f000.grib2

3. ln -sf ungrib/Variable_Tables/Vtable.GFS Vtable


4. ./link_grib.csh ../DATA/co_blizzard/gfs.0p25.2019
5. Edit namelist.wps

start_date = '2019-11-29_12:00:00',
end_date = '2019-12-01_00:00:00',
interval_seconds = 10800,
prefix = 'FILE',
6. ./ungrib.exe

This will create an ungrib.log for your records.

7. Examine the intermediate files, e.g.,

./util/rd_intermediate.exe FILE:2019-11-29_12
ncl /util/plotfmt_ncl 'filename="FILE:2019-11-29_12"'

Sumber: https://www2.mmm.ucar.edu/wrf/OnLineTutorial/DATA/GFS/gfs.php

You might also like