Writing a ascii file into a netcdf file
Added by chinmay Deval almost 9 years ago
Hi,
I have a monthly data of equivalent water thickness from GRACE satellite observation. Sample file is attached below. It consists of three columns namely latitude, longitude (both in degrees) and equivalent water thickness (in meters). I would be really grateful if someone can guide me with writing this data into a netcdf file using cdo command.
Thank you in advance,
Chinmay
DMT-1b_200303.asc (12.1 MB) DMT-1b_200303.asc |
Replies (2)
RE: Writing a ascii file into a netcdf file - Added by Jaison-Thomas Ambadan almost 9 years ago
Have a look at the examples here:
https://code.zmaw.de/boards/1/topics/3638?r=3646
Also, there is an example Python script by Ralf Mueller: https://code.zmaw.de/boards/1/topics/3631?r=3636#message-3636
----
since the spatial resolution of your data is 0.5 degree, it's easy to create a grid description:
cdo griddes -topo > mygrid cdo -f nc input,mygrid ofile.nc < ascii_data
where ascii_data is your data (third column).
RE: Writing a ascii file into a netcdf file - Added by chinmay Deval almost 9 years ago
Hi Jaison,
Thank you for your prompt response. This worked fine.
Best Regards,
Chinmay