Ignore:
Timestamp:
Sep 22, 2024, 10:07:56 PM (3 weeks ago)
Author:
dcugnet
Message:

The fortran parameters file "iso_params_mod.F90" is introduced so that "tnat" and "alpha_ideal" are defined in a single place but used in several.
The "getKey" routine is only used in "infotrac" and "infotrac_phy" routines, but could be used outside this scope to get tracers parameters (read from "tracer.def") or isotopic parameters (read from "isotopes_params.def" - disabled for now).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3dmem/check_isotopes_loc.F90

    r5200 r5214  
    33   USE strings_mod, ONLY: maxlen, msg, strIdx, strStack, int2str, real2str
    44   USE infotrac,    ONLY: nqtot, niso, nphas, isotope, isoCheck, iqIsoPha, isoSelect, &
    5                           ntiso, iH2O, nzone, tracers, isoName,  itZonIso, getKey
     5                          ntiso, iH2O, nzone, tracers, isoName,  itZonIso
     6   USE iso_params_mod, ONLY: tnat_H216O, tnat_H217O, tnat_H218O, tnat_HDO, tnat_HTO
    67#ifdef CPP_IOIPSL
    78   USE ioipsl,          ONLY: getin
     
    1617   CHARACTER(LEN=maxlen) :: modname, msg1, nm(2)
    1718   INTEGER :: ixt, ipha, k, i, iq, iiso, izon, ieau, iqeau, iqpar
    18    INTEGER, ALLOCATABLE ::   ix(:)
     19   INTEGER, ALLOCATABLE       ::   ix(:)
    1920   REAL,    ALLOCATABLE, SAVE :: tnat(:)         !--- OpenMP shared variable
    20    REAL    :: xtractot, xiiso, deltaD, q1, q2
     21   REAL :: xtractot, xiiso, deltaD, q1, q2
    2122   REAL, PARAMETER :: borne     = 1e19,  &
    2223                      errmax    = 1e-8,  &       !--- Max. absolute error
     
    4041      ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1)
    4142      ALLOCATE(tnat(niso))
    42       iso_eau = strIdx(isoName,'H216O')
    43       iso_O17 = strIdx(isoName,'H217O')
    44       iso_O18 = strIdx(isoName,'H218O')
    45       iso_HDO = strIdx(isoName,'HDO')
    46       iso_HTO = strIdx(isoName,'HTO')
    47       IF(ltnat1) THEN
    48          tnat(:)=1.0
    49       ELSE
    50          IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1)
    51       END IF
     43      iso_eau = strIdx(isoName,'H216O'); IF(iso_eau /= 0) tnat(iso_eau) = tnat_H216O
     44      iso_O17 = strIdx(isoName,'H217O'); IF(iso_O17 /= 0) tnat(iso_O17) = tnat_H217O
     45      iso_O18 = strIdx(isoName,'H218O'); IF(iso_O18 /= 0) tnat(iso_O18) = tnat_H218O
     46      iso_HDO = strIdx(isoName,'HDO');   IF(iso_HDO /= 0) tnat(iso_HDO) = tnat_HDO
     47      iso_HTO = strIdx(isoName,'HTO');   IF(iso_HTO /= 0) tnat(iso_HTO) = tnat_HTO
     48      IF(ltnat1) tnat(:) = 1.0
    5249!$OMP END MASTER
    5350!$OMP BARRIER
     
    6461         DO k = 1, llm
    6562            DO i = ijb, ije
    66                IF(ABS(q(i,k,iq)) <= borne) CYCLE
     63               IF(ABS(q(i,k,iq)) < borne) CYCLE
    6764               WRITE(msg1,'(s,"(",i0,",",i0,",",i0,") = ",ES12.4)')TRIM(isoName(ixt)),i,k,iq,q(i,k,iq)
    6865               CALL msg(msg1, modname)
Note: See TracChangeset for help on using the changeset viewer.