Ignore:
Timestamp:
Aug 30, 2013, 11:28:18 AM (11 years ago)
Author:
emillour
Message:

Common dynamics: Minor correction in sortvarc.F (to handle cases when initial condition is generated via iniacademic) and addition of the possibility to run a given number of dynamical steps (ndynstep=...), as it is already implemented in the Mars GCM.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/dyn3d/sortvarc.F

    r130 r1022  
    154154      END IF
    155155
    156       etot= etot/etot0
     156      ! compute relative changes in etot,... (except if 'reference' values
     157      ! are zero, which can happen when using iniacademic)
     158      if (etot0.ne.0) then
     159        etot= etot/etot0
     160      else
     161        etot=1.
     162      endif
    157163      rmsv= SQRT(rmsv/ptot)
    158       ptot= ptot/ptot0
    159       ztot= ztot/ztot0
    160       stot= stot/stot0
    161       ang = ang /ang0
     164      if (ptot0.ne.0) then
     165        ptot= ptot/ptot0
     166      else
     167        ptot=1.
     168      endif
     169      if (ztot0.ne.0) then
     170        ztot= ztot/ztot0
     171      else
     172        ztot=1.
     173      endif
     174      if (stot0.ne.0) then
     175        stot= stot/stot0
     176      else
     177        stot=1.
     178      endif
     179      if (ang0.ne.0) then
     180        ang = ang /ang0
     181      else
     182        ang=1.
     183      endif
    162184
    163185      firstcal = .false.
Note: See TracChangeset for help on using the changeset viewer.