This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Enes,
If I run the attached version of your code, I can write out an array smaller
than the variable to the depth variable. In this case, I see the values I
expect, as well as the fill values.
Here's a snippet of what I see when I run "ncdump resources\\xyz_grid.nc":
depth =
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _,
If that's not what you see when you compile and run this code, then there may
indeed be a problem with the CDL conversion from Panoply.
Ryan
> Hey Ryan,
>
> Please take again the example provided hereunder. If comment out the write
> method for writing the depth array, I still get 0.0 as a fill.
>
> If I understand correctly, the fill values are only placed when there is no
> data written to the variables? So, there is also no possibility then to set
> some values in the array and expect that the rest will be filled with the
> fill values?
>
> BTW, I'm using Panoply to convert the resulting file to a cdl file for
> further inspection. Could that be causing any if all the problem I'm
> experiencing?
>
> Thanks in advance!
>
> Enes,
>
> address@hidden> wrote:
>
> > Enes,
> >
> > The example you sent only uses a fill value of 66, which isn't seen since
> > the example is writing data to the variables. If I remove the commands
> > writing data to the variables ("write()"), I see the fill value of 66 when
> > I "ncdump" the resulting file.
> >
> > So I'm not sure exactly where you're seeing a problem.
> >
> > Ryan
> >
> > > Hi there!
> > >
> > > I'm setting "_FillValue", -9999f as an attribute for my netcdf dataset
> > but
> > > whatever I do, I always see 0.0 passed back in the file. Could you have
> > > look at my source file to tell perhaps I'm doing something wrong with it?
> > > Your help is much appreciated.
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: KIS-882423
> > Department: Support netCDF Java
> > Priority: Normal
> > Status: Closed
> >
> >
>
>
Ticket Details
===================
Ticket ID: KIS-882423
Department: Support netCDF Java
Priority: Normal
Status: ClosedAttachment:
CreateXYZGrid.java
Description: Binary data