This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Stuart- Stuart Maclean wrote:
Hi again Don, I mailed you before Xmas about some lack of understanding about an MM5 grid I had and wanted to plot on visad. A few points I hoped you can help me with.. My data grid wraps the dateline, i.e. some grid points's actual lon values are +ve, e.g. 175deg, whereas most of the lons are -180 -> -120 say. This means that my plot looks wrong, since I imagine that the LambertConformal is producing +ve values for lon. Can this be fixed?
I'm not familiar with the LamberConformal CoordinateSystem (we use something else in the IDV), but you could send a note to the visad-list and ask your question there.
Also, the axes are in radians, and not degrees. Do you know how I change this? One hack is to override the toReference method of the LCC to scale up to degrees but I'm sure this is not right.
You could call the ScalarMap.setOverrideUnit(Unit) method on your scalarmaps for lat/lon and use CommonUnit.degrees.
One other thing bugs me now that I am beginning to understand visad a bit more. With my grid in cartesian space, and applying the LCC, I guess we are mapping x,y -> lon,lat. But if I am not specifying any 'display' projection, then Visad will just (correctly?) think that these lat,lon values have a linear mapping on to the display axes, and so I get a strange looking field??
The coordinate system translates x,y to lat,lon (or lon,lat depending on the CS). It will use the transform to make the correct values for lat/lon at each point and then display them as such.
I have downloaded the IDV system, inc source. If I were to make a data selector for MM5 files, where might I start to poke around in the code? Is there any docs on building new selectors??
You could create a new MM5DataSource which would know how to read the MM5 format and create the appropriate DataChoices. You could use the unidata.ucar.data.grid classes as a guide. Once you have that, you would just need to add an entry into ucar.unidata.idv.resources.datasource.xml for your MM5DataSource. You would not need a new selector - you could just open the file through the file chooser at that point. Alternatively, is there a way you could output netCDF from MM5? I know there are various converters from MM5 to netCDF. Some are good, some are not. ;-) Or, could you output in Vis5D format? The IDV can read either of these directly. As an aside, I'm going to cc this note to our support archives and change the reply line to go to support. I would like to get this conversation into our archives for the benefit of others and it is better to send questions to address@hidden instead of me. I'm going to be in and out of the office for the next 6 months and if it goes to support, someone can get to it quicker. Don ************************************************************* Don Murray UCAR Unidata Program address@hidden P.O. Box 3000 (303) 497-8628 Boulder, CO 80307 http://www.unidata.ucar.edu/staff/donm "There's someone in my head, but it's not me" Roger Waters *************************************************************