In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "NCL and Python script example analysis". In daily operation, I believe many people have doubts about NCL and Python script example analysis problems. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "NCL and Python script example analysis". Next, please follow the editor to study!
In addition, another project, geocat-viz [2], has been created, which provides a number of tool functions for drawing.
Among the many sample Python drawing scripts provided, the current deficiency is the drawing of curly vector diagrams in NCL. As shown in the following figure:
The left is drawn by Python and the right is drawn by NCL. The picture on the left is a screenshot.
It can be seen that the vector arrows in the quiver diagram drawn by matplotlib do not have the streamline of NCL, but this problem may be solved later by the upstream contribution of matplotlib.
The rest of the figure python can be easily implemented. For more examples, let's go to the official website. I won't say much here.
Or create a sample script environment by using the following command to get started:
Conda create-c conda-forge-c ncar-n geocat-examples python=3 geocat-comp geocat-datafiles geocat-viz=2020.2.18.1 netcdf4 matplotlib cartopy jupyter
Python on the left and NCL on the right
Attached:
The official images are of different sizes. In order to stitch the images of Python and NCL, this article uses two commands of ImageMagic:
Identify: get the size information of the picture convert: change the size of the picture, and splice the picture
Use the following command to get the picture size of the drawing drawn by Python and NCL, respectively
Identify xy_18_lg.pngxy_18_lg.png PNG 700x472 826x827+66+66 8-bit sRGB 163813B 0.000u 0:00.000
Then zoom out the large image, using the following command:
Convert-resize 826x827+66+66 sphx_glr_NCL_xy_18_001.png pyxy.png
Finally, the two pictures are spliced horizontally:
Convert + append pyxy.png xy_18_lg.png pyncl_xy.png at this point, on the "NCL and Python script example analysis" study is over, I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.