I am trying to generate a vertical cross section of a geopotential height anomaly from NOAA reanalysis data. as shown in this link https://imgur.com/a/ASUVWFn
The data is organized as follows - the latitude is chosen from 25 to 40 degrees north. And the longitude is from 60 to 100 degrees east. So the pressure data is at 17 levels. And it is a netCDF data file that is having the variable name 'hgt'. What I want is a plot of longitude by height and by that I mean - I have a longitude range (will be x-axis) and then I choose a latitude range over which the data is averaged over. If the two latitudes are the same, then the plot is of a single latitude..
I am trying to generate a vertical cross section of a geopotential height anomaly from NOAA reanalysis data. as shown in this link https://imgur.com/a/ASUVWFn
The data is organized as follows - the latitude is chosen from 25 to 40 degrees north. And the longitude is from 60 to 100 degrees east. So the pressure data is at 17 levels. And it is a netCDF data file that is having the variable name 'hgt'. What I want is a plot of longitude by height and by that I mean - I have a longitude range (will be x-axis) and then I choose a latitude range over which the data is averaged over. If the two latitudes are the same, then the plot is of a single latitude..
When I run the following code this is the plot I get - https://imgur.com/a/1qRMKHt
This is the link of netCDF file - https://filebin.net/jsj7lzf62zfhvj3n
Where am I going wrong ?
`# importing Magics module
from Magics.macro import *
ref = 'xsection'
def xsection(title_size=0.4, axis_size=0.6, tick_size=0.2, thumbnail = True) :
Setting the cartesian view
if ( name == "main"):
Setting of the output file name
`