Beispiel #1
0
def do_file(file):
    print 'file is: ' + file
    start = string.find(file, '_')
    end = string.find(file, '_', start + 1)
    var = file[start + 1:end]
    print 'var is: ' + var
    if var == 'uv':
        dst_var = pyroms_toolbox.remapping(['u', 'v'], file,\
                     wts_file,src_grd,dst_grd,rotate_uv=True,\
                     uvar='u', vvar='v')
    else:
        dst_var = pyroms_toolbox.remapping([var], file,\
                     wts_file,src_grd,dst_grd)
Beispiel #2
0
def do_file(file):
    print 'file is: ' + file
    start = string.find(file,'_')
    end = string.find(file,'_',start+1)
    var = file[start+1:end]
    print 'var is: ' + var
    if var == 'uv':
        dst_var = pyroms_toolbox.remapping(['u', 'v'], file,\
                     wts_file,src_grd,dst_grd,rotate_uv=True,\
                     uvar='u', vvar='v')
    else:
        dst_var = pyroms_toolbox.remapping([var], file,\
                     wts_file,src_grd,dst_grd)
Beispiel #3
0
def do_file(month):
    global src_varname
    wts_file = './remap_weights_ARCTIC2_to_BEAUFORT2_bilinear_*'
    src_filename = part_filename + month + '*.nc'
    lcopy = list(src_varname)
    dst_var = pyroms_toolbox.remapping(lcopy, src_filename, \
                     wts_file, src_grd, dst_grd, rotate_uv=True, \
                     irange=irange, jrange=jrange, \
                     uvar='uice_eastward', vvar='vice_northward', \
                     rotate_part=True)
Beispiel #4
0
def do_file(month):
    global src_varname
    wts_file = './remap_weights_ARCTIC2_to_BEAUFORT2_bilinear_*'
    src_filename = part_filename + month + '*.nc'
    lcopy = list(src_varname)
    dst_var = pyroms_toolbox.remapping(lcopy, src_filename, \
                     wts_file, src_grd, dst_grd, rotate_uv=True, \
                     irange=irange, jrange=jrange, \
                     uvar='uice_eastward', vvar='vice_northward', \
                     rotate_part=True)
Beispiel #5
0
import pyroms
import pyroms_toolbox

src_varname = ['zeta','uice','vice','aice','hice','tisrf','snow_thick', \
               'sfwat','ageice','ti','sig11','sig12','sig22','t0mk', \
               's0mk','temp','salt','u','v']

# Change src_filename to your directory for the file's containing variable data
src_filename = '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_001.nc'
#src_filename = '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_04[89].nc', '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_05?.nc'
wts_file = "./remap_weights_NEP5_to_BERING_bilinear_*"
src_grd = pyroms.grid.get_ROMS_grid('NEP5')
dst_grd = pyroms.grid.get_ROMS_grid('BERING')
# Outfile is a parameter to allow you to place these created remap files in a different
# directory than the one that is default which is where the file came from.
dst_var = pyroms_toolbox.remapping(src_varname, src_filename,\
                                   wts_file,src_grd,dst_grd,rotate_uv=False,\
                                   irange=(20,210),jrange=(340,610))
Beispiel #6
0
import pyroms
import pyroms_toolbox

src_varname = ['zeta','uice','vice','aice','hice','tisrf','snow_thick', \
               'sfwat','ageice','ti','sig11','sig12','sig22','t0mk', \
               's0mk','temp','salt','u','v']

# Change src_filename to your directory for the file's containing variable data
src_filename = '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_001.nc'
#src_filename = '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_04[89].nc', '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_05?.nc'
wts_file = "./remap_weights_NEP5_to_BERING_bilinear_*"
src_grd = pyroms.grid.get_ROMS_grid('NEP5')
dst_grd = pyroms.grid.get_ROMS_grid('BERING')
# Outfile is a parameter to allow you to place these created remap files in a different
# directory than the one that is default which is where the file came from.
dst_var = pyroms_toolbox.remapping(src_varname, src_filename,\
                                   wts_file,src_grd,dst_grd,rotate_uv=False,\
                                   trange=(0,0),irange=(20,210),jrange=(340,610))
Beispiel #7
0
src_varname = ['zeta','aice','hice','tisrf','snow_thick', \
               'ageice','ti','t0mk','s0mk', 'temp','salt','u_eastward','v_northward']
irange=(420,580)
jrange=(470,570)
#irange = None
#jrange = None

# Need to pick up ubar/vbar and uice/vice later

