roms-tools 1.5.0__py3-none-any.whl → 1.6.0__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/_version.py +1 -1
- roms_tools/setup/boundary_forcing.py +226 -85
- roms_tools/setup/datasets.py +169 -39
- roms_tools/setup/fill.py +0 -36
- roms_tools/setup/initial_conditions.py +90 -69
- roms_tools/setup/regrid.py +43 -98
- roms_tools/setup/surface_forcing.py +68 -67
- roms_tools/setup/tides.py +60 -45
- roms_tools/setup/utils.py +25 -53
- roms_tools/tests/test_setup/test_boundary_forcing.py +42 -32
- 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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/bgc_surface_forcing.zarr/.zattrs +1 -1
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/.zmetadata +1 -1
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/dust/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/iron/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/nhy/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/nox/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/pco2_air/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing.zarr/pco2_air_alt/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/.zattrs +1 -1
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/.zmetadata +1 -1
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/dust/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/iron/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/nhy/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/nox/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/pco2_air/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/pco2_air_alt/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/.zmetadata +7 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/abs_time/.zattrs +3 -0
- 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_north/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_north/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 +1 -0
- 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 +1 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_south/.zattrs +1 -0
- 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 +1 -0
- roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/.zattrs +1 -1
- roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/.zmetadata +1 -1
- roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/Tair/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/lwrad/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/qair/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/rain/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/swrad/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/uwnd/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/coarse_surface_forcing.zarr/vwnd/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/.zattrs +1 -1
- roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/.zmetadata +1 -1
- roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/Tair/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/lwrad/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/qair/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/rain/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/swrad/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/uwnd/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/corrected_surface_forcing.zarr/vwnd/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ALK/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ALK_ALT_CO2/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DIC/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DIC_ALT_CO2/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOC/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOCr/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DON/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DONr/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOP/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOPr/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/Fe/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/Lig/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/NH4/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/NO3/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/O2/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/PO4/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/SiO3/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatC/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatChl/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatFe/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatP/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatSi/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazC/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazChl/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazFe/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazP/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/salt/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spC/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spCaCO3/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spChl/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spFe/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spP/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/temp/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/u/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ubar/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/v/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/vbar/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/zeta/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/zooC/0.0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/surface_forcing.zarr/.zattrs +1 -1
- roms_tools/tests/test_setup/test_data/surface_forcing.zarr/.zmetadata +1 -1
- roms_tools/tests/test_setup/test_data/surface_forcing.zarr/Tair/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/surface_forcing.zarr/lwrad/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/surface_forcing.zarr/qair/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/surface_forcing.zarr/rain/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/surface_forcing.zarr/swrad/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/surface_forcing.zarr/uwnd/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/surface_forcing.zarr/vwnd/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/.zattrs +1 -1
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/.zmetadata +4 -2
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/omega/.zattrs +3 -1
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/pot_Im/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/pot_Re/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/ssh_Im/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/ssh_Re/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/u_Im/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/u_Re/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/v_Im/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/v_Re/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_datasets.py +79 -21
- roms_tools/tests/test_setup/test_fill.py +18 -105
- roms_tools/tests/test_setup/test_initial_conditions.py +21 -21
- roms_tools/tests/test_setup/test_regrid.py +2 -8
- roms_tools/tests/test_setup/test_surface_forcing.py +3 -3
- roms_tools/tests/test_setup/test_tides.py +1 -1
- {roms_tools-1.5.0.dist-info → roms_tools-1.6.0.dist-info}/METADATA +12 -3
- {roms_tools-1.5.0.dist-info → roms_tools-1.6.0.dist-info}/RECORD +238 -238
- {roms_tools-1.5.0.dist-info → roms_tools-1.6.0.dist-info}/WHEEL +1 -1
- {roms_tools-1.5.0.dist-info → roms_tools-1.6.0.dist-info}/LICENSE +0 -0
- {roms_tools-1.5.0.dist-info → roms_tools-1.6.0.dist-info}/top_level.txt +0 -0
|
@@ -1,110 +1,18 @@
|
|
|
1
1
|
import pytest
|
|
2
|
-
from roms_tools.setup.datasets import (
|
|
3
|
-
GLORYSDataset,
|
|
4
|
-
ERA5Dataset,
|
|
5
|
-
CESMBGCDataset,
|
|
6
|
-
CESMBGCSurfaceForcingDataset,
|
|
7
|
-
TPXODataset,
|
|
8
|
-
)
|
|
9
|
-
from roms_tools.setup.download import download_test_data
|
|
10
2
|
from roms_tools.setup.fill import LateralFill
|
|
11
|
-
from roms_tools.setup.utils import extrapolate_deepest_to_bottom
|
|
12
|
-
from datetime import datetime
|
|
13
3
|
import numpy as np
|
|
14
4
|
import xarray as xr
|
|
15
5
|
|
|
16
6
|
|
|
17
|
-
@pytest.fixture()
|
|
18
|
-
def era5_data(request, use_dask):
|
|
19
|
-
fname = download_test_data("ERA5_regional_test_data.nc")
|
|
20
|
-
data = ERA5Dataset(
|
|
21
|
-
filename=fname,
|
|
22
|
-
start_time=datetime(2020, 1, 31),
|
|
23
|
-
end_time=datetime(2020, 2, 2),
|
|
24
|
-
use_dask=use_dask,
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
return data
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@pytest.fixture()
|
|
31
|
-
def glorys_data(request, use_dask):
|
|
32
|
-
# the following GLORYS data has a wide enough domain
|
|
33
|
-
# to have different masks for tracers vs. velocities
|
|
34
|
-
fname = download_test_data("GLORYS_test_data.nc")
|
|
35
|
-
|
|
36
|
-
data = GLORYSDataset(
|
|
37
|
-
filename=fname,
|
|
38
|
-
start_time=datetime(2012, 1, 1),
|
|
39
|
-
end_time=datetime(2013, 1, 1),
|
|
40
|
-
use_dask=use_dask,
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
ds = data.ds.isel(depth=[0, 10, 30])
|
|
44
|
-
object.__setattr__(data, "ds", ds)
|
|
45
|
-
|
|
46
|
-
# extrapolate deepest value to bottom so all levels can use the same surface mask
|
|
47
|
-
for var in data.var_names:
|
|
48
|
-
if var != "zeta":
|
|
49
|
-
data.ds[data.var_names[var]] = extrapolate_deepest_to_bottom(
|
|
50
|
-
data.ds[data.var_names[var]], data.dim_names["depth"]
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
return data
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
@pytest.fixture()
|
|
57
|
-
def tpxo_data(request, use_dask):
|
|
58
|
-
fname = download_test_data("TPXO_regional_test_data.nc")
|
|
59
|
-
|
|
60
|
-
data = TPXODataset(
|
|
61
|
-
filename=fname,
|
|
62
|
-
use_dask=use_dask,
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
return data
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
@pytest.fixture()
|
|
69
|
-
def cesm_bgc_data(request, use_dask):
|
|
70
|
-
fname = download_test_data("CESM_BGC_2012.nc")
|
|
71
|
-
|
|
72
|
-
data = CESMBGCDataset(
|
|
73
|
-
filename=fname,
|
|
74
|
-
start_time=datetime(2012, 1, 1),
|
|
75
|
-
end_time=datetime(2013, 1, 1),
|
|
76
|
-
climatology=False,
|
|
77
|
-
use_dask=use_dask,
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
# extrapolate deepest value to bottom so all levels can use the same surface mask
|
|
81
|
-
for var in data.var_names:
|
|
82
|
-
data.ds[data.var_names[var]] = extrapolate_deepest_to_bottom(
|
|
83
|
-
data.ds[data.var_names[var]], data.dim_names["depth"]
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
return data
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
@pytest.fixture()
|
|
90
|
-
def cesm_surface_bgc_data(request, use_dask):
|
|
91
|
-
fname = download_test_data("CESM_BGC_SURFACE_2012.nc")
|
|
92
|
-
|
|
93
|
-
data = CESMBGCSurfaceForcingDataset(
|
|
94
|
-
filename=fname,
|
|
95
|
-
start_time=datetime(2012, 1, 1),
|
|
96
|
-
end_time=datetime(2013, 1, 1),
|
|
97
|
-
climatology=False,
|
|
98
|
-
use_dask=use_dask,
|
|
99
|
-
)
|
|
100
|
-
data.post_process()
|
|
101
|
-
|
|
102
|
-
return data
|
|
103
|
-
|
|
104
|
-
|
|
105
7
|
@pytest.mark.parametrize(
|
|
106
8
|
"data_fixture",
|
|
107
|
-
[
|
|
9
|
+
[
|
|
10
|
+
"era5_data",
|
|
11
|
+
"glorys_data",
|
|
12
|
+
"tpxo_data",
|
|
13
|
+
"coarsened_cesm_bgc_data",
|
|
14
|
+
"cesm_surface_bgc_data",
|
|
15
|
+
],
|
|
108
16
|
)
|
|
109
17
|
def test_lateral_fill_no_nans(data_fixture, request):
|
|
110
18
|
data = request.getfixturevalue(data_fixture)
|
|
@@ -128,18 +36,23 @@ def test_lateral_fill_no_nans(data_fixture, request):
|
|
|
128
36
|
assert not filled.isnull().any()
|
|
129
37
|
|
|
130
38
|
|
|
131
|
-
def test_lateral_fill_correct_order_of_magnitude(
|
|
39
|
+
def test_lateral_fill_correct_order_of_magnitude(coarsened_cesm_bgc_data):
|
|
132
40
|
|
|
133
41
|
lateral_fill = LateralFill(
|
|
134
|
-
|
|
135
|
-
[
|
|
42
|
+
coarsened_cesm_bgc_data.ds["mask"],
|
|
43
|
+
[
|
|
44
|
+
coarsened_cesm_bgc_data.dim_names["latitude"],
|
|
45
|
+
coarsened_cesm_bgc_data.dim_names["longitude"],
|
|
46
|
+
],
|
|
136
47
|
)
|
|
137
48
|
|
|
138
|
-
ALK =
|
|
49
|
+
ALK = coarsened_cesm_bgc_data.ds["ALK"]
|
|
139
50
|
|
|
140
51
|
# zero out alkalinity field in all depth levels but the uppermost
|
|
141
|
-
ALK = xr.where(
|
|
142
|
-
|
|
52
|
+
ALK = xr.where(
|
|
53
|
+
coarsened_cesm_bgc_data.ds.ALK.depth > 25, 0, coarsened_cesm_bgc_data.ds.ALK
|
|
54
|
+
)
|
|
55
|
+
ALK = ALK.where(coarsened_cesm_bgc_data.ds.mask)
|
|
143
56
|
|
|
144
57
|
filled = lateral_fill.apply(ALK.astype(np.float64))
|
|
145
58
|
|
|
@@ -181,37 +181,37 @@ def test_initial_conditions_plot_save(
|
|
|
181
181
|
):
|
|
182
182
|
"""Test plot and save methods."""
|
|
183
183
|
|
|
184
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
184
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="temp", s=0)
|
|
185
185
|
initial_conditions_with_bgc_from_climatology.plot(
|
|
186
|
-
|
|
186
|
+
var_name="temp", s=0, depth_contours=True
|
|
187
187
|
)
|
|
188
188
|
initial_conditions_with_bgc_from_climatology.plot(
|
|
189
|
-
|
|
189
|
+
var_name="temp", eta=0, layer_contours=True
|
|
190
190
|
)
|
|
191
191
|
initial_conditions_with_bgc_from_climatology.plot(
|
|
192
|
-
|
|
192
|
+
var_name="temp", xi=0, layer_contours=True
|
|
193
193
|
)
|
|
194
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
195
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
196
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
197
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
194
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="temp", eta=0)
|
|
195
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="temp", xi=0)
|
|
196
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="temp", s=0, xi=0)
|
|
197
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="temp", eta=0, xi=0)
|
|
198
198
|
initial_conditions_with_bgc_from_climatology.plot(
|
|
199
|
-
|
|
199
|
+
var_name="u", s=0, layer_contours=True
|
|
200
200
|
)
|
|
201
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
202
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
203
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
201
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="u", s=0)
|
|
202
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="u", eta=0)
|
|
203
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="u", xi=0)
|
|
204
204
|
initial_conditions_with_bgc_from_climatology.plot(
|
|
205
|
-
|
|
205
|
+
var_name="v", s=0, layer_contours=True
|
|
206
206
|
)
|
|
207
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
208
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
209
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
210
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
211
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
212
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
213
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
214
|
-
initial_conditions_with_bgc_from_climatology.plot(
|
|
207
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="v", s=0)
|
|
208
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="v", eta=0)
|
|
209
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="v", xi=0)
|
|
210
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="zeta")
|
|
211
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="ubar")
|
|
212
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="vbar")
|
|
213
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="ALK", s=0, xi=0)
|
|
214
|
+
initial_conditions_with_bgc_from_climatology.plot(var_name="ALK", eta=0, xi=0)
|
|
215
215
|
|
|
216
216
|
for file_str in ["test_ic", "test_ic.nc"]:
|
|
217
217
|
# Create a temporary filepath using the tmp_path fixture
|
|
@@ -18,16 +18,10 @@ def vertical_regridder(depth_values, layer_depth_rho_values):
|
|
|
18
18
|
def __init__(self, ds):
|
|
19
19
|
self.ds = ds
|
|
20
20
|
|
|
21
|
-
# Creating minimal mock data for testing
|
|
22
|
-
# Depth levels in meters
|
|
23
|
-
|
|
24
|
-
# Create mock datasets for DataContainer and Grid
|
|
25
|
-
data_ds = xr.Dataset({"depth": (["depth"], depth_values)})
|
|
26
21
|
target_depth = xr.DataArray(data=layer_depth_rho_values, dims=["s_rho"])
|
|
27
|
-
|
|
28
|
-
mock_data = DataContainer(data_ds)
|
|
22
|
+
source_depth = xr.DataArray(data=depth_values, dims=["depth"])
|
|
29
23
|
|
|
30
|
-
return VerticalRegrid(
|
|
24
|
+
return VerticalRegrid(target_depth, source_depth)
|
|
31
25
|
|
|
32
26
|
|
|
33
27
|
@pytest.mark.parametrize(
|
|
@@ -516,7 +516,7 @@ def test_surface_forcing_pco2_replication(sfc_forcing_fixture, request):
|
|
|
516
516
|
def test_surface_forcing_plot_save(sfc_forcing_fixture, request, tmp_path):
|
|
517
517
|
"""Test plot and save methods."""
|
|
518
518
|
sfc_forcing = request.getfixturevalue(sfc_forcing_fixture)
|
|
519
|
-
sfc_forcing.plot(
|
|
519
|
+
sfc_forcing.plot(var_name="uwnd", time=0)
|
|
520
520
|
|
|
521
521
|
for file_str in ["test_sf", "test_sf.nc"]:
|
|
522
522
|
# Create a temporary filepath using the tmp_path fixture
|
|
@@ -549,7 +549,7 @@ def test_surface_forcing_bgc_plot_save(bgc_surface_forcing, tmp_path):
|
|
|
549
549
|
"""Test plot and save methods."""
|
|
550
550
|
|
|
551
551
|
# Check the values in the dataset
|
|
552
|
-
bgc_surface_forcing.plot(
|
|
552
|
+
bgc_surface_forcing.plot(var_name="pco2_air", time=0)
|
|
553
553
|
|
|
554
554
|
for file_str in ["test_sf", "test_sf.nc"]:
|
|
555
555
|
# Create a temporary filepath using the tmp_path fixture
|
|
@@ -584,7 +584,7 @@ def test_surface_forcing_bgc_from_clim_plot_save(
|
|
|
584
584
|
"""Test plot and save methods."""
|
|
585
585
|
|
|
586
586
|
# Check the values in the dataset
|
|
587
|
-
bgc_surface_forcing_from_climatology.plot(
|
|
587
|
+
bgc_surface_forcing_from_climatology.plot(var_name="pco2_air", time=0)
|
|
588
588
|
|
|
589
589
|
for file_str in ["test_sf", "test_sf.nc"]:
|
|
590
590
|
# Create a temporary filepath using the tmp_path fixture
|
|
@@ -174,7 +174,7 @@ def test_tidal_forcing_plot_save(tidal_forcing, tmp_path):
|
|
|
174
174
|
computed."""
|
|
175
175
|
tidal_forcing.ds.load()
|
|
176
176
|
|
|
177
|
-
tidal_forcing.plot(
|
|
177
|
+
tidal_forcing.plot(var_name="ssh_Re", ntides=0)
|
|
178
178
|
|
|
179
179
|
for file_str in ["test_tides", "test_tides.nc"]:
|
|
180
180
|
# Create a temporary filepath using the tmp_path fixture
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: roms-tools
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.0
|
|
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
|
|
@@ -34,6 +34,7 @@ Provides-Extra: dask
|
|
|
34
34
|
Requires-Dist: dask; extra == "dask"
|
|
35
35
|
|
|
36
36
|
# ROMS-Tools
|
|
37
|
+
[](https://anaconda.org/conda-forge/roms-tools)
|
|
37
38
|
[](https://pypi.org/project/roms-tools/)
|
|
38
39
|
[](https://codecov.io/gh/CWorthy-ocean/roms-tools)
|
|
39
40
|
[](https://roms-tools.readthedocs.io/en/latest/?badge=latest)
|
|
@@ -49,6 +50,14 @@ A suite of python tools for setting up a [ROMS](https://github.com/CESR-lab/ucla
|
|
|
49
50
|
|
|
50
51
|
## Installation
|
|
51
52
|
|
|
53
|
+
### Installation from conda forge
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
conda install -c conda-forge roms-tools
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This command installs `ROMS-Tools` along with its `dask` dependency.
|
|
60
|
+
|
|
52
61
|
### Installation from pip
|
|
53
62
|
|
|
54
63
|
```bash
|
|
@@ -75,7 +84,7 @@ Next, install and activate the following conda environment:
|
|
|
75
84
|
|
|
76
85
|
```bash
|
|
77
86
|
conda env create -f ci/environment.yml
|
|
78
|
-
conda activate romstools
|
|
87
|
+
conda activate romstools-test
|
|
79
88
|
```
|
|
80
89
|
|
|
81
90
|
Finally, install `ROMS-Tools` in the same environment:
|
|
@@ -97,7 +106,7 @@ pip install -e .[dask]
|
|
|
97
106
|
Before running the tests, you can activate the conda environment created in the previous section:
|
|
98
107
|
|
|
99
108
|
```bash
|
|
100
|
-
conda activate romstools
|
|
109
|
+
conda activate romstools-test
|
|
101
110
|
```
|
|
102
111
|
|
|
103
112
|
Check the installation of `ROMS-Tools` has worked by running the test suite
|