[ncl-talk] missing values in PV fields after interpolation (int2p_n function) from pressure to isentropic levels when pressure levels are in descending order (20CR data on a regular grid)

De Vries Andries andries.devries at env.ethz.ch
Thu Aug 1 05:27:00 MDT 2019


Dear NCL team & users,

I encountered a possible bug when interpolating fields from pressure levels onto isentropic levels when the pressure fields are in descending order (meaning from the surface to the top of the atmosphere) using the function int2p_n. In a first step, I compute theta and potential vorticity (PV) from 20CR data (2x2 degrees regular grid) on pressure levels from wind, temperature and surface pressure, which seems all fine. After, I interpolate PV from pressure levels onto isentropic levels between 300-350 K with 5 K intervals. These PV fields on isentropic surfaces have many missing values. These are not related to isentropic levels that are virtually below the surface topography since they occur at higher isentropic levels. The missing values occur typically "column-wise", meaning that for particular grid points all isentropic levels have missing values. Also, the missing values don't remain stationary, but change over time. After trying many things, I discovered that the missing values disappear when I reverse the order pressure levels when reading in the variables. Since the description of the function int2p_n says that "level dimension must be in the pdim-th position and the values must be monotonically increasing or decreasing" I thought this might be a bug or needs a change in the function description.

In the attachment I send two scripts from computation and interpolation of PV, one with pressure levels in descending order, and another one with ascending order. Also, I send two figures with four time step of the PV fields on an isentropic surface interpolated with pressurelevels in descending and ascending order, whereby missing values are indicated by grey colors.

Also, I put the required 20CR data to compute PV in the ftp folder.

Hope this may help you and other users.

Best,
Andries 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compute_pvonpt_flag_20cr_members_test_plev_desc.ncl
Type: application/octet-stream
Size: 7759 bytes
Desc: compute_pvonpt_flag_20cr_members_test_plev_desc.ncl
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190801/d3432080/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compute_pvonpt_flag_20cr_members_test_plev_asc.ncl
Type: application/octet-stream
Size: 7773 bytes
Desc: compute_pvonpt_flag_20cr_members_test_plev_asc.ncl
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190801/d3432080/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PV_20cr_1member_comp_global_polar_r2x2_6hourly_test_plev.ncl
Type: application/octet-stream
Size: 9427 bytes
Desc: PV_20cr_1member_comp_global_polar_r2x2_6hourly_test_plev.ncl
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190801/d3432080/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PV_20cr_mem01_comp_r2x2_tlev-330_193710_1_to_1_global_polar_6hourly_test_plev_desc.pdf
Type: application/pdf
Size: 634302 bytes
Desc: PV_20cr_mem01_comp_r2x2_tlev-330_193710_1_to_1_global_polar_6hourly_test_plev_desc.pdf
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190801/d3432080/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PV_20cr_mem01_comp_r2x2_tlev-330_193710_1_to_1_global_polar_6hourly_test_plev_asc.pdf
Type: application/pdf
Size: 593943 bytes
Desc: PV_20cr_mem01_comp_r2x2_tlev-330_193710_1_to_1_global_polar_6hourly_test_plev_asc.pdf
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190801/d3432080/attachment-0003.pdf>


More information about the ncl-talk mailing list