# Change src_filename to your directory for the file's containing variable data
src_filename = '/archive/u1/uaf/kate/Arctic2/run24/averages/arctic2_avg_1992-12-31T00:00:00.nc'
#src_filename = '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_04[89].nc', '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_05?.nc'
wts_file = "./remap_weights_ARCTIC2_to_BEAUFORT_bilinear_*"
src_grd = pyroms.grid.get_ROMS_grid('ARCTIC2')
dst_grd = pyroms.grid.get_ROMS_grid('BEAUFORT')
# Outfile is a parameter to allow you to place these created remap files in a different
# directory than the one that is default which is where the file came from.
dst_var = pyroms_toolbox.remapping(src_varname, src_filename, wts_file, \
                src_grd, dst_grd, rotate_uv=True, irange=irange, jrange=jrange, \
                uvar='u_eastward', vvar='v_northward', rotate_part=True)
#dst_var = pyroms_toolbox.remapping(['uice','vice'], src_filename, \
#                wts_file, src_grd, dst_grd, rotate_uv=True, \
#                irange=irange, jrange=jrange, uvar='uice', vvar='vice')
dst_var = pyroms_toolbox.remapping(['uice_eastward','vice_northward'], src_filename, \
                wts_file, src_grd, dst_grd, rotate_uv=True, \
                irange=irange, jrange=jrange, \
                uvar='uice_eastward', vvar='vice_northward', rotate_part=True)
dst_var = pyroms_toolbox.remapping_tensor(['sig11','sig22','sig12'], src_filename, \
                wts_file, src_grd, dst_grd, rotate_sig=True, \
                irange=irange, jrange=jrange, shapiro=False)
Beispiel #8
0
import pyroms
import pyroms_toolbox

src_varname = ['zeta','aice','hice','tisrf','snow_thick','sfwat', \
               'ageice','ti','sig11','sig12','sig22','t0mk','s0mk', \
               'temp','salt','u','v']
#irange=(55,116)
#jrange=(230,283)
irange = None
jrange = None

# Need to pick up ubar/vbar and uice/vice later

# Change src_filename to your directory for the file's containing variable data
src_filename = '/archive/u1/uaf/kate/ARC_NATL/run01/weeks_1985/arc_natl_1985_001.nc'
#src_filename = '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_04[89].nc', '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_05?.nc'
wts_file = "./remap_weights_ARC_NATL_to_CHUKCHI_bilinear_*"
src_grd = pyroms.grid.get_ROMS_grid('ARC_NATL')
dst_grd = pyroms.grid.get_ROMS_grid('CHUKCHI')
# Outfile is a parameter to allow you to place these created remap files in a different
# directory than the one that is default which is where the file came from.
dst_var = pyroms_toolbox.remapping(src_varname, src_filename,\
                wts_file,src_grd,dst_grd,rotate_uv=True,\
                trange=(0,0),irange=irange,jrange=jrange)
dst_var = pyroms_toolbox.remapping(['uice','vice'], src_filename,\
                wts_file,src_grd,dst_grd,rotate_uv=True,\
                trange=(0,0),irange=irange, \
  jrange=jrange,uvar='uice',vvar='vice')
Beispiel #9
0
import pyroms
import pyroms_toolbox

src_varname = ['zeta','aice','hice','tisrf','snow_thick','sfwat', \
               'ageice','ti','sig11','sig12','sig22','t0mk','s0mk', \
               'temp','salt','u','v']
#irange=(55,116)
#jrange=(230,283)
irange = None
jrange = None

# Need to pick up ubar/vbar and uice/vice later

# Change src_filename to your directory for the file's containing variable data
src_filename = '/archive/u1/uaf/kate/ARC_NATL/run01/weeks_1985/arc_natl_1985_001.nc'
#src_filename = '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_04[89].nc', '/archive/u1/uaf/kate/NEP5/run42/weeks_2000/nep5_05?.nc'
wts_file = "./remap_weights_ARC_NATL_to_CHUKCHI_bilinear_*"
src_grd = pyroms.grid.get_ROMS_grid('ARC_NATL')
dst_grd = pyroms.grid.get_ROMS_grid('CHUKCHI')
# Outfile is a parameter to allow you to place these created remap files in a different
# directory than the one that is default which is where the file came from.
dst_var = pyroms_toolbox.remapping(src_varname, src_filename,\
                wts_file,src_grd,dst_grd,rotate_uv=True,\
                trange=(0,0),irange=irange,jrange=jrange)
dst_var = pyroms_toolbox.remapping(['uice','vice'], src_filename,\
                wts_file,src_grd,dst_grd,rotate_uv=True,\
                trange=(0,0),irange=irange, \
		jrange=jrange,uvar='uice',vvar='vice')
Beispiel #10
0
import matplotlib

matplotlib.use('Agg')

import pyroms
import pyroms_toolbox

