/[MITgcm]/MITgcm_contrib/sannino/OASIS_3.0_Coupler/pkg/oasis_ini_oasis.F
ViewVC logotype

Contents of /MITgcm_contrib/sannino/OASIS_3.0_Coupler/pkg/oasis_ini_oasis.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Jul 20 21:08:16 2006 UTC (19 years ago) by sannino
Branch: MAIN
CVS Tags: HEAD
o Adding OASIS package
o Adding grid refinement package

1 C $Header: /u/gcmpack/MITgcm/model/src/ini_masks_etc.F,v 1.30 2005/07/20 22:31:47 jmc Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: OASIS_INI_OASIS
9 C !INTERFACE:
10 SUBROUTINE OASIS_INI_OASIS( myThid )
11 C !DESCRIPTION: \bv
12 C *==========================================================*
13 C | SUBROUTINE INI_MASKS_ETC
14 C | o Initialise some strunzate per OASIS
15 C *==========================================================*
16 C |
17 C |
18 C |
19 C |
20 C |
21 C *==========================================================*
22 C \ev
23
24 C !USES:
25 IMPLICIT NONE
26 C === Global variables ===
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 #include "EESUPPORT.h"
30 #include "PARAMS.h"
31 #include "GRID.h"
32 #include "OASIS.h"
33
34
35 C !INPUT/OUTPUT PARAMETERS:
36 C == Routine arguments ==
37 C myThid - Number of this instance of INI_MASKS_ETC
38 INTEGER myThid
39
40 C !LOCAL VARIABLES:
41 C == Local variables in common ==
42 C tmpfld - Temporary array used to compute & write Total Depth
43 C has to be in common for multi threading
44 COMMON / LOCAL_INI_MASKS_ETC / tmpfld
45 _RS tmpfld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
46 C == Local variables ==
47 CHARACTER*8 :: chmitout
48 CHARACTER*2 :: chout
49
50
51 cc
52 C-- Open file for OASIS related messages from mitgcm
53
54 il_mparout = 85 + mpiMyId
55
56 WRITE(chout,'(I2)') il_mparout
57
58 chmitout='mitout'//chout
59 !
60 OPEN(il_mparout,file=chmitout,form='formatted')
61 !
62 WRITE(il_mparout,*) ' **********************************'
63 WRITE(il_mparout,*) ' * *'
64 WRITE(il_mparout,*) ' * MITgcm messages about OASIS *'
65 WRITE(il_mparout,*) ' * *'
66 WRITE(il_mparout,*) ' **********************************'
67 WRITE(il_mparout,*) ' '
68 WRITE(il_mparout,*) 'mitgcm: Number of processes:', mpiNProcs
69 WRITE(il_mparout,*) 'Local process number:', mpiMyId
70 WRITE(il_mparout,*) 'Local communicator is : ',MPI_COMM_MODEL
71 WRITE(il_mparout,*) ''
72
73 !
74 ! 4- Compare the total number of processes and the number of processes
75 ! involved in the coupling.
76 !
77 ! 3 cases are illustrated here:
78 ! . A monoprocess atm which process is involved in the coupling
79 ! (ll_comparal = .FALSE.); put il_nbcplproc = 1 here after.
80 ! . A parallel atm with only the master process involved in the coupling
81 ! (ll_comparal = .FALSE.); put il_nbcplproc = 1 here after.
82 ! . A parallel atm with all processes involved in the coupling
83 ! (ll_comparal = .TRUE.); put il_nbcplproc = 3 here after.
84 ! Here, we hard code these numbers but later specific PSMILe routines
85 ! will be developed to access this information directly in the SCC file.
86 ! The case in which n processes are involved in the coupling among
87 ! a total number m of processes should work but has not been tested.
88 !
89 il_nbcplproc = mpiNprocs
90 WRITE(il_mparout,*) 'oasis_comparl: il_nbcplproc:',il_nbcplproc
91 !
92 IF (il_nbcplproc .EQ. mpiNProcs .and. il_nbtotproc .ne. 1) THEN
93 ll_comparal = .TRUE.
94 ELSE
95 ll_comparal = .FALSE.
96 ENDIF
97
98 WRITE(il_mparout,*) 'll_comparal',ll_comparal
99 WRITE(il_mparout,*) 'oasis_comparl: ll_comparal:',ll_comparal
100 !
101 c
102 CALL OASIS_GRID (myThid)
103 c
104 IF( mpiMyId .EQ. 0 .OR. ll_comparal) THEN
105 CALL OASIS_PARTITION_DEF
106 CALL OASIS_DECLARE_FIELDS
107 ENDIF
108
109 RETURN
110 END

  ViewVC Help
Powered by ViewVC 1.1.22