nappy/nc_interface/na_to_nc.py
def writeNCFile(self, file_name, mode="w"):
        """
        Writes the NASA Ames content that has been converted into CDMS objects to a
        NetCDF file of name 'file_name'. Note that mode can be set to append so you 
        can add the data to an existing file.
        """
        if not self.converted:
            self.convert()

        # Create CDMS output file object
        fout = cdms.open(file_name, mode=mode)

        # Write main variables
        for var in self.cdms_variables:
            fout.write(var)

        # Write aux variables
        for avar in self.cdms_aux_variables:
            fout.write(avar)

        # Write global attributes
        for (att, value) in self.global_attributes:
            setattr(fout, att, value)
        
        fout.close()
        log.info("NetCDF file '%s' written successfully." % file_name)
        return True

        Writes the NASA Ames content that has been converted into CDMS objects to a
        NetCDF file of name 'file_name'. Note that mode can be set to append so you 
        can add the data to an existing file.
        
Writes the NASA Ames content that has been converted into CDMS objects to a
NetCDF file of name 'file_name'. Note that mode can be set to append so you
can add the data to an existing file.
Writes the NASA Ames content that has been converted into CDMS objects to a NetCDF file of name ' file_name ' . Note that mode can be set to append so you can add the data to an existing file .
def writeNCFile(self, file_name, mode="w"):
        if not self.converted:
            self.convert()
        fout = cdms.open(file_name, mode=mode)
        for var in self.cdms_variables:
            fout.write(var)
        for avar in self.cdms_aux_variables:
            fout.write(avar)
        for (att, value) in self.global_attributes:
            setattr(fout, att, value)
        fout.close()
        log.info("NetCDF file '%s' written successfully." % file_name)
        return True
def writeNCFile ( self , file_name , mode = "w" ) : if not self . converted : self . convert ( ) fout = cdms . open ( file_name , mode = mode ) for var in self . cdms_variables : fout . write ( var ) for avar in self . cdms_aux_variables : fout . write ( avar ) for ( att , value ) in self . global_attributes : setattr ( fout , att , value ) fout . close ( ) log . info ( "NetCDF file '%s' written successfully." % file_name ) return True
Writes the NASA Ames content that has been converted into CDMS objects to a
NetCDF file of name 'file_name'.
Writes the NASA Ames content that has been converted into CDMS objects to a NetCDF file of name ' file_name ' .
"""
        Writes the NASA Ames content that has been converted into CDMS objects to a
        NetCDF file of name 'file_name'. Note that mode can be set to append so you 
        can add the data to an existing file.
        """ # Create CDMS output file object
 # Write main variables
 # Write aux variables
 # Write global attributes

self
file_name
mode