Opened 6 years ago

Closed 5 years ago

#2089 closed defect (fixed)

encode to netcdf should consider null values

Reported by: Dimitar Misev Owned by: dkamov
Priority: major Milestone: 9.8
Component: conversion Version: 9.7
Keywords: Cc: Bang Pham Huu
Complexity: Medium

Description

Example query from collection created in source:systemtest/testcases_mandatory/test_nullvalues:

rasql -q 'select encode(c, "netcdf") from test_nulltest_float as c' --out file

ncdump rasql_1.nc on the output file gives:

netcdf rasql_1 {
dimensions:
    dim_0 = 3 ;
    dim_1 = 3 ;
variables:
    float data(dim_0, dim_1) ;
        data :valid_min = -3.402823e+38f ;
        data :valid_max = 3.402823e+38f ;
}

The missing_value or _FillValue is missing in the metadata of variable data, it should show something like this:

netcdf rasql_1 {
dimensions:
    dim_0 = 3 ;
    dim_1 = 3 ;
variables:
    float data(dim_0, dim_1) ;
        data :valid_min = -3.402823e+38f ;
        data :valid_max = 3.402823e+38f ;
        data :_FillValue = -9.22337203685477581e+18 ;
        data :missing_value = -9.22337203685477581e+18 ;
}

Change History (3)

comment:1 by Dimitar Misev, 5 years ago

Owner: set to apercov
Status: newassigned

The code for netcdf encode is in conversion/netcdf.cc

You can create the collection needed for this ticket with testcases_mandatory/test_nullvalues/test.sh

comment:2 by Dimitar Misev, 5 years ago

Owner: changed from apercov to dkamov

comment:3 by Dimitar Misev, 5 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.