source: LMDZ4/branches/LMDZ4-dev-20091210/libf/dyn3d/caladvtrac.F @ 2063

Last change on this file since 2063 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.9 KB
Line 
1!
2! $Header$
3!
4c
5c
6            SUBROUTINE caladvtrac(q,pbaru,pbarv ,
7     *                   p ,masse, dq ,  teta,
8     *                   flxw, pk)
9c
10      USE infotrac
11      IMPLICIT NONE
12c
13c     Auteurs:   F.Hourdin , P.Le Van, F.Forget, F.Codron 
14c
15c     F.Codron (10/99) : ajout humidite specifique pour eau vapeur
16c=======================================================================
17c
18c       Shema de  Van Leer
19c
20c=======================================================================
21
22
23#include "dimensions.h"
24#include "paramet.h"
25#include "comconst.h"
26#include "control.h"
27
28c   Arguments:
29c   ----------
30      REAL pbaru( ip1jmp1,llm ),pbarv( ip1jm,llm),masse(ip1jmp1,llm)
31      REAL p( ip1jmp1,llmp1),q( ip1jmp1,llm,nqtot),dq( ip1jmp1,llm,2 )
32      REAL teta( ip1jmp1,llm),pk( ip1jmp1,llm)
33      REAL               :: flxw(ip1jmp1,llm)
34
35c  ..................................................................
36c
37c  .. dq n'est utilise et dimensionne que pour l'eau  vapeur et liqu.
38c
39c  ..................................................................
40c
41c   Local:
42c   ------
43
44      EXTERNAL  advtrac,minmaxq, qminimum
45      INTEGER ij,l, iq, iapptrac
46      REAL finmasse(ip1jmp1,llm), dtvrtrac
47
48cc
49c
50C initialisation
51        dq = 0.
52
53        CALL SCOPY( 2 * ijp1llm, q, 1, dq, 1 )
54
55c  test des valeurs minmax
56cc        CALL minmaxq(q(1,1,1),1.e33,-1.e33,'Eau vapeur (a) ')
57cc        CALL minmaxq(q(1,1,2),1.e33,-1.e33,'Eau liquide(a) ')
58
59c   advection
60
61        CALL advtrac( pbaru,pbarv,
62     *       p,  masse,q,iapptrac, teta,
63     .       flxw, pk)
64c
65
66         IF( iapptrac.EQ.iapp_tracvl ) THEN
67c
68cc          CALL minmaxq(q(1,1,1),1.e33,-1.e33,'Eau vapeur     ')
69cc          CALL minmaxq(q(1,1,2),1.e33,-1.e33,'Eau liquide    ')
70
71cc     ....  Calcul  de deltap  qu'on stocke dans finmasse   ...
72c
73          DO l = 1, llm
74           DO ij = 1, ip1jmp1
75             finmasse(ij,l) =  p(ij,l) - p(ij,l+1)
76           ENDDO
77          ENDDO
78         
79          if (planet_type.eq."earth") then
80! Earth-specific treatment of first 2 tracers (water)
81            CALL qminimum( q, 2, finmasse )
82          endif
83
84          CALL SCOPY   ( ip1jmp1*llm, masse, 1, finmasse,       1 )
85          CALL filtreg ( finmasse ,  jjp1,  llm, -2, 2, .TRUE., 1 )
86c
87c   *****  Calcul de dq pour l'eau , pour le passer a la physique ******
88c   ********************************************************************
89c
90          dtvrtrac = iapp_tracvl * dtvr
91c
92           DO iq = 1 , 2
93            DO l = 1 , llm
94             DO ij = 1,ip1jmp1
95             dq(ij,l,iq) = ( q(ij,l,iq) - dq(ij,l,iq) ) * finmasse(ij,l)
96     *                               /  dtvrtrac
97             ENDDO
98            ENDDO
99           ENDDO
100c
101         ELSE
102           DO iq = 1 , 2
103           DO l  = 1, llm
104             DO ij = 1,ip1jmp1
105              dq(ij,l,iq)  = 0.
106             ENDDO
107           ENDDO
108           ENDDO
109
110
111         ENDIF
112
113c
114
115c  ... On appelle  qminimum uniquement  pour l'eau vapeur et liquide  ..
116
117 
118      RETURN
119      END
120
121
Note: See TracBrowser for help on using the repository browser.