여기에서 다운로드 할 수있는 글로벌 면적 나타내는 209091 요소 1D 이진 배열이 포함 된 파일이 있습니다 내가 제공하는 보조 행과 열 파일을 사용하여 1 차원 데이터 배열에서 풀을 만들려면 ftp://sidads.colorado.edu/DATASETS/nsidc0451_AMSRE_Land_Parms_v01/AMSRE_flags_2002/ 을 .globland_r ftp://sidads.colorado.edu/DATASETS/nsidc0451_AMSRE_Land_Parms_v01/AMSRE_ancil/R을 사용하여 1D 배열에서 그리드를 만드는 방법?
는이 목적을 위해 matlab에 작성된 코드가 나는 R이 MATLAB 코드를 번역 할하지만 다음 matlab에에게
function [gridout, EASE_r, EASE_s] = mkgrid_global(x)
%MKGRID_GLOBAL(x) Creates a matrix for mapping
% gridout = mkgrid_global(x) uses the 2090887 element array (x) and returns
%Load ancillary EASE grid row and column data, where <MyDir> is the path to
%wherever the globland_r and globland_c files are located on your machine.
fid = fopen('C:\MyDir\globland_r','r');
EASE_r = fread(fid, 209091, 'int16');
fclose(fid);
fid = fopen('C:\MyDir\globland_c','r');
EASE_s = fread(fid, 209091, 'int16');
fclose(fid);
gridout = NaN.*zeros(586,1383);
%Loop through the elment array
for i=1:1:209091
%Distribute each element to the appropriate location in the output
%matrix (but MATLAB is
%(1,1)
end
편집을 모르는 : 여기에서 다운로드 할 수있는 globland_c 티 @mdsumner의 그 해결책 :
파일 MLLATLSB
및 MLLONLSB (4-byte integers)
을 위해 위도와 경도 (multiply by 1e-5)
를 포함하는 지리적 위치 전체 글로벌 EASE grid matrix (586×1383)
MLLATLSB
및 MLLONLSB
여기에서 다운로드 할 수 있습니다 ftp://sidads.colorado.edu/DATASETS/nsidc0451_AMSRE_Land_Parms_v01/AMSRE_ancil/