Changeset 5099 for LMDZ6/branches/Amaury_dev/libf/dyn3d/dynetat0.F90
- Timestamp:
- Jul 22, 2024, 9:29:09 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d/dynetat0.F90
r5091 r5099 1 1 SUBROUTINE dynetat0(fichnom,vcov,ucov,teta,q,masse,ps,phis,time) 2 ! 2 3 3 !------------------------------------------------------------------------------- 4 4 ! Authors: P. Le Van , L.Fairhead … … 9 9 USE strings_mod, ONLY: maxlen, msg, strStack, real2str, int2str 10 10 USE netcdf, ONLY: NF90_OPEN, NF90_NOWRITE, NF90_INQ_VARID, & 11 NF90_CLOSE, NF90_GET_VAR, NF90_NoErr11 NF90_CLOSE, nf90_get_var, nf90_noerr 12 12 USE readTracFiles_mod, ONLY: new2oldH2O, newHNO3, oldHNO3, getKey 13 13 USE control_mod, ONLY: planet_type … … 82 82 pa = tab_cntrl(idecal+13) 83 83 preff = tab_cntrl(idecal+14) 84 ! 84 85 85 clon = tab_cntrl(idecal+15) 86 86 clat = tab_cntrl(idecal+16) 87 87 grossismx = tab_cntrl(idecal+17) 88 88 grossismy = tab_cntrl(idecal+18) 89 ! 89 90 90 IF ( tab_cntrl(idecal+19)==1. ) THEN 91 91 fxyhypb = .TRUE. … … 116 116 CALL get_var2("aire" ,aire) 117 117 var="temps" 118 IF(NF90_INQ_VARID(fID,var,vID)/= NF90_NoErr) THEN118 IF(NF90_INQ_VARID(fID,var,vID)/=nf90_noerr) THEN 119 119 CALL msg('missing field <temps> ; trying with <Time>', modname) 120 120 var="Time" 121 121 CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var) 122 122 END IF 123 CALL err( NF90_GET_VAR(fID,vID,time),"get",var)123 CALL err(nf90_get_var(fID,vID,time),"get",var) 124 124 CALL get_var2("phisinit",phis) 125 125 CALL get_var3("ucov",ucov) … … 132 132 ll=.FALSE. 133 133 #ifdef REPROBUS 134 ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= NF90_NoErr !--- DETECT OLD REPRO start.nc FILE134 ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= nf90_noerr !--- DETECT OLD REPRO start.nc FILE 135 135 #endif 136 136 DO iq=1,nqtot … … 145 145 END IF 146 146 !-------------------------------------------------------------------------------------------------------------------------- 147 IF(NF90_INQ_VARID(fID, var, vID) == NF90_NoErr .AND. .NOT.lSkip) THEN !=== REGULAR CASE: AVAILABLE VARIABLE148 CALL err( NF90_GET_VAR(fID,vID,q(:,:,:,iq)),"get",var)149 !-------------------------------------------------------------------------------------------------------------------------- 150 ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == NF90_NoErr) THEN !=== TRY WITH ALTERNATE NAME147 IF(NF90_INQ_VARID(fID, var, vID) == nf90_noerr .AND. .NOT.lSkip) THEN !=== REGULAR CASE: AVAILABLE VARIABLE 148 CALL err(nf90_get_var(fID,vID,q(:,:,:,iq)),"get",var) 149 !-------------------------------------------------------------------------------------------------------------------------- 150 ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == nf90_noerr) THEN !=== TRY WITH ALTERNATE NAME 151 151 CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to <'//TRIM(oldVar)//'>', modname) 152 CALL err( NF90_GET_VAR(fID,vID,q(:,:,:,iq)),"get",oldVar)152 CALL err(nf90_get_var(fID,vID,q(:,:,:,iq)),"get",oldVar) 153 153 !-------------------------------------------------------------------------------------------------------------------------- 154 154 ELSE IF(tracers(iq)%iso_iGroup == iH2O .AND. niso > 0) THEN !=== WATER ISOTOPES … … 209 209 REAL, INTENT(OUT) :: v(:) 210 210 CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var) 211 CALL err( NF90_GET_VAR(fID,vID,v),"get",var)211 CALL err(nf90_get_var(fID,vID,v),"get",var) 212 212 END SUBROUTINE get_var1 213 213 … … 217 217 REAL, INTENT(OUT) :: v(:,:) 218 218 CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var) 219 CALL err( NF90_GET_VAR(fID,vID,v),"get",var)219 CALL err(nf90_get_var(fID,vID,v),"get",var) 220 220 END SUBROUTINE get_var2 221 221 … … 225 225 REAL, INTENT(OUT) :: v(:,:,:) 226 226 CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var) 227 CALL err( NF90_GET_VAR(fID,vID,v),"get",var)227 CALL err(nf90_get_var(fID,vID,v),"get",var) 228 228 END SUBROUTINE get_var3 229 229 … … 233 233 CHARACTER(LEN=*), INTENT(IN) :: typ !--- TYPE OF OPERATION 234 234 CHARACTER(LEN=*), INTENT(IN) :: nam !--- FIELD/FILE NAME 235 IF(ierr== NF90_NoERR) RETURN235 IF(ierr==nf90_noerr) RETURN 236 236 SELECT CASE(typ) 237 237 CASE('inq'); mesg="Field <"//TRIM(nam)//"> is missing"
Note: See TracChangeset
for help on using the changeset viewer.