access_UtilsWG_UtilWgDocs_NWP_Plotting_um_vn0.0.9 - ACCESS-NRI/accessdev-Trac-archive GitHub Wiki

NWP Plotting User Manual

Wenming LU

[email protected]

Created 23 May 2016 based on NWP_PLOT vn0.0.9

Update Record

PageOutline(2-8,Contents,inline,unnumbered)

Introduction

NWP_PLOT is a python/matplotlib app that plots UM data in netCDF format. NWP_PLOT produces ten standard plots: mslp_Precip, mslp_Thik, screen_Dewpoint, Screen_Temperature, Screen_Relative_Humidity, 10m_Wind, 200/500/700/850hPa Temperature, Relative_Humidity and HtWind, and 200/500/700/850/900hPa wind.

NWP_PLOT also plots any field in a netCDF file and also is able to plot the difference of a field between two netCDF files for the same region.

This application was initiated by Gary Dietachmayer, Lawrie Rikus, Peter Steinle. Ilia Bermous was the developer to deliver the first working application, and then Wenming Lu took over the development. Ivor Blockley and Michael Naughton have also contributed to the application. Wenming Lu is the current owner of this application.

NWP_PLOT Module

This application NWP_PLOT is provided as a module at raijin:/projects/access/modules. To load the module,

module use ~access/modules
module load nwp_plot/0.0.9

NWP_PLOT Using Existing Data

The APS2 sample data is TEMPORARILY located at raijin:/short/dp9/aps_test_data/util_accessdev/nwp_plot/APS2/fcst/. In this folder, there are sample data for ACCESS Global, Regional and City forecasts.

Before trying any plots,

export DATADIR=/short/dp9/aps_test_data/util_accessdev/nwp_plot/APS2/fcst/
export MYPLOTDIR=/short/dp9/aps_test_data/util_accessdev/nwp_plot/APS2/plot/

Plot ACCESS-G Global Forecast Data

1. Plot mslpPrecip

The command is very complicated; it is

nwp_plot -plot         mslpprecip    \
         -plottype     NULL          \
	 -dbase        opendap       \
	 -class        rd            \
	 -stream       oper          \
	 -expver       00pl          \
	 -number       0             \
	 -time         00            \
	 -date         20160228      \
	 -step         12/24//6      \
	 -param        0             \
         -field        NULL          \
	 -levtype      sfc           \
	 -levelist     NULL          \
	 -model        ACCESS_G      \
	 -domain       Full_Domain   \
	 -range        NULL          \
	 -perspective  NORMAL        \
	 -plotsetting  accessg       \
	 -plottitle    0             \
	 -template     Globe         \
	 -input        $DATADIR/G/od_access-g_3002_sfc_2016022800_mslpprecip.nc        \
	 -output       NULL

This command plots three mslpPrecip of Global forecast in PNG format. The sample plots are located at $MYPLOTDIR/G

mslp-precip~sfc~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
mslp-precip~sfc~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
mslp-precip~sfc~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png

2. Plot mslpPrecip Using a conf File

As seen previously, the command of plotting is quite complicated. There is an alternative way, we can define most/all those variables in a conf file and feed the conf file to the nwp_plot. It is possible to specify variables again as arguments for nwp_plot and those defined in conf file are overwritten. Here is a sample conf file for APS2 G (This file conf.aps2g is located at $MYPLOTDIR/G/),

database="opendap"
CLASS="rd"
STREAM="oper"   
EXPVER="00pl"           
NUMBER=0
DATE=20160228       
TIME=00
STEP="12/24//6"
PARAM=0
FIELD="NULL"

LEVTYPE="NULL"   #same as LEVTYPE="sfc"
LEVELIST="NULL"
 
MODEL=ACCESS_G 
INPUT="NULL"
OUTPUT="NULL"
PLOTSETTING="accessg"
PLOTTITLE=0

