Ignore:
Timestamp:
Jul 2, 2025, 12:00:08 PM (2 days ago)
Author:
dcugnet
Message:
  • Use REAL(KIND=REAL32) and REAL(KIND=REAL64) Iinstead of REAL and DOUBLE PRECISION

to avoid ambiguity problems in generic procedure when reals are promoted to doubles.

  • generic "num2str" replaces "str2int", "str2real", "str2dble" and "str2bool" functions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmdiso/isotopes_mod.F90

    r5267 r5748  
    33
    44MODULE isotopes_mod
    5    USE strings_mod,  ONLY: msg, real2str, int2str, bool2str, maxlen, strIdx, strStack
     5   USE strings_mod,  ONLY: msg, num2str, maxlen, strIdx, strStack
    66   USE infotrac_phy, ONLY: isoName, niso, ntiso
    77   USE iso_params_mod
     
    173173
    174174   !--- Check number of isotopes
    175    CALL msg('64: niso = '//TRIM(int2str(niso)), modname)
     175   CALL msg('64: niso = '//TRIM(num2str(niso)), modname)
    176176
    177177         !--- Init de ntracisoOR: on ecrasera en cas de traceurs de tagging isotopiques
     
    180180
    181181         !--- Type of water isotopes:
    182          iso_eau = strIdx(isoName, 'H216O'); CALL msg('iso_eau='//int2str(iso_eau), modname)
    183          iso_HDO = strIdx(isoName, 'HDO');   CALL msg('iso_HDO='//int2str(iso_HDO), modname)
    184          iso_O18 = strIdx(isoName, 'H218O'); CALL msg('iso_O18='//int2str(iso_O18), modname)
    185          iso_O17 = strIdx(isoName, 'H217O'); CALL msg('iso_O17='//int2str(iso_O17), modname)
    186          iso_HTO = strIdx(isoName, 'HTO');   CALL msg('iso_HTO='//int2str(iso_HTO), modname)
     182         iso_eau = strIdx(isoName, 'H216O'); CALL msg('iso_eau='//num2str(iso_eau), modname)
     183         iso_HDO = strIdx(isoName, 'HDO');   CALL msg('iso_HDO='//num2str(iso_HDO), modname)
     184         iso_O18 = strIdx(isoName, 'H218O'); CALL msg('iso_O18='//num2str(iso_O18), modname)
     185         iso_O17 = strIdx(isoName, 'H217O'); CALL msg('iso_O17='//num2str(iso_O17), modname)
     186         iso_HTO = strIdx(isoName, 'HTO');   CALL msg('iso_HTO='//num2str(iso_HTO), modname)
    187187
    188188         !--- Initialisation: reading the isotopic parameters.
     
    204204         CALL get_in('dsstlatcrit',   dsstlatcrit,      0.0)     !--- For modif_sst>=3
    205205#ifdef ISOVERIF
    206          CALL msg('iso_init 270:  sstlatcrit='//real2str( sstlatcrit), modname, sstlatcrit < 0.0) !--- For modif_sst>=2
    207          CALL msg('iso_init 279: dsstlatcrit='//real2str(dsstlatcrit), modname, sstlatcrit < 0.0) !--- For modif_sst>=3
     206         CALL msg('iso_init 270:  sstlatcrit='//num2str( sstlatcrit), modname, sstlatcrit < 0.0) !--- For modif_sst>=2
     207         CALL msg('iso_init 279: dsstlatcrit='//num2str(dsstlatcrit), modname, sstlatcrit < 0.0) !--- For modif_sst>=3
    208208         IF(modif_sst >= 2 .AND. sstlatcrit < 0.0) STOP
    209209#endif             
     
    234234         CALL get_in('region_nudge_qsol',   region_nudge_qsol,   1)
    235235         nlevmaxO17 = 50
    236          CALL msg('nlevmaxO17='//TRIM(int2str(nlevmaxO17)))
     236         CALL msg('nlevmaxO17='//TRIM(num2str(nlevmaxO17)))
    237237         CALL get_in('no_pce',   no_pce,     0)
    238238         CALL get_in('A_satlim', A_satlim, 1.0)
    239239         CALL get_in('ok_restrict_A_satlim', ok_restrict_A_satlim, 0)
    240240#ifdef ISOVERIF
    241          CALL msg(' 315: A_satlim='//real2str(A_satlim), modname, A_satlim > 1.0)
     241         CALL msg(' 315: A_satlim='//num2str(A_satlim), modname, A_satlim > 1.0)
    242242         IF(A_satlim > 1.0) STOP
    243243#endif
     
    256256         CALL get_in('tnateq1', ltnat1, .TRUE.)
    257257
    258          CALL msg('iso_O18, iso_HDO, iso_eau = '//TRIM(strStack(int2str([iso_O18, iso_HDO, iso_eau]))), modname)
     258         CALL msg('iso_O18, iso_HDO, iso_eau = '//TRIM(strStack(num2str([iso_O18, iso_HDO, iso_eau]))), modname)
    259259
    260260         !--------------------------------------------------------------
     
    363363         CALL msg('285: verif initialisation:', modname)
    364364         DO ixt=1,niso
    365             sxt=int2str(ixt)
     365            sxt=num2str(ixt)
    366366            CALL msg(' * isoName('//TRIM(sxt)//') = <'//TRIM(isoName(ixt))//'>',  modname)
    367             CALL msg(  '    tnat('//TRIM(sxt)//') = '//TRIM(real2str(tnat(ixt))), modname)
    368 !           CALL msg('    alpha_liq_sol('//TRIM(sxt)//') = '//TRIM(real2str(alpha_liq_sol(ixt))), modname)
    369 !           CALL msg(        '   tkcin0('//TRIM(sxt)//') = '//TRIM(real2str(tkcin0(ixt))),        modname)
    370 !           CALL msg(       '   tdifrel('//TRIM(sxt)//') = '//TRIM(real2str(tdifrel(ixt))),       modname)
     367            CALL msg(  '    tnat('//TRIM(sxt)//') = '//TRIM(num2str(tnat(ixt))), modname)
     368!           CALL msg('    alpha_liq_sol('//TRIM(sxt)//') = '//TRIM(num2str(alpha_liq_sol(ixt))), modname)
     369!           CALL msg(        '   tkcin0('//TRIM(sxt)//') = '//TRIM(num2str(tkcin0(ixt))),        modname)
     370!           CALL msg(       '   tdifrel('//TRIM(sxt)//') = '//TRIM(num2str(tdifrel(ixt))),       modname)
    371371         END DO
    372          CALL msg('69:     lambda = '//TRIM(real2str(lambda_sursat)), modname)
    373          CALL msg('69:    thumxt1 = '//TRIM(real2str(thumxt1)),       modname)
    374          CALL msg('69: h_land_ice = '//TRIM(real2str(h_land_ice)),    modname)
    375          CALL msg('69:      P_veg = '//TRIM(real2str(P_veg)),         modname)
     372         CALL msg('69:     lambda = '//TRIM(num2str(lambda_sursat)), modname)
     373         CALL msg('69:    thumxt1 = '//TRIM(num2str(thumxt1)),       modname)
     374         CALL msg('69: h_land_ice = '//TRIM(num2str(h_land_ice)),    modname)
     375         CALL msg('69:      P_veg = '//TRIM(num2str(P_veg)),         modname)
    376376
    377377END SUBROUTINE iso_init
     
    411411      IF(PRESENT(def)) val=def; CALL getin(nam,val)
    412412      lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp
    413       IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(int2str(val)))
     413      IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(num2str(val)))
    414414  END IF
    415415  CALL bcast(val)
     
    430430      IF(PRESENT(def)) val=def; CALL getin(nam,val)
    431431      lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp
    432       IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(real2str(val)))
     432      IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(num2str(val)))
    433433  END IF
    434434  CALL bcast(val)
     
    449449      IF(PRESENT(def)) val=def; CALL getin(nam,val)
    450450      lD=.TRUE.; IF(PRESENT(lDisp)) lD=lDisp
    451       IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(bool2str(val)))
     451      IF(lD) CALL msg(TRIM(nam)//' = '//TRIM(num2str(val)))
    452452  END IF
    453453  CALL bcast(val)
Note: See TracChangeset for help on using the changeset viewer.