Closed javakh closed 7 years ago
Hi Javed
You need to specify the name of the variable to retrieve in parameter argument.
Use summary.ncdf function to get a summary about the netcdf attributes
Dear Sir, Firstly,Even without parameter argument , I am not been able to retrieve these files x=retrieve('tos_Omon_IPSL-CM5A-MR_historical_r1i1p1_185001-200512.nc',lon=c(-170,-120),lat=c(-5,5),it=c(1951,2005)) Error in if (substr(varid, 1, 1) == "/") stop(paste("Error, I was given a name that starts with a slash; fully qualified names NEVER start with a slash (this is required for backwards compatability). Leave off the leading slash!")) : argument is of length zero
2ndly, the name of the variable is 'tos'; so the 'param' argument may not be wrong.
There may be some other problems.
Here is the result of summary.ncdf4:
[1] " -------------------------------------------------------------------" [1] "E:/Research/Data/SST-CMIP5/Historical/New folder/tos_Omon_IPSL-CM5A-MR_historical_r1i1p1_185001-200512.nc" [1] "IPSL-CM5A-MR model output prepared for CMIP5 historical" [1] "time_bnds (variable 1) has unit () and dimension(s) bnds(2) time(1872)" [1] "bnds (dimension 1) Unit () First point (1) Last point (2) Step (1)" [1] "time (dimension 2) Unit (days since 1850-01-01 00:00:00) First point (15.5) Last point (56924.5) Step (29.5)" [1] "Frequency has been found in data attributes: mon (Values)" [1] "noleap calendar has been found" [1] "lat (variable 2) has unit (degrees_north) and dimension(s) i(182) j(149)" [1] "i (dimension 1) Unit (1) First point (1) Last point (182) Step (1)" [1] "j (dimension 2) Unit (1) First point (1) Last point (149) Step (1)" [1] "Frequency has been found in data attributes: mon (Values)" [1] "lon (variable 3) has unit (degrees_east) and dimension(s) i(182) j(149)" [1] "i (dimension 1) Unit (1) First point (1) Last point (182) Step (1)" [1] "j (dimension 2) Unit (1) First point (1) Last point (149) Step (1)" [1] "Frequency has been found in data attributes: mon (Values)" [1] "lat_vertices (variable 4) has unit (degrees_north) and dimension(s) vertices(4) i(182) j(149)" [1] "vertices (dimension 1) Unit () First point (1) Last point (4) Step (1)" [1] "i (dimension 2) Unit (1) First point (1) Last point (182) Step (1)" [1] "j (dimension 3) Unit (1) First point (1) Last point (149) Step (1)" [1] "Frequency has been found in data attributes: mon (Values)" [1] "lon_vertices (variable 5) has unit (degrees_east) and dimension(s) vertices(4) i(182) j(149)" [1] "vertices (dimension 1) Unit () First point (1) Last point (4) Step (1)" [1] "i (dimension 2) Unit (1) First point (1) Last point (182) Step (1)" [1] "j (dimension 3) Unit (1) First point (1) Last point (149) Step (1)" [1] "Frequency has been found in data attributes: mon (Values)" [1] "tos (variable 6) has unit (K) and dimension(s) i(182) j(149) time(1872)" [1] "i (dimension 1) Unit (1) First point (1) Last point (182) Step (1)" [1] "j (dimension 2) Unit (1) First point (1) Last point (149) Step (1)" [1] "time (dimension 3) Unit (days since 1850-01-01 00:00:00) First point (15.5) Last point (56924.5) Step (29.5)" [1] "Frequency has been found in data attributes: mon (Values)" [1] "noleap calendar has been found"
The summary looks ok . Can you send me the file or a link to the file and I will try to figur out what is wrong
Dear Sir, I have sent in your email via google drive - the SST file from CMCC-CM similar to the file posted in Github . Kindly check it.
Hi there, I got your email and checked the file. The structure of the file is not suitable for retrieve and you may need to create a field object yourself using as.field() function and nc4:: functionalities to read and put attributes.
Thank you sir. This seems quite complicated to me. Can you kindly give me a small example about how to do it.
Getting following error while retrieving GCMs containing SST data:
Please help to solve the issue.