ncbo mis-handles missing data

Ken
2013-03-20
2013-10-17
  • Ken

    Ken - 2013-03-20

    As far as I can tell, ncbo pays no attention to missing data:

    netcdf foo {
    dimensions:
    lat = 2 ;
    variables:
    short v(lat) ;
    v:missing_data = -1s ;
    data:

    v = _, 0 ;
    }

    ncbo foo.nc foo.nc bar.nc

    netcdf bar {
    dimensions:
    lat = 2 ;
    variables:
    short v(lat) ;
    v:missing_data = -1s ;

    // global attributes:
    :history = "Tue Mar 19 18:44:37 2013: ncbo foo.nc foo.nc bar.nc" ;
    :nco_openmp_thread_number = 1 ;
    data:

    v = 0, 0 ;
    }

    :-(

    -Ken

     
  • Ken

    Ken - 2013-03-20

    Oops. Those attributes were supposed to say "missing_value", not "missing_data". The behavior remains the same.

    -Ken

     
  • Ken

    Ken - 2013-03-20

    Just to make this clearer, since I botched the initial post:

    > ncdump foo.nc
    netcdf foo {
    dimensions:
    lat = 2 ;
    variables:
    short v(lat) ;
    v:missing_value = -1s ;
    data:

    v = _, 0 ;
    }
    > ncbo -h foo.nc foo.nc bar.nc
    > ncdump bar.nc
    netcdf bar {
    dimensions:
    lat = 2 ;
    variables:
    short v(lat) ;
    v:missing_value = -1s ;
    data:

    v = 0, 0 ;
    }

     
  • Charlie Zender

    Charlie Zender - 2013-03-20

    Yes, you seem to misunderstand.
    See http://nco.sf.net/nco.html#mss_val
    By default NCO ignores missing_value in favor of _FillValue.
    cz

     
  • Ken

    Ken - 2013-03-20

    Thanks, Charlie! I also realized that this machine had nco version 4.0.8, which gave problems with _FillValue as well, but upgrading to a more recent version resolved it.

    -Ken

     
  • Arumita Bandyopadhyay

    hi zender
    i want to subset a section from a global dataset, using the following command
    ncks -d lon,min,max -d lat,min,max in.nc out.nc
    but everytime it is showing that
    dimension lon is not in input file
    what could be the reason?i need it to be done very urgently, if you can help me.. i will be relieved..

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks