Ignore:
Timestamp:
20/02/08 17:18:00 (12 years ago)
Author:
astephen
Message:

Fixed and broken - got 2110 and 2310 writing from NetCDF. But the solution breaks the basic readNA/writeNA cycle. The reason is that the new code writes the data from NX, DX and X rather than A and NAUXV. Maybe the data really needs to be encoded to NAUXV and A in order for this to work unformly. Hmmmm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/na_file/na_file_2310.py

    r3461 r3482  
    9999            var_string = self.format % self.X[m][0] 
    100100 
    101             for a in range(self.NAUXV): 
     101            var_string = var_string + (self.format % self.NX[m]) + (self.format % self.X[m][0]) + \ 
     102                                      (self.format % self.DX[m]) 
     103 
     104            # Loop through NAUXV minus 3 because NX, X[0], DX are first 3 aux vars 
     105            for a in range(self.NAUXV - 3): 
    102106                var_string = var_string + (self.format % self.A[a][m]) 
     107 
    103108            self.file.write("%s\n" % var_string.rstrip(" ,")) 
    104109 
Note: See TracChangeset for help on using the changeset viewer.