ASCII to netcdf conversion..in C programming

Hi...

Great minds....

I have need of ascii to netcdf conversion,,,,,using C programming...

Can any experts do this task...

here I attached my file....

fill missing value -999 in a grid.. (where there is no data)

first it has read text file (txt)

and then it has to find number of profiles...
example  1st cast 0 to 10 meter
               2nd cast may be 3 to 450 meter...
               3rd and so on........

then it has find longest profile (Maximum depth in particular profile)....
suppose say if deepest cast is 4500 meter, according to depth it has to create grid....

if profile does not have data say 1st profile is 0 to 10 meter, it will have temperature value till 10 meter only, then remaining 4490 location in grid should be filled by -999( missing value) 
I have requirement of 3 dimension as well as 4 dimension grid..
temperature and salinity with following dimensions..

latitude
longitude
depth
time(including date)

Kindly help....

Hi.

Googling netcdf produced a number of hits. One of which at NCAR/UCAR contained this:

-- excerpt from: NetCDF FAQ, q.v.

I have not used netCDF, but this looks straight-forward if you have the appropriate codes installed.

To do this in C (more likely C++) would probably require that you mimic the codes cited. Probably better to use the suggestions of NCAR/UCAR if you can.

Observation: this appears to be a problem that is in the realm of specialists. I would guess that few people here are in that category, but I've been wrong before and will be again.

Best wishes ... cheers, drl