NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi This is probably much easier to do using a higher level generic tool such as NCL, than writing a file-specific program in C, Fortran, Python, whatever, using the NetCDF API. NCL documentation includes examples on how to read CSV files: https://www.ncl.ucar.edu/Applications/read_csv.shtml and how to write NetCDF files: https://www.ncl.ucar.edu/Applications/method_1.shtml https://www.ncl.ucar.edu/Applications/method_2.shtml For atmosphere/ocean/climate/weather data there hardly anything better than NCL: https://www.ncl.ucar.edu/index.shtml If you run into problems, their mailing list is active and very helpful: https://www.ncl.ucar.edu/Support/email_lists.shtml I hope this helps, Gus Correa On Tue, Dec 15, 2020 at 12:58 PM nazaniti6 <nazitkk1375@xxxxxxxxx> wrote: > Hello, > I have six CSV files which I have sent in this link > ( > https://drive.google.com/drive/folders/1GQtyY1mI1YrK8GFP9SEo7dZfFHexKro3?usp=sharing > ). > If you open them you will understand that each of these files has 720 rows > and 360 columns which indicates longitude and latitude respectively. I > should tell you that the first point of latitude is -89.75, the first point > of longitude is -179.75, and the resolution of these data is 0.5 degrees. I > want to convert them to a NetCDF file which has the following properties: > Dimensions: > longitude = 720 > latitude = 360 > time = 6 > Variables: > longitude > Size: 720x1 > Dimensions: longitude > Datatype: single > Attributes: > long_name = 'longitude' > units = 'degrees_east' > latitude > Size: 360x1 > Dimensions: latitude > Datatype: single > Attributes: > long_name = 'latitude' > units = 'degrees_north' > time > Size: 6x1 > Dimensions: time > Datatype: single > Attributes: > long_name = 'time' > units = 'days since 1900-1-1' > calendar = 'gregorian' > tmp > Size: 720x360x6 > Dimensions: longitude, latitude,time > Datatype: single > Attributes: > long_name = 'monthly mean temperature' > units = 'degrees Celsius' > correlation_decay_distance = 1200 > _FillValue = 9.969209968386869e+36 > missing_value = 9.969209968386869e+36 > Could you please help me? > > > > > > -- > Sent from: http://netcdf-group.1586084.n2.nabble.com/ > > _______________________________________________ > NOTE: All exchanges posted to Unidata maintained email lists are > recorded in the Unidata inquiry tracking system and made publicly > available through the web. Users who post to any of the lists we > maintain are reminded to remove any personal information that they > do not want to be made public. > > > netcdfgroup mailing list > netcdfgroup@xxxxxxxxxxxxxxxx > For list information or to unsubscribe, visit: > https://www.unidata.ucar.edu/mailing_lists/ >
netcdfgroup
archives: