コード例 #1
0
                                                                 levels=16)
    ax.set_title('Temperature')

    fig.tight_layout()


fields_to_store = [
    'air_temperature', 'air_pressure', 'eastward_wind', 'northward_wind',
    'air_pressure_on_interface_levels', 'surface_pressure',
    'upwelling_longwave_flux_in_air', 'specific_humidity',
    'surface_temperature', 'convective_heating_rate'
]
# Create plotting object
monitor = PlotFunctionMonitor(plot_function)
netcdf_monitor = NetCDFMonitor('gcm_without_seasonal_cycle.nc',
                               write_on_store=True,
                               store_names=fields_to_store)

climt.set_constants_from_dict(
    {'stellar_irradiance': {
        'value': 200,
        'units': 'W m^-2'
    }})

model_time_step = timedelta(seconds=600)
# Create components

convection = climt.EmanuelConvection()
simple_physics = TimeDifferencingWrapper(climt.SimplePhysics())

constant_duration = 6
コード例 #2
0
ファイル: test_netcdf_monitor.py プロジェクト: sunt05/sympl
def test_netcdf_monitor_initializes():
    assert not os.path.isfile('out.nc')
    NetCDFMonitor('out.nc')
    assert not os.path.isfile(
        'out.nc')  # should not create output file on init