Project

General

Profile

Xsize/ysize value for converting lambert_conformal_conic to normal lat-lon

Added by ibomcha meitei almost 3 years ago

Hello,

I am trying to get convert the projection from lambert_conformal_conic to regualr lat-lon using
cdo -f nc -remapbil,new_grid.txt infile outfile

new grid text:

gridtype = lonlat
xsize = 
ysize = 
xfirst = 0
xinc = 0.44
yfirst = 0
yinc = 0.44

For my data (grid size of 0.44):

 dimensions:
    y = 140;
    x = 148;
    time = UNLIMITED;   // (490560 currently)
    bnds = 2;
  variables:
    double lon(y=140, x=148);
      :FieldType = 104; // int
      :MemoryOrder = "XY ";
      :description = "LONGITUDE, WEST IS NEGATIVE";
      :long_name = "longitude";
      :standard_name = "longitude";
      :units = "degree_east";

    char Lambert_Conformal;
      :grid_mapping_name = "lambert_conformal_conic";
      :longitude_of_central_meridian = -97.0; // double
      :latitude_of_projection_origin = 46.000003814697266; // double
      :standard_parallel = 35.0, 60.0; // double

    double lat(y=140, x=148);
      :standard_name = "latitude";
      :long_name = "latitude";
      :units = "degree_north";
      :FieldType = 104; // int
      :MemoryOrder = "XY ";
      :description = "LATITUDE, SOUTH IS NEGATIVE";

    float pr(time=490560, y=140, x=148);
      :standard_name = "precipitation_flux";
      :long_name = "Precipitation";
      :units = "kg m-2 s-1";
      :grid_type = "lcc2";
      :grid_mapping = "Lambert_Conformal";
      :_FillValue = 1.0E20f; // float
      :missing_value = 1.0E20f; // float
      :FieldType = 104; // int
      :MemoryOrder = "XY ";
      :cell_methods = "time: mean(interval: 1h)";
      :description = "(var(time) - var(time-1))/1800.";
      :original_name = "RAINC+RAINNC";
      :original_units = "mm";

    double time(time=490560);
      :standard_name = "time";
      :long_name = "time";
      :bounds = "time_bnds";
      :units = "days since 1949-12-1 00:00:00";
      :calendar = "standard";
      :axis = "T";
      :cell_methods = "time: mean";

    double time_bnds(time=490560, bnds=2);
      :cell_methods = "time: mean";

    double x(x=148);
      :long_name = "x-coordinate in Cartesian system";
      :units = "m";
      :axis = "X";

    double y(y=140);
      :long_name = "x-coordinate in Cartesian system";
      :units = "m";
      :axis = "Y";

how can I provide the xsize and ysize?