Open NMC-DAVE opened 5 years ago
To plot wind with minput, Magics needs 4 1D vectors. (x, y, lat, lon)
input_x_component_field and input_y_component_field are 1D vectors with the u and v components of the winds. I hope this helps Sylvie
Sylvie, Thanks for your help. Now I can put vector data in to minput:
return magics.minput(
input_type = "geographical",
input_x_component_values = uwind_field, # 1D nlon x nlat vector
input_y_component_values = vwind_field, # 1D nlon x nlat vector
input_latitude_values = lat, # 1D nlon x nlat vector
input_longitude_values = lon, # 1D nlon x nlat vector
input_metadata = metadata)
But when i plot the wind field, the "wind_thinning_factor" is not working.
# Defining Wind plotting
wind_flags = magics.mwind(
legend = 'off',
wind_field_type = 'flags',
wind_flag_length = 1.0,
wind_thinning_factor = 5.,
wind_flag_calm_below = 0.5,
wind_flag_calm_indicator = 'off',
wind_flag_thickness = 1,
wind_flag_origin_marker = "circle",
wind_flag_colour = 'chestnut')
Thanks very much!
Yes, you are right, the wind thinning factor is only working when using GRIB or NetCDF data. We could implement it , in the meantime you can subsample your vectors .. I think lat[start:end:step] should work.
Sylvie
Hi, I want to plot wind flags with data fields. But I can not find the examples which show how to put data filed into minput, just like:
but this is not working. Very thanks!
Dave