source: LMDZ6/branches/LMDZ-COSP/libf/phylmd/undefSTD.F90 @ 5305

Last change on this file since 5305 was 3435, checked in by Laurent Fairhead, 6 years ago

"Historic" :-) commit merging the physics branch used for DYNAMICO with the LMDZ trunk.
The same physics branch can now be used seamlessly with the traditional lon-lat LMDZ
dynamical core and DYNAMICO.
Testing consisted in running a lon-lat LMDZ bucket simulation with the NPv6.1 physics package
with the original trunk sources and the merged sources. Tests were succesful in the sense that
numeric continuity was preserved in the restart files from both simulation. Further tests
included running both versions of the physics codes for one year in a LMDZOR setting in which
the restart files also came out identical.

Caution:

  • as the physics package now manages unstructured grids, grid information needs to be transmitted

to the surface scheme ORCHIDEE. This means that the interface defined in surf_land_orchidee_mod.F90
is only compatible with ORCHIDEE version orchidee2.1 and later versions. If previous versions of
ORCHIDEE need to be used, the CPP key ORCHIDEE_NOUNSTRUCT needs to be set at compilation time.
This is done automatically if makelmdz/makelmdz_fcm are called with the veget orchidee2.0 switch

  • due to a limitation in XIOS, the time at which limit conditions will be read in by DYNAMICO will be

delayed by one physic timestep with respect to the time it is read in by the lon-lat model. This is caused
by the line

IF (MOD(itime-1, lmt_pas) == 0 .OR. (jour_lu /= jour .AND. grid_type /= unstructured)) THEN ! time to read

in limit_read_mod.F90

Work still needed on COSP integration and XML files for DYNAMICO

EM, YM, LF

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1
2! $Id: undefSTD.F90 3435 2019-01-22 15:21:59Z abarral $
3
4SUBROUTINE undefstd(itap, read_climoz)
5  USE netcdf
6  USE dimphy
7#ifdef CPP_IOIPSL
8  USE phys_state_var_mod
9#endif
10#ifdef CPP_XIOS
11  USE wxios, ONLY: missing_val
12#endif
13
14  IMPLICIT NONE
15  include "clesphys.h"
16#ifndef CPP_XIOS
17  REAL :: missing_val
18#endif
19
20  ! ====================================================================
21
22  ! I. Musat : 09.2004
23
24  ! Calcul * du nombre de pas de temps (FLOAT(ecrit_XXX)-tnondef))
25  ! ou la variable tlevSTD est bien definie (.NE.missing_val),
26  ! et
27  ! * de la somme de tlevSTD => tsumSTD
28
29  ! nout=1 !var. journaliere "day" moyenne sur tous les pas de temps
30  ! ! de la physique
31  ! nout=2 !var. mensuelle "mth" moyennee sur tous les pas de temps
32  ! ! de la physique
33  ! nout=3 !var. mensuelle "NMC" moyennee toutes les ecrit_hf
34
35
36  ! NB: mettre "inst(X)" dans le write_hist*NMC.h !
37  ! ====================================================================
38
39  ! ym#include "dimphy.h"
40  ! variables Input
41
42  ! INTEGER nlevSTD, klevSTD, itap
43  ! PARAMETER(klevSTD=17)
44  INTEGER itap
45
46  ! variables locales
47  ! INTEGER i, k, nout, n
48  ! PARAMETER(nout=3) !nout=1 : day; =2 : mth; =3 : NMC
49  INTEGER i, k, n
50  ! REAL freq_calNMC(nout)
51  INTEGER read_climoz
52
53  ! variables Output
54  ! REAL tlevSTD(klon,klevSTD), tsumSTD(klon,klevSTD,nout)
55  ! LOGICAL oknondef(klon,klevSTD,nout)
56  ! REAL tnondef(klon,klevSTD,nout)
57
58! REAL missing_val
59
60! missing_val = nf90_fill_real
61#ifndef CPP_XIOS
62      missing_val=missing_val_nf90
63#endif
64
65  DO n = 1, nout
66
67
68    ! calcul variables tous les freq_calNMC(n)/phys_tstep pas de temps
69    ! de la physique
70
71    IF (mod(itap,nint(freq_calnmc(n)/phys_tstep))==0) THEN
72      DO k = 1, nlevstd
73        DO i = 1, klon
74          IF (tlevstd(i,k)==missing_val) THEN
75            ! IF(oknondef(i,k,n)) THEN
76            tnondef(i, k, n) = tnondef(i, k, n) + 1.
77            ! ENDIF !oknondef(i,k)
78
79          ELSE IF (tlevstd(i,k)/=missing_val) THEN
80            tsumstd(i, k, n) = tsumstd(i, k, n) + tlevstd(i, k)
81            usumstd(i, k, n) = usumstd(i, k, n) + ulevstd(i, k)
82            vsumstd(i, k, n) = vsumstd(i, k, n) + vlevstd(i, k)
83            wsumstd(i, k, n) = wsumstd(i, k, n) + wlevstd(i, k)
84            phisumstd(i, k, n) = phisumstd(i, k, n) + philevstd(i, k)
85            qsumstd(i, k, n) = qsumstd(i, k, n) + qlevstd(i, k)
86            rhsumstd(i, k, n) = rhsumstd(i, k, n) + rhlevstd(i, k)
87            uvsumstd(i, k, n) = uvsumstd(i, k, n) + uvstd(i, k)
88            vqsumstd(i, k, n) = vqsumstd(i, k, n) + vqstd(i, k)
89            vtsumstd(i, k, n) = vtsumstd(i, k, n) + vtstd(i, k)
90            wqsumstd(i, k, n) = wqsumstd(i, k, n) + wqstd(i, k)
91            vphisumstd(i, k, n) = vphisumstd(i, k, n) + vphistd(i, k)
92            wtsumstd(i, k, n) = wtsumstd(i, k, n) + wtstd(i, k)
93            u2sumstd(i, k, n) = u2sumstd(i, k, n) + u2std(i, k)
94            v2sumstd(i, k, n) = v2sumstd(i, k, n) + v2std(i, k)
95            t2sumstd(i, k, n) = t2sumstd(i, k, n) + t2std(i, k)
96            o3sumstd(i, k, n) = o3sumstd(i, k, n) + o3std(i, k)
97            IF (read_climoz==2) o3daysumstd(i, k, n) = o3daysumstd(i, k, n) + &
98              o3daystd(i, k)
99
100          END IF
101        END DO !i
102      END DO !k
103
104    END IF !MOD(itap,NINT(freq_calNMC(n)/phys_tstep)).EQ.0
105
106  END DO !n
107
108  RETURN
109END SUBROUTINE undefstd
Note: See TracBrowser for help on using the repository browser.