Changeset 5203 for LMDZ6/branches/cirrus/libf/dyn3d
- Timestamp:
- Sep 20, 2024, 1:10:18 PM (4 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/dyn3d/check_isotopes.F90
r5202 r5203 3 3 USE infotrac, ONLY: nqtot, niso, nphas, isotope, isoCheck, iqIsoPha, isoSelect, & 4 4 ntiso, iH2O, nzone, tracers, isoName, itZonIso, getKey 5 #ifdef CPP_IOIPSL 6 USE ioipsl, ONLY: getin 7 #else 8 USE ioipsl_getincom, ONLY: getin 9 #endif 5 10 IMPLICIT NONE 6 11 include "dimensions.h" … … 20 25 deltaDmin =-999.0, & 21 26 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. 27 INTEGER, SAVE :: iso_eau, iso_O17, iso_O18, iso_HDO, iso_HTO 28 LOGICAL, SAVE :: ltnat1, first=.TRUE. 26 29 27 30 modname='check_isotopes' … … 30 33 IF(niso == 0) RETURN !--- No isotopes => finished 31 34 IF(first) THEN 35 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 36 ALLOCATE(tnat(niso)) 32 37 iso_eau = strIdx(isoName,'H216O') 38 iso_O17 = strIdx(isoName,'H217O') 39 iso_O18 = strIdx(isoName,'H218O') 33 40 iso_HDO = strIdx(isoName,'HDO') 34 iso_O18 = strIdx(isoName,'H218O')35 iso_O17 = strIdx(isoName,'H217O')36 41 iso_HTO = strIdx(isoName,'HTO') 37 if (tnat1) then38 39 else42 IF(ltnat1) THEN 43 tnat(:)=1.0 44 ELSE 40 45 IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1) 41 endif46 END IF 42 47 first = .FALSE. 43 48 END IF … … 51 56 DO k = 1, llm 52 57 DO i = 1, ip1jmp1 53 IF(ABS(q(i,k,iq)) < borne) CYCLE58 IF(ABS(q(i,k,iq)) <= borne) CYCLE 54 59 WRITE(msg1,'(s,"(",i0,",",i0,",",i0,") = ",ES12.4)')TRIM(isoName(ixt)),i,k,iq,q(i,k,iq) 55 60 CALL msg(msg1, modname) -
LMDZ6/branches/cirrus/libf/dyn3d/dynetat0.F90
r5202 r5203 6 6 ! Purpose: Initial state reading. 7 7 !------------------------------------------------------------------------------- 8 USE infotrac, ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName 8 USE infotrac, ONLY: nqtot, tracers, niso, iqIsoPha, iH2O, isoName, & 9 new2oldH2O, newHNO3, oldHNO3, getKey 9 10 USE strings_mod, ONLY: maxlen, msg, strStack, real2str, int2str 10 11 USE netcdf, ONLY: NF90_OPEN, NF90_NOWRITE, NF90_INQ_VARID, & 11 12 NF90_CLOSE, NF90_GET_VAR, NF90_NoErr 12 USE readTracFiles_mod, ONLY: new2oldH2O, newHNO3, oldHNO3, getKey13 13 USE control_mod, ONLY: planet_type 14 14 USE assert_eq_m, ONLY: assert_eq … … 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" … … 116 120 var="temps" 117 121 IF(NF90_INQ_VARID(fID,var,vID)/=NF90_NoErr) THEN 118 CALL msg(' missing field <temps> ; trying with <Time>', modname)122 CALL msg('Missing field <temps> ; trying with <Time>', modname) 119 123 var="Time" 120 124 CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var) … … 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 … … 148 153 !-------------------------------------------------------------------------------------------------------------------------- 149 154 ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == NF90_NoErr) THEN !=== TRY WITH ALTERNATE NAME 150 CALL msg(' Tracer <'//TRIM(var)//'> is missing=> initialized to <'//TRIM(oldVar)//'>', modname)155 CALL msg('Missing tracer <'//TRIM(var)//'> => initialized to <'//TRIM(oldVar)//'>', modname) 151 156 CALL err(NF90_GET_VAR(fID,vID,q(:,:,:,iq)),"get",oldVar) 152 157 !-------------------------------------------------------------------------------------------------------------------------- … … 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 endif166 CALL msg(' Tracer <'//TRIM(var)//'> is missing=> initialized with a simplified Rayleigh distillation law.', modname)170 END IF 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.) 168 173 ELSE 169 CALL msg(' Tracer <'//TRIM(var)//'> is missing=> initialized to its parent isotope concentration.', modname)174 CALL msg('Missing tracer <'//TRIM(var)//'> => initialized to its parent isotope concentration.', modname) 170 175 ! Camille 9 mars 2023: attention!! seuls les tags qui correspondent à 171 176 ! izone=izone_init (définie dans isotrac_mod) sont initialisés comme … … 181 186 !-------------------------------------------------------------------------------------------------------------------------- 182 187 ELSE !=== MISSING: SET TO 0 183 CALL msg(' Tracer <'//TRIM(var)//'> is missing=> initialized to zero', modname)188 CALL msg('Missing tracer <'//TRIM(var)//'> => initialized to zero', modname) 184 189 q(:,:,:,iq)=0. 185 190 !-------------------------------------------------------------------------------------------------------------------------- -
LMDZ6/branches/cirrus/libf/dyn3d/iniacademic.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 … … 21 21 USE temps_mod, ONLY: annee_ref, day_ini, day_ref 22 22 USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0 23 USE readTracFiles_mod, ONLY: addPhase24 23 use netcdf, only : NF90_NOWRITE,NF90_OPEN,NF90_NOERR,NF90_INQ_VARID 25 24 use netcdf, only : NF90_CLOSE, NF90_GET_VAR … … 80 79 81 80 REAL zdtvr, tnat, alpha_ideal 82 LOGICAL ,PARAMETER :: tnat1=.true.81 LOGICAL :: ltnat1 83 82 84 83 character(len=*),parameter :: modname="iniacademic" … … 309 308 ! bulk initialization of tracers 310 309 if (planet_type=="earth") then 310 ltnat1 = .TRUE.; CALL getin('tnateq1', ltnat1) 311 311 ! Earth: first two tracers will be water 312 312 do iq=1,nqtot … … 322 322 iqParent = tracers(iq)%iqParent 323 323 IF(tracers(iq)%iso_iZone == 0) THEN 324 if (tnat1) then325 tnat=1.0326 alpha_ideal=1.0327 write(*,*) 'Attention dans iniacademic: alpha_ideal=1'328 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 329 329 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 330 330 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 331 endif331 END IF 332 332 q(:,:,iq) = q(:,:,iqParent)*tnat*(q(:,:,iqParent)/30.e-3)**(alpha_ideal-1.) 333 333 ELSE !IF(tracers(iq)%iso_iZone == 0) THEN -
LMDZ6/branches/cirrus/libf/dyn3d/qminimum.F
r5202 r5203 4 4 SUBROUTINE qminimum( q,nqtot,deltap ) 5 5 6 USE infotrac, ONLY: niso, ntiso, iqIsoPha, tracers6 USE infotrac, ONLY: niso, ntiso, iqIsoPha, tracers, addPhase 7 7 USE strings_mod, ONLY: strIdx 8 USE readTracFiles_mod, ONLY: addPhase9 8 IMPLICIT none 10 9 c
Note: See TracChangeset
for help on using the changeset viewer.