From global tripole output to global/regional uniform

1.Find Source grid tx0.1v3

1.1 install pop_tools

conda install -c conda-forge pop-tools

1.2 output NetCDF grid file

import xarray as xr
import pop_tools
ds = pop_tools.get_grid('POP_tx0.1v3', scrip=True)

2. Generate destination grid(Global/Regional)

For global grids, one should specify only two more arguments, the latitude (lat_typ) and longitude (lon_typ) grid-types. These types are chosen as described below from a small selection of options that together define the most common rectangular global grids. For regional grids, one must specify the bounding box, i.e., the edges of the rectangular grid on the North (lat_nrt), South (lat_sth), East (lat_est), and West (lat_nrt) sides. Specifying a bounding box for global grids is redundant and will cause an error to ensure the user intends a global grid. NCO assumes that regional grids are uniform, though it will attempt to produce regional grids of other types if the user specifies other latitude (lat_typ) and longitude (lon_typ) grid-types, e.g., Gaussian or Cap. Edges of a regional bounding box may be specified individually, or in the single-argument forms. ---From 3.24 Grid Generation

Global destination grid: lat(-89.95:0.1:89.95),lon(0:0.1:360)

ncremap -g -G ttl='Equi-Angular grid 1800x3600'#latlon=1800,3600#lat_typ=uni 

Regional destination grid of KOE:
center: lat(25.0:0.1:45.0),lon(140.0:0.1:170.0)
edge: snwe=24.95,45.05,139.95,170.05
grid number: latlon=201,301

ncremap -g -G ttl='Equi-Angular Kuroshio&Oyashio Region grid 201x301'#latlon=201,301#snwe=24.95,45.05,139.95,170.05

3. Generate weight-file/map-file(Global/Regional)

ncremap -a bilinear -s -g -m

ncremap -a bilinear -s -g -m

4. remap(Global/Regional)

 ncks -v SSH ./

 ncremap -m

 ncremap -m

ncremap -v SSH -d


From Regional tripole grid output remap to uniform regional output

1st try(failed)

I have FOSI tripole grid global output, then use ncks to extract a KOE regional tripole grid output with all Surface variables of a smaller region:

ncks -F -d nlon,2500,2801 -d nlat,1440,1664 -O /ihesp/archive/g.e20.G.TL319_t13.control.001_contd/ocn/hist/ /scratch/user/hengkai.yao/DATA/g.e20.G.TL319_t13.control.001_contd/ocn/hist/

then make a tripole grid file FOSI_make_regional_grid_file.m named which is same as the regional output and with the same format as global tripole grid file

them make a uniform destination grid:

ncremap -g -G ttl='Equi-Angular Kuroshio&Oyashio Region grid 201x301'#latlon=201,301#snwe=24.95,45.05,139.95,170.05

then make a map-file:

ncremap -a bilinear -s -g -m

then remap the regional tripole grid output to a uniform grid:

ncremap -v SSH -m

Then I plot the remapped SSH, the result is not correct.

2nd try(Success with Matlab scatter interpolation)


Dig more of global grid file

File ""
File type: NetCDF-3/CDM
netcdf file:/Users/yao/test/ {
    grid_rank = 2;
    grid_size = 8640000;
    grid_corners = 4;
    double grid_corner_lat(grid_size=8640000, grid_corners=4);
      :units = "degrees";

    double grid_corner_lon(grid_size=8640000, grid_corners=4);
      :units = "degrees";

    double grid_center_lat(grid_size=8640000);
      :units = "degrees";

    double grid_center_lon(grid_size=8640000);
      :units = "degrees";

    int grid_imask(grid_size=8640000);
      :units = "unitless";

    int grid_dims(grid_rank=2);

  // global attributes:
  :lateral_dims = 2400, 3600; // int
  :vertical_dims = 62; // int
  :vert_grid_file = "tx0.1v3_vert_grid";
  :horiz_grid_fname = "inputdata/ocn/pop/tx0.1v3/grid/horiz_grid_200709.ieeer8";
  :topography_fname = "inputdata/ocn/pop/tx0.1v3/grid/topography_20170718.ieeei4";
  :region_mask_fname = "inputdata/ocn/pop/tx0.1v3/grid/region_mask_20170718.ieeei4";
  :type = "tripole";
  :conventions = "SCRIP";
  :title = "POP_tx0.1v3 grid";
Last modification:October 18th, 2021 at 05:31 pm
If you think my article is useful to you, please feel free to appreciate