Project

General

Profile

Variables not found using CDO

Added by Noelia Otero almost 8 years ago

Dear all,

I am trying to use CDO to interpolate some WRF output files, but I having some problems here: Unsupported grid type: generic.
The problem that I found so far is that there are some variables that can be found with CDO, for instance XLAT or XLON can not be found, but when I use ncdump -h to see the all information, those variables are well defined...so I was wondering why not all variables are shown by CDO, while the file does contain this information. Since the file is too large, and to clarify my point, I wanted to attach the output from ncdump, cdo sinfo and cdo showvar.

Any suggestion would be very welcome!

Thanks in advance,

Best

Noelia


Replies (4)

RE: Variables not found using CDO - Added by Ralf Mueller almost 8 years ago

please upload the file - its impossible to reconstruct things without data for CDO.

CDO is not a fully netcdf compliant tool. it supports parts of the CF convention, but sertainly not all of it. The fact that your file can be read and displayed with ncdump only means, that it is valid netcdf.

cheers
ralf

RE: Variables not found using CDO - Added by Noelia Otero almost 8 years ago

Hi,

Thanks for your answer. I attach a similar file, since the original one (with same defined variables) it's too large to be uploaded.
I read some others messages related to my problem, but I don't know yet if CDO could be applied here for regridding the file.

Many thanks again!

Best

Noelia

wrfout_d01_1990-12-27.00.nc (46.2 MB) wrfout_d01_1990-12-27.00.nc sample file WRF output

RE: Variables not found using CDO - Added by Ralf Mueller almost 8 years ago

I have no problem converting e.g. the albedo variable to a regular grid with remapbil
ram@luthien:~/Downloads cdo -P 4  remapbil,r180x90 -selname,ALBEDO wrfout_d01_1990-12-27.00.nc t.nc [9:45:46|16-05-18]
cdo remapbil: Started child process "selname,ALBEDO wrfout_d01_1990-12-27.00.nc (pipe1.1)".
cdo remapbil: SCRIP bilinear weights from curvilinear (119x116) to lonlat (180x90) grid
cdo remapbil:  64%cdo(2) selname: Processed 13804 values from 203 variables over 1 timestep ( 0.04s )
cdo remapbil: Processed 13804 values from 1 variable over 1 timestep ( 0.04s )
2 deg 1 deg

But this in not possible the complete file in a single step, because it contains of several variables with only a single grid point or 4 gridpoints

ram@luthien:~/Downloads cdo sinfov -selgrid,7 wrfout_d01_1990-12-27.00.nc                           [9:49:40|16-05-18]
cdo sinfon: Started child process "selgrid,7 wrfout_d01_1990-12-27.00.nc (pipe1.1)".
   File format : NetCDF
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  instant       1   1         1   1  F32  : HFX_FORCE     
     2 : unknown  unknown  instant       1   1         1   1  F32  : LH_FORCE      
     3 : unknown  unknown  instant       1   1         1   1  F32  : TSK_FORCE     
     4 : unknown  unknown  instant       1   1         1   1  F32  : HFX_FORCE_TEND
     5 : unknown  unknown  instant       1   1         1   1  F32  : LH_FORCE_TEND 
     6 : unknown  unknown  instant       1   1         1   1  F32  : TSK_FORCE_TEND
     7 : unknown  unknown  instant       1   1         1   1  F32  : CFN           
     8 : unknown  unknown  instant       1   1         1   1  F32  : CFN1          
     9 : unknown  unknown  instant       1   1         1   1  F32  : RDX           
    10 : unknown  unknown  instant       1   1         1   1  F32  : RDY           
    11 : unknown  unknown  instant       1   1         1   1  F32  : RESM          
    12 : unknown  unknown  instant       1   1         1   1  F32  : ZETATOP       
    13 : unknown  unknown  instant       1   1         1   1  F32  : CF1           
    14 : unknown  unknown  instant       1   1         1   1  F32  : CF2           
    15 : unknown  unknown  instant       1   1         1   1  F32  : CF3           
    16 : unknown  unknown  instant       1   1         1   1  I32  : ITIMESTEP     
    17 : unknown  unknown  instant       1   1         1   1  F32  : XTIME         
    18 : unknown  unknown  instant       1   1         1   1  F32  : P_TOP         
    19 : unknown  unknown  instant       1   1         1   1  F32  : T00           
    20 : unknown  unknown  instant       1   1         1   1  F32  : P00           
    21 : unknown  unknown  instant       1   1         1   1  F32  : TLP           
    22 : unknown  unknown  instant       1   1         1   1  F32  : TISO          
    23 : unknown  unknown  instant       1   1         1   1  F32  : MAX_MSTFX     
    24 : unknown  unknown  instant       1   1         1   1  F32  : MAX_MSTFY     
    25 : unknown  unknown  instant       1   1         1   1  I32  : STEPAVE_COUNT 
    26 : unknown  unknown  instant       1   1         1   1  I32  : SAVE_TOPO_FROM_REAL
    27 : unknown  unknown  instant       1   1         1   1  I32  : SEED1         
    28 : unknown  unknown  instant       1   1         1   1  I32  : SEED2         
   Grid coordinates :
     1 : generic                  : points=1
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  1 step
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  1990-12-27 00:00:00
cdo(2) selgrid: Processed 28 values from 203 variables over 1 timestep ( 0.00s )
cdo sinfon: Processed 28 variables over 1 timestep ( 0.00s )

