Using the ESMF regridding tools: Difference between revisions

Bmauer (talk | contribs)
Bmauer (talk | contribs)
Line 1: Line 1:
== Using ESMF regridding through the Netcdf Operators (NCO) utility ==
== Using ESMF regridding through the Netcdf Operators (NCO) utility ==
The NCO software package has a function ncremap that can be linked to ESMF_RegridWeightGen, a binary distributed with the ESMF library. This utility can generate interpolation weights. The ncremap function determines the grid type from the input, makes the appropriate call to ESMF_RegridWeightGen, and performs the regridding with the computed weights.
The NCO software package has a function ncremap that can be linked to ESMF_RegridWeightGen, a binary distributed with the ESMF library. This utility can generate interpolation weights. The ncremap function determines the grid type from the input, makes the appropriate call to ESMF_RegridWeightGen, and performs the regridding with the computed weights.
Currently to support the cubed-sphere (cs) used by GEOS-5 the cs-grid must be described by SCRIP file descriptor. The tools to compute these files can be obtained from the SI team. Another repercussion of this is that data on the cs-grid must have the horizontal dimensions collapsed to one dimension. The SI team can provide scripts do perform this collapse.
Currently to support the cubed-sphere (cs) used by GEOS-5 the cs-grid must be described by SCRIP file descriptor. The tools to compute these files can be obtained from the SI team. Another repercussion of this is that data on the cs-grid must have the horizontal dimensions collapsed to one dimension, where the grid boxes are in the same 1-D order as the corresponding SCRIP file. The SI team can provide scripts do perform this collapse.


<pre>
<pre>
Line 25: Line 25:


The command to regrid from a cs input file to a Lat-Lon ouput file is below:
The command to regrid from a cs input file to a Lat-Lon ouput file is below:
<pre>
ncremap -s SCRIP_INPUT -i INPUT_FILE -E ESMF_OPTIONS -d DESTINATION_FILE -o OUTPUT_FILE
</pre>


ncremap -s SCRIP_INPUT -i INPUT_FILE -d DESTINATION_FILE -o OUTPUT_FILE


In addition you can pass other options directly to the ESMF_RegridWeightGen program by including -E
The general idea behind the command is that ncremap tries to infer the input grid from the file. For the cs-grid you must provide an additional argument with the -s option to specify the script file. Notice that you must use the -d option and the -o option for the output. The -d is a "destination file" that is basically file that contains the metadata describing the output grid. This could be another data file on the grid you are going to for example.
Finally, you can pass other options directly to the ESMF_RegridWeightGen program by including -E
For example,  
For example,  
-E "--line_type greatcircle" sets the line type argument in ESMF_RegridWeightGen.
-E "--line_type greatcircle" sets the line type argument in ESMF_RegridWeightGen.
The general idea behind the command is that ncremap tries to infer the input grid from the file. For the cs-grid you must provide an additional argument with the -s option to specify the script file. Notice that you must use the -d option and the -o option for the output. The -d is a "destination file" that is basically file that contains the metadata describing the output grid. This could be another data file on the grid you are going to for example.


== Using ESMF regridding online ==
== Using ESMF regridding online ==