Project

General

Profile

conservative remapping of precipitation in daymet dataset

Added by Pete Deng 3 months ago

Hi all,

I just wonder how to regrid the daily precipitation (daymet_v4_daily_na_prcp_xxxx.nc) over curvilinear grids to 1-degree rectilinear grids using conservative method.

When using "remapycon", the error msg is "cdo remapcon (Abort): Source grid cell corner coordinates missing!", which requires that the corners of the lat/lon grids.

So, I tried using `cf_xarray` in Python to guess the corners of curvilinear data.

If the dimensions of x and y in daymet are x:7814 and y:8075, using `cf_xarray` would create lon_bounds(y, x, bounds), lat_bounds(y, x, bounds), lat_b(y+1, x+1) and lon_b(y+1, x+1) in daymet.

However, it still does not work. Can anyone help? Thanks in advance!


Replies (3)

RE: conservative remapping of precipitation in daymet dataset - Added by Estanislao Gavilan 3 months ago

Hi Pete,

remapcon needs the corners of the original grid in the input file. Therefore, your file should have lat(X,Y), lon(X,Y), lon_bound and lat_bound. These last variables should have the information about the 4 corners of each lat and lon (ie. X,Y,4) and they should be arranged anticlockwise. The command should be something like this

cdo remapcon,grid.txt input.nc output.nc

the grid.txt has the information about your destination grid (see below).

#
  1. gridID 1 #
    gridtype = lonlat
    xsize = 1440
    ysize = 721
    xfirst = 0
    xinc = 0.25
    yfirst = -90
    yinc = 0.25

If your are still having issues, we need to look to the attributes of your ncfile.

Kind regards,

Estanislao

RE: conservative remapping of precipitation in daymet dataset - Added by Pete Deng 3 months ago

Hi Estanislao,

Thank you very much. After only keeping lon_bounds(y, x, bounds) and lat_bounds(y, x, bounds) in the input file, it works.

BTW, what does "they should be arranged anticlockwise" mean?

I have attached the regridded precipitation and the original one for one day, do you think it is OK?

RE: conservative remapping of precipitation in daymet dataset - Added by Estanislao Gavilan 3 months ago

Hi Pete,

That means that if the first corner is located in the bottom left, the next one is in the bottom right (so anticlockwise direction). Still if you used a cf tool to compute the corners, they should be fine.

Best regards,

Estanislao

    (1-3/3)