




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、NCL Frequently Asked Questions (FAQ)Basics|NCL core language|File input/output|Data handling|Data analysis|Visualization|Array functions|Output formats|Error messages|Memory issues|Documentation|Miscellaneous|Basics1. Where can I download NCL?2. Im having problems downloading NCL from the ESG websit
2、e.3. How do I set up my environment to run NCL?4. How do I run NCL?5. How do I determine the version of NCL?6. Are there any email lists I can join?7. Where can I see some examples of how to use NCL?8. Are there any NCL command line options I can use?9. Are there any editor enhancements for editing
3、NCL scripts?10. If Im running NCL interactively, are there any command-line shortcuts I can use?11. If Im running interactively, how can I load some existing NCL code?12. Is there anyway I can turn off the preceding (n) output when I print a bunch of values?13. My NCL script is quitting suddenly, an
4、d Im not sure where and/or why.14. How do I tell if I have an OPeNDAP-enabled NCL?NCL core language1. How do I comment a line in NCL? Is there a way to have a block of comments?2. Is there a continuation character in NCL?3. How do I easily convert a number to a string?4. How do I create a new variab
5、le that doesnt contain a _FillValue attribute?5. How do I create a double, long, short, or byte variable without using new or one of the conversion routines, like integertobyte?6. How do I include the double quote () character in an NCL string?7. Can NCL prompt for user input?8. Is it possible to ha
6、ve global variables in NCL?9. How can I delete multiple NCL variables with one statement?10. How do I delete a named dimension?11. Is there a way to see the loaded variables and their dimensions in NCL similar to whos in matlab?12. Im getting an unexpected value when I use the power () operator comb
7、ined with a negative value.13. How do I create a list of string integers with leading zeros (008, 009, 010, etc)?14. How do I get the current date into NCL as a string?15. How do I get a list of files into an array of strings in NCL?16. How can I recursively get a list of files in a directory tree i
8、nto NCL?17. How do I concatenate strings and values in NCL?18. How do I retrieve an environment variable in NCL?19. How do I print nicely formatted, multiple columns of data in NCL?20. Can multiple variables be returned from a user created function?File input/output1. Whats the easiest way to conver
9、t a GRIB1, GRIB2, HDF 4, or HDF-EOS 2 file to a NetCDF file?2. How do I dump the contents of a GRIB, HDF, or HDF-EOS file (or variable on the file) to the screen?3. How do I convert a large file to a NetCDF file?4. How do I write a large ( 2 GB) variable to a netCDF file?5. How do I get the latest t
10、ables for reading GRIB files?6. Why have some of my GRIB2 variable names changed since I updated to NCLV5.2.0?7. How do I write a scalar to a NetCDF file?8. How do I retain metadata for a variable that was read off a series of files using addfiles?9. How do I access an NCL file variable, attributes,
11、 or coordinate arrays if they have hyphens/dashes (-) in the name?10. How do I read/write NetCDF, HDF4, HDF-EOS2, GRIB1, GRIB2, or CCM History Tape files?11. How do I read/write ASCII files?12. How do I read CSV files?13. How do I write a formatted ASCII file?14. How do I read an ASCII file if I don
12、t know how many lines it contains?15. How do I read an ASCII file that contains delimiters?16. How do I read/write binary files?17. Once Ive opened a file with addfile, how do I find out what variables and attributes it contains?18. Is there a way to control whether my binary file is read or written
13、 as little endian or big endian?19. Im having trouble reading a Fortran binary file with records.20. Im trying to convert a file to a NetCDF file using ncl_convert2nc, but getting an error message about violating format constraints.21. Why do I get different results when reading my HDF-EOS2 file, de
14、pending on whether I use the .hdf or .hdfeos extension?22. Can I read shapefiles using NCL?23. How can I get at vgroup data on my HDF4 file?24. When I run my script, Im getting an error message ncclose: ncid 0: NetCDF: Not a valid ID.25. When I try to access the Climate Diagnostics Center CDC OPeNDA
15、P server via NCL, I get Permission denied.26. Im running into a problem when opening lots of files with addfile or addfiles (Too many files open).Data handling1. How do I set a missing value for my data?2. How do I determine if my data contains any missing values, or count how many missing values it
16、 has?3. How do I change the missing value to another value?4. How do I deal with NaN (not-a-number) values in my data?5. How do I deal with Inf (infinity) values in my data?Data analysis1. How do I average values in a multi-dimensioned array?2. How can I do an element-wise minimum/maximum between tw
17、o arrays of the same size?3. How do I interpolate my 2-dimensional random data to a 2-dimensional gridded array?4. How do I interpolate my 3-dimensional random data to a 3-dimensional gridded array?5. How can I figure out if a particular latitude/longitude point is within a specific area, like Europ
18、e?Visualization1. How can I create an editable graphics file required for journal publication?2. How can I maximize the size of a plot in the frame?3. How do I get multiple plots on a page?4. Whats a good way to generate a color map (table)?5. My map projection doesnt look right.6. How do I change a
19、ll of my fonts to be the same in my visualization?7. How can I change the text function code to something other than a colon?8. How can I get a degree symbol in a text string?9. How can I get things like accents or umlauts over my text?10. How can I get special characters, like Greek symbols, in my
20、graphical text strings?11. Can I use real PostScript fonts in my PostScript file?12. Im having trouble importing a PS file into an application like Adobe Illustrator.13. How can I get the length of my axes to be the same ratio as the range of my axes?14. How do I change the aspect ratio or size of m
21、y map or plot?15. Can I set color resources by color name rather than color index values?16. How can I speed up the drawing of filled contours in NCL?17. Can I change color index values or color maps in mid-frame?18. How do I get my PostScript/PDF output to cover most of an 8-1/2 x 11 page?19. How c
22、an I control the size and location of the X11 window that NCL brings up?20. How do I tell NCL to ignore missing values in my plot?21. How can I get more labels on my contour lines?22. My X or Y axis values are not linear. How can I change this?23. How do I get log scaling on either of my plot axes?2
23、4. How do I fill my contour levels with various shading patterns and/or solid colors?25. How do I overlay a contour plot (or a vector/streamline plot) on a map?26. How do I force the tickmarks to point inward?27. Im trying to control the tickmarks on the top or right axis, and nothing is happening.2
24、8. How can I improve the resolution of my map outlines?29. When I draw a map using the high-resolution map database, I seem to randomly get different resolutions.30. How can I get more geographical outlines in my map, like the provinces of China?31. If I am creating a color contour or vector plot, h
25、ow do I select my colors such that they are spread across my whole color map?32. How do I generate a wire-frame surface or isosurface plot in NCL?33. How do I draw weather symbols (wind barbs, weather front lines, high and low pressure indicators, arrows, dots, weather icons, cloud symbols, lightnin
26、g bolts, etc.) on a map?34. How can I have a new line as part of a graphical text string in NCL?35. How come I get different line thicknesses on different output devices using the same thickness value?36. How can I put a timestamp on my plot?37. Why am I not getting the color I expect when I referen
27、ce a named color?38. Why is my land not being filled in the color I expect?39. How do I set up my NCL script so that it uses a resource file?40. How can I move and resize my labelbar and/or legend?41. How can I set the precision of the label bar labels?42. How can I generate some nice 2D random data
28、 for a contour and/or vector plot?Array functions1. How do I get the dimensions of an array?2. How do I create unique random subscripts?3. How do I eliminate missing values from a one-dimensional array?4. How do I generate a one-dimensional array of equally-spaced integers or floating point numbers?
29、5. How do I find or print the minimum/maximum values of my data array?Output formats1. How do I change the default NCGM/PostScript/PDF file name to something else?2. How do I convert my NCL graphics file to another format, like PNG, to put on the web or in a presentation?3. How do I remove all the w
30、hite space from an image?4. Is there a way to make the PostScript files generated by NCL smaller?5. Can I produce a PNG image directly from NCL?6. Is there a way to remove the .000001. from the PNG filename?7. How can I tilt an NCL graphic?8. How can I convert a series of PS or EPS files to an anima
31、tion?9. How can I produce Google Earth kmz files?10. How do I convert my multi-frame NCL graphics file to an MPEG movie file?11. How do I include an encapsulated PostScript file from NCL in a LaTex document?Error messages1. When I run my script, Im getting a fatal:NclMalloc Failed error message.2. W
32、hen I run NCL, I get an error message about being unable to load the System Resource File.3. When I run NCL, I get an error message about the X driver, like error opening display.4. Whats the deal with the error message error: line -1 before or near.?5. How can I turn off NCL warning messages?6. Im
33、trying to list some files, and getting an error Argument list too long.7. When I try to run ncl, I get an error about libgfortran.so.x not being found.8. Im trying to compile my NCAR Graphics program using the Intel or gfortran compiler, but getting some undefined references.9. When I run ncl versio
34、n 5.2.0, I get an error warning:ut_calendar: Invalid specification string.10. When I run ncl, I get an error about libpng not being current.11. Im getting an error from WRAPIT about being unable to find -lgfortran.12. Im getting a strange workspace reallocation error message.13. I am trying to creat
35、e a contour plot and getting an error about the scalar field being constant.14. I am trying to create a contour plot and getting errors about sfXArray and sfYArray having an incorrect dimension size.15. Im getting an ARSCAM/ARPRAM ALGORITHM FAILURE error message.16. Im getting the error message PLCH
36、HQ - CHARACTER NUMBER 10 (w) IS NOT A LEGAL FUNCTION CODE.17. Im getting the error fatal:NhlCvtStringToEnum: Unable to convert string.18. Im getting an error from the shea_util.ncl script about copy_VarCoords being an undefined procedure.19. When running a script with overlaid plots, Im getting an e
37、rror cannot draw Plot Member.20. When I use NCLs systemfunc on a X/Cygwin system, I get the error cannot create child process.21. When I compile an NCAR Graphics program, I get errors about undefined symbols like _png_set_rows, _png_destroy_write_struct, _png_malloc, etc.22. When I use ncargex or nc
38、argf77, I get an error cannot find -lpng.23. Im trying to assign a value to an NCL variable, but getting a right hand side cant be coerced to type of left hand side error message.24. Im calling NCL from a shell script and getting a fatal error on line -1.25. Im getting an MDRGSF/MDRGOF - ERROR OPENI
39、NG RANGS/GSHHS CAT FILE error message.26. Im trying to draw primitives (markers, lines, polygons) on my plot, and getting an error essage tfPolyDrawList element 0 is invalid.27. When I call one of the gsn_csm_xxxx_map plotting scripts, I get an error message about a units attribute not being correct
40、.28. Im trying to create a contour, vector, or contour plot, and getting a weird error about spline approximation.29. When I print something in NCL, I get an error about my PAGER environment variable.Memory issues1. Whats the biggest array that NCL can allocate?2. Im running into a memory issue when
41、 I create lots of strings.Documentation1. Is there a way I can download the NCL website documentation so I can access it locally on my machine?2. Where can I see a list of all the NCL resources?3. Where can I see a list of all the NCL functions and procedures?4. Where can I see a list of links to da
42、sh patterns, marker styles, color tables, etc?Miscellaneous1. How should I cite NCL?2. How can I add a logo to an NCL plot?3. How do I call a C or Fortran function or procedure from NCL?4. How do I make sure that a C/Fortran routine I want to wrap doesnt conflict with a routine that might already be
43、 part of NCL?5. How do I fix buffering issues with NCL?6. If I obscure an NCL X11 window with another application, the X11 window doesnt refresh when I bring it back to the foreground.Basics1. Where can I download NCL?See theNCL download pagefor full instructions. You can download precompiled binari
44、es for a specific UNIX system, or source code.2. Im having problems downloading NCL from the ESG website.Please see ourESG troubleshooting guidefor help. If this doesnt help, then send email to thencl-installemail list.3. How do I set up my environment to run NCL?o Set the NCARG_ROOT environment var
45、iable and your search path to where NCL/NCARG residesIn order to use the software, you must set your NCARG_ROOT environment variable to the parent directory where the NCL executables and accompanying files were installed. You also need to make sure that the directory where the NCL/NCARG executables
46、reside are on your search path. It is best to do this from one of your .* files in your home directory. If you are not sure which shell you are running, you can do an ls -a in your home directory to see what kind of files you have that start with ., and then look in these files to see how environmen
47、t variables are set.In the example above, we would set these with the following:From C-shell (csh): setenv NCARG_ROOT /usr/local setenv PATH=/usr/local/bin:$PATHFrom bash or ksh: export NCARG_ROOT=/usr/local export PATH=/usr/local/bin:$PATHFrom sh: NCARG_ROOT=/usr/local PATH=/usr/local/bin:$PATH exp
48、ort NCARG_ROOT export PATHYou should now be set for using NCL and/or NCAR Graphics. If you have any problems, or questions about installing NCL from source code or binaries, please send email (you need to subscribe first).o Set the DISPLAY environment variable to indicate where
49、to display graphicsThis is not an NCL specific environment variable, but rather one that is used by any X11 Windows application that you run. For NCL or NCAR Graphics, it is needed when you display your graphics to an X11 window, or if you useictrans,ctrans, oridtto view yourNCGMfiles.This variable
50、must be set to the IP address or name of the machine you want to display your graphics on, for example localhost:13.0 . If you are not running on a remote machine, then you can try setting it to :0.0. Please contact your system administrator if you are not sure what to set it to.For example, from C-
51、shell (csh): setenv DISPLAY :0.0 setenv DISPLAY 2:0 setenv DISPLAY localhost:13.0From bash: export DISPLAY=:0.0 export DISPLAY=2:0 export DISPLAY=localhost:13.0o Put a .hluresfile file in your home directoryIn order to better customize the NCL graphical environment, we highly
52、 recommend that you copy a.hluresfileto your home directory. You can customize this file to your liking, but at a minimum, you want to change the default font, the default color table, and the text function code.o Special instructions if you have anOPeNDAP-enabled version of NCLYou dont need to worr
53、y about these instructions if you are not using OPenDAP.OPeNDAP-enabled binaries require some libraries to be installed on your host computer:1. Secure Sockets Layer(SSL) library2. OPeNDAPlibrariesOnce you have these libraries, you may be required to set the environment variable LD_LIBRARY_PATH (DYL
54、D_LIBRARY_PATH for Macs) to contain the directory where they are located on your host system in order for OPeNDAP-enabled versions of NCL to work properly.4. How do I run NCL?Once you have NCL installed, you can run it interactively by typing on the UNIX command line:nclThis will echo some informati
55、on to the screen, and give you a prompt: Copyright (C) 1995-2008 - All Rights Reserved University Corporation for Atmospheric Research NCAR Command Language Version 5.1.0 The use of this software is governed by a License Agreement. See / for more details.ncl 0To quit out of int
56、eractive mode, type quit (without the double quotes).To run NCL on an existing NCL script called myscript.ncl, type on the UNIX command line: ncl myscript.ncl5. How do I determine the version of NCL?The version number is echoed whenever you run NCL. You can also type ncl -V on the UNIX command line
57、to get the version number.6. Are there any email lists I can join?Yes. For basic questions about installing NCL and setting up your environment to use it:/mailman/listinfo/ncl-installFor all other questions on NCL:/mailman/listinfo/ncl-talkFor questions relating specifically to NCAR Graphics:/mailman/
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 台州职高面试题及答案
- 车辆转让与维修保养培训及配件供应合同
- 智能停车诱导系统建设与车位租赁合同
- 长铁丝考试题及答案
- 矿石分区管理方案
- 手工环保面试题及答案
- 水利施工技术方案
- 围棋初步考试题及答案
- 2026版《全品高考》选考复习方案生物38 第26讲 免疫调节含答案
- 玻璃破碎安保措施方案
- 搬迁项目临时设施拆除与废弃物处理合同
- 2025年食品安全知识考试试题库及解析答案
- 小学一年级升二年级暑假数学作业-思维应用题训练50题(附答案)
- 腹透患者健康指导
- 西安高新区管委会招聘考试真题2024
- 党史知识竞赛试题及答案
- 初中语文新课程标准试题及答案
- 宗教场所消防培训课件
- 隧道建设施工进度计划与工期保证措施
- 车工考评员培训课件
- 2025年老年人能力评估师(三级)考试模拟试题(含答案)
评论
0/150
提交评论