<p><strong>Disclaimer</strong>: I have not looked at your particular files.</p>
<p>You can regrid the data in Python using the <a href="https://unidata.github.io/netcdf4-python/netCDF4/index.html" rel="noreferrer">NetCDF-4 module</a>. If you want to interpolate vertically, you can use the <a href="https://wrf-python.readthedocs.io/en/latest/user_api/index.html#interpolation-routines" rel="noreferrer">WRF</a> module. And for horizontal interpolation, you can use the <a href="https://docs.scipy.org/doc/scipy/reference/interpolate.html" rel="noreferrer">Scipy Interpolation</a> module.</p>
<p>Here is how you would go about this regridding.</p>
<p>Let <span class="math-container">$(\psi_1,\phi_1)$</span> be the  latitude and longitude of the original data and <span class="math-container">$(\psi_2,\phi_2)$</span> of the regridded data. Let <span class="math-container">$y_1$</span> be your original data, and <span class="math-container">$y_2$</span> be the regridded data.</p>
<ol>
<li>Open the original dataset.</li>
<li>Create an interpolation function trained on your original data <span class="math-container">$f(\psi_1,\phi_1)$</span> for the data you will regrid.</li>
<li>Using the NetCDF module, declare the dimensions, variables, and necessary metadata for your regridded dataset.</li>
<li>Use your interpolation function, so you get <span class="math-container">$y_2=f(\psi_2,\phi_2)$</span>.</li>
<li>If necessary, interpolate to your required vertical level.</li>
<li>Repeat starting on step 2 for every time for every variable that you want, at every vertical level (if required).</li>
</ol>

CC BY-SA 4.0
2020-10-25T22:37:54.753Z
2020-10-25T22:37:54.753Z
BarocliniCplusplus
<p>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:
<a href="https://drive.google.com/file/d/1j6SrSOpbrkWXDl2_WK-MGwcm0zKOXV_x/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1j6SrSOpbrkWXDl2_WK-MGwcm0zKOXV_x/view?usp=sharing</a></p>
<p>my files 1,2:
<a href="https://drive.google.com/file/d/1-o7TUcPmzsuOYhpry92ROHQuLA1Z5N-x/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1-o7TUcPmzsuOYhpry92ROHQuLA1Z5N-x/view?usp=sharing</a></p>
<p>cdo griddes wrfinput_d01.nc &gt; NEW_GRID_DEF
cdo remapbil,NEW_GRID_DEF file1.nc output.nc</p>
<p>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!</p>

CC BY-SA 4.0
2020-10-26T09:50:16.433Z
Can you please [edit] your title and post to correct the typos, to make your question easier to read?  Thank you :)
gerrit
<wrf><wrf-chem>
regeride netcdf file to template netcdf file resoulution
sara
# regeride netcdf file to template netcdf file resoulution

(Asked by: username_0 on 2020-10-25)

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!

**Tags:** wrf, wrf-chem

> **Comments:**
> **username_1**: Can you please [edit] your title and post to correct the typos, to make your question easier to read?  Thank you :)  

---

## 1 answers

### Answer by username_2 on 2020-10-25. Score: 6

**Disclaimer**: I have not looked at your particular files.

You can regrid the data in Python using the [NetCDF-4 module](https://unidata.github.io/netcdf4-python/netCDF4/index.html). If you want to interpolate vertically, you can use the [WRF](https://wrf-python.readthedocs.io/en/latest/user_api/index.html#interpolation-routines) module. And for horizontal interpolation, you can use the [Scipy Interpolation](https://docs.scipy.org/doc/scipy/reference/interpolate.html) 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).


---

