[netcdfgroup] Strange problem with automatic double to real conversion during write

Hi all,

I experienced a strange problem, when writing a double fortran array with nf90_put_var to a NF90_REAL variable. The fortran array has dimension (:,:,:) and is written to a record variable with dimension (:,:,:,:). (The record dimension is accounted for by setting of the start and count arguments.)

Within the netcdf output (still using fortran order) I have strange values at the first column ncvar(1,j,k,n). In my case y_dim=1 and the values seems to be copied from the last column, because:

ncvar(1,1,k,n) = ncvar(x_dim,1,k-1,n)

This only happens within the second call (n=2) to nf90_put_var.

When I change the data type of the fortran array or the netcdf variable to coincide with each other everything is fine.

Do you have any ideas why the automatic conversion does not work in my very special case (n=2)?

Best regards,

Knut Klingbeil

Dept. for Physical Oceanography and Instrumentation
Leibniz Institute for Baltic Sea Research
Seestrasse 15
D-18119 Rostock-Warnemuende, Germany
http://www.io-warnemuende.de/copps.html

mail : knut.klingbeil@xxxxxxxxxxxxxxxxx
phone: +49 - 381 - 5197 - 153
fax  : +49 - 381 - 5197 - 114



  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: