From 73feae7682d3a024be97c1f3cae471f7f6a4f5fe Mon Sep 17 00:00:00 2001 From: Trey Stafford Date: Tue, 22 Aug 2023 14:08:39 -0600 Subject: [PATCH 1/6] WIP begin init work of adding WOA 2023 salinity layers To accompany the existing temperature layers. --- qgreenland/config/datasets/woa_temperature.py | 60 +++++++++++++++---- qgreenland/config/helpers/layers/woa.py | 14 +++-- .../Seawater temperature (25km)/woa.py | 8 +-- 3 files changed, 60 insertions(+), 22 deletions(-) diff --git a/qgreenland/config/datasets/woa_temperature.py b/qgreenland/config/datasets/woa_temperature.py index 42410948..1fd6f3ab 100644 --- a/qgreenland/config/datasets/woa_temperature.py +++ b/qgreenland/config/datasets/woa_temperature.py @@ -1,7 +1,15 @@ from qgreenland.models.config.asset import HttpAsset from qgreenland.models.config.dataset import Dataset -BASE_URL = "https://www.ncei.noaa.gov/thredds-ocean/fileServer/woa23/DATA/temperature/netcdf/decav91C0" +TEMPERATURE_BASE_URL = "https://www.ncei.noaa.gov/thredds-ocean/fileServer/woa23/DATA/temperature/netcdf/decav91C0" + +_common_abstract = """The World Ocean Atlas (WOA) is a collection of objectively +analyzed, quality controlled temperature, salinity, oxygen, +phosphate, silicate, and nitrate means based on profile data from +the World Ocean Database (WOD). It can be used to create boundary +and/or initial conditions for a variety of ocean models, verify +numerical simulations of the ocean, and corroborate satellite +data.""" woa_temperature = Dataset( id="woa_temperature", @@ -9,27 +17,19 @@ HttpAsset( id="seasonal_winter", urls=[ - f"{BASE_URL}/0.25/woa23_decav91C0_t13_04.nc", + f"{TEMPERATURE_BASE_URL}/0.25/woa23_decav91C0_t13_04.nc", ], ), HttpAsset( id="seasonal_summer", urls=[ - f"{BASE_URL}/0.25/woa23_decav91C0_t15_04.nc", + f"{TEMPERATURE_BASE_URL}/0.25/woa23_decav91C0_t15_04.nc", ], ), ], metadata={ "title": "World Ocean Atlas 2023, Volume 1: Temperature.", - "abstract": ( - """The World Ocean Atlas (WOA) is a collection of objectively - analyzed, quality controlled temperature, salinity, oxygen, - phosphate, silicate, and nitrate means based on profile data from - the World Ocean Database (WOD). It can be used to create boundary - and/or initial conditions for a variety of ocean models, verify - numerical simulations of the ocean, and corroborate satellite - data.""" - ), + "abstract": _common_abstract, "citation": { "text": ( """Locarnini, R. A., O. K. Baranova, A. V. Mishonov, @@ -42,3 +42,39 @@ }, }, ) + + +SALINITY_BASE_URL = "https://www.ncei.noaa.gov/thredds-ocean/fileServer/woa23/DATA/salinity/netcdf/decav91C0" + + +woa_salinity = Dataset( + id="woa_salinity", + assets=[ + HttpAsset( + id="seasonal_winter", + urls=[ + f"{SALINITY_BASE_URL}/0.25/woa23_decav91C0_s13_04.nc", + ], + ), + HttpAsset( + id="seasonal_summer", + urls=[ + f"{SALINITY_BASE_URL}/0.25/woa23_decav91C0_s15_04.nc", + ], + ), + ], + metadata={ + "title": "World Ocean Atlas 2023, Volume 2: Salinity", + "abstract": _common_abstract, + "citation": { + "text": ( + """Reagan, J. R., D. Dukhovskoy, D. Seidov, T. P. Boyer, + R. A. Locarnini, O. K. Baranova, A. V. Mishonov, H. E. Garcia, + C. Bouchard, S. Cross, C. R. Paver, and Z. Wang (2023). World + Ocean Atlas 2023, Volume 2: Salinity. A. Mishonov Technical + Ed. NOAA Atlas NESDIS (in preparation).""" + ), + "url": "https://www.ncei.noaa.gov/products/world-ocean-atlas", + }, + }, +) diff --git a/qgreenland/config/helpers/layers/woa.py b/qgreenland/config/helpers/layers/woa.py index 7d8dfa11..393cee3e 100644 --- a/qgreenland/config/helpers/layers/woa.py +++ b/qgreenland/config/helpers/layers/woa.py @@ -8,14 +8,15 @@ def depth_str(depth: int) -> str: return f"{depth}m" -def id_str(*, depth: int, season: str) -> str: - return f"woa_{depth}m_temperature_{season}" +def id_str(*, depth: int, season: str, variable: str) -> str: + return f"woa_{depth}m_{variable}_{season}" SEASONS_FNS: dict[str, str] = { "winter": "woa23_decav91C0_t13_04.nc", "summer": "woa23_decav91C0_t15_04.nc", } +# Looks like these are the same for salinity. DEPTHS_BANDS: dict[int, int] = { 0: 1, 50: 11, @@ -24,10 +25,11 @@ def id_str(*, depth: int, season: str) -> str: } # Sort by season first, then by depth -COMBINATIONS = list(product(SEASONS_FNS.keys(), DEPTHS_BANDS.keys())) -COMBINATIONS.sort(key=lambda x: x[0], reverse=True) -COMBINATIONS.sort(key=lambda x: x[1]) +TEMPERATURE_COMBINATIONS = list(product(SEASONS_FNS.keys(), DEPTHS_BANDS.keys())) +TEMPERATURE_COMBINATIONS.sort(key=lambda x: x[0], reverse=True) +TEMPERATURE_COMBINATIONS.sort(key=lambda x: x[1]) WOA_LAYER_ORDER = [ - id_str(depth=depth, season=season) for (season, depth) in COMBINATIONS + id_str(depth=depth, season=season, variable="temperature") + for (season, depth) in TEMPERATURE_COMBINATIONS ] diff --git a/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py b/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py index ea9bcb10..1f6311e1 100644 --- a/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py +++ b/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py @@ -2,9 +2,9 @@ woa_temperature as dataset, ) from qgreenland.config.helpers.layers.woa import ( - COMBINATIONS, DEPTHS_BANDS, SEASONS_FNS, + TEMPERATURE_COMBINATIONS, depth_str, id_str, ) @@ -16,9 +16,9 @@ from qgreenland.models.config.layer import Layer, LayerInput from qgreenland.models.config.step import CommandStep -layers = [ +temperature_layers = [ Layer( - id=id_str(depth=depth, season=season), + id=id_str(depth=depth, season=season, variable="temperature"), title=f"{depth_str(depth)}, {season.title()}", description=( f"""Average Seawater temperature at {depth_str(depth).lower()} depth @@ -81,5 +81,5 @@ ), ], ) - for season, depth in COMBINATIONS + for season, depth in TEMPERATURE_COMBINATIONS ] From 69094bcfe6eb3e10989d4865ae52705d8c539960 Mon Sep 17 00:00:00 2001 From: Trey Stafford Date: Wed, 23 Aug 2023 14:16:43 -0600 Subject: [PATCH 2/6] Further re-factor to support WOA salinity layers --- .../datasets/{woa_temperature.py => woa.py} | 0 qgreenland/config/helpers/layers/woa.py | 75 ++++++++++++++++ .../Seawater temperature (25km)/woa.py | 88 ++----------------- 3 files changed, 84 insertions(+), 79 deletions(-) rename qgreenland/config/datasets/{woa_temperature.py => woa.py} (100%) diff --git a/qgreenland/config/datasets/woa_temperature.py b/qgreenland/config/datasets/woa.py similarity index 100% rename from qgreenland/config/datasets/woa_temperature.py rename to qgreenland/config/datasets/woa.py diff --git a/qgreenland/config/helpers/layers/woa.py b/qgreenland/config/helpers/layers/woa.py index 393cee3e..48586c4f 100644 --- a/qgreenland/config/helpers/layers/woa.py +++ b/qgreenland/config/helpers/layers/woa.py @@ -1,5 +1,13 @@ from itertools import product +from qgreenland.config.helpers.steps.compress_and_add_overviews import ( + compress_and_add_overviews, +) +from qgreenland.config.helpers.steps.warp_and_cut import warp_and_cut +from qgreenland.config.project import project +from qgreenland.models.config.layer import Layer, LayerInput +from qgreenland.models.config.step import CommandStep + def depth_str(depth: int) -> str: if depth == 0: @@ -33,3 +41,70 @@ def id_str(*, depth: int, season: str, variable: str) -> str: id_str(depth=depth, season=season, variable="temperature") for (season, depth) in TEMPERATURE_COMBINATIONS ] + + +def make_layer(*, dataset, depth, season, variable, units) -> Layer: + return Layer( + id=id_str(depth=depth, season=season, variable=variable), + title=f"{depth_str(depth)}, {season.title()}", + description=( + f"""Average seawater {variable} at {depth_str(depth).lower()} depth + in {units} for the 1991 - 2020 climate normal period. + + Climate normals, defined as 30-year averages of data by the World + Meteorological Organization (WMO), provide long-term means for + initializing models, environmental studies, checking in situ + observations, etc. + + Comparing new observations to the most recent climate normal allows + one to assess whether or not current observations are within the + statistical norm in the context of the most recent 30-year + climatological background. Additional applications, such as + initializing boundary conditions for climate models or assessing + remotely sensed observations, also require a more recent + climatology.""" + ), + tags=[], + style=f"seawater_{variable}", + input=LayerInput( + dataset=dataset, + asset=dataset.assets[f"seasonal_{season}"], + ), + steps=[ + CommandStep( + args=[ + "gdal_translate", + "-b", + DEPTHS_BANDS[depth], + "NETCDF:{input_dir}/" + f"{SEASONS_FNS[season]}:{variable[0]}_an", + "{output_dir}/extracted.tif", + ], + ), + *warp_and_cut( + input_file="{input_dir}/extracted.tif", + output_file="{output_dir}/warped_and_cut.tif", + cut_file=project.boundaries["background"].filepath, + reproject_args=( + "-tr", + "25000", + "25000", + # A "target extent" bounding box is required to reproject + # this correctly, or we receive an error like: + # ERROR 1: Attempt to create 0x1 dataset is + # illegal,sizes must be larger than zero. + "-te", + *( + project.boundaries["background"].bbox.min_x, + project.boundaries["background"].bbox.min_y, + project.boundaries["background"].bbox.max_x, + project.boundaries["background"].bbox.max_y, + ), + ), + ), + *compress_and_add_overviews( + input_file="{input_dir}/warped_and_cut.tif", + output_file="{output_dir}/final.tif", + dtype_is_float=True, + ), + ], + ) diff --git a/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py b/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py index 1f6311e1..74d1e357 100644 --- a/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py +++ b/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py @@ -1,85 +1,15 @@ -from qgreenland.config.datasets.woa_temperature import ( - woa_temperature as dataset, +from qgreenland.config.datasets.woa import ( + woa_temperature, ) -from qgreenland.config.helpers.layers.woa import ( - DEPTHS_BANDS, - SEASONS_FNS, - TEMPERATURE_COMBINATIONS, - depth_str, - id_str, -) -from qgreenland.config.helpers.steps.compress_and_add_overviews import ( - compress_and_add_overviews, -) -from qgreenland.config.helpers.steps.warp_and_cut import warp_and_cut -from qgreenland.config.project import project -from qgreenland.models.config.layer import Layer, LayerInput -from qgreenland.models.config.step import CommandStep +from qgreenland.config.helpers.layers.woa import TEMPERATURE_COMBINATIONS, make_layer temperature_layers = [ - Layer( - id=id_str(depth=depth, season=season, variable="temperature"), - title=f"{depth_str(depth)}, {season.title()}", - description=( - f"""Average Seawater temperature at {depth_str(depth).lower()} depth - in °C for the 1991 - 2020 climate normal period. - - Climate normals, defined as 30-year averages of data by the World - Meteorological Organization (WMO), provide long-term means for - initializing models, environmental studies, checking in situ - observations, etc. - - Comparing new observations to the most recent climate normal allows - one to assess whether or not current observations are within the - statistical norm in the context of the most recent 30-year - climatological background. Additional applications, such as - initializing boundary conditions for climate models or assessing - remotely sensed observations, also require a more recent - climatology.""" - ), - tags=[], - style="seawater_temperature", - input=LayerInput( - dataset=dataset, - asset=dataset.assets[f"seasonal_{season}"], - ), - steps=[ - CommandStep( - args=[ - "gdal_translate", - "-b", - DEPTHS_BANDS[depth], - "NETCDF:{input_dir}/" + f"{SEASONS_FNS[season]}:t_an", - "{output_dir}/extracted.tif", - ], - ), - *warp_and_cut( - input_file="{input_dir}/extracted.tif", - output_file="{output_dir}/warped_and_cut.tif", - cut_file=project.boundaries["background"].filepath, - reproject_args=( - "-tr", - "25000", - "25000", - # A "target extent" bounding box is required to reproject - # this correctly, or we receive an error like: - # ERROR 1: Attempt to create 0x1 dataset is - # illegal,sizes must be larger than zero. - "-te", - *( - project.boundaries["background"].bbox.min_x, - project.boundaries["background"].bbox.min_y, - project.boundaries["background"].bbox.max_x, - project.boundaries["background"].bbox.max_y, - ), - ), - ), - *compress_and_add_overviews( - input_file="{input_dir}/warped_and_cut.tif", - output_file="{output_dir}/final.tif", - dtype_is_float=True, - ), - ], + make_layer( + dataset=woa_temperature, + depth=depth, + season=season, + variable="temperature", + units="°C", ) for season, depth in TEMPERATURE_COMBINATIONS ] From 28a1c6b833716be59fc4f6ca5d6856b46a1e5604 Mon Sep 17 00:00:00 2001 From: Trey Stafford Date: Wed, 23 Aug 2023 14:52:32 -0600 Subject: [PATCH 3/6] Create layers for WOA salinity --- .../ancillary/styles/seawater_salinity.qml | 222 ++++++++++++++++++ qgreenland/config/datasets/woa.py | 2 + qgreenland/config/helpers/layers/woa.py | 33 ++- .../Seawater salinity (25km)/__settings__.py | 8 + .../Seawater salinity (25km)/woa.py | 18 ++ .../__settings__.py | 4 +- .../Seawater temperature (25km)/woa.py | 5 +- .../layers/Oceanography/__settings__.py | 1 + 8 files changed, 286 insertions(+), 7 deletions(-) create mode 100644 qgreenland/ancillary/styles/seawater_salinity.qml create mode 100644 qgreenland/config/layers/Oceanography/Seawater salinity (25km)/__settings__.py create mode 100644 qgreenland/config/layers/Oceanography/Seawater salinity (25km)/woa.py diff --git a/qgreenland/ancillary/styles/seawater_salinity.qml b/qgreenland/ancillary/styles/seawater_salinity.qml new file mode 100644 index 00000000..63c0a575 --- /dev/null +++ b/qgreenland/ancillary/styles/seawater_salinity.qml @@ -0,0 +1,222 @@ + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + WholeRaster + Estimated + 0.02 + 0.98 + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + resamplingFilter + + 0 + diff --git a/qgreenland/config/datasets/woa.py b/qgreenland/config/datasets/woa.py index 1fd6f3ab..da80b288 100644 --- a/qgreenland/config/datasets/woa.py +++ b/qgreenland/config/datasets/woa.py @@ -11,6 +11,7 @@ numerical simulations of the ocean, and corroborate satellite data.""" +# Climatological mean temperature for the global ocean from in situ profile data woa_temperature = Dataset( id="woa_temperature", assets=[ @@ -47,6 +48,7 @@ SALINITY_BASE_URL = "https://www.ncei.noaa.gov/thredds-ocean/fileServer/woa23/DATA/salinity/netcdf/decav91C0" +# Climatological mean salinity for the global ocean from in situ profile data woa_salinity = Dataset( id="woa_salinity", assets=[ diff --git a/qgreenland/config/helpers/layers/woa.py b/qgreenland/config/helpers/layers/woa.py index 48586c4f..bf3f188c 100644 --- a/qgreenland/config/helpers/layers/woa.py +++ b/qgreenland/config/helpers/layers/woa.py @@ -20,10 +20,14 @@ def id_str(*, depth: int, season: str, variable: str) -> str: return f"woa_{depth}m_{variable}_{season}" -SEASONS_FNS: dict[str, str] = { +TEMPERATURE_SEASONS_FNS: dict[str, str] = { "winter": "woa23_decav91C0_t13_04.nc", "summer": "woa23_decav91C0_t15_04.nc", } +SALINITY_SEASONS_FNS: dict[str, str] = { + "winter": "woa23_decav91C0_s13_04.nc", + "summer": "woa23_decav91C0_s15_04.nc", +} # Looks like these are the same for salinity. DEPTHS_BANDS: dict[int, int] = { 0: 1, @@ -33,14 +37,33 @@ def id_str(*, depth: int, season: str, variable: str) -> str: } # Sort by season first, then by depth -TEMPERATURE_COMBINATIONS = list(product(SEASONS_FNS.keys(), DEPTHS_BANDS.keys())) +TEMPERATURE_COMBINATIONS = list( + product(TEMPERATURE_SEASONS_FNS.keys(), DEPTHS_BANDS.keys()) +) TEMPERATURE_COMBINATIONS.sort(key=lambda x: x[0], reverse=True) TEMPERATURE_COMBINATIONS.sort(key=lambda x: x[1]) -WOA_LAYER_ORDER = [ +SALINITY_COMBINATIONS = list(product(SALINITY_SEASONS_FNS.keys(), DEPTHS_BANDS.keys())) +SALINITY_COMBINATIONS.sort(key=lambda x: x[0], reverse=True) +SALINITY_COMBINATIONS.sort(key=lambda x: x[1]) + +WOA_TEMPERATURE_LAYER_ORDER = [ id_str(depth=depth, season=season, variable="temperature") for (season, depth) in TEMPERATURE_COMBINATIONS ] +WOA_SALINITY_LAYER_ORDER = [ + id_str(depth=depth, season=season, variable="salinity") + for (season, depth) in SALINITY_COMBINATIONS +] + + +def get_fn(*, season, variable): + if variable == "temperature": + return TEMPERATURE_SEASONS_FNS[season] + elif variable == "salinity": + return SALINITY_SEASONS_FNS[season] + else: + raise RuntimeError(f"{variable} not recognized as a valid WOA variable.") def make_layer(*, dataset, depth, season, variable, units) -> Layer: @@ -76,7 +99,9 @@ def make_layer(*, dataset, depth, season, variable, units) -> Layer: "gdal_translate", "-b", DEPTHS_BANDS[depth], - "NETCDF:{input_dir}/" + f"{SEASONS_FNS[season]}:{variable[0]}_an", + "NETCDF:{input_dir}/" + + get_fn(season=season, variable=variable) + + f":{variable[0]}_an", "{output_dir}/extracted.tif", ], ), diff --git a/qgreenland/config/layers/Oceanography/Seawater salinity (25km)/__settings__.py b/qgreenland/config/layers/Oceanography/Seawater salinity (25km)/__settings__.py new file mode 100644 index 00000000..997c8426 --- /dev/null +++ b/qgreenland/config/layers/Oceanography/Seawater salinity (25km)/__settings__.py @@ -0,0 +1,8 @@ +from qgreenland.config.helpers.layers.woa import WOA_SALINITY_LAYER_ORDER +from qgreenland.models.config.layer_group import LayerGroupSettings, LayerIdentifier + +settings = LayerGroupSettings( + order=[ + *[LayerIdentifier(layer_id) for layer_id in WOA_SALINITY_LAYER_ORDER], + ], +) diff --git a/qgreenland/config/layers/Oceanography/Seawater salinity (25km)/woa.py b/qgreenland/config/layers/Oceanography/Seawater salinity (25km)/woa.py new file mode 100644 index 00000000..d4231bc0 --- /dev/null +++ b/qgreenland/config/layers/Oceanography/Seawater salinity (25km)/woa.py @@ -0,0 +1,18 @@ +from qgreenland.config.datasets.woa import ( + woa_salinity, +) +from qgreenland.config.helpers.layers.woa import ( + SALINITY_COMBINATIONS, + make_layer, +) + +salinity_layers = [ + make_layer( + dataset=woa_salinity, + depth=depth, + season=season, + variable="salinity", + units="practical salinity scale (PSS)", + ) + for season, depth in SALINITY_COMBINATIONS +] diff --git a/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/__settings__.py b/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/__settings__.py index e9948041..47801b94 100644 --- a/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/__settings__.py +++ b/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/__settings__.py @@ -1,8 +1,8 @@ -from qgreenland.config.helpers.layers.woa import WOA_LAYER_ORDER +from qgreenland.config.helpers.layers.woa import WOA_TEMPERATURE_LAYER_ORDER from qgreenland.models.config.layer_group import LayerGroupSettings, LayerIdentifier settings = LayerGroupSettings( order=[ - *[LayerIdentifier(layer_id) for layer_id in WOA_LAYER_ORDER], + *[LayerIdentifier(layer_id) for layer_id in WOA_TEMPERATURE_LAYER_ORDER], ], ) diff --git a/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py b/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py index 74d1e357..26a99b0b 100644 --- a/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py +++ b/qgreenland/config/layers/Oceanography/Seawater temperature (25km)/woa.py @@ -1,7 +1,10 @@ from qgreenland.config.datasets.woa import ( woa_temperature, ) -from qgreenland.config.helpers.layers.woa import TEMPERATURE_COMBINATIONS, make_layer +from qgreenland.config.helpers.layers.woa import ( + TEMPERATURE_COMBINATIONS, + make_layer, +) temperature_layers = [ make_layer( diff --git a/qgreenland/config/layers/Oceanography/__settings__.py b/qgreenland/config/layers/Oceanography/__settings__.py index 7baec0d5..a012673c 100644 --- a/qgreenland/config/layers/Oceanography/__settings__.py +++ b/qgreenland/config/layers/Oceanography/__settings__.py @@ -7,6 +7,7 @@ order=[ LayerGroupIdentifier("Undersea feature names"), LayerGroupIdentifier("Seawater temperature (25km)"), + LayerGroupIdentifier("Seawater salinity (25km)"), LayerGroupIdentifier("Bathymetry"), ], ) From 37fab25ddc58cd688a965afbbb474cd40c9421b2 Mon Sep 17 00:00:00 2001 From: Trey Stafford Date: Wed, 23 Aug 2023 16:27:12 -0600 Subject: [PATCH 4/6] DRY out fn handling --- qgreenland/config/helpers/layers/woa.py | 27 +++++++++---------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/qgreenland/config/helpers/layers/woa.py b/qgreenland/config/helpers/layers/woa.py index bf3f188c..5aa4d850 100644 --- a/qgreenland/config/helpers/layers/woa.py +++ b/qgreenland/config/helpers/layers/woa.py @@ -20,14 +20,8 @@ def id_str(*, depth: int, season: str, variable: str) -> str: return f"woa_{depth}m_{variable}_{season}" -TEMPERATURE_SEASONS_FNS: dict[str, str] = { - "winter": "woa23_decav91C0_t13_04.nc", - "summer": "woa23_decav91C0_t15_04.nc", -} -SALINITY_SEASONS_FNS: dict[str, str] = { - "winter": "woa23_decav91C0_s13_04.nc", - "summer": "woa23_decav91C0_s15_04.nc", -} +SEASONS = ("winter", "summer") + # Looks like these are the same for salinity. DEPTHS_BANDS: dict[int, int] = { 0: 1, @@ -37,13 +31,11 @@ def id_str(*, depth: int, season: str, variable: str) -> str: } # Sort by season first, then by depth -TEMPERATURE_COMBINATIONS = list( - product(TEMPERATURE_SEASONS_FNS.keys(), DEPTHS_BANDS.keys()) -) +TEMPERATURE_COMBINATIONS = list(product(SEASONS, DEPTHS_BANDS.keys())) TEMPERATURE_COMBINATIONS.sort(key=lambda x: x[0], reverse=True) TEMPERATURE_COMBINATIONS.sort(key=lambda x: x[1]) -SALINITY_COMBINATIONS = list(product(SALINITY_SEASONS_FNS.keys(), DEPTHS_BANDS.keys())) +SALINITY_COMBINATIONS = list(product(SEASONS, DEPTHS_BANDS.keys())) SALINITY_COMBINATIONS.sort(key=lambda x: x[0], reverse=True) SALINITY_COMBINATIONS.sort(key=lambda x: x[1]) @@ -58,12 +50,11 @@ def id_str(*, depth: int, season: str, variable: str) -> str: def get_fn(*, season, variable): - if variable == "temperature": - return TEMPERATURE_SEASONS_FNS[season] - elif variable == "salinity": - return SALINITY_SEASONS_FNS[season] - else: - raise RuntimeError(f"{variable} not recognized as a valid WOA variable.") + season_num = { + "winter": 13, + "summer": 15, + } + return f"woa23_decav91C0_{variable[0]}{season_num[season]}_04.nc" def make_layer(*, dataset, depth, season, variable, units) -> Layer: From 9d39f77ff3435baea81d96fd091c2b011bb95b7c Mon Sep 17 00:00:00 2001 From: Trey Stafford Date: Wed, 23 Aug 2023 16:28:02 -0600 Subject: [PATCH 5/6] Config lock --- qgreenland/config/cfg-lock.json | 831 +++++++++++++++++++++++++++++++- 1 file changed, 823 insertions(+), 8 deletions(-) diff --git a/qgreenland/config/cfg-lock.json b/qgreenland/config/cfg-lock.json index 9200b429..cc7bf380 100644 --- a/qgreenland/config/cfg-lock.json +++ b/qgreenland/config/cfg-lock.json @@ -2029,6 +2029,33 @@ "title": "World Digital Magnetic Anomaly Map" } }, + "woa_salinity": { + "assets": { + "seasonal_summer": { + "id": "seasonal_summer", + "urls": [ + "https://www.ncei.noaa.gov/thredds-ocean/fileServer/woa23/DATA/salinity/netcdf/decav91C0/0.25/woa23_decav91C0_s15_04.nc" + ], + "verify_tls": true + }, + "seasonal_winter": { + "id": "seasonal_winter", + "urls": [ + "https://www.ncei.noaa.gov/thredds-ocean/fileServer/woa23/DATA/salinity/netcdf/decav91C0/0.25/woa23_decav91C0_s13_04.nc" + ], + "verify_tls": true + } + }, + "id": "woa_salinity", + "metadata": { + "abstract": "The World Ocean Atlas (WOA) is a collection of objectively\nanalyzed, quality controlled temperature, salinity, oxygen,\nphosphate, silicate, and nitrate means based on profile data from\nthe World Ocean Database (WOD). It can be used to create boundary\nand/or initial conditions for a variety of ocean models, verify\nnumerical simulations of the ocean, and corroborate satellite\ndata.", + "citation": { + "text": "Reagan, J. R., D. Dukhovskoy, D. Seidov, T. P. Boyer,\nR. A. Locarnini, O. K. Baranova, A. V. Mishonov, H. E. Garcia,\nC. Bouchard, S. Cross, C. R. Paver, and Z. Wang (2023). World\nOcean Atlas 2023, Volume 2: Salinity. A. Mishonov Technical\nEd. NOAA Atlas NESDIS (in preparation).", + "url": "https://www.ncei.noaa.gov/products/world-ocean-atlas" + }, + "title": "World Ocean Atlas 2023, Volume 2: Salinity" + } + }, "woa_temperature": { "assets": { "seasonal_summer": { @@ -24864,7 +24891,7 @@ "children": [ { "layer_cfg": { - "description": "Average Seawater temperature at surface depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "description": "Average seawater temperature at surface depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", "id": "woa_0m_temperature_winter", "in_package": true, "input": { @@ -24960,7 +24987,7 @@ }, { "layer_cfg": { - "description": "Average Seawater temperature at surface depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "description": "Average seawater temperature at surface depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", "id": "woa_0m_temperature_summer", "in_package": true, "input": { @@ -25056,7 +25083,7 @@ }, { "layer_cfg": { - "description": "Average Seawater temperature at 50m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "description": "Average seawater temperature at 50m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", "id": "woa_50m_temperature_winter", "in_package": true, "input": { @@ -25152,7 +25179,7 @@ }, { "layer_cfg": { - "description": "Average Seawater temperature at 50m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "description": "Average seawater temperature at 50m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", "id": "woa_50m_temperature_summer", "in_package": true, "input": { @@ -25248,7 +25275,7 @@ }, { "layer_cfg": { - "description": "Average Seawater temperature at 200m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "description": "Average seawater temperature at 200m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", "id": "woa_200m_temperature_winter", "in_package": true, "input": { @@ -25344,7 +25371,7 @@ }, { "layer_cfg": { - "description": "Average Seawater temperature at 200m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "description": "Average seawater temperature at 200m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", "id": "woa_200m_temperature_summer", "in_package": true, "input": { @@ -25440,7 +25467,7 @@ }, { "layer_cfg": { - "description": "Average Seawater temperature at 500m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "description": "Average seawater temperature at 500m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", "id": "woa_500m_temperature_winter", "in_package": true, "input": { @@ -25536,7 +25563,7 @@ }, { "layer_cfg": { - "description": "Average Seawater temperature at 500m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "description": "Average seawater temperature at 500m depth\nin \u00b0C for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", "id": "woa_500m_temperature_summer", "in_package": true, "input": { @@ -25647,6 +25674,793 @@ "show": false } }, + { + "children": [ + { + "layer_cfg": { + "description": "Average seawater salinity at surface depth\nin practical salinity scale (PSS) for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "id": "woa_0m_salinity_winter", + "in_package": true, + "input": { + "asset": { + "id": "seasonal_winter" + }, + "dataset": { + "id": "woa_salinity" + } + }, + "show": false, + "steps": [ + { + "args": [ + "gdal_translate", + "-b", + "1", + "NETCDF:{input_dir}/woa23_decav91C0_s13_04.nc:s_an", + "{output_dir}/extracted.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-t_srs", + "EPSG:3413", + "-r", + "bilinear", + "-tr", + "25000", + "25000", + "-te", + "-5774572.727594967", + "-5774572.727594967", + "5774572.727594967", + "5774572.727594967", + "{input_dir}/extracted.tif", + "{output_dir}/warped.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-cutline", + "{assets_dir}/latitude_shape_40_degrees.geojson", + "-crop_to_cutline", + "-co", + "COMPRESS=DEFLATE", + "{input_dir}/warped.tif", + "{output_dir}/warped_and_cut.tif" + ], + "type": "command" + }, + { + "args": [ + "gdal_translate", + "-co", + "TILED=YES", + "-co", + "COMPRESS=DEFLATE", + "-co", + "PREDICTOR=3", + "{input_dir}/warped_and_cut.tif", + "{output_dir}/compressed.tif" + ], + "type": "command" + }, + { + "args": [ + "cp", + "{input_dir}/compressed.tif", + "{output_dir}/final.tif", + "&&", + "gdaladdo", + "-r", + "average", + "{output_dir}/final.tif", + "2", + "4", + "8", + "16" + ], + "type": "command" + } + ], + "style": "seawater_salinity", + "tags": [], + "title": "Surface, Winter" + }, + "name": "woa_0m_salinity_winter" + }, + { + "layer_cfg": { + "description": "Average seawater salinity at surface depth\nin practical salinity scale (PSS) for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "id": "woa_0m_salinity_summer", + "in_package": true, + "input": { + "asset": { + "id": "seasonal_summer" + }, + "dataset": { + "id": "woa_salinity" + } + }, + "show": false, + "steps": [ + { + "args": [ + "gdal_translate", + "-b", + "1", + "NETCDF:{input_dir}/woa23_decav91C0_s15_04.nc:s_an", + "{output_dir}/extracted.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-t_srs", + "EPSG:3413", + "-r", + "bilinear", + "-tr", + "25000", + "25000", + "-te", + "-5774572.727594967", + "-5774572.727594967", + "5774572.727594967", + "5774572.727594967", + "{input_dir}/extracted.tif", + "{output_dir}/warped.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-cutline", + "{assets_dir}/latitude_shape_40_degrees.geojson", + "-crop_to_cutline", + "-co", + "COMPRESS=DEFLATE", + "{input_dir}/warped.tif", + "{output_dir}/warped_and_cut.tif" + ], + "type": "command" + }, + { + "args": [ + "gdal_translate", + "-co", + "TILED=YES", + "-co", + "COMPRESS=DEFLATE", + "-co", + "PREDICTOR=3", + "{input_dir}/warped_and_cut.tif", + "{output_dir}/compressed.tif" + ], + "type": "command" + }, + { + "args": [ + "cp", + "{input_dir}/compressed.tif", + "{output_dir}/final.tif", + "&&", + "gdaladdo", + "-r", + "average", + "{output_dir}/final.tif", + "2", + "4", + "8", + "16" + ], + "type": "command" + } + ], + "style": "seawater_salinity", + "tags": [], + "title": "Surface, Summer" + }, + "name": "woa_0m_salinity_summer" + }, + { + "layer_cfg": { + "description": "Average seawater salinity at 50m depth\nin practical salinity scale (PSS) for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "id": "woa_50m_salinity_winter", + "in_package": true, + "input": { + "asset": { + "id": "seasonal_winter" + }, + "dataset": { + "id": "woa_salinity" + } + }, + "show": false, + "steps": [ + { + "args": [ + "gdal_translate", + "-b", + "11", + "NETCDF:{input_dir}/woa23_decav91C0_s13_04.nc:s_an", + "{output_dir}/extracted.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-t_srs", + "EPSG:3413", + "-r", + "bilinear", + "-tr", + "25000", + "25000", + "-te", + "-5774572.727594967", + "-5774572.727594967", + "5774572.727594967", + "5774572.727594967", + "{input_dir}/extracted.tif", + "{output_dir}/warped.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-cutline", + "{assets_dir}/latitude_shape_40_degrees.geojson", + "-crop_to_cutline", + "-co", + "COMPRESS=DEFLATE", + "{input_dir}/warped.tif", + "{output_dir}/warped_and_cut.tif" + ], + "type": "command" + }, + { + "args": [ + "gdal_translate", + "-co", + "TILED=YES", + "-co", + "COMPRESS=DEFLATE", + "-co", + "PREDICTOR=3", + "{input_dir}/warped_and_cut.tif", + "{output_dir}/compressed.tif" + ], + "type": "command" + }, + { + "args": [ + "cp", + "{input_dir}/compressed.tif", + "{output_dir}/final.tif", + "&&", + "gdaladdo", + "-r", + "average", + "{output_dir}/final.tif", + "2", + "4", + "8", + "16" + ], + "type": "command" + } + ], + "style": "seawater_salinity", + "tags": [], + "title": "50m, Winter" + }, + "name": "woa_50m_salinity_winter" + }, + { + "layer_cfg": { + "description": "Average seawater salinity at 50m depth\nin practical salinity scale (PSS) for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "id": "woa_50m_salinity_summer", + "in_package": true, + "input": { + "asset": { + "id": "seasonal_summer" + }, + "dataset": { + "id": "woa_salinity" + } + }, + "show": false, + "steps": [ + { + "args": [ + "gdal_translate", + "-b", + "11", + "NETCDF:{input_dir}/woa23_decav91C0_s15_04.nc:s_an", + "{output_dir}/extracted.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-t_srs", + "EPSG:3413", + "-r", + "bilinear", + "-tr", + "25000", + "25000", + "-te", + "-5774572.727594967", + "-5774572.727594967", + "5774572.727594967", + "5774572.727594967", + "{input_dir}/extracted.tif", + "{output_dir}/warped.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-cutline", + "{assets_dir}/latitude_shape_40_degrees.geojson", + "-crop_to_cutline", + "-co", + "COMPRESS=DEFLATE", + "{input_dir}/warped.tif", + "{output_dir}/warped_and_cut.tif" + ], + "type": "command" + }, + { + "args": [ + "gdal_translate", + "-co", + "TILED=YES", + "-co", + "COMPRESS=DEFLATE", + "-co", + "PREDICTOR=3", + "{input_dir}/warped_and_cut.tif", + "{output_dir}/compressed.tif" + ], + "type": "command" + }, + { + "args": [ + "cp", + "{input_dir}/compressed.tif", + "{output_dir}/final.tif", + "&&", + "gdaladdo", + "-r", + "average", + "{output_dir}/final.tif", + "2", + "4", + "8", + "16" + ], + "type": "command" + } + ], + "style": "seawater_salinity", + "tags": [], + "title": "50m, Summer" + }, + "name": "woa_50m_salinity_summer" + }, + { + "layer_cfg": { + "description": "Average seawater salinity at 200m depth\nin practical salinity scale (PSS) for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "id": "woa_200m_salinity_winter", + "in_package": true, + "input": { + "asset": { + "id": "seasonal_winter" + }, + "dataset": { + "id": "woa_salinity" + } + }, + "show": false, + "steps": [ + { + "args": [ + "gdal_translate", + "-b", + "25", + "NETCDF:{input_dir}/woa23_decav91C0_s13_04.nc:s_an", + "{output_dir}/extracted.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-t_srs", + "EPSG:3413", + "-r", + "bilinear", + "-tr", + "25000", + "25000", + "-te", + "-5774572.727594967", + "-5774572.727594967", + "5774572.727594967", + "5774572.727594967", + "{input_dir}/extracted.tif", + "{output_dir}/warped.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-cutline", + "{assets_dir}/latitude_shape_40_degrees.geojson", + "-crop_to_cutline", + "-co", + "COMPRESS=DEFLATE", + "{input_dir}/warped.tif", + "{output_dir}/warped_and_cut.tif" + ], + "type": "command" + }, + { + "args": [ + "gdal_translate", + "-co", + "TILED=YES", + "-co", + "COMPRESS=DEFLATE", + "-co", + "PREDICTOR=3", + "{input_dir}/warped_and_cut.tif", + "{output_dir}/compressed.tif" + ], + "type": "command" + }, + { + "args": [ + "cp", + "{input_dir}/compressed.tif", + "{output_dir}/final.tif", + "&&", + "gdaladdo", + "-r", + "average", + "{output_dir}/final.tif", + "2", + "4", + "8", + "16" + ], + "type": "command" + } + ], + "style": "seawater_salinity", + "tags": [], + "title": "200m, Winter" + }, + "name": "woa_200m_salinity_winter" + }, + { + "layer_cfg": { + "description": "Average seawater salinity at 200m depth\nin practical salinity scale (PSS) for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "id": "woa_200m_salinity_summer", + "in_package": true, + "input": { + "asset": { + "id": "seasonal_summer" + }, + "dataset": { + "id": "woa_salinity" + } + }, + "show": false, + "steps": [ + { + "args": [ + "gdal_translate", + "-b", + "25", + "NETCDF:{input_dir}/woa23_decav91C0_s15_04.nc:s_an", + "{output_dir}/extracted.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-t_srs", + "EPSG:3413", + "-r", + "bilinear", + "-tr", + "25000", + "25000", + "-te", + "-5774572.727594967", + "-5774572.727594967", + "5774572.727594967", + "5774572.727594967", + "{input_dir}/extracted.tif", + "{output_dir}/warped.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-cutline", + "{assets_dir}/latitude_shape_40_degrees.geojson", + "-crop_to_cutline", + "-co", + "COMPRESS=DEFLATE", + "{input_dir}/warped.tif", + "{output_dir}/warped_and_cut.tif" + ], + "type": "command" + }, + { + "args": [ + "gdal_translate", + "-co", + "TILED=YES", + "-co", + "COMPRESS=DEFLATE", + "-co", + "PREDICTOR=3", + "{input_dir}/warped_and_cut.tif", + "{output_dir}/compressed.tif" + ], + "type": "command" + }, + { + "args": [ + "cp", + "{input_dir}/compressed.tif", + "{output_dir}/final.tif", + "&&", + "gdaladdo", + "-r", + "average", + "{output_dir}/final.tif", + "2", + "4", + "8", + "16" + ], + "type": "command" + } + ], + "style": "seawater_salinity", + "tags": [], + "title": "200m, Summer" + }, + "name": "woa_200m_salinity_summer" + }, + { + "layer_cfg": { + "description": "Average seawater salinity at 500m depth\nin practical salinity scale (PSS) for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "id": "woa_500m_salinity_winter", + "in_package": true, + "input": { + "asset": { + "id": "seasonal_winter" + }, + "dataset": { + "id": "woa_salinity" + } + }, + "show": false, + "steps": [ + { + "args": [ + "gdal_translate", + "-b", + "37", + "NETCDF:{input_dir}/woa23_decav91C0_s13_04.nc:s_an", + "{output_dir}/extracted.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-t_srs", + "EPSG:3413", + "-r", + "bilinear", + "-tr", + "25000", + "25000", + "-te", + "-5774572.727594967", + "-5774572.727594967", + "5774572.727594967", + "5774572.727594967", + "{input_dir}/extracted.tif", + "{output_dir}/warped.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-cutline", + "{assets_dir}/latitude_shape_40_degrees.geojson", + "-crop_to_cutline", + "-co", + "COMPRESS=DEFLATE", + "{input_dir}/warped.tif", + "{output_dir}/warped_and_cut.tif" + ], + "type": "command" + }, + { + "args": [ + "gdal_translate", + "-co", + "TILED=YES", + "-co", + "COMPRESS=DEFLATE", + "-co", + "PREDICTOR=3", + "{input_dir}/warped_and_cut.tif", + "{output_dir}/compressed.tif" + ], + "type": "command" + }, + { + "args": [ + "cp", + "{input_dir}/compressed.tif", + "{output_dir}/final.tif", + "&&", + "gdaladdo", + "-r", + "average", + "{output_dir}/final.tif", + "2", + "4", + "8", + "16" + ], + "type": "command" + } + ], + "style": "seawater_salinity", + "tags": [], + "title": "500m, Winter" + }, + "name": "woa_500m_salinity_winter" + }, + { + "layer_cfg": { + "description": "Average seawater salinity at 500m depth\nin practical salinity scale (PSS) for the 1991 - 2020 climate normal period.\n\nClimate normals, defined as 30-year averages of data by the World\nMeteorological Organization (WMO), provide long-term means for\ninitializing models, environmental studies, checking in situ\nobservations, etc.\n\nComparing new observations to the most recent climate normal allows\none to assess whether or not current observations are within the\nstatistical norm in the context of the most recent 30-year\nclimatological background. Additional applications, such as\ninitializing boundary conditions for climate models or assessing\nremotely sensed observations, also require a more recent\nclimatology.", + "id": "woa_500m_salinity_summer", + "in_package": true, + "input": { + "asset": { + "id": "seasonal_summer" + }, + "dataset": { + "id": "woa_salinity" + } + }, + "show": false, + "steps": [ + { + "args": [ + "gdal_translate", + "-b", + "37", + "NETCDF:{input_dir}/woa23_decav91C0_s15_04.nc:s_an", + "{output_dir}/extracted.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-t_srs", + "EPSG:3413", + "-r", + "bilinear", + "-tr", + "25000", + "25000", + "-te", + "-5774572.727594967", + "-5774572.727594967", + "5774572.727594967", + "5774572.727594967", + "{input_dir}/extracted.tif", + "{output_dir}/warped.tif" + ], + "type": "command" + }, + { + "args": [ + "gdalwarp", + "-cutline", + "{assets_dir}/latitude_shape_40_degrees.geojson", + "-crop_to_cutline", + "-co", + "COMPRESS=DEFLATE", + "{input_dir}/warped.tif", + "{output_dir}/warped_and_cut.tif" + ], + "type": "command" + }, + { + "args": [ + "gdal_translate", + "-co", + "TILED=YES", + "-co", + "COMPRESS=DEFLATE", + "-co", + "PREDICTOR=3", + "{input_dir}/warped_and_cut.tif", + "{output_dir}/compressed.tif" + ], + "type": "command" + }, + { + "args": [ + "cp", + "{input_dir}/compressed.tif", + "{output_dir}/final.tif", + "&&", + "gdaladdo", + "-r", + "average", + "{output_dir}/final.tif", + "2", + "4", + "8", + "16" + ], + "type": "command" + } + ], + "style": "seawater_salinity", + "tags": [], + "title": "500m, Summer" + }, + "name": "woa_500m_salinity_summer" + } + ], + "name": "Seawater salinity (25km)", + "settings": { + "expand": false, + "order": [ + ":woa_0m_salinity_winter", + ":woa_0m_salinity_summer", + ":woa_50m_salinity_winter", + ":woa_50m_salinity_summer", + ":woa_200m_salinity_winter", + ":woa_200m_salinity_summer", + ":woa_500m_salinity_winter", + ":woa_500m_salinity_summer" + ], + "show": false + } + }, { "children": [ { @@ -25757,6 +26571,7 @@ "order": [ "Undersea feature names", "Seawater temperature (25km)", + "Seawater salinity (25km)", "Bathymetry" ], "show": false From d9a26462ae60df89b12025867397f15d51286669 Mon Sep 17 00:00:00 2001 From: Trey Stafford Date: Wed, 23 Aug 2023 16:32:18 -0600 Subject: [PATCH 6/6] Add CHANGELOG entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8805ce56..5ddc7e9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,8 @@ - Add new "Biology/Vegetation/Vegetation classification map (1km)" layer from the Raster Circumpolar Arctic Vegetation Map produced by Raynolds et al., 2019. +- Add new "Oceanography/Seawater salinity (25km)" layers from the World Ocean + Atlas 2023. ### Updated