DOMAIN="Full_Domain"
PERSPECTIVE="NORMAL"   
RANGE="NULL"
TEMPLATE="Globe"

Then we can plot the mslpPrecip using the following command,

nwp_plot -conf ./conf.aps2g \
         -plot mslpprecip   \
         -input $DATADIR/G/od_access-g_3002_sfc_2016022800_mslpprecip.nc

Please note that in the conf.aps2g, it is defined INPUT="NULL"; however, we specify a new value which overrides this in the argument list for INPUT as $DATADIR/G/od_access-g_3002_sfc_2016022800_mslpprecip.nc. This command produces exactly same three plots as in the previous section.

3. Plot Australian Region

In the conf.aps2g, please modify

DOMAIN="Full_Domain"
RANGE="NULL"
TEMPLATE="Globe"

to

DOMAIN=Australia
RANGE="-55,0,90,180"
TEMPLATE=REGION

and execute the command

nwp_plot -conf ./conf.aps2g \
         -plot mslpprecip   \
         -input $DATADIR/G/od_access-g_3002_sfc_2016022800_mslpprecip.nc

Since DOMAIN is specified to cover only Australia, nwp_plot only produces the plots of mslpPrecip for the Australian Region. Three plots are at $MYPLOTDIR/G for reference,

mslp-precip~sfc~ACCESS_G~20150601T000000~20150601T120000~Australia.png
mslp-precip~sfc~ACCESS_G~20150601T000000~20150601T180000~Australia.png
mslp-precip~sfc~ACCESS_G~20150601T000000~20150602T000000~Australia.png

4. Plot South Hemisphere Polar Projection

In the conf.aps2g, please modify

DOMAIN="Full_Domain"
RANGE="NULL"
TEMPLATE="Globe"
PERSPECTIVE="NORMAL" 

to

DOMAIN="South_Hemisphere"
RANGE="-90,90,0,360"
TEMPLATE=POLAR
PERSPECTIVE="POLAR"     #Note that you need to specify the POLAR perspective

and execute the command

nwp_plot -conf ./conf.aps2g \
         -plot mslpprecip \
         -input $DATADIR/G/od_access-g_3002_sfc_2016022800_mslpprecip.nc

or

nwp_plot -conf ./conf.aps2g \
         -plot mp \
         -input $DATADIR/G/od_access-g_3002_sfc_2016022800_mslpprecip.nc

where mp is a shorthand for mslpprecip.

Three plots for South Hemisphere from polar view are produced from this command. They are located at $MYPLOTDIR/G for reference,

mslp-precip~sfc~ACCESS_G~20150601T000000~20150601T120000~South_Hemisphere.png
mslp-precip~sfc~ACCESS_G~20150601T000000~20150601T180000~South_Hemisphere.png
mslp-precip~sfc~ACCESS_G~20150601T000000~20150602T000000~South_Hemisphere.png

5. Plot Other Surface Fields Standard Plots

This NWP_PLOT app provides 10 standard plotting methods, of which 5 standard plotting methods are based on sfc fields. In addition to mslpPrecip, they are Screen Dewpoint, Screen Temperature, Screen Relative Humidity and 10m Wind. Note: conf.aps2g is the same as in Section 2.

Screen level dewpoint

To plot Screen Dewpoint, please run the following command,

nwp_plot -conf ./conf.aps2g \
         -plot td \
         -input $DATADIR/G/od_access-g_3002_sfc_2016022800_tdscreen.nc

OUTPUT:

TdScreen~sfc~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
TdScreen~sfc~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
TdScreen~sfc~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
Screen level temperature

To plot Screen Temperature, please run the following command,

nwp_plot -conf ./conf.aps2g \
         -plot ts \
         -input $DATADIR/G/od_access-g_3002_sfc_2016022800_tscreen.nc

OUTPUT:

TScreen~sfc~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
TScreen~sfc~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
TScreen~sfc~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
Screen level relative humidity

To plot Screen Relative Humidity, please run the following command,

