cdo remapping all values missing or set to 0
Added by Alexandra Gossart over 8 years ago
Hi,
I am trying to remap a regular lonlat dataset to match a curvilinear map, both on the same area.
the lonlat file description is #- gridID 25
#
gridtype = lonlat
gridsize = 62880
xname = rlon
xlongname = longitude in rotated pole grid
xunits = degrees
yname = rlat
ylongname = latitude in rotated pole grid
yunits = degrees
xsize = 262
ysize = 240
xfirst = -32.75
xinc = 0.25
yfirst = -30
yinc = 0.25
- gridID 27
#
gridtype = curvilinear
gridsize = 87616
xname = lon
xlongname = longitude
xunits = degrees_east
yname = lat
ylongname = latitude
yunits = degrees_north
xsize = 296
ysize = 296
xvals = -122.316422 -122.477943 -122.640984 -122.805557 -122.97168 -123.139366
-123.308624 -123.479462 -123.651901 -123.825951 -124.001625 -124.17894
-124.357895 -124.538521 -124.720818 -124.9048 -125.090492 -125.277893
-125.467026 -125.65789 -125.850517 -126.044907 -126.241081 -126.439041
-126.638809 -126.840401 -127.043816 -127.249084 -127.456207 -127.665199
-127.876076 -128.088852 -128.303528 -128.520126 -128.738663 -128.959152
-129.181595 -129.406006 -129.632401 -129.860794 -130.091202 -130.323608
-130.55806 -130.794556 -131.033096 -131.273712 -131.516403 -131.761169
-132.008041 -132.257019 -132.508102 -132.761322 -133.016678 -133.274185
-133.533844 -133.79567 -134.059662 -134.325836 -134.594193 -134.864746
-135.137512 -135.412476 -135.689651 -135.969055 -136.250687 -136.534546
-136.820648 -137.108978 -137.399567 -137.692398 -137.987473 -138.284805
-138.584381 -138.886215 -139.190308 -139.496658 -139.805252 -140.116104
-140.429199 -140.744553 -141.062149 -141.381973 -141.704041 -142.028336
-142.354843 -142.683578 -143.014511 -143.347656 -143.682968 -144.020477
-144.360153 -144.701981 -145.045959 -145.392059 -145.74028 -146.090607
-146.443008 -146.79747 -147.153992 -147.512543 -147.873093 -148.235641
-148.600159 -148.966614 -149.334991 -149.705261 -150.077408 -150.451385
-150.827179 -151.204773 -151.584122 -151.965179 -152.347946 -152.732376
-153.118439 -153.506088 -153.895294 -154.286041 -154.678253 -155.07193
-155.46701 -155.863464 -156.26123 -156.660309 -157.060623 -157.462128
-157.864807 -158.2686 -158.673462 -159.07933 -159.486191 -159.893982
-160.302643 -160.712143 -161.122421 -161.533447 -161.945145 -162.357468
-162.770386 -163.183838 -163.597748 -164.0121 -164.426819 -164.841858
-165.257172 -165.672684 -166.088364 -166.50415 -166.919998 -167.335846
-167.751633 -168.167313 -168.58284 -168.998138 -169.413177 -169.827896
-170.242249 -170.656174 -171.069611 -171.482529 -171.894852 -172.306549
-172.717575 -173.127853 -173.537354 -173.946014 -174.353806 -174.760666
-175.16655 -175.571396 -175.975189 -176.377869 -176.779373 -177.179688
-177.578766 -177.976547 -178.372986 -178.768066 -179.161743 -179.55397
-179.944702 179.666092 179.278442 178.89238 178.50795 178.125183 177.74411
....
I use *cdo remapbil,griddes_lonlatfile.txt -setgrid,griddes_curvilinearfile.txt lonlat.nc reslut.nc
*
the result is correctly remapped (cdo remapbil: SCRIP bilinear remapping from lonlat (262x240) to curvilinear (296x296) grid)
sinfo yields the expected description
cdo sinfo out.nc
File format : netCDF
-1 : Institut Source Ttype Levels Num Points Num Dtype : Parameter ID
1 : unknown unknown instant 1 1 87616 1 F64 : -1
Grid coordinates :
1 : curvilinear : points=87616 (296x296)
lon : -179.999 to 179.99 degrees_east
lat : -89.92 to -40.6496 degrees_north
Vertical coordinates :
1 : surface : levels=1
Time coordinate : 12 steps
RefTime = 1950-01-01 00:00:00 Units = days Calendar = standard
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss
2012-01-01 00:00:00 2012-02-01 00:00:00 2012-03-01 00:00:00 2012-04-01 00:00:00
2012-05-01 00:00:00 2012-06-01 00:00:00 2012-07-01 00:00:00 2012-08-01 00:00:00
2012-09-01 00:00:00 2012-10-01 00:00:00 2012-11-01 00:00:00 2012-12-01 00:00:00
cdo sinfo: Processed 1 variable over 12 timesteps ( 0.00s )
but the variable is set to 0 everywhere and the error message
Warning: did not correctly match mapped dims specified in the coordinates attribute to dims in the variable
Problem encountered on variable "t2m" which has shape (12,296,296)
and has coordinates attribute "lon lat"
The problem is that coordinate var "lon" has shape (296,296), which does not match dimensions in the variable being mapped!
Abandoning coordinate mapping for this variable
Can you help me with this?
Many thanks!
Alexandra
lonlat.nc (5.76 MB) lonlat.nc | |||
out.nc (9.36 MB) out.nc | |||
griddes_curvilinearfile.txt (313 Bytes) griddes_curvilinearfile.txt | |||
griddes_lonlatfile.txt (2.29 MB) griddes_lonlatfile.txt |