|
64 | 64 | end |
65 | 65 |
|
66 | 66 | @testset "Reading Zarr" begin |
67 | | -p = "https://s3.bgc-jena.mpg.de:9000/esdl-esdc-v3.0.2/esdc-16d-2.5deg-46x72x1440-3.0.2.zarr" |
68 | | -z = zopen(p) |
69 | | -ds_zopen = to_dataset(z) |
70 | | -ds_zarr = to_dataset(p,driver=:zarr) |
71 | | -@test ds_zopen == ds_zarr |
72 | | -vn = get_varnames(ds_zarr) |
73 | | -@test sort(vn) == ["aerosol_optical_thickness_550", "air_temperature_2m", "bare_soil_evaporation", "burnt_area", "cot", "cth", "ctt", "evaporation", "evaporation_era5", "evaporative_stress", "gross_primary_productivity", "interception_loss", "kndvi", "lat", "latent_energy", "lon", "max_air_temperature_2m", "min_air_temperature_2m", "nbar_blue", "nbar_green", "nbar_nir", "nbar_red", "nbar_swir1", "nbar_swir2", "nbar_swir3", "ndvi", "net_ecosystem_exchange", "net_radiation", "nirv", "open_water_evaporation", "potential_evaporation", "precipitation_era5", "radiation_era5", "root_moisture", "sensible_heat", "sif_gome2_jj", "sif_gome2_pk", "sif_gosif", "sif_rtsif", "sm", "snow_sublimation", "surface_moisture", "terrestrial_ecosystem_respiration", "time", "transpiration"] |
74 | | -@test get_var_dims(ds_zarr, "sm") == ["lon", "lat", "time"] |
75 | | -@test get_var_dims(ds_zarr, "time") == ["time"] |
76 | | -@test get_var_attrs(ds_zarr,"sm")["long_name"] == "Volumetric Soil Moisture" |
77 | | -h = get_var_handle(ds_zarr, "air_temperature_2m") |
78 | | -@test YAXArrayBase.iscompressed(h) |
79 | | -@test all(isapprox.(h[1:2,1:2,1], [-28.8662 -23.4534; -28.8041 -23.1681])) |
80 | | -@test allow_parallel_write(ds_zarr) == true |
81 | | -@test allow_missings(ds_zarr) == false |
| 67 | + p = "https://s3.bgc-jena.mpg.de:9000/esdl-esdc-v3.0.2/esdc-16d-2.5deg-46x72x1440-3.0.2.zarr" |
| 68 | + for ds_zarr in [to_dataset(p,driver=:zarr), to_dataset(zopen(p))] |
| 69 | + vn = get_varnames(ds_zarr) |
| 70 | + @test sort(vn) == ["aerosol_optical_thickness_550", "air_temperature_2m", "bare_soil_evaporation", "burnt_area", "cot", "cth", "ctt", "evaporation", "evaporation_era5", "evaporative_stress", "gross_primary_productivity", "interception_loss", "kndvi", "lat", "latent_energy", "lon", "max_air_temperature_2m", "min_air_temperature_2m", "nbar_blue", "nbar_green", "nbar_nir", "nbar_red", "nbar_swir1", "nbar_swir2", "nbar_swir3", "ndvi", "net_ecosystem_exchange", "net_radiation", "nirv", "open_water_evaporation", "potential_evaporation", "precipitation_era5", "radiation_era5", "root_moisture", "sensible_heat", "sif_gome2_jj", "sif_gome2_pk", "sif_gosif", "sif_rtsif", "sm", "snow_sublimation", "surface_moisture", "terrestrial_ecosystem_respiration", "time", "transpiration"] |
| 71 | + @test get_var_dims(ds_zarr, "sm") == ["lon", "lat", "time"] |
| 72 | + @test get_var_dims(ds_zarr, "time") == ["time"] |
| 73 | + @test get_var_attrs(ds_zarr,"sm")["long_name"] == "Volumetric Soil Moisture" |
| 74 | + h = get_var_handle(ds_zarr, "air_temperature_2m") |
| 75 | + @test YAXArrayBase.iscompressed(h) |
| 76 | + @test all(isapprox.(h[1:2,1:2,1], [-28.8662 -23.4534; -28.8041 -23.1681])) |
| 77 | + @test allow_parallel_write(ds_zarr) == true |
| 78 | + @test allow_missings(ds_zarr) == false |
| 79 | + end |
82 | 80 | end |
83 | 81 | @testset "Reading ArchGDAL" begin |
84 | 82 | using ArchGDAL |
|
0 commit comments