Skip to content

Commit

Permalink
Merge pull request #59 from GEOS-ESM/feature/adarmenov/integrate-wmma
Browse files Browse the repository at this point in the history
WMMA
  • Loading branch information
sanAkel authored Jan 26, 2024
2 parents da27f61 + 793207b commit 66c664b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
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
)
5 changes: 5 additions & 0 deletions GEOSdatasea_GridComp/DataSea_ExtData.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Exports:
DATA_UW:
collection: /dev/null
DATA_VW:
collection: /dev/null
19 changes: 17 additions & 2 deletions GEOSdatasea_GridComp/GEOS_DataSeaGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
real, pointer, dimension(:,:) :: TNEW => null()
real, pointer, dimension(:,:) :: F1 => null()

real, parameter :: MAX_SPEED = 10.0 ! maximum surface current speed, m s-1

! Pointers to imports and exports
#include "GEOS_DataSea_DeclarePointer___.h"

Expand Down Expand Up @@ -255,8 +257,21 @@ 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

TICE = MAPL_TICE-1.8

Expand Down
2 changes: 2 additions & 0 deletions GEOSdatasea_GridComp/GEOS_DataSea_StateSpecs.rc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ 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

category: EXPORT
#----------------------------------------------------------------------------------------
Expand Down

0 comments on commit 66c664b

Please sign in to comment.