Changeset 5223 for LMDZ6/branches/Amaury_dev
- Timestamp:
- Sep 23, 2024, 4:45:12 PM (2 months ago)
- Location:
- LMDZ6/branches/Amaury_dev
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev
- Property svn:mergeinfo changed
/LMDZ6/trunk merged: 5200
- Property svn:mergeinfo changed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d/iniacademic.F90
r5221 r5223 76 76 77 77 REAL zdtvr, tnat, alpha_ideal 78 LOGICAL , PARAMETER :: tnat1 = .TRUE.79 80 CHARACTER(LEN = *), parameter :: modname ="iniacademic"81 CHARACTER(LEN =80) :: abort_message78 LOGICAL :: ltnat1 79 80 character(len=*),parameter :: modname="iniacademic" 81 character(len=80) :: abort_message 82 82 83 83 ! Sanity check: verify that options selected by user are not incompatible … … 305 305 ! bulk initialization of tracers 306 306 IF (planet_type=="earth") THEN 307 ! Earth: first two tracers will be water307 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1)! Earth: first two tracers will be water 308 308 DO iq = 1, nqtot 309 309 q(:, :, iq) = 0. … … 311 311 IF(tracers(iq)%name == addPhase('H2O', 'l')) q(:, :, iq) = 1.e-15 312 312 313 ! CRisi: init des isotopes314 ! distill de Rayleigh très simplifiée315 iName= tracers(iq)%iso_iName316 IF(niso <= 0 .OR. iName <= 0) CYCLE317 iPhase= tracers(iq)%iso_iPhase318 iqParent = tracers(iq)%iqParent319 IF(tracers(iq)%iso_iZone == 0) THEN320 IF (tnat1) THEN321 tnat = 1.0322 alpha_ideal = 1.0323 WRITE(*, *) 'Attention dans iniacademic: alpha_ideal=1'324 else325 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) &326 327 endif328 q(:, :, iq) = q(:, :, iqParent) * tnat * (q(:, :, iqParent) / 30.e-3)**(alpha_ideal -1.)329 ELSE !IF(tracers(iq)%iso_iZone == 0) THEN330 IF(tracers(iq)%iso_iZone == 1) THEN331 ! correction le 14 mai 2024 pour que tous les traceurs soient de la couleur 1.332 ! Sinon, on va avoir des porblèmes de conservation de masse de traceurs.333 q(:, :, iq) = q(:, :, iqIsoPha(iName,iPhase))334 else !IF(tracers(iq)%iso_iZone == 1) THEN335 q(:, :,iq) = 0.336 endif !IF(tracers(iq)%iso_iZone == 1) THEN337 END IF !IF(tracers(iq)%iso_iZone == 0) THEN338 enddo339 else340 q(:, :, :) =0341 endif ! of if (planet_type=="earth")313 ! CRisi: init des isotopes 314 ! distill de Rayleigh très simplifiée 315 iName = tracers(iq)%iso_iName 316 if (niso <= 0 .OR. iName <= 0) CYCLE 317 iPhase = tracers(iq)%iso_iPhase 318 iqParent = tracers(iq)%iqParent 319 IF(tracers(iq)%iso_iZone == 0) THEN 320 IF(ltnat1) THEN 321 tnat = 1.0 322 alpha_ideal = 1.0 323 WRITE(lunout, *)'In '//TRIM(modname)//': !!! Beware: alpha_ideal put to 1 !!!' 324 ELSE 325 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 326 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 327 END IF 328 q(:,:,iq) = q(:,:,iqParent)*tnat*(q(:,:,iqParent)/30.e-3)**(alpha_ideal-1.) 329 ELSE !IF(tracers(iq)%iso_iZone == 0) THEN 330 IF(tracers(iq)%iso_iZone == 1) THEN 331 ! correction le 14 mai 2024 pour que tous les traceurs soient de la couleur 1. 332 ! Sinon, on va avoir des porblèmes de conservation de masse de traceurs. 333 q(:,:,iq) = q(:,:,iqIsoPha(iName,iPhase)) 334 else !IF(tracers(iq)%iso_iZone == 1) THEN 335 q(:,:,iq) = 0. 336 endif !IF(tracers(iq)%iso_iZone == 1) THEN 337 END IF !IF(tracers(iq)%iso_iZone == 0) THEN 338 enddo 339 else 340 q(:,:,:)=0 341 endif ! of if (planet_type=="earth") 342 342 343 343 CALL check_isotopes_seq(q, ip1jmp1, 'iniacademic_loc') -
LMDZ6/branches/Amaury_dev/libf/dyn3d/lmdz_check_isotopes.f90
r5186 r5223 29 29 deltaDmin = -999.0, & 30 30 ridicule = 1e-12 31 INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, & 32 iso_O17, iso_HTO 33 LOGICAL, SAVE :: first = .TRUE. 34 LOGICAL, PARAMETER :: tnat1 = .TRUE. 31 INTEGER, SAVE :: iso_eau, iso_O17, iso_O18, iso_HDO, iso_HTO 32 LOGICAL, SAVE :: ltnat1, first = .TRUE. 35 33 36 34 modname = 'check_isotopes' … … 39 37 IF(niso == 0) RETURN !--- No isotopes => finished 40 38 IF(first) THEN 39 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 40 ALLOCATE(tnat(niso)) 41 41 iso_eau = strIdx(isoName, 'H216O') 42 iso_O17 = strIdx(isoName, 'H217O') 43 iso_O18 = strIdx(isoName, 'H218O') 42 44 iso_HDO = strIdx(isoName, 'HDO') 43 iso_O18 = strIdx(isoName, 'H218O')44 iso_O17 = strIdx(isoName, 'H217O')45 45 iso_HTO = strIdx(isoName, 'HTO') 46 IF (tnat1) THEN46 IF(ltnat1) THEN 47 47 tnat(:) = 1.0 48 else48 ELSE 49 49 IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1) 50 endif50 END IF 51 51 first = .FALSE. 52 52 END IF … … 60 60 DO k = 1, llm 61 61 DO i = 1, ip1jmp1 62 IF(ABS(q(i, k, iq)) < borne) CYCLE62 IF(ABS(q(i, k, iq)) <= borne) CYCLE 63 63 WRITE(msg1, '(s,"(",i0,",",i0,",",i0,") = ",ES12.4)')TRIM(isoName(ixt)), i, k, iq, q(i, k, iq) 64 64 CALL msg(msg1, modname) -
LMDZ6/branches/Amaury_dev/libf/dyn3d/lmdz_dynetat0.f90
r5222 r5223 12 12 !------------------------------------------------------------------------------- 13 13 USE lmdz_infotrac, ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName, & 14 14 new2oldH2O, newHNO3, oldHNO3, getKey 15 15 USE lmdz_strings, ONLY: maxlen, msg, strStack, real2str, int2str 16 16 USE netcdf, ONLY: nf90_open, nf90_nowrite, nf90_inq_varid, nf90_close, nf90_get_var, nf90_noerr … … 49 49 INTEGER :: iq, fID, vID, idecal, iqParent, iName, iZone, iPhase, ix 50 50 REAL :: time, tnat, alpha_ideal, tab_cntrl(length) !--- RUN PARAMS TABLE 51 LOGICAL :: lSkip, ll 52 LOGICAL, PARAMETER :: tnat1 = .TRUE. 51 LOGICAL :: lSkip, ll, ltnat1 53 52 !------------------------------------------------------------------------------- 54 53 modname = "dynetat0" … … 140 139 ll = nf90_inq_varid(fID, 'HNO3tot', vID) /= nf90_noerr !--- DETECT OLD REPRO start.nc FILE 141 140 END IF 141 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 142 142 DO iq = 1, nqtot 143 143 var = tracers(iq)%name … … 163 163 iqParent = tracers(iq)%iqParent 164 164 IF(tracers(iq)%iso_iZone == 0) THEN 165 IF (tnat1) THEN165 IF(ltnat1) THEN 166 166 tnat = 1.0 167 167 alpha_ideal = 1.0 168 WRITE(*, *) 'attention dans dynetat0: les alpha_ideal sont a 1'169 else168 CALL msg(' !!! Beware: alpha_ideal put to 1 !!!', modname) 169 ELSE 170 170 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 171 171 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 172 endif172 END IF 173 173 CALL msg('Missing tracer <' // TRIM(var) // '> => initialized with a simplified Rayleigh distillation law.', modname) 174 174 q(:, :, :, iq) = q(:, :, :, iqParent) * tnat * (q(:, :, :, iqParent) / 30.e-3)**(alpha_ideal - 1.) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/iso_verif_dyn.f90
r5182 r5223 1 function iso_verif_noNaN_nostop(x,err_msg)2 3 4 1 function iso_verif_noNaN_nostop(x, err_msg) 2 IMPLICIT NONE 3 ! si x est NaN, on affiche message 4 ! d'erreur et return 1 si erreur 5 5 6 7 8 CHARACTER(LEN=*) :: err_msg ! message d''erreur à afficher6 ! input: 7 REAL :: x 8 CHARACTER(LEN = *) :: err_msg ! message d''erreur à afficher 9 9 10 11 12 parameter (borne=1e19)13 10 ! output 11 REAL :: borne 12 parameter (borne = 1e19) 13 INTEGER :: iso_verif_noNaN_nostop 14 14 15 16 iso_verif_noNAN_nostop=017 18 WRITE(*,*) 'erreur detectee par iso_verif_nonNaN:'19 WRITE(*,*) err_msg20 WRITE(*,*) 'x=',x21 iso_verif_noNaN_nostop=122 15 IF ((x>-borne).AND.(x<borne)) THEN 16 iso_verif_noNAN_nostop = 0 17 else 18 WRITE(*, *) 'erreur detectee par iso_verif_nonNaN:' 19 WRITE(*, *) err_msg 20 WRITE(*, *) 'x=', x 21 iso_verif_noNaN_nostop = 1 22 endif 23 23 24 24 RETURN 25 25 END FUNCTION iso_verif_nonan_nostop 26 26 27 28 (a,b,err_msg)29 30 31 32 27 function iso_verif_egalite_nostop & 28 (a, b, err_msg) 29 IMPLICIT NONE 30 ! compare a et b. Si pas egal, on affiche message 31 ! d'erreur et stoppe 32 ! pour egalite, on verifie erreur absolue et arreur relative 33 33 34 35 36 CHARACTER(LEN=*) :: err_msg ! message d''erreur à afficher34 ! input: 35 REAL :: a, b 36 CHARACTER(LEN = *) :: err_msg ! message d''erreur à afficher 37 37 38 39 40 41 parameter (errmax=1e-8)42 parameter (errmaxrel=1e-3)38 ! locals 39 REAL :: errmax ! erreur maximale en absolu. 40 REAL :: errmaxrel ! erreur maximale en relatif autorisée 41 parameter (errmax = 1e-8) 42 parameter (errmaxrel = 1e-3) 43 43 44 45 44 ! output 45 INTEGER :: iso_verif_egalite_nostop 46 46 47 iso_verif_egalite_nostop=047 iso_verif_egalite_nostop = 0 48 48 49 IF (abs(a-b)>errmax) THEN50 IF (abs((a-b)/max(max(abs(b),abs(a)),1e-18)) &49 IF (abs(a - b)>errmax) THEN 50 IF (abs((a - b) / max(max(abs(b), abs(a)), 1e-18)) & 51 51 >errmaxrel) THEN 52 WRITE(*,*) 'erreur detectee par iso_verif_egalite:' 53 WRITE(*,*) err_msg 54 WRITE(*,*) 'a=',a 55 WRITE(*,*) 'b=',b 56 iso_verif_egalite_nostop=1 57 endif 52 WRITE(*, *) 'erreur detectee par iso_verif_egalite:' 53 WRITE(*, *) err_msg 54 WRITE(*, *) 'a=', a 55 WRITE(*, *) 'b=', b 56 iso_verif_egalite_nostop = 1 58 57 endif 58 endif 59 59 60 60 RETURN 61 61 END FUNCTION iso_verif_egalite_nostop 62 62 63 63 64 65 (x,iso,q,err_msg)66 67 64 function iso_verif_aberrant_nostop & 65 (x, iso, q, err_msg) 66 USE lmdz_infotrac, ONLY: isoName, getKey 67 IMPLICIT NONE 68 68 69 70 REAL :: x,q71 72 CHARACTER(LEN=*) :: err_msg ! message d''erreur à afficher69 ! input: 70 REAL :: x, q 71 INTEGER :: iso ! 2=HDO, 1=O18 72 CHARACTER(LEN = *) :: err_msg ! message d''erreur à afficher 73 73 74 ! locals 75 REAL :: qmin,deltaD 76 REAL :: deltaDmax,deltaDmin,tnat 77 parameter (qmin=1e-11) 78 parameter (deltaDmax=200.0,deltaDmin=-999.9) 74 ! locals 75 REAL :: qmin, deltaD 76 REAL :: deltaDmax, deltaDmin, tnat 77 parameter (qmin = 1e-11) 78 parameter (deltaDmax = 200.0, deltaDmin = -999.9) 79 LOGICAL, SAVE :: ltnat1 80 LOGICAL, SAVE :: lFirst = .TRUE. 79 81 80 81 82 ! output 83 INTEGER :: iso_verif_aberrant_nostop 82 84 83 iso_verif_aberrant_nostop=0 85 IF(lFirst) THEN 86 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 87 lFirst = .FALSE. 88 END IF 89 iso_verif_aberrant_nostop = 0 84 90 85 ! verifier que HDO est raisonable 86 IF (q>qmin) THEN 87 IF(getKey('tnat', tnat, isoName(iso))) THEN 88 err_msg = 'Missing isotopic parameter "tnat"' 89 iso_verif_aberrant_nostop=1 90 RETURN 91 END IF 92 deltaD=(x/q/tnat-1)*1000 93 IF ((deltaD>deltaDmax).OR.(deltaD<deltaDmin)) THEN 94 WRITE(*,*) 'erreur detectee par iso_verif_aberrant:' 95 WRITE(*,*) err_msg 96 WRITE(*,*) 'q=',q 97 WRITE(*,*) 'deltaD=',deltaD 98 WRITE(*,*) 'iso=',iso 99 iso_verif_aberrant_nostop=1 100 endif !if ((deltaD.gt.deltaDmax).OR.(deltaD.lt.deltaDmin)) THEN 101 endif !if (q(i,k,iq).gt.qmin) THEN 102 RETURN 91 ! verifier que HDO est raisonable 92 IF (q>qmin) THEN 93 IF(ltnat1) THEN 94 tnat = 1.0 95 ELSE IF(getKey('tnat', tnat, isoName(iso))) THEN 96 err_msg = 'Missing isotopic parameter "tnat"' 97 iso_verif_aberrant_nostop = 1 98 RETURN 99 END IF 100 deltaD = (x / q / tnat - 1) * 1000 101 IF ((deltaD>deltaDmax).OR.(deltaD<deltaDmin)) THEN 102 WRITE(*, *) 'erreur detectee par iso_verif_aberrant:' 103 WRITE(*, *) err_msg 104 WRITE(*, *) 'q=', q 105 WRITE(*, *) 'deltaD=', deltaD 106 WRITE(*, *) 'iso=', iso 107 iso_verif_aberrant_nostop = 1 108 endif !if ((deltaD.gt.deltaDmax).OR.(deltaD.lt.deltaDmin)) THEN 109 endif !if (q(i,k,iq).gt.qmin) THEN 110 RETURN 103 111 END FUNCTION iso_verif_aberrant_nostop 104 112 -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/check_isotopes_loc.F90
r5182 r5223 24 24 deltaDmin =-999.0, & 25 25 ridicule = 1e-12 26 INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, & !--- OpenMP shared variables 27 iso_O17, iso_HTO 26 INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, iso_O17, iso_HTO 27 !$OMP THREADPRIVATE(iso_eau, iso_HDO, iso_O18, iso_O17, iso_HTO) 28 LOGICAL :: ltnat1 28 29 LOGICAL, SAVE :: first=.TRUE. 29 LOGICAL, PARAMETER :: tnat1=.TRUE.30 30 !$OMP THREADPRIVATE(first) 31 31 … … 36 36 IF(first) THEN 37 37 !$OMP MASTER 38 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 39 ALLOCATE(tnat(niso)) 38 40 iso_eau = strIdx(isoName,'H216O') 41 iso_O17 = strIdx(isoName,'H217O') 42 iso_O18 = strIdx(isoName,'H218O') 39 43 iso_HDO = strIdx(isoName,'HDO') 40 iso_O18 = strIdx(isoName,'H218O')41 iso_O17 = strIdx(isoName,'H217O')42 44 iso_HTO = strIdx(isoName,'HTO') 43 IF (tnat1) THEN44 45 else45 IF(ltnat1) THEN 46 tnat(:)=1.0 47 ELSE 46 48 IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1) 47 endif49 END IF 48 50 !$OMP END MASTER 49 51 !$OMP BARRIER … … 60 62 DO k = 1, llm 61 63 DO i = ijb, ije 62 IF(ABS(q(i,k,iq)) <=borne) CYCLE64 IF(ABS(q(i,k,iq)) <= borne) CYCLE 63 65 WRITE(msg1,'(s,"(",i0,",",i0,",",i0,") = ",ES12.4)')TRIM(isoName(ixt)),i,k,iq,q(i,k,iq) 64 66 CALL msg(msg1, modname) -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynetat0_loc.f90
r5222 r5223 8 8 USE parallel_lmdz 9 9 USE lmdz_infotrac, ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName, & 10 10 new2oldH2O, newHNO3, oldHNO3, getKey 11 11 USE lmdz_strings, ONLY: maxlen, msg, strStack, real2str, int2str, strIdx 12 12 USE netcdf, ONLY: nf90_open, nf90_nowrite, nf90_inquire_dimension, nf90_inq_varid, & … … 49 49 REAL, ALLOCATABLE :: ucov_glo(:, :), q_glo(:, :), phis_glo(:) 50 50 REAL, ALLOCATABLE :: teta_glo(:, :) 51 LOGICAL :: lSkip, ll 52 LOGICAL, PARAMETER :: tnat1 = .TRUE. 51 LOGICAL :: lSkip, ll, ltnat1 53 52 !------------------------------------------------------------------------------- 54 53 modname = "dynetat0_loc" … … 160 159 ll = nf90_inq_varid(fID, 'HNO3tot', vID) /= nf90_noerr !--- DETECT OLD REPRO start.nc FILE 161 160 END IF 161 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 162 162 DO iq = 1, nqtot 163 163 var = tracers(iq)%name … … 175 175 !-------------------------------------------------------------------------------------------------------------------------- 176 176 ELSE IF(nf90_inq_varid(fID, oldVar, vID) == nf90_noerr) THEN !=== TRY WITH ALTERNATE NAME 177 CALL msg('Missing tracer <' //TRIM(var)//'> => initialized to <' // TRIM(oldVar) // '>', modname)177 CALL msg('Missing tracer <' // TRIM(var) // '> => initialized to <' // TRIM(oldVar) // '>', modname) 178 178 CALL get_var2(oldVar, q_glo); q(ijb_u:ije_u, :, iq) = q_glo(ijb_u:ije_u, :) 179 179 !-------------------------------------------------------------------------------------------------------------------------- … … 183 183 iqParent = tracers(iq)%iqParent 184 184 IF(tracers(iq)%iso_iZone == 0) THEN 185 IF (tnat1) THEN185 IF(ltnat1) THEN 186 186 tnat = 1.0 187 187 alpha_ideal = 1.0 188 WRITE(*, *) 'attention dans dynetat0: les alpha_ideal sont a 1'189 else188 CALL msg(' !!! Beware: alpha_ideal put to 1 !!!', modname) 189 ELSE 190 190 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 191 191 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 192 endif193 CALL msg('Missing tracer <' //TRIM(var)//'> => initialized with a simplified Rayleigh distillation law.', modname)192 END IF 193 CALL msg('Missing tracer <' // TRIM(var) // '> => initialized with a simplified Rayleigh distillation law.', modname) 194 194 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.) 195 195 ! Camille 9 mars 2023: point de vigilence: initialisation incohérente 196 196 ! avec celle de xt_ancien dans la physiq. 197 197 ELSE 198 CALL msg('Missing tracer <' //TRIM(var)//'> => initialized to its parent isotope concentration.', modname)198 CALL msg('Missing tracer <' // TRIM(var) // '> => initialized to its parent isotope concentration.', modname) 199 199 ! Camille 9 mars 2023: attention!! seuls les tags qui correspondent à 200 200 ! izone=izone_init (définie dans isotrac_mod) sont initialisés comme … … 210 210 !-------------------------------------------------------------------------------------------------------------------------- 211 211 ELSE !=== MISSING: SET TO 0 212 CALL msg('Missing tracer <' //TRIM(var)//'> => initialized to zero', modname)212 CALL msg('Missing tracer <' // TRIM(var) // '> => initialized to zero', modname) 213 213 q(ijb_u:ije_u, :, iq) = 0. 214 214 !-------------------------------------------------------------------------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/iniacademic_loc.F90
r5221 r5223 78 78 79 79 REAL zdtvr, tnat, alpha_ideal 80 LOGICAL , PARAMETER :: tnat1 = .TRUE.81 82 CHARACTER(LEN = *), parameter :: modname ="iniacademic"83 CHARACTER(LEN =80) :: abort_message80 LOGICAL :: ltnat1 81 82 CHARACTER(LEN=*),parameter :: modname="iniacademic" 83 CHARACTER(LEN=80) :: abort_message 84 84 85 85 ! Sanity check: verify that options selected by user are not incompatible … … 304 304 ! bulk initialization of tracers 305 305 IF (planet_type=="earth") THEN 306 ! Earth: first two tracers will be water306 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1)! Earth: first two tracers will be water 307 307 DO iq = 1, nqtot 308 308 q(ijb_u:ije_u, :, iq) = 0. … … 310 310 IF(tracers(iq)%name == addPhase('H2O', 'l')) q(ijb_u:ije_u, :, iq) = 1.e-15 311 311 312 ! CRisi: init des isotopes313 ! distill de Rayleigh très simplifiée314 iName= tracers(iq)%iso_iName315 IF(niso <= 0 .OR. iName <= 0) CYCLE316 iPhase= tracers(iq)%iso_iPhase317 iqParent = tracers(iq)%iqParent318 IF(tracers(iq)%iso_iZone == 0) THEN319 IF (tnat1) THEN320 tnat = 1.0321 alpha_ideal = 1.0322 WRITE(*, *) 'Attention dans iniacademic: alpha_ideal=1'323 else324 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) &325 326 endif327 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.)328 ELSE !IF(tracers(iq)%iso_iZone == 0) THEN329 IF(tracers(iq)%iso_iZone == 1) THEN ! a verifier.330 ! correction le 14 mai 2024 pour que tous les traceurs soient de la couleur 1.331 ! Sinon, on va avoir des porblèmes de conservation de masse de traceurs.332 q(ijb_u:ije_u, :, iq) = q(ijb_u:ije_u, :, iqIsoPha(iName,iPhase))333 else !IF(tracers(iq)%iso_iZone == 1) THEN334 q(ijb_u:ije_u, :,iq) = 0.0335 endif !IF(tracers(iq)%iso_iZone == 1) THEN336 END IF !IF(tracers(iq)%iso_iZone == 0) THEN337 enddo338 else339 q(ijb_u:ije_u, :, :) =0340 endif ! of if (planet_type=="earth")312 ! CRisi: init des isotopes 313 ! distill de Rayleigh très simplifiée 314 iName = tracers(iq)%iso_iName 315 if (niso <= 0 .OR. iName <= 0) CYCLE 316 iPhase = tracers(iq)%iso_iPhase 317 iqParent = tracers(iq)%iqParent 318 IF(tracers(iq)%iso_iZone == 0) THEN 319 IF(ltnat1) THEN 320 tnat = 1.0 321 alpha_ideal = 1.0 322 WRITE(lunout, *) 'In '//TRIM(modname)//': !!! Beware: alpha_ideal put to 1 !!!' 323 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) 326 END IF 327 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.) 328 ELSE !IF(tracers(iq)%iso_iZone == 0) THEN 329 IF(tracers(iq)%iso_iZone == 1) THEN ! a verifier. 330 ! correction le 14 mai 2024 pour que tous les traceurs soient de la couleur 1. 331 ! Sinon, on va avoir des porblèmes de conservation de masse de traceurs. 332 q(ijb_u:ije_u,:,iq) = q(ijb_u:ije_u,:,iqIsoPha(iName,iPhase)) 333 else !IF(tracers(iq)%iso_iZone == 1) THEN 334 q(ijb_u:ije_u,:,iq) = 0.0 335 endif !IF(tracers(iq)%iso_iZone == 1) THEN 336 END IF !IF(tracers(iq)%iso_iZone == 0) THEN 337 enddo 338 else 339 q(ijb_u:ije_u,:,:)=0 340 endif ! of if (planet_type=="earth") 341 341 342 342 CALL check_isotopes(q, ijb_u, ije_u, 'iniacademic_loc') -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/qminimum_loc.f90
r5222 r5223 7 7 USE lmdz_strings, ONLY: strIdx 8 8 USE lmdz_iniprint, ONLY: lunout, prt_level 9 10 9 11 10 USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm -
LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90
r5221 r5223 316 316 !--- Transfert the number of tracers to Reprobus 317 317 IF (CPPKEY_REPROBUS) THEN 318 CALL Init_chem_rep_trac(nbtr, nqo, tracers(:)%name) 318 CALL Init_chem_rep_trac(nbtr, nqo, tracers(:)%name) !--- Transfert the number of tracers to Reprobus 319 319 END IF 320 320 -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_mod.F90
r5158 r5223 160 160 !=== Local variables: 161 161 INTEGER :: ixt 162 162 LOGICAL :: ltnat1 163 CHARACTER(LEN=maxlen) :: modname, sxt 163 164 164 165 !--- For H2[17]O … … 169 170 LOGICAL, PARAMETER :: ok_nocinsat = .FALSE. ! if T: no sursaturation effect for ice 170 171 LOGICAL, PARAMETER :: Rdefault_smow = .FALSE. ! if T: Rdefault=smow; if F: nul 171 LOGICAL, PARAMETER :: tnat1 = .TRUE. ! If T: all tnats are 1.172 172 173 173 !--- For [3]H 174 174 INTEGER :: iessai 175 176 CHARACTER(LEN=maxlen) :: modname, sxt177 175 178 176 modname = 'iso_init' … … 264 262 IF(ANY(isoName == 'HTO')) & 265 263 CALL get_in('ok_prod_nucl_tritium', ok_prod_nucl_tritium, .FALSE., .FALSE.) 264 CALL get_in('tnateq1', ltnat1, .TRUE.) 266 265 267 266 ! Ocean composition … … 294 293 tkcin1(ixt) = 0.0005016 295 294 tkcin2(ixt) = 0.0014432 296 IF (tnat1) THEN 297 tnat(ixt)=1 298 else 299 tnat(ixt)=0. 300 endif 295 tnat(ixt) = 0.0; IF(ltnat1) tnat(ixt)=1 301 296 toce(ixt)=4.0E-19 ! rapport T/H = 0.2 TU Dreisigacker and Roether 1978 302 297 tcorr(ixt)=1. … … 317 312 tkcin1(ixt) = tkcin1_O18*fac_kcin 318 313 tkcin2(ixt) = tkcin2_O18*fac_kcin 319 IF (tnat1) THEN 320 tnat(ixt)=1 321 else 322 tnat(ixt)=0.004/100. ! O17 représente 0.004% de l'oxygène 323 endif 314 tnat(ixt)=0.004/100. ! O17 représente 0.004% de l'oxygène 315 IF(ltnat1) tnat(ixt)=1 324 316 toce(ixt)=tnat(ixt)*(1.0+deltaO18_oce/1000.0)**pente_MWL 325 317 tcorr(ixt)=1.0+fac_enrichoce18*pente_MWL ! donné par Amaelle … … 337 329 tkcin1(ixt) = tkcin1_O18 338 330 tkcin2(ixt) = tkcin2_O18 339 IF (tnat1) THEN 340 tnat(ixt)=1 341 else 342 tnat(ixt)=2005.2E-6 343 endif 331 tnat(ixt)=2005.2E-6; IF(ltnat1) tnat(ixt)=1 344 332 toce(ixt)=tnat(ixt)*(1.0+deltaO18_oce/1000.0) 345 333 tcorr(ixt)=1.0+fac_enrichoce18 … … 361 349 tkcin1(ixt) = tkcin1_O18*fac_kcin 362 350 tkcin2(ixt) = tkcin2_O18*fac_kcin 363 IF (tnat1) THEN 364 tnat(ixt)=1 365 else 366 tnat(ixt)=155.76E-6 367 endif 351 tnat(ixt)=155.76E-6; IF(ltnat1) tnat(ixt)=1 368 352 toce(ixt)=tnat(ixt)*(1.0+pente_MWL*deltaO18_oce/1000.0) 369 353 tcorr(ixt)=1.0+fac_enrichoce18*pente_MWL
Note: See TracChangeset
for help on using the changeset viewer.