def initialize_pop(self):
        p=POP(redirection="file", number_of_workers=8,redirect_stdout_file="pop.out")

        cwd=os.getcwd()
        p.change_directory(cwd)
        
        popdatadir="/home/inti/code/amuse/trunk/sandbox/pelupes/pop/"

        #set the grid we want to use
        p.set_horiz_grid_file(popdatadir+'data/input/grid/horiz_grid_20010402.ieeer8')
        p.set_vert_grid_file(popdatadir+'data/input/grid/in_depths.dat')
        p.set_topography_file(popdatadir+'data/input/grid/topography_20010702.ieeei4')
        
        #set the restart file
        p.set_ts_file(popdatadir+'data/input/restart/r.x1_SAMOC_control.00750101')
        
        #setup the forcing
        p.set_shf_monthly_file(popdatadir+'data/input/shf_monthly/shf.normal_year+flux.mon')
        p.set_sfwf_monthly_file(popdatadir+'data/input/sfwf/sfwf_phc0-50_ncarp_r46_flux.mon')
        p.set_ws_monthly_file(popdatadir+'data/input/ws_monthly/ws.1958-2000.mon')
        
        self.pop_grid=p.get_grid()        
        self.pop_forcings_grid=StaggeredGrid(p.elements, p.forcings, p._compute_cell_corners)
        self.pop=p
        
        self.timestep=self.timestep or self.pop.timestep/2
def init_pop_highres():

    #machine settings
    popdatadir = '/var/scratch/bwn200/pop/input/'
    username = '******'

    # distribution files have been provided for the following settings:
    # 16 cores: [19, 23, 28, 37, 56] nodes
    # 24 cores: [15, 19, 25, 37] nodes
    # if you want a different number of cores and/or nodes generate
    # a distribution file yourself using: github.com/nlesc/esalsa-tools
    num_nodes = 37
    num_cores = 16
    num_workers = num_nodes * num_cores

    distributed_amuse = init_das5_only(username, num_nodes, num_cores)
    distributed_amuse.use_for_all_workers()

    p = POP(channel_type="distributed",
            redirection="none",
            mode='3600x2400x42',
            number_of_workers=num_workers,
            max_message_length=1000000)
    p.change_directory(os.getcwd())

    #setup distribution file
    p.parameters.distribution_file = 'distribution_files/dist-60x60-' + str(
        num_nodes) + '-' + str(num_cores)

    #set grid info
    p.set_horiz_grid_file(popdatadir + 'grid/grid.3600x2400.fob.da')
    p.set_vert_grid_file(popdatadir + 'grid/in_depths.42.dat')
    p.set_topography_file(
        popdatadir +
        'grid/kmt_pbc.p1_tripole.s2.0-og.20060315.no_caspian_or_black')
    p.set_bottom_cell_file(
        popdatadir +
        'grid/dzbc_pbc.p1_tripole.s2.0-og.20060315.no_caspian_or_black')
    p.set_ts_file(popdatadir + 'r.t0.1_42l_greenland.01150501')

    #setup forcing files
    p.set_shf_monthly_file(popdatadir + 'forcing/shf.NY+H+f.mon')
    p.set_sfwf_monthly_file(popdatadir + 'forcing/sfwf.C+r+g8+f.mon')
    p.set_ws_monthly_file(popdatadir + 'forcing/ws.o_n_avg.mon')

    return p
Exemple #3
0
pilot.node_count = 50
pilot.time = 1 | units.hour
pilot.slots_per_node = 12
pilot.label = "CartesiusNode"

instance.pilots.add_pilot(pilot)

instance.use_for_all_workers()

from omuse.community.pop.interface import POP
p = POP(channel_type="distributed", redirection="none", number_of_workers=600)
p.change_directory('/home/ben/amuse/amuse-svn/src/omuse/community/pop/')
p.set_namelist_filename('pop_in_highres')

