Changeset 3388 for LMDZ6/trunk


Ignore:
Timestamp:
Sep 10, 2018, 4:19:02 PM (6 years ago)
Author:
Ehouarn Millour
Message:

Small bug fix: variable "error" should only be tested if it has been filled.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/carbon_cycle_mod.F90

    r3387 r3388  
    819819 ENDIF ! planet_type
    820820
    821  IF ((nbcf_in.GT.0) .AND. (.NOT. ALLOCATED(zcfields_in))) ALLOCATE(zcfields_in(klon,nbcf_in),stat=error)
    822         IF (error /= 0)  CALL abort_gcm(modname,'Pb in allocation zcfields_in',1)
    823  IF ((nbcf_out.GT.0) .AND. (.NOT. ALLOCATED(zcfields_out))) ALLOCATE(zcfields_out(klon,nbcf_out),stat=error)
    824         IF (error /= 0)  CALL abort_gcm(modname,'Pb in allocation zcfields_out',1)
     821 IF ((nbcf_in.GT.0) .AND. (.NOT. ALLOCATED(zcfields_in))) THEN
     822    ALLOCATE(zcfields_in(klon,nbcf_in),stat=error)
     823    IF (error /= 0)  CALL abort_gcm(modname,'Pb in allocation zcfields_in',1)
     824 ENDIF
     825 IF ((nbcf_out.GT.0) .AND. (.NOT. ALLOCATED(zcfields_out))) THEN
     826    ALLOCATE(zcfields_out(klon,nbcf_out),stat=error)
     827    IF (error /= 0)  CALL abort_gcm(modname,'Pb in allocation zcfields_out',1)
     828 ENDIF
    825829
    826830END SUBROUTINE infocfields_init
Note: See TracChangeset for help on using the changeset viewer.