nwp_plot -conf ./conf.aps2g \
         -plot rs \
         -input $DATADIR/G/od_access-g_3002_sfc_2016022800_rhscreen.nc

OUTPUT:

RHScreen~sfc~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
RHScreen~sfc~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
RHScreen~sfc~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
10m wind

To plot 10m Wind, please run the following command,

nwp_plot -conf ./conf.aps2g \
         -plot w \
         -input $DATADIR/G/od_access-g_3002_sfc_2016022800_wind.nc

OUTPUT:

windbarb~10m~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
windbarb~10m~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
windbarb~10m~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png

6. Plot Pressure Level Standard Plots

There are 5 pressure level plots: mslpThik, 200/500/700/850hPa Temperature, Relative_Humidity and HtWind, and 200/500/700/850/900hPa wind. We will introduce how to do the plotting one by one.

mslpThik

To plot mslpThik, please run the following command,

nwp_plot -conf ./conf.aps2g \
         -plot mt \
         -levtype pl \
         -levelist 500/1000 \
         -input $DATADIR/G/od_access-g_3002_pl_2016022800_mslpthik.nc

OUTPUT:

mslp-thick~sfc~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
mslp-thick~sfc~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
mslp-thick~sfc~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
200/500/700/850hPa Temperature

To plot 200/500/700/850hPa Temperature, please run the following command,

nwp_plot -conf ./conf.aps2g \
         -plot tm \
         -levtype pl \
         -levelist 200/500/700/850 \
         -input $DATADIR/G/od_access-g_3002_pl_2016022800_tmulti.nc

OUTPUT:

T~200hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
T~200hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
T~200hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
T~500hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
T~500hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
T~500hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
T~700hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
T~700hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
T~700hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
T~850hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
T~850hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
T~850hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
200/500/700/850hPa Relative_Humidity

To plot 200/500/700/850hPa Relative_Humidity, please run the following command,

nwp_plot -conf ./conf.aps2g \
         -plot rm \  
         -levtype pl \
         -levelist 200/500/700/850 \
         -input $DATADIR/G/od_access-g_3002_pl_2016022800_rhmulti.nc 

OUTPUT:

RH~200hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
RH~200hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
RH~200hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
RH~500hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
RH~500hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
RH~500hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
RH~700hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
RH~700hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
RH~700hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
RH~850hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
RH~850hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
RH~850hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
200/500/700/850hPa HtWind

To plot 200/500/700/850hPa HtWind, please run the following command,

nwp_plot -conf ./conf.aps2g \
         -plot ht \ 
         -levtype pl \
         -levelist 200/500/700/850 \
         -input $DATADIR/G/od_access-g_3002_pl_2016022800_htwind.nc 

OUTPUT:

HtWind~200hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
HtWind~200hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
HtWind~200hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
HtWind~500hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
HtWind~500hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
HtWind~500hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
HtWind~700hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
HtWind~700hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
HtWind~700hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
HtWind~850hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
HtWind~850hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
HtWind~850hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
200/500/700/850/900hPa Wind

To plot 200/500/700/850/900hPa Wind, please run the following command,

nwp_plot -conf ./conf.aps2g \
         -plot wm \           
         -levtype pl \
         -levelist 200/500/700/850/900 \
         -input $DATADIR/G/od_access-g_3002_pl_2016022800_wmulti.nc 

OUTPUT:

windbarb~200hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
windbarb~200hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
windbarb~200hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
windbarb~500hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
windbarb~500hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
windbarb~500hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
windbarb~700hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
windbarb~700hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
windbarb~700hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
windbarb~850hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
windbarb~850hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
windbarb~850hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png
windbarb~900hPa~ACCESS_G~20150601T000000~20150601T120000~Full_Domain.png
windbarb~900hPa~ACCESS_G~20150601T000000~20150601T180000~Full_Domain.png
windbarb~900hPa~ACCESS_G~20150601T000000~20150602T000000~Full_Domain.png

