Changeset 1217


Ignore:
Timestamp:
Apr 3, 2014, 12:52:48 PM (11 years ago)
Author:
milmd
Message:

Bug fix for when there is zero tracer.
MI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/iostart.F90

    r1216 r1217  
    528528      ENDIF
    529529     
    530       ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",nqtot,idim5)
    531       IF (ierr/=NF90_NOERR) THEN
    532         write(*,*)'open_restartphy: problem defining number_of_advected_fields dimension '
    533         write(*,*)trim(nf90_strerror(ierr))
    534         CALL ABORT
    535       ENDIF
     530      if (nqtot>0) then
     531        ! only define a tracer dimension if there are tracers
     532        ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",nqtot,idim5)
     533        IF (ierr/=NF90_NOERR) THEN
     534          write(*,*)'open_restartphy: problem defining number_of_advected_fields dimension '
     535          write(*,*)trim(nf90_strerror(ierr))
     536          CALL ABORT
     537        ENDIF
     538      endif
    536539
    537540      ierr=NF90_DEF_DIM(nid_restart,"nlayer",klev,idim6)
Note: See TracChangeset for help on using the changeset viewer.