조위관측소 데이터 처리 중, 관측소별, 시기별 데이터 포멧이 다른 것을 발견하고 모든 데이터에 호환 가능하도록 처리 중
(다른 포멧 발견시 추가 수정 예정)
1. KOHA 사이트를 통해 조위 데이터 다운로드
https://hummingstereo.tistory.com/59
[ KOHA ] 국내 조위관측소 데이터 다운로드
1. 사이트 접속 (http://www.khoa.go.kr/oceangrid/khoa/intro.do) 바다누리 해양정보 서비스 조위관측소, 해양관측부이, 해양과학기지 등에서 관측된 해양 정보를 다운로드하여 활용할 수 있습니다. www.khoa.go.
hummingstereo.tistory.com
case list
code
all_amp=[];all_pha=[];
for tt = 1%1:length(info.tide_station_name)
% read observation
obs.route = ['00__Data_list/01__Observation_data/',info.tide_station_name{tt},'/01_Zeta/'];
obs.list = dir([obs.route,'/*.txt']);
obs.name = char(obs.list.name);
all_dnum=[];all_level=[];
for ii = 1:height(obs.name)
tp2.fid = fopen(fullfile(obs.route,obs.name(ii,:)));
tp2.format = '%s %s %s %s %s %f %*[^\n]';
tp2.dat = textscan(tp2.fid,tp2.format,'HeaderLines',5,'Delimiter',' ');
if tt == 1
tp2.time_format = 'yyyy/mm/ddHH:MM';
tp2.dnum_1 = strcat(tp2.dat{1:2});
tp2.dnum_2 = datenum(tp2.dnum_1(1:end-5),tp2.time_format);
tp2.lev_1 = str2double(tp2.dat{3}(1:end-5));
tp2.lev_2 = (tp2.lev_1-mean(tp2.lev_1,'omitnan'))/100;
elseif tt == 2
tp2.time_format = 'yyyymmddHHMM';
tp2.dnum_1 = strcat(tp2.dat{1:5});
tp2.dnum_2 = datenum(tp2.dnum_1(1:end-2),tp2.time_format);
tp2.lev_1 = tp2.dat{6}(1:end-1);
tp2.lev_2 = (tp2.lev_1-mean(tp2.lev_1,'omitnan'))/100;
end
|
'데이터 처리' 카테고리의 다른 글
[ Argo ] 데이터 수집 및 분석 (0) | 2023.07.20 |
---|---|
국내 서해 utm 구역 경계 (0) | 2023.04.13 |
[ KOHA ] 국내 조위관측소 데이터 다운로드 (0) | 2023.03.31 |
조석 성분 분석 (0) | 2023.03.13 |
[open api] 1년치 조위 그래프 자동 생성 (2) | 2023.03.13 |