Ignore:
Timestamp:
Jan 18, 2022, 4:17:25 PM (3 years ago)
Author:
romain.vande
Message:

LMDZ_MARS RV : Open_MP;
Put all the "save" variables as "!$OMP THREADPRIVATE" in aeronomars

Location:
trunk/LMDZ.MARS/libf/aeronomars
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/aeronomars/chemthermos.F90

    r2042 r2615  
    5555      logical,save :: firstcall=.true.
    5656
     57!$OMP THREADPRIVATE(nesptherm,firstcall)
     58
    5759! Tracer indexes in the GCM:
    5860      integer,save :: g_co2=0
     
    8486      integer,save :: g_hco2plus=0
    8587      integer,save :: g_elec=0
     88
     89!$OMP THREADPRIVATE(g_co2,g_co,g_o,g_o1d,g_o2,g_o3,g_h,g_h2,g_oh,g_ho2,g_h2o2,g_n2,g_h2o_vap)
     90!$OMP THREADPRIVATE(g_n,g_no,g_no2,g_n2d,g_co2plus,g_oplus,g_o2plus,g_coplus,g_cplus,g_nplus,g_noplus,g_n2plus,g_hplus,g_hco2plus,g_elec)
    8691     
    8792! Tracer indexes in the thermospheric chemistry:
  • trunk/LMDZ.MARS/libf/aeronomars/concentrations.F

    r2158 r2615  
    5454      logical, save :: firstcall = .true.
    5555
     56!$OMP THREADPRIVATE(nbq,niq,aki,cpi,firstcall)
     57
    5658      if (firstcall) then
    5759
  • trunk/LMDZ.MARS/libf/aeronomars/conduction.F

    r1266 r2615  
    5858     
    5959      logical,save :: firstcall=.true.
     60
     61!$OMP THREADPRIVATE(phitop,firstcall)
    6062
    6163c-----------------------------------------------------------------------
  • trunk/LMDZ.MARS/libf/aeronomars/euvheat.F90

    r2042 r2615  
    5656      integer,save :: nespeuv    ! Number of species considered
    5757
     58!$OMP THREADPRIVATE(nespeuv)
     59
    5860      INTEGER :: l,ig,n
    5961      integer,save :: euvmod
    6062      real, allocatable, save :: rm(:,:)   ! number density (cm-3)
     63
     64!$OMP THREADPRIVATE(euvmod,rm)
     65
    6166      real :: zq(ngrid,nlayer,nq) ! local updated tracer quantity
    6267      real :: zt(ngrid,nlayer)      ! local updated atmospheric temperature
     
    126131      integer,save :: g_n2d=0
    127132
     133!$OMP THREADPRIVATE(g_co2,g_o,g_o2,g_h2,g_h2o2,g_h2o,g_o3,g_n2,g_n,g_no,g_co,g_h,g_no2,g_oh,g_ho2,g_o1d,g_n2d)
    128134
    129135      logical,save :: firstcall=.true.
     136
     137!$OMP THREADPRIVATE(firstcall)
    130138
    131139! Initializations and sanity checks:
     
    416424         call hrtherm (ig,nlayer,euvmod,rm,nespeuv,tx,zlocal,zenit,zday,jtot)
    417425
     426
     427
    418428!        euveff=0.16    !UV heating efficiency. Following Fox et al. ASR 1996
    419429                       !should vary between 19% and 23%. Lower values
  • trunk/LMDZ.MARS/libf/aeronomars/hrtherm.F

    r2042 r2615  
    8080         dn='d'
    8181      end if
     82
    8283      if(dn.eq.'n') then
    8384        do i=1,nlayer                                   
  • trunk/LMDZ.MARS/libf/aeronomars/iono_h.F90

    r2158 r2615  
    4848      real*8,save,allocatable ::   tauhplus(:,:)
    4949      real*8,save,allocatable ::   tauhco2plus(:,:)
     50
     51!$OMP THREADPRIVATE(o1d_eq,ho2_eq,oh_eq,h_eq,n2d_eq,no2_eq,o3_eq,no_eq,cplus_eq,coplus_eq,oplus_eq)
     52!$OMP THREADPRIVATE(n2plus_eq,hplus_eq,co2plus_eq,o2plus_eq,noplus_eq,nplus_eq,hco2plus_eq,tauco2,tauo2,tauo3p,tauco,tauh,tauoh,tauho2,tauh2)
     53!$OMP THREADPRIVATE(tauh2o,tauo1d,tauh2o2,tauo3,taun,tauno,taun2,taun2d,tauno2,tauco2plus,tauoplus,tauo2plus,taucoplus,taucplus,taunplus,taunoplus,taun2plus,tauhplus,tauhco2plus)
    5054
    5155      CONTAINS
  • trunk/LMDZ.MARS/libf/aeronomars/jthermcalc_e107.F

    r2429 r2615  
    224224      call interfast
    225225     $     (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup)
     226     
    226227      do i=1,nlayer
    227228         ind=auxind(i)
     
    314315          call interfast(wm,wp,auxind,auxcolinp,nlayer,
    315316     $        auxcoltab,nz2,limdown,limup)
     317
    316318          do i=1,nlayer
    317319             ind=auxind(i)
     
    428430      call interfast
    429431     $     (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup)
     432
    430433      do i=1,nlayer
    431434         ind=auxind(i)
     
    518521         call interfast
    519522     $     (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup)
     523
    520524         !Correction to include T variation of CO2 cross section
    521525         if(indexint.eq.24) then
     
    631635         call interfast
    632636     $     (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup)
     637
    633638         do i=1,nlayer
    634639            ind=auxind(i)
     
    738743         call interfast
    739744     $     (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup)
     745
    740746         do i=1,nlayer
    741747            ind=auxind(i)
     
    835841      call interfast
    836842     $     (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup)
     843
    837844      do i=1,nlayer
    838845         ind=auxind(i)
     
    919926      call interfast
    920927     $     (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup)
     928
    921929      do i=1,nlayer
    922930         ind=auxind(i)
     
    980988      call interfast
    981989     $     (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup)
     990
    982991      do i=1,nlayer
    983992         ind=auxind(i)
     
    10411050      call interfast
    10421051     $     (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup)
     1052
    10431053      do i=1,nlayer
    10441054         ind=auxind(i)
     
    10951105      call interfast
    10961106     $     (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup)
     1107
    10971108      do i=1,nlayer
    10981109         ind=auxind(i)
  • trunk/LMDZ.MARS/libf/aeronomars/moldiff.F

    r1266 r2615  
    102102      real abfac(ncompmoldiff)
    103103      real,save :: dij(ncompmoldiff,ncompmoldiff)
     104
     105!$OMP THREADPRIVATE(g_co2,g_co,g_o,g_o1d,g_o2,g_o3,g_h,g_h2)
     106!$OMP THREADPRIVATE(g_oh,g_ho2,g_h2o2,g_n2,g_ar,g_h2o,gcmind)
     107!$OMP THREADPRIVATE(firstcall,dij)
    104108
    105109! Initializations at first call
  • trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff.F

    r2030 r2615  
    6363      integer,save :: g_h2o=0
    6464
     65!$OMP THREADPRIVATE(g_co2,g_co,g_o,g_o1d,g_o2,g_o3,g_h,g_h2,g_oh)
     66!$OMP THREADPRIVATE(g_ho2,g_h2o2,g_n2,g_ar,g_h2o)
     67
    6568      integer,save :: gcmind(ncompmoldiff)
    6669
    6770      real dnh
    6871      logical,save :: firstcall=.true.
     72
     73!$OMP THREADPRIVATE(gcmind,firstcall)
    6974
    7075! Initializations at first call (and some sanity checks)
  • trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff_red.F

    r2030 r2615  
    8282      real dnh
    8383      logical,save :: firstcall=.true.
     84
     85!$OMP THREADPRIVATE(firstcall)
     86
    8487      logical,parameter :: outputcoeffs=.false. ! to output 'coeffs.dat' file,
    8588                                                ! set outputcoeffs=.true.
  • trunk/LMDZ.MARS/libf/aeronomars/molvis.F

    r1266 r2615  
    7070     
    7171      logical,save :: firstcall=.true.
     72
     73!$OMP THREADPRIVATE(firstcall)
    7274
    7375c-----------------------------------------------------------------------
  • trunk/LMDZ.MARS/libf/aeronomars/param_v4_h.F90

    r1888 r2615  
    6565   REAL,SAVE,ALLOCATABLE :: jdistot_b(:,:)
    6666   REAL,SAVE,ALLOCATABLE :: jion(:,:,:)
     67
     68!$OMP THREADPRIVATE(jfotsout,jdistot,jdistot_b,jion)
    6769
    6870   REAL*8,SAVE,ALLOCATABLE :: Pco2(:,:)
     
    205207   REAL*8,SAVE,ALLOCATABLE :: tminhplus(:)
    206208   REAL*8,SAVE,ALLOCATABLE :: tminhco2plus(:)
     209
     210!$OMP THREADPRIVATE(Pco2,Po2,Po3p,Pco,Ph,Poh,Pho2,Ph2,Ph2o,Po1d,Ph2o2,Po3,Pn,Pno,Pno2,Pn2,Pn2d,Pco2plus,Poplus,Po2plus,Pelect,Pcoplus,Pcplus,Pnplus,Pnoplus,Pn2plus,Phplus,Phco2plus,Pco2tot,Po2tot,Po3ptot,Pcotot)
     211!$OMP THREADPRIVATE(Phtot,Pohtot,Pho2tot,Ph2tot,Ph2otot,Po1dtot,Ph2o2tot,Po3tot,Pntot,Pnotot,Pno2tot,Pn2tot,Pn2dtot,Pco2plustot,Poplustot,Po2plustot,Pelecttot,Pcoplustot,Pcplustot,Pnplustot,Pnoplustot,Pn2plustot)
     212!$OMP THREADPRIVATE(Phplustot,Phco2plustot,Lco2,Lo2,Lo3p,Lco,Lh,Loh,Lho2,Lh2,Lh2o,Lo1d,Lh2o2,Lo3,Ln,Lno,Lno2,Ln2,Ln2d, Lco2plus,Loplus,Lo2plus,Lelect,Lcoplus,Lcplus,Lnplus,Lnoplus,Ln2plus,Lhplus,Lhco2plus,Lco2tot)
     213!$OMP THREADPRIVATE(Lo2tot,Lo3ptot,Lcotot,Lhtot,Lohtot,Lho2tot,Lh2tot,Lh2otot,Lo1dtot,Lh2o2tot,Lo3tot,Lntot,Lnotot,Lno2tot,Ln2tot,Ln2dtot,Lco2plustot,Loplustot,Lo2plustot,Lelecttot,Lcoplustot,Lcplustot,Lnplustot)
     214!$OMP THREADPRIVATE(Lnoplustot,Ln2plustot,Lhplustot,Lhco2plustot,tminco2,tmino2,tmino3p,tminco,tminh,tminoh,tminho2,tminh2,tminh2o,tmino1d,tminh2o2,tmino3,tminn,tminno,tminno2,tminn2,tminn2d,tminco2plus,tminoplus)
     215!$OMP THREADPRIVATE(tmino2plus,tmincoplus,tmincplus,tminnplus,tminnoplus,tminn2plus,tminhplus,tminhco2plus)
    207216
    208217   CONTAINS
  • trunk/LMDZ.MARS/libf/aeronomars/paramfoto_compact.F

    r2151 r2615  
    29452945      logical firstcall
    29462946      save firstcall
     2947
     2948!$OMP THREADPRIVATE(firstcall)
     2949
    29472950      data firstcall /.true./
    29482951
  • trunk/LMDZ.MARS/libf/aeronomars/perosat.F

    r2311 r2615  
    5454      REAL psat_hpa                    ! pression saturante (hPa)
    5555      logical,save :: firstcall=.true.
     56
     57!$OMP THREADPRIVATE(firstcall)
    5658
    5759c     Pour diagnostique :
  • trunk/LMDZ.MARS/libf/aeronomars/photochemistry.F90

    r2554 r2615  
    8989integer :: lswitch
    9090logical, save :: firstcall = .true.
     91
     92!$OMP THREADPRIVATE(firstcall)
     93
    9194logical :: jionos                ! switch for J parameterization
    9295
     
    133136integer,save      :: i_do2      = 0
    134137integer,save      :: i_hdo2     = 0
     138
     139!$OMP THREADPRIVATE(i_co2plus,i_oplus,i_o2plus,i_noplus,i_coplus,i_cplus,i_n2plus,i_nplus,i_hplus ,i_hco2plus,i_hcoplus,i_h2oplus,i_h3oplus,i_ohplus,i_elec,i_hdo,i_od,i_d,i_hd,i_do2,i_hdo2)
    135140
    136141!integer,parameter :: i_co2plus = 18
     
    39153920      integer      :: l, iesp
    39163921      logical,save :: firstcall = .true.
     3922
     3923!$OMP THREADPRIVATE(firstcall)
    39173924     
    39183925!     first call initializations
  • trunk/LMDZ.MARS/libf/aeronomars/photolysis_online.F

    r2489 r2615  
    979979
    980980      logical, save :: delta = .true.
     981
     982!$OMP THREADPRIVATE(delta)
    981983
    982984!_______________________________________________________________________
  • trunk/LMDZ.MARS/libf/aeronomars/surfacearea.F

    r2563 r2615  
    5656
    5757      logical, save :: firstcall = .true.
     58
     59!$OMP THREADPRIVATE(factor_ice, factor_dust,firstcall)
    5860
    5961!==========================================================================
  • trunk/LMDZ.MARS/libf/aeronomars/thermosphere.F

    r2467 r2615  
    3939      INTEGER :: l,ig
    4040      logical,save :: firstcall=.true.
     41
     42!$OMP THREADPRIVATE(firstcall)
    4143
    4244      if (firstcall) then
  • trunk/LMDZ.MARS/libf/aeronomars/types_asis.F90

    r1495 r2615  
    3131type(z4spec), allocatable, save :: indice_4(:)
    3232
     33!$OMP THREADPRIVATE(indice_phot,indice_3,indice_4)
     34
    3335end module types_asis
Note: See TracChangeset for help on using the changeset viewer.