Windows down NCL generates a TIFF diagram (case)

Source: Internet
Author: User

One: Install software and prepare data

1. Need to install vapor (note that there are no spaces in the installation path)

Note: Version 2.4.2 and later

2. Installation of NCL, see http://www.cnblogs.com/striver-zhu/p/4574819.html

Note:

A. These two executables must be included: Convert && psplit, which are installed on their own in general installation

B. There is a problem with the ncl_5.1.0 version: The str_lower of the 492 rows in the WRF2GEOTIFF.NCL need to be removed, otherwise the run Times error

3. Download data: jamingWRF2

4.3 NCL files (under the Ncar\vapor\share\examples\ncl directory):
WRF_HEIGHT.NCL (This plots humidity, temperature, pressure and wind at a fixed elevation)
WRF_PRECIP.NCL (This plots precipitation tendency with pressure isobars)
Wrf_crosssection2.ncl (This is a vertical plot of relative humidity)

Two: Data conversion
1. Convert WRF data to VDC data, starting from Vapor2.0, no conversion is required, but big data is better than the conversion

Execute the following command via CMD (enter the directory where the command is located):

Wrfvdfcreate: Scans WRF data to generate vapor metadata that describes WRF data
(Wrfvdfcreate wrfout_d02_2008-09-28.nc JANGMI-09-28.VDF)
WRF2VDF: Converts 2D and 3D variables in all WRF data to the data format used by vapor, which is the VDC format
(WRF2VDF jangmi-09-28.vdf wrfout_d02_2008-09-28.nc = "Generated variables will exist in Jangmi-09-28_data directory)

Three:
1. Convert NCL-drawn data graphics into georeferenced format (in the working directory, you need to add. hluresfile files, which can only be established through the Cygwin VI (: WQ exit Save))

WRF_HEIGHT.NCL: Generate a graphic on a specific plane ()
WRF_PRECIP.NCL: Produces a graph showing precipitation trends and sea-level pressures
WRF_CROSSSECTION2.NCL: Vertical pattern of temperature and relative humidity, along a specific plane, parallel to the XZ axis
  

We convert the graphics into. PS Output file and convert these. ps files into a geo-referenced TIFF file

1). Modify the script so that it generates only one image at each time step. (If you want to use multiple images in the same time step, you need to run the script separately for each different image)

2). Modify the script to traverse all the steps in the WRF file. This may involve an outer loop (looping multiple files) and inner loops (looping through the time steps in each file)

3). Modify the script to output the. ps file

4). Add the following new line to the NCL script:

A. At the top, insert a row to load Wrf2geotiff.ncl:load "WRF2GEOTIFF.NCL" (Presence C:\NCAR\VAPOR\share\examples\NCL)
(This script and other NCL examples are the default installation subdirectory, under UNIX under Share/vapor-x.x.x/examples/ncl,windows in $ (vapor_home)/share/examples/ncl/)

B. After the NCL workstation is created, call Wrf2geotiff=wrf2geotiff_create (WKS)

C. If this is a vertical graphic, the geo-reference is forbidden:
Wrf2geotiff_disablegeotags (Wrf2gtiff)

D. Setting graphic properties [email protected]=false

E. Each time the graph is generated, insert two lines:
Wrf2geotiff_write ()
FRAME (WKS)

F. Call Wrf2geotiff_close () at the end of the file to merge graphics to generate TIFF format graphics

IV: Get a geographic file

1. Get the terrain image for the simulation area: Latitude range required, Internet access required, enter getwmsimage.sh folder

Cygwin under: Getwmsimage.sh–o Jangmiterrain.tiff 115 15 130 30

Windows down NCL generates a TIFF diagram (case)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.