Exemple #1
0
def fstvoi(iunit, option):
    """Print a list view a RPN Standard File rec (Interface to fstvoi)
    Fstdc.fstvoi(iunit, option)
    @param iunit file unit number handle returned by Fstdc_fstouv (int)
    @param option 'STYLE_OLD' or 'STYLE_NEW' (sting)
    @return None
    @exception TypeError
    """
    try:
        _rmn.fstvoi(iunit, option)
    except:
        raise error("")
Exemple #2
0
def fstvoi(iunit, option):
    """Print a list view a RPN Standard File rec (Interface to fstvoi)
    Fstdc.fstvoi(iunit, option)
    @param iunit file unit number handle returned by Fstdc_fstouv (int)
    @param option 'STYLE_OLD' or 'STYLE_NEW' (sting)
    @return None
    @exception TypeError
    """
    try:
        _rmn.fstvoi(iunit, option)
    except:
        raise error("")
    def test_fstvoi_fstversion(self):
        """fstvoi, fst_version should give known result with known input"""
        rmn.fstopt(rmn.FSTOP_MSGLVL, rmn.FSTOPI_MSG_CATAST)
        (la, lo) = self.create_basefile()  #wrote 2 recs in that order: la, lo
        funit = rmn.fstopenall(self.fname, rmn.FST_RW)
        ## ATM_MODEL_DFILES = os.getenv('ATM_MODEL_DFILES')
        ## myfile = os.path.join(ATM_MODEL_DFILES.strip(),'bcmk/2009042700_000')
        ## funit = rmn.fstopenall(myfile,rmn.FST_RO)
        rmn.fstvoi(funit)
        rmn.fstvoi(funit, 'NINJNK+GRIDINFO')
        rmn.fstcloseall(funit)
        self.erase_testfile()

        a = rmn.fst_version()
        self.assertEqual(a, 200001)
    def test_fstvoi_fstversion(self):
        """fstvoi, fst_version should give known result with known input"""
        rmn.fstopt(rmn.FSTOP_MSGLVL,rmn.FSTOPI_MSG_CATAST)
        (la,lo) = self.create_basefile() #wrote 2 recs in that order: la, lo
        funit = rmn.fstopenall(self.fname,rmn.FST_RW)
        ## ATM_MODEL_DFILES = os.getenv('ATM_MODEL_DFILES')
        ## myfile = os.path.join(ATM_MODEL_DFILES.strip(),'bcmk/2009042700_000')
        ## funit = rmn.fstopenall(myfile,rmn.FST_RO)
        rmn.fstvoi(funit)
        rmn.fstvoi(funit,'NINJNK+GRIDINFO')
        rmn.fstcloseall(funit)
        self.erase_testfile()

        a = rmn.fst_version()
        self.assertEqual(a,200001)