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

Last change on this file since 1615 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: 4.3 KB
RevLine 
[1000]1!
[1279]2! $Id: ce0l.F90 1615 2012-02-10 15:42:26Z emillour $
[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
[1492]24  USE parallel, ONLY: finalize_parallel
[1319]25
[1279]26#ifdef CPP_IOIPSL
[1319]27  USE ioipsl, ONLY: ioconf_calendar
[1279]28#endif
[1000]29
[1319]30#endif
31  IMPLICIT NONE
32#ifndef CPP_EARTH
[1615]33#include "iniprint.h"
[1319]34  WRITE(lunout,*)'limit_netcdf: Earth-specific routine, needs Earth physics'
35#else
36!-------------------------------------------------------------------------------
37! Local variables:
38  LOGICAL, PARAMETER :: interbar=.TRUE., extrap=.FALSE., oldice=.FALSE.
[1000]39#include "dimensions.h"
40#include "paramet.h"
41#include "indicesol.h"
[1319]42#include "iniprint.h"
43#include "temps.h"
44#include "logic.h"
[1600]45#ifdef CPP_MPI
46      include 'mpif.h'
47#endif
48
[1319]49  INTEGER, PARAMETER            :: longcles=20
[1600]50  INTEGER                       :: ierr
[1319]51  REAL,    DIMENSION(longcles)  :: clesphy0
52  REAL,    DIMENSION(iip1,jjp1) :: masque
53  CHARACTER(LEN=15)             :: calnd
[1511]54  REAL,    DIMENSION(iip1,jjp1) :: phis ! geopotentiel au sol
[1319]55!-------------------------------------------------------------------------------
56  CALL conf_gcm( 99, .TRUE. , clesphy0 )
[1000]57
[1600]58#ifdef CPP_MPI
[1319]59  CALL init_mpi
[1600]60#endif
[1000]61
[1319]62  CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))
63  WRITE(lunout,*)'---> klon=',klon
64  IF (mpi_size>1 .OR. omp_size>1) THEN
65       CALL abort_gcm('ce0l','In parallel mode,                         &
66 &                 ce0l must be called only                             &
[1492]67 &                 for 1 process and 1 task',1)
[1319]68  ENDIF
[1000]69
[1319]70  CALL InitComgeomphy
[1000]71
[1279]72#ifdef CPP_IOIPSL
[1319]73  SELECT CASE(calend)
74    CASE('earth_360d');CALL ioconf_calendar('360d');      calnd='a 360 jours/an'
75    CASE('earth_365d');CALL ioconf_calendar('noleap');    calnd='a 365 jours/an'
76    CASE('earth_366d');CALL ioconf_calendar('366d');      calnd='bissextile'
77    CASE('gregorian'); CALL ioconf_calendar('gregorian'); calnd='gregorien'
78    CASE('standard');  CALL ioconf_calendar('gregorian'); calnd='gregorien'
79    CASE('julian');    CALL ioconf_calendar('julian');    calnd='julien'
80    CASE('proleptic_gregorian'); CALL ioconf_calendar('gregorian')
81  !--- DC Bof...  => IOIPSL a mettre a jour: proleptic_gregorian /= gregorian
82    CASE DEFAULT
83      CALL abort_gcm('ce0l','Mauvais choix de calendrier',1)
84  END SELECT
85  WRITE(lunout,*)'CALENDRIER CHOISI: Terrestre '//TRIM(calnd)
[1279]86#endif
87
[1563]88  IF (type_trac == 'inca') THEN
[1319]89#ifdef INCA
[1531]90      CALL init_const_lmdz( &
91         nbtr,anneeref,dayref,&
92         iphysiq,day_step,nday,&
93         nbsrf, is_oce,is_sic,&
94         is_ter,is_lic)
95     
[1319]96#endif
97  END IF
[1000]98
[1319]99  WRITE(lunout,'(//)')
100  WRITE(lunout,*) '  *********************  '
101  WRITE(lunout,*) '  ***  etat0_netcdf ***  '
102  WRITE(lunout,*) '  *********************  '
103  WRITE(lunout,'(//)')
104  WRITE(lunout,*) ' interbar = ',interbar
[1511]105  CALL etat0_netcdf(interbar,masque,phis,ok_etat0)
[1000]106
[1319]107  IF(ok_limit) THEN
108  WRITE(lunout,'(//)')
109  WRITE(lunout,*) '  *********************  '
110  WRITE(lunout,*) '  ***  Limit_netcdf ***  '
111  WRITE(lunout,*) '  *********************  '
112  WRITE(lunout,'(//)')
113  CALL limit_netcdf(interbar,extrap,oldice,masque)
114  END IF
115
[1492]116  IF (grilles_gcm_netcdf) THEN
117     WRITE(lunout,'(//)')
118     WRITE(lunout,*) '  ***************************  '
119     WRITE(lunout,*) '  ***  grilles_gcm_netcdf ***  '
120     WRITE(lunout,*) '  ***************************  '
121     WRITE(lunout,'(//)')
[1511]122     CALL grilles_gcm_netcdf_sub(masque,phis)
[1492]123  END IF
124 
[1600]125#ifdef CPP_MPI
[1492]126!$OMP MASTER
[1600]127  CALL MPI_FINALIZE(ierr)
128  IF (ierr /= 0) CALL abort_gcm('ce0l','Error in MPI_FINALIZE',1)
[1492]129!$OMP END MASTER
[1600]130#endif
[1492]131
[1279]132#endif
[1319]133! of #ifndef CPP_EARTH #else
134
135END PROGRAM ce0l
136!
137!-------------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.