[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['Temperature@NUCAPS_EDR'][index] * units.kelvin
> >     mixing - nc.variables['H2O_MR@NUCAPS_EDR'][index]
> >    press = nc.variables['Pressure@NUCAPS_EDR'][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['Temperature@NUCAPS_EDR'][index] * 
> > units.kelvin
> >       3     mixing - nc.variables['H2O_MR@NUCAPS_EDR'][index]
> >       4     press = nc.variables['Pressure@NUCAPS_EDR'][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.