Project

General

Profile

Ascii to netcdf conversion

Added by Akshay Hegde over 11 years ago

Hi. experts,

I am new to CDO forum,.I was just wondering for help...to convert...ascii to netcdf..., I tried a lot with C , and I could able to get result for continues profile (single cast), but I got struck with file, if containing multiple profiles of non-uniform depth....

I know the algorithm how to do, but could not able to do in C as it becomes very lengthy ..

So this is that algorithm

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) ---Julian day

Please experts, get back to me, here I have attached my datafile, please have a look

I have installed CDO successfully, on my linux machine..pls help..

text_nc.txt (705 KB) text_nc.txt My data file