Exemplo n.º 1
0
slopes = ImgData(os.path.join(folder,'big_spider_slopes.tif'))
aspects = ImgData(os.path.join(folder,'big_spider_aspects.tif'))
spider1 = ImgData(os.path.join(folder,'ESP_022607_0985_cropped_big_spider.cub'))
# spider2 = ImgData(os.path.join(folder,'ESP_022699_0985_cropped_big_spider.cub'))

# read in required data
dem.read_all()
slopes.read_all()
aspects.read_all()
spider1.read_all()

correct_azimuth(dem, aspects)

# create MarsSpicer object
mspice = MarsSpicer()
mspice.goto_ls_0()
mspice.advance_time_by(24*3600*356)
utc = mspice.utc

# seconds per step
timestep = 600
# how many steps for the time series
nsteps = 500

mspice.goto('inca')

# getting l_s times
times, _ = mspice.time_series('F_aspect',timestep, nsteps, provide_times='l_s')

insol = np.zeros_like(dem.data)
Exemplo n.º 2
0
            to_append = mspicer.solar_constant * dt.seconds * math.cos(diff_angle)
        energies.append(to_append)
        mspicer.time += dt
    return np.array((ets, energies))
  
def save_data_to_file(data, fname, start, dt):
    with open(fname,'w') as f:
        f.write('# Start: {1}, dt: {0} s, Intensities in J/(dt*m**2)\n'.format(dt.seconds,start.isoformat()))
        np.savetxt(f, data.T)
        
# location setup
mspicer = MarsSpicer()
mspicer.set_spoint_by(lat=85,lon=0)

# timing setup
mspicer.goto_ls_0()
mspicer.time -= dt.timedelta(days=10,hours=12)

# dt, the time step
my_dt = dt.timedelta(hours=1)

# saving for restart later
start_time = mspicer.time
    
out_flat = create_arrays(mspicer, 50, my_dt)
save_data_to_file(out_flat[1], 'insolation_flat.txt', start_time, my_dt)

mspicer.get_tilted_normal(30)
mspicer.rotate_tnormal(180)

mspicer.time = start_time