Ignore:
Timestamp:
Dec 22, 2011, 12:26:02 PM (13 years ago)
Author:
lguez
Message:

Removed two "fi" with no corresponding "if" in "makdim".

In procedure "coefkz", when calculating cloud fraction "zfr", "zq" can
be zero at high altitude. Avoid division by zero, set "zfr" to 0 when
"zq" is 0.

In "physiq", allocatable arrays "tabijgcm", "longcm", "latgcm",
"igcm", "jgcm" cannot be arguments of "phys_output_open" if they have
not been allocated. Allocate them with zero size when
'npCFMIP_param.data' cannot be opened.

Location:
LMDZ5/trunk/libf/phylmd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/coef_diff_turb_mod.F90

    r1067 r1604  
    389389!           calculer la fraction nuageuse (processus humide):
    390390!
    391           zfr = (zq+ratqs*zq-zqs) / (2.0*ratqs*zq)
     391          if (zq /= 0.) then
     392             zfr = (zq+ratqs*zq-zqs) / (2.0*ratqs*zq)
     393          else
     394             zfr = 0.
     395          end if
    392396          zfr = MAX(0.0,MIN(1.0,zfr))
    393397          IF (.NOT.richum) zfr = 0.0
  • LMDZ5/trunk/libf/phylmd/physiq.F

    r1565 r1604  
    12201220      INTEGER :: nbtr_tmp ! Number of tracer inside concvl
    12211221      REAL, dimension(klon,klev) :: sh_in ! Specific humidity entering in phytrac
     1222      integer iostat
    12221223
    12231224cIM for NMC files
     
    15081509      nCFMIP=npCFMIP
    15091510      OPEN(98,file='npCFMIP_param.data',status='old',
    1510      $          form='formatted',err=999)
     1511     $          form='formatted',iostat=iostat)
     1512            if (iostat == 0) then
    15111513      READ(98,*,end=998) nCFMIP
    15121514998   CONTINUE
     
    15401542     $tabijGCM, lonGCM, latGCM, iGCM, jGCM)
    15411543c
    1542 999      CONTINUE
     1544            else
     1545               ALLOCATE(tabijGCM(0))
     1546               ALLOCATE(lonGCM(0), latGCM(0))
     1547               ALLOCATE(iGCM(0), jGCM(0))
     1548            end if
    15431549         ENDIF !debut
    15441550 
Note: See TracChangeset for help on using the changeset viewer.