SURFEX v8.1
General documentation of Surfex
get_size_fulln.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6  SUBROUTINE get_size_full_n (HPROGRAM,KDIM_FULL,KSIZE_FULL_IN,KSIZE_FULL_OUT)
7 ! #######################################################
8 !
9 !!**** *GET_SIZE_FULL_n* - get number of points for this proc
10 !!
11 !! PURPOSE
12 !! -------
13 !!
14 !!** METHOD
15 !! ------
16 !!
17 !! EXTERNAL
18 !! --------
19 !!
20 !!
21 !! IMPLICIT ARGUMENTS
22 !! ------------------
23 !!
24 !! REFERENCE
25 !! ---------
26 !!
27 !!
28 !! AUTHOR
29 !! ------
30 !! S.Malardel *Meteo France*
31 !!
32 !! MODIFICATIONS
33 !! -------------
34 !! Original 05/2004
35 !-------------------------------------------------------------------------------
36 !
37 !* 0. DECLARATIONS
38 ! ------------
39 !
41 !
42 USE modd_surf_par, ONLY : nundef
43 !
44 !
45 #ifdef SFX_MNH
46 USE modi_mnhget_size_full_n
47 #endif
48 #ifdef SFX_ARO
49 USE modi_aroget_size_full_n
50 #endif
51 !
52 USE yomhook ,ONLY : lhook, dr_hook
53 USE parkind1 ,ONLY : jprb
54 !
55 IMPLICIT NONE
56 !
57 !
58 !* 0.1 Declarations of arguments
59 ! -------------------------
60 !
61  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! main program
62 INTEGER , INTENT(IN) :: KDIM_FULL ! total number of points
63 INTEGER , INTENT(IN) :: KSIZE_FULL_IN ! total number of points on this proc
64 INTEGER , INTENT(OUT) :: KSIZE_FULL_OUT ! total number of points on this proc
65 !
66 !* 0.2 Declarations of local variables
67 ! -------------------------------
68 !
69 INTEGER :: J
70 REAL(KIND=JPRB) :: ZHOOK_HANDLE
71 !-------------------------------------------------------------------------------
72 !
73 IF (lhook) CALL dr_hook('GET_SIZE_FULL_N',0,zhook_handle)
74 IF (hprogram=='MESONH') THEN
75 #ifdef SFX_MNH
76  CALL mnhget_size_full_n(hprogram,kdim_full,ksize_full_out)
77 #endif
78 END IF
79 !
80 IF ( hprogram=='OFFLIN' .OR. hprogram=='ASCII ' .OR. hprogram=='FA ' .OR. hprogram=='LFI ' .OR. &
81  hprogram=='TEXTE ' .OR. hprogram=='BINARY' .OR. hprogram=='NC ') THEN
82 #ifdef SFX_OL
83  IF (ksize_full_in/=nundef .AND. ksize_full_in/=0) THEN
84  ksize_full_out = ksize_full_in
85  ELSEIF (ALLOCATED(nsize_task)) THEN
86  ksize_full_out = nsize_task(nrank)
87  ELSE
88  ksize_full_out = kdim_full
89  END IF
90 #endif
91 ENDIF
92 !
93 IF (hprogram=='AROME ') THEN
94 #ifdef SFX_ARO
95  CALL aroget_size_full_n(hprogram,kdim_full,ksize_full_out)
96 #endif
97 ENDIF
98 IF (lhook) CALL dr_hook('GET_SIZE_FULL_N',1,zhook_handle)
99 !
100 !-------------------------------------------------------------------------------
101 !
102 END SUBROUTINE get_size_full_n
subroutine get_size_full_n(HPROGRAM, KDIM_FULL, KSIZE_FULL_IN, KSIZE
integer, parameter jprb
Definition: parkind1.F90:32
integer, parameter nundef
integer, dimension(:), allocatable nsize_task
logical lhook
Definition: yomhook.F90:15