From e1c485510a4b913e33d7da7fe327adbe97656a9b Mon Sep 17 00:00:00 2001 From: Anton Darmenov Date: Fri, 15 Dec 2023 12:22:24 -0500 Subject: [PATCH 1/3] Extend the functionality of DataSea This commit improves the symmetry between DataSea and 'true' ocean. DataSea uses ExtData to provide surface currents and ocean depth. The default configuration of DataSea does not require new datasets and minimizes IO; currents remain set to zero (UW = VW = 0). --- GEOS_OceanGridComp.F90 | 1 + GEOSdatasea_GridComp/CMakeLists.txt | 5 +++ GEOSdatasea_GridComp/DataSea_ExtData.yaml | 33 +++++++++++++++++++ GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90 | 28 ++++++++++++++-- .../GEOS_DataSea_StateSpecs.rc | 4 +++ 5 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 GEOSdatasea_GridComp/DataSea_ExtData.yaml diff --git a/GEOS_OceanGridComp.F90 b/GEOS_OceanGridComp.F90 index e244545..ed24244 100644 --- a/GEOS_OceanGridComp.F90 +++ b/GEOS_OceanGridComp.F90 @@ -165,6 +165,7 @@ subroutine SetServices ( GC, RC ) call MAPL_AddExportSpec (GC, SHORT_NAME = 'SW', CHILD_ID = OCN, _RC) call MAPL_AddExportSpec (GC, SHORT_NAME = 'UW', CHILD_ID = OCN, _RC) call MAPL_AddExportSpec (GC, SHORT_NAME = 'VW', CHILD_ID = OCN, _RC) + call MAPL_AddExportSpec (GC, SHORT_NAME = 'DW', CHILD_ID = OCN, _RC) if(DO_DATASEA==0) then call MAPL_AddExportSpec (GC, SHORT_NAME = 'DH', CHILD_ID = OCN, _RC) diff --git a/GEOSdatasea_GridComp/CMakeLists.txt b/GEOSdatasea_GridComp/CMakeLists.txt index 49424ed..687d04a 100644 --- a/GEOSdatasea_GridComp/CMakeLists.txt +++ b/GEOSdatasea_GridComp/CMakeLists.txt @@ -5,3 +5,8 @@ esma_add_library (${this} SRCS GEOS_DataSeaGridComp.F90 DEPENDENCIES MAPL esmf N mapl_acg (${this} GEOS_DataSea_StateSpecs.rc IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS GET_POINTERS DECLARE_POINTERS) + +install ( + FILES DataSea_ExtData.yaml + DESTINATION etc +) diff --git a/GEOSdatasea_GridComp/DataSea_ExtData.yaml b/GEOSdatasea_GridComp/DataSea_ExtData.yaml new file mode 100644 index 0000000..0ee4384 --- /dev/null +++ b/GEOSdatasea_GridComp/DataSea_ExtData.yaml @@ -0,0 +1,33 @@ +Exports: + DATA_UW: + collection: /dev/null + DATA_VW: + collection: /dev/null + DATA_DW: + collection: /dev/null + linear_transformation: [-3682.0, 0.0] + +# -- +# +# Comment: +# configuration: GEOS/WGCM +# description: realistic currents and ocean depth +# +# Samplings: +# static: +# extrapolation: persist_closest +# +# Collections: +# gebco_terrain_model_for_ocean_and_land: +# template: /discover/nobackup/projects/gmao/geos-wmma/data/gebco2008.ocean_depth.nc4 +# s2s_ana_ocean: +# template: /discover/nobackup/projects/gmao/geos-wmma/data/S2S-2_1_ANA_001/S2S-2_1_ANA_001.geosgcm_ocn2d_720x361.%y4%m2%d2_1200z.nc4 +# +# Exports: +# DATA_UW;DATA_VW: +# collection: /dev/null +# variable: none;none +# DATA_DW: +# collection: gebco_terrain_model_for_ocean_and_land +# sample: static +# variable: elevation diff --git a/GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90 b/GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90 index 9d19913..ac426ac 100644 --- a/GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90 +++ b/GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90 @@ -168,6 +168,9 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC ) real, pointer, dimension(:,:) :: TNEW => null() real, pointer, dimension(:,:) :: F1 => null() + real, parameter :: MAX_SPEED = 1e1 ! maximum surface current speed, m s-1 + real, parameter :: MAX_TERRAIN = 12e3 ! maximum elevation/depth, m + ! Pointers to imports and exports #include "GEOS_DataSea_DeclarePointer___.h" @@ -255,8 +258,29 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC ) ! Update the exports !-------------------- - if(associated(UW)) UW = 0.0 - if(associated(VW)) VW = 0.0 + if (associated(UW)) then + where (abs(DATA_UW) < MAX_SPEED) + UW = DATA_UW + elsewhere + UW = 0.0 + end where + end if + + if (associated(VW)) then + where (abs(DATA_VW) < MAX_SPEED) + VW = DATA_VW + elsewhere + VW = 0.0 + end where + end if + + if (associated(DW)) then + where (abs(DATA_DW) < MAX_TERRAIN) + DW = DATA_DW + elsewhere + DW = 0.0 + end where + end if TICE = MAPL_TICE-1.8 diff --git a/GEOSdatasea_GridComp/GEOS_DataSea_StateSpecs.rc b/GEOSdatasea_GridComp/GEOS_DataSea_StateSpecs.rc index 5c0710c..e9fddae 100644 --- a/GEOSdatasea_GridComp/GEOS_DataSea_StateSpecs.rc +++ b/GEOSdatasea_GridComp/GEOS_DataSea_StateSpecs.rc @@ -10,6 +10,9 @@ category: IMPORT FRACICE | 1 | xy | N | | fractional_cover_of_seaice DATA_SST | K | xy | N | ocean_extData | sea_surface_temperature DATA_SSS | PSU | xy | N | ocean_sssData | sea_surface_salinity + DATA_UW | m s-1 | xy | N | | zonal_velocity_of_surface_water + DATA_VW | m s-1 | xy | N | | meridional_velocity_of_surface_water + DATA_DW | m | xy | N | | sea_floor_depth category: EXPORT #---------------------------------------------------------------------------------------- @@ -19,6 +22,7 @@ category: EXPORT #---------------------------------------------------------------------------------------- UW | m s-1 | xy | N | zonal_velocity_of_surface_water VW | m s-1 | xy | N | meridional_velocity_of_surface_water + DW | m | xy | N | sea_floor_depth TW | K | xy | N | foundation_temperature_for_interface_layer SW | PSU | xy | N | foundation_salinity_for_interface_layer From 5edf8a1951fabaa7eb60bf6cf628f3d82ba81ce9 Mon Sep 17 00:00:00 2001 From: Anton Darmenov Date: Fri, 5 Jan 2024 11:37:36 -0500 Subject: [PATCH 2/3] Remove depth from the export scpecs --- GEOS_OceanGridComp.F90 | 1 - GEOSdatasea_GridComp/DataSea_ExtData.yaml | 28 ------------------- GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90 | 11 +------- .../GEOS_DataSea_StateSpecs.rc | 2 -- 4 files changed, 1 insertion(+), 41 deletions(-) diff --git a/GEOS_OceanGridComp.F90 b/GEOS_OceanGridComp.F90 index ed24244..e244545 100644 --- a/GEOS_OceanGridComp.F90 +++ b/GEOS_OceanGridComp.F90 @@ -165,7 +165,6 @@ subroutine SetServices ( GC, RC ) call MAPL_AddExportSpec (GC, SHORT_NAME = 'SW', CHILD_ID = OCN, _RC) call MAPL_AddExportSpec (GC, SHORT_NAME = 'UW', CHILD_ID = OCN, _RC) call MAPL_AddExportSpec (GC, SHORT_NAME = 'VW', CHILD_ID = OCN, _RC) - call MAPL_AddExportSpec (GC, SHORT_NAME = 'DW', CHILD_ID = OCN, _RC) if(DO_DATASEA==0) then call MAPL_AddExportSpec (GC, SHORT_NAME = 'DH', CHILD_ID = OCN, _RC) diff --git a/GEOSdatasea_GridComp/DataSea_ExtData.yaml b/GEOSdatasea_GridComp/DataSea_ExtData.yaml index 0ee4384..3fa1813 100644 --- a/GEOSdatasea_GridComp/DataSea_ExtData.yaml +++ b/GEOSdatasea_GridComp/DataSea_ExtData.yaml @@ -3,31 +3,3 @@ Exports: collection: /dev/null DATA_VW: collection: /dev/null - DATA_DW: - collection: /dev/null - linear_transformation: [-3682.0, 0.0] - -# -- -# -# Comment: -# configuration: GEOS/WGCM -# description: realistic currents and ocean depth -# -# Samplings: -# static: -# extrapolation: persist_closest -# -# Collections: -# gebco_terrain_model_for_ocean_and_land: -# template: /discover/nobackup/projects/gmao/geos-wmma/data/gebco2008.ocean_depth.nc4 -# s2s_ana_ocean: -# template: /discover/nobackup/projects/gmao/geos-wmma/data/S2S-2_1_ANA_001/S2S-2_1_ANA_001.geosgcm_ocn2d_720x361.%y4%m2%d2_1200z.nc4 -# -# Exports: -# DATA_UW;DATA_VW: -# collection: /dev/null -# variable: none;none -# DATA_DW: -# collection: gebco_terrain_model_for_ocean_and_land -# sample: static -# variable: elevation diff --git a/GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90 b/GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90 index ac426ac..f21f54b 100644 --- a/GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90 +++ b/GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90 @@ -168,8 +168,7 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC ) real, pointer, dimension(:,:) :: TNEW => null() real, pointer, dimension(:,:) :: F1 => null() - real, parameter :: MAX_SPEED = 1e1 ! maximum surface current speed, m s-1 - real, parameter :: MAX_TERRAIN = 12e3 ! maximum elevation/depth, m + real, parameter :: MAX_SPEED = 10.0 ! maximum surface current speed, m s-1 ! Pointers to imports and exports #include "GEOS_DataSea_DeclarePointer___.h" @@ -274,14 +273,6 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC ) end where end if - if (associated(DW)) then - where (abs(DATA_DW) < MAX_TERRAIN) - DW = DATA_DW - elsewhere - DW = 0.0 - end where - end if - TICE = MAPL_TICE-1.8 if (adjSST == 1) then diff --git a/GEOSdatasea_GridComp/GEOS_DataSea_StateSpecs.rc b/GEOSdatasea_GridComp/GEOS_DataSea_StateSpecs.rc index e9fddae..36835fe 100644 --- a/GEOSdatasea_GridComp/GEOS_DataSea_StateSpecs.rc +++ b/GEOSdatasea_GridComp/GEOS_DataSea_StateSpecs.rc @@ -12,7 +12,6 @@ category: IMPORT DATA_SSS | PSU | xy | N | ocean_sssData | sea_surface_salinity DATA_UW | m s-1 | xy | N | | zonal_velocity_of_surface_water DATA_VW | m s-1 | xy | N | | meridional_velocity_of_surface_water - DATA_DW | m | xy | N | | sea_floor_depth category: EXPORT #---------------------------------------------------------------------------------------- @@ -22,7 +21,6 @@ category: EXPORT #---------------------------------------------------------------------------------------- UW | m s-1 | xy | N | zonal_velocity_of_surface_water VW | m s-1 | xy | N | meridional_velocity_of_surface_water - DW | m | xy | N | sea_floor_depth TW | K | xy | N | foundation_temperature_for_interface_layer SW | PSU | xy | N | foundation_salinity_for_interface_layer From 547b0709621ade3be1320436f8abf4f49c18e0b9 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 10 Jan 2024 12:08:17 -0500 Subject: [PATCH 3/3] Move to circleci-tools v2 orb --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 826bbed..4b65c90 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ version: 2.1 #bcs_version: &bcs_version v11.3.0 orbs: - ci: geos-esm/circleci-tools@1 + ci: geos-esm/circleci-tools@2 workflows: build-test: