def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        super(SurfaceFields, self).check_prerequisites(env)
        print("  Checking prerequisites for : {0}".format(self.__class__.__name__))

        # check the observation sea surface height file
        sourceFile = '{0}/{1}'.format( env['SSHOBSDIR'], env['SSHOBSFILE'] )
        linkFile = '{0}/{1}'.format(env['WORKDIR'],env['SSHOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        super(SeasonalCycle, self).check_prerequisites(env)
        print('  Checking prerequisites for : {0}'.format(self.__class__.__name__))

        # set a link to SSTOBSDIR/SSTOBSFILE
        sourceFile = '{0}/{1}'.format(env['SSTOBSDIR'], env['SSTOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'], env['SSTOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        super(MOCAnnual, self).check_prerequisites(env)
        print("  Checking prerequisites for : {0}".format(self.__class__.__name__))

        # create link to MOC average file
        sourceFile = '{0}/{1}.pop.h.{2}-{3}.moc.nc'.format(env['TAVGDIR'], env['CASE'], env['TSERIES_YEAR0'].zfill(4), env['TSERIES_YEAR1'].zfill(4))
        linkFile = '{0}/{1}.pop.h.MOC.{2}_cat_{3}.nc'.format(env['WORKDIR'], env['CASE'], env['TSERIES_YEAR0'].zfill(4), env['TSERIES_YEAR1'].zfill(4))
        diagUtilsLib.createSymLink(sourceFile, linkFile)
        env['MOCTSANNFILE'] = os.environ['MOCTSANNFILE'] = linkFile
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        super(RegionalMeanTS, self).check_prerequisites(env)
        print('  Checking prerequisites for : {0}'.format(self.__class__.__name__))

        # create links to the regional horizontal mean average files
        for region in self._regions:
            sourceFile = '{0}/{1}_hor_mean_hor.meanConcat.{2}.pop.h_{3}-{4}.nc'.format(env['TAVGDIR'], region, env['CASE'], env['TSERIES_YEAR0'].zfill(4), env['TSERIES_YEAR1'].zfill(4))
            linkFile = '{0}/{1}_hor_mean_{2}.pop.h_{3}-{4}.nc'.format(env['WORKDIR'], region, env['CASE'], env['TSERIES_YEAR0'].zfill(4), env['TSERIES_YEAR1'].zfill(4))
            diagUtilsLib.createSymLink(sourceFile, linkFile)
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        super(MixedLayerDepth, self).check_prerequisites(env)
        print('  Checking prerequisites for : {0}'.format(self.__class__.__name__))

        # set SEASAVGRHO env var to the env['SEASAVGRHO'] output file name
        os.environ['SEASAVGRHO'] = env['SEASAVGRHO']

        # set CNTRLSEASAVGRHO env var to the env['CNTRLSEASAVGRHO'] output file name
        os.environ['CNTRLSEASAVGRHO'] = env['CNTRLSEASAVGRHO']

        # set a link to RHOOBSDIR/RHOOBSFILE
        sourceFile = '{0}/{1}'.format(env['RHOOBSDIR'], env['RHOOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'], env['RHOOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        super(RegionalMeanTS, self).check_prerequisites(env)
        print('  Checking prerequisites for : {0}'.format(
            self.__class__.__name__))

        # create links to the regional horizontal mean average files
        for region in self._regions:
            sourceFile = '{0}/{1}_hor_mean_hor.meanConcat.{2}.pop.h_{3}-{4}.nc'.format(
                env['TAVGDIR'], region, env['CASE'],
                env['TSERIES_YEAR0'].zfill(4), env['TSERIES_YEAR1'].zfill(4))
            linkFile = '{0}/{1}_hor_mean_{2}.pop.h_{3}-{4}.nc'.format(
                env['WORKDIR'], region, env['CASE'],
                env['TSERIES_YEAR0'].zfill(4), env['TSERIES_YEAR1'].zfill(4))
            diagUtilsLib.createSymLink(sourceFile, linkFile)
示例#7
0
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        super(MOCAnnual, self).check_prerequisites(env)
        print("  Checking prerequisites for : {0}".format(
            self.__class__.__name__))

        # create link to MOC average file
        sourceFile = '{0}/{1}.pop.h.{2}-{3}.moc.nc'.format(
            env['TAVGDIR'], env['CASE'], env['TSERIES_YEAR0'].zfill(4),
            env['TSERIES_YEAR1'].zfill(4))
        linkFile = '{0}/{1}.pop.h.MOC.{2}_cat_{3}.nc'.format(
            env['WORKDIR'], env['CASE'], env['TSERIES_YEAR0'].zfill(4),
            env['TSERIES_YEAR1'].zfill(4))
        diagUtilsLib.createSymLink(sourceFile, linkFile)
        env['MOCTSANNFILE'] = os.environ['MOCTSANNFILE'] = linkFile
    def check_prerequisites(self, env):
        """This method does some generic checks for the prerequisites
        that are common to all diagnostics
        """
        print('  Checking generic prerequisites for ocean diagnostics.')
        # setup the working directory for each diagnostics class
        env = self.setup_workdir(env)

        # check that temperature observation TOBSFILE exists and is readable
        sourceFile = '{0}/{1}'.format(env['TSOBSDIR'], env['TOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'], env['TOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)

        # check that salinity observation SOBSFILE exists and is readable
        sourceFile = '{0}/{1}'.format(env['TSOBSDIR'], env['SOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'], env['SOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)
示例#9
0
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        super(MixedLayerDepth, self).check_prerequisites(env)
        print('  Checking prerequisites for : {0}'.format(
            self.__class__.__name__))

        # set SEASAVGRHO env var to the env['SEASAVGRHO'] output file name
        os.environ['SEASAVGRHO'] = env['SEASAVGRHO']

        # set CNTRLSEASAVGRHO env var to the env['CNTRLSEASAVGRHO'] output file name
        os.environ['CNTRLSEASAVGRHO'] = env['CNTRLSEASAVGRHO']

        # set a link to RHOOBSDIR/RHOOBSFILE
        sourceFile = '{0}/{1}'.format(env['RHOOBSDIR'], env['RHOOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'], env['RHOOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)
示例#10
0
    def check_prerequisites(self, env):
        """This method does some generic checks for the prerequisites
        that are common to all diagnostics
        """
        print('  Checking generic prerequisites for ocean diagnostics.')
        # setup the working directory for each diagnostics class
        env = self.setup_workdir(env)

        # check that temperature observation TOBSFILE exists and is readable
        sourceFile = '{0}/{1}'.format(env['TSOBSDIR'], env['TOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'], env['TOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)

        # check that salinity observation SOBSFILE exists and is readable
        sourceFile = '{0}/{1}'.format(env['TSOBSDIR'], env['SOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'], env['SOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        super(EquatorialUpperocean, self).check_prerequisites(env)
        print('  Checking prerequisites for : {0}'.format(
            self.__class__.__name__))

        # check in the PHC2 files exist based on the number of vertical levels
        # check temp
        phcTemp = env['TOBSFILE']
        if env['VERTICAL'] == 42:
            phcTemp = env['TOBSFILE_V42']

        # check if the link to the PHC temp file exists and is readable
        sourceFile = '{0}/{1}'.format(env['TSOBSDIR'], phcTemp)
        linkFile = '{0}/{1}'.format(env['WORKDIR'], phcTemp)
        diagUtilsLib.createSymLink(sourceFile, linkFile)

        # check salt
        phcSalt = env['SOBSFILE']
        if env['VERTICAL'] == 42:
            phcTemp = env['SOBSFILE_V42']

        # check if the link to the PHC salt file exists and is readable
        sourceFile = '{0}/{1}'.format(env['TSOBSDIR'], phcSalt)
        linkFile = '{0}/{1}'.format(env['WORKDIR'], phcSalt)
        diagUtilsLib.createSymLink(sourceFile, linkFile)

        # check if the link to the TOGA-TAO exists and is readable
        sourceFile = '{0}/{1}'.format(env['TOGATAODIR'], env['TOGATAOFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'], env['TOGATAOFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        print("  Checking prerequisites for : {0}".format(
            self.__class__.__name__))
        super(SurfaceFluxFields, self).check_prerequisites(env)

        # setup the fluxobsdir and fluxobsfile based on the coupler version
        fluxobsdir = 'FLUXOBSDIR_CPL{0}'.format(env['CPL'])
        env['FLUXOBSDIR'] = env[fluxobsdir]
        fluxobsfile = 'FLUXOBSFILE_CPL{0}'.format(env['CPL'])
        env['FLUXOBSFILE'] = env[fluxobsfile]

        # create symbolic link to the flux observation file in the workdir
        sourceFile = '{0}/{1}'.format(env['FLUXOBSDIR'], env['FLUXOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'], env['FLUXOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)

        # create symbolic link to zonal average flux file in the workdir
        sourceFile = '{0}/za_{1}'.format(env['FLUXOBSDIR'], env['FLUXOBSFILE'])
        linkFile = '{0}/za_{1}'.format(env['WORKDIR'], env['FLUXOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)

        # create symbolic link to wind file in the workdir
        sourceFile = '{0}/{1}'.format(env['WINDOBSDIR'], env['WINDOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'], env['WINDOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        print("  Checking prerequisites for : {0}".format(self.__class__.__name__))
        super(SurfaceFluxFields, self).check_prerequisites(env)

        # setup the fluxobsdir and fluxobsfile based on the coupler version
        fluxobsdir = 'FLUXOBSDIR_CPL{0}'.format(env['CPL'])
        env['FLUXOBSDIR'] = env[fluxobsdir]
        fluxobsfile = 'FLUXOBSFILE_CPL{0}'.format(env['CPL'])
        env['FLUXOBSFILE'] = env[fluxobsfile]

        # create symbolic link to the flux observation file in the workdir
        sourceFile = '{0}/{1}'.format(env['FLUXOBSDIR'],env['FLUXOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'],env['FLUXOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)
   
        # create symbolic link to zonal average flux file in the workdir
        sourceFile = '{0}/za_{1}'.format(env['FLUXOBSDIR'],env['FLUXOBSFILE'])
        linkFile = '{0}/za_{1}'.format(env['WORKDIR'],env['FLUXOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)

        # create symbolic link to wind file in the workdir
        sourceFile = '{0}/{1}'.format(env['WINDOBSDIR'],env['WINDOBSFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'],env['WINDOBSFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)
    def check_prerequisites(self, env):
        """list and check specific prequisites for this plot.
        """
        super(EquatorialUpperocean, self).check_prerequisites(env)
        print('  Checking prerequisites for : {0}'.format(self.__class__.__name__))

        # check in the PHC2 files exist based on the number of vertical levels
        # check temp
        phcTemp = env['TOBSFILE']
        if env['VERTICAL'] == 42:
            phcTemp = env['TOBSFILE_V42']

        # check if the link to the PHC temp file exists and is readable
        sourceFile = '{0}/{1}'.format(env['TSOBSDIR'],phcTemp)
        linkFile = '{0}/{1}'.format(env['WORKDIR'],phcTemp)
        diagUtilsLib.createSymLink(sourceFile, linkFile)

        # check salt
        phcSalt = env['SOBSFILE']
        if env['VERTICAL'] == 42:
            phcTemp = env['SOBSFILE_V42']

        # check if the link to the PHC salt file exists and is readable
        sourceFile = '{0}/{1}'.format(env['TSOBSDIR'],phcSalt)
        linkFile = '{0}/{1}'.format(env['WORKDIR'],phcSalt)
        diagUtilsLib.createSymLink(sourceFile, linkFile)

        # check if the link to the TOGA-TAO exists and is readable
        sourceFile = '{0}/{1}'.format(env['TOGATAODIR'],env['TOGATAOFILE'])
        linkFile = '{0}/{1}'.format(env['WORKDIR'],env['TOGATAOFILE'])
        diagUtilsLib.createSymLink(sourceFile, linkFile)