From 1501d8ff1eff8738b34028914ba9eb80c75d7640 Mon Sep 17 00:00:00 2001 From: dqwu Date: Tue, 27 Aug 2019 12:41:13 -0500 Subject: [PATCH] Updating a call to interface shr_scam_getCloseLatLon With this fix, module procedure shr_scam_getCloseLatLonPIO is called instead of shr_scam_getCloseLatLonNC. For scorpio, the ncid returned to the user is not the actual ncid returned by the underlying netcdf/pnetcdf library. This opaque pio_ncid is unusable from outside scorpio, such as nf90_inquire calls in shr_scam_getCloseLatLonNC. --- components/cam/src/control/ncdio_atm.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/cam/src/control/ncdio_atm.F90 b/components/cam/src/control/ncdio_atm.F90 index a364c4f941af..6f86b25b37b2 100644 --- a/components/cam/src/control/ncdio_atm.F90 +++ b/components/cam/src/control/ncdio_atm.F90 @@ -202,7 +202,7 @@ subroutine infld_real_1d_2d(varname, ncid, dimname1, & ! Specifically, this condition is for when the single column model ! is run in the Spectral Element dycore cnt(1) = 1 - call shr_scam_getCloseLatLon(ncid%fh,scmlat,scmlon,closelat,closelon,latidx,lonidx) + call shr_scam_getCloseLatLon(ncid,scmlat,scmlon,closelat,closelon,latidx,lonidx) strt(1) = lonidx ierr = pio_get_var(ncid, varid, strt, cnt, field)