Accessing Raw Data (raw_data_access)

Accessing Raw Data (raw_data_access)#

CrocoDash uses several datasets to setup the model. Data can be gathered directly from public datasources (including the CESM inputdata svn repository) or through helper functions in the CrocoDash Raw Data Access module. The Raw Data Access Module is an expandible, verifyable, object-oriented module with access functions to raw datasets used in CrocoDash. This document explains what it is and what you can do to add more to it, if you would like to!

Specific datasets can either be accessed directly through the data access module or be chosen by adding arguments to the case.configure_forcings function. Check out the demo here.

Users can check if datasets are accessible at this link.

Please see below for available datasets.

Data Product Registry#

Product

Description

Link

cesm_pop_output

CESM ocean output (POP2 grid) for use as IC and OBC, including CESM-HR FOSI and CESM2 Large Ensemble (LENS2)

https://gdex.ucar.edu/datasets/d267000/

cesm_mom_output

Native MOM6 output (full history/diagnostic files, or diag_table-extracted cross-section slices) for use as IC/OBC forcing - e.g. for nesting a child domain inside an outer/parent MOM6 run.

https://mom6.readthedocs.io/en/main/api/generated/pages/Diagnostics.html

cesm-ww3-jra

Full 2D wave spectra E(f, theta) for WW3 open boundaries, read out of a JRA-forced global wave-only CESM/WW3 run’s 6-hourly netCDF restarts on GLADE – boundary waves driven by the same JRA winds as the regional case’s own interior, with no network access or credentials required. The default database is the 1-degree wi_jra.glo1p0.001 run (useful record from ~2018-12-01, after spin-up).

CROCODILE-CESM/CrocoDash

cice_restart

Global CICE restart file, index-subset to a regional domain’s bounding box for use as a cold-start initial condition.

https://escomp.github.io/CICE/versions/master/html/user_guide/ug_case_settings.html

tpxo

TPXO (TOPEX/POSEIDON Global Tidal Ocean I think) is a public tidal model dataset

https://www.tpxo.net/global

cesm inputdata

The CESM Input SVN repo holds all files CrocoDash exposes publicly themselves at the following repo link

https://svn-ccsm-inputdata.cgd.ucar.edu/trunk/inputdata/ocn/mom/croc

era5_wave_spectra

ERA5’s true 2D wave energy-density spectrum E(f, theta) (ECMWF param 251.140, wave stream) from Copernicus CDS’s reanalysis-era5-complete dataset – NOT the bulk/integrated wave stats (significant height, mean direction, mean period) available on reanalysis-era5-single-levels.

https://cds.climate.copernicus.eu/datasets/reanalysis-era5-complete

gebco

GEBCO (General Bathymetric Chart of the Ocean) is a public dataset of global ocean bathymetry

https://www.gebco.net/data_and_products/gridded_bathymetry_data/#global

glofas

GLOFAS (Global Flood Awareness System) is a public river discharge/runoff Product

https://ewds.climate.copernicus.eu/datasets/cems-glofas-historical?tab=download

glorys

GLORYS (Global Ocean Physics Reanalysis) is a public dataset provided through the copernicus marine service.

https://data.marine.copernicus.eu/product/GLOBAL_MULTIYEAR_PHY_001_030/description

reference_ocean

Fast, deterministic synthetic ocean IC/OBC data (temperature, salinity, SSH, currents) for testing and demos – no network or campaign-storage access required.

n/a

reference_ice

Fast, deterministic synthetic CICE forcing (ice concentration/volume/surface temp and a small drift velocity) for testing and demos – generates its own grid, no real CICE restart/grid file required. Exercises the CrocoDash regrid path only: it writes a single category (ncat=1) and five variables, where CICE needs ncat=5 plus the rest of the restart state (vsnon, trcrn, …), so CICE cannot actually start from the file this produces. Use ‘cice_restart’ against a real global restart for a runnable case.

n/a

reference_waves

Fast, deterministic synthetic WW3 boundary wave spectra (JONSWAP-shaped frequency spectrum, cosine-2s directional spreading) for testing and demos – no CDS/network access required.

n/a

seawifs

SEAWIFS is a Chlorophyll Dataset for MOM6

https://oceandata.sci.gsfc.nasa.gov/getfile/SEASTAR_SEAWIFS_GAC.19980201_20100228.L3m.MC.CHL.chlor_a.9km.nc

srtm

SRTM15+ is a global 15 arc-second resolution bathymetry/topography dataset compiled from SRTM land topography and satellite-derived ocean bathymetry.

https://topex.ucsd.edu/WWW_html/srtm15_plus.html

CrocoDash Data Access Module#

CrocoDash has a data_access module for accessing various datasets. Please see below for a table of available methods.

Data Access Registry#

Product

Function

Type

Description

cesm_pop_output

get_cesm_single_variable_data

python

Gets CESM single-variable-per-file (tseries) ocean data from a given path (by default a POP-MARBL run) — the standard CESM postprocessed output organization, one variable per file series with the date range encoded in the filename. Covers both CESM-HR FOSI and CESM2-LENS2 (pass member to select an ensemble member).

cesm_mom_output

get_mom6_output_data

python

