Update May, 2012: Before digging in to the following, it may now be possible to extend WACCM files vertically which already exist for a specific horizontal resolution. A place to start are subdirectories of /glade/proj2/fis/cgd/cseg/csm/inputdata/atm/waccm/ on bluefire. For NCL code to extend these files for WACCM-X, take a look in ~joemci/SW/waccmExtendNCL/ on bluefire or mirage.

One of the goals in the WACCMX development is to be able to run at higher resolutions than the standard 4x5 or 1.9x2.5 latitude x longitude resolutions. To do this, higher resolution input files such as initial condition (ic), aerosols (sad), and lower boundary condition (lbc) files need to be produced. The following is a description of where these files came from for 0.9x1.25 and 0.47x0.63.

There are two locations where file creation occurred. One is on bluefire in ~/SW/waccmHorizRes/interpic_new

Initial condition files:

The interp_sad.ncl script is a modified version of a script by the same name from Francis Vitt.
The modifications are to extend in the vertical up through the thermosphere and increase the
resolution in latitude and longitude. The script requires input files which have the desired
output horizontal latitude/longitude resolution and vertical levels and an input aerosol file.

latitude/longitude file - /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_GS2D_0.9x1.25_WA2_1970-2005.nc
levels file - /waccm/joemci/waccm-inputs/atm/waccm/ic/wa3548_2x_refb1.1.cam2.i.1993-01-01-00000_L81.nc
aerosol input file - /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_SAGE_1.9x2.5.c050627.nc

The create_template_input.ncl script is a modified version of the above which will create input
template files for the interpic routine run on bluefire in ~/SW/waccmHorizRes/interpic_new

Templates created with commands:

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon /waccm/joemci/waccm-inputs/atm/waccm/ic/wa319_2x_ref1.1.cam2.i.1953-01-01-0000
0.0.95x1.25_L81.nc 0.9x1.25_L81_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_GS2D_0.9x1.25_WA2_1970-2005.nc 0.9x1.
25_L66_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_0.9x1.25_L26_c051205.nc
0.9x1.25_L26_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon,slat,slon /waccm/joemci/waccm-inputs/atm/waccm/ic/wa3548_2x_refb1.1.cam2.i.199
3-01-01-00000_L81.nc 1.9x2.5_L81_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon,slat,slon /fs/cgd/csm/inputdata/atm/waccm/ic/cami_2000-02-01_0.9x1.25_L66_c040
928.nc 0.9x1.25_L66_template_2.nc

Other templates created on gale machine by create_template_input.ncl in ~/SW/waccmHorizRes

Here are some interpolations tried with interpic:

Was able to use in a two step process to get a higher resolution initial file:

interpic -64 -v -t 0.47x0.63_L66_template.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_0.47x0.63_L26_c061106.n
c /waccm/joemci/waccm-inputs/atm/waccm/ic/cami_0000-09-01_0.47x0.63_L66_c061106.nc

Worked

interpic -64 -v -t 0.47x0.63_L81_template.nc /waccm/joemci/waccm-inputs/atm/waccm/ic/cami_0000-09-01_0.47x0.63_L66_c061106.
nc /waccm/joemci/waccm-inputs/atm/waccm/ic/cami_0000-09-01_0.47x0.63_L81_c061106.nc

Worked

If tried above in one step got error for interpolating more than 50% of points

Tried:

interpic -v -t 0.9x1.25_L81_template.nc /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_SAGE_1.9x2.5.c050627.nc /ptmp/joemci/Temp/
SAD_SAGE_0.9x1.25.c050627_L81.nc

Didn't work, segmentation fault

Tried:

interpic -t 0.9x1.25_L81_template.nc /hao/liuh/waccm/SAD_SAGE_1.9x2.5.c050627_extended.nc /ptmp/joemci/Temp/SAD_SAGE_0.9x1.
25.c050627_extended.nc

Didn't work, segmentation fault

Tried:

interpic -t 0.9x1.25_L66_template.nc /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_SAGE_1.9x2.5.c050627.nc /ptmp/joemci/Temp/SAD
_SAGE_0.9x1.25.c050627.nc

Didn't work, segmentation fault

Tried:

interpic -v -t 0.9x1.25_L26_template.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_1.9x2.5_L26_c040809.nc /ptmp
/joemci/Temp/cami_0000-09-01_0.9x1.25_L26_c051205.nc

