source: LMDZ5/trunk/libf/dyn3dpar/ce0l.F90 @ 1957

Last change on this file since 1957 was 1907, checked in by lguez, 11 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
Name of program: LMDZ
Creation date: 1984
Version: LMDZ5
License: CeCILL version 2
Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
See the license file in the root directory

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
RevLine 
[1000]1!
[1279]2! $Id: ce0l.F90 1907 2013-11-26 13:10:46Z fairhead $
[1000]3!
[1319]4!-------------------------------------------------------------------------------
5!
6PROGRAM ce0l
7!-------------------------------------------------------------------------------
8! Purpose: Calls etat0, creates initial states and limit_netcdf
9!
10!     interbar=.T. for barycentric interpolation inter_barxy
11!     extrap  =.T. for data extrapolation, like for the SSTs when file does not
12!                  contain ocean points only.
13!     oldice  =.T. for old-style ice, obtained using grille_m (grid_atob).
14!     masque is created in etat0, passed to limit to ensure consistancy.
15!-------------------------------------------------------------------------------
[1403]16  USE control_mod
[1279]17#ifdef CPP_EARTH
18! This prog. is designed to work for Earth
[1319]19  USE dimphy
20  USE comgeomphy
[1600]21  USE mod_phys_lmdz_para, mpi_root_xx=>mpi_root
[1319]22  USE mod_const_mpi
23  USE infotrac
[1850]24  USE parallel_lmdz, ONLY: finalize_parallel
[1785]25  USE indice_sol_mod
[1319]26
[1279]27#ifdef CPP_IOIPSL
[1319]28  USE ioipsl, ONLY: ioconf_calendar
[1279]29#endif
[1000]30
[1319]31#endif
32  IMPLICIT NONE
33#ifndef CPP_EARTH
[1615]34#include "iniprint.h"
[1319]35  WRITE(lunout,*)'limit_netcdf: Earth-specific routine, needs Earth physics'
36#else
37!-------------------------------------------------------------------------------
38! Local variables:
39  LOGICAL, PARAMETER :: interbar=.TRUE., extrap=.FALSE., oldice=.FALSE.
[1000]40#include "dimensions.h"
41#include "paramet.h"
[1785]42!#include "indicesol.h"
[1319]43#include "iniprint.h"
44#include "temps.h"
45#include "logic.h"
[1600]46#ifdef CPP_MPI
47      include 'mpif.h'
48#endif
49
[1319]50  INTEGER, PARAMETER            :: longcles=20
[1600]51  INTEGER                       :: ierr
[1319]52  REAL,    DIMENSION(longcles)  :: clesphy0
53  REAL,    DIMENSION(iip1,jjp1) :: masque
54  CHARACTER(LEN=15)             :: calnd
[1511]55  REAL,    DIMENSION(iip1,jjp1) :: phis ! geopotentiel au sol
[1319]56!-------------------------------------------------------------------------------
57  CALL conf_gcm( 99, .TRUE. , clesphy0 )
[1000]58
[1600]59#ifdef CPP_MPI
[1319]60  CALL init_mpi
[1600]61#endif
[1000]62
[1319]63  CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))
64  WRITE(lunout,*)'---> klon=',klon
65  IF (mpi_size>1 .OR. omp_size>1) THEN
66       CALL abort_gcm('ce0l','In parallel mode,                         &
67 &                 ce0l must be called only                             &
[1492]68 &                 for 1 process and 1 task',1)
[1319]69  ENDIF
[1000]70
[1319]71  CALL InitComgeomphy
[1000]72
[1279]73#ifdef CPP_IOIPSL
[1319]74  SELECT CASE(calend)
75    CASE('earth_360d');CALL ioconf_calendar('360d');      calnd='a 360 jours/an'
76    CASE('earth_365d');CALL ioconf_calendar('noleap');    calnd='a 365 jours/an'
77    CASE('earth_366d');CALL ioconf_calendar('366d');      calnd='bissextile'
78    CASE('gregorian'); CALL ioconf_calendar('gregorian'); calnd='gregorien'
79    CASE('standard');  CALL ioconf_calendar('gregorian'); calnd='gregorien'
80    CASE('julian');    CALL ioconf_calendar('julian');    calnd='julien'
81    CASE('proleptic_gregorian'); CALL ioconf_calendar('gregorian')
82  !--- DC Bof...  => IOIPSL a mettre a jour: proleptic_gregorian /= gregorian
83    CASE DEFAULT
84      CALL abort_gcm('ce0l','Mauvais choix de calendrier',1)
85  END SELECT
86  WRITE(lunout,*)'CALENDRIER CHOISI: Terrestre '//TRIM(calnd)
[1279]87#endif
88
[1563]89  IF (type_trac == 'inca') THEN
[1319]90#ifdef INCA
[1531]91      CALL init_const_lmdz( &
92         nbtr,anneeref,dayref,&
93         iphysiq,day_step,nday,&
94         nbsrf, is_oce,is_sic,&
95         is_ter,is_lic)
96     
[1319]97#endif
98  END IF
[1000]99
[1319]100  WRITE(lunout,'(//)')
101  WRITE(lunout,*) '  *********************  '
102  WRITE(lunout,*) '  ***  etat0_netcdf ***  '
103  WRITE(lunout,*) '  *********************  '
104  WRITE(lunout,'(//)')
105  WRITE(lunout,*) ' interbar = ',interbar
[1511]106  CALL etat0_netcdf(interbar,masque,phis,ok_etat0)
[1000]107
[1319]108  IF(ok_limit) THEN
109  WRITE(lunout,'(//)')
110  WRITE(lunout,*) '  *********************  '
111  WRITE(lunout,*) '  ***  Limit_netcdf ***  '
112  WRITE(lunout,*) '  *********************  '
113  WRITE(lunout,'(//)')
114  CALL limit_netcdf(interbar,extrap,oldice,masque)
115  END IF
116
[1492]117  IF (grilles_gcm_netcdf) THEN
118     WRITE(lunout,'(//)')
119     WRITE(lunout,*) '  ***************************  '
120     WRITE(lunout,*) '  ***  grilles_gcm_netcdf ***  '
121     WRITE(lunout,*) '  ***************************  '
122     WRITE(lunout,'(//)')
[1511]123     CALL grilles_gcm_netcdf_sub(masque,phis)
[1492]124  END IF
125 
[1600]126#ifdef CPP_MPI
[1492]127!$OMP MASTER
[1600]128  CALL MPI_FINALIZE(ierr)
129  IF (ierr /= 0) CALL abort_gcm('ce0l','Error in MPI_FINALIZE',1)
[1492]130!$OMP END MASTER
[1600]131#endif
[1492]132
[1279]133#endif
[1319]134! of #ifndef CPP_EARTH #else
135
136END PROGRAM ce0l
137!
138!-------------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.