source: LMDZ4/branches/LMDZ4-dev-20091210/libf/dyn3dpar/caladvtrac_p.F

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