Reads native MOM6 output (full history/diagnostic files, or diag_table-extracted cross-section slices) from any directory and subsets to a lat/lon bounding box — e.g. for nesting a child domain inside an outer/parent MOM6 run.

cesm_mom_output

get_mom6_single_variable_data

python

Gets native MOM6 output that’s organized in the CESM single-variable-per-file (tseries) convention instead of one multi-variable file per region/timestep — some parent runs post-process their history output this way before archiving it.

cesm-ww3-jra

get_cesm_ww3_jra_spectra

python

Reads 2D wave spectra for a boundary window out of a global CESM/WW3 run’s 6-hourly netCDF restarts, converting WW3’s stored action density to variance density E(f, theta) and writing a NetCDF file with real (time, latitude, longitude, frequency, direction) dims – the same shape era5.py’s decoded product has, so the rest of the WW3 OBC pipeline is unchanged. Needs no credentials, only read access to the run directory.

cice_restart

get_cice_restart_subset

python

Reads a global CICE restart file and its companion grid file, locates the (nj, ni) index window covering the requested lat/lon bounding box on the grid’s T-point coordinates, and writes the restart subset over that window. Point restart_path at a global CICE restart (.cice.r..nc) and grid_path at its companion CICE grid file, e.g. /glade/campaign/cesm/community/omwg/grids/tx2_3v3_grid.nc for the tx2_3v3 grid. This isn’t a real dated forcing product yet – a restart is a single snapshot with no time axis of its own, and it is written out as-is, with no time axis added and dates ignored. variables defaults to keeping every variable in the restart, since which state variables exist depends on compile-time CICE options (tracer/layer counts) that this function has no way to know in advance.

era5_wave_spectra

get_era5_2d_spectra

python

Gets ERA5’s true 2D wave spectra via the cdsapi package from CDS’s reanalysis-era5-complete (MARS-style) dataset, decodes the returned GRIB (see module docstring for why cfgrib can’t do this directly), and writes a clean NetCDF file with real (time, latitude, longitude, frequency, direction) dims. Requires a cdsapi config pointed at cds.climate.copernicus.eu with reanalysis-era5-complete access – NOT the ~/.cdsapirc EWDS config GLOFAS uses. To get a key: (1) register a free account at cds.climate.copernicus.eu, (2) open reanalysis-era5-complete’s dataset page and accept its license under ‘Terms of use’, (3) copy your UID and API key from your CDS profile page, (4) write them to a config file (default ~/.cdsapirc_era5, overridable via the cdsapi_rc_path arg below) in the form: url: https://cds.climate.copernicus.eu/api key: <UID>:<API-key> If ~/.cdsapirc already points at a different CDS-family service (e.g. EWDS, used by GLOFAS) and $CDSAPI_RC isn’t set, this falls back to cdsapi_rc_path automatically; set cdsapi_rc_path to wherever your real CDS config actually lives (via configure_forcings’s ww3_obc_function_overrides) if that’s not ~/.cdsapirc_era5.

gebco

get_gebco_data_with_python

python

Python request for global bathymetry data

gebco

get_gebco_data_script

script

get script to download global bathymetry data

glofas

get_global_data_with_python

python

Gets glofas raw data through the cdsapi package

glofas

get_processed_global_glofas_script_for_cli

script

Generates bash script for access to CESM Inputdata processed glofas data

glorys

get_glorys_data_from_rda

python

Gathers GLORYS data from RDA on computers with access to glade/rda

glorys

get_glorys_data_from_cds_api

python

Python request with copernicusmarine api

glorys

get_glorys_data_script_for_cli

script

Generates bash script for direct CLI run with the copernicusmarine package

reference_ocean

get_reference_ocean_data

python

Generates a synthetic ocean dataset over the requested bbox/dates: temperature warm at the equator and decaying exponentially with depth, near-constant salinity, a smooth sinusoidal sea-surface height, and small sinusoidal currents. One value per day.

reference_ice

get_reference_ice_data

python

Generates a synthetic single-category CICE-shaped dataset over the requested bbox/dates: its own regular tlon/tlat/ulon/ulat mesh (no real CICE grid file needed), ice concentration tapering linearly from the bbox’s poleward edge to zero at its equatorward edge, matching ice volume/surface temp, and a small drift velocity.

reference_waves

get_reference_wave_spectra

python

Generates a synthetic multi-station 2D wave spectrum (JONSWAP frequency shape, cosine-2s directional spreading) over the requested bbox/dates, in the same (time, latitude, longitude, frequency, direction) shape the real decoded ERA5 product uses.

seawifs

get_global_seawifs_script_for_cli

script

Generates bash script for direct CLI access to chlorophyll data (No Package Required)

seawifs

get_processed_global_seawifs_script_for_cli

script

Generates bash script for direct CLI access to processed chlorophyll data (No Package Required)

srtm

get_srtm_data_with_python

python

Python download of the SRTM15+ global bathymetry NetCDF file

srtm

get_srtm_data_script

script

Bash script to download the SRTM15+ global bathymetry NetCDF file

Want to add more?#

Interested in adding your own spin on a dataset? Maybe with alternative metadata? Check our our additional docs: Adding Raw Data Products