Changeset 5203 for LMDZ6/branches/cirrus/libf/dyn3dmem
- Timestamp:
- Sep 20, 2024, 1:10:18 PM (3 months ago)
- Location:
- LMDZ6/branches/cirrus
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/cirrus
- Property svn:mergeinfo changed
/LMDZ6/trunk merged: 5181,5183-5184,5188-5191,5196-5201
- Property svn:mergeinfo changed
-
LMDZ6/branches/cirrus/libf/dyn3dmem/check_isotopes_loc.F90
r5202 r5203 4 4 USE infotrac, ONLY: nqtot, niso, nphas, isotope, isoCheck, iqIsoPha, isoSelect, & 5 5 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 6 11 IMPLICIT NONE 7 12 include "dimensions.h" … … 21 26 deltaDmin =-999.0, & 22 27 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 25 31 LOGICAL, SAVE :: first=.TRUE. 26 LOGICAL, PARAMETER :: tnat1=.TRUE.27 32 !$OMP THREADPRIVATE(first) 28 33 … … 33 38 IF(first) THEN 34 39 !$OMP MASTER 40 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 41 ALLOCATE(tnat(niso)) 35 42 iso_eau = strIdx(isoName,'H216O') 43 iso_O17 = strIdx(isoName,'H217O') 44 iso_O18 = strIdx(isoName,'H218O') 36 45 iso_HDO = strIdx(isoName,'HDO') 37 iso_O18 = strIdx(isoName,'H218O')38 iso_O17 = strIdx(isoName,'H217O')39 46 iso_HTO = strIdx(isoName,'HTO') 40 if (tnat1) then41 42 else47 IF(ltnat1) THEN 48 tnat(:)=1.0 49 ELSE 43 50 IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1) 44 endif51 END IF 45 52 !$OMP END MASTER 46 53 !$OMP BARRIER … … 57 64 DO k = 1, llm 58 65 DO i = ijb, ije 59 IF(ABS(q(i,k,iq)) <=borne) CYCLE66 IF(ABS(q(i,k,iq)) <= borne) CYCLE 60 67 WRITE(msg1,'(s,"(",i0,",",i0,",",i0,") = ",ES12.4)')TRIM(isoName(ixt)),i,k,iq,q(i,k,iq) 61 68 CALL msg(msg1, modname) -
LMDZ6/branches/cirrus/libf/dyn3dmem/dynetat0_loc.F90
r5202 r5203 7 7 !------------------------------------------------------------------------------- 8 8 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 10 11 USE strings_mod, ONLY: maxlen, msg, strStack, real2str, int2str, strIdx 11 12 USE netcdf, ONLY: NF90_OPEN, NF90_NOWRITE, NF90_INQUIRE_DIMENSION, NF90_INQ_VARID, & 12 13 NF90_CLOSE, NF90_GET_VAR, NF90_INQUIRE_VARIABLE, NF90_NoErr 13 USE readTracFiles_mod, ONLY: new2oldH2O, newHNO3, oldHNO3, getKey14 14 USE control_mod, ONLY: planet_type 15 15 USE assert_eq_m, ONLY: assert_eq … … 20 20 USE temps_mod, ONLY: annee_ref, day_ini, day_ref, itau_dyn, start_time 21 21 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 22 27 23 28 IMPLICIT NONE … … 47 52 REAL, ALLOCATABLE :: ucov_glo(:,:), q_glo(:,:), phis_glo(:) 48 53 REAL, ALLOCATABLE :: teta_glo(:,:) 49 LOGICAL :: lSkip, ll 50 LOGICAL,PARAMETER :: tnat1=.TRUE. 54 LOGICAL :: lSkip, ll, ltnat1 51 55 !------------------------------------------------------------------------------- 52 56 modname="dynetat0_loc" … … 158 162 ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= NF90_NoErr !--- DETECT OLD REPRO start.nc FILE 159 163 #endif 164 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 160 165 DO iq=1,nqtot 161 166 var = tracers(iq)%name … … 173 178 !-------------------------------------------------------------------------------------------------------------------------- 174 179 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) 176 181 CALL get_var2(oldVar, q_glo); q(ijb_u:ije_u,:,iq)=q_glo(ijb_u:ije_u,:) 177 182 !-------------------------------------------------------------------------------------------------------------------------- … … 181 186 iqParent = tracers(iq)%iqParent 182 187 IF(tracers(iq)%iso_iZone == 0) THEN 183 if (tnat1) then184 tnat=1.0185 alpha_ideal=1.0186 write(*,*) 'attention dans dynetat0: les alpha_ideal sont a 1'187 else188 IF(ltnat1) THEN 189 tnat = 1.0 190 alpha_ideal = 1.0 191 CALL msg(' !!! Beware: alpha_ideal put to 1 !!!', modname) 192 ELSE 188 193 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 189 194 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 190 endif191 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) 192 197 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.) 193 198 ! Camille 9 mars 2023: point de vigilence: initialisation incohérente 194 199 ! avec celle de xt_ancien dans la physiq. 195 200 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) 197 202 ! Camille 9 mars 2023: attention!! seuls les tags qui correspondent à 198 203 ! izone=izone_init (définie dans isotrac_mod) sont initialisés comme … … 208 213 !-------------------------------------------------------------------------------------------------------------------------- 209 214 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) 211 216 q(ijb_u:ije_u,:,iq)=0. 212 217 !-------------------------------------------------------------------------------------------------------------------------- -
LMDZ6/branches/cirrus/libf/dyn3dmem/iniacademic_loc.F90
r5202 r5203 5 5 6 6 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 8 8 USE control_mod, ONLY: day_step,planet_type 9 9 use exner_hyb_m, only: exner_hyb … … 22 22 USE temps_mod, ONLY: annee_ref, day_ini, day_ref 23 23 USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0 24 USE readTracFiles_mod, ONLY: addPhase25 24 use netcdf, only : NF90_NOWRITE,NF90_OPEN,NF90_NOERR,NF90_INQ_VARID 26 25 use netcdf, only : NF90_CLOSE, NF90_GET_VAR … … 85 84 86 85 REAL zdtvr, tnat, alpha_ideal 87 LOGICAL ,PARAMETER :: tnat1=.true.86 LOGICAL :: ltnat1 88 87 89 88 character(len=*),parameter :: modname="iniacademic" … … 311 310 ! bulk initialization of tracers 312 311 if (planet_type=="earth") then 312 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 313 313 ! Earth: first two tracers will be water 314 314 do iq=1,nqtot … … 324 324 iqParent = tracers(iq)%iqParent 325 325 IF(tracers(iq)%iso_iZone == 0) THEN 326 if (tnat1) then327 tnat=1.0328 alpha_ideal=1.0329 write(*,*) 'Attention dans iniacademic: alpha_ideal=1'330 else326 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 331 331 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 332 332 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 333 endif333 END IF 334 334 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.) 335 335 ELSE !IF(tracers(iq)%iso_iZone == 0) THEN -
LMDZ6/branches/cirrus/libf/dyn3dmem/qminimum_loc.F
r5202 r5203 4 4 SUBROUTINE qminimum_loc( q,nqtot,deltap ) 5 5 USE parallel_lmdz 6 USE infotrac, ONLY: niso, ntiso, iqIsoPha, tracers, 6 USE infotrac, ONLY: niso, ntiso, iqIsoPha, tracers, addPhase, 7 7 & isoCheck, min_qParent 8 8 USE strings_mod, ONLY: strIdx 9 USE readTracFiles_mod, ONLY: addPhase10 9 IMPLICIT none 11 10 c
Note: See TracChangeset
for help on using the changeset viewer.