As currently coded interp_inc.fd/driver.f90 assumes variables lon and lat are have the same integer addresses as dimensions lon and lat in the input netCDF file. This is shown in the following block of code from driver.f90 which loads the longitude array:
We should not assume id_dim for the lon dimension is identical to id_dim for the lon variable. Instead, we should query the location of variable lon prior to getting lon. This is done by adding a call to nf90_inq_varid for variable lon prior to getting lon.
error = nf90_inq_varid(ncid_in, 'lon', id_dim)
call netcdf_err(error, 'inquiring var lon dimension for file='//trim(infile) )
error = nf90_get_var(ncid_in, id_dim, longitude_in)
call netcdf_err(error, 'reading longitude_in for file='//trim(infile) )
This issue is opened to document this problem and its resolution.
As currently coded
interp_inc.fd/driver.f90
assumes variableslon
andlat
are have the same integer addresses as dimensionslon
andlat
in the input netCDF file. This is shown in the following block of code fromdriver.f90
which loads the longitude array:We should not assume
id_dim
for thelon
dimension is identical toid_dim
for thelon
variable. Instead, we should query the location of variablelon
prior to gettinglon
. This is done by adding a call tonf90_inq_varid
for variablelon
prior to gettinglon
.This issue is opened to document this problem and its resolution.