Changeset 5200 for LMDZ6/trunk/libf
- Timestamp:
- Sep 19, 2024, 4:11:02 PM (2 months ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d/check_isotopes.F90
r5190 r5200 20 20 deltaDmin =-999.0, & 21 21 ridicule = 1e-12 22 INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, & 23 iso_O17, iso_HTO 24 LOGICAL, SAVE :: first=.TRUE. 25 LOGICAL, PARAMETER :: tnat1=.TRUE. 22 INTEGER, SAVE :: iso_eau, iso_O17, iso_O18, iso_HDO, iso_HTO 23 LOGICAL, SAVE :: ltnat1, first=.TRUE. 26 24 27 25 modname='check_isotopes' … … 30 28 IF(niso == 0) RETURN !--- No isotopes => finished 31 29 IF(first) THEN 30 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 31 ALLOCATE(tnat(niso)) 32 32 iso_eau = strIdx(isoName,'H216O') 33 iso_O17 = strIdx(isoName,'H217O') 34 iso_O18 = strIdx(isoName,'H218O') 33 35 iso_HDO = strIdx(isoName,'HDO') 34 iso_O18 = strIdx(isoName,'H218O')35 iso_O17 = strIdx(isoName,'H217O')36 36 iso_HTO = strIdx(isoName,'HTO') 37 if (tnat1) then38 39 else37 IF(ltnat1) THEN 38 tnat(:)=1.0 39 ELSE 40 40 IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1) 41 endif41 END IF 42 42 first = .FALSE. 43 43 END IF … … 51 51 DO k = 1, llm 52 52 DO i = 1, ip1jmp1 53 IF(ABS(q(i,k,iq)) < borne) CYCLE53 IF(ABS(q(i,k,iq)) <= borne) CYCLE 54 54 WRITE(msg1,'(s,"(",i0,",",i0,",",i0,") = ",ES12.4)')TRIM(isoName(ixt)),i,k,iq,q(i,k,iq) 55 55 CALL msg(msg1, modname) -
LMDZ6/trunk/libf/dyn3d/dynetat0.F90
r5199 r5200 19 19 USE temps_mod, ONLY: annee_ref, day_ini, day_ref, itau_dyn, start_time 20 20 USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0 21 #ifdef CPP_IOIPSL 22 USE IOIPSL, ONLY: getin 23 #else 24 USE ioipsl_getincom, ONLY: getin 25 #endif 21 26 22 27 IMPLICIT NONE … … 42 47 INTEGER :: iq, fID, vID, idecal, iqParent, iName, iZone, iPhase 43 48 REAL :: time, tnat, alpha_ideal, tab_cntrl(length) !--- RUN PARAMS TABLE 44 LOGICAL :: lSkip, ll 45 LOGICAL,PARAMETER :: tnat1=.TRUE. 49 LOGICAL :: lSkip, ll, ltnat1 46 50 !------------------------------------------------------------------------------- 47 51 modname="dynetat0" … … 133 137 ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= NF90_NoErr !--- DETECT OLD REPRO start.nc FILE 134 138 #endif 139 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 135 140 DO iq=1,nqtot 136 141 var = tracers(iq)%name … … 156 161 iqParent = tracers(iq)%iqParent 157 162 IF(tracers(iq)%iso_iZone == 0) THEN 158 if (tnat1) then159 tnat=1.0160 alpha_ideal=1.0161 write(*,*) 'attention dans dynetat0: les alpha_ideal sont a 1'162 else163 IF(ltnat1) THEN 164 tnat = 1.0 165 alpha_ideal = 1.0 166 CALL msg(' !!! Beware: alpha_ideal put to 1 !!!', modname) 167 ELSE 163 168 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 164 169 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 165 endif170 END IF 166 171 CALL msg('Missing tracer <'//TRIM(var)//'> => initialized with a simplified Rayleigh distillation law.', modname) 167 172 q(:,:,:,iq) = q(:,:,:,iqParent)*tnat*(q(:,:,:,iqParent)/30.e-3)**(alpha_ideal-1.) -
LMDZ6/trunk/libf/dyn3d/iniacademic.F90
r5199 r5200 79 79 80 80 REAL zdtvr, tnat, alpha_ideal 81 LOGICAL ,PARAMETER :: tnat1=.true.81 LOGICAL :: ltnat1 82 82 83 83 character(len=*),parameter :: modname="iniacademic" … … 308 308 ! bulk initialization of tracers 309 309 if (planet_type=="earth") then 310 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 310 311 ! Earth: first two tracers will be water 311 312 do iq=1,nqtot … … 321 322 iqParent = tracers(iq)%iqParent 322 323 IF(tracers(iq)%iso_iZone == 0) THEN 323 if (tnat1) then324 tnat=1.0325 alpha_ideal=1.0326 write(*,*) 'Attention dans iniacademic: alpha_ideal=1'327 else324 IF(ltnat1) THEN 325 tnat = 1.0 326 alpha_ideal = 1.0 327 WRITE(lunout, *)'In '//TRIM(modname)//': !!! Beware: alpha_ideal put to 1 !!!' 328 ELSE 328 329 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 329 330 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 330 endif331 END IF 331 332 q(:,:,iq) = q(:,:,iqParent)*tnat*(q(:,:,iqParent)/30.e-3)**(alpha_ideal-1.) 332 333 ELSE !IF(tracers(iq)%iso_iZone == 0) THEN -
LMDZ6/trunk/libf/dyn3d_common/iso_verif_dyn.F
r5190 r5200 64 64 function iso_verif_aberrant_nostop 65 65 : (x,iso,q,err_msg) 66 #ifdef CPP_IOIPSL 67 USE IOIPSL, ONLY: getin 68 #else 69 USE ioipsl_getincom, ONLY: getin 70 #endif 66 71 USE infotrac, ONLY: isoName, getKey 67 72 implicit none … … 77 82 parameter (qmin=1e-11) 78 83 parameter (deltaDmax=200.0,deltaDmin=-999.9) 84 LOGICAL, SAVE :: ltnat1 85 LOGICAL, SAVE :: lFirst=.TRUE. 79 86 80 87 ! output 81 88 integer iso_verif_aberrant_nostop 82 89 90 IF(lFirst) THEN 91 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 92 lFirst = .FALSE. 93 END IF 83 94 iso_verif_aberrant_nostop=0 84 95 85 96 ! verifier que HDO est raisonable 86 97 if (q.gt.qmin) then 87 IF(getKey('tnat', tnat, isoName(iso))) THEN 98 IF(ltnat1) THEN 99 tnat = 1.0 100 ELSE IF(getKey('tnat', tnat, isoName(iso))) THEN 88 101 err_msg = 'Missing isotopic parameter "tnat"' 89 102 iso_verif_aberrant_nostop=1 -
LMDZ6/trunk/libf/dyn3dmem/check_isotopes_loc.F90
r5190 r5200 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/trunk/libf/dyn3dmem/dynetat0_loc.F90
r5199 r5200 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 … … 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 endif195 END IF 191 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.) -
LMDZ6/trunk/libf/dyn3dmem/iniacademic_loc.F90
r5199 r5200 84 84 85 85 REAL zdtvr, tnat, alpha_ideal 86 LOGICAL ,PARAMETER :: tnat1=.true.86 LOGICAL :: ltnat1 87 87 88 88 character(len=*),parameter :: modname="iniacademic" … … 310 310 ! bulk initialization of tracers 311 311 if (planet_type=="earth") then 312 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 312 313 ! Earth: first two tracers will be water 313 314 do iq=1,nqtot … … 323 324 iqParent = tracers(iq)%iqParent 324 325 IF(tracers(iq)%iso_iZone == 0) THEN 325 if (tnat1) then326 tnat=1.0327 alpha_ideal=1.0328 write(*,*) 'Attention dans iniacademic: alpha_ideal=1'329 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 330 331 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 331 332 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 332 endif333 END IF 333 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.) 334 335 ELSE !IF(tracers(iq)%iso_iZone == 0) THEN -
LMDZ6/trunk/libf/phylmd/infotrac_phy.F90
r5199 r5200 316 316 317 317 #ifdef REPROBUS 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 #endif 320 320 -
LMDZ6/trunk/libf/phylmdiso/isotopes_mod.F90
r5190 r5200 161 161 !=== Local variables: 162 162 INTEGER :: ixt 163 163 LOGICAL :: ltnat1 164 CHARACTER(LEN=maxlen) :: modname, sxt 164 165 165 166 !--- For H2[17]O … … 170 171 LOGICAL, PARAMETER :: ok_nocinsat = .FALSE. ! if T: no sursaturation effect for ice 171 172 LOGICAL, PARAMETER :: Rdefault_smow = .FALSE. ! if T: Rdefault=smow; if F: nul 172 LOGICAL, PARAMETER :: tnat1 = .TRUE. ! If T: all tnats are 1.173 173 174 174 !--- For [3]H 175 175 INTEGER :: iessai 176 177 CHARACTER(LEN=maxlen) :: modname, sxt178 176 179 177 modname = 'iso_init' … … 265 263 IF(ANY(isoName == 'HTO')) & 266 264 CALL get_in('ok_prod_nucl_tritium', ok_prod_nucl_tritium, .FALSE., .FALSE.) 265 CALL get_in('tnateq1', ltnat1, .TRUE.) 267 266 268 267 ! Ocean composition … … 295 294 tkcin1(ixt) = 0.0005016 296 295 tkcin2(ixt) = 0.0014432 297 if (tnat1) then 298 tnat(ixt)=1 299 else 300 tnat(ixt)=0. 301 endif 296 tnat(ixt) = 0.0; IF(ltnat1) tnat(ixt)=1 302 297 toce(ixt)=4.0E-19 ! rapport T/H = 0.2 TU Dreisigacker and Roether 1978 303 298 tcorr(ixt)=1. … … 318 313 tkcin1(ixt) = tkcin1_O18*fac_kcin 319 314 tkcin2(ixt) = tkcin2_O18*fac_kcin 320 if (tnat1) then 321 tnat(ixt)=1 322 else 323 tnat(ixt)=0.004/100. ! O17 représente 0.004% de l'oxygène 324 endif 315 tnat(ixt)=0.004/100. ! O17 représente 0.004% de l'oxygène 316 IF(ltnat1) tnat(ixt)=1 325 317 toce(ixt)=tnat(ixt)*(1.0+deltaO18_oce/1000.0)**pente_MWL 326 318 tcorr(ixt)=1.0+fac_enrichoce18*pente_MWL ! donné par Amaelle … … 338 330 tkcin1(ixt) = tkcin1_O18 339 331 tkcin2(ixt) = tkcin2_O18 340 if (tnat1) then 341 tnat(ixt)=1 342 else 343 tnat(ixt)=2005.2E-6 344 endif 332 tnat(ixt)=2005.2E-6; IF(ltnat1) tnat(ixt)=1 345 333 toce(ixt)=tnat(ixt)*(1.0+deltaO18_oce/1000.0) 346 334 tcorr(ixt)=1.0+fac_enrichoce18 … … 362 350 tkcin1(ixt) = tkcin1_O18*fac_kcin 363 351 tkcin2(ixt) = tkcin2_O18*fac_kcin 364 if (tnat1) then 365 tnat(ixt)=1 366 else 367 tnat(ixt)=155.76E-6 368 endif 352 tnat(ixt)=155.76E-6; IF(ltnat1) tnat(ixt)=1 369 353 toce(ixt)=tnat(ixt)*(1.0+pente_MWL*deltaO18_oce/1000.0) 370 354 tcorr(ixt)=1.0+fac_enrichoce18*pente_MWL
Note: See TracChangeset
for help on using the changeset viewer.