source: LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/create_etat0_limit.F @ 1251

Last change on this file since 1251 was 1222, checked in by Ehouarn Millour, 15 years ago

Changes and cleanups to enable compiling without physics
and without ioipsl.

IOIPSL related cleanups:

  • bibio/writehist.F encapsulate the routine (which needs IOIPSL to function)

with #ifdef IOIPSL flag.

  • dyn3d/abort_gcm.F, dyn3dpar/abort_gcm.F and dyn3dpar/getparam.F90: use ioipsl_getincom module when not compiling with IOIPSL library, in order to always be able to use getin() routine.
  • removed unused "use IOIPSL" in dyn3dpar/guide_p_mod.F90
  • calendar related issue: Initialize day_ref and annee_ref in iniacademic.F (i.e. when they are not read from start.nc file)

Earth-specific programs/routines/modules:
create_etat0.F, fluxstokenc.F, limit_netcdf.F, startvar.F
(versions in dyn3d and dyn3dpar)
These routines and modules, which by design and porpose are made to function with
Earth physics are encapsulated with #CPP_EARTH cpp flag.

Earth-specific instructions:

  • calls to qminimum (specific treatment of first 2 tracers, i.e. water) in dyn3d/caladvtrac.F, dyn3d/integrd.F, dyn3dpar/caladvtrac_p.F, dyn3dpar/integrd_p.F only if (planet_type == 'earth')

Interaction with parallel physics:

  • routine dyn3dpar/parallel.F90 uses "surface_data" module (which is in the physics ...) to know value of "type_ocean" . Encapsulated that with #ifdef CPP_EARTH and set to a default type_ocean="dummy" otherwise.
  • So far, only Earth physics are parallelized, so all the interaction between parallel dynamics and parallel physics are encapsulated with #ifdef CCP_EARTH (this way we can run parallel without any physics). The (dyn3dpar) routines which contains such interaction are: bands.F90, gr_dyn_fi_p.F, gr_fi_dyn_p.F, mod_interface_dyn_phys.F90 This should later (when improving dyn/phys interface) be encapsulated with a more general and appropriate #ifdef CPP_PHYS cpp flag.

I checked that these changes do not alter results (on the simple
32x24x11 bench) on Ciclad (seq & mpi), Brodie (seq, mpi & omp) and
Vargas (seq, mpi & omp).

EM

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1!
2! $Id: create_etat0_limit.F 1222 2009-08-07 11:48:33Z ymeurdesoif $
3!
4       PROGRAM create_etat0_limit
5#ifdef CPP_EARTH
6! This prog. is designed to work for Earth
7       USE dimphy
8       USE comgeomphy
9       USE mod_phys_lmdz_para
10       USE mod_const_mpi
11       USE phys_state_var_mod     
12       USE infotrac
13#ifdef CPP_IOIPSL
14       use ioipsl, only: ioconf_calendar
15#endif
16       IMPLICIT NONE
17c
18c
19c     Programme d'appel a etat0, creation des etats initiaux et limit_netcdf
20c   
21c
22c     interbar = .T . si appel a  interpol. barycentrique inter_barxy
23c
24c     extrap   = .T . si on fait une extrapolation de donnees , comme pour
25c       les  SST  lorsque  le fichier ne contient pas uniquement  des points
26c     oceaniques .
27c
28c     oldice   = .T. si l'on veut garder les anciennes glaces , obtenues
29c     par  grille_m  ( grid_atob ) .
30c
31c     on cree le masque dans etat0 que l'on passe ensuite dans limit pour
32c     garder les coherences
33
34      LOGICAL interbar, extrap , oldice
35      PARAMETER ( interbar = .true. , extrap = .FALSE. , oldice=.false.)
36#include "dimensions.h"
37#include "paramet.h"
38#include "indicesol.h"
39#include  "control.h"
40#include "clesphys.h"
41      REAL :: masque(iip1,jjp1)
42!      REAL :: pctsrf(iim*(jjm-1)+2, nbsrf)
43
44      IF (config_inca /= 'none') THEN
45#ifdef INCA
46         call init_const_lmdz(
47     $        nbtr,anneeref,dayref,
48     $        iphysiq, day_step,nday)
49#endif
50         print *, 'nbtr =' , nbtr
51      END IF
52
53      CALL init_mpi
54
55
56      CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))
57      PRINT *,'---> klon=',klon
58
59      IF (mpi_size>1 .OR. omp_size>1) THEN
60        CALL abort_gcm('create_etat0_limit','In parallel mode,
61     &                 create_etat0_limit must be called only
62     &                 for 1 process and 1 task')
63      ENDIF
64      CALL phys_state_var_init
65      call InitComgeomphy
66     
67#ifdef CPP_IOIPSL
68      call ioconf_calendar('360d')
69#endif
70
71      WRITE(6,*) '  *********************  '
72      WRITE(6,*) ' interbar = ',interbar
73      CALL etat0_netcdf ( interbar, masque )
74c
75      WRITE(6,1)
76      WRITE(6,*) '  *********************  '
77      WRITE(6,*) '  ***  Limit_netcdf ***  '
78      WRITE(6,*) '  *********************  '
79      WRITE(6,1)
80     
81c     
82      CALL  limit_netcdf ( interbar, extrap , oldice, masque)
83
841     FORMAT(//)
85
86#endif
87! of #ifdef CPP_EARTH
88      STOP
89      END
Note: See TracBrowser for help on using the repository browser.