Changeset 5223 for LMDZ6/branches/Amaury_dev/libf/dyn3dmem
- Timestamp:
- Sep 23, 2024, 4:45:12 PM (14 months ago)
- Location:
- LMDZ6/branches/Amaury_dev
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
libf/dyn3dmem/check_isotopes_loc.F90 (modified) (3 diffs)
-
libf/dyn3dmem/dynetat0_loc.f90 (modified) (6 diffs)
-
libf/dyn3dmem/iniacademic_loc.F90 (modified) (3 diffs)
-
libf/dyn3dmem/qminimum_loc.f90 (modified) (1 diff)
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/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 tnat(:)=1.045 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 new2oldH2O, newHNO3, oldHNO3, getKey10 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 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1)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
Note: See TracChangeset
for help on using the changeset viewer.
