source: LMDZ5/trunk/libf/dyn3d/ce0l.F90 @ 1660

Last change on this file since 1660 was 1615, checked in by Ehouarn Millour, 13 years ago

Introducing "phydev", the minimal physics package.
makegcm and makelmdz_fcm script have been updated to add CPP_PHYS preprocessing key when building with physics and CPP_EARTH for Earth (LMD physics) related routines or instructions in the dynamics.
Checked (on Vargas) that "dev" physics package compiles and runs well in all (seq/mpi/omp/mpi_omp) modes and that introduced changes do not modify results when using the "lmd" physics package.
EM + FH

  • 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 1615 2012-02-10 15:42:26Z fairhead $
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 infotrac
22
23#ifdef CPP_IOIPSL
24  USE ioipsl, ONLY: ioconf_calendar
25#endif
26
27#endif
28  IMPLICIT NONE
29#ifndef CPP_EARTH
30#include "iniprint.h"
31  WRITE(lunout,*)'limit_netcdf: Earth-specific routine, needs Earth physics'
32#else
33!-------------------------------------------------------------------------------
34! Local variables:
35  LOGICAL, PARAMETER :: interbar=.TRUE., extrap=.FALSE., oldice=.FALSE.
36#include "dimensions.h"
37#include "paramet.h"
38#include "indicesol.h"
39#include "iniprint.h"
40#include "temps.h"
41#include "logic.h"
42  INTEGER, PARAMETER            :: longcles=20
43  REAL,    DIMENSION(longcles)  :: clesphy0
44  REAL,    DIMENSION(iip1,jjp1) :: masque
45  CHARACTER(LEN=15)             :: calnd
46  REAL,    DIMENSION(iip1,jjp1) :: phis ! geopotentiel au sol
47!-------------------------------------------------------------------------------
48  CALL conf_gcm( 99, .TRUE. , clesphy0 )
49
50  CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))
51  WRITE(lunout,*)'---> klon=',klon
52  CALL InitComgeomphy
53
54#ifdef CPP_IOIPSL
55  SELECT CASE(calend)
56    CASE('earth_360d');CALL ioconf_calendar('360d');      calnd='a 360 jours/an'
57    CASE('earth_365d');CALL ioconf_calendar('noleap');    calnd='a 365 jours/an'
58    CASE('earth_366d');CALL ioconf_calendar('366d');      calnd='bissextile'
59    CASE('gregorian'); CALL ioconf_calendar('gregorian'); calnd='gregorien'
60    CASE('standard');  CALL ioconf_calendar('gregorian'); calnd='gregorien'
61    CASE('julian');    CALL ioconf_calendar('julian');    calnd='julien'
62    CASE('proleptic_gregorian'); CALL ioconf_calendar('gregorian')
63  !--- DC Bof...  => IOIPSL a mettre a jour: proleptic_gregorian /= gregorian
64    CASE DEFAULT
65      CALL abort_gcm('ce0l','Mauvais choix de calendrier',1)
66  END SELECT
67  WRITE(lunout,*)'CALENDRIER CHOISI: Terrestre '//TRIM(calnd)
68#endif
69
70  IF (type_trac == 'inca') THEN
71#ifdef INCA
72    CALL init_const_lmdz(nbtr,anneeref,dayref,iphysiq,day_step,nday)
73    CALL init_inca_para(iim,jjm+1,klon,1,klon_mpi_para_nb,0)
74    WRITE(lunout,*)'nbtr =' , nbtr
75#endif
76  END IF
77
78  WRITE(lunout,'(//)')
79  WRITE(lunout,*) '  *********************  '
80  WRITE(lunout,*) '  ***  etat0_netcdf ***  '
81  WRITE(lunout,*) '  *********************  '
82  WRITE(lunout,'(//)')
83  WRITE(lunout,*) ' interbar = ',interbar
84  CALL etat0_netcdf(interbar,masque,phis,ok_etat0)
85
86  IF(ok_limit) THEN
87  WRITE(lunout,'(//)')
88  WRITE(lunout,*) '  *********************  '
89  WRITE(lunout,*) '  ***  Limit_netcdf ***  '
90  WRITE(lunout,*) '  *********************  '
91  WRITE(lunout,'(//)')
92  CALL limit_netcdf(interbar,extrap,oldice,masque)
93  END IF
94
95  IF (grilles_gcm_netcdf) THEN
96     WRITE(lunout,'(//)')
97     WRITE(lunout,*) '  ***************************  '
98     WRITE(lunout,*) '  ***  grilles_gcm_netcdf ***  '
99     WRITE(lunout,*) '  ***************************  '
100     WRITE(lunout,'(//)')
101     CALL grilles_gcm_netcdf_sub(masque,phis)
102  END IF
103#endif
104! of #ifndef CPP_EARTH #else
105
106END PROGRAM ce0l
107!
108!-------------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.