Changeset 5223 for LMDZ6/branches/Amaury_dev/libf/dyn3d
- Timestamp:
- Sep 23, 2024, 4:45:12 PM (4 months ago)
- Location:
- LMDZ6/branches/Amaury_dev
- Files:
-
- 4 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.)
Note: See TracChangeset
for help on using the changeset viewer.