How to plot vectors of zonally averaged meridional-vertical wind circulation in a latitude-pressure cross-section in MATLAB
Dear all,
I have 3D matrices (longitude*latitude*plev) of U, V and W-components of wind. Since I want to plot latitude-pressure vertical cross section, I took average along the first dimension (i.e, longitude) for V and W-components of wind. Also, initially I had the plev data with 12 pressure levels. But, I created 91 interpolated pressure levels using ‘meshgrid’ command and interpolated the V and W-components of wind data at each pressure levels using ‘griddata’ command, like in the following:
[X_LAT,Y_PLEV]=meshgrid(latitude,min(plev):10:max(plev));
V=griddata(latitude,plev,Vwind’,X_LAT,Y_PLEV);
%same as for W wind
For your convenience, I attached the latitude, plev, V, and W matrices. But, when I tried to plot the wind vectors along latitude-pressure vertical cross-section using ‘quiversc’ function, I am getting absurd vectors (see the figure attached). But, previously, with the same ‘quiversc’ function, I got the correct wind vectors when I used U and V-components of wind at x-y plane for a particular pressure level. So, I think, there is nothing wrong with the function. Maybe the code should be different this time as I am plotting latitude-pressure vertical cross section. My code for plotting is as follows:
contourf(X_LAT,Y_PLEV,W,40,’linecolor’,’none’) ;
set(gca,’YDir’,’reverse’);
set(gca,’yscale’,’log’)
hold on
q1=quiversc(X_LAT,Y_PLEV,V,W,’density’,10,’MaxHeadSize’,5,’AutoScale’,’on’,’color’,’k’,’LineWidth’,1);
colormap(jet(50))
caxis([-2 2])
xlim([-7 1])
ylim([100 1000])
box on
set(gca,’YTick’,(100:100:1000),’YTickLabel’,{‘100’ ‘200’ ‘300’ ‘400’ ‘500’ ‘600’ ‘700’ ‘800’ ‘900’ ‘1000’},’FontName’, ‘Arial’,’FontSize’,14,’FontWeight’,’bold’,’LineWidth’,1)
Now, it is important to note that I multiplied W by 100 for scaling as per the V wind. Since, the vertical cross-section is along the latitudes, so I think quiversc should work with V and W to get the meridional-vertical wind circulation vector. Right? Or, do I have to do something additional to get the desired plot. For your reference, I attached a sample figure from Zhu et al. (2022). Can anyone please help me to solve this issue? That will be very helpful for me. Thank you for your time and consideration.Dear all,
I have 3D matrices (longitude*latitude*plev) of U, V and W-components of wind. Since I want to plot latitude-pressure vertical cross section, I took average along the first dimension (i.e, longitude) for V and W-components of wind. Also, initially I had the plev data with 12 pressure levels. But, I created 91 interpolated pressure levels using ‘meshgrid’ command and interpolated the V and W-components of wind data at each pressure levels using ‘griddata’ command, like in the following:
[X_LAT,Y_PLEV]=meshgrid(latitude,min(plev):10:max(plev));
V=griddata(latitude,plev,Vwind’,X_LAT,Y_PLEV);
%same as for W wind
For your convenience, I attached the latitude, plev, V, and W matrices. But, when I tried to plot the wind vectors along latitude-pressure vertical cross-section using ‘quiversc’ function, I am getting absurd vectors (see the figure attached). But, previously, with the same ‘quiversc’ function, I got the correct wind vectors when I used U and V-components of wind at x-y plane for a particular pressure level. So, I think, there is nothing wrong with the function. Maybe the code should be different this time as I am plotting latitude-pressure vertical cross section. My code for plotting is as follows:
contourf(X_LAT,Y_PLEV,W,40,’linecolor’,’none’) ;
set(gca,’YDir’,’reverse’);
set(gca,’yscale’,’log’)
hold on
q1=quiversc(X_LAT,Y_PLEV,V,W,’density’,10,’MaxHeadSize’,5,’AutoScale’,’on’,’color’,’k’,’LineWidth’,1);
colormap(jet(50))
caxis([-2 2])
xlim([-7 1])
ylim([100 1000])
box on
set(gca,’YTick’,(100:100:1000),’YTickLabel’,{‘100’ ‘200’ ‘300’ ‘400’ ‘500’ ‘600’ ‘700’ ‘800’ ‘900’ ‘1000’},’FontName’, ‘Arial’,’FontSize’,14,’FontWeight’,’bold’,’LineWidth’,1)
Now, it is important to note that I multiplied W by 100 for scaling as per the V wind. Since, the vertical cross-section is along the latitudes, so I think quiversc should work with V and W to get the meridional-vertical wind circulation vector. Right? Or, do I have to do something additional to get the desired plot. For your reference, I attached a sample figure from Zhu et al. (2022). Can anyone please help me to solve this issue? That will be very helpful for me. Thank you for your time and consideration. Dear all,
I have 3D matrices (longitude*latitude*plev) of U, V and W-components of wind. Since I want to plot latitude-pressure vertical cross section, I took average along the first dimension (i.e, longitude) for V and W-components of wind. Also, initially I had the plev data with 12 pressure levels. But, I created 91 interpolated pressure levels using ‘meshgrid’ command and interpolated the V and W-components of wind data at each pressure levels using ‘griddata’ command, like in the following:
[X_LAT,Y_PLEV]=meshgrid(latitude,min(plev):10:max(plev));
V=griddata(latitude,plev,Vwind’,X_LAT,Y_PLEV);
%same as for W wind
For your convenience, I attached the latitude, plev, V, and W matrices. But, when I tried to plot the wind vectors along latitude-pressure vertical cross-section using ‘quiversc’ function, I am getting absurd vectors (see the figure attached). But, previously, with the same ‘quiversc’ function, I got the correct wind vectors when I used U and V-components of wind at x-y plane for a particular pressure level. So, I think, there is nothing wrong with the function. Maybe the code should be different this time as I am plotting latitude-pressure vertical cross section. My code for plotting is as follows:
contourf(X_LAT,Y_PLEV,W,40,’linecolor’,’none’) ;
set(gca,’YDir’,’reverse’);
set(gca,’yscale’,’log’)
hold on
q1=quiversc(X_LAT,Y_PLEV,V,W,’density’,10,’MaxHeadSize’,5,’AutoScale’,’on’,’color’,’k’,’LineWidth’,1);
colormap(jet(50))
caxis([-2 2])
xlim([-7 1])
ylim([100 1000])
box on
set(gca,’YTick’,(100:100:1000),’YTickLabel’,{‘100’ ‘200’ ‘300’ ‘400’ ‘500’ ‘600’ ‘700’ ‘800’ ‘900’ ‘1000’},’FontName’, ‘Arial’,’FontSize’,14,’FontWeight’,’bold’,’LineWidth’,1)
Now, it is important to note that I multiplied W by 100 for scaling as per the V wind. Since, the vertical cross-section is along the latitudes, so I think quiversc should work with V and W to get the meridional-vertical wind circulation vector. Right? Or, do I have to do something additional to get the desired plot. For your reference, I attached a sample figure from Zhu et al. (2022). Can anyone please help me to solve this issue? That will be very helpful for me. Thank you for your time and consideration. matlab, vector MATLAB Answers — New Questions