This module can be used with case.configure_forcings to find different ways to access raw data from data sources. Just supply data product name and function name in the following manner:
case.configure_forcings(date_range = ["2020-01-01 00:00:00", "2020-01-09 00:00:00"],
product_name = "product_name",
function_name = "function_name")Available products and functions can be found in the documentation and in the raw_data_access helper functions shown below. A full list of available functions & products can be accessed in the same documentation.
from CrocoDash.raw_data_access.registry import ProductRegistryProductRegistry.load() # Static object, no need to instantiate it (It's a registry)
ProductRegistry.list_products() # List all registered products['tpxo',
'cesm inputdata',
'gebco',
'glofas',
'glorys',
'mom6_output',
'seawifs']ProductRegistry.list_access_methods("GLORYS")['get_glorys_data_from_rda',
'get_glorys_data_from_cds_api',
'get_glorys_data_script_for_cli']ProductRegistry.get_product("GLORYS")CrocoDash.raw_data_access.datasets.glorys.GLORYS# For example, with what we printed above, we can configure the case to use the GLORYS product and a function from that product as follows:
case.configure_forcings(date_range = ["2020-01-01 00:00:00", "2020-01-09 00:00:00"],
product_name = "GLORYS",
function_name = "get_glorys_data_from_cds_api")Accessing non-forcing raw data¶
Apart from accessing forcing products through case.configure_forcings(), we can access products like GEBCO, SEAWIFS, GLOFAS, etc.. through importing the raw data access module, like below.
# Import the specific module (which can be found by looking at the API Documentation: https://crocodile-cesm.github.io/CrocoDash/api-docs/CrocoDash.raw_data_access.datasets.html)
from CrocoDash.raw_data_access.datasets import glofas as gl
# Then call the function
gl.get_processed_global_glofas_script_for_cli(output_folder="sample", output_filename="glofas_processed_data.nc")
# OR
ProductRegistry.get_access_function("GLOFAS","get_processed_global_glofas_script_for_cli")(output_folder="sample", output_filename="glofas_processed_data.nc")