Worked

Tried:

interpic -v -t 0.9x1.25_L66_template_2.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_1.9x2.5_L26_c040809.nc /pt
mp/joemci/Temp/cami_0000-09-01_0.9x1.25_L66_c051205.nc

Worked

Tried:
Templates created with commands:

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon /waccm/joemci/waccm-inputs/atm/waccm/ic/wa319_2x_ref1.1.cam2.i.1953-01-01-0000
0.0.95x1.25_L81.nc 0.9x1.25_L81_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_GS2D_0.9x1.25_WA2_1970-2005.nc 0.9x1.
25_L66_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_0.9x1.25_L26_c051205.nc
0.9x1.25_L26_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon,slat,slon /waccm/joemci/waccm-inputs/atm/waccm/ic/wa3548_2x_refb1.1.cam2.i.199
3-01-01-00000_L81.nc 1.9x2.5_L81_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon,slat,slon /fs/cgd/csm/inputdata/atm/waccm/ic/cami_2000-02-01_0.9x1.25_L66_c040
928.nc 0.9x1.25_L66_template_2.nc

Other templates created on gale machine by create_template_input.ncl in ~/SW/waccmHorizRes

Here are some interpolations tried with interpic:

Was able to use in a two step process to get a higher resolution initial file:

interpic -64 -v -t 0.47x0.63_L66_template.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_0.47x0.63_L26_c061106.n
c /waccm/joemci/waccm-inputs/atm/waccm/ic/cami_0000-09-01_0.47x0.63_L66_c061106.nc

Worked

interpic -64 -v -t 0.47x0.63_L81_template.nc /waccm/joemci/waccm-inputs/atm/waccm/ic/cami_0000-09-01_0.47x0.63_L66_c061106.
nc /waccm/joemci/waccm-inputs/atm/waccm/ic/cami_0000-09-01_0.47x0.63_L81_c061106.nc

Worked

If tried above in one step got error for interpolating more than 50% of points

Tried:

interpic -v -t 0.9x1.25_L81_template.nc /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_SAGE_1.9x2.5.c050627.nc /ptmp/joemci/Temp/
SAD_SAGE_0.9x1.25.c050627_L81.nc

Didn't work, segmentation fault

Tried:

interpic -t 0.9x1.25_L81_template.nc /hao/liuh/waccm/SAD_SAGE_1.9x2.5.c050627_extended.nc /ptmp/joemci/Temp/SAD_SAGE_0.9x1.
25.c050627_extended.nc

Didn't work, segmentation fault

Tried:

interpic -t 0.9x1.25_L66_template.nc /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_SAGE_1.9x2.5.c050627.nc /ptmp/joemci/Temp/SAD
_SAGE_0.9x1.25.c050627.nc

Didn't work, segmentation fault

Tried:

interpic -v -t 0.9x1.25_L26_template.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_1.9x2.5_L26_c040809.nc /ptmp
/joemci/Temp/cami_0000-09-01_0.9x1.25_L26_c051205.nc

Worked

Tried:

interpic -v -t 0.9x1.25_L66_template_2.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_1.9x2.5_L26_c040809.nc /pt
mp/joemci/Temp/cami_0000-09-01_0.9x1.25_L66_c051205.nc

Worked

Tried:

interpic -v -t 0.9x1.25_L81_template.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_1.9x2.5_L26_c040809.nc /ptmp
/joemci/Temp/cami_0000-09-01_0.9x1.25_L81_c051205.nc

Worked

Tried:

interpic -v -t 1.9x2.5_L81_template.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_1.9x2.5_L26_c040809.nc /ptmp/
joemci/Temp/cami_0000-09-01_1.9x2.5_L81_c051205.nc

Worked

25 March 2008, eaton

Running gnumake in this directory will create an executable named
"interpic". Its function is to take an input CAM history or initial file
and interpolate all time samples to a new horizontal and/or vertical
resolution.

The output resolution is determined by the coordinates in a template netcdf
file ("-t template_file"). If a coordinate for a field in the input file
exists in the template file (the coordinate must have the same name in both
files), then the field that appears in the output file will be interpolated
from the input file coordinate to the template file coordinate. By default
all fields contained in the input file are interpolated and written to the
output file.

Certain variable names are hardwired into the interpic code and are
automatically recognized as variables that contain coordinate information.
The variable names are: rlon, nlon, wnummax, hyai, hybi, hyam, hybm, gw,
w_stag, lat, lon, slat, slon, lev, ilev.