or on other grids
ram@luthien:~/Downloads cdo sinfov -selgrid,6 wrfout_d01_1990-12-27.00.nc                           [9:49:53|16-05-18]
cdo sinfon: Started child process "selgrid,6 wrfout_d01_1990-12-27.00.nc (pipe1.1)".
   File format : NetCDF
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  instant      31   1     13923   1  F32  : V             
     2 : unknown  unknown  instant       1   2     13923   1  F32  : MAPFAC_V      
     3 : unknown  unknown  instant       1   2     13923   1  F32  : MAPFAC_VX     
     4 : unknown  unknown  instant       1   2     13923   1  F32  : MF_VX_INV     
     5 : unknown  unknown  instant       1   2     13923   1  F32  : MAPFAC_VY     
     6 : unknown  unknown  instant       1   2     13923   1  F32  : VAH           
   Grid coordinates :
     1 : curvilinear              : points=13923 (119x117)
                              lon : -52.1717 to 73.8901 degrees_east
                              lat : 18.0489 to 75.2826 degrees_north
   Vertical coordinates :
     1 : generic                  : levels=31
                              lev : 1 to 31 by 1 level
     2 : surface                  : levels=1
   Time coordinate :  1 step
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  1990-12-27 00:00:00
cdo(2) selgrid: Processed 501228 values from 203 variables over 1 timestep ( 0.00s )
cdo sinfon: Processed 6 variables over 1 timestep ( 0.00s )
ram@luthien:~/Downloads cdo sinfov -selgrid,5 wrfout_d01_1990-12-27.00.nc                           [9:51:02|16-05-18]
cdo sinfon: Started child process "selgrid,5 wrfout_d01_1990-12-27.00.nc (pipe1.1)".
   File format : NetCDF
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  instant      31   1     13920   1  F32  : U             
     2 : unknown  unknown  instant       1   2     13920   1  F32  : MAPFAC_U      
     3 : unknown  unknown  instant       1   2     13920   1  F32  : MAPFAC_UX     
     4 : unknown  unknown  instant       1   2     13920   1  F32  : MAPFAC_UY     
     5 : unknown  unknown  instant       1   2     13920   1  F32  : UAH           
   Grid coordinates :
     1 : curvilinear              : points=13920 (120x116)
                              lon : -52.0612 to 73.8577 degrees_east
                              lat : 18.1645 to 75.0619 degrees_north
   Vertical coordinates :
     1 : generic                  : levels=31
                              lev : 1 to 31 by 1 level
     2 : surface                  : levels=1
   Time coordinate :  1 step
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  1990-12-27 00:00:00
cdo(2) selgrid: Processed 487200 values from 203 variables over 1 timestep ( 0.01s )
cdo sinfon: Processed 5 variables over 1 timestep ( 0.01s )
ram@luthien:~/Downloads cdo sinfov -selgrid,4 wrfout_d01_1990-12-27.00.nc                           [9:51:07|16-05-18]
cdo sinfon: Started child process "selgrid,4 wrfout_d01_1990-12-27.00.nc (pipe1.1)".
   File format : NetCDF
    -1 : Institut Source   Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  instant       1   1         4   1  F32  : ZS            
     2 : unknown  unknown  instant       1   1         4   1  F32  : DZS           
   Grid coordinates :
     1 : generic                  : points=4
   Vertical coordinates :
     1 : surface                  : levels=1
   Time coordinate :  1 step
  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss  YYYY-MM-DD hh:mm:ss
  1990-12-27 00:00:00
cdo(2) selgrid: Processed 8 values from 203 variables over 1 timestep ( 0.01s )
cdo sinfon: Processed 2 variables over 1 timestep ( 0.01s )

In order to remap all horizontally distributed fields, select grid 1 first, e.g.

cdo -P 4  remapbil,global_1 -selgrid,1 wrfout_d01_1990-12-27.00.nc t.nc

Please note, that not all interpolations (e.g. conservative remapping) are possible because the coordinate bounds are missing.

hth
ralf

RE: Variables not found using CDO - Added by Noelia Otero almost 8 years ago

Hi Ralf,

Thanks a lot for your help.
So, I guess I had the problem when taking the whole file..Then, I should try separately some variables.
Many thanks again,

Cheers

Noelia

    (1-4/4)