New flexible DDH structures for Arpege/Aladin/Alaro/Arome O. Rivière (Météo-France/GMAP)

Page created by Joel Greene
 
CONTINUE READING
••

  New flexible DDH structures
               for
   Arpege/Aladin/Alaro/Arome
O. Rivière (Météo-France/GMAP)
What are DDH ?                                                                                                                   ••

     Diagnostics in Horizontal Domains
     Made to provide on user-defined domains the budget of prognostic variables of
     the model for searchers and model’s developpers.
     Also provides others domain averaged quantities for diagnostics.

                                                                               TEMPERATURE BUDGET (K/day)
                                                                                 d032-DHFZOd032+0024.mh
                                                                               BASE 2003-01-13 18:00 ECH 24 H

Domains may be:                                           -97

     zonal bands                                     -194

                                                     -291

     rectangular areas                   pressure (hPa)
                                                     -388

                                                                                                                            Solar radiation
                                                     -485                                                                   Infra-red radiation

     single points                                   -582
                                                                                                                            Transport SubGr turbulence
                                                                                                                            Transport SubGr conv
                                                                                                                            Condensation Resol
                                                                                                                            Condensation Subgr conv
                                                                                                                            Evaporation Resol
                                                                                                                            Evaporation Subgr conv

     whole globe                                     -679                                                                   Sensible heat precipitation
                                                                                                                            Mesospheric drag
                                                                                                                            Variable mass
                                                     -776                                                                   Residual
                                                                                                                            Total tendency

                                                     -873

                                                     -970
                                                                -3   -2   -1            0          1            2   3   4

                                                                                                                                                          2/14
Dataflow before cy35t1                           ••

Dynamics cpdyddh.F90           Physics cpphddh.F90

Dynamical var/fluxes       Physical var/fluxes               Domain averaging DDH
                                                             + writing into file

     Array DDH Arpege/Aladin/Alaro

     BUDGET MNH
                       xbuv1
                                     Array
                       xbuv2         DDH
Arome Physics                        Arome
                                                 DDH AROME

                       xbuvn

                                                                         3/14
Example of weaknesses of old dataflow    ••

     IF (LBUFLUX) THEN
         IF (LTURB) NHDQLNFP= NHDQLNFP+12
         IF (LKFBCONV) NHDQLNFP= NHDQLNFP+4
         IF (LRAYFM) NHDQLNFP= NHDQLNFP+2
         IF (LHDORIGP .AND. LMICRO ) THEN
            IF (LOWARM) NHDQLNFP= NHDQLNFP+7
           NHDQLNFP= NHDQLNFP+73
         ENDIF

IF (LKFBCONV) NDDHFT = NDDHFT+4
IF (LTURB)      NDDHFT = NDDHFT+12
IF (LHDORIGP) THEN
   IF (LMICRO ) THEN
      IF (LOWARM) NDDHFT = NDDHFT+7
     NDDHFT = NDDHFT+73
  ENDIF
ENDIF
IF (LRAYFM)     NDDHFT = NDDHFT+2
                                                             4/14

⇒ hardcoded indexes, duplication of setups in Arome ...
Motivations for a new dataflow                                    ••

Difficulties for debugging and mantaining it because of growing numbers of entries
due to evolution of physical parametrizations
Need for common structure between Arp/Ald/Alo and Arome (see Phys-Dyn
interface issues)
Getting rid of fixed structures with one index preassigned to a specific field in
setup through an hardcoded index
Providing a more user-friendly tool that can also be used for other purposes than
DDH.

                                                                                     5/14
Use of self-allocatable structures                         ••

Data is gathered within an array RDDH_DESCR of self-documented type structures
DDHFLEX
TYPE(DDHFLEX),ALLOCATABLE,DIMENSION(:):: RDDH_DESCR
with
TYPE DDHFLEX
  CHARACTER(LEN=11)::CNAME !name of field
  CHARACTER(LEN=1)::CFLUX !’F’ if flux ’V’ if variable ’T’ if tendency
  CHARACTER(LEN=3)::CMOD ! ’ARP’,’ARO’: name of model
  LOGICAL:: LKDDH !TRUE if to be stored into DDH
  ! rfield has to be a pointer because allocatable not allowed in structur
  REAL(KIND=JPRB),DIMENSION(:,:),POINTER:: RFIELD ! value of retrieved fi
  INTEGER(KIND=JPIM):: NFIELDIND! position of flux in ddh array
