using Rasters, RasterDataSources, ArchGDAL, NaturalEarth, DataFrames
bio = RasterStack(WorldClim{BioClim}, (1,12))
countries = naturalearth("ne_10m_admin_0_countries") |> DataFrame
australia = subset(countries, :NAME => ByRow(==("Australia"))).geometry
bio_aus = Rasters.trim(mask(bio; with = australia)[X = 110 .. 156, Y = -45 .. -10])
╭─────────────────────╮
│ 244×198 RasterStack │
├─────────────────────┴────────────────────────────────────────────────── dims ┐
↓ X Projected{Float64} LinRange{Float64}(113.00000000000001, 153.49999999999997, 244) ForwardOrdered Regular Intervals{Start},
→ Y Projected{Float64} LinRange{Float64}(-10.833333333333337, -43.666666666666664, 198) ReverseOrdered Regular Intervals{Start}
├────────────────────────────────────────────────────────────────────── layers ┤
:bio1 eltype: Float32 dims: X, Y size: 244×198
:bio12 eltype: Float32 dims: X, Y size: 244×198
├────────────────────────────────────────────────────────────────────── raster ┤
extent: Extent(X = (113.00000000000001, 153.66666666666663), Y = (-43.666666666666664, -10.666666666666671))
missingval: -3.4f38
crs: GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]
└──────────────────────────────────────────────────────────────────────────────┘