NCLFrequentlyAskedQuestions(FAQ)Basics|NCLcorelanguage|Fileinput/output|Datahandling|Dataanalysis|Visualization|Arrayfunctions|Outputformats|Errormessages|Memoryissues|Documentation|Miscellaneous|Basics1.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?NCLcorelanguage1.HowdoIcommentalineinNCL?Isthereawaytohaveablockofcomments?2.IsthereacontinuationcharacterinNCL?3.HowdoIeasilyconvertanumbertoastring?4.HowdoIcreateanewvariablethatdoesn'tcontaina_FillValueattribute?5.HowdoIcreateadouble,long,short,orbytevariablewithoutusingneworoneoftheconversionroutines,likeintegertobyte?6.HowdoIincludethedoublequote()characterinanNCLstring?7.CanNCLpromptforuserinput?8.IsitpossibletohaveglobalvariablesinNCL?9.HowcanIdeletemultipleNCLvariableswithonestatement?10.HowdoIdeleteanameddimension?11.IsthereawaytoseetheloadedvariablesandtheirdimensionsinNCLsimilartowhosinmatlab?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/output1.What'stheeasiestwaytoconvertaGRIB1,GRIB2,HDF4,orHDF-EOS2filetoaNetCDFfile?2.HowdoIdumpthecontentsofaGRIB,HDF,orHDF-EOSfile(orvariableonthefile)tothescreen?3.HowdoIconvertalargefiletoaNetCDFfile?4.HowdoIwritealarge(2GB)variabletoanetCDFfile?5.HowdoIgetthelatesttablesforreadingGRIBfiles?6.WhyhavesomeofmyGRIB2variablenameschangedsinceIupdatedtoNCLV5.2.0?7.HowdoIwriteascalartoaNetCDFfile?8.HowdoIretainmetadataforavariablethatwasreadoffaseriesoffilesusingaddfiles?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'veopenedafilewithaddfile,howdoIfindoutwhatvariablesandattributesitcontains?18.Isthereawaytocontrolwhethermybinaryfileisreadorwrittenaslittleendianorbigendian?19.I'mhavingtroublereadingaFortranbinaryfilewithrecords.20.I'mtryingtoconvertafiletoaNetCDFfileusingncl_convert2nc,butgettinganerrormessageaboutviolatingformatconstraints.21.WhydoIgetdifferentresultswhenreadingmyHDF-EOS2file,dependingonwhetherIusethe.hdfor.hdfeosextension?22.CanIreadshapefilesusingNCL?23.HowcanIgetatvgroupdataonmyHDF4file?24.WhenIrunmyscript,I'mgettinganerrormessagencclose:ncid0:NetCDF:NotavalidID.25.WhenItrytoaccesstheClimateDiagnosticsCenter[CDC]OPeNDAPserverviaNCL,IgetPermissiondenied.26.I'mrunningintoaproblemwhenopeninglotsoffileswithaddfileoraddfiles(Toomanyfilesopen).Datahandling1.HowdoIsetamissingvalueformydata?2.HowdoIdetermineifmydatacontainsanymissingvalues,orcounthowmanymissingvaluesithas?3.HowdoIchangethemissingvaluetoanothervalue?4.HowdoIdealwithNaN(not-a-number)valuesinmydata?5.HowdoIdealwithInf(infinity)valuesinmydata?Dataanalysis1.HowdoIaveragevaluesinamulti-dimensionedarray?2.HowcanIdoanelement-wiseminimum/maximumbetweentwoarraysofthesamesize?3.HowdoIinterpolatemy2-dimensionalrandomdatatoa2-dimensionalgriddedarray?4.HowdoIinterpolatemy3-dimensionalrandomdatatoa3-dimensionalgriddedarray?5.HowcanIfigureoutifaparticularlatitude/longitudepointiswithinaspecificarea,likeEurope?Visualization1.HowcanIcreateaneditablegraphicsfilerequiredforjournalpublication?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.CanIsetcolorresourcesbycolornam