Skip to content
Snippets Groups Projects
Commit 672e3519 authored by Sebastien Masson's avatar Sebastien Masson
Browse files

Resolve "error in coupled model initialization"

parent 36262173
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,9 @@ MODULE cpl_oasis3 ...@@ -25,6 +25,9 @@ MODULE cpl_oasis3
!!---------------------------------------------------------------------- !!----------------------------------------------------------------------
#if defined key_oasis3 #if defined key_oasis3
USE mod_oasis ! OASIS3-MCT module USE mod_oasis ! OASIS3-MCT module
#endif
#if defined key_xios
USE xios ! I/O server
#endif #endif
USE par_oce ! ocean parameters USE par_oce ! ocean parameters
USE dom_oce ! ocean space and time domain USE dom_oce ! ocean space and time domain
...@@ -137,8 +140,9 @@ CONTAINS ...@@ -137,8 +140,9 @@ CONTAINS
! !
INTEGER :: id_part INTEGER :: id_part
INTEGER :: paral(5) ! OASIS3 box partition INTEGER :: paral(5) ! OASIS3 box partition
INTEGER :: ishape(4) ! shape of arrays passed to PSMILe INTEGER :: ishape(4) ! shape of arrays passed to PSMILe
INTEGER :: ji,jc,jm ! local loop indicees INTEGER :: ji,jc,jm ! local loop indicees
LOGICAL :: llenddef ! should we call xios_oasis_enddef and oasis_enddef?
CHARACTER(LEN=64) :: zclname CHARACTER(LEN=64) :: zclname
CHARACTER(LEN=2) :: cli2 CHARACTER(LEN=2) :: cli2
!!-------------------------------------------------------------------- !!--------------------------------------------------------------------
...@@ -292,14 +296,21 @@ CONTAINS ...@@ -292,14 +296,21 @@ CONTAINS
!------------------------------------------------------------------ !------------------------------------------------------------------
! !
#if defined key_agrif #if defined key_agrif
! Warning: Agrif_Nb_Fine_Grids not yet defined at this stage for Agrif_Root -> must use Agrif_Root_Only() IF( Agrif_Root() ) THEN ! Warning: Agrif_Nb_Fine_Grids not yet defined -> must use Agrif_Root_Only()
IF( Agrif_Root_Only() .OR. agrif_fixed() == Agrif_Nb_Fine_Grids() ) THEN llenddef = Agrif_Root_Only() ! true of no nested grid
#endif ELSE ! Is it the last nested grid?
CALL oasis_enddef(nerror) llenddef = agrif_fixed() == Agrif_Nb_Fine_Grids()
IF( nerror /= OASIS_Ok ) CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef')
#if defined key_agrif
ENDIF ENDIF
#else
llenddef = .TRUE.
#endif
IF( llenddef ) THEN
#if defined key_xios
CALL xios_oasis_enddef() ! see "Joint_usage_OASIS3-MCT_XIOS.pdf" on XIOS wiki page
#endif #endif
CALL oasis_enddef(nerror)
IF( nerror /= OASIS_Ok ) CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef')
ENDIF
! !
END SUBROUTINE cpl_define END SUBROUTINE cpl_define
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<variable id="using_server" type="bool">true</variable> <variable id="using_server" type="bool">true</variable>
<variable id="using_oasis" type="bool">true</variable> <variable id="using_oasis" type="bool">true</variable>
<variable id="oasis_codes_id" type="string" >oceanx</variable> <variable id="oasis_codes_id" type="string" >oceanx</variable>
<variable id="call_oasis_enddef" type="bool">false</variable> <variable id="call_oasis_enddef" type="bool">true</variable>
</variable_definition> </variable_definition>
</context> </context>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment