|
From: Sudheer J. <sud...@ya...> - 2013-03-02 06:20:21
|
Dear Users, I am trying to make vertical section plot along equator of Indian ocean from 45E to 100E and latitude 0. from levitus climatology using below code. What is the best and simple way to achieve this? np.meshgrid allows only 2 variables so I am not able to make x,y,z= using np.meshgrid(lat,depth,temp) how to go about this? Is there a set of codes for handling such graphs? url='http://www.marine.csiro.au/dods/nph-dods/dods-data/climatology-netcdf/levitus_monthly_temp_98.nc' import cdms2 from matplotlib import pyplot as plt from netCDF4 import Dataset as ncd f=cdms2.open(url) f.variables() x=f.getAxis('lon') y=f.getAxis('lat') z=f.getAxis('z') depth=z.getData() lat=y.getData() lon=x.getData() temp=f('TEMP') lonmin=np.where(lon==45) lonmax=np.where(lon==100) nlon=lon[lonmin:lonmax] lat0=np.where(lat==0.5) ntemp=temp[:,lat0,lonmin:lonmax] basically I wanted to make a plot plt.plot(nlon,depth,ntemp) Please help. with best regards, Sudheer *************************************************************** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile) E-mail:sjo...@gm...;sud...@ya... Web- http://oppamthadathil.tripod.com *************************************************************** |