END TYPE DDHFLEX

                                                                                 6/14
Adding an entry to the budget: use of ADD_FIELD_3D                        ••

Call to ADD_FIELD_3D allows to add an entry to the RDDH_DESCR array
Arguments of ADD_FIELD_3D(PMAT,CDNAME,CDFLUX,CDMOD,LDINST,LDDH) are
the following:

     PMAT: the array to be stored.
     CDNAME: name of field.
     CDFLUX: ’F’ if flux ,’T’ if tendency,’V’ if variable
     CDMOD: ’ARO’ if AROME, ’ARP’ otherwise (but you may add some other label if
     you wish)
     LDINST:’TRUE’ if instaneous field
     LDDH:’TRUE’ if field is stored to be in DDH

Warning: wrong entries in ADD_FIELD_3D means wrong postprocessing of the
field ! Check syntax in xrd/module/ddh_mix.F90 before !
CALL ADD_FIELD_3D(ZTMPAF,’VQI’,’V’,’ARP’,.TRUE.,.TRUE.)
CALL ADD_FIELD_3D(ZTMPAF(:,:),CLNAME,’T’,’ARP’,.TRUE.,.TRUE.)
CALL ADD_FIELD_3D(PFRSO(:,:,1),’FCTRAYSO’,’F’,’ARP’,.TRUE.,.TRUE.)

                                                                                   7/14
Use of ADD_FIELD_3D                                             ••

ADD_FIELD_3D is the key subroutine of the new dataflow (and also the only one to be
mantained...)
      First call during execution; dimension of array DDH_DESCR is increased by one
      and documentation of field is filled
      Successive calls: data is stored in RDDH_FIELD at the right place (after a
      security check)
      According to attributes some operations can be performed if necessary in this
      subroutine.
Algorithmic constraints:
      Same sequence of calls to ADD_FIELD_3D must occur at each timestep (e.g it is
      not possible to retrieve a field every two timesteps or change the order of the call
      during execution). If not, there is a security check based on the field’s name that
      makes the program stop.

                                                                                             8/14
Architecture of the code                                                ••

                                                             module ddh_mix
                                                             DDH_DESCR DDH_FIELD
                                                              ddh_descr(1)
                                                                                      target of field1
   physics/dynamics subroutines                               namef=’’field1’

                                                              attributes of field1
   call add_field(field1,’field1’,....)                       PFIELD=FIELD1
   ...
   call add_field(fieldi,’fieldi’,....)                         ...

   ...                                                        ddh_descr(i)
                                                                                     target of fieldi
                                                              namef=’’fieldi’

                                                              attributes of fieldi

                                                              PFIELD=FIELDI

     cpcuddh.F90: averaging on domains
  Performs averaging on domains (unchanged)                     ...

  Input: ddh_field
  Output: averaged fields passed to ppfidh.F90

     ppfidh.F90: writing into file
Stores fields into DDH file starting from output of
cpcuddh and reading documentation from ddh_descr                                                         9/14
Plotting DDH files with ddhtoolbox                                     ••

DDH files are obtained using the same namelist options than historical files
ddhtoolbox obtained from Jean-Marcel and is documented within DDH
documentation on gmapdoc
Budget are retrieved using ddhb utility:
ddhb -v aladin/CT -i DHFDLALAD+0036 =>.dta file with ascii data
’-v aladin/CT’ means you are reading $DDHB_BPS/aladin/CT.fbl file containing
the list of terms in the budget of variable CT
=> Updated .fbl files can be obtained by Jean-Marcel (or created after the name of
articles in DDH file if you use last version of ddhtoolbox)

                                                                                     10/14
TEMPERATURE BUDGET (K/day)
                                                                                Example of DDH products:T,QV,QL,QR                                                          WATER VAPOUR (QV) BUDGET (g/kg/day)
                                                                                                                                                                                                                                                             ••
                                                 d032-DHFZOd032+0024.mh                                                                                                          d032-DHFZOd032+0024.mh
                                               BASE 2003-01-13 18:00 ECH 24 H                                                                                                  BASE 2003-01-13 18:00 ECH 24 H

                 -97                                                                                                                                 -97

            -194                                                                                                                                -194

            -291                                                                                                                                -291
