examples issueshttps://git.geomar.de/data/documentation/examples/-/issues2021-10-18T15:46:31Zhttps://git.geomar.de/data/documentation/examples/-/issues/7Problem to load netCDF files (having >2 dimensions) with Matlab ncread via OP...2021-10-18T15:46:31ZJohannes Hahnjhahn@geomar.deProblem to load netCDF files (having >2 dimensions) with Matlab ncread via OPENDAPI have issues to load a variable from a netCDF file via OPENDAP with the Matlab function ncread. ncread is built in function in my here used Matlab version 2019a.
The issue is the following: When I try the load a variable with more than...I have issues to load a variable from a netCDF file via OPENDAP with the Matlab function ncread. ncread is built in function in my here used Matlab version 2019a.
The issue is the following: When I try the load a variable with more than 2 dimensions, I only get back zeros. As an example, I post here the link to a data set from the World Ocean Atlas 2013, available on our GEOMAR THREDDS Server.
The Matlab command, which only outputs zeros, is:
- sal = ncread('https://dm-data.geomar.de/thredds/dodsC/erda/WOA13_V2/v1.x.x/data/salinity/netcdf/decav/0.25/woa13_decav_s00_04v2.nc','s_an',[1 1 1 1],[1440 720 102 1]);
However, when I try to load just a reduced cut-out data set, where only the first index of the 3rd dimension is read ("102" --> "1"), it works. So the adapted Matlab command from above, which provides a proper output, is:
- sal = ncread('https://dm-data.geomar.de/thredds/dodsC/erda/WOA13_V2/v1.x.x/data/salinity/netcdf/decav/0.25/woa13_decav_s00_04v2.nc','s_an',[1 1 1 1],[1440 720 1 1]);
Does anyone have an idea, why this is the case?https://git.geomar.de/data/documentation/examples/-/issues/6Adapt OPeNDAP links2020-06-25T12:52:50ZWilli RathAdapt OPeNDAP linksAs seen in #5, the OPeNDAP links in some examples are wrong, because the GEOMAR server was changed.As seen in #5, the OPeNDAP links in some examples are wrong, because the GEOMAR server was changed.https://git.geomar.de/data/documentation/examples/-/issues/5Problem loading HadI-SST2020-06-25T12:51:54ZArthur PrigentProblem loading HadI-SST**Problem**
I try to load HadI-SST from a jupyter notebook (see attached) based on the example_03 in the documentation.
[test_load_HadISST.html](/uploads/709aee38fdad92e7c6027dfb5be35a9a/test_load_HadISST.html)
Please find in the htm...**Problem**
I try to load HadI-SST from a jupyter notebook (see attached) based on the example_03 in the documentation.
[test_load_HadISST.html](/uploads/709aee38fdad92e7c6027dfb5be35a9a/test_load_HadISST.html)
Please find in the html file the version of xarray.
**Error :**
OSError: [Errno -68] NetCDF: I/O failure: b'https://data.geomar.de/thredds/dodsC/tmdata/git_geomar_de_data/HadISST/v1.x.x/data/HadISST_sst.nc'
Can anyone of you load the Hadi-SST dataset ?https://git.geomar.de/data/documentation/examples/-/issues/4Add example for deriving annual means2019-02-19T14:09:25ZChristina RothAdd example for deriving annual meanscalculate annual, pentadal, decadal mean from daily, 5-daily, monthly data and store result.calculate annual, pentadal, decadal mean from daily, 5-daily, monthly data and store result.https://git.geomar.de/data/documentation/examples/-/issues/3Add Matlab Example for SLTAC2017-11-03T11:55:16ZWilli RathAdd Matlab Example for SLTACAdd this code by @rebecca-hummels:
```matlab
clear all
close all
%% define path to data
base_path = '/data/c2/TMdata/git_geomar_de_data/SLTAC_GLO_PHY_L4_REP/';
SLTAC_version = 'v1.x.x';
path_to_data = [base_path,SLTAC_version,'/data/'...Add this code by @rebecca-hummels:
```matlab
clear all
close all
%% define path to data
base_path = '/data/c2/TMdata/git_geomar_de_data/SLTAC_GLO_PHY_L4_REP/';
SLTAC_version = 'v1.x.x';
path_to_data = [base_path,SLTAC_version,'/data/'];
%% create monthly mean surface geostrophic velocity off Brazil from 2000-2017
% find indices of the region
lat_lim = [-12 -4];
lon_lim = [-40 -30]+360;
lat_nc = -89.875:0.25:89.875;
lon_nc = 0.125:0.25:359.875;
idx = find(lon_nc>lon_lim(1) & lon_nc<lon_lim(2));
idy = find(lat_nc>lat_lim(1) & lat_nc<lat_lim(2));
% choose time period
year_folder = [2000:2017];
u_geo_m = NaN(length(idx),length(idy),length(year_folder)*12);
v_geo_m = u_geo_m;
time_m = NaN(length(year_folder)*12,1);
h=waitbar(0,'Loading and averaging ...');
% load all files of one month and average
for iy = 1:length(year_folder)
filename_year = [path_to_data,num2str(year_folder(iy))];
KK=dir(filename_year);KK=KK(3:end);
for id=1:length(KK)
mm(id)=str2num(KK(id).name(29:30));
end
for im = 1:12
kk = find(mm==im);
u_geo = NaN(length(idx),length(idy),length(kk));
v_geo = u_geo;
for ik = 1:length(kk)
time(ik) = double(ncread([filename_year,'/',KK(kk(ik)).name],'time'))+datenum(1950,1,1,0,0,0);
ugos = double(ncread([filename_year,'/',KK(kk(ik)).name],'ugos'));
u_geo(:,:,ik) = ugos(idx,idy);
vgos = double(ncread([filename_year,'/',KK(kk(ik)).name],'vgos'));
v_geo(:,:,ik) = vgos(idx,idy);
end
u_geo_m(:,:,(iy-1)*12+im) = nanmean(u_geo,3);
v_geo_m(:,:,(iy-1)*12+im) = nanmean(v_geo,3);
time_m((iy-1)*12+im) = nanmean(time);
waitbar(((iy-1)*12+im)/(length(year_folder)*12),h)
end
clear mm KK
end
close(h)
% save as matfile
lon = lon_nc(idx)-360;
lat = lat_nc(idy);
time = time_m;
ugeo_mon = u_geo_m;
vgeo_mon = v_geo_m;
save geo_surf_vel lon lat time ugeo_mon vgeo_mon
% figure(1);clf
% m_proj('mercator','long',[-40 -30],'lat',[-12 -4]);hold on
% m_contourf(lon_nc(idx)-360,lat_nc(idy),nanmean(u_geo_m,3)',[-.5:1/63:.5],'edgecolor','none')
% m_gshhs_h('patch',[.5 .5 .5]); hold on
% colorbar
```Willi RathWilli Rathhttps://git.geomar.de/data/documentation/examples/-/issues/2Add lowpass-filter example with SLTAC sea level2017-10-18T10:39:36ZWilli RathAdd lowpass-filter example with SLTAC sea levelcc: @tobias-schulzki, @klaus-getzlaff
Possible pointer: <http://xarray.pydata.org/en/stable/computation.html#rolling-window-operations>cc: @tobias-schulzki, @klaus-getzlaff
Possible pointer: <http://xarray.pydata.org/en/stable/computation.html#rolling-window-operations>Willi RathWilli Rathhttps://git.geomar.de/data/documentation/examples/-/issues/1Add ASCAT windstress-curl example2017-09-19T15:50:06ZWilli RathAdd ASCAT windstress-curl example(cc: @rafael-abel)
- Work on taurus
- Calculate windstress-curl for a single time step(cc: @rafael-abel)
- Work on taurus
- Calculate windstress-curl for a single time stepWilli RathWilli Rath