Oasis3 4.0.2
mod_comprism_proto.F90
Go to the documentation of this file.
00001 MODULE mod_comprism_proto
00002 !     - - - - - - - - - - - - - - - - - - - - - - - - - - -
00003 !
00004   USE mod_prism_proto
00005   USE mod_kinds_model
00006 !
00007 !-----Unit number for trace file
00008 !
00009   INTEGER(kind=ip_i4_p) :: nulprt
00010 !
00011 !-----Models descriptors
00012 !
00013 !     ncplprocs: total number of processes involved in the coupling
00014 !                counting oasis process (indirect case)
00015   INTEGER(kind=ip_i4_p) :: ncplprocs, mynum, mytid, ig_mynummod, knmods
00016 #if defined use_comm_MPI1 || defined use_comm_MPI2
00017   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: modtid
00018   CHARACTER*32, DIMENSION(:), ALLOCATABLE :: cnames  
00019 #endif
00020   CHARACTER(len=6), DIMENSION(:), ALLOCATABLE :: cg_modnam
00021   INTEGER(kind=ip_intwp_p) :: ig_nbr_oasis
00022   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: kbtotproc, kbcplproc
00023   INTEGER(kind=ip_intwp_p), DIMENSION(:), ALLOCATABLE :: iga_unitmod
00024 !
00025 !-----Minimum exchange frequency, total time of the simulation, total 
00026 !     number of fields exchanged in the simulation, local communicator of 
00027 !     each component, maximum size of grids, initial date of the simulation
00028 ! 
00029   INTEGER(kind=ip_i4_p) :: ig_frqmin, ig_ntime, ig_clim_nfield, ig_local_comm
00030   INTEGER(kind=ip_i4_p) :: ig_CLIM_Maxgrd, ig_inidate(6)
00031 !
00032 !-----Lag of exported fields, coupling period of fields, sequential index 
00033 !     of fields, name of exchanged fields and restart files, restart files 
00034 !     numbers, number of restart files, logical indicating if one field 
00035 !     (at least) goes through Oasis or not, field I/O status, logical 
00036 !     indicating a restart file netcdf or not, logical indicating if all 
00037 !     fields go through Oasis or not.
00038 !
00039   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_lag, ig_def_lag
00040   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_reverse, ig_def_reverse
00041   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_invert, ig_def_invert
00042   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_freq, ig_def_freq
00043   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_seq, ig_def_seq
00044   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_norstfile, ig_def_norstfile
00045   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_aux, ig_clim_state
00046   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_def_state
00047   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_trans, ig_def_trans
00048   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_clim_numlab
00049 !RV Will contain label numbers of fields according to their port number
00050   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_def_numlab
00051 !RV
00052   INTEGER(kind=ip_i4_p) :: ig_nbr_rstfile
00053   CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: cg_cnaminp, cg_cnamout
00054   CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: cg_clim_rstfile
00055   CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: cg_def_rstfile
00056   CHARACTER(len=32), DIMENSION(:), ALLOCATABLE :: cg_clim_inpfile
00057   CHARACTER(len=32), DIMENSION(:), ALLOCATABLE :: cg_def_inpfile
00058   CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: cg_ignout_field
00059   LOGICAL :: lg_ncdfrst, lg_oasis_field
00060 !
00061 ! For lons and lats and corner outputs
00062   CHARACTER(len=5) :: cg_clim_cgrdnam
00063   CHARACTER(len=4) :: cg_clim_lonsuf, cg_clim_latsuf
00064   CHARACTER(len=4) :: crn_clim_lonsuf, crn_clim_latsuf
00065   CHARACTER(len=4), DIMENSION(:), ALLOCATABLE :: 
00066      cga_clim_locatorbf, cga_clim_locatoraf, cga_clim_locator
00067   INTEGER(kind=ip_intwp_p)  :: ig_noc       ! Number of corners
00068 
00069 !
00070 !-----Local transformations descriptors
00071 !
00072   REAL(kind=ip_single_p), DIMENSION(:,:), ALLOCATABLE :: rg_field_trans
00073   REAL(kind=ip_double_p), DIMENSION(:,:), ALLOCATABLE :: dg_field_trans
00074   INTEGER(kind=ip_intwp_p), DIMENSION(:), ALLOCATABLE :: ig_number
00075   LOGICAL :: lg_dgfield
00076 !
00077 !-----Decomposition descriptors
00078 !
00079   INTEGER(kind=ip_i4_p) :: ig_nbpart
00080   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_length_part
00081   INTEGER(kind=ip_i4_p), DIMENSION(:,:), ALLOCATABLE :: ig_def_part 
00082 !
00083 !-----Ports descriptors
00084 !
00085   INTEGER(kind=ip_i4_p) :: nports 
00086   INTEGER(kind=ip_i4_p), DIMENSION(:,:), ALLOCATABLE :: myport, irport
00087   INTEGER(kind=ip_i4_p), DIMENSION(:,:), ALLOCATABLE :: mydist, irdist
00088 !
00089 !
00090 !-----Links descriptors
00091 !
00092   INTEGER(kind=ip_i4_p) :: nlinks 
00093   INTEGER(kind=ip_i4_p), DIMENSION(:,:), ALLOCATABLE :: mylink
00094 !
00095 !-----Data encoding
00096 !
00097   INTEGER(kind=ip_i4_p) :: mycode
00098 !
00099 !-----Inquiry descriptors
00100 !
00101   INTEGER(kind=ip_i4_p) :: nbsend, nbrecv
00102 !
00103 !-----Timesteps descriptors
00104 !
00105   INTEGER(kind=ip_i4_p) :: mystep, mystdt, myfcpl
00106   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: ig_nstep
00107   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: nstdt
00108   INTEGER(kind=ip_i4_p), DIMENSION(:), ALLOCATABLE :: nfcpl 
00109 !
00110 !-----Character strings
00111 !
00112   CHARACTER*8 :: cgroup
00113   CHARACTER*16 :: cnaprt
00114   CHARACTER*32, DIMENSION(:), ALLOCATABLE :: cports, clrport
00115   CHARACTER*32 :: cmynam
00116   CHARACTER*4 :: ctype
00117 !
00118 !-----Packing area for Export and Import
00119 !
00120 #if defined use_comm_MPI1 || defined use_comm_MPI2
00121   REAL(kind=ip_double_p), DIMENSION(:), ALLOCATABLE :: pkwork 
00122   REAL(kind=ip_double_p), DIMENSION(:), ALLOCATABLE :: pkwork_field
00123 #elif defined use_comm_GSIP
00124   REAL(kind=ip_realwp_p), DIMENSION(:), ALLOCATABLE :: pkworkps
00125 #endif
00126 !
00127 !-----mpi_rank :  Rank of process in MPI communicator
00128 !-----mpi_size :  Size of communicator
00129 !-----mpi_err :   Error code of MPI calls
00130 !-----mpi_comm :  Communicator handle
00131 
00132   INTEGER(kind=ip_i4_p) :: mpi_rank, mpi_size, mpi_err, mpi_comm
00133 !
00134 !-----Buffer and logical for MPI_BSend
00135 !
00136   LOGICAL :: lg_clim_bsend 
00137 #if defined use_comm_MPI1 || defined use_comm_MPI2
00138   REAL(kind=ip_double_p), DIMENSION(:), ALLOCATABLE :: dg_bufsend
00139 #endif
00140 !
00141 !-----lg_mpiflag: logical true if MPI_Init has been called by application
00142 !
00143   LOGICAL :: lg_mpiflag
00144 !
00145 !-----flag to start grids writing
00146 !
00147   INTEGER(kind=ip_i4_p) :: grids_start
00148 !
00149   CHARACTER*(CLIM_Clength), DIMENSION(:), ALLOCATABLE :: cunames
00150 !
00151     END MODULE mod_comprism_proto
00152 
00153 
 All Data Structures Namespaces Files Functions Variables Defines