NCL常见错误解决方案

  • 格式:docx
  • 大小:220.40 KB
  • 文档页数:84

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 |

Basics

1. Where can I download NCL?

2. I'm having problems downloading NCL from the ESG website.

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 NCL scripts?

10. If I'm running NCL interactively, are there any command-line shortcuts I can

use?

11. If I'm 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, and I'm not sure where and/or why.

14. How do I tell if I have an OPeNDAP-enabled NCL?

NCL core language

1. 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 variable that doesn't 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 have 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. I'm getting an unexpected value when I use the power ('^') operator

combined 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 into 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/output

1. What's the easiest way to convert 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 tables for reading GRIB files?

6. Why have some of my GRIB2 variable names changed since I updated to

NCL V5.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, 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'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 I've 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 as little

endian or big endian?

19. I'm having trouble reading a Fortran binary file with records.

20. I'm 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, depending 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, I'm getting an error message "ncclose: ncid 0: NetCDF:

Not a valid ID".

25. When I try to access the Climate Diagnostics Center [CDC] OPeNDAP server

via NCL, I get "Permission denied".

26. I'm running into a problem when opening lots of files with addfile or addfiles

("Too many files open").

Data handling

1. 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