<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Regridding input data to higher resolution
The initial resolution of the input file is used as the higher resolution that Badlands model can used. If one started with a given resolution and want to work with an higher one, it is required to regrid the input file to match at least the requested resolution.
Step1:  1. Load python class and set required resolution
Step2:  2. Regrid DEM file
Step3:  3. Regrid Rain file
Step4:  4. Regrid Tectonic files
Here you have the choice between vertical only displacements file and 3D ones.
In cases where you have several files you might create a loop to automatically regrid the files!
Vertical only file
Step5:  3D displacements file
<ASSISTANT_TASK:>
Python Code:
import sys
print(sys.version)
print(sys.executable)
%matplotlib inline
# Import badlands grid generation toolbox
import pybadlands_companion.resizeInput as resize
Explanation: Regridding input data to higher resolution
The initial resolution of the input file is used as the higher resolution that Badlands model can used. If one started with a given resolution and want to work with an higher one, it is required to regrid the input file to match at least the requested resolution.
End of explanation
#help(resize.resizeInput.__init__)
newRes = resize.resizeInput(requestedSpacing = 40)
Explanation: 1. Load python class and set required resolution
End of explanation
#help(newRes.regridDEM)
newRes.regridDEM(inDEM='mountain/data/nodes.csv',outDEM='mountain/data/newnodes.csv')
Explanation: 2. Regrid DEM file
End of explanation
#help(newRes.regridRain)
newRes.regridRain(inRain='data/rain.csv',outRain='newrain.csv')
Explanation: 3. Regrid Rain file
End of explanation
#help(newRes.regridTecto)
newRes.regridTecto(inTec='data/disp.csv', outTec='newdisp.csv')
Explanation: 4. Regrid Tectonic files
Here you have the choice between vertical only displacements file and 3D ones.
In cases where you have several files you might create a loop to automatically regrid the files!
Vertical only file
End of explanation
#help(newRes.regridDisp)
newRes.regridDisp(inDisp='data/disp.csv', outDisp='newdisp.csv')
Explanation: 3D displacements file
End of explanation
<END_TASK>