Ignore:
Timestamp:
Sep 30, 2021, 9:05:18 PM (3 years ago)
Author:
oboucher
Message:

move initialization of flags for double radiation calls at the beginning in the case of XIOS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r3987 r3988  
    17431743            ENDDO
    17441744          ENDDO
    1745         ELSE
     1745       ELSE
    17461746          pbl_tke(:,:,is_ave) = 0. !ym missing init : maybe must be initialized in the same way that for klon_glo==1 ??
    17471747!>jyg
     
    19231923       !$OMP BARRIER
    19241924       missing_val=missing_val_omp
     1925       !
     1926       ! Now we activate some double radiation call flags only if some
     1927       ! diagnostics are requested, otherwise there is no point in doing this
     1928       IF (is_master) THEN
     1929         !--setting up swaero_diag to TRUE in XIOS case
     1930         IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. &
     1931            xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. &
     1932            xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR.  &
     1933              (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. &
     1934                                  xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0"))))  &
     1935            !!!--for now these fields are not in the XML files so they are omitted
     1936            !!!  xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) &
     1937            swaero_diag=.TRUE.
     1938 
     1939         !--setting up swaerofree_diag to TRUE in XIOS case
     1940         IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. &
     1941            xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR.   &
     1942            xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. &
     1943            xios_field_is_active("LWupTOAcleanclr")) &
     1944            swaerofree_diag=.TRUE.
     1945 
     1946         !--setting up dryaod_diag to TRUE in XIOS case
     1947         DO naero = 1, naero_tot-1
     1948          IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE.
     1949         ENDDO
     1950         !
     1951         !--setting up ok_4xCO2atm to TRUE in XIOS case
     1952         IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. &
     1953            xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &
     1954            xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &
     1955            xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &
     1956            xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &
     1957            xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &
     1958            ok_4xCO2atm=.TRUE.
     1959       ENDIF
     1960       !$OMP BARRIER
     1961       CALL bcast(swaero_diag)
     1962       CALL bcast(swaerofree_diag)
     1963       CALL bcast(dryaod_diag)
     1964       CALL bcast(ok_4xCO2atm)
     1965       WRITE (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm
    19251966#endif
    1926 
    1927 
     1967       !
    19281968       CALL printflag( tabcntr0,radpas,ok_journe, &
    19291969            ok_instan, ok_region )
    19301970       !
    19311971       !
    1932        !
    19331972       ! Prescrire l'ozone dans l'atmosphere
    1934        !
    19351973       !
    19361974       !c         DO i = 1, klon
     
    19882026#endif
    19892027       ENDIF
     2028       !
    19902029       IF (type_trac == 'repr') THEN
    19912030#ifdef REPROBUS
     
    20362075          SFRWL(6)=3.02191470E-02
    20372076       END SELECT
    2038 
    2039 
    20402077       !albedo SB <<<
    20412078
     
    21602197      ! RomP <<<
    21612198    ENDIF
    2162 
    21632199    !
    21642200    ! Ne pas affecter les valeurs entrees de u, v, h, et q
     
    51735209#endif
    51745210
    5175 ! Pour XIOS : On remet des variables a .false. apres un premier appel
    5176     IF (debut) THEN
    5177 #ifdef CPP_XIOS
    5178       swaero_diag=.FALSE.
    5179       swaerofree_diag=.FALSE.
    5180       dryaod_diag=.FALSE.
    5181       ok_4xCO2atm= .FALSE.
    5182 !      write (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm
    5183 
    5184       IF (is_master) THEN
    5185         !--setting up swaero_diag to TRUE in XIOS case
    5186         IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. &
    5187            xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. &
    5188            xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR.  &
    5189              (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. &
    5190                                  xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0"))))  &
    5191            !!!--for now these fields are not in the XML files so they are omitted
    5192            !!!  xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) &
    5193            swaero_diag=.TRUE.
    5194 
    5195         !--setting up swaerofree_diag to TRUE in XIOS case
    5196         IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. &
    5197            xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR.   &
    5198            xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. &
    5199            xios_field_is_active("LWupTOAcleanclr")) &
    5200            swaerofree_diag=.TRUE.
    5201 
    5202         !--setting up dryaod_diag to TRUE in XIOS case
    5203         DO naero = 1, naero_tot-1
    5204          IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE.
    5205         ENDDO
    5206         !
    5207         !--setting up ok_4xCO2atm to TRUE in XIOS case
    5208         IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. &
    5209            xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &
    5210            xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &
    5211            xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &
    5212            xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &
    5213            xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &
    5214            ok_4xCO2atm=.TRUE.
    5215       ENDIF
    5216       !$OMP BARRIER
    5217       CALL bcast(swaero_diag)
    5218       CALL bcast(swaerofree_diag)
    5219       CALL bcast(dryaod_diag)
    5220       CALL bcast(ok_4xCO2atm)
    5221 !      write (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm
    5222 #endif
    5223     ENDIF
    5224 
    52255211    !====================================================================
    52265212    ! Arret du modele apres hgardfou en cas de detection d'un
Note: See TracChangeset for help on using the changeset viewer.