Completion of the OSMOSIS diagnostic output

Context

A developer of the OSMOSIS ocean surface boundary-layer scheme has reported that the output of the fields hbl and hmle appears to be incorrect. This defect is presumably present in both the current release version and the main branch, as the OSMOSIS implementation (file src/OCE/ZDF/zdfosm.F90) is unchanged between these source-code versions.

Analysis

The output wrapper subroutines for 2D and 3D arrays (accessible via the generic interface zdf_osm_iomput) both appear to contain the same defect that prevents the transfer of the respective array to the output subroutine iom_put when no halo addition is required. This issue affects the output of the OSMOSIS fields ghamt, ghams, ghamu, ghamv, hbl, and hmle.

Fix

The adjustment

--- a/src/OCE/ZDF/zdfosm.F90
+++ b/src/OCE/ZDF/zdfosm.F90
@@ -3450,7 +3450,7 @@ CONTAINS
             osmdia2d(A2D(0)) = posmdia2d(:,:)
             CALL iom_put( cdname, osmdia2d(A2D(nn_hls)) )
          ELSE   ! Halo present
-            CALL iom_put( cdname, osmdia2d )
+            CALL iom_put( cdname, posmdia2d )
          END IF
       END IF
       !
@@ -3473,7 +3473,7 @@ CONTAINS
             osmdia3d(A2D(0),:) = posmdia3d(:,:,:)
             CALL iom_put( cdname, osmdia3d(A2D(nn_hls),:) )
          ELSE   ! Halo present
-            CALL iom_put( cdname, osmdia3d )
+            CALL iom_put( cdname, posmdia3d )
          END IF
       END IF
       !

enables the output of OSMOSIS output fields ghamt, ghams, ghamu, ghamv, hbl, and hmle.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information