source: LMDZ5/branches/LMDZ5_SPLA/libf/dyn3dpar/ce0l.F90 @ 5427

Last change on this file since 5427 was 1984, checked in by Ehouarn Millour, 11 years ago

Cleanup and update of "grilles_gcm_netcdf_sub": removed old version, removed flag "grilles_gcm_netcdf" used to trigger output of grilles_gcm.nc file (file will now always be created) and fixed writing vertical levels presnivs in the file.
JBM+EM

  • 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
Line 
1!
2! $Id: ce0l.F90 1984 2014-02-18 09:59:29Z fhourdin $
3!
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!-------------------------------------------------------------------------------
16  USE control_mod
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, mpi_root_xx=>mpi_root
22  USE mod_const_mpi
23  USE infotrac
24  USE parallel_lmdz, ONLY: finalize_parallel
25  USE indice_sol_mod
26
27#ifdef CPP_IOIPSL
28  USE ioipsl, ONLY: ioconf_calendar
29#endif
30
31#endif
32  IMPLICIT NONE
33#ifndef CPP_EARTH
34#include "iniprint.h"
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.
40#include "dimensions.h"
41#include "paramet.h"
42!#include "indicesol.h"
43#include "iniprint.h"
44#include "temps.h"
45#include "logic.h"
46#ifdef CPP_MPI
47      include 'mpif.h'
48#endif
49
50  INTEGER, PARAMETER            :: longcles=20
51  INTEGER                       :: ierr
52  REAL,    DIMENSION(longcles)  :: clesphy0
53  REAL,    DIMENSION(iip1,jjp1) :: masque
54  CHARACTER(LEN=15)             :: calnd
55  REAL,    DIMENSION(iip1,jjp1) :: phis ! geopotentiel au sol
56!-------------------------------------------------------------------------------
57  CALL conf_gcm( 99, .TRUE. , clesphy0 )
58
59#ifdef CPP_MPI
60  CALL init_mpi
61#endif
62
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                             &
68 &                 for 1 process and 1 task',1)
69  ENDIF
70
71  CALL InitComgeomphy
72
73#ifdef CPP_IOIPSL
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)
87#endif
88
89  IF (type_trac == 'inca') THEN
90#ifdef INCA
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     
97#endif
98  END IF
99
100  WRITE(lunout,'(//)')
101  WRITE(lunout,*) '  *********************  '
102  WRITE(lunout,*) '  ***  etat0_netcdf ***  '
103  WRITE(lunout,*) '  *********************  '
104  WRITE(lunout,'(//)')
105  WRITE(lunout,*) ' interbar = ',interbar
106  CALL etat0_netcdf(interbar,masque,phis,ok_etat0)
107
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
117  WRITE(lunout,'(//)')
118  WRITE(lunout,*) '  ***************************  '
119  WRITE(lunout,*) '  ***  grilles_gcm_netcdf ***  '
120  WRITE(lunout,*) '  ***************************  '
121  WRITE(lunout,'(//)')
122  CALL grilles_gcm_netcdf_sub(masque,phis)
123 
124#ifdef CPP_MPI
125!$OMP MASTER
126  CALL MPI_FINALIZE(ierr)
127  IF (ierr /= 0) CALL abort_gcm('ce0l','Error in MPI_FINALIZE',1)
128!$OMP END MASTER
129#endif
130
131#endif
132! of #ifndef CPP_EARTH #else
133
134END PROGRAM ce0l
135!
136!-------------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.