NCL常见错误解决方案.docx

上传人:b****4 文档编号:6223979 上传时间:2023-05-09 格式:DOCX 页数:109 大小:75.06KB
下载 相关 举报
NCL常见错误解决方案.docx_第1页
第1页 / 共109页
NCL常见错误解决方案.docx_第2页
第2页 / 共109页
NCL常见错误解决方案.docx_第3页
第3页 / 共109页
NCL常见错误解决方案.docx_第4页
第4页 / 共109页
NCL常见错误解决方案.docx_第5页
第5页 / 共109页
NCL常见错误解决方案.docx_第6页
第6页 / 共109页
NCL常见错误解决方案.docx_第7页
第7页 / 共109页
NCL常见错误解决方案.docx_第8页
第8页 / 共109页
NCL常见错误解决方案.docx_第9页
第9页 / 共109页
NCL常见错误解决方案.docx_第10页
第10页 / 共109页
NCL常见错误解决方案.docx_第11页
第11页 / 共109页
NCL常见错误解决方案.docx_第12页
第12页 / 共109页
NCL常见错误解决方案.docx_第13页
第13页 / 共109页
NCL常见错误解决方案.docx_第14页
第14页 / 共109页
NCL常见错误解决方案.docx_第15页
第15页 / 共109页
NCL常见错误解决方案.docx_第16页
第16页 / 共109页
NCL常见错误解决方案.docx_第17页
第17页 / 共109页
NCL常见错误解决方案.docx_第18页
第18页 / 共109页
NCL常见错误解决方案.docx_第19页
第19页 / 共109页
NCL常见错误解决方案.docx_第20页
第20页 / 共109页
亲,该文档总共109页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

NCL常见错误解决方案.docx

《NCL常见错误解决方案.docx》由会员分享,可在线阅读,更多相关《NCL常见错误解决方案.docx(109页珍藏版)》请在冰点文库上搜索。

NCL常见错误解决方案.docx

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

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?

HowdoIwriteascalartoaNetCDFfile

7.HowdoIretainmetadataforavariablethatwasreadoffaseriesoffilesusing"addfiles"

8.HowdoIaccessanNCLfilevariable,attributes,orcoordinatearraysiftheyhavehyphens/dashes('-')inthename

9.HowdoIread/writeNetCDF,HDF4,HDF-EOS2,GRIB1,GRIB2,orCCMHistoryTapefiles

10.HowdoIread/writeASCIIfiles

11.HowdoIreadCSVfiles

12.HowdoIwriteaformattedASCIIfile

13.HowdoIreadanASCIIfileifIdon'tknowhowmanylinesitcontains

14.HowdoIreadanASCIIfilethatcontainsdelimiters

15.HowdoIread/writebinaryfiles

16.OnceI'veopenedafilewith"addfile",howdoIfindoutwhatvariablesandattributesitcontains

17.Isthereawaytocontrolwhethermybinaryfileisreadorwrittenaslittleendianorbigendian

18.I'mhavingtroublereadingaFortranbinaryfilewithrecords.

19.I'mtryingtoconvertafiletoaNetCDFfileusing"ncl_convert2nc",butgettinganerrormessageaboutviolatingformatconstraints.

20.WhydoIgetdifferentresultswhenreadingmyHDF-EOS2file,dependingonwhetherIusethe".hdf"or".hdfeos"extension

21.CanIreadshapefilesusingNCL

22.HowcanIgetatvgroupdataonmyHDF4file

23.WhenIrunmyscript,I'mgettinganerrormessage"ncclose:

ncid0:

NetCDF:

NotavalidID".

24.WhenItrytoaccesstheClimateDiagnosticsCenter[CDC]OPeNDAPserverviaNCL,Iget"Permissiondenied".

25.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""notbeingfound.

8.I'mtryingtocompilemyNCARGraphicsprogramusingtheIntelorgfortrancompiler,butgettingsomeundefinedrefer

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 高等教育 > 管理学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2