Project

General

Profile

Dear

Added by xianyong meng almost 7 years ago

[[Dear CDO creator,
First of all, thank you very much for creating the CDO language, so that so many researchers, scientific research, convenient use of CDO processing meteorological data.I've used CDO language to do a lot of work I think is satisfactory, and I will continue to support the development of CDO language.
These days, I want to use CDO to convert txt files to NC files, but I found that CDO read sequence is read from the beginning of the first row and the first column, and the NC data set may and does not conform to the reality, so I hope you will help me to my example (txt) built into netcdf.
The data I downloaded is in TXT format, and this data gives its spatial attributes(lat_long and other information in file cmc_analysis_ps_lat_long.txt): ******************************************************************************************************************************************************
The data space coverage is :
Southernmost Latitude: 0° N
Northernmost Latitude: 90° N
Westernmost Longitude: 180° W
Easternmost Longitude: 180° E

Spatial resolution: 24 km

Grid Specification:
North Polar Stereographic
ni (# rows) = 706, nj (# cols) = 706, bottom left grid point = (1,1)
Grid rotation -10°
Pole position = (353, 353)
Grid resolution at 60°N = 23812.5 m

Geocoordinates:
Latitude and longitude coordinates corresponding to the center of each grid cell are stored in cmc_analysis_ps_lat_long.txt (compressed as cmc_analysis_ps_lat_long.zip on the FTP site). This file lists each cell and its geographic coordinates as a row, column (i, j) ordered pair starting with (1,1), the cell in the lower left corner of the polar stereographic grid. Cell locations then increment across each column of the first row, each column of the second row, and so on, until reaching the upper right corner at (706,706). Refer to Figure 1 to see the first 10 entries from cmc_analysis_ps_lat_long.txt:
I           J        Lat            Long
-----------------------------------------------
1 1 1.665461E-01 -125.000000
1 2 2.479315E-01 -125.081500
1 3 3.293158E-01 -125.163200
1 4 4.106980E-01 -125.245200
1 5 4.920774E-01 -125.327400
1 6 5.734532E-01 -125.409800
1 7 6.548244E-01 -125.492500
1 8 7.361903E-01 -125.575400
1 9 8.175499E-01 -125.658500
1 10 8.989025E-01 -125.741900
Figure 1. Latitude and longitude coordinates for cells (1, 1) through (1, 10)
from cmc_analysis_ps_lat_long.txt

I made the grid and processed it with the statement.

cdo -s -f nc -settaxis,2008-01-01,00:00:00,1month -setname,snow -input,grid 2008001.nc < 200801.txt

I uploaded my data i created, see attachment.

I think I should be a process of data processing, there is a problem, because I found that when the CDO matrix is read from the (lower left corner read), so in order to avoid data flip, I will set a negative increment (xinc).

I don't know if my understanding is right or I can see that I can make GRB through TXT, but I don't know what to do next (GRB, NC). Look forward to your professional answer, I hope you help me out of my case, I really need, thank you very much.]]


Replies (1)

RE: Dear - Added by Ralf Mueller almost 7 years ago

I removed the header section from cmc-file (saved into g.txt) and ran

cdo -s -f nc -settaxis,2008-01-01,00:00:00,1month -setname,snow -input,grid _2008001.nc < g.txt 
without problems and positive xinc. result uploaded - can you check it?

hth
ralf

    (1-1/1)