Ignore:
Timestamp:
Sep 20, 2024, 1:10:18 PM (3 months ago)
Author:
Laurent Fairhead
Message:

Merge with trunk revision 5202 before reintegration to trunk

Location:
LMDZ6/branches/cirrus
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/cirrus

  • LMDZ6/branches/cirrus/libf/dyn3dmem/check_isotopes_loc.F90

    r5202 r5203  
    44   USE infotrac,    ONLY: nqtot, niso, nphas, isotope, isoCheck, iqIsoPha, isoSelect, &
    55                          ntiso, iH2O, nzone, tracers, isoName,  itZonIso, getKey
     6#ifdef CPP_IOIPSL
     7   USE ioipsl,          ONLY: getin
     8#else
     9   USE ioipsl_getincom, ONLY: getin
     10#endif
    611   IMPLICIT NONE
    712   include "dimensions.h"
     
    2126                      deltaDmin =-999.0, &
    2227                      ridicule  = 1e-12
    23    INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, & !--- OpenMP shared variables
    24                              iso_O17, iso_HTO
     28   INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, iso_O17, iso_HTO
     29!$OMP THREADPRIVATE(iso_eau, iso_HDO, iso_O18, iso_O17, iso_HTO)
     30   LOGICAL       :: ltnat1
    2531   LOGICAL, SAVE :: first=.TRUE.
    26    LOGICAL, PARAMETER :: tnat1=.TRUE.
    2732!$OMP THREADPRIVATE(first)
    2833
     
    3338   IF(first) THEN
    3439!$OMP MASTER
     40      ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1)
     41      ALLOCATE(tnat(niso))
    3542      iso_eau = strIdx(isoName,'H216O')
     43      iso_O17 = strIdx(isoName,'H217O')
     44      iso_O18 = strIdx(isoName,'H218O')
    3645      iso_HDO = strIdx(isoName,'HDO')
    37       iso_O18 = strIdx(isoName,'H218O')
    38       iso_O17 = strIdx(isoName,'H217O')
    3946      iso_HTO = strIdx(isoName,'HTO')
    40       if (tnat1) then
    41               tnat(:)=1.0
    42       else
     47      IF(ltnat1) THEN
     48         tnat(:)=1.0
     49      ELSE
    4350         IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1)
    44       endif
     51      END IF
    4552!$OMP END MASTER
    4653!$OMP BARRIER
     
    5764         DO k = 1, llm
    5865            DO i = ijb, ije
    59                IF(ABS(q(i,k,iq))<=borne) CYCLE
     66               IF(ABS(q(i,k,iq)) <= borne) CYCLE
    6067               WRITE(msg1,'(s,"(",i0,",",i0,",",i0,") = ",ES12.4)')TRIM(isoName(ixt)),i,k,iq,q(i,k,iq)
    6168               CALL msg(msg1, modname)
  • LMDZ6/branches/cirrus/libf/dyn3dmem/dynetat0_loc.F90

    r5202 r5203  
    77!-------------------------------------------------------------------------------
    88  USE parallel_lmdz
    9   USE infotrac,    ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName
     9  USE infotrac,    ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName, &
     10                         new2oldH2O, newHNO3, oldHNO3, getKey
    1011  USE strings_mod, ONLY: maxlen, msg, strStack, real2str, int2str, strIdx
    1112  USE netcdf,      ONLY: NF90_OPEN,  NF90_NOWRITE, NF90_INQUIRE_DIMENSION, NF90_INQ_VARID, &
    1213                         NF90_CLOSE, NF90_GET_VAR, NF90_INQUIRE_VARIABLE,  NF90_NoErr
    13   USE readTracFiles_mod, ONLY: new2oldH2O, newHNO3, oldHNO3, getKey
    1414  USE control_mod, ONLY: planet_type
    1515  USE assert_eq_m, ONLY: assert_eq
     
    2020  USE temps_mod, ONLY: annee_ref, day_ini, day_ref, itau_dyn, start_time
    2121  USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
     22#ifdef CPP_IOIPSL
     23  USE IOIPSL,   ONLY: getin
     24#else
     25  USE ioipsl_getincom, ONLY: getin
     26#endif
    2227
    2328  IMPLICIT NONE
     
    4752  REAL,             ALLOCATABLE :: ucov_glo(:,:),    q_glo(:,:), phis_glo(:)
    4853  REAL,             ALLOCATABLE :: teta_glo(:,:)
    49   LOGICAL :: lSkip, ll
    50   LOGICAL,PARAMETER :: tnat1=.TRUE.
     54  LOGICAL :: lSkip, ll, ltnat1
    5155!-------------------------------------------------------------------------------
    5256  modname="dynetat0_loc"
     
    158162  ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= NF90_NoErr                                 !--- DETECT OLD REPRO start.nc FILE
    159163#endif
     164  ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1)
    160165  DO iq=1,nqtot
    161166    var = tracers(iq)%name
     
    173178    !--------------------------------------------------------------------------------------------------------------------------
    174179    ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == NF90_NoErr) THEN                         !=== TRY WITH ALTERNATE NAME
    175       CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to <'//TRIM(oldVar)//'>', modname)
     180      CALL msg('Missing tracer <'//TRIM(var)//'> => initialized to <'//TRIM(oldVar)//'>', modname)
    176181      CALL get_var2(oldVar, q_glo); q(ijb_u:ije_u,:,iq)=q_glo(ijb_u:ije_u,:)
    177182    !--------------------------------------------------------------------------------------------------------------------------
     
    181186      iqParent = tracers(iq)%iqParent
    182187      IF(tracers(iq)%iso_iZone == 0) THEN
    183          if (tnat1) then
    184                  tnat=1.0
    185                  alpha_ideal=1.0
    186                  write(*,*) 'attention dans dynetat0: les alpha_ideal sont a 1'
    187          else
     188         IF(ltnat1) THEN
     189            tnat = 1.0
     190            alpha_ideal = 1.0
     191            CALL msg(' !!!  Beware: alpha_ideal put to 1  !!!', modname)
     192         ELSE
    188193          IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) &
    189194            CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1)
    190          endif
    191          CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized with a simplified Rayleigh distillation law.', modname)
     195         END IF
     196         CALL msg('Missing tracer <'//TRIM(var)//'> => initialized with a simplified Rayleigh distillation law.', modname)
    192197         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.)
    193198         ! Camille 9 mars 2023: point de vigilence: initialisation incohérente
    194199         ! avec celle de xt_ancien dans la physiq.
    195200      ELSE
    196          CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to its parent isotope concentration.', modname)
     201         CALL msg('Missing tracer <'//TRIM(var)//'> => initialized to its parent isotope concentration.', modname)
    197202         ! Camille 9 mars 2023: attention!! seuls les tags qui correspondent à
    198203         ! izone=izone_init (définie dans isotrac_mod) sont initialisés comme
     
    208213    !--------------------------------------------------------------------------------------------------------------------------
    209214    ELSE                                                                                 !=== MISSING: SET TO 0
    210       CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to zero', modname)
     215      CALL msg('missing tracer <'//TRIM(var)//'> => initialized to zero', modname)
    211216      q(ijb_u:ije_u,:,iq)=0.
    212217    !--------------------------------------------------------------------------------------------------------------------------
  • LMDZ6/branches/cirrus/libf/dyn3dmem/iniacademic_loc.F90

    r5202 r5203  
    55
    66  USE filtreg_mod, ONLY: inifilr
    7   USE infotrac,    ONLY: nqtot, niso, iqIsoPha, tracers, getKey, isoName
     7  USE infotrac,    ONLY: nqtot, niso, iqIsoPha, tracers, getKey, isoName, addPhase
    88  USE control_mod, ONLY: day_step,planet_type
    99  use exner_hyb_m, only: exner_hyb
     
    2222  USE temps_mod, ONLY: annee_ref, day_ini, day_ref
    2323  USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
    24   USE readTracFiles_mod, ONLY: addPhase
    2524  use netcdf, only : NF90_NOWRITE,NF90_OPEN,NF90_NOERR,NF90_INQ_VARID
    2625  use netcdf, only : NF90_CLOSE, NF90_GET_VAR
     
    8584
    8685  REAL zdtvr, tnat, alpha_ideal
    87   LOGICAL,PARAMETER :: tnat1=.true.
     86  LOGICAL :: ltnat1
    8887 
    8988  character(len=*),parameter :: modname="iniacademic"
     
    311310        ! bulk initialization of tracers
    312311        if (planet_type=="earth") then
     312           ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1)
    313313           ! Earth: first two tracers will be water
    314314           do iq=1,nqtot
     
    324324              iqParent = tracers(iq)%iqParent
    325325              IF(tracers(iq)%iso_iZone == 0) THEN
    326                  if (tnat1) then
    327                          tnat=1.0
    328                          alpha_ideal=1.0
    329                          write(*,*) 'Attention dans iniacademic: alpha_ideal=1'
    330                  else
     326                 IF(ltnat1) THEN
     327                    tnat = 1.0
     328                    alpha_ideal = 1.0
     329                    WRITE(lunout, *) 'In '//TRIM(modname)//': !!!  Beware: alpha_ideal put to 1  !!!'
     330                 ELSE
    331331                    IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) &
    332332                    CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1)
    333                  endif
     333                 END IF
    334334                 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.)
    335335              ELSE !IF(tracers(iq)%iso_iZone == 0) THEN
  • LMDZ6/branches/cirrus/libf/dyn3dmem/qminimum_loc.F

    r5202 r5203  
    44      SUBROUTINE qminimum_loc( q,nqtot,deltap )
    55      USE parallel_lmdz
    6       USE infotrac, ONLY: niso, ntiso, iqIsoPha, tracers,
     6      USE infotrac, ONLY: niso, ntiso, iqIsoPha, tracers, addPhase,
    77     &                    isoCheck, min_qParent
    88      USE strings_mod, ONLY: strIdx
    9       USE readTracFiles_mod, ONLY: addPhase
    109      IMPLICIT none
    1110c
Note: See TracChangeset for help on using the changeset viewer.