p.set_horiz_grid_file('/home/ben/pop/input/grid/grid.3600x2400.fob.da')
p.set_vert_grid_file('/home/ben/pop/input/grid/in_depths.42.dat')
p.set_topography_file(
    '/home/ben/pop/input/grid/kmt_pbc.p1_tripole.s2.0-og.20060315.no_caspian_or_black'
)
p.set_bottom_cell_file(
    '/home/ben/pop/input/grid/dzbc_pbc.p1_tripole.s2.0-og.20060315.no_caspian_or_black'
)
p.set_ts_file('/home/ben/pop/input/r.t0.1_42l_greenland.01150501')

p.set_monthly_shf_file('/home/ben/pop/input/forcing/shf.NY+H+f.mon')
p.set_monthly_sfwf_file('/home/ben/pop/input/forcing/sfwf.C+r+g8+f.mon')
p.set_monthly_ws_file('/home/ben/pop/input/forcing/ws.o_n_avg.mon')

#raw_input()

#prepare the plot stuff
Exemple #4
0
pilot.node_count=1
pilot.time= 1|units.hour
pilot.slots_per_node=24
pilot.label="CartesiusNode" 

instance.pilots.add_pilot(pilot)

instance.use_for_all_workers()


from omuse.community.pop.interface import POP
p=POP(channel_type="distributed", redirection="none", number_of_workers=24)
p.change_directory('/home/ben/amuse/amuse-svn/src/omuse/community/pop/')

p.set_horiz_grid_file('data/input/grid/horiz_grid_20010402.ieeer8')
p.set_vert_grid_file('data/input/grid/in_depths.dat')
p.set_topography_file('data/input/grid/topography_20010702.ieeei4')
p.set_ts_file('data/input/restart/r.x1_SAMOC_control.00750101')

p.set_monthly_shf_file('data/input/shf_monthly/shf.normal_year+flux.mon')
p.set_monthly_sfwf_file('data/input/sfwf/sfwf_phc0-50_ncarp_r46+g8_0.5Sv_flux.mon')
p.set_monthly_ws_file('data/input/ws_monthly/ws.1958-2000.mon')


#raw_input()


#prepare the plot stuff
pyplot.ion()
#lats,lons = get_lats_lons(p)
#xs,ys = get_xy()
pilot.queue_name="defq" 
pilot.node_count=56
pilot.time= 24|units.hour
pilot.slots_per_node=16
pilot.label="DAS-5-Pilot"

instance.pilots.add_pilot(pilot)
instance.use_for_all_workers()


from omuse.community.pop.interface import POP
p=POP(channel_type="distributed", redirection="none", mode='3600x2400x42', number_of_workers=896, max_message_length=1000000)

#set grid info
p.set_horiz_grid_file('/var/scratch/bwn200/pop/input/grid/grid.3600x2400.fob.da')
p.set_vert_grid_file('/var/scratch/bwn200/pop/input/grid/in_depths.42.dat')
p.set_topography_file('/var/scratch/bwn200/pop/input/grid/kmt_pbc.p1_tripole.s2.0-og.20060315.no_caspian_or_black')
p.set_bottom_cell_file('/var/scratch/bwn200/pop/input/grid/dzbc_pbc.p1_tripole.s2.0-og.20060315.no_caspian_or_black')
p.set_ts_file('/var/scratch/bwn200/pop/input/r.t0.1_42l_greenland.01150501')

#setup forcing files
p.set_shf_monthly_file('/var/scratch/bwn200/pop/input/forcing/shf.NY+H+f.mon')
p.set_sfwf_monthly_file('/var/scratch/bwn200/pop/input/forcing/sfwf.C+r+g8+f.mon')
p.set_ws_monthly_file('/var/scratch/bwn200/pop/input/forcing/ws.o_n_avg.mon')

#setup output files
#p.set_tavg_option('nday')
#p.set_tavg_freq_option(1)
#p.set_tavg_file('/var/scratch/bwn200/pop/output/tavg/t')