Ignore:
Timestamp:
Mar 27, 2020, 5:44:49 PM (5 years ago)
Author:
emillour
Message:

Generic GCM:

  • Cleanup OpenMP statements in callcorrk.F90 and also use "call abort_physic" instead of "stop" or "call abort"

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90

    r2254 r2269  
    135135      REAL*8,allocatable,save :: wbari(:,:,:)
    136136      REAL*8,allocatable,save :: wbarv(:,:,:)
     137!$OMP THREADPRIVATE(dtaui,dtauv,cosbv,cosbi,wbari,wbarv)
    137138      REAL*8,allocatable,save :: tauv(:,:,:)
    138139      REAL*8,allocatable,save :: taucumv(:,:,:)
    139140      REAL*8,allocatable,save :: taucumi(:,:,:)
    140 
     141!$OMP THREADPRIVATE(tauv,taucumv,taucumi)
    141142      REAL*8 tauaero(L_LEVELS,naerkind)
    142143      REAL*8 nfluxtopv,nfluxtopi,nfluxtop,fluxtopvdn
     
    158159      real*8,allocatable,save :: taugsurf(:,:)
    159160      real*8,allocatable,save :: taugsurfi(:,:)
     161!$OMP THREADPRIVATE(taugsurf,taugsurfi)
    160162      real*8 qvar(L_LEVELS)   ! Mixing ratio of variable component (mol/mol).
    161163
     
    167169      real*8,save,allocatable ::  QSIAER(:,:,:)
    168170      real*8,save,allocatable ::  GIAER(:,:,:)
    169 
     171!$OMP THREADPRIVATE(QXVAER,QSVAER,GVAER,QXIAER,QSIAER,GIAER)
    170172      real, dimension(:,:,:), save, allocatable :: QREFvis3d
    171173      real, dimension(:,:,:), save, allocatable :: QREFir3d
    172 !$OMP THREADPRIVATE(QXVAER,QSVAER,GVAER,QXIAER,QSIAER,GIAER,QREFvis3d,QREFir3d)
     174!$OMP THREADPRIVATE(QREFvis3d,QREFir3d)
    173175
    174176
     
    177179      character(len=10) :: tmp1
    178180      character(len=10) :: tmp2
     181      character(len=100) :: message
     182      character(len=10),parameter :: subname="callcorrk"
    179183
    180184      ! For fixed water vapour profiles.
     
    224228
    225229         if(naerkind.gt.4)then
    226             print*,'Code not general enough to deal with naerkind > 4 yet.'
    227             call abort
     230            message='Code not general enough to deal with naerkind > 4 yet.'
     231            call abort_physic(subname,message,1)
    228232         endif
    229233         call su_aer_radii(ngrid,nlayer,reffrad,nueffrad)
     
    264268
    265269         if((igcm_h2o_vap.eq.0) .and. varactive)then
    266             print*,'varactive in callcorrk but no h2o_vap tracer.'
    267             stop
     270            message='varactive in callcorrk but no h2o_vap tracer.'
     271            call abort_physic(subname,message,1)
    268272         endif
    269273
     
    279283            ! Test of incompatibility : if global1d is true, there should not be any diurnal cycle.
    280284            if (global1d.and.diurnal) then
    281                print*,'if global1d is true, diurnal must be set to false'
    282                stop
     285               message='if global1d is true, diurnal must be set to false'
     286               call abort_physic(subname,message,1)
    283287            endif
    284288
     
    476480                  do nw=1,L_NSPECTV
    477481                     if(qsvaer(k,nw,iaer).gt.1.05*qxvaer(k,nw,iaer))then
    478                         print*,'Serious problems with qsvaer values'
    479                         print*,'in callcorrk'
    480                         call abort
     482                        message='Serious problems with qsvaer values'
     483                        call abort_physic(subname,message,1)
    481484                     endif
    482485                     if(qsvaer(k,nw,iaer).gt.qxvaer(k,nw,iaer))then
     
    487490                  do nw=1,L_NSPECTI
    488491                     if(qsiaer(k,nw,iaer).gt.1.05*qxiaer(k,nw,iaer))then
    489                         print*,'Serious problems with qsiaer values'
    490                         print*,'in callcorrk'
    491                         call abort
     492                        message='Serious problems with qsvaer values'
     493                        call abort_physic(subname,message,1)
    492494                     endif
    493495                     if(qsiaer(k,nw,iaer).gt.qxiaer(k,nw,iaer))then
     
    602604     
    603605         if(.not.global1d)then ! garde-fou/safeguard added by MT (to be removed in the future)
    604             write(*,*) 'You have to fix mu0, '
    605             write(*,*) 'the cosinus of the solar angle'
    606             stop
     606           message='You have to fix mu0, the cosinus of the solar angle'
     607           call abort_physic(subname,message,1)
    607608         endif
    608609         
     
    632633           
    633634            if(nq.gt.1)then
    634                print*,'Need 1 tracer only to run kcm1d.e'
    635                stop
     635               message='Need 1 tracer only to run kcm1d.e'
     636               call abort_physic(subname,message,1)
    636637            endif
    637638           
     
    648649            qvar(1)=qvar(2)
    649650
    650             print*,'Warning: reducing qvar in callcorrk.'
    651             print*,'Temperature profile no longer consistent ', &
     651            write(*,*)trim(subname),' :Warning: reducing qvar in callcorrk.'
     652            write(*,*)trim(subname),' :Temperature profile no longer consistent ', &
    652653                   'with saturated H2O. qsat=',satval
    653654                   
     
    728729         print*,'Minimum pressure is outside the radiative'
    729730         print*,'transfer kmatrix bounds, exiting.'
    730          call abort
     731         message="Minimum pressure outside of kmatrix bounds"
     732         call abort_physic(subname,message,1)
    731733      elseif(plevrad(L_LEVELS).gt.pgasmax)then
    732734         print*,'Maximum pressure is outside the radiative'
    733735         print*,'transfer kmatrix bounds, exiting.'
    734          call abort
     736         message="Minimum pressure outside of kmatrix bounds"
     737         call abort_physic(subname,message,1)
    735738      endif
    736739
     
    743746            print*,"tgasmin=",tgasmin
    744747            if (strictboundcorrk) then
    745               call abort
     748              message="Minimum temperature outside of kmatrix bounds"
     749              call abort_physic(subname,message,1)
    746750            else
    747751              print*,'***********************************************'
     
    758762            print*,"tgasmax=",tgasmax
    759763            if (strictboundcorrk) then
    760               call abort
     764              message="Maximum temperature outside of kmatrix bounds"
     765              call abort_physic(subname,message,1)
    761766            else
    762767              print*,'***********************************************'
     
    776781            print*,"tgasmin=",tgasmin
    777782            if (strictboundcorrk) then
    778               call abort
     783              message="Minimum temperature outside of kmatrix bounds"
     784              call abort_physic(subname,message,1)
    779785            else
    780786              print*,'***********************************************'
     
    791797            print*,"tgasmax=",tgasmax
    792798            if (strictboundcorrk) then
    793               call abort
     799              message="Maximum temperature outside of kmatrix bounds"
     800              call abort_physic(subname,message,1)
    794801            else
    795802              print*,'***********************************************'
     
    899906            print*,'temp=   ',pt(ig,:)
    900907            print*,'pplay=  ',pplay(ig,:)
    901             call abort
     908            message="Achtung! fluxtop_dn has lost the plot!"
     909            call abort_physic(subname,message,1)
    902910         endif
    903911
Note: See TracChangeset for help on using the changeset viewer.