Exemplo n.º 1
0
arctic_dem = Layer(
    id='arctic_dem',
    title='Arctic DEM (100m)',
    description='Surface elevation in meters using hillshade symbology.',
    in_package=False,
    tags=[],
    style='arctic_dem',
    input=LayerInput(
        dataset=dataset,
        asset=dataset.assets['100m'],
    ),
    steps=[
        *warp(
            input_file='{input_dir}/arcticdem_mosaic_100m_v3.0.tif',
            output_file='{output_dir}/arctic_dem.tif',
            cut_file=project.boundaries['data'].filepath,
        ),
        CommandStep(args=[
            'gdal_calc.py',
            '--calc',
            '"A * 100.0"',
            '--NoDataValue',
            '-9999',
            '--type',
            'Int32',
            '-A',
            '{input_dir}/arctic_dem.tif',
            '--outfile',
            '{output_dir}/arctic_dem_scaled.tif',
        ], ),
Exemplo n.º 2
0
            """Fraction of a grid cell covered by ice (grounded or floating) in
            the year 3007. Values less than or equal to 16% are masked."""),
        tags=[],
        style='future_ice_sheet_coverage',
        input=LayerInput(
            dataset=dataset,
            asset=dataset.assets[f'rcp_{rcp}'],
        ),
        steps=[
            *warp(
                input_file=(
                    'NETCDF:{input_dir}/'
                    f'percent_gris_g1800m_v3a_rcp_{rcp}_0_1000.nc:sftgif'),
                output_file='{output_dir}/extracted.tif',
                warp_args=(
                    '-srcnodata',
                    '0',
                    '-tr',
                    '1800',
                    '1800',
                ),
                cut_file=project.boundaries['data'].filepath,
            ),
            *compress_and_add_overviews(
                input_file='{input_dir}/extracted.tif',
                output_file='{output_dir}/final.tif',
                dtype_is_float=True,
            ),
        ],
    ) for rcp in LAYER_RCPS
]
Exemplo n.º 3
0
    tags=[],
    style=bathymetric_raster_params['style'],
    input=LayerInput(
        dataset=bathymetric_raster_params['dataset'],
        asset=dataset.assets['only'],
    ),
    steps=[
        *warp(
            input_file='NETCDF:{input_dir}/IBCAO_v4_400m_ice.nc:z',
            output_file='{output_dir}/bathymetric_chart.tif',
            warp_args=(
                '-s_srs', '"+proj=stere +lat_0=90 +lat_ts=75 +datum=WGS84"',
                '-dstnodata', '-9999',
                '-tr', '400', '400',
                # This dataset does not contain CF-compliant fields or
                # geotransform array. Set
                # `GDAL_NETCDF_IGNORE_XY_AXIS_NAME_CHECKS` to `true` to use
                # the provided `x` and `y` dims as coordinate values so that
                # gdal can compute the transform on its own. See
                # https://github.com/OSGeo/gdal/issues/4075
                '--config', 'GDAL_NETCDF_IGNORE_XY_AXIS_NAME_CHECKS', 'true',
            ),
            cut_file=project.boundaries['background'].filepath,
        ),
        *compress_and_add_overviews(
            input_file='{input_dir}/bathymetric_chart.tif',
            output_file='{output_dir}/bathymetric_chart.tif',
            dtype_is_float=True,
        ),
    ],
)
Exemplo n.º 4
0
    id='vegetation_biomass_2010',
    title='Vegetation biomass 2010 (12.4km)',
    description=(
        """Estimated above ground plant biomass for the tundra biome in
        kilograms per square meter. Based on trans-Arctic field data and AVHRR
        NDVI. Data provided by ORNL DAAC."""),
    tags=[],
    style='vegetation_biomass',
    input=LayerInput(
        dataset=dataset,
        asset=dataset.assets['only'],
    ),
    steps=[
        *warp(
            input_file='{input_dir}/aga_circumpolar_avhrr_biomass_2010.tif',
            output_file='{output_dir}/warped.tif',
            cut_file=project.boundaries['data'].filepath,
            warp_args=(
                '-tr',
                '12400',
                '12400',
            ),
        ),
        *compress_and_add_overviews(
            input_file='{input_dir}/warped.tif',
            output_file='{output_dir}/compressed.tif',
            dtype_is_float=True,
        ),
    ],
)
Exemplo n.º 5
0
ice_thickness_change = Layer(
    id='ice_thickness_change',
    title='Ice column thickness rate of change 2003-2019 (5km)',
    description=(
        """Ice column thickness-change-rate estimates in meters per year based
        on data from NASA's ICESat and ICESat-2 satellites."""
    ),
    tags=[],
    style='ice_thickness_change',
    input=LayerInput(
        dataset=dataset,
        asset=dataset.assets['only'],
    ),
    steps=[
        decompress_step(
            input_file='{input_dir}/ICESat1_ICESat2_mass_change.zip',
            decompress_contents_mask=SOURCE_FP,
        ),
        *warp(
            input_file='{input_dir}/' + SOURCE_FP,
            output_file='{output_dir}/warped.tif',
            cut_file=project.boundaries['data'].filepath,
        ),
        *compress_and_add_overviews(
            input_file='{input_dir}/warped.tif',
            output_file='{output_dir}/final.tif',
            dtype_is_float=True,
        ),
    ],
)
Exemplo n.º 6
0
from qgreenland.models.config.layer import Layer, LayerInput

nc_dataset = 'GHF'

geothermal_heat_flux = Layer(
    id='geothermal_heat_flux',
    title='Flux from ice cores (Greve, R.) (5km)',
    description=(
        """Geothermal heat flux interpolated from ice core measurements in
        miliwatts per square meter."""),
    tags=[],
    style='geothermal_heat_flux',
    input=LayerInput(
        dataset=dataset,
        asset=dataset.assets['only'],
    ),
    steps=[
        *warp(
            input_file='NETCDF:{input_dir}/' +
            f'GHF_Greenland_Ver2.0_GridEPSG3413_05km.nc:{nc_dataset}',
            output_file='{output_dir}/warped.tif',
            cut_file=project.boundaries['data'].filepath,
        ),
        *compress_and_add_overviews(
            input_file='{input_dir}/warped.tif',
            output_file='{output_dir}/final.tif',
            dtype_is_float=True,
        ),
    ],
)