Changeset 5474


Ignore:
Timestamp:
Jan 13, 2025, 7:05:39 PM (18 hours ago)
Author:
dcugnet
Message:

Move variables and computation of the water-related indices ivap, iliq, isol,
ibs, icf, ircv from physiq_mod to infotrac_phy.

Location:
LMDZ6/trunk/libf
Files:
3 edited

Legend:

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

    r5394 r5474  
    2727   !=== FOR ISOTOPES: Specific to water
    2828   PUBLIC :: iH2O                                          !--- Value of "ixIso" for "H2O" isotopes class
    29    PUBLIC :: ivap, iliq, isol
     29   PUBLIC :: ivap, iliq, isol, ibs, icf, irvc
    3030   !=== FOR ISOTOPES: Depending on the selected isotopes family
    3131   PUBLIC :: isotope                                       !--- Selected isotopes database (argument of getKey)
     
    104104
    105105   !=== INDICES FOR WATER
    106    INTEGER, SAVE :: ivap, iliq, isol
    107 !$OMP THREADPRIVATE(ivap, iliq, isol)
     106   INTEGER, SAVE :: ivap, iliq, isol, ibs, icf, irvc
     107!$OMP THREADPRIVATE(ivap, iliq, isol, ibs, icf, irvc)
    108108
    109109   !=== DIMENSIONS OF THE TRACERS TABLES AND OTHER SCALAR VARIABLES
     
    214214   SELECT CASE(type_trac)
    215215      CASE('inca', 'inco')
    216 IF (.NOT. CPPKEY_INCA) THEN
    217          CALL abort_physic(modname, 'You must add cpp key INCA and compile with INCA code', 1)
    218 END IF
     216         IF(.NOT.CPPKEY_INCA)     CALL abort_physic(modname, 'You must add cpp key INCA and compile with INCA code', 1)
    219217      CASE('repr')
    220 IF (.NOT. CPPKEY_REPROBUS) THEN
    221          CALL abort_physic(modname, 'You must add cpp key REPROBUS and compile with REPROBUS code', 1)
    222 END IF
     218         IF(.NOT.CPPKEY_REPROBUS) CALL abort_physic(modname, 'You must add cpp key REPROBUS and compile with REPROBUS code', 1)
    223219      CASE('coag')
    224 IF (.NOT. CPPKEY_STRATAER) THEN
    225          CALL abort_physic(modname, 'You must add cpp key StratAer and compile with StratAer code', 1)
    226 END IF
     220         IF(.NOT.CPPKEY_STRATAER) CALL abort_physic(modname, 'You must add cpp key StratAer and compile with StratAer code', 1)
    227221   END SELECT
    228222!##############################################################################################################################
     
    401395      CALL abort_physic(modname, 'problem with the computation of nqtottr', 1)
    402396
     397   !--- Compute indices for water
     398   ivap = strIdx(tracers(:)%name, addPhase('H2O', 'g'))
     399   iliq = strIdx(tracers(:)%name, addPhase('H2O', 'l'))
     400   isol = strIdx(tracers(:)%name, addPhase('H2O', 's'))
     401   ibs  = strIdx(tracers(:)%name, addPhase('H2O', 'b'))
     402   icf  = strIdx(tracers(:)%name, addPhase('H2O', 'f'))
     403   irvc = strIdx(tracers(:)%name, addPhase('H2O', 'c'))
     404
     405   IF(CPPKEY_STRATAER .AND. type_trac == 'coag') THEN
     406      nbtr_bin    = COUNT([(tracers(iq)%name(1:3)=='BIN', iq=1, nqtot)])
     407      nbtr_sulgas = COUNT([(tracers(iq)%name(1:3)=='GAS', iq=1, nqtot)])
     408      tnames = PACK(tracers(:)%name, MASK=tracers(:)%isInPhysics)
     409      id_BIN01_strat = strIdx(tnames, 'BIN01'   )
     410      id_OCS_strat   = strIdx(tnames, 'GASOCS'  )
     411      id_SO2_strat   = strIdx(tnames, 'GASSO2'  )
     412      id_H2SO4_strat = strIdx(tnames, 'GASH2SO4')
     413      id_TEST_strat  = strIdx(tnames, 'GASTEST' )
     414   END IF
     415
    403416   !=== DISPLAY THE RESULTS
    404417   CALL msg('nqo    = '//TRIM(int2str(nqo)),    modname)
     
    434447   CALL msg('iso_iName = '//strStack(int2str(PACK(tracers(:)%iso_iName, MASK=tracers(:)%iso_iGroup==iH2O))), modname)
    435448#endif
    436 IF (CPPKEY_STRATAER) THEN
    437    IF (type_trac == 'coag') THEN
    438       nbtr_bin    = COUNT([(tracers(iq)%name(1:3)=='BIN', iq=1, nqtot)])
    439       nbtr_sulgas = COUNT([(tracers(iq)%name(1:3)=='GAS', iq=1, nqtot)])
    440       tnames = PACK(tracers(:)%name, MASK=tracers(:)%isInPhysics)
    441       id_BIN01_strat = strIdx(tnames, 'BIN01'   )
    442       id_OCS_strat   = strIdx(tnames, 'GASOCS'  )
    443       id_SO2_strat   = strIdx(tnames, 'GASSO2'  )
    444       id_H2SO4_strat = strIdx(tnames, 'GASH2SO4')
    445       id_TEST_strat  = strIdx(tnames, 'GASTEST' )
     449   IF(CPPKEY_STRATAER .AND. type_trac == 'coag') THEN
    446450      CALL msg('nbtr_bin       ='//TRIM(int2str(nbtr_bin      )), modname)
    447451      CALL msg('nbtr_sulgas    ='//TRIM(int2str(nbtr_sulgas   )), modname)
     
    452456      CALL msg('id_TEST_strat  ='//TRIM(int2str(id_TEST_strat )), modname)
    453457   END IF
    454 END IF
    455    CALL msg('end', modname)
    456458
    457459END SUBROUTINE init_infotrac_phy
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r5470 r5474  
    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, addPhase
     41    USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac, addPhase, ivap, iliq, isol, ibs, icf, irvc
    4242    USE strings_mod,  ONLY: strIdx
    4343    USE iophy
     
    510510    !======================================================================
    511511    !
    512     ! indices de traceurs eau vapeur, liquide, glace, fraction nuageuse LS (optional), blowing snow (optional)
    513     INTEGER,SAVE :: ivap, iliq, isol, ibs, icf, irvc
    514 !$OMP THREADPRIVATE(ivap, iliq, isol, ibs, icf, irvc)
    515     !
    516512    !
    517513    ! Variables argument:
     
    13501346
    13511347    IF (first) THEN
    1352        ivap = strIdx(tracers(:)%name, addPhase('H2O', 'g'))
    1353        iliq = strIdx(tracers(:)%name, addPhase('H2O', 'l'))
    1354        isol = strIdx(tracers(:)%name, addPhase('H2O', 's'))
    1355        ibs  = strIdx(tracers(:)%name, addPhase('H2O', 'b'))
    1356        icf  = strIdx(tracers(:)%name, addPhase('H2O', 'f'))
    1357        irvc = strIdx(tracers(:)%name, addPhase('H2O', 'c'))
    13581348!       CALL init_etat0_limit_unstruct
    13591349!       IF (.NOT. create_etat0_limit) CALL init_limit_read(days_elapsed)
  • LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90

    r5470 r5474  
    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,addPhase, ivap, iliq, isol
     41    USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac,addPhase, ivap, iliq, isol, ibs, icf, irvc
    4242    USE strings_mod,  ONLY: strIdx
    4343    USE iophy
     
    579579    !======================================================================
    580580    !
    581     ! indices de traceurs eau vapeur, liquide, glace, fraction nuageuse LS (optional), blowing snow (optional)
    582 !    INTEGER,SAVE :: ivap, iliq, isol, irneb, ibs
    583 !!$OMP THREADPRIVATE(ivap, iliq, isol, irneb, ibs)
    584 ! Camille Risi 25 juillet 2023: ivap,iliq,isol deja definis dans infotrac_phy.
    585 ! Et ils sont utiles ailleurs que dans physiq_mod (ex:
    586 ! reevap -> je commente les 2 lignes au dessus et je laisse la definition
    587 ! plutot dans infotrac_phy
    588     INTEGER,SAVE :: irneb, ibs, icf,irvc
    589 !$OMP THREADPRIVATE(irneb, ibs, icf,irvc)
    590 !
    591581    !
    592582    ! Variables argument:
     
    14591449
    14601450    IF (first) THEN
    1461        ivap = strIdx(tracers(:)%name, addPhase('H2O', 'g'))
    1462        iliq = strIdx(tracers(:)%name, addPhase('H2O', 'l'))
    1463        isol = strIdx(tracers(:)%name, addPhase('H2O', 's'))
    1464        ibs  = strIdx(tracers(:)%name, addPhase('H2O', 'b'))
    1465        icf  = strIdx(tracers(:)%name, addPhase('H2O', 'f'))
    1466        irvc = strIdx(tracers(:)%name, addPhase('H2O', 'c'))
    14671451!       CALL init_etat0_limit_unstruct
    14681452       IF (.NOT. create_etat0_limit) CALL init_limit_read(days_elapsed)
Note: See TracChangeset for help on using the changeset viewer.