コード例 #1
0
ファイル: nemo.py プロジェクト: jfleroux/vacumm
        }
        ,
        # sea surface meridional velocity
        'vsurf':{
            'inherit':'v3d',
            'select':{'level':slice(0, 1)},
            'squeeze':'z',
        }
    }


    positive = 'down'


#: Alias for :class:`Nemo`
NEMO = Nemo

if __name__ == '__main__' :
    from vacumm.data import setup_dataset
    from vacumm.misc.plot import map2 as map
    f = setup_dataset('nemo', dataset='/tmp/oo7/oo/mfstep_sys4/best_estimate/2004/INGV_MFSTEP-SYS4_20040702_ASLV.nc')
    sshmod = f.get_ssh()
    #map(sshmod[0, Ellipsis], res=None)
    f = setup_dataset('nemo', dataset='/tmp/oo7/oo/mfstep_sys4/best_estimate/2004/INGV_MFSTEP-SYS4_20040702_TEMP.nc')
    temp = f.get_temp()
    xxx
    #map(temp[0, 0, Ellipsis], res=None)  # axes verticaux inverses dans NEMO !!!!!!!
    f.get_depth()
    xxxx

コード例 #2
0
ファイル: showmpi.py プロジェクト: jfleroux/vacumm
# Imports
import numpy as N, MV2
import matplotlib.pyplot as P
from matplotlib.ticker import FormatStrFormatter, FuncFormatter
from warnings import warn
from vacumm.misc import scalebox
from vacumm.bathy.bathy import plot_bathy
from vacumm.misc.grid import meshbounds, meshgrid
from vacumm.misc.color import cmap_srs
from vacumm.data import setup_dataset

# Read the MARS file
if not os.path.exists(options.marsfile):
    parser.error("Invalid MARS file name: " + options.marsfile)
ds = setup_dataset("mars", options.marsfile, log_level="error" if options.quiet else "info")
bathy = ds.get_bathy().asma()
bathy[:] = N.ma.masked_less(bathy, -30.0, copy=False)
mask = N.ma.getmaskarray(bathy)  # ; del bathy
valid = ~mask
mask = mask.astype("i")
ny, nx = mask.shape

# Read the MPI file
if not os.path.exists(options.mpifile):
    parser.error("Invalid MPI file name: " + options.mpifile)
f = open(options.mpifile)
nb = int(f.readline().split()[0])  # Number of procs
nbx = int(f.readline().split()[0])
nby = int(f.readline().split()[0])
sh = (nbx, nby)
コード例 #3
0
ファイル: showmpi.py プロジェクト: acoat/vacumm
# Imports
import numpy as N, MV2
import matplotlib.pyplot as P
from matplotlib.ticker import FormatStrFormatter, FuncFormatter
from warnings import warn
from vacumm.misc import scalebox
from vacumm.bathy.bathy import plot_bathy
from vacumm.misc.grid import meshbounds, meshgrid
from vacumm.misc.color import cmap_srs
from vacumm.data import setup_dataset

# Read the MARS file
if not os.path.exists(options.marsfile):
    parser.error('Invalid MARS file name: ' + options.marsfile)
ds = setup_dataset('mars',
                   options.marsfile,
                   log_level='error' if options.quiet else 'info')
bathy = ds.get_bathy().asma()
bathy[:] = N.ma.masked_less(bathy, -30., copy=False)
mask = N.ma.getmaskarray(bathy)  #; del bathy
valid = ~mask
mask = mask.astype('i')
ny, nx = mask.shape

# Read the MPI file
if not os.path.exists(options.mpifile):
    parser.error('Invalid MPI file name: ' + options.mpifile)
f = open(options.mpifile)
nb = int(f.readline().split()[0])  # Number of procs
nbx = int(f.readline().split()[0])
nby = int(f.readline().split()[0])
コード例 #4
0
    positive = 'down'


#: Alias for :class:`Nemo`
NEMO = Nemo

# Register the class
register_dataset(NEMO, warn=False)

if __name__ == '__main__':
    from vacumm.data import setup_dataset
    from vacumm.misc.plot import map2 as map
    f = setup_dataset(
        'nemo',
        dataset=
        '/tmp/oo7/oo/mfstep_sys4/best_estimate/2004/INGV_MFSTEP-SYS4_20040702_ASLV.nc'
    )
    sshmod = f.get_ssh()
    #map(sshmod[0, Ellipsis], res=None)
    f = setup_dataset(
        'nemo',
        dataset=
        '/tmp/oo7/oo/mfstep_sys4/best_estimate/2004/INGV_MFSTEP-SYS4_20040702_TEMP.nc'
    )
    temp = f.get_temp()
    xxx
    #map(temp[0, 0, Ellipsis], res=None)  # axes verticaux inverses dans NEMO !!!!!!!
    f.get_depth()
    xxxx
コード例 #5
0
ファイル: symphonie.py プロジェクト: Sophia-E-Brumer/vacumm
        # meridional current (2d)
        #'vbt':{'search':{'id':['vomecrty']}}
    }

    positive = 'up'


#: Alias for :class:`Symphonie`
symp = Symphonie

# Register the class
register_dataset(symp)

if __name__ == '__main__':
    from vacumm.data import setup_dataset
    from vacumm.misc.plot import map2 as map
    #f = setup_dataset('symphonie', dataset='/home2/creizic/pgarreau/SIMED/SYMPHONIE/LION/GV_MFSTEP-SYS4_20040702_ASLV.nc')
    #sshmod = f.get_ssh()
    #map(sshmod[0, Ellipsis], res=None)
    #    f = DS('symphonie', dataset='/home2/creizic/pgarreau/SIMED/SYMPHONIE/SST/20100501_000118.nc')
    print "test temperature"
    f = setup_dataset(
        'symp',
        '/home2/creizic/pgarreau/SIMED/SYMPHONIE/SST/20100501_000118.nc')
    #    f = setup_dataset('symphonie', '/home2/creizic/pgarreau/SIMED/SYMPHONIE/SST/20100501_000118.nc')
    temp = f.get_temp()
    xxx
    #f.get_depth()
    xxxx