Changeset 2546 for trunk/LMDZ.MARS/util/zrecast.F90
- Timestamp:
- Jul 8, 2021, 4:29:44 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/zrecast.F90
r2528 r2546 400 400 ierr=NF_INQ_DIMID(infid,"time",tmpdimid) 401 401 if (ierr.ne.NF_NOERR) then 402 stop "Error: Failed to get lon dimension ID" 402 write(*,*) "Could not get time dimension ID" 403 write(*,*) " looking for time_counter dimension instead... " 404 ierr=NF_INQ_DIMID(infid,"time_counter",tmpdimid) 405 if (ierr.ne.NF_NOERR) then 406 stop "Error: Failed to get time_counter dimension ID" 407 else 408 ierr=NF_INQ_VARID(infid,"time_counter",tmpvarid) 409 if (ierr.ne.NF_NOERR) then 410 stop "Error: Failed to get time_counter ID" 411 else 412 ierr=NF_INQ_DIMLEN(infid,tmpdimid,timelength) 413 if (ierr.ne.NF_NOERR) then 414 stop "Error: Failed to get time_counter length" 415 else 416 allocate(time(timelength),stat=ierr) 417 if (ierr.ne.0) then 418 write(*,*) "Error: Failed to allocate time(timelength)" 419 write(*,*) " timelength=",timelength 420 stop 421 endif 422 ierr=NF_GET_VAR_REAL(infid,tmpvarid,time) 423 if (ierr.ne.NF_NOERR) then 424 stop "Error: Failed reading time" 425 endif 426 endif 427 endif 428 endif 403 429 else 404 430 ierr=NF_INQ_VARID(infid,"time",tmpvarid) … … 471 497 if (ierr.ne.NF_NOERR) then 472 498 write(*,*) "Could not get controle dimension ID" 473 ctllength = 0 499 write(*,*) " looking for controle_axe dimension instead... " 500 ierr=NF_INQ_DIMID(infid,"controle_axe",tmpdimid) 501 if (ierr.ne.NF_NOERR) then 502 ctllength = 0 503 else 504 ierr=NF_INQ_VARID(infid,"controle",tmpvarid) 505 if (ierr.ne.NF_NOERR) then 506 stop "Error: Failed to get controle ID" 507 else 508 ierr=NF_INQ_DIMLEN(infid,tmpdimid,ctllength) 509 if (ierr.ne.NF_NOERR) then 510 stop "Error: Failed to get controle length" 511 else 512 allocate(ctl(ctllength),stat=ierr) 513 if (ierr.ne.0) then 514 write(*,*) "Error: Failed to allocate ctl(ctllength)" 515 write(*,*) " ctllength=",ctllength 516 stop 517 endif 518 ierr=NF_GET_VAR_REAL(infid,tmpvarid,ctl) 519 if (ierr.ne.NF_NOERR) then 520 stop "Error: Failed reading controle" 521 endif 522 endif 523 endif 524 endif 474 525 else 475 526 ierr=NF_INQ_VARID(infid,"controle",tmpvarid) … … 943 994 ierr=NF_INQ_VARID(infid,"teta",tmpvarid) 944 995 if (ierr.ne.NF_NOERR) then 945 write(*,*) "Error: Failed to get temp, t or teta ID" 946 have_temp=.false. 947 if (ztype.ne.1) stop 996 ierr=NF_INQ_VARID(infid,"temperature",tmpvarid) 997 if (ierr.ne.NF_NOERR) then 998 write(*,*) "Error: Failed to get temp, t, teta or temperature ID" 999 have_temp=.false. 1000 if (ztype.ne.1) stop 1001 endif 948 1002 endif 949 1003 ierr=NF_GET_VAR_REAL(infid,tmpvarid,teta)
Note: See TracChangeset
for help on using the changeset viewer.