In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how matlab reads the data to draw the wind field. I hope you will get something after reading this article. Let's discuss it together.
1. Matlab reads NCEP and then analyzes the data and draws the wind field
This program is used to calculate the divergence of water vapor flux. The u we read here is a four-dimensional matrix, which is lon*lat*level*time,clc;clear;close allf_hgt = 'ps_level_20170121_0130.nc';% ncdisp (f_hgt); time=ncread (fancihgt grammatical time'); level=ncread (fancihgt dagger level'); lon=ncread (fancihgt dagger longitude`); lat=ncread (fancihgtLatitude latitude');% time conversion time= double (time); format ='mm dd, yyyy HH:MM:SS.FFF AM'' % conversion format dstr = datestr ((datenum ('1900-01-01') + time./24), format);% converted time string storage TM = datevec (dstr);% convert time character array to numeric array tidx=find (TM (:, 2) = = 1 & TM (:, 3) = = 28 & TM (:, 4) = = 00);% filter July 25th 08:00 UTC (level = = 850) % delete the 850hPa height start= [1dimentional count];% the position where each dimension of the specified variable starts to be read count= [41];% the number of each dimensional element read from the start position specified by start [1];% the number of each dimensional element read from start, the number of reading steps hgt=ncread for each dimension when the number of reads per dimension is count. % read temperature (in Ku=ncread);% read temperature (in Kv=ncread);% read temperature in figure [XMagi Y] = meshgrid (lon,lat); figure (1) m_proj ('Mercator','lat', [25res35],' lon', [100115]) % m_grid ('linestyle','none','tickdir','out','fontsize',12,'fontname','Times New Roman'); m_grid (' linestyle','none','box','fancy','fontsize',11,'tickdir','in','xtick', [100 ytick', 315], 'ytick', [25:2:35]) Hold onm_windbarb)% m_coast ('patch', [.9. 9],' edgecolor','none')% m_contour ('color','k','LineWidth',1] = m_contour) % [5000 New Roman']% [1520 New Roman']% ma=shaperead ("bmemorials" ShowTextweights);% superimposed numerical values on the contours (details below) clabel ("Fontnamejin"); "ma=shaperead" ('FRANAMAN RMeteoInfoDataMAPOBUP)) % m_line ([ma (:) .x], [ma (:) .y], 'color', [0.5 beacon 0.5]);% map m_line ([ma (:) .x], [ma (:) .y],' color','r');% map m_plot (105.5, 29.43), 'MarkerSize',7,'color','k','MarkerFaceColor','k')
2. Matlab reads ERA5 and draws global wind field map.
Clc;clear;close allu0=ncread ('202008mvwind.ncregions');% read one of the items v0=ncread ('202008mvwind.ncstructures'); time0=ncread ('202008muwind.ncbands' journal timekeeping'); lat0=ncread ('202008muwind.ncregions camera camera lata'); lon0=ncread ('202008muwind.ncregions grammatical lata'); [lat,lon] = meshgrid (lat0,lon0); u=u0 (:,:, 2); v=v0 (:,: 2); b=sqrt (u.^ 2 + v. ^ 2); figure (1) M_proj ('Equidistant Cylindrical','long', [- 18080],' lat', [- 9090]);% rectangular projection Take the area for observation [lon1,lat1] = meshgrid ([- 180 end lon1,lat1 2.5179.75], [- 90 end 2.5]); u2yogu (1lav (1lazon) end)';% u3 = [u2meru2 (:, end)]; v2pragv (1gaplavendend 1gapend)';% v3 = [v2jue v2 (:, end)]; m_quiver (lon1,lat1,u2,v2,0); hold offm_coast ('patch', [1.85. 7]) M_grid ('box','on','tickdir','out')
M_contourf (lon,lat,b);% draw shading interp;% based on mmap to interpolate data hold on;m_quiver (lon1,lat1,u2,v2,0); hold off
M_quiver (lon1,lat1,u2,v2,0)
M_contourf (lon,lat,b,500,'linestyle','none')% draw shading interp;% based on mmap to interpolate data
After reading this article, I believe you have a certain understanding of "how matlab reads data to draw the wind field". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.