roms-tools 1.6.0__py3-none-any.whl → 1.6.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- roms_tools/__init__.py +4 -1
- roms_tools/_version.py +1 -1
- roms_tools/setup/boundary_forcing.py +155 -52
- roms_tools/setup/datasets.py +5 -5
- roms_tools/setup/grid.py +9 -11
- roms_tools/setup/initial_conditions.py +82 -25
- roms_tools/setup/plot.py +68 -10
- roms_tools/setup/surface_forcing.py +60 -42
- roms_tools/setup/tides.py +35 -13
- roms_tools/setup/utils.py +15 -6
- roms_tools/tests/test_setup/test_boundary_forcing.py +140 -18
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/.zmetadata +0 -7
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/abs_time/.zattrs +0 -3
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_east/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_south/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_west/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_east/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_north/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_south/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_west/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_east/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_north/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_south/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_west/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_east/.zattrs +0 -1
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_east/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_north/.zattrs +0 -1
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_south/.zattrs +0 -1
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_south/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_west/.zattrs +0 -1
- roms_tools/tests/test_setup/test_datasets.py +8 -3
- roms_tools/tests/test_setup/test_grid.py +6 -5
- roms_tools/tests/test_setup/test_initial_conditions.py +8 -4
- roms_tools/tests/test_setup/test_surface_forcing.py +47 -27
- roms_tools/tests/test_setup/test_tides.py +6 -4
- {roms_tools-1.6.0.dist-info → roms_tools-1.6.2.dist-info}/METADATA +2 -1
- {roms_tools-1.6.0.dist-info → roms_tools-1.6.2.dist-info}/RECORD +159 -159
- {roms_tools-1.6.0.dist-info → roms_tools-1.6.2.dist-info}/LICENSE +0 -0
- {roms_tools-1.6.0.dist-info → roms_tools-1.6.2.dist-info}/WHEEL +0 -0
- {roms_tools-1.6.0.dist-info → roms_tools-1.6.2.dist-info}/top_level.txt +0 -0
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_north/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_south/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_west/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_east/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_north/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_south/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_west/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_east/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_north/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_south/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_west/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_east/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_north/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_south/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_west/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_east/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_north/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_south/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_west/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_east/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_north/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_south/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_west/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_east/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_north/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_south/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_west/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_east/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_north/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_south/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_west/0.0.0
CHANGED
|
Binary file
|
|
@@ -38,10 +38,7 @@
|
|
|
38
38
|
"_ARRAY_DIMENSIONS": [
|
|
39
39
|
"bry_time"
|
|
40
40
|
],
|
|
41
|
-
"axis": "T",
|
|
42
41
|
"calendar": "gregorian",
|
|
43
|
-
"long_name": "Time",
|
|
44
|
-
"standard_name": "time",
|
|
45
42
|
"units": "seconds since 1970-01-01"
|
|
46
43
|
},
|
|
47
44
|
"bry_time/.zarray": {
|
|
@@ -892,7 +889,6 @@
|
|
|
892
889
|
],
|
|
893
890
|
"coordinates": "abs_time",
|
|
894
891
|
"long_name": "eastern boundary sea surface height",
|
|
895
|
-
"standard_name": "sea_surface_height_above_geoid",
|
|
896
892
|
"units": "m"
|
|
897
893
|
},
|
|
898
894
|
"zeta_north/.zarray": {
|
|
@@ -924,7 +920,6 @@
|
|
|
924
920
|
],
|
|
925
921
|
"coordinates": "abs_time",
|
|
926
922
|
"long_name": "northern boundary sea surface height",
|
|
927
|
-
"standard_name": "sea_surface_height_above_geoid",
|
|
928
923
|
"units": "m"
|
|
929
924
|
},
|
|
930
925
|
"zeta_south/.zarray": {
|
|
@@ -956,7 +951,6 @@
|
|
|
956
951
|
],
|
|
957
952
|
"coordinates": "abs_time",
|
|
958
953
|
"long_name": "southern boundary sea surface height",
|
|
959
|
-
"standard_name": "sea_surface_height_above_geoid",
|
|
960
954
|
"units": "m"
|
|
961
955
|
},
|
|
962
956
|
"zeta_west/.zarray": {
|
|
@@ -988,7 +982,6 @@
|
|
|
988
982
|
],
|
|
989
983
|
"coordinates": "abs_time",
|
|
990
984
|
"long_name": "western boundary sea surface height",
|
|
991
|
-
"standard_name": "sea_surface_height_above_geoid",
|
|
992
985
|
"units": "m"
|
|
993
986
|
}
|
|
994
987
|
},
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import pytest
|
|
2
|
+
import logging
|
|
2
3
|
from datetime import datetime
|
|
3
4
|
import numpy as np
|
|
4
5
|
import xarray as xr
|
|
@@ -229,12 +230,12 @@ def test_multiple_matching_times(
|
|
|
229
230
|
assert dataset.ds["time"].values == np.datetime64(datetime(2022, 2, 1, 0, 0))
|
|
230
231
|
|
|
231
232
|
|
|
232
|
-
def test_warnings_times(global_dataset, tmp_path, use_dask):
|
|
233
|
+
def test_warnings_times(global_dataset, tmp_path, caplog, use_dask):
|
|
233
234
|
"""Test handling when no matching times are found."""
|
|
234
235
|
# Create a temporary file
|
|
235
236
|
filepath = tmp_path / "test.nc"
|
|
236
237
|
global_dataset.to_netcdf(filepath)
|
|
237
|
-
with
|
|
238
|
+
with caplog.at_level(logging.WARNING):
|
|
238
239
|
start_time = datetime(2021, 1, 1)
|
|
239
240
|
end_time = datetime(2021, 2, 1)
|
|
240
241
|
|
|
@@ -245,8 +246,10 @@ def test_warnings_times(global_dataset, tmp_path, use_dask):
|
|
|
245
246
|
end_time=end_time,
|
|
246
247
|
use_dask=use_dask,
|
|
247
248
|
)
|
|
249
|
+
# Verify the warning message in the log
|
|
250
|
+
assert "No records found at or before the start_time." in caplog.text
|
|
248
251
|
|
|
249
|
-
with
|
|
252
|
+
with caplog.at_level(logging.WARNING):
|
|
250
253
|
start_time = datetime(2024, 1, 1)
|
|
251
254
|
end_time = datetime(2024, 2, 1)
|
|
252
255
|
|
|
@@ -257,6 +260,8 @@ def test_warnings_times(global_dataset, tmp_path, use_dask):
|
|
|
257
260
|
end_time=end_time,
|
|
258
261
|
use_dask=use_dask,
|
|
259
262
|
)
|
|
263
|
+
# Verify the warning message in the log
|
|
264
|
+
assert "No records found at or after the end_time." in caplog.text
|
|
260
265
|
|
|
261
266
|
|
|
262
267
|
def test_from_ds(global_dataset, global_dataset_with_noon_times, use_dask, tmp_path):
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import pytest
|
|
2
|
+
import logging
|
|
2
3
|
import xarray as xr
|
|
3
4
|
from roms_tools import Grid
|
|
4
5
|
import importlib.metadata
|
|
@@ -390,7 +391,7 @@ def test_from_yaml_missing_grid(tmp_path):
|
|
|
390
391
|
yaml_filepath.unlink()
|
|
391
392
|
|
|
392
393
|
|
|
393
|
-
def test_from_yaml_version_mismatch(tmp_path):
|
|
394
|
+
def test_from_yaml_version_mismatch(tmp_path, caplog):
|
|
394
395
|
yaml_content = textwrap.dedent(
|
|
395
396
|
"""\
|
|
396
397
|
---
|
|
@@ -423,11 +424,11 @@ def test_from_yaml_version_mismatch(tmp_path):
|
|
|
423
424
|
with open(yaml_filepath, "w") as f:
|
|
424
425
|
f.write(yaml_content)
|
|
425
426
|
|
|
426
|
-
with
|
|
427
|
-
UserWarning,
|
|
428
|
-
match="Current roms-tools version.*does not match the version in the YAML header.*",
|
|
429
|
-
):
|
|
427
|
+
with caplog.at_level(logging.WARNING):
|
|
430
428
|
Grid.from_yaml(yaml_filepath)
|
|
431
429
|
|
|
430
|
+
# Verify the warning message in the log
|
|
431
|
+
assert "Current roms-tools version" in caplog.text
|
|
432
|
+
|
|
432
433
|
yaml_filepath = Path(yaml_filepath)
|
|
433
434
|
yaml_filepath.unlink()
|
|
@@ -176,10 +176,8 @@ def test_interpolation_from_climatology(
|
|
|
176
176
|
)
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
def
|
|
180
|
-
|
|
181
|
-
):
|
|
182
|
-
"""Test plot and save methods."""
|
|
179
|
+
def test_initial_conditions_plot(initial_conditions_with_bgc_from_climatology):
|
|
180
|
+
"""Test plot method."""
|
|
183
181
|
|
|
184
182
|
initial_conditions_with_bgc_from_climatology.plot(var_name="temp", s=0)
|
|
185
183
|
initial_conditions_with_bgc_from_climatology.plot(
|
|
@@ -213,6 +211,12 @@ def test_initial_conditions_plot_save(
|
|
|
213
211
|
initial_conditions_with_bgc_from_climatology.plot(var_name="ALK", s=0, xi=0)
|
|
214
212
|
initial_conditions_with_bgc_from_climatology.plot(var_name="ALK", eta=0, xi=0)
|
|
215
213
|
|
|
214
|
+
|
|
215
|
+
def test_initial_conditions_save(
|
|
216
|
+
initial_conditions_with_bgc_from_climatology, tmp_path
|
|
217
|
+
):
|
|
218
|
+
"""Test save method."""
|
|
219
|
+
|
|
216
220
|
for file_str in ["test_ic", "test_ic.nc"]:
|
|
217
221
|
# Create a temporary filepath using the tmp_path fixture
|
|
218
222
|
for filepath in [
|
|
@@ -187,12 +187,6 @@ def grid_that_straddles_180_degree_meridian():
|
|
|
187
187
|
def test_successful_initialization_with_regional_data(grid_fixture, request, use_dask):
|
|
188
188
|
"""Test the initialization of SurfaceForcing with regional ERA5 data.
|
|
189
189
|
|
|
190
|
-
This test checks the following:
|
|
191
|
-
1. SurfaceForcing object initializes successfully with provided regional data.
|
|
192
|
-
2. Attributes such as `start_time`, `end_time`, and `source` are set correctly.
|
|
193
|
-
3. The dataset contains expected variables, including "uwnd", "vwnd", "swrad", "lwrad", "Tair", "qair", and "rain".
|
|
194
|
-
4. Surface forcing plots for "uwnd", "vwnd", and "rain" are generated without errors.
|
|
195
|
-
|
|
196
190
|
The test is performed twice:
|
|
197
191
|
- First with the default fine grid.
|
|
198
192
|
- Then with the coarse grid enabled.
|
|
@@ -513,8 +507,8 @@ def test_surface_forcing_pco2_replication(sfc_forcing_fixture, request):
|
|
|
513
507
|
"coarse_surface_forcing",
|
|
514
508
|
],
|
|
515
509
|
)
|
|
516
|
-
def
|
|
517
|
-
"""Test
|
|
510
|
+
def test_surface_forcing_save(sfc_forcing_fixture, request, tmp_path):
|
|
511
|
+
"""Test save method."""
|
|
518
512
|
sfc_forcing = request.getfixturevalue(sfc_forcing_fixture)
|
|
519
513
|
sfc_forcing.plot(var_name="uwnd", time=0)
|
|
520
514
|
|
|
@@ -525,16 +519,24 @@ def test_surface_forcing_plot_save(sfc_forcing_fixture, request, tmp_path):
|
|
|
525
519
|
str(tmp_path / file_str),
|
|
526
520
|
]: # test for Path object and str
|
|
527
521
|
|
|
528
|
-
# Test saving without partitioning
|
|
522
|
+
# Test saving without partitioning and grouping
|
|
529
523
|
saved_filenames = sfc_forcing.save(filepath)
|
|
530
524
|
filepath_str = str(Path(filepath).with_suffix(""))
|
|
525
|
+
expected_filepath = Path(f"{filepath_str}.nc")
|
|
526
|
+
assert saved_filenames == [expected_filepath]
|
|
527
|
+
assert expected_filepath.exists()
|
|
528
|
+
expected_filepath.unlink()
|
|
529
|
+
|
|
530
|
+
# Test saving without partitioning but with grouping
|
|
531
|
+
saved_filenames = sfc_forcing.save(filepath, group=True)
|
|
532
|
+
filepath_str = str(Path(filepath).with_suffix(""))
|
|
531
533
|
expected_filepath = Path(f"{filepath_str}_202002.nc")
|
|
532
534
|
assert saved_filenames == [expected_filepath]
|
|
533
535
|
assert expected_filepath.exists()
|
|
534
536
|
expected_filepath.unlink()
|
|
535
537
|
|
|
536
538
|
# Test saving with partitioning
|
|
537
|
-
saved_filenames = sfc_forcing.save(filepath, np_eta=1)
|
|
539
|
+
saved_filenames = sfc_forcing.save(filepath, np_eta=1, group=True)
|
|
538
540
|
|
|
539
541
|
expected_filepath_list = [
|
|
540
542
|
Path(filepath_str + f"_202002.{index}.nc") for index in range(1)
|
|
@@ -545,12 +547,15 @@ def test_surface_forcing_plot_save(sfc_forcing_fixture, request, tmp_path):
|
|
|
545
547
|
expected_filepath.unlink()
|
|
546
548
|
|
|
547
549
|
|
|
548
|
-
def
|
|
549
|
-
"""Test plot
|
|
550
|
+
def test_surface_forcing_bgc_plot(bgc_surface_forcing):
|
|
551
|
+
"""Test plot method."""
|
|
550
552
|
|
|
551
|
-
# Check the values in the dataset
|
|
552
553
|
bgc_surface_forcing.plot(var_name="pco2_air", time=0)
|
|
553
554
|
|
|
555
|
+
|
|
556
|
+
def test_surface_forcing_bgc_save(bgc_surface_forcing, tmp_path):
|
|
557
|
+
"""Test save method."""
|
|
558
|
+
|
|
554
559
|
for file_str in ["test_sf", "test_sf.nc"]:
|
|
555
560
|
# Create a temporary filepath using the tmp_path fixture
|
|
556
561
|
for filepath in [
|
|
@@ -558,16 +563,24 @@ def test_surface_forcing_bgc_plot_save(bgc_surface_forcing, tmp_path):
|
|
|
558
563
|
str(tmp_path / file_str),
|
|
559
564
|
]: # test for Path object and str
|
|
560
565
|
|
|
561
|
-
# Test saving without partitioning
|
|
566
|
+
# Test saving without partitioning and grouping
|
|
562
567
|
saved_filenames = bgc_surface_forcing.save(filepath)
|
|
563
568
|
filepath_str = str(Path(filepath).with_suffix(""))
|
|
569
|
+
expected_filepath = Path(f"{filepath_str}.nc")
|
|
570
|
+
assert saved_filenames == [expected_filepath]
|
|
571
|
+
assert expected_filepath.exists()
|
|
572
|
+
expected_filepath.unlink()
|
|
573
|
+
|
|
574
|
+
# Test saving without partitioning but with grouping
|
|
575
|
+
saved_filenames = bgc_surface_forcing.save(filepath, group=True)
|
|
576
|
+
filepath_str = str(Path(filepath).with_suffix(""))
|
|
564
577
|
expected_filepath = Path(f"{filepath_str}_202002.nc")
|
|
565
578
|
assert saved_filenames == [expected_filepath]
|
|
566
579
|
assert expected_filepath.exists()
|
|
567
580
|
expected_filepath.unlink()
|
|
568
581
|
|
|
569
582
|
# Test saving with partitioning
|
|
570
|
-
saved_filenames = bgc_surface_forcing.save(filepath, np_xi=5)
|
|
583
|
+
saved_filenames = bgc_surface_forcing.save(filepath, np_xi=5, group=True)
|
|
571
584
|
|
|
572
585
|
expected_filepath_list = [
|
|
573
586
|
Path(filepath_str + f"_202002.{index}.nc") for index in range(5)
|
|
@@ -578,13 +591,10 @@ def test_surface_forcing_bgc_plot_save(bgc_surface_forcing, tmp_path):
|
|
|
578
591
|
expected_filepath.unlink()
|
|
579
592
|
|
|
580
593
|
|
|
581
|
-
def
|
|
594
|
+
def test_surface_forcing_bgc_from_clim_save(
|
|
582
595
|
bgc_surface_forcing_from_climatology, tmp_path
|
|
583
596
|
):
|
|
584
|
-
"""Test
|
|
585
|
-
|
|
586
|
-
# Check the values in the dataset
|
|
587
|
-
bgc_surface_forcing_from_climatology.plot(var_name="pco2_air", time=0)
|
|
597
|
+
"""Test save method."""
|
|
588
598
|
|
|
589
599
|
for file_str in ["test_sf", "test_sf.nc"]:
|
|
590
600
|
# Create a temporary filepath using the tmp_path fixture
|
|
@@ -593,17 +603,27 @@ def test_surface_forcing_bgc_from_clim_plot_save(
|
|
|
593
603
|
str(tmp_path / file_str),
|
|
594
604
|
]: # test for Path object and str
|
|
595
605
|
|
|
596
|
-
# Test saving without partitioning
|
|
606
|
+
# Test saving without partitioning and grouping
|
|
597
607
|
saved_filenames = bgc_surface_forcing_from_climatology.save(filepath)
|
|
598
608
|
filepath_str = str(Path(filepath).with_suffix(""))
|
|
609
|
+
expected_filepath = Path(f"{filepath_str}.nc")
|
|
610
|
+
assert saved_filenames == [expected_filepath]
|
|
611
|
+
assert expected_filepath.exists()
|
|
612
|
+
expected_filepath.unlink()
|
|
613
|
+
|
|
614
|
+
# Test saving without partitioning but with grouping
|
|
615
|
+
saved_filenames = bgc_surface_forcing_from_climatology.save(
|
|
616
|
+
filepath, group=True
|
|
617
|
+
)
|
|
618
|
+
filepath_str = str(Path(filepath).with_suffix(""))
|
|
599
619
|
expected_filepath = Path(f"{filepath_str}_clim.nc")
|
|
600
620
|
assert saved_filenames == [expected_filepath]
|
|
601
621
|
assert expected_filepath.exists()
|
|
602
622
|
expected_filepath.unlink()
|
|
603
623
|
|
|
604
|
-
# Test saving with partitioning
|
|
624
|
+
# Test saving with partitioning and grouping
|
|
605
625
|
saved_filenames = bgc_surface_forcing_from_climatology.save(
|
|
606
|
-
filepath, np_eta=5
|
|
626
|
+
filepath, np_eta=5, group=True
|
|
607
627
|
)
|
|
608
628
|
|
|
609
629
|
expected_filepath_list = [
|
|
@@ -666,9 +686,9 @@ def test_files_have_same_hash(sfc_forcing_fixture, request, tmp_path, use_dask):
|
|
|
666
686
|
filepath2 = tmp_path / "test2.nc"
|
|
667
687
|
|
|
668
688
|
sfc_forcing.to_yaml(yaml_filepath)
|
|
669
|
-
sfc_forcing.save(filepath1)
|
|
689
|
+
sfc_forcing.save(filepath1, group=True)
|
|
670
690
|
sfc_forcing_from_file = SurfaceForcing.from_yaml(yaml_filepath, use_dask=use_dask)
|
|
671
|
-
sfc_forcing_from_file.save(filepath2)
|
|
691
|
+
sfc_forcing_from_file.save(filepath2, group=True)
|
|
672
692
|
|
|
673
693
|
filepath_str1 = str(Path(filepath1).with_suffix(""))
|
|
674
694
|
filepath_str2 = str(Path(filepath2).with_suffix(""))
|
|
@@ -694,9 +714,9 @@ def test_files_have_same_hash_clim(
|
|
|
694
714
|
filepath2 = tmp_path / "test2.nc"
|
|
695
715
|
|
|
696
716
|
bgc_surface_forcing_from_climatology.to_yaml(yaml_filepath)
|
|
697
|
-
bgc_surface_forcing_from_climatology.save(filepath1)
|
|
717
|
+
bgc_surface_forcing_from_climatology.save(filepath1, group=True)
|
|
698
718
|
sfc_forcing_from_file = SurfaceForcing.from_yaml(yaml_filepath, use_dask=use_dask)
|
|
699
|
-
sfc_forcing_from_file.save(filepath2)
|
|
719
|
+
sfc_forcing_from_file.save(filepath2, group=True)
|
|
700
720
|
|
|
701
721
|
filepath_str1 = str(Path(filepath1).with_suffix(""))
|
|
702
722
|
filepath_str2 = str(Path(filepath2).with_suffix(""))
|
|
@@ -169,13 +169,15 @@ def test_insufficient_number_of_consituents(grid_that_straddles_dateline, use_da
|
|
|
169
169
|
)
|
|
170
170
|
|
|
171
171
|
|
|
172
|
-
def
|
|
173
|
-
"""Test plot
|
|
174
|
-
computed."""
|
|
175
|
-
tidal_forcing.ds.load()
|
|
172
|
+
def test_tidal_forcing_plot(tidal_forcing):
|
|
173
|
+
"""Test plot method."""
|
|
176
174
|
|
|
177
175
|
tidal_forcing.plot(var_name="ssh_Re", ntides=0)
|
|
178
176
|
|
|
177
|
+
|
|
178
|
+
def test_tidal_forcing_save(tidal_forcing, tmp_path):
|
|
179
|
+
"""Test save method."""
|
|
180
|
+
|
|
179
181
|
for file_str in ["test_tides", "test_tides.nc"]:
|
|
180
182
|
# Create a temporary filepath using the tmp_path fixture
|
|
181
183
|
for filepath in [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: roms-tools
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.2
|
|
4
4
|
Summary: Tools for running and analysing UCLA-ROMS simulations
|
|
5
5
|
Author-email: Nora Loose <nora.loose@gmail.com>, Thomas Nicholas <tom@cworthy.org>
|
|
6
6
|
License: Apache-2
|
|
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
19
|
Requires-Python: >=3.10
|
|
19
20
|
Description-Content-Type: text/markdown
|
|
20
21
|
License-File: LICENSE
|