roms-tools 1.4.2__py3-none-any.whl → 1.5.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 +276 -99
- roms_tools/setup/datasets.py +19 -15
- roms_tools/setup/fill.py +38 -2
- roms_tools/setup/initial_conditions.py +170 -44
- roms_tools/setup/regrid.py +198 -0
- roms_tools/setup/surface_forcing.py +136 -51
- roms_tools/setup/tides.py +103 -31
- roms_tools/setup/utils.py +235 -40
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/.zattrs +1 -1
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/.zmetadata +1 -1
- 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_north/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_north/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_north/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_north/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_north/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_north/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_north/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_north/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_north/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_north/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_north/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_north/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_north/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_north/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_north/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_north/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/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/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/pco2_air_alt/0.0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/.zattrs +1 -1
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/.zmetadata +1 -1
- 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_north/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/salt_west/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_north/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/temp_west/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/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zeta_south/0.0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/.zattrs +1 -1
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/.zmetadata +1 -1
- 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_fill.py +43 -14
- roms_tools/tests/test_setup/test_regrid.py +59 -0
- roms_tools/tests/test_setup/test_surface_forcing.py +18 -0
- {roms_tools-1.4.2.dist-info → roms_tools-1.5.0.dist-info}/METADATA +2 -2
- {roms_tools-1.4.2.dist-info → roms_tools-1.5.0.dist-info}/RECORD +222 -221
- roms_tools/setup/mixins.py +0 -227
- {roms_tools-1.4.2.dist-info → roms_tools-1.5.0.dist-info}/LICENSE +0 -0
- {roms_tools-1.4.2.dist-info → roms_tools-1.5.0.dist-info}/WHEEL +0 -0
- {roms_tools-1.4.2.dist-info → roms_tools-1.5.0.dist-info}/top_level.txt +0 -0
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
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"correct_radiation": "False",
|
|
3
3
|
"end_time": "2020-02-01 00:00:00",
|
|
4
4
|
"model_reference_date": "2000-01-01 00:00:00",
|
|
5
|
-
"roms_tools_version": "0.1.
|
|
5
|
+
"roms_tools_version": "0.1.dev138+dirty",
|
|
6
6
|
"source": "CESM_REGRIDDED",
|
|
7
7
|
"start_time": "2020-02-01 00:00:00",
|
|
8
8
|
"title": "ROMS surface forcing file created by ROMS-Tools",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"correct_radiation": "False",
|
|
5
5
|
"end_time": "2020-02-01 00:00:00",
|
|
6
6
|
"model_reference_date": "2000-01-01 00:00:00",
|
|
7
|
-
"roms_tools_version": "0.1.
|
|
7
|
+
"roms_tools_version": "0.1.dev138+dirty",
|
|
8
8
|
"source": "CESM_REGRIDDED",
|
|
9
9
|
"start_time": "2020-02-01 00:00:00",
|
|
10
10
|
"title": "ROMS surface forcing file created by ROMS-Tools",
|
|
Binary file
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"correct_radiation": "False",
|
|
4
4
|
"end_time": "2020-02-01 00:00:00",
|
|
5
5
|
"model_reference_date": "2000-01-01 00:00:00",
|
|
6
|
-
"roms_tools_version": "0.1.
|
|
6
|
+
"roms_tools_version": "0.1.dev138+dirty",
|
|
7
7
|
"source": "CESM_REGRIDDED",
|
|
8
8
|
"start_time": "2020-02-01 00:00:00",
|
|
9
9
|
"title": "ROMS surface forcing file created by ROMS-Tools",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"correct_radiation": "False",
|
|
6
6
|
"end_time": "2020-02-01 00:00:00",
|
|
7
7
|
"model_reference_date": "2000-01-01 00:00:00",
|
|
8
|
-
"roms_tools_version": "0.1.
|
|
8
|
+
"roms_tools_version": "0.1.dev138+dirty",
|
|
9
9
|
"source": "CESM_REGRIDDED",
|
|
10
10
|
"start_time": "2020-02-01 00:00:00",
|
|
11
11
|
"title": "ROMS surface forcing file created by ROMS-Tools",
|
roms_tools/tests/test_setup/test_data/bgc_surface_forcing_from_climatology.zarr/pco2_air_alt/0.0.0
CHANGED
|
Binary file
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"end_time": "2021-06-30 00:00:00",
|
|
5
5
|
"hc": 250.0,
|
|
6
6
|
"model_reference_date": "2000-01-01 00:00:00",
|
|
7
|
-
"roms_tools_version": "0.1.
|
|
7
|
+
"roms_tools_version": "0.1.dev157+dirty",
|
|
8
8
|
"source": "GLORYS",
|
|
9
9
|
"start_time": "2021-06-29 00:00:00",
|
|
10
10
|
"theta_b": 2.0,
|
|
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ALK/0.0.0.0
CHANGED
|
Binary file
|
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DIC/0.0.0.0
CHANGED
|
Binary file
|
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOC/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOCr/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DON/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DONr/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOP/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOPr/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/Fe/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/Lig/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/NH4/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/NO3/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/O2/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/PO4/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/SiO3/0.0.0.0
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/salt/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spC/0.0.0.0
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spFe/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spP/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/temp/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/u/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ubar/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/v/0.0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/vbar/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/zeta/0.0.0
CHANGED
|
Binary file
|
roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/zooC/0.0.0.0
CHANGED
|
Binary file
|
|
@@ -23,14 +23,15 @@ def era5_data(request, use_dask):
|
|
|
23
23
|
end_time=datetime(2020, 2, 2),
|
|
24
24
|
use_dask=use_dask,
|
|
25
25
|
)
|
|
26
|
-
data.post_process()
|
|
27
26
|
|
|
28
27
|
return data
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
@pytest.fixture()
|
|
32
31
|
def glorys_data(request, use_dask):
|
|
33
|
-
|
|
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")
|
|
34
35
|
|
|
35
36
|
data = GLORYSDataset(
|
|
36
37
|
filename=fname,
|
|
@@ -38,7 +39,9 @@ def glorys_data(request, use_dask):
|
|
|
38
39
|
end_time=datetime(2013, 1, 1),
|
|
39
40
|
use_dask=use_dask,
|
|
40
41
|
)
|
|
41
|
-
|
|
42
|
+
|
|
43
|
+
ds = data.ds.isel(depth=[0, 10, 30])
|
|
44
|
+
object.__setattr__(data, "ds", ds)
|
|
42
45
|
|
|
43
46
|
# extrapolate deepest value to bottom so all levels can use the same surface mask
|
|
44
47
|
for var in data.var_names:
|
|
@@ -58,7 +61,6 @@ def tpxo_data(request, use_dask):
|
|
|
58
61
|
filename=fname,
|
|
59
62
|
use_dask=use_dask,
|
|
60
63
|
)
|
|
61
|
-
data.post_process()
|
|
62
64
|
|
|
63
65
|
return data
|
|
64
66
|
|
|
@@ -74,7 +76,6 @@ def cesm_bgc_data(request, use_dask):
|
|
|
74
76
|
climatology=False,
|
|
75
77
|
use_dask=use_dask,
|
|
76
78
|
)
|
|
77
|
-
data.post_process()
|
|
78
79
|
|
|
79
80
|
# extrapolate deepest value to bottom so all levels can use the same surface mask
|
|
80
81
|
for var in data.var_names:
|
|
@@ -105,15 +106,25 @@ def cesm_surface_bgc_data(request, use_dask):
|
|
|
105
106
|
"data_fixture",
|
|
106
107
|
["era5_data", "glorys_data", "tpxo_data", "cesm_bgc_data", "cesm_surface_bgc_data"],
|
|
107
108
|
)
|
|
108
|
-
def test_lateral_fill_no_nans(data_fixture, request
|
|
109
|
+
def test_lateral_fill_no_nans(data_fixture, request):
|
|
109
110
|
data = request.getfixturevalue(data_fixture)
|
|
110
111
|
lateral_fill = LateralFill(
|
|
111
112
|
data.ds["mask"],
|
|
112
113
|
[data.dim_names["latitude"], data.dim_names["longitude"]],
|
|
113
114
|
)
|
|
115
|
+
if "mask_vel" in data.ds.data_vars:
|
|
116
|
+
lateral_fill_vel = LateralFill(
|
|
117
|
+
data.ds["mask_vel"],
|
|
118
|
+
[data.dim_names["latitude"], data.dim_names["longitude"]],
|
|
119
|
+
)
|
|
114
120
|
|
|
115
121
|
for var in data.var_names:
|
|
116
|
-
|
|
122
|
+
if var in ["u", "v"]:
|
|
123
|
+
filled = lateral_fill_vel.apply(
|
|
124
|
+
data.ds[data.var_names[var]].astype(np.float64)
|
|
125
|
+
)
|
|
126
|
+
else:
|
|
127
|
+
filled = lateral_fill.apply(data.ds[data.var_names[var]].astype(np.float64))
|
|
117
128
|
assert not filled.isnull().any()
|
|
118
129
|
|
|
119
130
|
|
|
@@ -150,28 +161,46 @@ def test_lateral_fill_correct_order_of_magnitude(cesm_bgc_data):
|
|
|
150
161
|
"glorys_data",
|
|
151
162
|
],
|
|
152
163
|
)
|
|
153
|
-
def test_lateral_fill_reproducibility(data_fixture, request
|
|
164
|
+
def test_lateral_fill_reproducibility(data_fixture, request):
|
|
154
165
|
|
|
155
166
|
data = request.getfixturevalue(data_fixture)
|
|
156
167
|
lateral_fill0 = LateralFill(
|
|
157
168
|
data.ds["mask"],
|
|
158
169
|
[data.dim_names["latitude"], data.dim_names["longitude"]],
|
|
159
170
|
)
|
|
171
|
+
if "mask_vel" in data.ds.data_vars:
|
|
172
|
+
lateral_fill_vel0 = LateralFill(
|
|
173
|
+
data.ds["mask_vel"],
|
|
174
|
+
[data.dim_names["latitude"], data.dim_names["longitude"]],
|
|
175
|
+
)
|
|
160
176
|
lateral_fill1 = LateralFill(
|
|
161
177
|
data.ds["mask"],
|
|
162
178
|
[data.dim_names["latitude"], data.dim_names["longitude"]],
|
|
163
179
|
)
|
|
180
|
+
if "mask_vel" in data.ds.data_vars:
|
|
181
|
+
lateral_fill_vel1 = LateralFill(
|
|
182
|
+
data.ds["mask_vel"],
|
|
183
|
+
[data.dim_names["latitude"], data.dim_names["longitude"]],
|
|
184
|
+
)
|
|
164
185
|
|
|
165
186
|
ds0 = data.ds.copy()
|
|
166
187
|
ds1 = data.ds.copy()
|
|
167
188
|
|
|
168
189
|
for var in data.var_names:
|
|
190
|
+
if var in ["u", "v"]:
|
|
191
|
+
ds0[data.var_names[var]] = lateral_fill_vel0.apply(
|
|
192
|
+
ds0[data.var_names[var]].astype(np.float64)
|
|
193
|
+
)
|
|
194
|
+
ds1[data.var_names[var]] = lateral_fill_vel1.apply(
|
|
195
|
+
ds1[data.var_names[var]].astype(np.float64)
|
|
196
|
+
)
|
|
169
197
|
|
|
170
|
-
|
|
171
|
-
ds0[data.var_names[var]].
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
ds1[data.var_names[var]].
|
|
175
|
-
|
|
198
|
+
else:
|
|
199
|
+
ds0[data.var_names[var]] = lateral_fill0.apply(
|
|
200
|
+
ds0[data.var_names[var]].astype(np.float64)
|
|
201
|
+
)
|
|
202
|
+
ds1[data.var_names[var]] = lateral_fill1.apply(
|
|
203
|
+
ds1[data.var_names[var]].astype(np.float64)
|
|
204
|
+
)
|
|
176
205
|
|
|
177
206
|
assert ds0.equals(ds1)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
import numpy as np
|
|
3
|
+
import xarray as xr
|
|
4
|
+
from roms_tools.setup.regrid import VerticalRegrid
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def vertical_regridder(depth_values, layer_depth_rho_values):
|
|
8
|
+
class DataContainer:
|
|
9
|
+
"""Mock class for holding data and dimension names."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, ds):
|
|
12
|
+
self.ds = ds
|
|
13
|
+
self.dim_names = {"depth": "depth"}
|
|
14
|
+
|
|
15
|
+
class Grid:
|
|
16
|
+
"""Mock class representing the grid object with layer depth information."""
|
|
17
|
+
|
|
18
|
+
def __init__(self, ds):
|
|
19
|
+
self.ds = ds
|
|
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
|
+
target_depth = xr.DataArray(data=layer_depth_rho_values, dims=["s_rho"])
|
|
27
|
+
# Instantiate DataContainer and Grid objects with mock datasets
|
|
28
|
+
mock_data = DataContainer(data_ds)
|
|
29
|
+
|
|
30
|
+
return VerticalRegrid(mock_data, target_depth)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@pytest.mark.parametrize(
|
|
34
|
+
"depth_values, layer_depth_rho_values, temp_data",
|
|
35
|
+
[
|
|
36
|
+
([5, 50, 100, 150], [130, 100, 70, 30, 10], [30, 25, 10, 2]),
|
|
37
|
+
([5, 50, 100, 150], [130, 100, 70, 30, 2], [30, 25, 10, 2]),
|
|
38
|
+
([5, 50, 100, 150], [200, 100, 70, 30, 10], [30, 25, 10, 2]),
|
|
39
|
+
([5, 50, 100, 150], [200, 100, 70, 30, 1], [30, 25, 10, 2]),
|
|
40
|
+
],
|
|
41
|
+
)
|
|
42
|
+
def test_vertical_regrid(request, depth_values, layer_depth_rho_values, temp_data):
|
|
43
|
+
|
|
44
|
+
vertical_regrid = vertical_regridder(
|
|
45
|
+
depth_values=depth_values, layer_depth_rho_values=layer_depth_rho_values
|
|
46
|
+
)
|
|
47
|
+
data = xr.Dataset({"temp_data": (["depth"], temp_data)})
|
|
48
|
+
|
|
49
|
+
# without filling in NaNs
|
|
50
|
+
regridded = vertical_regrid.apply(data.temp_data, fill_nans=False)
|
|
51
|
+
expected = np.interp(
|
|
52
|
+
layer_depth_rho_values, depth_values, temp_data, left=np.nan, right=np.nan
|
|
53
|
+
)
|
|
54
|
+
assert np.allclose(expected, regridded.data, equal_nan=True)
|
|
55
|
+
|
|
56
|
+
# with filling in NaNs
|
|
57
|
+
regridded = vertical_regrid.apply(data.temp_data, fill_nans=True)
|
|
58
|
+
expected = np.interp(layer_depth_rho_values, depth_values, temp_data)
|
|
59
|
+
assert np.allclose(expected, regridded.data, equal_nan=True)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import pytest
|
|
2
2
|
from datetime import datetime
|
|
3
|
+
import xarray as xr
|
|
3
4
|
from roms_tools import Grid, SurfaceForcing
|
|
4
5
|
from roms_tools.setup.download import download_test_data
|
|
5
6
|
import textwrap
|
|
@@ -487,6 +488,23 @@ def test_surface_forcing_creation(
|
|
|
487
488
|
sfc_forcing.plot("pco2_air", time=0)
|
|
488
489
|
|
|
489
490
|
|
|
491
|
+
@pytest.mark.parametrize(
|
|
492
|
+
"sfc_forcing_fixture",
|
|
493
|
+
[
|
|
494
|
+
"bgc_surface_forcing",
|
|
495
|
+
"bgc_surface_forcing_from_climatology",
|
|
496
|
+
],
|
|
497
|
+
)
|
|
498
|
+
def test_surface_forcing_pco2_replication(sfc_forcing_fixture, request):
|
|
499
|
+
"""Test whether pco2_air and pco2_air_alt is the same after processing."""
|
|
500
|
+
|
|
501
|
+
sfc_forcing = request.getfixturevalue(sfc_forcing_fixture)
|
|
502
|
+
|
|
503
|
+
xr.testing.assert_allclose(
|
|
504
|
+
sfc_forcing.ds.pco2_air, sfc_forcing.ds.pco2_air_alt, rtol=1.0e-5
|
|
505
|
+
)
|
|
506
|
+
|
|
507
|
+
|
|
490
508
|
@pytest.mark.parametrize(
|
|
491
509
|
"sfc_forcing_fixture",
|
|
492
510
|
[
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: roms-tools
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.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
|
|
@@ -47,7 +47,7 @@ A suite of python tools for setting up a [ROMS](https://github.com/CESR-lab/ucla
|
|
|
47
47
|
|
|
48
48
|
<mark>**DISCLAIMER**: This project is **ALPHA** and will be **EXPERIMENTAL** at least throughout Fall 2024. We do not recommend to use this software before this ALPHA development and test phase is completed.</mark>
|
|
49
49
|
|
|
50
|
-
## Installation
|
|
50
|
+
## Installation
|
|
51
51
|
|
|
52
52
|
### Installation from pip
|
|
53
53
|
|