Project

General

Profile

Interpolate data from u-grid points to t-grid points, curvilinear grid, remapbil?

Added by Mariana Maia Pacheco over 1 year ago

Hi,

I am trying to interpolate my velocity data from u-grid points (corner) to t-grid points (center).
The velocity data is an output from CM2.6 ocean model (GFDL), which has a curvilinear B-grid.

First I tried to do it with remapycon (cdo remapycon,CM2.6.ocean.static.nc u_ugrid.nc u_tgrid.nc)
In the CM2.6.ocean.static.nc file I have the grid info (in the attached txt file, with the info I get from ncdump).

but it was throwing this error: cdo remapcon (Abort): Source grid cell corner coordinates missing

Therefore I tried with remapbil, using the area (weights) from the t grid:
cdo remapbil,area_t_masked.nc CM2.6_A_V03_1PctTo4X01810101.ocean_minibling_field_u_lev01.nc CM2.6_A_V03_1PctTo4X01810101.ocean_minibling_field_u_lev01_test.nc

It seemed to work (input_output_info.txt),
but I got those warnings:

Warning (cdf_set_var): Inconsistent variable definition for geolat_t!
Warning (cdf_set_var): Inconsistent variable definition for geolon_t!
Warning (cdfScanVarAttr): NetCDF: Variable not found - >geolon_c<
Warning (cdfScanVarAttr): NetCDF: Variable not found - >geolat_c<
Warning (find_time_vars): Found more than one time variable, skipped variable average_T1!
Warning (find_time_vars): Found more than one time variable, skipped variable average_T2!
Warning (cdf_set_calendar): calendar >julian< unsupported!
cdo remapbil: Bilinear weights from lonlat (3600x2700) to curvilinear (3600x2623) grid, with source mask (6071846)
cdo remapbil: Processed 709560073 values from 2 variables over 73 timesteps [37.77s 2355MB].

If I add the geolon/lat_c into the input file u_ugrid.nc before the computation, it does not throw an error, but the task does not complete and freezes the terminal.
I would like to know if can proceed with remapbil even though the geolon/lat_c is not in the file, if I should care about those warnings (the first four lines).
Otherwise, any suggestions on how to regrid that?
Thanks in advance,

Mariana,
University of Bristol


Replies (1)

RE: Interpolate data from u-grid points to t-grid points, curvilinear grid, remapbil? - Added by Mariana Maia Pacheco over 1 year ago

I just realized the last output file in the txt file has 'yt_ocean = 2623';
Recomputing cdo remapbil with the area without NaN values gives the correct dimensions.

    (1-1/1)