= Adapt NEMO-AGRIF to work with IOM = Last edited [[Timestamp]] [[PageOutline]] [[BR]]see changeset https://forge.ipsl.jussieu.fr/nemo/changeset/1793/trunk ---- === main idea === We use the "swap context" functionality provided by the IO server/library. === changes in IOIPSL code === Not specific to Agrif and not necessary needed, depends of the number of output files, but often more critical because we output more files, change in fliocom.F90 dom_max_nb=10 to a higher value. === changes in NEMO code === * add new routine iom_swap (in iom.F90) to encapsulate the call to event!__swap_context, this is called at the beginning of step. The xml file is parsed only by the root grid, others iomput operations are performed by all the grids. * the principal implication is the definition of the MPI communicator. We clean all the mess at the beginning of mynode, with AGRIF the communicator is now a shared variable between the grids and is either defined by the root grid, either transmitted by another application (OASIS, ioserver ...) * add new routine Agrif_comm_def (in Agrif2model.F90) to transmit the ocean MPI communicator to AGRIF internal routines. === changes in AGRIF code === * change the default communicator MPI_COMM_WORLD to MPI_COMM_AGRIF, which is obtained from the model. === how to use it === There is only one iodef.xml ( no 1_iodef.xml), with the following structure: '''' '' '' ''usual description of the grid, axis and data'' '' '' '' '' ''usual description of the grid, axis and data'' '' '' ''''