CDO Remapbil problem
Added by gabriele greco almost 4 years ago
Hi everyone, i'm using the command "remapbil" to switch from curvilinear to lonlat coordinates for a NETcdf temperature map.
The grid i use for the conversion is this one (the original file data is shown in the attachment image):
"
gridtype = lonlat
gridsize = 1148
xsize = 41
ysize = 28
xname = x
xlongname = "longitude"
xunits = "degrees_east"
yname = y
ylongname = "latitude"
yunits = "degrees_north"
xfirst = 8.48826
xinc = 0.0715
yfirst = 44.63501
yinc = 0.0715
"
Practically speaking i'm trying to obtain the lombardy region (italy) in the lonlat reference system. Since the resolution is more or less 8 km, i use the increment you see in the text file above. The temperature map is from a CMCC model.
The problem i obtain is that the resulting output of the lombardy region is "squashed". To visualize this i use QGIS and a toolbox in R.
I'll attach you the visualization of both the starting netcdf and the output in the attachments.
Can someone help me please?
Thank you
sinfo normale.JPG (43.9 KB) sinfo normale.JPG | cdo sinfo for the file i want to convert | ||
lombardia iniziale.JPG (100 KB) lombardia iniziale.JPG | Starting netcdf file | ||
lombardia output.JPG (137 KB) lombardia output.JPG | remapbil output |
Replies (6)
RE: CDO Remapbil problem - Added by Karin Meier-Fleischer almost 4 years ago
Hi Gabriele,
can you upload the input file?
-Karin
RE: CDO Remapbil problem - Added by gabriele greco almost 4 years ago
Sure karin, thanks for your interest.
RE: CDO Remapbil problem - Added by Karin Meier-Fleischer almost 4 years ago
The problem is that your input file has coordinates lon and lat with NaNs. This is not allowed, only variables can have missing values.
First 6 elements of the 2D lon and lat arrays:
Variable: lon1 (subsection) Type: double Total Size: 288 bytes 36 values Number of Dimensions: 2 Dimensions and sizes: [y | 6] x [x | 6] Coordinates: Number Of Attributes: 4 _CoordinateAxisType : Lon units : degrees_east long_name : longitude standard_name : longitude (0,0) nan (0,1) nan (0,2) nan (0,3) nan (0,4) nan (0,5) nan (1,0) nan (1,1) nan (1,2) nan (1,3) nan (1,4) nan (1,5) nan (2,0) nan (2,1) nan (2,2) nan (2,3) nan (2,4) nan (2,5) nan (3,0) nan (3,1) nan (3,2) nan (3,3) nan (3,4) nan (3,5) 9.00468635559082 (4,0) nan (4,1) nan (4,2) nan (4,3) nan (4,4) nan (4,5) 9.00333786010742 (5,0) nan (5,1) nan (5,2) 8.699886322021481 (5,3) 8.800581932067869 (5,4) 8.90128135681152 (5,5) 9.00198554992676 Variable: lat1 (subsection) Type: double Total Size: 288 bytes 36 values Number of Dimensions: 2 Dimensions and sizes: [y | 6] x [x | 6] Coordinates: Number Of Attributes: 4 _CoordinateAxisType : Lat units : degrees_north long_name : latitude standard_name : latitude (0,0) nan (0,1) nan (0,2) nan (0,3) nan (0,4) nan (0,5) nan (1,0) nan (1,1) nan (1,2) nan (1,3) nan (1,4) nan (1,5) nan (2,0) nan (2,1) nan (2,2) nan (2,3) nan (2,4) nan (2,5) nan (3,0) nan (3,1) nan (3,2) nan (3,3) nan (3,4) nan (3,5) 44.847785949707 (4,0) nan (4,1) nan (4,2) nan (4,3) nan (4,4) nan (4,5) 44.9192810058594 (5,0) nan (5,1) nan (5,2) 44.987476348877 (5,3) 44.9886741638184 (5,4) 44.9897727966309 (5,5) 44.9907722473145
RE: CDO Remapbil problem - Added by gabriele greco almost 4 years ago
that is what I was thinking about, thank you very much.
RE: CDO Remapbil problem - Added by gabriele greco almost 4 years ago
Is there any way to insert the misssing lon/lat values with false temperatures ( for example 99 for each cell), in order to work with the file?
Thanks again,
Gabriele
RE: CDO Remapbil problem - Added by Karin Meier-Fleischer almost 4 years ago
The problem are the NaNs in lon and lat. The best would be to get the correct grid from where you got the file.