Ignore:
Timestamp:
Sep 25, 2024, 12:03:08 PM (3 months ago)
Author:
abarral
Message:

Merge r5214

Location:
LMDZ6/branches/Amaury_dev/libf/dyn3dmem
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/dyn3dmem/check_isotopes_loc.F90

    r5223 r5229  
    33   USE lmdz_strings, ONLY: maxlen, msg, strIdx, strStack, int2str, real2str
    44   USE lmdz_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
    78
     
    1415   CHARACTER(LEN=maxlen) :: modname, msg1, nm(2)
    1516   INTEGER :: ixt, ipha, k, i, iq, iiso, izon, ieau, iqeau, iqpar
    16    INTEGER, ALLOCATABLE ::   ix(:)
     17   INTEGER, ALLOCATABLE       ::   ix(:)
    1718   REAL,    ALLOCATABLE, SAVE :: tnat(:)         !--- OpenMP shared variable
    18    REAL    :: xtractot, xiiso, deltaD, q1, q2
     19   REAL :: xtractot, xiiso, deltaD, q1, q2
    1920   REAL, PARAMETER :: borne     = 1e19,  &
    2021                      errmax    = 1e-8,  &       !--- Max. absolute error
     
    3839      ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1)
    3940      ALLOCATE(tnat(niso))
    40       iso_eau = strIdx(isoName,'H216O')
    41       iso_O17 = strIdx(isoName,'H217O')
    42       iso_O18 = strIdx(isoName,'H218O')
    43       iso_HDO = strIdx(isoName,'HDO')
    44       iso_HTO = strIdx(isoName,'HTO')
    45       IF(ltnat1) THEN
    46          tnat(:)=1.0
    47       ELSE
    48          IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1)
    49       END IF
     41      iso_eau = strIdx(isoName,'H216O'); IF(iso_eau /= 0) tnat(iso_eau) = tnat_H216O
     42      iso_O17 = strIdx(isoName,'H217O'); IF(iso_O17 /= 0) tnat(iso_O17) = tnat_H217O
     43      iso_O18 = strIdx(isoName,'H218O'); IF(iso_O18 /= 0) tnat(iso_O18) = tnat_H218O
     44      iso_HDO = strIdx(isoName,'HDO');   IF(iso_HDO /= 0) tnat(iso_HDO) = tnat_HDO
     45      iso_HTO = strIdx(isoName,'HTO');   IF(iso_HTO /= 0) tnat(iso_HTO) = tnat_HTO
     46      IF(ltnat1) tnat(:) = 1.0
    5047!$OMP END MASTER
    5148!$OMP BARRIER
     
    6259         DO k = 1, llm
    6360            DO i = ijb, ije
    64                IF(ABS(q(i,k,iq)) <= borne) CYCLE
     61               IF(ABS(q(i,k,iq)) < borne) CYCLE
    6562               WRITE(msg1,'(s,"(",i0,",",i0,",",i0,") = ",ES12.4)')TRIM(isoName(ixt)),i,k,iq,q(i,k,iq)
    6663               CALL msg(msg1, modname)
  • LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynetat0_loc.f90

    r5223 r5229  
    88  USE parallel_lmdz
    99  USE lmdz_infotrac, ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName, &
    10           new2oldH2O, newHNO3, oldHNO3, getKey
     10          new2oldH2O, newHNO3, oldHNO3
    1111  USE lmdz_strings, ONLY: maxlen, msg, strStack, real2str, int2str, strIdx
    1212  USE netcdf, ONLY: nf90_open, nf90_nowrite, nf90_inquire_dimension, nf90_inq_varid, &
     
    2323  USE lmdz_iniprint, ONLY: lunout, prt_level
    2424  USE lmdz_comgeom
     25  USE iso_params_mod   ! tnat_* and alpha_ideal_*
    2526
    2627  USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
     
    188189          CALL msg(' !!!  Beware: alpha_ideal put to 1  !!!', modname)
    189190        ELSE
    190           IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) &
    191                   CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1)
     191          SELECT CASE(isoName(iName))
     192            CASE('H216O'); tnat = tnat_H216O; alpha_ideal = alpha_ideal_H216O
     193            CASE('H217O'); tnat = tnat_H217O; alpha_ideal = alpha_ideal_H217O
     194            CASE('H218O'); tnat = tnat_H218O; alpha_ideal = alpha_ideal_H218O
     195            CASE('HDO');   tnat = tnat_HDO;   alpha_ideal = alpha_ideal_HDO
     196            CASE('HTO');   tnat = tnat_HTO;   alpha_ideal = alpha_ideal_HTO
     197            CASE DEFAULT; CALL abort_gcm(TRIM(modname), 'unknown isotope "' // TRIM(isoName(iName)) // '" ; check tracer.def file', 1)
     198          END SELECT
    192199        END IF
    193200        CALL msg('Missing tracer <' // TRIM(var) // '> => initialized with a simplified Rayleigh distillation law.', modname)
  • LMDZ6/branches/Amaury_dev/libf/dyn3dmem/iniacademic_loc.F90

    r5223 r5229  
    1 ! $Id: iniacademic.F90 1625 2012-05-09 13:14:48Z lguez $
    2 
    31SUBROUTINE iniacademic_loc(vcov, ucov, teta, q, masse, ps, phis, time_0)
    42
    53  USE lmdz_filtreg, ONLY: inifilr
    6   USE lmdz_infotrac, ONLY: nqtot, niso, iqIsoPha, tracers, getKey, isoName, addPhase
     4  USE lmdz_infotrac, ONLY: nqtot, niso, iqIsoPha, tracers, isoName, addPhase
    75  USE control_mod, ONLY: day_step, planet_type
    86  USE exner_hyb_m, ONLY: exner_hyb
     
    2119  USE lmdz_academic, ONLY: tetarappel, knewt_t, kfrict, knewt_g, clat4
    2220  USE lmdz_comgeom
     21  USE iso_params_mod   ! tnat_* and alpha_ideal_*
    2322
    2423  !   Author:    Frederic Hourdin      original: 15/01/93
     
    322321                    WRITE(lunout, *) 'In '//TRIM(modname)//': !!!  Beware: alpha_ideal put to 1  !!!'
    323322                 ELSE
    324                     IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) &
    325                     CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1)
     323                    SELECT CASE(isoName(iName))
     324                      CASE('H216O'); tnat = tnat_H216O; alpha_ideal = alpha_ideal_H216O
     325                      CASE('H217O'); tnat = tnat_H217O; alpha_ideal = alpha_ideal_H217O
     326                      CASE('H218O'); tnat = tnat_H218O; alpha_ideal = alpha_ideal_H218O
     327                      CASE('HDO');   tnat = tnat_HDO;   alpha_ideal = alpha_ideal_HDO
     328                      CASE('HTO');   tnat = tnat_HTO;   alpha_ideal = alpha_ideal_HTO
     329                      CASE DEFAULT
     330                         CALL abort_gcm(TRIM(modname),'unknown isotope "'//TRIM(isoName(iName))//'" ; check tracer.def file',1)
     331                    END SELECT
    326332                 END IF
    327333                 q(ijb_u:ije_u,:,iq) = q(ijb_u:ije_u,:,iqParent)*tnat*(q(ijb_u:ije_u,:,iqParent)/30.e-3)**(alpha_ideal-1.)
Note: See TracChangeset for help on using the changeset viewer.