Changeset 3331 for LMDZ5/branches/IPSLCM5A2.1_ISO/libf/dyn3dmem
- Timestamp:
- May 22, 2018, 4:30:21 PM (7 years ago)
- Location:
- LMDZ5/branches/IPSLCM5A2.1_ISO/libf/dyn3dmem
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/IPSLCM5A2.1_ISO/libf/dyn3dmem/check_isotopes_loc.F
r2281 r3331 12 12 13 13 ! locals 14 integer ixt,phase,k,i,iq,iiso,izone,ieau,iqeau 14 integer ixt,phase,k,i,iq,iiso,izone,ieau,iqeau,ixt2,iq2 15 15 real xtractot,xiiso 16 16 real borne … … 24 24 parameter (errmaxrel=1e-3) 25 25 parameter (qmin=1e-11) 26 parameter (deltaDmax= 200.0,deltaDmin=-999.9)26 parameter (deltaDmax=1000.0,deltaDmin=-999.0) 27 27 parameter (ridicule=1e-12) 28 28 real deltaD 29 real dexcessmax,dexcessmin 30 parameter (dexcessmax=6000.0,dexcessmin=-100.0) 29 31 30 32 if (ok_isotopes) then … … 134 136 enddo ! do phase=1,nqo 135 137 endif !if (use_iso(2)) then 138 139 !write(*,*) 'check_isotopes 103' 140 ! verifier que dexcess est raisonable 141 if (use_iso(3).and.use_iso(2)) then 142 ixt=indnum_fn_num(3) 143 ixt2=indnum_fn_num(2) 144 do phase=1,nqo 145 iq=iqiso(ixt,phase) 146 iq2=iqiso(ixt2,phase) 147 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 148 do k=1,llm 149 DO i = ijb,ije 150 if (q(i,k,iq).gt.qmin) then 151 deltaD=(q(i,k,iq2)/q(i,k,phase)/tnat(2)-1)*1000 152 & -8.0*(q(i,k,iq)/q(i,k,phase)/tnat(3)-1)*1000 153 if ((deltaD.gt.dexcessmax).or.(deltaD.lt.dexcessmin)) then 154 write(*,*) 'erreur detectee iso_verif_aberrant O18:' 155 write(*,*) err_msg 156 write(*,*) 'ixt,ixt2,phase=',ixt,ixt2,phase 157 write(*,*) 'q,iq,i,k,=',q(i,k,phase),iq,i,k 158 write(*,*) 'xt=',q(i,k,:) 159 write(*,*) 'dexcess=',deltaD 160 stop 161 endif !if ((deltaD.gt.deltaDmax).or.(deltaD.lt.deltaDmin)) then 162 endif !if (q(i,k,iq).gt.qmin) then 163 enddo !DO i = ijb,ije 164 enddo !do k=1,llm 165 c$OMP END DO NOWAIT 166 enddo ! do phase=1,nqo 167 endif !if (use_iso(2)) then 168 136 169 137 170 -
LMDZ5/branches/IPSLCM5A2.1_ISO/libf/dyn3dmem/dynetat0_loc.f90
r3229 r3331 153 153 DO iq=1,nqtot 154 154 var=tname(iq) 155 #ifdef INCA156 IF (var .eq. "O3" ) THEN157 IF(NF90_INQ_VARID(fID,var,vID) == NF90_NoErr) THEN158 CALL get_var2(var,q_glo); q(ijb_u:ije_u,:,iq)=q_glo(ijb_u:ije_u,:); CYCLE159 ELSE160 WRITE(lunout,*) 'Tracer O3 is missing - it is initialized to OX'161 IF(NF90_INQ_VARID(fID,"OX",vID) == NF90_NoErr) THEN162 CALL get_var2("OX",q_glo); q(ijb_u:ije_u,:,iq)=q_glo(ijb_u:ije_u,:); CYCLE163 ENDIF164 ENDIF165 ENDIF166 #endif167 155 IF(NF90_INQ_VARID(fID,var,vID)==NF90_NoErr) THEN 168 156 CALL get_var2(var,q_glo); q(ijb_u:ije_u,:,iq)=q_glo(ijb_u:ije_u,:); CYCLE … … 171 159 WRITE(lunout,*)" It is hence initialized to zero" 172 160 q(ijb_u:ije_u,:,iq)=0. 161 END DO !DO iq=1,nqtot 162 173 163 !--- CRisi: for isotops, theoretical initialization using very simplified 174 ! Rayleigh distillation las. 164 ! Rayleigh distillation. 165 DO iq=1,nqtot 166 if (ok_iso_verif) then 167 write(*,*) 'dynetat0_loc 167: iq,iso_num(iq),iqpere(iq)=',iq,iso_num(iq),iqpere(iq) 168 endif 175 169 IF(ok_isotopes.AND.iso_num(iq)>0) THEN 176 170 IF(zone_num(iq)==0) q(:,:,iq)=q(:,:,iqpere(iq))*tnat(iso_num(iq)) & … … 178 172 IF(zone_num(iq)==1) q(:,:,iq)=q(:,:,iqiso(iso_indnum(iq),phase_num(iq))) 179 173 END IF 180 END DO 174 END DO !DO iq=1,nqtot 175 176 if (ok_iso_verif) then 177 call check_isotopes(q,ijb_u,ije_u,'dynetat0_loc 171') 178 endif !if (ok_iso_verif) then 179 181 180 DEALLOCATE(q_glo) 182 181 CALL err(NF90_CLOSE(fID),"close",fichnom)
Note: See TracChangeset
for help on using the changeset viewer.