Re: [CF-metadata] brand new user
Thank you all for help! Still working on understanding what have you said. For now, I mange to transform my file in a fashion that can be import to cost watch software. Still working on the coordinates, for now I made a rectangular grid from lon min to lon max :) Thanks one more time, Izidor ___ CF-metadata mailing list CF-metadata@cgd.ucar.edu http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
Re: [CF-metadata] brand new user
CDO is great if your data is on a lat-lon grid, but on curvilinear grids it has a tendency to trash the ancillary data. I would not recommend it for something like Izidor's use. (At least, that was my experience the last time I used it; possibly it's better now, but I haven't read anything in the update announcements that leads me to expect that...) Cheers, --Seth On Thu, 14 Mar 2013 16:40:14 -0300 Etienne Tourigny wrote: >You may wish to save yourself some trouble, and use a tool that >produces cf-compliant files, such as cdo (Climate Data Operators) [1]. > >in a nutshell this should be accomplished with a simple command: > >cdo -f nc copy in.nc out.nc > >although there is no guarantee that your particular file will be >recognized properly by cdo... > >[1] https://code.zmaw.de/projects/cdo > > >cheers >Etienne > >On Thu, Mar 14, 2013 at 9:39 AM, Izidor Pelajic > wrote: >> Hi all, >> I'm new at netCDF, new at CF, and moderate MATLAB user. I'm new at >> netCDF in a sense of days or week. >> So my problem (beyond the fact that I do not have general knowledge) >> is next. I was provided with a .nc file. In it there are 3 information >> of interest: latitude matrix 160 by 22, longitude matrix 160 by 22 and >> SST matrix also 160 by 22. File is created from NOAA satellite data >> record (from hdf file, but not by me). I need to convert this custom >> made nc file to netCDF CF file. >> So far, I managed to open nc file in matlab, edit variables, make some >> nice charts and save it as it is. But I do not know how to save in CF >> convention. My problem is longitude and latitude that are of same >> dimension as variable SST. How do I make sst( lon, lat ) if all lon >> and lat elements are of different value? (it was written down in line >> as satellite passed over an area) >> >> Any idea, or example? >> Izidor >> ___ >> CF-metadata mailing list >> CF-metadata@cgd.ucar.edu >> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata >___ >CF-metadata mailing list >CF-metadata@cgd.ucar.edu >http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata ___ CF-metadata mailing list CF-metadata@cgd.ucar.edu http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
Re: [CF-metadata] brand new user
You may wish to save yourself some trouble, and use a tool that produces cf-compliant files, such as cdo (Climate Data Operators) [1]. in a nutshell this should be accomplished with a simple command: cdo -f nc copy in.nc out.nc although there is no guarantee that your particular file will be recognized properly by cdo... [1] https://code.zmaw.de/projects/cdo cheers Etienne On Thu, Mar 14, 2013 at 9:39 AM, Izidor Pelajic wrote: > Hi all, > I'm new at netCDF, new at CF, and moderate MATLAB user. I'm new at > netCDF in a sense of days or week. > So my problem (beyond the fact that I do not have general knowledge) > is next. I was provided with a .nc file. In it there are 3 information > of interest: latitude matrix 160 by 22, longitude matrix 160 by 22 and > SST matrix also 160 by 22. File is created from NOAA satellite data > record (from hdf file, but not by me). I need to convert this custom > made nc file to netCDF CF file. > So far, I managed to open nc file in matlab, edit variables, make some > nice charts and save it as it is. But I do not know how to save in CF > convention. My problem is longitude and latitude that are of same > dimension as variable SST. How do I make sst( lon, lat ) if all lon > and lat elements are of different value? (it was written down in line > as satellite passed over an area) > > Any idea, or example? > Izidor > ___ > CF-metadata mailing list > CF-metadata@cgd.ucar.edu > http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata ___ CF-metadata mailing list CF-metadata@cgd.ucar.edu http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
Re: [CF-metadata] brand new user
To correct a small typo > sst:coordinate = "lat lon"; The attribute name is "coordinates", not "coordinate". Jonathan ___ CF-metadata mailing list CF-metadata@cgd.ucar.edu http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
Re: [CF-metadata] brand new user
On 3/14/2013 6:39 AM, Izidor Pelajic wrote: Hi all, I'm new at netCDF, new at CF, and moderate MATLAB user. I'm new at netCDF in a sense of days or week. So my problem (beyond the fact that I do not have general knowledge) is next. I was provided with a .nc file. In it there are 3 information of interest: latitude matrix 160 by 22, longitude matrix 160 by 22 and SST matrix also 160 by 22. File is created from NOAA satellite data record (from hdf file, but not by me). I need to convert this custom made nc file to netCDF CF file. So far, I managed to open nc file in matlab, edit variables, make some nice charts and save it as it is. But I do not know how to save in CF convention. My problem is longitude and latitude that are of same dimension as variable SST. How do I make sst( lon, lat ) if all lon and lat elements are of different value? (it was written down in line as satellite passed over an area) Any idea, or example? Izidor ___ CF-metadata mailing list CF-metadata@cgd.ucar.edu http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata Hi Izidor: i presume that you need to compute the 2D lat and lon coordinates and add them to the file. If you think of renaming your dimensions like this, perhaps it is easier: dimension scan = 160; xscan = 22 variables: float sst(scan,xscan); sst:coordinate = "lat lon"; float lat(scan,xscan); lat:units= "degrees_north"; float lon(scan,xscan); lat:units= "degrees_east"; the sst:coordinate = "lat lon"; means add an attribute to the sst variable with name "coordinate" and value "lat lon". This is how CF associates the lat and lon coordinates to the data variable. The "units" attribute on lat and lon is how CF knows what they are (i.e. not by the variable name, which can be anything). this is just the minimum, of course you might want to add standard_name attribute, etc. Good luck! John ___ CF-metadata mailing list CF-metadata@cgd.ucar.edu http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
[CF-metadata] brand new user
Hi all, I'm new at netCDF, new at CF, and moderate MATLAB user. I'm new at netCDF in a sense of days or week. So my problem (beyond the fact that I do not have general knowledge) is next. I was provided with a .nc file. In it there are 3 information of interest: latitude matrix 160 by 22, longitude matrix 160 by 22 and SST matrix also 160 by 22. File is created from NOAA satellite data record (from hdf file, but not by me). I need to convert this custom made nc file to netCDF CF file. So far, I managed to open nc file in matlab, edit variables, make some nice charts and save it as it is. But I do not know how to save in CF convention. My problem is longitude and latitude that are of same dimension as variable SST. How do I make sst( lon, lat ) if all lon and lat elements are of different value? (it was written down in line as satellite passed over an area) Any idea, or example? Izidor ___ CF-metadata mailing list CF-metadata@cgd.ucar.edu http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata