roms-tools 3.2.0__py3-none-any.whl → 3.3.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/__init__.py +1 -1
- roms_tools/plot.py +38 -30
- roms_tools/setup/boundary_forcing.py +2 -2
- roms_tools/setup/grid.py +13 -5
- roms_tools/setup/initial_conditions.py +5 -5
- roms_tools/setup/{datasets.py → lat_lon_datasets.py} +23 -804
- roms_tools/setup/nesting.py +262 -90
- roms_tools/setup/river_datasets.py +527 -0
- roms_tools/setup/river_forcing.py +2 -2
- roms_tools/setup/surface_forcing.py +4 -4
- roms_tools/setup/tides.py +1 -1
- roms_tools/setup/topography.py +4 -6
- roms_tools/setup/utils.py +263 -2
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_ALT_CO2_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/ALK_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_ALT_CO2_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DIC_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOC_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOCr_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DON_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DONr_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOP_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/DOPr_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Fe_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/Lig_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NH4_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/NO3_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/O2_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/PO4_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/SiO3_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatC_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatChl_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatFe_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatP_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diatSi_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazC_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazChl_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazFe_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/diazP_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spC_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spCaCO3_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spChl_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spFe_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/spP_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zarr.json +406 -406
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/bgc_boundary_forcing_from_climatology.zarr/zooC_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_south/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/salt_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_south/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/temp_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_south/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/u_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_east/c/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_north/c/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_south/c/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/ubar_west/c/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_east/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_north/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_south/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/v_west/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_east/c/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_north/c/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_south/c/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/vbar_west/c/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/boundary_forcing.zarr/zarr.json +182 -182
- roms_tools/tests/test_setup/test_data/grid.zarr/h/c/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/grid.zarr/zarr.json +191 -191
- roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/h/c/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/grid_that_straddles_dateline.zarr/zarr.json +210 -210
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ALK/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ALK_ALT_CO2/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DIC/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DIC_ALT_CO2/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOC/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOCr/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DON/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DONr/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOP/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/DOPr/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/Fe/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/Lig/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/NH4/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/NO3/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/O2/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/PO4/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/SiO3/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatC/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatChl/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatFe/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatP/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diatSi/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazC/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazChl/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazFe/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/diazP/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/salt/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spC/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spCaCO3/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spChl/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spFe/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/spP/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/temp/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/u/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/ubar/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/v/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/vbar/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/zarr.json +182 -182
- roms_tools/tests/test_setup/test_data/initial_conditions_with_bgc_from_climatology.zarr/zooC/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_unified_bgc_from_climatology.zarr/salt/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_unified_bgc_from_climatology.zarr/temp/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_unified_bgc_from_climatology.zarr/u/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_unified_bgc_from_climatology.zarr/ubar/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_unified_bgc_from_climatology.zarr/v/c/0/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_unified_bgc_from_climatology.zarr/vbar/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/initial_conditions_with_unified_bgc_from_climatology.zarr/zarr.json +187 -187
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/u_Im/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/u_Re/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/v_Im/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/v_Re/c/0/0/0 +0 -0
- roms_tools/tests/test_setup/test_data/tidal_forcing.zarr/zarr.json +66 -66
- roms_tools/tests/test_setup/test_grid.py +14 -0
- roms_tools/tests/test_setup/test_initial_conditions.py +1 -1
- roms_tools/tests/test_setup/{test_datasets.py → test_lat_lon_datasets.py} +22 -61
- roms_tools/tests/test_setup/test_nesting.py +119 -31
- roms_tools/tests/test_setup/test_river_datasets.py +48 -0
- roms_tools/tests/test_setup/test_surface_forcing.py +1 -1
- roms_tools/tests/test_setup/test_utils.py +1 -1
- {roms_tools-3.2.0.dist-info → roms_tools-3.3.0.dist-info}/METADATA +1 -1
- {roms_tools-3.2.0.dist-info → roms_tools-3.3.0.dist-info}/RECORD +202 -200
- {roms_tools-3.2.0.dist-info → roms_tools-3.3.0.dist-info}/WHEEL +0 -0
- {roms_tools-3.2.0.dist-info → roms_tools-3.3.0.dist-info}/licenses/LICENSE +0 -0
- {roms_tools-3.2.0.dist-info → roms_tools-3.3.0.dist-info}/top_level.txt +0 -0
roms_tools/__init__.py
CHANGED
|
@@ -20,7 +20,7 @@ from roms_tools.setup.river_forcing import RiverForcing # noqa: F401
|
|
|
20
20
|
from roms_tools.setup.surface_forcing import SurfaceForcing # noqa: F401
|
|
21
21
|
from roms_tools.setup.tides import TidalForcing # noqa: F401
|
|
22
22
|
from roms_tools.tiling.partition import partition_netcdf # noqa: F401
|
|
23
|
-
from roms_tools.setup.
|
|
23
|
+
from roms_tools.setup.lat_lon_datasets import get_glorys_bounds # noqa: F401
|
|
24
24
|
from roms_tools.tiling.join import open_partitions, join_netcdf # noqa: F401
|
|
25
25
|
|
|
26
26
|
|
roms_tools/plot.py
CHANGED
|
@@ -96,12 +96,6 @@ def plot_2d_horizontal_field(
|
|
|
96
96
|
lon_deg = field.lon
|
|
97
97
|
lat_deg = field.lat
|
|
98
98
|
|
|
99
|
-
# check if North or South pole are in domain
|
|
100
|
-
if lat_deg.max().values > 89 or lat_deg.min().values < -89:
|
|
101
|
-
raise NotImplementedError(
|
|
102
|
-
"Plotting is not implemented for the case that the domain contains the North or South pole."
|
|
103
|
-
)
|
|
104
|
-
|
|
105
99
|
trans = get_projection(lon_deg, lat_deg)
|
|
106
100
|
|
|
107
101
|
if ax is None:
|
|
@@ -186,25 +180,8 @@ def plot_nesting(parent_grid_ds, child_grid_ds, parent_straddle, with_dim_names=
|
|
|
186
180
|
with_dim_names=with_dim_names,
|
|
187
181
|
)
|
|
188
182
|
|
|
189
|
-
vmax = 3
|
|
190
|
-
vmin = 0
|
|
191
|
-
cmap = plt.colormaps.get_cmap("Blues")
|
|
192
|
-
cmap.set_bad(color="gray")
|
|
193
|
-
kwargs = {"vmax": vmax, "vmin": vmin, "cmap": cmap}
|
|
194
|
-
|
|
195
|
-
field = parent_grid_ds.mask_rho
|
|
196
|
-
field = field.where(field)
|
|
197
|
-
|
|
198
|
-
_add_field_to_ax(
|
|
199
|
-
ax,
|
|
200
|
-
parent_lon_deg,
|
|
201
|
-
parent_lat_deg,
|
|
202
|
-
field,
|
|
203
|
-
add_colorbar=False,
|
|
204
|
-
kwargs=kwargs,
|
|
205
|
-
)
|
|
206
|
-
|
|
207
183
|
_add_gridlines(ax)
|
|
184
|
+
ax.coastlines()
|
|
208
185
|
|
|
209
186
|
ax.legend(loc="best")
|
|
210
187
|
|
|
@@ -659,7 +636,7 @@ def _add_field_to_ax(
|
|
|
659
636
|
proj = ccrs.PlateCarree()
|
|
660
637
|
|
|
661
638
|
p = ax.pcolormesh(lon_deg, lat_deg, field, transform=proj, **kwargs)
|
|
662
|
-
if hasattr(field, "long_name"):
|
|
639
|
+
if hasattr(field, "long_name") and hasattr(field, "units"):
|
|
663
640
|
label = f"{field.long_name} [{field.units}]"
|
|
664
641
|
elif hasattr(field, "Long_name"):
|
|
665
642
|
# this is the case for matlab generated grids
|
|
@@ -674,10 +651,36 @@ def _add_field_to_ax(
|
|
|
674
651
|
ax.clabel(cs, inline=True, fontsize=FONT_SZ)
|
|
675
652
|
|
|
676
653
|
|
|
677
|
-
def get_projection(lon, lat):
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
654
|
+
def get_projection(lon: xr.DataArray, lat: xr.DataArray):
|
|
655
|
+
"""
|
|
656
|
+
Return a Cartopy projection appropriate for the given lon/lat domain.
|
|
657
|
+
|
|
658
|
+
- Raises an error if the domain includes either pole.
|
|
659
|
+
- Uses PlateCarree if the longitudinal span > 90°.
|
|
660
|
+
- Otherwise uses NearsidePerspective centered on the domain.
|
|
661
|
+
|
|
662
|
+
Parameters
|
|
663
|
+
----------
|
|
664
|
+
lon, lat : xr.DataArray
|
|
665
|
+
Longitude and latitude values in degrees.
|
|
666
|
+
|
|
667
|
+
Returns
|
|
668
|
+
-------
|
|
669
|
+
cartopy.crs.Projection
|
|
670
|
+
The chosen Cartopy projection.
|
|
671
|
+
"""
|
|
672
|
+
# check if North or South pole are in domain
|
|
673
|
+
if lat.max() > 89 or lat.min() < -89:
|
|
674
|
+
raise NotImplementedError(
|
|
675
|
+
"Plotting is not implemented for the case that the domain contains the North or South pole."
|
|
676
|
+
)
|
|
677
|
+
|
|
678
|
+
if lon.max() - lon.min() > 90:
|
|
679
|
+
return ccrs.PlateCarree(central_longitude=lon.mean().values)
|
|
680
|
+
else:
|
|
681
|
+
return ccrs.NearsidePerspective(
|
|
682
|
+
central_longitude=lon.mean().values, central_latitude=lat.mean().values
|
|
683
|
+
)
|
|
681
684
|
|
|
682
685
|
|
|
683
686
|
def _validate_plot_inputs(
|
|
@@ -816,6 +819,7 @@ def plot(
|
|
|
816
819
|
yincrease: bool | None = None,
|
|
817
820
|
use_coarse_grid: bool = False,
|
|
818
821
|
with_dim_names: bool = False,
|
|
822
|
+
apply_mask: bool = True,
|
|
819
823
|
ax: Axes | None = None,
|
|
820
824
|
save_path: str | None = None,
|
|
821
825
|
cmap_name: str = "YlOrRd",
|
|
@@ -889,6 +893,9 @@ def plot(
|
|
|
889
893
|
with_dim_names : bool, optional
|
|
890
894
|
Add grid dimension names (`xi`, `eta`) to the outer plot edges. Only for 2D plots. Default is False.
|
|
891
895
|
|
|
896
|
+
apply_mask: bool, optional
|
|
897
|
+
Whether to apply the land mask to the field. Default is True.
|
|
898
|
+
|
|
892
899
|
ax : Axes, optional
|
|
893
900
|
Matplotlib axes object. If None, a new figure is created. Default is None.
|
|
894
901
|
|
|
@@ -971,7 +978,8 @@ def plot(
|
|
|
971
978
|
field = field.assign_coords({"lon": lon_deg, "lat": lat_deg})
|
|
972
979
|
|
|
973
980
|
# Mask the field
|
|
974
|
-
|
|
981
|
+
if apply_mask:
|
|
982
|
+
field = field.where(mask)
|
|
975
983
|
|
|
976
984
|
# Assign eta and xi as coordinates
|
|
977
985
|
coords_to_assign = {dim: field[dim] for dim in horizontal_dims.values()}
|
|
@@ -13,14 +13,14 @@ from scipy.ndimage import label
|
|
|
13
13
|
from roms_tools import Grid
|
|
14
14
|
from roms_tools.plot import line_plot, section_plot
|
|
15
15
|
from roms_tools.regrid import LateralRegridToROMS, VerticalRegridToROMS
|
|
16
|
-
from roms_tools.setup.
|
|
16
|
+
from roms_tools.setup.lat_lon_datasets import (
|
|
17
17
|
CESMBGCDataset,
|
|
18
18
|
GLORYSDataset,
|
|
19
19
|
GLORYSDefaultDataset,
|
|
20
|
-
RawDataSource,
|
|
21
20
|
UnifiedBGCDataset,
|
|
22
21
|
)
|
|
23
22
|
from roms_tools.setup.utils import (
|
|
23
|
+
RawDataSource,
|
|
24
24
|
add_time_info_to_ds,
|
|
25
25
|
compute_barotropic_velocity,
|
|
26
26
|
compute_missing_bgc_variables,
|
roms_tools/setup/grid.py
CHANGED
|
@@ -201,13 +201,19 @@ class Grid:
|
|
|
201
201
|
self.mask_shapefile = mask_shapefile
|
|
202
202
|
|
|
203
203
|
def update_topography(
|
|
204
|
-
self,
|
|
204
|
+
self,
|
|
205
|
+
topography_source: dict | None = None,
|
|
206
|
+
hmin: float | None = None,
|
|
207
|
+
verbose: bool = False,
|
|
205
208
|
) -> None:
|
|
206
209
|
"""Update the grid dataset with processed topography.
|
|
207
210
|
|
|
208
|
-
This method performs
|
|
209
|
-
|
|
210
|
-
|
|
211
|
+
This method performs the following operations:
|
|
212
|
+
|
|
213
|
+
1. Regrids the topography from the specified source.
|
|
214
|
+
2. Applies domain-wide and local smoothing.
|
|
215
|
+
3. Enforces the minimum depth constraint ``hmin``.
|
|
216
|
+
4. Updates the internal dataset (``self.ds``) with the processed bathymetry.
|
|
211
217
|
|
|
212
218
|
Parameters
|
|
213
219
|
----------
|
|
@@ -236,11 +242,13 @@ class Grid:
|
|
|
236
242
|
topography_source = topography_source or self.topography_source
|
|
237
243
|
hmin = hmin or self.hmin
|
|
238
244
|
|
|
245
|
+
name = topography_source["name"] # type: ignore[index]
|
|
246
|
+
|
|
239
247
|
# Extract target coordinates for processing
|
|
240
248
|
target_coords = get_target_coords(self)
|
|
241
249
|
|
|
242
250
|
with Timed(
|
|
243
|
-
f"=== Generating the topography using {
|
|
251
|
+
f"=== Generating the topography using {name} data and hmin = {hmin} meters ===",
|
|
244
252
|
verbose=verbose,
|
|
245
253
|
):
|
|
246
254
|
ds = add_topography(
|
|
@@ -13,15 +13,15 @@ from matplotlib.axes import Axes
|
|
|
13
13
|
from roms_tools import Grid
|
|
14
14
|
from roms_tools.plot import plot
|
|
15
15
|
from roms_tools.regrid import LateralRegridToROMS, VerticalRegridToROMS
|
|
16
|
-
from roms_tools.setup.
|
|
16
|
+
from roms_tools.setup.lat_lon_datasets import (
|
|
17
17
|
CESMBGCDataset,
|
|
18
|
-
Dataset,
|
|
19
18
|
GLORYSDataset,
|
|
20
19
|
GLORYSDefaultDataset,
|
|
21
|
-
|
|
20
|
+
LatLonDataset,
|
|
22
21
|
UnifiedBGCDataset,
|
|
23
22
|
)
|
|
24
23
|
from roms_tools.setup.utils import (
|
|
24
|
+
RawDataSource,
|
|
25
25
|
compute_barotropic_velocity,
|
|
26
26
|
compute_missing_bgc_variables,
|
|
27
27
|
from_yaml,
|
|
@@ -326,7 +326,7 @@ class InitialConditions:
|
|
|
326
326
|
"Sea surface height will NOT be used to adjust depth coordinates."
|
|
327
327
|
)
|
|
328
328
|
|
|
329
|
-
def _get_data(self, forcing_type=Literal["physics", "bgc"]) ->
|
|
329
|
+
def _get_data(self, forcing_type=Literal["physics", "bgc"]) -> LatLonDataset:
|
|
330
330
|
"""Determine the correct `Dataset` type and return an instance.
|
|
331
331
|
|
|
332
332
|
forcing_type : str
|
|
@@ -339,7 +339,7 @@ class InitialConditions:
|
|
|
339
339
|
Dataset
|
|
340
340
|
The `Dataset` instance
|
|
341
341
|
"""
|
|
342
|
-
dataset_map: dict[str, dict[str, dict[str, type[
|
|
342
|
+
dataset_map: dict[str, dict[str, dict[str, type[LatLonDataset]]]] = {
|
|
343
343
|
"physics": {
|
|
344
344
|
"GLORYS": {
|
|
345
345
|
"external": GLORYSDataset,
|