pressure (hPa)

                                                                                                                                    pressure (hPa)
            -388                                                                                                                                -388
                                                                                                                                                                                                                              Transp SubGr turbulence
                                                                                                      Solar radiation                                                                                                         Transp SubGr conv
            -485                                                                                      Infra-red radiation                       -485                                                                          Condens Resol
                                                                                                      Transport SubGr turbulence                                                                                              Condens SubGr
                                                                                                      Transport SubGr conv                                                                                                    Evaporation Resol
                                                                                                      Condensation Resol                                                                                                      Evaporation SubGr conv
            -582                                                                                                                                -582
                                                                                                      Condensation Subgr conv                                                                                                 Corr neg
                                                                                                      Evaporation Resol                                                                                                       Residual
                                                                                                      Evaporation Subgr conv                                                                                                  Total tendency
            -679                                                                                      Sensible heat precipitation               -679
                                                                                                      Mesospheric drag
                                                                                                      Variable mass
            -776                                                                                      Residual                                  -776
                                                                                                      Total tendency

            -873                                                                                                                                -873

            -970                                                                                                                                -970
                       -3     -2          -1              0        1            2         3     4                                                          -2   -1.6   -1.2      -0.8     -0.4      0       0.4   0.8   1.2

                                      LIQUID WATER (QL) BUDGET (g/kg/day)                                                                                                       RAIN (QR) BUDGET (g/kg/day)
                                            d032-DHFZOd032+0024.mh                                                                                                               d032-DHFZOd032+0024.mh
                                         BASE 2003-01-13 18:00 ECH 24 H                                                                                                        BASE 2003-01-13 18:00 ECH 24 H

                 -97                                                                                                                                 -97

            -194                                                                                                                                -194

            -291                                                                                                                                -291
pressure (hPa)

                                                                                                                                    pressure (hPa)
            -388                                                                                                                                -388
                                                                                                      Transp SubGr turbulence
                                                                                                      Transp SubGr conv                                                                                                       Autoconv-collec Resol
            -485                                                                                      Condensation Resol                        -485                                                                          Autoconv-collec SubGr conv
                                                                                                      Condensation SubGr conv                                                                                                 Sedimentation
                                                                                                      Autoconv-collec Resol                                                                                                   Evaporation Resol
                                                                                                      Autoconv-collec SubGr conv                                                                                              Evaporation SubGr conv
            -582                                                                                                                                -582
                                                                                                      Corr neg                                                                                                                Corr neg
                                                                                                      Residual                                                                                                                Residual
                                                                                                      Total tendency                                                                                                          Total tendency
            -679                                                                                                                                -679

            -776                                                                                                                                -776

            -873                                                                                                                                -873

            -970                                                                                                                                -970
               -1.6         -1.2   -0.8            -0.4       0        0.4          0.8   1.2   1.6                                                -1.8         -1.4   -1        -0.6     -0.2     0.2      0.6   1     1.4

                                                                                                                                                                                                                                                           11/14
DDH evolution on the cycles                                         ••

cy35t1: new dataflow available in Arome.Validated
cy35t2: new dataflow available in Arp/Ald/Alo/Aro under the key LFLEXDIA
(otherwise old dataflow is used) Validated in Arpege, Aladin and Arome.
cy36t1: introduction of code for dynamical terms (not validated)
cy36t2:
  tendances and fluxes will be extracted from cptend_new directly for more
  consistency with evolution equations under LFLEXDIA key only => start now to
  use new dataflow in Alaro in order to have it validated. (A branch for having this
  feature available in cy36t1 can be available if requested). Work from JM.Piriou.
  condensed water species added under LFLEXDIA (JM.Piriou)

                                                                                       12/14
Remaining issues                                     ••

2D fields are to be added in new structures: creation of ADD_FIELD_2D
Use of common structure with Physics-Dynamics interface (see specific talk)
Dynamical terms to be introduced and validated (F.Voitus)

                                                                              13/14
Conclusion                                            ••

Positive experiences with new dataflow at Météo-France in Arpege, Aladin and
Arome: LFLEXDIA=.TRUE. will become default.
Algorithmic validated in Arpege/Aladin and Arome. In Alaro calls to
ADD_FIELD_3D to be checked.
Retrieval of physical fluxes and variables to be moved in cptend_new from cy35t2
on
Some evolutions will occur due to evolution of physics-dynamics interface but
algorithmic will probably remain the same.
ECMWF interested and aware of this work
Extensive documentation available on gmapdoc’s website

                                                                                   14/14
You can also read