Get netCDF data from Copernicus Marine

조회 수: 11 (최근 30일)
Asier Barbeito Albizu
Asier Barbeito Albizu 2022년 12월 19일
답변: Udit06 2024년 9월 2일
Hi,
I am trying to get some netCDF data from the Copernicus marine software following their guidelines step by step. This is the code I am using:
% Copernicus Marine username and password
USERNAME = "-------"; %My username
PASSWORD = "------------"; % My password
server = "@nrt.cmems-du.eu"; % Copernicus Marine server
datasetID = "cmems_mod_ibi_phy_anfc_0.027deg-3D_P1D-m"; % datasetID
file_nc = strcat("https://", USERNAME, ":", PASSWORD, server, "/thredds/dodsC/", datasetID);
ncdisp(file_nc)
My matlab version is the 2018a, and apparently this code fails computing the last line of the code. However, a colleague who has the 2020a version is able to obtain the data with the same code. Can this be due to the Matlab version?
Thanks in advance!

답변 (1개)

Udit06
Udit06 2024년 9월 2일
Hi Asier,
I understand that you are trying to access netCDF data using an OPeNDAP URL using the "ncdisp" function in MATLAB R2018a while you are able to access the same data using MATLAB R2020a.
The following MATLAB answer handles a similar issue:
The answer suggests that this is a sporadic issue and it is less frequent with newer versions of MATLAB. Therefore, the most suitable workaround in your case will be to use MATLAB R2020a where your colleague was able to access the data. Other suggestion includes to verify the link first on browser to check if it is a valid link.
I hope this helps.

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by