Changeset 2397 for trunk


Ignore:
Timestamp:
Jul 3, 2020, 3:30:08 PM (4 years ago)
Author:
emillour
Message:

Mars GCM:
nirco2abs: handle the (rare) case when input O mixing ratio is negative to avoid
generating NaN heating rates.
EM

Location:
trunk/LMDZ.MARS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2396 r2397  
    31143114CO2 microphysics: correction on improvedco2cloud.F90
    31153115                  sublimation of co2_ice if ccnco2 number < 1
     3116
     3117== 03/07/2020 == EM
     3118nirco2abs: handle the (rare) case when input O mixing ratio is negative to avoid
     3119generating NaN heating rates.
  • trunk/LMDZ.MARS/libf/phymars/nirco2abs.F

    r2240 r2397  
    4848c    ------------------
    4949c
    50 #include "callkeys.h"
    51 #include "nirdata.h"
     50      include "callkeys.h"
     51      include "nirdata.h"
    5252
    5353c-----------------------------------------------------------------------
     
    147147               if(nircorr.eq.1) then
    148148                  cor0=1./(1.+n_p0/pplay(ig,l))**n_b
    149                   if(pq(ig,l,ico2).gt.1.e-6) then
     149                  if(pq(ig,l,ico2).gt.1.e-6) then                   
    150150                     oco2gcm=pq(ig,l,io)/pq(ig,l,ico2)
     151                     ! handle the rare cases when pq(ig,l,io)<0
     152                     if (pq(ig,l,io).lt.0) then
     153                       write(*,*) "nirco2abs: warning ig=",ig," l=",l,
     154     &                            " pq(ig,l,io)=",pq(ig,l,io)
     155                       oco2gcm=1.e6
     156                     endif
    151157                  else
    152158                     oco2gcm=1.e6
     
    229235      END IF
    230236
    231       return
    232237      end
    233238
     
    258263         endif
    259264      enddo
    260       return
    261265      end
Note: See TracChangeset for help on using the changeset viewer.