Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regridding netcdf file using ClimateOperators and specified grid #5

Open
dancrear opened this issue Mar 19, 2024 · 1 comment
Open

Comments

@dancrear
Copy link

Hi,

I'm excited to use your package! I've been getting more familiar with cdo and the formatting specifically through Climate Unboxed youtube tutorials. However, I'm trying to translate it to R and am having a tough time and was hoping you could help.

I'm on a Linux Virtual Machine with cdo installed as well as the package ClimateOperators. I wanted to regrid a 4 dimensional netcdf file to a coarser resolution using 1st order conservative mapping. Right now the dimensions are 961 lon x 961 lat x 32 depths x 31 days (basically 1/12 degree). I would like to reduce it to 321 lon x 321 lat x 32 depths x 31 days (basically 0.25 degree). I tried to use another netcdf file which has the dimensions 321 lon x 321 lat x 31 days and I received the error "CDO command failed. Status code 1." The code I used is below, where examp.nc is the netcdf file I want the spatial resolution to match. I' m not sure why I'm receiving the error. Maybe it is because one grid has 4 dimensions and the other has 3 dimensions?

cdo("remapcon,examp.nc","t.nc","out.nc")

I'm also trying to use the specified grid approach explained in the youtube tutorial above. I created .txt file with the required information but I don't understand how to specify the .txt file that has the new grid information in the R code. Any help would be greatly appreciated!

Thanks!
Dan

@markpayneatwork
Copy link
Owner

markpayneatwork commented Apr 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants