Ignore:
Timestamp:
Jun 16, 2022, 8:16:59 PM (3 years ago)
Author:
dcugnet
Message:

The variable "types_trac" is the equivalent of "type_trac" in case multiple sections must be read
and used in "tracer.def" file.
Tests on the "type_trac" were replaced with tests on the vector "types_trac".
Most of the time, there are two components: 'lmdz' and a second one. The later has priority on 'lmdz'
and must be used for the tests. For more components, care must be taken to execute specific parts
of the code on the right tracers ; the tracers(:)%component has been created in that respect.

Location:
LMDZ6/trunk/libf/phylmdiso
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmdiso/phyetat0.F90

    r4089 r4170  
    3131  USE geometry_mod,     ONLY: longitude_deg, latitude_deg
    3232  USE iostart,          ONLY: close_startphy, get_field, get_var, open_startphy
    33   USE infotrac_phy,     ONLY: nqtot, nbtr, type_trac, tracers
     33  USE infotrac_phy,     ONLY: nqtot, nbtr, types_trac, tracers
    3434  USE traclmdz_mod,     ONLY: traclmdz_from_restart
    3535  USE carbon_cycle_mod, ONLY: carbon_cycle_tr, carbon_cycle_cpl, co2_send
     
    468468!===========================================
    469469
    470   IF (type_trac == 'lmdz') THEN
     470!--OB now this is for co2i - ThL: and therefore also for inco
     471  IF (ANY(types_trac == 'co2i') .OR. ANY(types_trac == 'inco')) THEN
     472     IF (carbon_cycle_cpl) THEN
     473        ALLOCATE(co2_send(klon), stat=ierr)
     474        IF (ierr /= 0) CALL abort_physic('phyetat0', 'pb allocation co2_send', 1)
     475        found=phyetat0_get(1,co2_send,"co2_send","co2 send",co2_ppm)
     476     ENDIF
     477  ELSE IF (ANY(types_trac == 'lmdz')) THEN
    471478     it = 0
    472479     DO iq = 1, nqtot
     
    477484     END DO
    478485     CALL traclmdz_from_restart(trs)
    479   ENDIF
    480 
    481 !--OB now this is for co2i - ThL: and therefore also for inco
    482   IF (type_trac == 'co2i' .OR. type_trac == 'inco') THEN
    483      IF (carbon_cycle_cpl) THEN
    484         ALLOCATE(co2_send(klon), stat=ierr)
    485         IF (ierr /= 0) CALL abort_physic('phyetat0', 'pb allocation co2_send', 1)
    486         found=phyetat0_get(1,co2_send,"co2_send","co2 send",co2_ppm)
    487      ENDIF
    488486  ENDIF
    489487
  • LMDZ6/trunk/libf/phylmdiso/phyredem.F90

    r4149 r4170  
    3939  USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var
    4040  USE traclmdz_mod, ONLY : traclmdz_to_restart
    41   USE infotrac_phy, ONLY: type_trac, nqtot, tracers, nbtr, niso
     41  USE infotrac_phy, ONLY: types_trac, nqtot, tracers, nbtr, niso
    4242#ifdef ISO
    4343#ifdef ISOVERIF
     
    345345
    346346
    347     ! trs from traclmdz_mod
    348     IF (type_trac == 'lmdz') THEN
    349        CALL traclmdz_to_restart(trs)
    350        it = 0
    351        DO iq = 1, nqtot
    352           IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
    353           it = it+1
    354           CALL put_field(pass,"trs_"//tracers(iq)%name, "", trs(:, it))
    355        END DO
    356     END IF
    357 
    358     IF (type_trac == 'co2i' .OR. type_trac == 'inco') THEN
     347    IF (ANY(types_trac == 'co2i') .OR. ANY(types_trac == 'inco')) THEN
    359348       IF (carbon_cycle_cpl) THEN
    360349          IF (.NOT. ALLOCATED(co2_send)) THEN
     
    365354          CALL put_field(pass,"co2_send", "co2_ppm for coupling", co2_send)
    366355       END IF
     356
     357    ! trs from traclmdz_mod
     358    ELSE IF (ANY(types_trac == 'lmdz')) THEN
     359       CALL traclmdz_to_restart(trs)
     360       it = 0
     361       DO iq = 1, nqtot
     362          IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     363          it = it+1
     364          CALL put_field(pass,"trs_"//tracers(iq)%name, "", trs(:, it))
     365       END DO
    367366    END IF
    368367
  • LMDZ6/trunk/libf/phylmdiso/phys_output_mod.F90

    r4149 r4170  
    3535    USE iophy
    3636    USE dimphy
    37     USE infotrac_phy, ONLY: nqtot, tracers, type_trac, niso, ntraciso=>ntiso
     37    USE infotrac_phy, ONLY: nqtot, tracers, niso, ntraciso=>ntiso
    3838    USE strings_mod,  ONLY: maxlen
    3939    USE ioipsl
  • LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90

    r4143 r4170  
    3939    USE ioipsl_getin_p_mod, ONLY : getin_p
    4040    USE indice_sol_mod
    41     USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac, nqCO2
     41    USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, types_trac, nqCO2
    4242    USE readTracFiles_mod, ONLY: addPhase
    4343    USE strings_mod,  ONLY: strIdx, strStack, int2str
     
    15391539       tau_overturning_th(:)=0.
    15401540
    1541        IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN
     1541       IF (ANY(types_trac == 'inca') .OR. ANY(types_trac == 'inco')) THEN
    15421542          ! jg : initialisation jusqu'au ces variables sont dans restart
    15431543          ccm(:,:,:) = 0.
     
    21512151       !c         ENDDO
    21522152       !
    2153        IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN                   ! ModThL
     2153       IF (ANY(types_trac == 'inca') .OR. ANY(types_trac == 'inco')) THEN  ! ModThL
    21542154#ifdef INCA
    21552155          CALL VTe(VTphysiq)
     
    22002200       ENDIF
    22012201       !
    2202        IF (type_trac == 'repr') THEN
     2202       IF (ANY(types_trac == 'repr')) THEN
    22032203#ifdef REPROBUS
    22042204          CALL chemini_rep(  &
     
    23162316
    23172317    ! Update time and other variables in Reprobus
    2318     IF (type_trac == 'repr') THEN
     2318    IF (ANY(types_trac == 'repr')) THEN
    23192319#ifdef REPROBUS
    23202320       CALL Init_chem_rep_xjour(jD_cur-jD_ref+day_ref)
     
    35823582          !
    35833583          !>jyg
    3584           IF (type_trac == 'repr') THEN
     3584          IF (ANY(types_trac == 'repr')) THEN
    35853585             nbtr_tmp=ntra
    35863586          ELSE
     
    51125112    ENDDO
    51135113
    5114     IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN      ! ModThL
     5114    IF (ANY(types_trac == 'inca') .OR. ANY(types_trac == 'inco')) THEN ! ModThL
    51155115#ifdef INCA
    51165116       CALL VTe(VTphysiq)
     
    51685168#endif
    51695169    ENDIF !type_trac = inca or inco
    5170     IF (type_trac == 'repr') THEN
     5170    IF (ANY(types_trac == 'repr')) THEN
    51715171#ifdef REPROBUS
    51725172    !CALL chemtime_rep(itap+itau_phy-1, date0, dtime, itap)
     
    62646264    !
    62656265
    6266     IF (type_trac=='repr') THEN
     6266    IF (ANY(types_trac=='repr')) THEN
    62676267!MM pas d'impact, car on recupere q_seri,tr_seri,t_seri via phys_local_var_mod
    62686268!MM                               dans Reprobus
     
    64306430#endif
    64316431    !
    6432     IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN
     6432    IF (ANY(types_trac == 'inca') .OR. ANY(types_trac == 'inco')) THEN
    64336433#ifdef INCA
    64346434       CALL VTe(VTphysiq)
Note: See TracChangeset for help on using the changeset viewer.