For all those sfc and pressure level plot methods, you may modify the domain and perspective described in Sections 3&4 to plot only the Region of Australia or the Southern hemisphere polar projection. You may also define your own domain of interest and produce the plots accordingly.

Plot ACCESS-R Regional Forecast Data

All APS2 ACCESS-R sample data is located at $DATADIR/R/. The conf file conf.aps2r and the sample plots are in $MYPLOTDIR/R. Plotting ACCESS-R data is the same as plotting ACCESS-G data. For example, to plot mslpPrecip,

nwp_plot -conf ./conf.aps2r \
         -plot mp \
         -input $DATADIR/R/rd_oper_r2t6_sfc_2016010100_mslpprecip.nc

and OUTPUT are

mslp-precip~sfc~ACCESS_R~20160101T000000~20160101T120000~Full_Domain.png
mslp-precip~sfc~ACCESS_R~20160101T000000~20160101T180000~Full_Domain.png
mslp-precip~sfc~ACCESS_R~20160101T000000~20160102T000000~Full_Domain.png
mslp-precip~sfc~ACCESS_R~20160101T000000~20160102T060000~Full_Domain.png
mslp-precip~sfc~ACCESS_R~20160101T000000~20160102T120000~Full_Domain.png
mslp-precip~sfc~ACCESS_R~20160101T000000~20160102T180000~Full_Domain.png
mslp-precip~sfc~ACCESS_R~20160101T000000~20160103T000000~Full_Domain.png
mslp-precip~sfc~ACCESS_R~20160101T000000~20160103T060000~Full_Domain.png
mslp-precip~sfc~ACCESS_R~20160101T000000~20160103T120000~Full_Domain.png
mslp-precip~sfc~ACCESS_R~20160101T000000~20160103T180000~Full_Domain.png
mslp-precip~sfc~ACCESS_R~20160101T000000~20160104T000000~Full_Domain.png

You can refer to the previous chapter on plotting Global data to produce other standard plots.

Plot ACCESS-G City Forecast Data

All APS2 ACCESS-C sample data is located at $DATADIR/C/. The conf file conf.aps2c and the sample plots are in $MYPLOTDIR/C. There are 6 domains in ACCESS-C: SY, VT, BN, AD, PH and DN. The conf file conf.aps2c is currently set up for the Sydney domain. To plot ACCESS-SY mslpPrecip, simply run

nwp_plot -conf ./conf.aps2c \
         -plot mp \
         -step 12 \
         -input $DATADIR/C/rd_access-ff_bnms_sfc_2016051400_mslpprecip.nc

Note: We specify -step to be 12 for avoiding producing many plots. OUTPUT is

mslp-precip~sfc~ACCESS_C~20160516T000000~20160516T120000~SY.png

If you plan to plot other domain, you need to modify the conf.aps2c

...
EXPVER="bnms"   #bnmv, bnmb, bnma, bnmp, bnmd
...
DOMAIN="SY"     #VT, BN, AD, PH, DN
...

You also need to check the input data

rd_access-ff_bnms_sfc_2016051400_mslpprecip.nc

to be

rd_access-ff_bnm[svbapd]_sfc_2016051400_mslpprecip.nc

Please refer to the chapter on plotting Global forecast data to produce other plots.

Plot Difference Between Dataset

On raijin at a working folder, run,

 export CONF=$RUNDIR/conf/conf.aps2g_diff
 export INPUT1=$DATADIR/G/od_access-g_3002_sfc_2016022800_mslpprecip.nc
 export INPUT2=$DATADIR/R/rd_oper_r2t6_sfc_2016010100_mslpprecip.nc

 nwp_plot -conf $CONF \
          -plot diff \
          -input $INPUT1,$INPUT2 \
          -field accum_prcp \
          -step 6

This produces the precip difference between two input netCDF file (in this case Global and Regional models).

==