#src_varname = ['u', 'v']
src_varname = ['zeta', 'temp', 'salt', 'u', 'v', 'bac', 'c1', 'c2', 'c3', \
               'chl1', 'chl2', 'chl3', 'cldoc', 'csdoc', 'ddc', 'ddca', \
               'ddn', 'ddsi', 'ldoc', 'ldon', 'nh4', 'no3', 'ox', 'po4', \
               's1', 's2', 's3', 'sdoc', 'sdon', 'sio4', 'talk', 'tco2', \
               'zz1', 'zz2', 'zzc1', 'zzc2']
print('Number of variables', len(src_varname))
irange = None
jrange = None

# Need to pick up ubar/vbar and uice/vice later

# Change src_filename to your directory for the file's containing variable data
src_filename = '/archive/u1/uaf/kate/COSINE/data/day_000.nc'
wts_file = "./remap_weights_PP_COSINE_to_NWGOA3_bilinear_*"
src_grd = pyroms.grid.get_ROMS_grid('PP_COSINE')
dst_grd = pyroms.grid.get_ROMS_grid('NWGOA3')
# Outfile is a parameter to allow you to place these created remap files in a different
# directory than the one that is default which is where the file came from.
dst_var = pyroms_toolbox.remapping(src_varname, src_filename,\
                wts_file,src_grd,dst_grd,rotate_uv=True)
Beispiel #11
0
import matplotlib
matplotlib.use('Agg')

import pyroms
import pyroms_toolbox

#src_varname = ['u', 'v']
src_varname = ['zeta', 'temp', 'salt', 'u', 'v', 'bac', 'c1', 'c2', 'c3', \
               'chl1', 'chl2', 'chl3', 'cldoc', 'csdoc', 'ddc', 'ddca', \
	       'ddn', 'ddsi', 'ldoc', 'ldon', 'nh4', 'no3', 'ox', 'po4', \
               's1', 's2', 's3', 'sdoc', 'sdon', 'sio4', 'talk', 'tco2', \
	       'zz1', 'zz2', 'zzc1', 'zzc2']
print 'Number of variables', len(src_varname)
irange = None
jrange = None

# Need to pick up ubar/vbar and uice/vice later

# Change src_filename to your directory for the file's containing variable data
src_filename = '/archive/u1/uaf/kate/COSINE/data/day_000.nc'
wts_file = "./remap_weights_PP_COSINE_to_NWGOA3_bilinear_*"
src_grd = pyroms.grid.get_ROMS_grid('PP_COSINE')
dst_grd = pyroms.grid.get_ROMS_grid('NWGOA3')
# Outfile is a parameter to allow you to place these created remap files in a different
# directory than the one that is default which is where the file came from.
dst_var = pyroms_toolbox.remapping(src_varname, src_filename,\
                wts_file,src_grd,dst_grd,rotate_uv=True)
Beispiel #12
0
src_varname = ['zeta','aice','hice','tisrf','snow_thick', \
               'ageice','ti','t0mk','s0mk', 'temp','salt','u_eastward','v_northward']
irange = (370, 580)
jrange = (460, 580)
#irange = None
#jrange = None

# Need to pick up ubar/vbar and uice/vice later

# Change src_filename to your directory for the file's containing variable data
src_filename = '/archive/u1/uaf/kate/Arctic2/run46/averages/arctic2_avg_1998-01-06T00:00:00.nc'
#src_filename = '/archive/u1/uaf/kate/Arctic2/run24/averages/arctic2_avg_1992-12-31T00:00:00.nc'
wts_file = "./remap_weights_ARCTIC2_to_BEAUFORT2_bilinear_*"
src_grd = pyroms.grid.get_ROMS_grid('ARCTIC2')
dst_grd = pyroms.grid.get_ROMS_grid('BEAUFORT2')
# Outfile is a parameter to allow you to place these created remap files in a different
# directory than the one that is default which is where the file came from.
dst_var = pyroms_toolbox.remapping(src_varname, src_filename, wts_file, \
                src_grd, dst_grd, rotate_uv=True, irange=irange, jrange=jrange, \
                uvar='u_eastward', vvar='v_northward', rotate_part=True)
#dst_var = pyroms_toolbox.remapping(['uice','vice'], src_filename, \
#                wts_file, src_grd, dst_grd, rotate_uv=True, \
#                irange=irange, jrange=jrange, uvar='uice', vvar='vice')
dst_var = pyroms_toolbox.remapping(['uice_eastward','vice_northward'], src_filename, \
                wts_file, src_grd, dst_grd, rotate_uv=True, \
                irange=irange, jrange=jrange, \
                uvar='uice_eastward', vvar='vice_northward', rotate_part=True)
dst_var = pyroms_toolbox.remapping_tensor(['sig11','sig22','sig12'], src_filename, \
                wts_file, src_grd, dst_grd, rotate_sig=True, \
                irange=irange, jrange=jrange, shapiro=False)