source: LMDZ5/trunk/libf/phylmd/add_pbl_tend.F90 @ 2235

Last change on this file since 2235 was 2235, checked in by fhourdin, 9 years ago

Modification de la façon d'arrêter le modèle en cas de plantage physique.
hgardfou n'arrête pas le modèle mais positionne abortphy à 1.
Le modèle ne s'arrête qu'après les écritures physiques.
Ceci permet d'avoir les sorties du dernier pas de temps lors d'un
plantage.
Si abortphy est déjà à 1, les tendances des différents processus
ne sont plus ajoutées jusqu'à la fin du pas de temps.

Changes in case of crash.
hgardfou does not stop the model anymore but rather put abortphy to 1.
The model is stoped after phys_output_write in order to have
the outputs of the final time-step.
If abortphy=1, the tendencies are not added anymore to the variables.

File size: 1.7 KB
Line 
1SUBROUTINE add_pbl_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy)
2  ! ======================================================================
3  ! Ajoute les tendances de couche limite, soit determinees par la
4  ! parametrisation
5  ! physique, soit forcees,  aux variables d etat de la dynamique t_seri,
6  ! q_seri ...
7  ! ======================================================================
8
9
10  ! ======================================================================
11  ! Declarations
12  ! ======================================================================
13
14  USE dimphy
15  USE phys_local_var_mod
16  USE phys_state_var_mod
17  IMPLICIT NONE
18  include "dimensions.h"
19  REAL hthturb_gcssold(llm)
20  REAL hqturb_gcssold(llm)
21  REAL dtime_frcg
22  INTEGER abortphy
23  LOGICAL turb_fcg_gcssold
24  COMMON /turb_forcing/dtime_frcg, hthturb_gcssold, hqturb_gcssold, &
25    turb_fcg_gcssold
26
27  ! Arguments :
28  ! ------------
29  REAL zdu(klon, klev), zdv(klon, klev)
30  REAL zdt(klon, klev), zdq(klon, klev), zdql(klon, klev), zdqi(klon, klev)
31  CHARACTER *(*) text
32  REAL paprs(klon,klev+1)
33
34  ! Local :
35  ! --------
36  REAL zzdt(klon, klev), zzdq(klon, klev)
37  INTEGER i, k
38
39  IF (turb_fcg_gcssold) THEN
40    DO k = 1, klev
41      DO i = 1, klon
42        zzdt(i, k) = hthturb_gcssold(k)*dtime_frcg
43        zzdq(i, k) = hqturb_gcssold(k)*dtime_frcg
44      END DO
45    END DO
46    PRINT *, ' add_pbl_tend, dtime_frcg ', dtime_frcg
47    PRINT *, ' add_pbl_tend, zzdt ', zzdt
48    PRINT *, ' add_pbl_tend, zzdq ', zzdq
49    CALL add_phys_tend(zdu, zdv, zzdt, zzdq, zdql, zdqi, paprs, text,abortphy)
50  ELSE
51    CALL add_phys_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy)
52  END IF
53
54
55  RETURN
56END SUBROUTINE add_pbl_tend
Note: See TracBrowser for help on using the repository browser.