The code assumes that the netCDF conventions for coordinate variables have
been followed, i.e., the dimension of a 1D coordinate variable has the same
name as the associated variable. This means that the following dimension
names which are hardwired into the code are also treated specially: lon,
slon, lat, slat, lev, ilev, time. In addition, the extension of the code
to treat unstructured grids added the dimension name "ncol" to identify the
dimension of the global column indices.

This code will eventually replace the original version of interpic. It is,
however, still missing some functionality:

. If interpolating to a staggered grid, the input dataset must be on a
staggered grid. The original code had hardwired logic to allow
interpolating from a Gauss grid to a staggered grid. The current code
assumes the dimension names of the output grid are the same as the input
grid. It's missing the special logic to allow the lat dimension of V to
become the slat dimension of VS (and similar for U --> US).

It has been generalized as follows:

. Can produce non-rectangular grids for output, e.g. cubed sphere grid.

. No longer requires separate steps to produce a template file containing
the desired fields declared on the desire output grid. The user just
supplies a template file containing the desired output grid.

. The output precision may optionally be reduced to real*4 when the input
data is real*8 (see commandline option -p). The precision override does
not apply to the coordinate variables which are always output as real*8.

. Fields from the input file may optionally be excluded from the output
file (see commandline option -e).

. Fields from the template file may optionally be included on the output
file (see commandline option -i).

There are round-off level differences with the original interpic code due
to changes in the interpolation routine.

HOMME Note:

If a CAM-HOMME file doesn't already exist for the desired output grid, a
template file can be constructed as follows:

Start with an output file from a homme test case at the resolution that you
want.

Create the template file by extracting the lat,lon and ncol variables from
the test case file:

% ncks -v lat,lon baroclinic1.nc homme_temp.nc

Convert the lat and lon variables from radians to degrees

% ncap -O -s "lat=lat*90./asin(1.0);lon=lon*90./asin(1.0)" homme_temp.nc homme_template.nc

Then run interpic:

% interpic -t homme_template.nc inputfile.nc outputfile.nc

be1105en%
be1105en%
be1105en% more ~/SW/waccmHorizRes/interpic_new/README
Templates created with commands:

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon /waccm/joemci/waccm-inputs/atm/waccm/ic/wa319_2x_ref1.1.cam2.i.1953-01-01-0000
0.0.95x1.25_L81.nc 0.9x1.25_L81_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_GS2D_0.9x1.25_WA2_1970-2005.nc 0.9x1.
25_L66_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_0.9x1.25_L26_c051205.nc
0.9x1.25_L26_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon,slat,slon /waccm/joemci/waccm-inputs/atm/waccm/ic/wa3548_2x_refb1.1.cam2.i.199
3-01-01-00000_L81.nc 1.9x2.5_L81_template.nc

ncks -v hyai,hybi,hyam,hybm,lev,ilev,lat,lon,slat,slon /fs/cgd/csm/inputdata/atm/waccm/ic/cami_2000-02-01_0.9x1.25_L66_c040
928.nc 0.9x1.25_L66_template_2.nc

Other templates created on gale machine by create_template_input.ncl in ~/SW/waccmHorizRes

Here are some interpolations tried with interpic:

Was able to use in a two step process to get a higher resolution initial file:

interpic -64 -v -t 0.47x0.63_L66_template.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_0.47x0.63_L26_c061106.n
c /waccm/joemci/waccm-inputs/atm/waccm/ic/cami_0000-09-01_0.47x0.63_L66_c061106.nc

Worked

interpic -64 -v -t 0.47x0.63_L81_template.nc /waccm/joemci/waccm-inputs/atm/waccm/ic/cami_0000-09-01_0.47x0.63_L66_c061106.
nc /waccm/joemci/waccm-inputs/atm/waccm/ic/cami_0000-09-01_0.47x0.63_L81_c061106.nc

Worked

If tried above in one step got error for interpolating more than 50% of points

Tried:

interpic -v -t 0.9x1.25_L81_template.nc /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_SAGE_1.9x2.5.c050627.nc /ptmp/joemci/Temp/
SAD_SAGE_0.9x1.25.c050627_L81.nc

Didn't work, segmentation fault

Tried:

interpic -t 0.9x1.25_L81_template.nc /hao/liuh/waccm/SAD_SAGE_1.9x2.5.c050627_extended.nc /ptmp/joemci/Temp/SAD_SAGE_0.9x1.
25.c050627_extended.nc

Didn't work, segmentation fault

Tried:

interpic -t 0.9x1.25_L66_template.nc /fs/cgd/csm/inputdata/atm/waccm/sulf/SAD_SAGE_1.9x2.5.c050627.nc /ptmp/joemci/Temp/SAD
_SAGE_0.9x1.25.c050627.nc

Didn't work, segmentation fault

Tried:

interpic -v -t 0.9x1.25_L26_template.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_1.9x2.5_L26_c040809.nc /ptmp
/joemci/Temp/cami_0000-09-01_0.9x1.25_L26_c051205.nc

Worked

Tried:

interpic -v -t 0.9x1.25_L66_template_2.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_1.9x2.5_L26_c040809.nc /pt
mp/joemci/Temp/cami_0000-09-01_0.9x1.25_L66_c051205.nc

Worked

Tried:

interpic -v -t 0.9x1.25_L81_template.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_1.9x2.5_L26_c040809.nc /ptmp
/joemci/Temp/cami_0000-09-01_0.9x1.25_L81_c051205.nc

Worked

Tried:

interpic -v -t 1.9x2.5_L81_template.nc /fs/cgd/csm/inputdata/atm/cam2/inic/fv/cami_0000-09-01_1.9x2.5_L26_c040809.nc /ptmp/
joemci/Temp/cami_0000-09-01_1.9x2.5_L81_c051205.nc

Worked

25 March 2008, eaton

Running gnumake in this directory will create an executable named
"interpic". Its function is to take an input CAM history or initial file
and interpolate all time samples to a new horizontal and/or vertical
resolution.

The output resolution is determined by the coordinates in a template netcdf
file ("-t template_file"). If a coordinate for a field in the input file
exists in the template file (the coordinate must have the same name in both
files), then the field that appears in the output file will be interpolated
from the input file coordinate to the template file coordinate. By default
all fields contained in the input file are interpolated and written to the
output file.

Certain variable names are hardwired into the interpic code and are
automatically recognized as variables that contain coordinate information.
The variable names are: rlon, nlon, wnummax, hyai, hybi, hyam, hybm, gw,
w_stag, lat, lon, slat, slon, lev, ilev.

The code assumes that the netCDF conventions for coordinate variables have
been followed, i.e., the dimension of a 1D coordinate variable has the same
name as the associated variable. This means that the following dimension
names which are hardwired into the code are also treated specially: lon,
slon, lat, slat, lev, ilev, time. In addition, the extension of the code
to treat unstructured grids added the dimension name "ncol" to identify the
dimension of the global column indices.

This code will eventually replace the original version of interpic. It is,
however, still missing some functionality:

. If interpolating to a staggered grid, the input dataset must be on a
staggered grid. The original code had hardwired logic to allow
interpolating from a Gauss grid to a staggered grid. The current code
assumes the dimension names of the output grid are the same as the input
grid. It's missing the special logic to allow the lat dimension of V to
become the slat dimension of VS (and similar for U --> US).

It has been generalized as follows:

. Can produce non-rectangular grids for output, e.g. cubed sphere grid.

. No longer requires separate steps to produce a template file containing
the desired fields declared on the desire output grid. The user just
supplies a template file containing the desired output grid.

. The output precision may optionally be reduced to real*4 when the input
data is real*8 (see commandline option -p). The precision override does
not apply to the coordinate variables which are always output as real*8.

. Fields from the input file may optionally be excluded from the output
file (see commandline option -e).

. Fields from the template file may optionally be included on the output
file (see commandline option -i).

There are round-off level differences with the original interpic code due
to changes in the interpolation routine.

HOMME Note:

If a CAM-HOMME file doesn't already exist for the desired output grid, a
template file can be constructed as follows:

Start with an output file from a homme test case at the resolution that you
want.

Create the template file by extracting the lat,lon and ncol variables from
the test case file:

% ncks -v lat,lon baroclinic1.nc homme_temp.nc

Convert the lat and lon variables from radians to degrees

% ncap -O -s "lat=lat*90./asin(1.0);lon=lon*90./asin(1.0)" homme_temp.nc homme_template.nc

Then run interpic:

% interpic -t homme_template.nc inputfile.nc outputfile.nc