C $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/sannino/OASIS_3.0_Coupler/pkg/oasis_ini_oasis.F,v 1.1 2006/07/20 21:08:16 sannino Exp $ C $Name: $ #include "PACKAGES_CONFIG.h" #include "CPP_OPTIONS.h" CBOP C !ROUTINE: OASIS_INI_OASIS C !INTERFACE: SUBROUTINE OASIS_INI_OASIS( myThid ) C !DESCRIPTION: \bv C *==========================================================* C | SUBROUTINE INI_MASKS_ETC C | o Initialise some strunzate per OASIS C *==========================================================* C | C | C | C | C | C *==========================================================* C \ev C !USES: IMPLICIT NONE C === Global variables === #include "SIZE.h" #include "EEPARAMS.h" #include "EESUPPORT.h" #include "PARAMS.h" #include "GRID.h" #include "OASIS.h" C !INPUT/OUTPUT PARAMETERS: C == Routine arguments == C myThid - Number of this instance of INI_MASKS_ETC INTEGER myThid C !LOCAL VARIABLES: C == Local variables in common == C tmpfld - Temporary array used to compute & write Total Depth C has to be in common for multi threading COMMON / LOCAL_INI_MASKS_ETC / tmpfld _RS tmpfld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) C == Local variables == CHARACTER*8 :: chmitout CHARACTER*2 :: chout cc C-- Open file for OASIS related messages from mitgcm il_mparout = 85 + mpiMyId WRITE(chout,'(I2)') il_mparout chmitout='mitout'//chout ! OPEN(il_mparout,file=chmitout,form='formatted') ! WRITE(il_mparout,*) ' **********************************' WRITE(il_mparout,*) ' * *' WRITE(il_mparout,*) ' * MITgcm messages about OASIS *' WRITE(il_mparout,*) ' * *' WRITE(il_mparout,*) ' **********************************' WRITE(il_mparout,*) ' ' WRITE(il_mparout,*) 'mitgcm: Number of processes:', mpiNProcs WRITE(il_mparout,*) 'Local process number:', mpiMyId WRITE(il_mparout,*) 'Local communicator is : ',MPI_COMM_MODEL WRITE(il_mparout,*) '' ! ! 4- Compare the total number of processes and the number of processes ! involved in the coupling. ! ! 3 cases are illustrated here: ! . A monoprocess atm which process is involved in the coupling ! (ll_comparal = .FALSE.); put il_nbcplproc = 1 here after. ! . A parallel atm with only the master process involved in the coupling ! (ll_comparal = .FALSE.); put il_nbcplproc = 1 here after. ! . A parallel atm with all processes involved in the coupling ! (ll_comparal = .TRUE.); put il_nbcplproc = 3 here after. ! Here, we hard code these numbers but later specific PSMILe routines ! will be developed to access this information directly in the SCC file. ! The case in which n processes are involved in the coupling among ! a total number m of processes should work but has not been tested. ! il_nbcplproc = mpiNprocs WRITE(il_mparout,*) 'oasis_comparl: il_nbcplproc:',il_nbcplproc ! IF (il_nbcplproc .EQ. mpiNProcs .and. il_nbtotproc .ne. 1) THEN ll_comparal = .TRUE. ELSE ll_comparal = .FALSE. ENDIF WRITE(il_mparout,*) 'll_comparal',ll_comparal WRITE(il_mparout,*) 'oasis_comparl: ll_comparal:',ll_comparal ! c CALL OASIS_GRID (myThid) c IF( mpiMyId .EQ. 0 .OR. ll_comparal) THEN CALL OASIS_PARTITION_DEF CALL OASIS_DECLARE_FIELDS ENDIF RETURN END