source: LMDZ4/branches/LMDZ4_AR5/libf/dyn3dpar/ce0l.F90 @ 1536

Last change on this file since 1536 was 1476, checked in by jghattas, 14 years ago

Bug correction for ce0l in dyn3dpar :

  • added missing MPI_FINALIZE
  • removed STOP before end of program


  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1!
2! $Id: ce0l.F90 1476 2011-01-25 11:12:55Z musat $
3!
4!-------------------------------------------------------------------------------
5!
6PROGRAM ce0l
7!
8!-------------------------------------------------------------------------------
9! Purpose: Calls etat0, creates initial states and limit_netcdf
10!
11!     interbar=.T. for barycentric interpolation inter_barxy
12!     extrap  =.T. for data extrapolation, like for the SSTs when file does not
13!                  contain ocean points only.
14!     oldice  =.T. for old-style ice, obtained using grille_m (grid_atob).
15!     masque is created in etat0, passed to limit to ensure consistancy.
16!-------------------------------------------------------------------------------
17#ifdef CPP_EARTH
18! This prog. is designed to work for Earth
19  USE dimphy
20  USE comgeomphy
21  USE mod_phys_lmdz_para
22  USE mod_const_mpi
23  USE infotrac
24  USE parallel, ONLY: finalize_parallel
25
26#ifdef CPP_IOIPSL
27  USE ioipsl, ONLY: ioconf_calendar
28#endif
29
30#endif
31  IMPLICIT NONE
32#ifndef CPP_EARTH
33  WRITE(lunout,*)'limit_netcdf: Earth-specific routine, needs Earth physics'
34#else
35!-------------------------------------------------------------------------------
36! Local variables:
37  LOGICAL, PARAMETER :: interbar=.TRUE., extrap=.FALSE., oldice=.FALSE.
38#include "dimensions.h"
39#include "paramet.h"
40#include "indicesol.h"
41#include "iniprint.h"
42#include "control.h"
43#include "temps.h"
44#include "logic.h"
45  INTEGER, PARAMETER            :: longcles=20
46  REAL,    DIMENSION(longcles)  :: clesphy0
47  REAL,    DIMENSION(iip1,jjp1) :: masque
48  CHARACTER(LEN=15)             :: calnd
49!-------------------------------------------------------------------------------
50  CALL conf_gcm( 99, .TRUE. , clesphy0 )
51
52  CALL init_mpi
53
54  CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))
55  WRITE(lunout,*)'---> klon=',klon
56  IF (mpi_size>1 .OR. omp_size>1) THEN
57       CALL abort_gcm('ce0l','In parallel mode,                         &
58 &                 ce0l must be called only                             &
59 &                 for 1 process and 1 task',1)
60  ENDIF
61
62  CALL InitComgeomphy
63
64#ifdef CPP_IOIPSL
65  SELECT CASE(calend)
66    CASE('earth_360d');CALL ioconf_calendar('360d');      calnd='a 360 jours/an'
67    CASE('earth_365d');CALL ioconf_calendar('noleap');    calnd='a 365 jours/an'
68    CASE('earth_366d');CALL ioconf_calendar('366d');      calnd='bissextile'
69    CASE('gregorian'); CALL ioconf_calendar('gregorian'); calnd='gregorien'
70    CASE('standard');  CALL ioconf_calendar('gregorian'); calnd='gregorien'
71    CASE('julian');    CALL ioconf_calendar('julian');    calnd='julien'
72    CASE('proleptic_gregorian'); CALL ioconf_calendar('gregorian')
73  !--- DC Bof...  => IOIPSL a mettre a jour: proleptic_gregorian /= gregorian
74    CASE DEFAULT
75      CALL abort_gcm('ce0l','Mauvais choix de calendrier',1)
76  END SELECT
77  WRITE(lunout,*)'CALENDRIER CHOISI: Terrestre '//TRIM(calnd)
78#endif
79
80  IF (config_inca /= 'none') THEN
81#ifdef INCA
82    CALL init_const_lmdz(nbtr,anneeref,dayref,iphysiq,day_step,nday)
83    CALL init_inca_para(iim,jjm+1,klon,1,klon_mpi_para_nb,0)
84    WRITE(lunout,*)'nbtr =' , nbtr
85#endif
86  END IF
87
88  WRITE(lunout,'(//)')
89  WRITE(lunout,*) '  *********************  '
90  WRITE(lunout,*) '  ***  etat0_netcdf ***  '
91  WRITE(lunout,*) '  *********************  '
92  WRITE(lunout,'(//)')
93  WRITE(lunout,*) ' interbar = ',interbar
94  CALL etat0_netcdf(interbar,masque,ok_etat0)
95
96  IF(ok_limit) THEN
97  WRITE(lunout,'(//)')
98  WRITE(lunout,*) '  *********************  '
99  WRITE(lunout,*) '  ***  Limit_netcdf ***  '
100  WRITE(lunout,*) '  *********************  '
101  WRITE(lunout,'(//)')
102  CALL limit_netcdf(interbar,extrap,oldice,masque)
103  END IF
104
105!$OMP MASTER
106  CALL finalize_parallel
107!$OMP END MASTER
108
109#endif
110! of #ifndef CPP_EARTH #else
111
112END PROGRAM ce0l
113!
114!-------------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.