Dear receiver at OceanColor Forum,
I have derived phenological indices from the continuous series of chlorophyll observations 1998 – 2019 and like to add that from the CZCS records on chlorophyll 1979 – 1986. I got the .nc files with records for the study region and had no problems when extracting the chlorophyll values for 1998 – 2019. But, I'm getting nowhere with opening the .nc files ordered and downloaded from OceanColor Forum on the CZCS chlorophyll records, for reading.
I assume the downloaded files are normal Level-3 SMI, which agrees with the filenames. The order id is 10b0c070636ee755, dated March 8th 2020 (thank you for processing it and making that available). An example of the filenames 1979 is C19790411979048.L3b_8D_CHL.x.nc (of 170 files in total for 1978 -1986).
As for the big batch 1998 – 2019, I used the ‚ncdf4‘ package in R as described; library(ncdf4)
But, when applied to the CZCS files, the nc_open command respond with an error message:
> ncin <- nc_open(paste(path.raw,"/",ob.files[j],sep=""))
Error in ncvar_type_to_string(rv$precint) :
Error, unrecognized type code of variable supplied: -1
> nc_open(paste(path.raw,"/",ob.files[j],sep=""), verbose = TRUE)
[1] "nc_open: entering, ncdf4 package version ncdf4_1.16_20170401"
[1] "nc_open: back from call to R_nc4_open, ncid= 196608"
[1] "file ~/Skjöl/Data/CZCS_2020/8D/requested_files/C19790411979048.L3b_8D_CHL.x.nc is format NC_FORMAT_NETCDF4"
[1] "Group info:"
[1] "Group 1 : name= id= 196608 fqgn= \" \" nvars= 0 ndims= 0 dimid="
integer(0)
[1] "Group 2 : name= level-3_binned_data id= 196609 fqgn= \" level-3_binned_data \" nvars= 4 ndims= 3 dimid="
[1] 0 1 2
[1] "Group 3 : name= processing_control id= 196610 fqgn= \" processing_control \" nvars= 0 ndims= 0 dimid="
integer(0)
[1] "Group 4 : name= input_parameters id= 196611 fqgn= \" processing_control/input_parameters \" nvars= 0 ndims= 0 dimid="
integer(0)
[1] "nc_open: getting dim info for dim number 1 in group \" level-3_binned_data \" dim ID= 0"
[1] ".....dim name is level-3_binned_data/binListDim id= 0 len= 659 dimvarid= -1"
[1] "------------------------------"
[1] "Here is new dim:"
[1] "Global index= 1 name= level-3_binned_data/binListDim len= 659 unlim= TRUE id= 0 dimvarid= -1 units= "
[1] "------------------------------"
[1] ".......nc_open: done processing dim level-3_binned_data/binListDim"
[1] "nc_open: getting dim info for dim number 2 in group \" level-3_binned_data \" dim ID= 1"
[1] ".....dim name is level-3_binned_data/binDataDim id= 1 len= 659 dimvarid= -1"
[1] "------------------------------"
[1] "Here is new dim:"
[1] "Global index= 2 name= level-3_binned_data/binDataDim len= 659 unlim= TRUE id= 1 dimvarid= -1 units= "
[1] "------------------------------"
[1] ".......nc_open: done processing dim level-3_binned_data/binDataDim"
[1] "nc_open: getting dim info for dim number 3 in group \" level-3_binned_data \" dim ID= 2"
[1] ".....dim name is level-3_binned_data/binIndexDim id= 2 len= 4320 dimvarid= -1"
[1] "------------------------------"
[1] "Here is new dim:"
[1] "Global index= 3 name= level-3_binned_data/binIndexDim len= 4320 unlim= TRUE id= 2 dimvarid= -1 units= "
[1] "------------------------------"
[1] ".......nc_open: done processing dim level-3_binned_data/binIndexDim"
[1] "nc_open: setting dim$<names> to:"
[1] "level-3_binned_data/binListDim" "level-3_binned_data/binDataDim" "level-3_binned_data/binIndexDim"
[1] "nc_open: getting var info. Number of vars (INCLUDING dimvars)= 4"
[1] "Working on group 2 (of 4 ), var 1 (of 4 ), name= BinList"
[1] "nc_open var loop: will process with group id= 196609 varid= 1 var name= BinList"
Error in ncvar_type_to_string(rv$precint) :
Error, unrecognized type code of variable supplied: -1
I don‘t know how to interpret the above information, and have searched for solution at the FAQ‘s forum and the www in general, without any success. When trying to open the files with ‚tidync‘ it responds with an error message, but suggest the files might be different from the .nc, i.e.:
> library(tidync)
> mandan<-purrr::map(paste(path.raw,"/",ob.files[j],sep=""), tidync)
Error in tidync.character(.x[
], ...) : no variables or dimensions
(is this a source with compound-types? Try h5, rhdf5, or hdf5r)
In addition: Warning messages:
1: Trying to compute distinct() for variables not found in the data:
- `id`, `name`, `type`, `ndims`, `natts`
This is an error, but only a warning is raised for compatibility reasons.
The operation will return the input unchanged.
2: In nc_atts.NetCDF(x) : no variables recognizable
3: In tidync.character(.x[], ...) : no dimensions found
4: In tidync.character(.x[], ...) : no variables found
Please guide me across this barrier, if you see what is the problem.