필터 지우기
필터 지우기

How can I convert binary data into Netcdf format??

조회 수: 14 (최근 30일)
Aradhana Yaduvanshi
Aradhana Yaduvanshi 2014년 8월 11일
편집: Ramakrishna reddy Pareddy 2020년 1월 24일
I have rainfall data and that i need to convert it into Net Cdf so that i can extract values. or other than that, binary data can directly extract with some command. format is .trm.
  댓글 수: 2
Ashish Uthama
Ashish Uthama 2014년 8월 11일
Could you add a bit more information? Where did you get the .trm files? Do you have more information on these formats (for example, ask the source of these files)?
Aradhana Yaduvanshi
Aradhana Yaduvanshi 2014년 9월 2일
Data is satellite merged rain gauge data which is in binary format. I have to convert this in Netcdf format.

댓글을 달려면 로그인하십시오.

답변 (2개)

Ramakrishna reddy Pareddy
Ramakrishna reddy Pareddy 2020년 1월 24일
편집: Ramakrishna reddy Pareddy 2020년 1월 24일
you can read directly binary file or .grd file in matlab
example :-
clear all;close all;clc;
f=fopen('IMDrainfall0.25x0.25-2018.grd','rb'); %open grd file
z1=[]; %create empty group file
for i=1:365 % i time 365 days
for j=1:129 % j longtitude 135
for k=1:135 % k latidue 129
a(i,j,k)=fread(f,1,'float32'); %read ONE numbers of type 32-bit floating point
end % end file
end % end file
z(:,:,:)=a(i,:,:); % z file arrears in a file
z1=[z1;z]; % create z1 file from z
clear z %clear z file
end % end for all files

Image Analyst
Image Analyst 2014년 9월 2일
What do you need help with? Reading a .trm file into a MATLAB variable? Writing that variable out to a netCDF file using ncwrite()?

카테고리

Help CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by