I have a nc file with 145 long, 129 lat and 10227 time values, I want to change this daily data (10,227) to monthly values. What could be easy way?

5 ビュー (過去 30 日間)
Actually, this is a climate data and I need monthly values from which I shall create seasons and plot in map form.

採用された回答

John BG
John BG 2018 年 2 月 24 日
Hi Neha Kanda
1.
why more longitudes than latitudes: are there missing latitudes, or same longitude repeats along diverse longitudes?
2.
Same for time stamps, please confirm that you have many void time stamps, without coordinates I mean.
3.
Any chance for you to attach a sample of the data described in your question?
appreciating time and attention, awaiting answer
  2 件のコメント
Neha Kanda
Neha Kanda 2018 年 2 月 24 日
Actually, I am working on climate data of indian subregion. Data is available in Netcdf format. Its temporal resolution is daily. So for 28 years, I have daily data which is almost 10227 days. I wish to convert this daily data into monthly/ seasonal data within that netcdf format. After that I would like to compare the results of this model with other models spatially, for that I need to convert netcdf to image/raster format.
John BG
John BG 2018 年 2 月 24 日
so far, without a sample of the data to process, I have the impression that your question gets solved by translating the netcdf file to a MATLAB structure.
Once the data in a MATLAB structure, it's straight forward to get the data you want.
Please have a look at Lazerson's function read_netcdf
If you attach a sample of the data to your question I will use that function or other available in the MAthworks file exchange related to NetCDF to then obtain MATLAB format data to work with.
Regards
John BG

サインインしてコメントする。

その他の回答 (2 件)

KSSV
KSSV 2018 年 2 月 23 日
You should be having dates in your hand.......read the dates....pick the months and calculate the mean of monthly data.
  3 件のコメント
Neha Kanda
Neha Kanda 2018 年 2 月 24 日
Actually, I am working on climate data of indian subregion. Data is available in Netcdf format. Its temporal resolution is daily. So for 28 years, I have daily data which is almost 10227 days. I wish to convert this daily data into monthly/ seasonal data within that netcdf format. After that I would like to compare the results of this model with other models spatially, for that I need to convert netcdf to image/raster format.
KSSV
KSSV 2018 年 2 月 24 日
It is not a deal..it can be done...you need to get indices of months you want and run mean on the roster...the output would be a raster itself...it can be then written to NC file..

サインインしてコメントする。


Peter Perkins
Peter Perkins 2018 年 2 月 23 日
This seems like it could be easily solved using retime on a timetable, but there's not enough information in you post to go on.
  1 件のコメント
Neha Kanda
Neha Kanda 2018 年 2 月 24 日
Thanks Peter But since I am new to MATLAB, could you pls tell more about this retime option. Actually, I am working on climate data of indian subregion. Data is available in Netcdf format. Its temporal resolution is daily. So for 28 years, I have daily data which is almost 10227 days. I wish to convert tjis daily data into monthly/ seasonal data within that netcdf format. After that I would like to compare the results of this model with other models spatially, for that I need to convert netcdf to image/raster format.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeNetCDF についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by