how can I regrid my NetCDF file into another NetCDF file resolution? change the file number 1 or 2 or 3 (file1.nc,file2.nc,file3.nc ) into resolution template file (wrfinput_d01.nc) . I have attached my files(number1,2,3 and template file) wrfinput file: https://drive.google.com/file/d/1j6SrSOpbrkWXDl2_WK-MGwcm0zKOXV_x/view?usp=sharing

my files 1,2: https://drive.google.com/file/d/1-o7TUcPmzsuOYhpry92ROHQuLA1Z5N-x/view?usp=sharing

cdo griddes wrfinput_d01.nc > NEW_GRID_DEF cdo remapbil,NEW_GRID_DEF file1.nc output.nc

I've done it by cdo, but it shows error Error (cdfGetSliceSlapDescription): Internal error, variable evi has an unsupported array structure! What shall I do to solvr this problem? thank you!

  • 1
    $\begingroup$ Can you please edit your title and post to correct the typos, to make your question easier to read? Thank you :) $\endgroup$ – gerrit Oct 26 '20 at 9:50

Disclaimer: I have not looked at your particular files.

You can regrid the data in Python using the NetCDF-4 module. If you want to interpolate vertically, you can use the WRF module. And for horizontal interpolation, you can use the Scipy Interpolation module.

Here is how you would go about this regridding.

Let $(\psi_1,\phi_1)$ be the latitude and longitude of the original data and $(\psi_2,\phi_2)$ of the regridded data. Let $y_1$ be your original data, and $y_2$ be the regridded data.

  1. Open the original dataset.
  2. Create an interpolation function trained on your original data $f(\psi_1,\phi_1)$ for the data you will regrid.
  3. Using the NetCDF module, declare the dimensions, variables, and necessary metadata for your regridded dataset.
  4. Use your interpolation function, so you get $y_2=f(\psi_2,\phi_2)$.
  5. If necessary, interpolate to your required vertical level.
  6. Repeat starting on step 2 for every time for every variable that you want, at every vertical level (if required).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.