Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support nczarr conversion. #239

Open
hdfeos opened this issue Apr 1, 2021 · 4 comments
Open

Support nczarr conversion. #239

hdfeos opened this issue Apr 1, 2021 · 4 comments

Comments

@hdfeos
Copy link

hdfeos commented Apr 1, 2021

netCDF-4.8.0 supports nczarr but NCO is not.

$ncks -4 "file:///home/ubuntu/src/netcdf-c-4.8.0/nczarr_test/tmp_ndims.file#mode=nczarr,file" test.h5
ncks: ERROR file file:///home/ubuntu/src/netcdf-c-4.8.0/nczarr_test/tmp_ndims.file#mode=nczarr,\
file not found. It does not exist on the local filesystem, nor does it match remote filename pa\
tterns (e.g., http://foo or foo.bar.edu:file).
@czender
Copy link
Member

czender commented Apr 1, 2021

Correct. I have a proposal pending with NASA to add that support. They rejected the first version last year, let's hope this one is more successful.

@czender
Copy link
Member

czender commented Jul 29, 2022

FYI the current snapshot of NCO has nascent support for NCZarr. Most operations work for most operators using the file:/// protocol. S3 support will take longer. Testing would be very welcome. The API has not changed, just sprinkle NCZarr-parseable file/bucketnames where appropriate, e.g.:

zender@spectral:~$ ncks "file://${HOME}/zarr_out#mode=nczarr,zarr"
netcdf zarr_out {
  dimensions:
    dmn = 2 ;

  variables:
    int var(dmn) ;
      var:purpose = "var" ;
      var:_FillValue = -32767s ;
      var:test = 2000s ;

  // global attributes:
    :history = "Mon Jul 18 06:09:22 2022: ncatted -a test,var,c,d,2.0e3 -O file:///Users/zender/zarr#mode=nczarr,zarr file:///Users/zender/zarr_out#mode=nczarr,zarr" ;
    :NCO = "netCDF Operators version 5.1.1-alpha04 (Homepage = http://nco.sf.net, Code = http://github.com/nco/nco)" ;


  data:
    var = 1, _ ;

} // group /

@hdfeos
Copy link
Author

hdfeos commented Dec 16, 2022 via email

@czender
Copy link
Member

czender commented Dec 16, 2022

Thanks for that report. NCO breaks while trying to copy the string variables. Not sure why, possibly because they are record variables that NCZarr does not yet support? In any case, to workaround, omit them:

zender@spectral:~$ ncks -O -x -v tb_time.? /Users/zender/data/hdf/SMAP_L3_SM_P_20150406_R14010_001.h5 "file:///Users/zender/foo#mode=nczarr,file"
zender@spectral:~$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants