Ignore:
Timestamp:
Sep 22, 2021, 6:11:35 PM (3 years ago)
Author:
dcugnet
Message:
  • fix of the delPhase function.
  • getvar1 and getvar2 fixed and modified to avoid the usage of files with several time records and make the calls rather short.
  • works again with iadv==0
  • no more issues with tracers numbers (nqo, nqtot, etc.)
  • fixes in the algebrical reduction routine used for "isotopes_parems.def" (containing simple expressions with variables that have to be substituted).
  • still to be validated numerically
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/LMDZ-tracers/libf/phylmd/infotrac_phy.F90

    r3891 r3985  
    33  USE       strings_mod, ONLY: msg, fmsg, test, strIdx, int2str
    44
    5   USE readTracFiles_mod, ONLY: getKey_init, getKey, indexUpdate, delPhase
     5  USE readTracFiles_mod, ONLY: getKey_init, getKey, indexUpdate, delPhase, phases_sep, known_phases, nphases
    66
    77  USE trac_types_mod,    ONLY: tra, iso, kys
     
    158158
    159159  CHARACTER(LEN=256) :: modname="init_infotrac_phy"
     160  INTEGER :: iq
    160161  LOGICAL :: lerr
    161162
     
    188189#ifdef CPP_StratAer
    189190  IF (type_trac == 'coag') THEN
    190     nbtr_bin=0
    191     nbtr_sulgas=0
    192     DO iq = 1, nqtrue
    193       IF(tracers(iq)%name(1:3)=='BIN') nbtr_bin    = nbtr_bin   +1
    194       IF(tracers(iq)%name(1:3)=='GAS') nbtr_sulgas = nbtr_sulgas+1
    195       SELECT CASE(tracers(iq)%name)
    196         CASE('BIN01');    id_BIN01_strat = iq - nqo; CALL msg('id_BIN01_strat=', id_BIN01_strat)
    197         CASE('GASOCS');   id_OCS_strat   = iq - nqo; CALL msg('id_OCS_strat  =', id_OCS_strat)
    198         CASE('GASSO2');   id_SO2_strat   = iq - nqo; CALL msg('id_SO2_strat  =', id_SO2_strat)
    199         CASE('GASH2SO4'); id_H2SO4_strat = iq - nqo; CALL msg('id_H2SO4_strat=', id_H2SO4_strat)
    200         CASE('GASTEST');  id_TEST_strat  = iq - nqo; CALL msg('id_TEST_strat =', id_TEST_strat)
    201       END SELECT
    202     END DO
    203     CALL msg('nbtr_bin      =',nbtr_bin)
    204     CALL msg('nbtr_sulgas   =',nbtr_sulgas)
     191    nbtr_bin    = COUNT([(tracers(iq)%name(1:3)=='BIN', iq=1, nqtot)]); CALL msg('nbtr_bin       =', nbtr_bin)
     192    nbtr_sulgas = COUNT([(tracers(iq)%name(1:3)=='GAS', iq=1, nqtot)]); CALL msg('nbtr_sulgas    =', nbtr_sulgas)
     193    id_BIN01_strat = MAX(0, strIdx(tracers(:)%name, 'BIN01'   ) - nqo); CALL msg('id_BIN01_strat =', id_BIN01_strat)
     194    id_OCS_strat   = MAX(0, strIdx(tracers(:)%name, 'GASOSC'  ) - nqo); CALL msg('id_OCS_strat   =',   id_OCS_strat)
     195    id_SO2_strat   = MAX(0, strIdx(tracers(:)%name, 'GASSO2'  ) - nqo); CALL msg('id_SO2_strat   =',   id_SO2_strat)
     196    id_H2SO4_strat = MAX(0, strIdx(tracers(:)%name, 'GASH2SO4') - nqo); CALL msg('id_H2SO4_strat =', id_H2SO4_strat)
     197    id_TEST_strat  = MAX(0, strIdx(tracers(:)%name, 'GASTEST' ) - nqo); CALL msg('id_TEST_strat  =',  id_TEST_strat)
    205198  END IF
    206199#endif
Note: See TracChangeset for help on using the changeset viewer.