NCL常见错误解决方案.docx
- 文档编号:23859333
- 上传时间:2023-05-21
- 格式:DOCX
- 页数:112
- 大小:77.44KB
NCL常见错误解决方案.docx
《NCL常见错误解决方案.docx》由会员分享,可在线阅读,更多相关《NCL常见错误解决方案.docx(112页珍藏版)》请在冰豆网上搜索。
NCL常见错误解决方案
NCLFrequentlyAskedQuestions(FAQ)
Basics | NCLcorelanguage | Fileinput/output | Datahandling | Dataanalysis | Visualization | Arrayfunctions |Outputformats | Errormessages | Memoryissues | Documentation | Miscellaneous |
Basics
1.WherecanIdownloadNCL?
2.I'mhavingproblemsdownloadingNCLfromtheESGwebsite.
3.HowdoIsetupmyenvironmenttorunNCL?
4.HowdoIrunNCL?
5.HowdoIdeterminetheversionofNCL?
6.ArethereanyemaillistsIcanjoin?
7.WherecanIseesomeexamplesofhowtouseNCL?
8.ArethereanyNCLcommandlineoptionsIcanuse?
9.ArethereanyeditorenhancementsforeditingNCLscripts?
10.IfI'mrunningNCLinteractively,arethereanycommand-lineshortcutsIcanuse?
11.IfI'mrunninginteractively,howcanIloadsomeexistingNCLcode?
12.IsthereanywayIcanturnoffthepreceding"(n)"outputwhenIprintabunchofvalues?
13.MyNCLscriptisquittingsuddenly,andI'mnotsurewhereand/orwhy.
14.HowdoItellifIhaveanOPeNDAP-enabledNCL?
NCLcorelanguage
1.HowdoIcommentalineinNCL?
Isthereawaytohaveablockofcomments?
2.IsthereacontinuationcharacterinNCL?
3.HowdoIeasilyconvertanumbertoastring?
4.HowdoIcreateanewvariablethatdoesn'tcontaina_FillValueattribute?
5.HowdoIcreateadouble,long,short,orbytevariablewithoutusing"new"oroneoftheconversionroutines,like"integertobyte"?
6.HowdoIincludethedoublequote(")characterinanNCLstring?
7.CanNCLpromptforuserinput?
8.IsitpossibletohaveglobalvariablesinNCL?
9.HowcanIdeletemultipleNCLvariableswithonestatement?
10.HowdoIdeleteanameddimension?
11.IsthereawaytoseetheloadedvariablesandtheirdimensionsinNCLsimilarto"whos"inmatlab?
12.I'mgettinganunexpectedvaluewhenIusethepower('^')operatorcombinedwithanegativevalue.
13.HowdoIcreatealistofstringintegerswithleadingzeros("008","009","010",etc)?
14.HowdoIgetthecurrentdateintoNCLasastring?
15.HowdoIgetalistoffilesintoanarrayofstringsinNCL?
16.HowcanIrecursivelygetalistoffilesinadirectorytreeintoNCL?
17.HowdoIconcatenatestringsandvaluesinNCL?
18.HowdoIretrieveanenvironmentvariableinNCL?
19.HowdoIprintnicelyformatted,multiplecolumnsofdatainNCL?
20.Canmultiplevariablesbereturnedfromausercreatedfunction?
Fileinput/output
1.What'stheeasiestwaytoconvertaGRIB1,GRIB2,HDF4,orHDF-EOS2filetoaNetCDFfile?
2.HowdoIdumpthecontentsofaGRIB,HDF,orHDF-EOSfile(orvariableonthefile)tothescreen?
3.HowdoIconvertalargefiletoaNetCDFfile?
4.HowdoIwritealarge(>2GB)variabletoanetCDFfile?
5.HowdoIgetthelatesttablesforreadingGRIBfiles?
6.WhyhavesomeofmyGRIB2variablenameschangedsinceIupdatedtoNCL V5.2.0?
7.HowdoIwriteascalartoaNetCDFfile?
8.HowdoIretainmetadataforavariablethatwasreadoffaseriesoffilesusing"addfiles"?
9.HowdoIaccessanNCLfilevariable,attributes,orcoordinatearraysiftheyhavehyphens/dashes('-')inthename?
10.HowdoIread/writeNetCDF,HDF4,HDF-EOS2,GRIB1,GRIB2,orCCMHistoryTapefiles?
11.HowdoIread/writeASCIIfiles?
12.HowdoIreadCSVfiles?
13.HowdoIwriteaformattedASCIIfile?
14.HowdoIreadanASCIIfileifIdon'tknowhowmanylinesitcontains?
15.HowdoIreadanASCIIfilethatcontainsdelimiters?
16.HowdoIread/writebinaryfiles?
17.OnceI'veopenedafilewith"addfile",howdoIfindoutwhatvariablesandattributesitcontains?
18.Isthereawaytocontrolwhethermybinaryfileisreadorwrittenaslittleendianorbigendian?
19.I'mhavingtroublereadingaFortranbinaryfilewithrecords.
20.I'mtryingtoconvertafiletoaNetCDFfileusing"ncl_convert2nc",butgettinganerrormessageaboutviolatingformatconstraints.
21.WhydoIgetdifferentresultswhenreadingmyHDF-EOS2file,dependingonwhetherIusethe".hdf"or".hdfeos"extension?
22.CanIreadshapefilesusingNCL?
23.HowcanIgetatvgroupdataonmyHDF4file?
24.WhenIrunmyscript,I'mgettinganerrormessage"ncclose:
ncid0:
NetCDF:
NotavalidID".
25.WhenItrytoaccesstheClimateDiagnosticsCenter[CDC]OPeNDAPserverviaNCL,Iget"Permissiondenied".
26.I'mrunningintoaproblemwhenopeninglotsoffileswithaddfileoraddfiles("Toomanyfilesopen").
Datahandling
1.HowdoIsetamissingvalueformydata?
2.HowdoIdetermineifmydatacontainsanymissingvalues,orcounthowmanymissingvaluesithas?
3.HowdoIchangethemissingvaluetoanothervalue?
4.HowdoIdealwithNaN(not-a-number)valuesinmydata?
5.HowdoIdealwith"Inf"(infinity)valuesinmydata?
Dataanalysis
1.HowdoIaveragevaluesinamulti-dimensionedarray?
2.HowcanIdoanelement-wiseminimum/maximumbetweentwoarraysofthesamesize?
3.HowdoIinterpolatemy2-dimensionalrandomdatatoa2-dimensionalgriddedarray?
4.HowdoIinterpolatemy3-dimensionalrandomdatatoa3-dimensionalgriddedarray?
5.HowcanIfigureoutifaparticularlatitude/longitudepointiswithinaspecificarea,likeEurope?
Visualization
1.HowcanIcreatean"editable"graphicsfilerequiredforjournalpublication?
2.HowcanImaximizethesizeofaplotintheframe?
3.HowdoIgetmultipleplotsonapage?
4.What'sagoodwaytogenerateacolormap(table)?
5.Mymapprojectiondoesn'tlookright.
6.HowdoIchangeallofmyfontstobethesameinmyvisualization?
7.HowcanIchangethetextfunctioncodetosomethingotherthanacolon?
8.HowcanIgetadegreesymbolinatextstring?
9.HowcanIgetthingslikeaccentsorumlautsovermytext?
10.HowcanIgetspecialcharacters,likeGreeksymbols,inmygraphicaltextstrings?
11.CanIuserealPostScriptfontsinmyPostScriptfile?
12.I'mhavingtroubleimportingaPSfileintoanapplicationlikeAdobeIllustrator.
13.HowcanIgetthelengthofmyaxestobethesameratioastherangeofmyaxes?
14.HowdoIchangetheaspectratioorsizeofmymaporplot?
15.CanIsetcolorresourcesbycolornameratherthancolorindexvalues?
16.HowcanIspeedupthedrawingoffilledcontoursinNCL?
17.CanIchangecolorindexvaluesorcolormapsinmid-frame?
18.HowdoIgetmyPostScript/PDFoutputtocovermostofan8-1/2"x11"page?
19.HowcanIcontrolthesizeandlocationoftheX11windowthatNCLbringsup?
20.HowdoItellNCLtoignoremissingvaluesinmyplot?
21.HowcanIgetmorelabelsonmycontourlines?
22.MyXorYaxisvaluesarenotlinear.HowcanIchangethis?
23.HowdoIgetlogscalingoneitherofmyplotaxes?
24.HowdoIfillmycontourlevelswithvariousshadingpatternsand/orsolidcolors?
25.HowdoIoverlayacontourplot(oravector/streamlineplot)onamap?
26.HowdoIforcethetickmarkstopointinward?
27.I'mtryingtocontrolthetickmarksonthetoporrightaxis,andnothingishappening.
28.HowcanIimprovetheresolutionofmymapoutlines?
29.WhenIdrawamapusingthehigh-resolutionmapdatabase,Iseemtorandomlygetdifferentresolutions.
30.HowcanIgetmoregeographicaloutlinesinmymap,liketheprovincesofChina?
31.IfIamcreatingacolorcontourorvectorplot,howdoIselectmycolorssuchthattheyarespreadacrossmywholecolormap?
32.HowdoIgenerateawire-framesurfaceorisosurfaceplotinNCL?
33.HowdoIdrawweathersymbols(windbarbs,weatherfrontlines,highandlowpressureindicators,arrows,dots,weathericons,cloudsymbols,lightningbolts,etc.)onamap?
34.HowcanIhaveanewlineaspartofagraphicaltextstringinNCL?
35.HowcomeIgetdifferentlinethicknessesondifferentoutputdevicesusingthesamethicknessvalue?
36.HowcanIputatimestamponmyplot?
37.WhyamInotgettingthecolorIexpectwhenIreferenceanamedcolor?
38.WhyismylandnotbeingfilledinthecolorIexpect?
39.HowdoIsetupmyNCLscriptsothatitusesaresourcefile?
40.HowcanImoveandresizemylabelbarand/orlegend?
41.HowcanIsettheprecisionofthelabelbarlabels?
42.HowcanIgeneratesome"nice"2Drandomdataforacontourand/orvectorplot?
Arrayfunctions
1.HowdoIgetthedimensionsofanarray?
2.HowdoIcreateuniquerandomsubscripts?
3.HowdoIeliminatemissingvaluesfromaone-dimensionalarray?
4.HowdoIgenerateaone-dimensionalarrayofequally-spacedintegersorfloatingpointnumbers?
5.HowdoIfindorprinttheminimum/maximumvaluesofmydataarray?
Outputformats
1.HowdoIchangethedefaultNCGM/PostScript/PDFfilenametosomethingelse?
2.HowdoIconvertmyNCLgraphicsfiletoanotherformat,likePNG,toputontheweborinapresentation?
3.HowdoIremoveallthewhitespacefromanimage?
4.IsthereawaytomakethePostScriptfilesgeneratedbyNCLsmaller?
5.CanIproduceaPNGimagedirectlyfromNCL?
6.Isthereawaytoremovethe".000001."fromthePNGfilename?
7.HowcanItiltanNCLgraphic?
8.HowcanIconvertaseriesofPSorEPSfilestoananimation?
9.HowcanIproduceGoogleEarthkmzfiles?
10.HowdoIconvertmymulti-frameNCLgraphicsfiletoanMPEGmoviefile?
11.HowdoIincludeanencapsulatedPostScriptfilefromNCLinaLaTexdocument?
Errormessages
1.WhenIrunmyscript,I'mgettinga"fatal:
NclMallocFailed"errormessage.
2.WhenIrunNCL,Igetanerrormessageaboutbeingunabletoloadthe"SystemResourceFile".
3.WhenIrunNCL,IgetanerrormessageabouttheXdriver,like"erroropeningdisplay".
4.What'sthedealwiththeerrormessage"error:
line-1beforeornear..."?
5.HowcanIturnoffNCLwarningmessages?
6.I'mtryingtolistsomefiles,andgettinganerror"Argumentlisttoolong".
7.WhenItrytorunncl,Igetanerrorabout"libgfortr
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- NCL 常见 错误 解决方案