Changeset 2257 for trunk


Ignore:
Timestamp:
Mar 12, 2020, 9:00:47 AM (5 years ago)
Author:
emillour
Message:

Mars GCM:
Transparent adaptations to be able to compile using the PGI compiler:

  • look for NaN using logical test a/=a instead of isnan() which is not standard
  • use erf() function as it handles single/double precision (derf is obsolete)

EM

Location:
trunk/LMDZ.MARS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2255 r2257  
    28782878== 10/03/2020 == AB
    28792879Bug fix in topmons_mod : the array rhobarz(ig,l) (density at interlayer levels) had only nlayer allocated instead of nlayer+1 (caused issues in calculating the topdust detrainment at the top of the model)
     2880
     2881== 12/03/2020 == EM
     2882Transparent adaptations to be able to compile using the PGI compiler:
     2883- look for NaN using logical test a/=a instead of isnan() which is not standard
     2884- use erf() function as it handles single/double precision (derf is obsolete)
     2885 
  • trunk/LMDZ.MARS/libf/phymars/co2cloud.F

    r2156 r2257  
    840840                No=Nccnco2*tauscaling(ig)
    841841                Rn=-dlog(riceco2(ig,l))
    842                 n_derf = derf( (rb_cldco2(1)+Rn) *dev2)
     842                n_derf = erf( (rb_cldco2(1)+Rn) *dev2)
    843843                Qext1bins2(ig,l)=0.
    844844                do i = 1, nbinco2_cld
    845845                 n_aer(i) = -0.5 * No * n_derf !! this ith previously computed
    846                  n_derf = derf((rb_cldco2(i+1)+Rn) *dev2)
     846                 n_derf = erf((rb_cldco2(i+1)+Rn) *dev2)
    847847                 n_aer(i) = n_aer(i) + 0.5 * No * n_derf
    848848                 Qext1bins2(ig,l)=Qext1bins2(ig,l)+Qext1bins(i)*n_aer(i)
  • trunk/LMDZ.MARS/libf/phymars/improvedco2clouds_mod.F

    r2156 r2257  
    552552c Ic_rice Mass transfer rate (kg/s) for a rice particle >0 si croissance !
    553553             
    554               if (isnan(Ic_rice) .or. Ic_rice .eq. 0.) then
     554              if ( (Ic_rice.ne.Ic_rice) ! will be true if it is Nan
     555     &               .or. Ic_rice .eq. 0.) then
    555556                 Ic_rice=0.
    556557                 subpdtcloudco2(ig,l)=-sum_subpdt(ig,l)
Note: See TracChangeset for help on using the changeset viewer.