CONTOUR: Data coordinate system not established error [message #89008] |
Mon, 14 July 2014 20:09  |
victoria.hartwick
Messages: 1 Registered: July 2014
|
Junior Member |
|
|
Hello,
I am trying to plot a temperature contour vs log pressure and latitude. I can successfully produce a plot with a log y axis or with a linear reversed y axis (high pressure at the bottom). However when I try to use both keywords I get the above error. Below is a copy of the code in question:
contour, zt(*,*,itime), lat,zp(*,*,itime), color=0, background=255, $
Xtitle='Latitude', Ytitle='Pressure [Pa]', $
Title = 'Zonally Averaged Surface Temperature at Ls='+string(ls_year(itime)), $
thick = 6, Xrange = [-90,90],yrange=[1000,0],/ylog,/fill, $
Levels=level, C_Color=col1
The following two versions do work -
contour, zt(*,*,itime), lat,zp(*,*,itime), color=0, background=255, $
Xtitle='Latitude', Ytitle='Pressure [Pa]', $
Title = 'Zonally Averaged Surface Temperature at Ls='+string(ls_year(itime)), $
thick = 6, Xrange = [-90,90],yrange=[1000,0],/fill, $
Levels=level, C_Color=col1
contour, zt(*,*,itime), lat,zp(*,*,itime), color=0, background=255, $
Xtitle='Latitude', Ytitle='Pressure [Pa]', $
Title = 'Zonally Averaged Surface Temperature at Ls='+string(ls_year(itime)), $
thick = 6, Xrange = [-90,90],/ylog,/fill, $
Levels=level, C_Color=col1
Any ideas what might be going wrong?
|
|
|
Re: CONTOUR: Data coordinate system not established error [message #89009 is a reply to message #89008] |
Mon, 14 July 2014 20:40  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
victoria.hartwick@gmail.com writes:
> I am trying to plot a temperature contour vs log pressure and latitude. I can successfully produce a plot with a log y axis or with a linear reversed y axis (high pressure at the bottom). However when I try to use both keywords I get the above error. Below is a copy of the code in question:
>
> contour, zt(*,*,itime), lat,zp(*,*,itime), color=0, background=255, $
> Xtitle='Latitude', Ytitle='Pressure [Pa]', $
> Title = 'Zonally Averaged Surface Temperature at Ls='+string(ls_year(itime)), $
> thick = 6, Xrange = [-90,90],yrange=[1000,0],/ylog,/fill, $
> Levels=level, C_Color=col1
>
> The following two versions do work -
>
> contour, zt(*,*,itime), lat,zp(*,*,itime), color=0, background=255, $
> Xtitle='Latitude', Ytitle='Pressure [Pa]', $
> Title = 'Zonally Averaged Surface Temperature at Ls='+string(ls_year(itime)), $
> thick = 6, Xrange = [-90,90],yrange=[1000,0],/fill, $
> Levels=level, C_Color=col1
>
> contour, zt(*,*,itime), lat,zp(*,*,itime), color=0, background=255, $
> Xtitle='Latitude', Ytitle='Pressure [Pa]', $
> Title = 'Zonally Averaged Surface Temperature at Ls='+string(ls_year(itime)), $
> thick = 6, Xrange = [-90,90],/ylog,/fill, $
> Levels=level, C_Color=col1
>
>
> Any ideas what might be going wrong?
I would say what is wrong is you are trying to take the Log(0), which is
undefined. Try setting your YRange=[1,1000]. That will work better. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|