Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMMA #59

Merged
merged 5 commits into from
Jan 26, 2024
Merged

WMMA #59

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GEOS_OceanGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions GEOSdatasea_GridComp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
33 changes: 33 additions & 0 deletions GEOSdatasea_GridComp/DataSea_ExtData.yaml
Original file line number Diff line number Diff line change
@@ -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:
adarmenov marked this conversation as resolved.
Show resolved Hide resolved
# 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
28 changes: 26 additions & 2 deletions GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions GEOSdatasea_GridComp/GEOS_DataSea_StateSpecs.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
#----------------------------------------------------------------------------------------
Expand All @@ -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

Expand Down
Loading