Project

General

Profile

remapbil unsupported grid

Added by Laure Resplandy almost 10 years ago

Hi,

I am sorry to post again on this subject. I have found several posts about problems of unsupported grids and tried a lot of the advice given but with no success.
The nectdf file seems fine to me. it is defined with a curvilinear grid but as soon as I try to do any operation with cdo (copy, selname, remapbil etc.), the output variables are NaN everywhere.
As I am only interested in 2d-variables, I tried to first select them with ncks (as I can't do it with cdo) but then I loose the grid that becomes generic.
I also tried to set the grid of another file of the same model I have and for which I can perform remap etc... but with no success either.

I can't attached the file because it is too big and if I select one variable I actually loose the variable. Below is the header and grid info.
It is available here: ftp://ftp.cea.fr/incoming/y2k01/bopp/LAURE/C13/C13_17A_1y_20000101_20001231_diad_T.nc

Thank you for your help.
Best regards,

Laure

Here is my header for one of the variable I am interested in (Cflx):

dimensions:
x = 182 ;
y = 149 ;
deptht = 31 ;
time_counter = UNLIMITED ; // (12 currently)
variables:
float nav_lon(y, x) ;
nav_lon:units = "degrees_east" ;
nav_lon:valid_min = -179.7507f ;
nav_lon:valid_max = 180.f ;
nav_lon:long_name = "Longitude" ;
nav_lon:nav_model = "Default grid" ;
float nav_lat(y, x) ;
nav_lat:units = "degrees_north" ;
nav_lat:valid_min = -78.19058f ;
nav_lat:valid_max = 89.6139f ;
nav_lat:long_name = "Latitude" ;
nav_lat:nav_model = "Default grid" ;
float deptht(deptht) ;
deptht:units = "m" ;
deptht:positive = "unknown" ;
deptht:valid_min = 4.999938f ;
deptht:valid_max = 5250.227f ;
deptht:title = "deptht" ;
deptht:long_name = "Vertical T levels" ;
float deptht(deptht) ;
deptht:units = "m" ;
deptht:positive = "unknown" ;
deptht:valid_min = 4.999938f ;
deptht:valid_max = 5250.227f ;
deptht:title = "deptht" ;
deptht:long_name = "Vertical T levels" ;
float Cflx(time_counter, y, x) ;
Cflx:units = "molC/m2/" ;
Cflx:missing_value = 1.e+20f ;
Cflx:valid_min = 1.e+20f ;
Cflx:valid_max = -1.e+20f ;
Cflx:long_name = "DICflux" ;
Cflx:short_name = "Cflx" ;
Cflx:online_operation = "ave(only(x))" ;
Cflx:axis = "TYX" ;
Cflx:interval_operation = 26280.f ;
Cflx:interval_write = 2628000.f ;
Cflx:associate = "time_counter nav_lat nav_lon" ;


File format: netCDF
-1 : Institut Source Ttype Levels Num Gridsize Num Dtype : Parameter ID
1 : unknown unknown instant 31 1 27118 1 F32 : -1
2 : unknown unknown instant 31 1 27118 1 F32 : -2
3 : unknown unknown instant 31 1 27118 1 F32 : -3
4 : unknown unknown instant 31 1 27118 1 F32 : -4
5 : unknown unknown instant 31 1 27118 1 F32 : -5
6 : unknown unknown instant 31 1 27118 1 F32 : -6
7 : unknown unknown instant 31 1 27118 1 F32 : -7
8 : unknown unknown instant 31 1 27118 1 F32 : -8
9 : unknown unknown instant 31 1 27118 1 F32 : -9
10 : unknown unknown instant 31 1 27118 1 F32 : -10
11 : unknown unknown instant 31 1 27118 1 F32 : -11
12 : unknown unknown instant 1 2 27118 1 F32 : -12
13 : unknown unknown instant 1 2 27118 1 F32 : -13
14 : unknown unknown instant 1 2 27118 1 F32 : -14
15 : unknown unknown instant 1 2 27118 1 F32 : -15
16 : unknown unknown instant 1 2 27118 1 F32 : -16
17 : unknown unknown instant 1 2 27118 1 F32 : -17
18 : unknown unknown instant 1 2 27118 1 F32 : -18
19 : unknown unknown instant 1 2 27118 1 F32 : -19
20 : unknown unknown instant 1 2 27118 1 F32 : -20
21 : unknown unknown instant 1 2 27118 1 F32 : -21
22 : unknown unknown instant 1 2 27118 1 F32 : -22
23 : unknown unknown instant 1 2 27118 1 F32 : -23
24 : unknown unknown instant 1 2 27118 1 F32 : -24
25 : unknown unknown instant 1 2 27118 1 F32 : -25
Grid coordinates :
1 : curvilinear > size : dim = 27118 nx = 182 ny = 149
nav_lon : min = -179.750702 max = 180 degrees_east circular
nav_lat : min = -78.1905823 max = 89.6138992 degrees_north
available : xvals yvals
Vertical coordinates :
1 : generic m : 4.99993801 15.000288 25.0017586 35.0054131 45.0133171
55.0294991 65.0618057 75.1255112 85.2503662 95.4942856
105.969917 116.89624 128.697906 142.195251 158.960617
181.962784 216.647919 272.476715 364.30304 511.53476
732.200867 1033.21729 1405.69751 1830.88501 2289.76782
2768.24243 3257.47876 3752.44214 4250.40137 4749.91309
5250.22656
2 : surface : 0
Time coordinate : 12 steps
RefTime = 2000-01-01 00:00:00 Units = seconds Calendar = 365_day
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss
2000-01-16 05:00:00 2000-02-15 15:00:00 2000-03-18 01:00:00 2000-04-17 11:00:00
2000-05-17 21:00:00 2000-06-17 07:00:00 2000-07-17 17:00:00 2000-08-17 03:00:00
2000-09-16 13:00:00 2000-10-16 23:00:00 2000-11-16 09:00:00 2000-12-16 19:00:00

Replies (4)

RE: remapbil unsupported grid - Added by Jaison-Thomas Ambadan almost 10 years ago

Your file contains dimesion names such as "time_counter", and lat/lon are stored as nav_lat/nav_lon etc which CDO doesn't support. CDO support only classic NetCDF files with standard names (time, lev, lat, lon), and time dimension has to the first dimension. I recommend generate SCRIP grid description for your curvilinear grids, and then use CDO. Please have a look at the following thread (the last post) for more info.

https://code.zmaw.de/boards/1/topics/2740

RE: remapbil unsupported grid - Added by Jaison-Thomas Ambadan almost 10 years ago

It looks like the above mentioned SCRIP grid procedure doesn't work in your particular case, sorry!

RE: remapbil unsupported grid - Added by Jaison-Thomas Ambadan almost 10 years ago

update:

The problem is the "missing_value" attribute in your file [at least CDO handling of missing_value]. You just have to remove it and then everything will work fine!

1. ncks -v Cflx C13_17A_1y_20000101_20001231_diad_T.nc Cflx.nc
2. ncatted -O -h -a missing_value,Cflx,d,, Cflx.nc
3. cdo -info Cflx.nc

will show NO NaNs.

Now, if you would like to remap I recommend generate a SCRIP [ use the NCL script from the above thread; use nav_lat/nav_lon from your file; I'm also attaching the SCRIP grid just in case ] grid description and then use remap

here is the output from my remapbil:

cdo -s -info -remapbil,r182x149 -setmissval,-9e31 -setvrange,-1e19,1e19 -setgrid,scrip_grid.nc Cflx.nc
    -1 :       Date     Time   Level Gridsize    Miss :     Minimum        Mean     Maximum : Parameter ID
     1 : 2000-01-16 05:00:00       0    27118   10588 : -1.3995e-07  1.8899e-08  3.3668e-07 : -1            
     2 : 2000-01-16 05:00:00       0    27118    1456 :     -78.191      4.8829      89.592 : -2            
     3 : 2000-01-16 05:00:00       0    27118    1456 :     -178.02     0.74771      180.00 : -3            
     4 : 2000-02-15 15:00:00       0    27118   10588 : -4.7801e-07  1.6020e-08  3.4445e-07 : -1            
     5 : 2000-03-18 01:00:00       0    27118   10588 : -4.5234e-07  1.9655e-08  2.9375e-07 : -1            
     6 : 2000-04-17 11:00:00       0    27118   10588 : -2.0113e-07  2.4704e-08  2.3078e-07 : -1            
     7 : 2000-05-17 21:00:00       0    27118   10588 : -2.1579e-07  2.5519e-08  2.1885e-07 : -1            
     8 : 2000-06-17 07:00:00       0    27118   10588 : -3.2125e-07  1.9304e-08  1.5682e-07 : -1            
     9 : 2000-07-17 17:00:00       0    27118   10588 : -3.6055e-07  1.1328e-08  1.8344e-07 : -1            
    10 : 2000-08-17 03:00:00       0    27118   10588 : -4.0618e-07  7.0418e-09  1.7737e-07 : -1            
    11 : 2000-09-16 13:00:00       0    27118   10588 : -4.8126e-07  5.6542e-09  1.6619e-07 : -1            
    12 : 2000-10-16 23:00:00       0    27118   10588 : -3.9286e-07  1.3078e-08  2.0449e-07 : -1            
    13 : 2000-11-16 09:00:00       0    27118   10588 : -2.5940e-07  2.4598e-08  2.3908e-07 : -1            
    14 : 2000-12-16 19:00:00       0    27118   10588 : -1.0763e-07  2.0228e-08  2.2497e-07 : -1

Cheers,
J

RE: remapbil unsupported grid - Added by Laure Resplandy almost 10 years ago

Thank you very much!!!!!!
It works perfectly. You really saved my day!
-Laure

    (1-4/4)