[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #FQQ-870725]: NetCDF use

The first thing you should do is
write a CDL file describing your
data. You can use the ncgen utility
to check the correctness of that
CDL description.

Further, you should use netcdf-4
and not the more limiting netcdf-3.

Now, here is my first try at answering
your question:

1. How do I store the patientâs name? Is that possible?

You can store a name as a variable of type String.

2. Iâve mapped every patient to a NetCDF dimension. To retrieve a
patientâs data I need to map the patient to its dimension. Can this
information be kept on NetCDF or do I need to store this mapping on a
database outside NetCDF? For instance, John Doe is mapped to dimension
25 (my 25th patient) on the data.

One simple way to do this is to define a variable like this:
        String names(numberofpatients);
Then you can search the names variable for a matching patient name.
The index of names at which you find the matching name then
becomes the index of the patient.

3. I use time as an unlimited dimension, with time 0, as the first day
of the program. When a new patient enters the program, we do not have
any data for her yet. Letâs say that she enters the program after 100
days, if we use a time index of 100 NetCDF will create empty slots for time
0 to 99 for this patient and if I understand correctly, this will waist
space. Is that the right way to do this?

netcdf-3 will waste this space. If you use netcdf-4
(as I recommend), then the space is managed more efficiently
internally and no space is wasted.

4. On the same line of question 3, when I stop collecting ânormal dataâ
to collect âtreatment dataâ, there will be a gap on the data. For
instance, letâs say that I stop collecting normal data on day 100 and
resume it on day 150, will there be a gap of 50 days with empty records
from day 100 to day 149?

Same answer as #3. But I would not worry about the wasted space
unless you really think your data will have a really large
number of records.  The space is wasted on the disk (with netcdf-3)
but does not affect memory usage.

=Dennis Heimbigner

=Dennis Heimbigner

Ticket Details
Ticket ID: FQQ-870725
Department: Support netCDF
Priority: High
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.