[External] Re: nf90mpi_get_var_all error code

Wei-Keng Liao wkliao at northwestern.edu
Tue Mar 23 05:04:22 CDT 2021


Type conversion from double prevision to real*4 should not be the problem.

Please provide the relevant code fragments.
Also, the version of PnetCDF you are using.

Wei-keng

On Mar 23, 2021, at 5:18 PM, Kihang Youn <kyoun at lenovo.com<mailto:kyoun at lenovo.com>> wrote:


Hi Wei-keng,

<https://urldefense.com/v3/__https://www.unidata.ucar.edu/software/netcdf/docs/nc-error-codes.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!CX9PqajQqT-RoOsosnwNBDVNDL_goVYidmpuwfB-vRM9rxzX6NfWmWg-guXf3xpNfJDs$>
Thank you for answer and telling me how to print the error.
Pnetcdf are also using the same error system as netcdf.

Please let me share the information below for reference.
https://www.unidata.ucar.edu/software/netcdf/docs/nc-error-codes.html


Here is the header of my netcdf file:

netcdf clim_aerosol_BC {
dimensions:
         month = 12;
         nlev = 16;
         ncol = 3110402;
variables:
         float BC(month, nlev, ncol);
         double pressure(nlev);
}

Trying to read the second pressure variable,
I confirmed that it goes into nf90mpi_get_var_all(0, 2, VAR, 1, 16).
I thought it was a problem because VAR is a real4 variable, so I changed the pressure of the netcdf file from double to float, but it is the same.
I am now in doubt whether there was a problem with the library installation process.

Any idea what's wrong?

Best Regards,
Kihang

Kihang Youn(윤기항) - Application Analyst | Lenovo DCG Professional Services
Mobile: +82-10-9374-9396
E-mail: kyoun at lenovo.com<mailto:kyoun at lenovo.com>
________________________________
From: Wei-Keng Liao <wkliao at northwestern.edu<mailto:wkliao at northwestern.edu>>
Sent: Tuesday, March 23, 2021 17:45
To: Kihang Youn <kyoun at lenovo.com<mailto:kyoun at lenovo.com>>
Cc: parallel-netcdf at lists.mcs.anl.gov<mailto:parallel-netcdf at lists.mcs.anl.gov> <parallel-netcdf at lists.mcs.anl.gov<mailto:parallel-netcdf at lists.mcs.anl.gov>>
Subject: [External] Re: nf90mpi_get_var_all error code

API nf90mpi_strerror() can be used to obtain the error message, for example

  err = nf90mpi_get_var_all(ncid, varid, buf, start, count)
  write(6,*) "Error when calling nf90mpi_get_var_all ", trim(nf90mpi_strerror(err))

Error code -40 is constant NF90_EINVALCOORDS, which corresponds to the message below.
   NetCDF: Index exceeds dimension bound

Check the argument "start" for invalid values used.

Wei-keng

On Mar 23, 2021, at 3:38 PM, Kihang Youn <kyoun at lenovo.com<mailto:kyoun at lenovo.com>> wrote:


Hi,

I try to read the contents of Netcdf file with nf90mpi_get_var_all, but I get an error code of -40.
I want to debug that content, how can I do it?
Please tell us if there is a way to find out what the error code means for each function.
Even a little thing you know will be of great help to me.

Best Regards,
Kihang

Kihang Youn(윤기항) - Application Analyst | Lenovo DCG Professional Services
Mobile: +82-10-9374-9396
E-mail: kyoun at lenovo.com<mailto:kyoun at lenovo.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20210323/665e5ad5/attachment-0001.html>


More information about the parallel-netcdf mailing list