You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Matthew Thompson edited this page Sep 26, 2025
·
2 revisions
frommpl_toolkits.basemapimportBasemapimportmatplotlib.pyplotaspltimportCSnative# llcrnrlat,llcrnrlon,urcrnrlat,urcrnrlon# are the lat/lon values of the lower left and upper right corners# of the map.# resolution = 'c' means use crude resolution coastlines.m=Basemap(projection='cyl',llcrnrlat=-90,urcrnrlat=90,\
llcrnrlon=0,urcrnrlon=360,resolution='c')
m.drawcoastlines()
# The subscript starts with 0 in python# Users should specify the time, level, fieldname (var), and filenameTime=0Level=0var='T'filename='HU_getc180forweyium_c180.geosgcm_prog.20000414_2200z.nc4'lons, lats, data=CSnative.get_csdata(filename, var, Time, Level);
m.pcolor(lons,lats,data,tri=True)
plt.show()