[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #KIT-636282]: Python code for NUCAPS



Hi,

It looks like that file is slightly different, with a different (and in my 
opinion better) dimension name. Try changing "Number_of_CrIS_FORs-120" to 
"Number_of_CrIS_FORs".

Ryan

> ---------- Forwarded message ----------
> From: Kuciauskas, Mr. Arunas <address@hidden>
> Date: Nov 20, 2018, 7:09 PM -0700
> To: Ryan May <address@hidden>, address@hidden <address@hidden>
> Subject: RE: Python code for NUCAPS
> 
> > Ryan and John:
> >
> > HI, this is Arunas who was in your Python MetPy class at San Jose State 
> > Univ during the beginning of October.
> > You provided me with the code (below) that opened up a NUCAPS file and you 
> > were able to guide me through
> > the plotting of the various aspects including a SkewT.
> >
> > It took me a while to get back on board since my laptop was down for 
> > repairs until now. Using the Jupyter notebook, I typed in
> > your code below. I successfully got down up to the section:
> > for index in range(len(nc.dimensions['Number_of_CrIS_FORs-120'])):
> > ÂÂÂ temp = nc.variables['address@hidden'][index] * units.kelvin
> > ÂÂÂ mixing - nc.variables['address@hidden'][index]
> > ÂÂÂpress = nc.variables['address@hidden'][index] * units.hPa
> >
> > then, errors popped up here. The errors:
> >
> > KeyErrorÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 
> > Traceback (most recent call last)
> > <ipython-input-21-1840944ceba5> in <module>
> > ----> 1 for index in range(len(nc.dimensions['Number_of_CrIS_FORs-120'])):
> > ÂÂÂÂÂ 2ÂÂÂÂ temp = nc.variables['address@hidden'][index] * 
> > units.kelvin
> > ÂÂÂÂÂ 3ÂÂÂÂ mixing - nc.variables['address@hidden'][index]
> > ÂÂÂÂÂ 4ÂÂÂÂ press = nc.variables['address@hidden'][index] * 
> > units.hPa
> >
> > KeyError: 'Number_of_CrIS_FORs-120'


Ticket Details
===================
Ticket ID: KIT-636282
Department: Support Python
Priority: Low
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.