Sir, How to extract data from an netcdf file based on latilute and longitude range?

3 ビュー (過去 30 日間)
Mohnish sinha
Mohnish sinha 2014 年 11 月 10 日
回答済み: Chad Greene 2015 年 2 月 9 日
Suppose I have to extract data from ranging latitude=6 N to 40 N and longitude=66 E to 100 E, what will be the code for this range of data for a nc file 'example.nc'

回答 (1 件)

Chad Greene
Chad Greene 2015 年 2 月 9 日
The answer depends on your example.nc file. Load the lat and lon variables with ncread and find the indices of lat and lon corresponding to your grid box of interest. Then use ncread with corresponding start and stride variables declared to load your gridded variable. Or you could load the whole variable and trim it down from there.

タグ

タグが未入力です。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by