Changeset 5190 for LMDZ6/trunk/libf/dyn3dmem
- Timestamp:
- Sep 15, 2024, 10:38:32 AM (5 months ago)
- Location:
- LMDZ6/trunk/libf/dyn3dmem
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3dmem/check_isotopes_loc.F90
r5183 r5190 3 3 USE strings_mod, ONLY: maxlen, msg, strIdx, strStack, int2str, real2str 4 4 USE infotrac, ONLY: nqtot, niso, nphas, isotope, isoCheck, iqIsoPha, isoSelect, & 5 ntiso, iH2O, nzone, tracers, isoName, itZonIso 6 USE iso_params_mod, ONLY: tnat_H216O, tnat_H217O, tnat_H218O, tnat_HDO, tnat_HTO 7 #ifdef CPP_IOIPSL 8 USE ioipsl, ONLY: getin 9 #else 10 USE ioipsl_getincom, ONLY: getin 11 #endif 5 ntiso, iH2O, nzone, tracers, isoName, itZonIso, getKey 12 6 IMPLICIT NONE 13 7 include "dimensions.h" … … 27 21 deltaDmin =-999.0, & 28 22 ridicule = 1e-12 29 INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, iso_O17, iso_HTO 30 !$OMP THREADPRIVATE(iso_eau, iso_HDO, iso_O18, iso_O17, iso_HTO) 31 LOGICAL :: ltnat1 23 INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, & !--- OpenMP shared variables 24 iso_O17, iso_HTO 32 25 LOGICAL, SAVE :: first=.TRUE. 26 LOGICAL, PARAMETER :: tnat1=.TRUE. 33 27 !$OMP THREADPRIVATE(first) 34 28 … … 38 32 IF(niso == 0) RETURN !--- No isotopes => finished 39 33 IF(first) THEN 40 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 41 iso_eau = strIdx(isoName,'H216O'); IF(iso_eau /= 0) tnat(iso_eau) = tnat_H216O 42 iso_O17 = strIdx(isoName,'H217O'); IF(iso_O17 /= 0) tnat(iso_O17) = tnat_H217O 43 iso_O18 = strIdx(isoName,'H218O'); IF(iso_O18 /= 0) tnat(iso_O18) = tnat_H218O 44 iso_HDO = strIdx(isoName,'HDO'); IF(iso_HDO /= 0) tnat(iso_HDO) = tnat_HDO 45 iso_HTO = strIdx(isoName,'HTO'); IF(iso_HTO /= 0) tnat(iso_HTO) = tnat_HTO 46 IF(ltnat1) tnat(:) = 1.0 34 !$OMP MASTER 35 iso_eau = strIdx(isoName,'H216O') 36 iso_HDO = strIdx(isoName,'HDO') 37 iso_O18 = strIdx(isoName,'H218O') 38 iso_O17 = strIdx(isoName,'H217O') 39 iso_HTO = strIdx(isoName,'HTO') 40 if (tnat1) then 41 tnat(:)=1.0 42 else 43 IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1) 44 endif 45 !$OMP END MASTER 46 !$OMP BARRIER 47 47 first = .FALSE. 48 48 END IF -
LMDZ6/trunk/libf/dyn3dmem/dynetat0_loc.F90
r5183 r5190 7 7 !------------------------------------------------------------------------------- 8 8 USE parallel_lmdz 9 USE infotrac, ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName, & 10 new2oldH2O, newHNO3, oldHNO3 9 USE infotrac, ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName 11 10 USE strings_mod, ONLY: maxlen, msg, strStack, real2str, int2str, strIdx 12 11 USE netcdf, ONLY: NF90_OPEN, NF90_NOWRITE, NF90_INQUIRE_DIMENSION, NF90_INQ_VARID, & 13 12 NF90_CLOSE, NF90_GET_VAR, NF90_INQUIRE_VARIABLE, NF90_NoErr 13 USE readTracFiles_mod, ONLY: new2oldH2O, newHNO3, oldHNO3, getKey 14 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_IOIPSL23 USE IOIPSL, ONLY: getin24 #else25 USE ioipsl_getincom, ONLY: getin26 #endif27 USE iso_params_mod ! tnat_* and alpha_ideal_*28 22 29 23 IMPLICIT NONE … … 53 47 REAL, ALLOCATABLE :: ucov_glo(:,:), q_glo(:,:), phis_glo(:) 54 48 REAL, ALLOCATABLE :: teta_glo(:,:) 55 LOGICAL :: lSkip, ll, ltnat1 49 LOGICAL :: lSkip, ll 50 LOGICAL,PARAMETER :: tnat1=.TRUE. 56 51 !------------------------------------------------------------------------------- 57 52 modname="dynetat0_loc" … … 163 158 ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= NF90_NoErr !--- DETECT OLD REPRO start.nc FILE 164 159 #endif 165 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1)166 160 DO iq=1,nqtot 167 161 var = tracers(iq)%name … … 179 173 !-------------------------------------------------------------------------------------------------------------------------- 180 174 ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == NF90_NoErr) THEN !=== TRY WITH ALTERNATE NAME 181 CALL msg(' Missing tracer <'//TRIM(var)//'>=> initialized to <'//TRIM(oldVar)//'>', modname)175 CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to <'//TRIM(oldVar)//'>', modname) 182 176 CALL get_var2(oldVar, q_glo); q(ijb_u:ije_u,:,iq)=q_glo(ijb_u:ije_u,:) 183 177 !-------------------------------------------------------------------------------------------------------------------------- … … 187 181 iqParent = tracers(iq)%iqParent 188 182 IF(tracers(iq)%iso_iZone == 0) THEN 189 IF(ltnat1) THEN 190 tnat = 1.0 191 alpha_ideal = 1.0 192 CALL msg(' !!! Beware: alpha_ideal put to 1 !!!', modname) 193 ELSE 194 SELECT CASE(isoName(iName)) 195 CASE('H216O'); tnat = tnat_H216O; alpha_ideal = alpha_ideal_H216O 196 CASE('H217O'); tnat = tnat_H217O; alpha_ideal = alpha_ideal_H217O 197 CASE('H218O'); tnat = tnat_H218O; alpha_ideal = alpha_ideal_H218O 198 CASE('HDO'); tnat = tnat_HDO; alpha_ideal = alpha_ideal_HDO 199 CASE('HTO'); tnat = tnat_HTO; alpha_ideal = alpha_ideal_HTO 200 CASE DEFAULT; CALL abort_gcm(TRIM(modname),'unknown isotope "'//TRIM(isoName(iName))//'" ; check tracer.def file',1) 201 END SELECT 202 END IF 203 CALL msg('Missing tracer <'//TRIM(var)//'> => initialized with a simplified Rayleigh distillation law.', modname) 183 if (tnat1) then 184 tnat=1.0 185 alpha_ideal=1.0 186 write(*,*) 'attention dans dynetat0: les alpha_ideal sont a 1' 187 else 188 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 189 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 190 endif 191 CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized with a simplified Rayleigh distillation law.', modname) 204 192 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.) 205 193 ! Camille 9 mars 2023: point de vigilence: initialisation incohérente 206 194 ! avec celle de xt_ancien dans la physiq. 207 195 ELSE 208 CALL msg(' Missing tracer <'//TRIM(var)//'>=> initialized to its parent isotope concentration.', modname)196 CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to its parent isotope concentration.', modname) 209 197 ! Camille 9 mars 2023: attention!! seuls les tags qui correspondent à 210 198 ! izone=izone_init (définie dans isotrac_mod) sont initialisés comme … … 220 208 !-------------------------------------------------------------------------------------------------------------------------- 221 209 ELSE !=== MISSING: SET TO 0 222 CALL msg(' missing tracer <'//TRIM(var)//'>=> initialized to zero', modname)210 CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to zero', modname) 223 211 q(ijb_u:ije_u,:,iq)=0. 224 212 !-------------------------------------------------------------------------------------------------------------------------- -
LMDZ6/trunk/libf/dyn3dmem/iniacademic_loc.F90
r5183 r5190 5 5 6 6 USE filtreg_mod, ONLY: inifilr 7 USE infotrac, ONLY: nqtot, niso, iqIsoPha, tracers, addPhase, isoName7 USE infotrac, ONLY: nqtot, niso, iqIsoPha, tracers, getKey, isoName 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: addPhase 24 25 use netcdf, only : NF90_NOWRITE,NF90_OPEN,NF90_NOERR,NF90_INQ_VARID 25 26 use netcdf, only : NF90_CLOSE, NF90_GET_VAR 26 USE iso_params_mod ! tnat_* and alpha_ideal_*27 27 28 28 … … 85 85 86 86 REAL zdtvr, tnat, alpha_ideal 87 LOGICAL :: ltnat187 LOGICAL,PARAMETER :: tnat1=.true. 88 88 89 89 character(len=*),parameter :: modname="iniacademic" … … 311 311 ! bulk initialization of tracers 312 312 if (planet_type=="earth") then 313 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1)314 313 ! Earth: first two tracers will be water 315 314 do iq=1,nqtot … … 325 324 iqParent = tracers(iq)%iqParent 326 325 IF(tracers(iq)%iso_iZone == 0) THEN 327 IF(ltnat1) THEN 328 tnat = 1.0 329 alpha_ideal = 1.0 330 WRITE(lunout, *) 'In '//TRIM(modname)//': !!! Beware: alpha_ideal put to 1 !!!' 331 ELSE 332 SELECT CASE(isoName(iName)) 333 CASE('H216O'); tnat = tnat_H216O; alpha_ideal = alpha_ideal_H216O 334 CASE('H217O'); tnat = tnat_H217O; alpha_ideal = alpha_ideal_H217O 335 CASE('H218O'); tnat = tnat_H218O; alpha_ideal = alpha_ideal_H218O 336 CASE('HDO'); tnat = tnat_HDO; alpha_ideal = alpha_ideal_HDO 337 CASE('HTO'); tnat = tnat_HTO; alpha_ideal = alpha_ideal_HTO 338 CASE DEFAULT 339 CALL abort_gcm(TRIM(modname),'unknown isotope "'//TRIM(isoName(iName))//'" ; check tracer.def file',1) 340 END SELECT 341 END IF 326 if (tnat1) then 327 tnat=1.0 328 alpha_ideal=1.0 329 write(*,*) 'Attention dans iniacademic: alpha_ideal=1' 330 else 331 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 332 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 333 endif 342 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.) 343 335 ELSE !IF(tracers(iq)%iso_iZone == 0) THEN -
LMDZ6/trunk/libf/dyn3dmem/qminimum_loc.F
r5183 r5190 4 4 SUBROUTINE qminimum_loc( q,nqtot,deltap ) 5 5 USE parallel_lmdz 6 USE infotrac, ONLY: niso, ntiso, iqIsoPha, tracers, addPhase,6 USE infotrac, ONLY: niso, ntiso, iqIsoPha, tracers, 7 7 & isoCheck, min_qParent 8 8 USE strings_mod, ONLY: strIdx 9 USE readTracFiles_mod, ONLY: addPhase 9 10 IMPLICIT none 10 11 c
Note: See TracChangeset
for help on using the changeset viewer.