<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ks_c_5601-1987">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Hi Wei-keng,</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<a href="https://www.unidata.ucar.edu/software/netcdf/docs/nc-error-codes.html" id="LPlnk790058"></a></div>
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Thank you for answer and</span><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt;"> telling me how to print the error.</span>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Pnetcdf are also using the same error system as netcdf.</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Please let me share the information below for reference.</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">https://www.unidata.ucar.edu/software/netcdf/docs/nc-error-codes.html</span></div>
<div><br>
</div>
<div><br>
</div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Here is the header of my netcdf file:</span></div>
<div><br>
</div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">netcdf clim_aerosol_BC {</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">dimensions:</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">         month = 12;</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">         nlev = 16;</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">         ncol = 3110402;</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">variables:</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">         float BC(month, nlev, ncol);</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">         double pressure(nlev);</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">}</span></div>
<div><br>
</div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Trying to read the second pressure variable,</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">I confirmed that it goes into nf90mpi_get_var_all(0, 2, VAR, 1, 16).</span></div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt;">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.</span><br>
</div>
<div><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt;">I am now in doubt whether there was a problem with the library installation process.</span><br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Any idea what's wrong?<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div></div>
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"></span>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Best Regards,</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Kihang<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(12, 100, 192);"><b>Kihang Youn(À±±âÇ×)</b></span> - Application Analyst | Lenovo DCG <span style="">Professional Services</span>
<div>Mobile: +82-10-9374-9396<br>
</div>
E-mail: kyoun@lenovo.com<br>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Wei-Keng Liao <wkliao@northwestern.edu><br>
<b>Sent:</b> Tuesday, March 23, 2021 17:45<br>
<b>To:</b> Kihang Youn <kyoun@lenovo.com><br>
<b>Cc:</b> parallel-netcdf@lists.mcs.anl.gov <parallel-netcdf@lists.mcs.anl.gov><br>
<b>Subject:</b> [External] Re: nf90mpi_get_var_all error code</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class="">API nf90mpi_strerror() can be used to obtain the error message, for example</div>
<div class=""><br class="">
</div>
<div class="">  err = nf90mpi_get_var_all(ncid, varid, buf, start, count)<br class="">
  write(6,*) "Error when calling nf90mpi_get_var_all ", trim(nf90mpi_strerror(err))</div>
<div class=""><br class="">
</div>
<div class="">Error code -40 is constant NF90_EINVALCOORDS, which corresponds to the message below.<br class="">
   NetCDF: Index exceeds dimension bound</div>
<div class="">
<div class=""><br class="x_webkit-block-placeholder">
</div>
<div class="">Check the argument "start" for invalid values used.</div>
<div class=""><br class="">
</div>
<div class="">Wei-keng </div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Mar 23, 2021, at 3:38 PM, Kihang Youn <<a href="mailto:kyoun@lenovo.com" class="">kyoun@lenovo.com</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; background-color:rgb(255,255,255)">
<br class="x_Apple-interchange-newline">
Hi,
<div class=""><br class="">
</div>
<div class="">I try to read the contents of Netcdf file with nf90mpi_get_var_all, but I get an error code of -40.</div>
<div class="">I want to debug that content, how can I do it? </div>
<div class="">Please tell us if there is a way to find out what the error code means for each function.</div>
Even a little thing you know will be of great help to me.<br class="">
</div>
<div class="" style="font-family:Monaco; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div id="x_Signature" class="">
<div class="">
<div class=""></div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Best Regards,</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Kihang<br class="">
</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<span class="" style="color:rgb(12,100,192)"><b class="">Kihang Youn(À±±âÇ×)</b></span> - Application Analyst | Lenovo DCG <span class="">Professional Services</span>
<div class="">Mobile: +82-10-9374-9396<br class="">
</div>
E-mail:<span class="x_Apple-converted-space"> </span><a href="mailto:kyoun@lenovo.com" class="">kyoun@lenovo.com</a></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>