From f441e83e7d286305cfa2df74b2222b14fdafa790 Mon Sep 17 00:00:00 2001 From: Felicity Chun Date: Thu, 5 Feb 2026 14:01:43 +1100 Subject: [PATCH 1/4] edit for 23 --- esmvaltool/cmorizers/data/cmor_config/WOA.yml | 53 ++++++++++--------- .../data/downloaders/datasets/woa.py | 14 ++--- .../cmorizers/data/formatters/datasets/woa.py | 9 ++-- 3 files changed, 40 insertions(+), 36 deletions(-) diff --git a/esmvaltool/cmorizers/data/cmor_config/WOA.yml b/esmvaltool/cmorizers/data/cmor_config/WOA.yml index 72e5e0f48d..ac54d7e21b 100644 --- a/esmvaltool/cmorizers/data/cmor_config/WOA.yml +++ b/esmvaltool/cmorizers/data/cmor_config/WOA.yml @@ -15,50 +15,51 @@ attributes: # WOA18 project_id: OBS6 - short_name: woa18 - version: '2018' - source: 'https://www.ncei.noaa.gov/data/oceans/woa/WOA18/DATA/' + short_name: woa23 + version: '2023' + source: 'https://www.ncei.noaa.gov/data/oceans/woa/WOA23/DATA/' reference: 'woa2018' comment: '' # Variables to cmorize (here use only filename prefix) # Temperature and salinity from 1981-2010 climatology (81B0) +# decav seven decadal means 1955 - 2022 #updates variables: thetao: mip: Omon raw_var: t_an name: temperature - file: decav81B0_t + file: decav_t srf_var: tos so: mip: Omon raw_var: s_an name: salinity - file: decav81B0_s + file: decav_s srf_var: sos - o2: - mip: Oyr - raw_var: o_an - name: oxygen - file: all_o - no3: - mip: Oyr - raw_var: n_an - name: nitrate - file: all_n - po4: - mip: Oyr - raw_var: p_an - name: phosphate - file: all_p - si: - mip: Oyr - raw_var: i_an - name: silicate - file: all_i + # o2: + # mip: Oyr + # raw_var: o_an + # name: oxygen + # file: all_o + # no3: + # mip: Oyr + # raw_var: n_an + # name: nitrate + # file: all_n + # po4: + # mip: Oyr + # raw_var: p_an + # name: phosphate + # file: all_p + # si: + # mip: Oyr + # raw_var: i_an + # name: silicate + # file: all_i # Custom dictionary for this cmorizer custom: reference_year: 2000 - resolution: '1.00' + resolution: '0.25' diff --git a/esmvaltool/cmorizers/data/downloaders/datasets/woa.py b/esmvaltool/cmorizers/data/downloaders/datasets/woa.py index 5ff75ff390..f9da835884 100644 --- a/esmvaltool/cmorizers/data/downloaders/datasets/woa.py +++ b/esmvaltool/cmorizers/data/downloaders/datasets/woa.py @@ -43,17 +43,17 @@ def download_dataset( def download(file): downloader.download_file( - "https://www.ncei.noaa.gov/data/oceans/woa/WOA18/DATA/" + file, + "https://www.ncei.noaa.gov/data/oceans/woa/WOA23/DATA/" + file, wget_options=[], ) data_paths = [ - "nitrate/netcdf/all/1.00/woa18_all_n00_01.nc", - "oxygen/netcdf/all/1.00/woa18_all_o00_01.nc", - "phosphate/netcdf/all/1.00/woa18_all_p00_01.nc", - "salinity/netcdf/decav81B0/1.00/woa18_decav81B0_s00_01.nc", - "silicate/netcdf/all/1.00/woa18_all_i00_01.nc", - "temperature/netcdf/decav81B0/1.00/woa18_decav81B0_t00_01.nc", + # "nitrate/netcdf/all/1.00/woa18_all_n00_01.nc", + # "oxygen/netcdf/all/1.00/woa18_all_o00_01.nc", + # "phosphate/netcdf/all/1.00/woa18_all_p00_01.nc", + "salinity/netcdf/decav/0.25/woa23_decav_s00_04.nc", + # "silicate/netcdf/all/1.00/woa18_all_i00_01.nc", + "temperature/netcdf/decav/0.25/woa23_decav_t00_04.nc", ] for source_file in data_paths: diff --git a/esmvaltool/cmorizers/data/formatters/datasets/woa.py b/esmvaltool/cmorizers/data/formatters/datasets/woa.py index 697ac88695..f7836d97ce 100644 --- a/esmvaltool/cmorizers/data/formatters/datasets/woa.py +++ b/esmvaltool/cmorizers/data/formatters/datasets/woa.py @@ -53,7 +53,7 @@ def _fix_data(cube, var, version): """Specific data fixes for different variables.""" logger.info("Fixing data ...") - if version == "2018": + if version in ["2018", "2023"]: with constant_metadata(cube): if var in ["o2", "po4", "si", "no3"]: cube /= 1000.0 # Convert from umol/kg to mol/m^3 @@ -76,12 +76,15 @@ def collect_files(in_dir, var, cfg): file_list = [] var_dict = cfg["variables"][var] in_dir = os.path.join(in_dir, var_dict["name"]) - + #/g/data/av17/access-nri/OM3/woa23 root, remove Tier2, woa, replace with woa23 + #not storing it in a RAWOBS/TierX/WOA (X=2 or 3) directory structure? + + # for m in range(0,13): 01-12 merge months? f%02d fname = ( cfg["attributes"]["short_name"].lower() + "_" + var_dict["file"] - + "00_01.nc" + + "00_04.nc" #04 quarter resolution, 01 degree ) in_file = os.path.join(in_dir, fname) file_list.append(in_file) From 353aadf7cfb15a5f3f9b910ac0cf05a7ab301f09 Mon Sep 17 00:00:00 2001 From: Felicity Chun Date: Fri, 13 Feb 2026 14:34:59 +1100 Subject: [PATCH 2/4] update woa23 1deg --- esmvaltool/cmorizers/data/cmor_config/WOA.yml | 49 +++++++++---------- .../data/downloaders/datasets/woa.py | 12 ++--- .../cmorizers/data/formatters/datasets/woa.py | 9 ++-- esmvaltool/references/woa2023.bibtex | 8 +++ 4 files changed, 42 insertions(+), 36 deletions(-) create mode 100644 esmvaltool/references/woa2023.bibtex diff --git a/esmvaltool/cmorizers/data/cmor_config/WOA.yml b/esmvaltool/cmorizers/data/cmor_config/WOA.yml index ac54d7e21b..ddeff67505 100644 --- a/esmvaltool/cmorizers/data/cmor_config/WOA.yml +++ b/esmvaltool/cmorizers/data/cmor_config/WOA.yml @@ -13,18 +13,17 @@ attributes: # source: 'https://www.ncei.noaa.gov/data/oceans/woa/WOA13/DATAv2/' # reference: 'woa2013v2' - # WOA18 + # WOA23 project_id: OBS6 short_name: woa23 version: '2023' source: 'https://www.ncei.noaa.gov/data/oceans/woa/WOA23/DATA/' - reference: 'woa2018' + reference: 'woa2023' comment: '' # Variables to cmorize (here use only filename prefix) -# Temperature and salinity from 1981-2010 climatology (81B0) -# decav seven decadal means 1955 - 2022 #updates +# decav seven decadal means 1955 - 2022 # WOA23 update variables: thetao: mip: Omon @@ -38,28 +37,28 @@ variables: name: salinity file: decav_s srf_var: sos - # o2: - # mip: Oyr - # raw_var: o_an - # name: oxygen - # file: all_o - # no3: - # mip: Oyr - # raw_var: n_an - # name: nitrate - # file: all_n - # po4: - # mip: Oyr - # raw_var: p_an - # name: phosphate - # file: all_p - # si: - # mip: Oyr - # raw_var: i_an - # name: silicate - # file: all_i + o2: + mip: Oyr + raw_var: o_an + name: oxygen + file: all_o + no3: + mip: Oyr + raw_var: n_an + name: nitrate + file: all_n + po4: + mip: Oyr + raw_var: p_an + name: phosphate + file: all_p + si: + mip: Oyr + raw_var: i_an + name: silicate + file: all_i # Custom dictionary for this cmorizer custom: reference_year: 2000 - resolution: '0.25' + resolution: '1.00' # 0.25 or 1.00 available for temperature and salinity diff --git a/esmvaltool/cmorizers/data/downloaders/datasets/woa.py b/esmvaltool/cmorizers/data/downloaders/datasets/woa.py index f9da835884..eacbea7470 100644 --- a/esmvaltool/cmorizers/data/downloaders/datasets/woa.py +++ b/esmvaltool/cmorizers/data/downloaders/datasets/woa.py @@ -48,12 +48,12 @@ def download(file): ) data_paths = [ - # "nitrate/netcdf/all/1.00/woa18_all_n00_01.nc", - # "oxygen/netcdf/all/1.00/woa18_all_o00_01.nc", - # "phosphate/netcdf/all/1.00/woa18_all_p00_01.nc", - "salinity/netcdf/decav/0.25/woa23_decav_s00_04.nc", - # "silicate/netcdf/all/1.00/woa18_all_i00_01.nc", - "temperature/netcdf/decav/0.25/woa23_decav_t00_04.nc", + "nitrate/netcdf/all/1.00/woa23_all_n00_01.nc", + "oxygen/netcdf/all/1.00/woa23_all_o00_01.nc", + "phosphate/netcdf/all/1.00/woa23_all_p00_01.nc", + "salinity/netcdf/decav/1.00/woa23_decav_s00_01.nc", + "silicate/netcdf/all/1.00/woa23_all_i00_01.nc", + "temperature/netcdf/decav/1.00/woa23_decav_t00_01.nc", ] for source_file in data_paths: diff --git a/esmvaltool/cmorizers/data/formatters/datasets/woa.py b/esmvaltool/cmorizers/data/formatters/datasets/woa.py index f7836d97ce..c9a709bedf 100644 --- a/esmvaltool/cmorizers/data/formatters/datasets/woa.py +++ b/esmvaltool/cmorizers/data/formatters/datasets/woa.py @@ -4,6 +4,7 @@ Tier 2: other freely-available dataset. Source + WOA23: https://www.ncei.noaa.gov/data/oceans/woa/WOA23/DATA WOA18: https://www.ncei.noaa.gov/data/oceans/woa/WOA18/DATA WOA13: https://www.ncei.noaa.gov/data/oceans/woa/WOA13/DATAv2 @@ -24,6 +25,7 @@ Modification history + 20230213-chun_felicity: WOA23 update 20210311-lovato_tomas: handle WOA18/WOA13, raw data download, use OBS6 20200911-bock_lisa: extend to WOA18 20190328-lovato_tomas: cmorizer revision @@ -76,15 +78,12 @@ def collect_files(in_dir, var, cfg): file_list = [] var_dict = cfg["variables"][var] in_dir = os.path.join(in_dir, var_dict["name"]) - #/g/data/av17/access-nri/OM3/woa23 root, remove Tier2, woa, replace with woa23 - #not storing it in a RAWOBS/TierX/WOA (X=2 or 3) directory structure? - - # for m in range(0,13): 01-12 merge months? f%02d + fname = ( cfg["attributes"]["short_name"].lower() + "_" + var_dict["file"] - + "00_04.nc" #04 quarter resolution, 01 degree + + "00_01.nc" ) in_file = os.path.join(in_dir, fname) file_list.append(in_file) diff --git a/esmvaltool/references/woa2023.bibtex b/esmvaltool/references/woa2023.bibtex new file mode 100644 index 0000000000..c4dfdea8bd --- /dev/null +++ b/esmvaltool/references/woa2023.bibtex @@ -0,0 +1,8 @@ +@misc{https://doi.org/10.25921/va26-hv25, + doi = {10.25921/VA26-HV25}, + url = {https://www.ncei.noaa.gov/archive/accession/NCEI-WOA23}, + author = {Reagan, James R. and Boyer, Tim P. and García, Hernán E. and Locarnini, Ricardo A. and Baranova, Olga K. and Bouchard, Courtney and Cross, Scott L. and Mishonov, Alexey V. and Paver, Christopher R. and Seidov, Dan and Wang, Zhankun and Dukhovskoy, Dmitry}, + title = {World Ocean Atlas 2023}, + publisher = {NOAA National Centers for Environmental Information}, + year = {2023} +} \ No newline at end of file From 0dfb149670f663fc7a4f0b148e8870238f081dab Mon Sep 17 00:00:00 2001 From: Felicity Chun Date: Mon, 16 Feb 2026 13:51:49 +1100 Subject: [PATCH 3/4] clean bibtex --- esmvaltool/references/woa2023.bibtex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esmvaltool/references/woa2023.bibtex b/esmvaltool/references/woa2023.bibtex index c4dfdea8bd..2c07adb88e 100644 --- a/esmvaltool/references/woa2023.bibtex +++ b/esmvaltool/references/woa2023.bibtex @@ -5,4 +5,4 @@ title = {World Ocean Atlas 2023}, publisher = {NOAA National Centers for Environmental Information}, year = {2023} -} \ No newline at end of file +} From 36245c16601fd1835515db7f3ad182a046b80a7e Mon Sep 17 00:00:00 2001 From: Felicity Chun Date: Thu, 19 Feb 2026 09:25:32 +1100 Subject: [PATCH 4/4] update recipe_check_obs and tests using old version --- esmvaltool/recipes/examples/recipe_check_obs.yml | 2 +- tests/integration/test_cmorizer.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/esmvaltool/recipes/examples/recipe_check_obs.yml b/esmvaltool/recipes/examples/recipe_check_obs.yml index 0d6dbf18db..0a0891864c 100644 --- a/esmvaltool/recipes/examples/recipe_check_obs.yml +++ b/esmvaltool/recipes/examples/recipe_check_obs.yml @@ -1123,7 +1123,7 @@ diagnostics: mip: Oyr additional_datasets: - {dataset: WOA, project: OBS6, tier: 2, - type: clim, version: 2018, start_year: 2000, end_year: 2000} + type: clim, version: 2023, start_year: 2000, end_year: 2000} - {dataset: WOA, project: OBS, tier: 2, type: clim, version: 2013v2, start_year: 2000, end_year: 2000} scripts: null diff --git a/tests/integration/test_cmorizer.py b/tests/integration/test_cmorizer.py index 654ce61647..5aec62bac1 100644 --- a/tests/integration/test_cmorizer.py +++ b/tests/integration/test_cmorizer.py @@ -87,12 +87,12 @@ def put_dummy_data(data_path: Path) -> None: """Create a small dummy netCDF file to be cmorized.""" data_info = [ # dir_name, file_name_prefix, var_name - ("temperature", "woa18_decav81B0_t", "t_an"), - ("salinity", "woa18_decav81B0_s", "s_an"), - ("oxygen", "woa18_all_o", "o_an"), - ("nitrate", "woa18_all_n", "n_an"), - ("phosphate", "woa18_all_p", "p_an"), - ("silicate", "woa18_all_i", "i_an"), + ("temperature", "woa23_decav_t", "t_an"), + ("salinity", "woa23_decav_s", "s_an"), + ("oxygen", "woa23_all_o", "o_an"), + ("nitrate", "woa23_all_n", "n_an"), + ("phosphate", "woa23_all_p", "p_an"), + ("silicate", "woa23_all_i", "i_an"), ] for dir_name, file_name_prefix, var_name in data_info: