1

I am using the following cdo command to obtain the information of a grid file (from AQUA/Modis):

cdo griddes file_AQUA.nc

In this step, the following information was obtained:

gridID 1 #
gridtype = lonlat
gridsize = 37324800
xsize = 8640
ysize = 4320
xname = lon
xlongname = "Longitude"
xunits = "degrees_east"
yname = lat
ylongname = "Latitude"
yunits = "degrees_north"
xfirst = -179.9792
xinc = 0.04166667
yfirst = 89.97916
yinc = -0.04166667 #
gridID 2 #
gridtype = generic
gridsize = 768
xsize = 256
ysize = 3
cdo griddes: Processed 3 variables [0.00s 11MB]

My next step was to generate a text file with the grid information of the AQUA/Modis file through the command: cdo griddes file_AQUA.nc > grid_file_AQUA.txt

I would like to use this text grid file information to regridding a NetCDF file (from ORAS5). I am using this command:

cdo -O remapbil,grid_file_AQUA.txt file_ORAS.nc new_file_ORAS.nc

The file was created, but the temperature variable is incorrect when I tried to extract it. (Expected COUNT to be positive)

Patrick
33k7 gold badges73 silver badges102 bronze badges
asked Feb 20, 2024 at 14:14

1 Answer 1

2

You don't need to go through the step of extracting the grid description, you can remap to the grid of another dataset by just specifying that file as the "target" in this way:

cdo -O remapbil,grid_file_AQUA.nc file_ORAS.nc new_file_ORAS.nc

I'm not sure what you mean though by the error, "count expected to be positive". Please try this solution and see if it solves the issue, and if not, clarify and I will update my answer accordingly.

answered Feb 20, 2024 at 14:45
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.