Ignore:
Timestamp:
Aug 17, 2006, 5:41:51 PM (18 years ago)
Author:
Laurent Fairhead
Message:

Inclusion des modifs de Y. Meurdesoif pour la version V3
LF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/V3_test/libf/phylmd/radlwsw.F

    r699 r704  
    1616     .                  cldtaupi, topswai, solswai)
    1717c     
     18      USE dimphy
    1819      IMPLICIT none
    1920c======================================================================
     
    6970     
    7071c======================================================================
    71 #include "dimensions.h"
    72 #include "dimphy.h"
    73 #include "raddim.h"
     72cym#include "dimensions.h"
     73cym#include "dimphy.h"
     74cym#include "raddim.h"
    7475#include "YOETHF.h"
    7576c
     
    403404     S              PTOPSWAD,PSOLSWAD,PTOPSWAI,PSOLSWAI,
    404405     J              ok_ade, ok_aie )
    405      
     406      USE dimphy     
    406407      IMPLICIT none
    407408
    408 #include "dimensions.h"
    409 #include "dimphy.h"
    410 #include "raddim.h"
     409cym#include "dimensions.h"
     410cym#include "dimphy.h"
     411cym#include "raddim.h"
    411412#include "YOMCST.h"
    412413C
     
    509510      DATA itapsw /0/
    510511      DATA appel1er /.TRUE./
     512      SAVE itapsw,appel1er
     513c$OMP THREADPRIVATE(appel1er)
     514c$OMP THREADPRIVATE(itapsw)
    511515cjq-Introduced for aerosol forcings
    512516      real*8 flag_aer
     
    522526      REAL*8 PSOLSWAI(KDLON)     ! SHORTWAVE FLUX AT SURFACE(+AEROSOL IND)
    523527cjq - Fluxes including aerosol effects
    524       REAL*8 ZFSUPAD(KDLON,KFLEV+1)
    525       REAL*8 ZFSDNAD(KDLON,KFLEV+1)
    526       REAL*8 ZFSUPAI(KDLON,KFLEV+1)
    527       REAL*8 ZFSDNAI(KDLON,KFLEV+1)
     528      REAL*8,allocatable,save :: ZFSUPAD(:,:)
     529c$OMP THREADPRIVATE(ZFSUPAD)
     530      REAL*8,allocatable,save :: ZFSDNAD(:,:)
     531c$OMP THREADPRIVATE(ZFSDNAD)
     532      REAL*8,allocatable,save :: ZFSUPAI(:,:)
     533c$OMP THREADPRIVATE(ZFSUPAI)
     534      REAL*8,allocatable,save :: ZFSDNAI(:,:)
     535c$OMP THREADPRIVATE(ZFSDNAI)
    528536      logical initialized
    529       SAVE ZFSUPAD, ZFSDNAD, ZFSUPAI, ZFSDNAI ! aerosol fluxes
     537cym      SAVE ZFSUPAD, ZFSDNAD, ZFSUPAI, ZFSDNAI ! aerosol fluxes
    530538!rv
    531539      save flag_aer
     540c$OMP THREADPRIVATE(flag_aer)
    532541      data initialized/.false./
     542      save initialized
     543c$OMP THREADPRIVATE(initialized)
    533544cjq-end
    534545      if(.not.initialized) then
    535546        flag_aer=0.
    536547        initialized=.TRUE.
     548        allocate(ZFSUPAD(KDLON,KFLEV+1))
     549        allocate(ZFSDNAD(KDLON,KFLEV+1))
     550        allocate(ZFSUPAI(KDLON,KFLEV+1))
     551        allocate(ZFSDNAI(KDLON,KFLEV+1))
     552        ZFSUPAD(:,:)=0.
     553        ZFSDNAD(:,:)=0.
     554        ZFSUPAI(:,:)=0.
     555        ZFSDNAI(:,:)=0.
     556       
    537557      endif
    538558!rv
     
    710730     S                PTAVE,PWV,PAKI,PCLD,PCLEAR,PDSIG,PFACT,
    711731     S                PRMU,PSEC,PUD)
     732      USE dimphy
    712733      IMPLICIT none
    713 #include "dimensions.h"
    714 #include "dimphy.h"
    715 #include "raddim.h"
     734cym#include "dimensions.h"
     735cym#include "dimphy.h"
     736cym#include "raddim.h"
    716737#include "radepsi.h"
    717738#include "radopt.h"
     
    761782      REAL*8 ZPDH2O,ZPDUMG
    762783      SAVE ZPDH2O,ZPDUMG
     784c$OMP THREADPRIVATE(ZPDH2O,ZPDUMG)
    763785      REAL*8 ZPRH2O,ZPRUMG
    764786      SAVE ZPRH2O,ZPRUMG
     787c$OMP THREADPRIVATE(ZPRH2O,ZPRUMG)
    765788      REAL*8 RTDH2O,RTDUMG
    766789      SAVE RTDH2O,RTDUMG
     790c$OMP THREADPRIVATE(RTDH2O,RTDUMG)
    767791      REAL*8 RTH2O ,RTUMG
    768792      SAVE RTH2O ,RTUMG
     793c$OMP THREADPRIVATE(RTH2O ,RTUMG)
    769794      DATA ZPDH2O,ZPDUMG / 0.8   , 0.75 /
    770795      DATA ZPRH2O,ZPRUMG / 30000., 30000. /
     
    900925     S  ,  PDSIG , POMEGA, POZ  , PRMU , PSEC , PTAU  , PUD 
    901926     S  ,  PFD   , PFU)
     927      USE dimphy
    902928      IMPLICIT none
    903 #include "dimensions.h"
    904 #include "dimphy.h"
    905 #include "raddim.h"
     929cym#include "dimensions.h"
     930cym#include "dimphy.h"
     931cym#include "raddim.h"
    906932C
    907933C     ------------------------------------------------------------------
     
    9911017      REAL*8 RSUN(2)
    9921018      SAVE RSUN
     1019c$OMP THREADPRIVATE(RSUN)
    9931020      REAL*8 RRAY(2,6)
    9941021      SAVE RRAY
     1022c$OMP THREADPRIVATE(RRAY)
    9951023      DATA RSUN(1) / 0.441676 /
    9961024      DATA RSUN(2) / 0.558324 /
     
    11401168     S  ,  PUD   ,PWV , PQS
    11411169     S  ,  PFDOWN,PFUP                                            )
     1170      USE dimphy
    11421171      IMPLICIT none
    1143 #include "dimensions.h"
    1144 #include "dimphy.h"
    1145 #include "raddim.h"
     1172cym#include "dimensions.h"
     1173cym#include "dimphy.h"
     1174cym#include "raddim.h"
    11461175#include "radepsi.h"
    11471176C
     
    12641293      REAL*8 RSUN(2)
    12651294      SAVE RSUN
     1295c$OMP THREADPRIVATE(RSUN)
    12661296      REAL*8 RRAY(2,6)
    12671297      SAVE RRAY
     1298c$OMP THREADPRIVATE(RRAY)
    12681299      DATA RSUN(1) / 0.441676 /
    12691300      DATA RSUN(2) / 0.558324 /
     
    16861717     S  , PCGAZ , PPIZAZ, PRAY1 , PRAY2 , PREFZ , PRJ 
    16871718     S  , PRK   , PRMU0 , PTAUAZ, PTRA1 , PTRA2                   )
     1719      USE dimphy
    16881720      IMPLICIT none
    1689 #include "dimensions.h"
    1690 #include "dimphy.h"
    1691 #include "raddim.h"
     1721cym#include "dimensions.h"
     1722cym#include "dimphy.h"
     1723cym#include "raddim.h"
    16921724#include "radepsi.h"
    16931725#include "radopt.h"
     
    17591791      REAL*8 TAUA(2,5), RPIZA(2,5), RCGA(2,5)
    17601792      SAVE TAUA, RPIZA, RCGA
     1793c$OMP THREADPRIVATE(TAUA, RPIZA, RCGA)
    17611794      DATA ((TAUA(IN,JA),JA=1,5),IN=1,2) /
    17621795     S .730719, .912819, .725059, .745405, .682188 ,
     
    20462079     S  , PCGAZ , PPIZAZ, PRAY1, PRAY2, PREFZ , PRJ  , PRK , PRMUE
    20472080     S  , PTAUAZ, PTRA1 , PTRA2 )
     2081      USE dimphy
    20482082      IMPLICIT none
    2049 #include "dimensions.h"
    2050 #include "dimphy.h"
    2051 #include "raddim.h"
     2083cym#include "dimensions.h"
     2084cym#include "dimphy.h"
     2085cym#include "raddim.h"
    20522086#include "radepsi.h"
    20532087#include "radopt.h"
     
    24022436      SUBROUTINE SWDE (PGG,PREF,PRMUZ,PTO1,PW,
    24032437     S                 PRE1,PRE2,PTR1,PTR2)
     2438      USE dimphy
    24042439      IMPLICIT none
    2405 #include "dimensions.h"
    2406 #include "dimphy.h"
    2407 #include "raddim.h"
     2440cym#include "dimensions.h"
     2441cym#include "dimphy.h"
     2442cym#include "raddim.h"
    24082443C
    24092444C     ------------------------------------------------------------------
     
    25332568      END
    25342569      SUBROUTINE SWTT (KNU,KA,PU,PTR)
     2570      USE dimphy
    25352571      IMPLICIT none
    2536 #include "dimensions.h"
    2537 #include "dimphy.h"
    2538 #include "raddim.h"
     2572cym#include "dimensions.h"
     2573cym#include "dimphy.h"
     2574cym#include "raddim.h"
    25392575C
    25402576C-----------------------------------------------------------------------
     
    25832619      REAL*8 APAD(2,3,7), BPAD(2,3,7), D(2,3)
    25842620      SAVE APAD, BPAD, D
     2621c$OMP THREADPRIVATE(APAD, BPAD, D)
    25852622      DATA ((APAD(1,I,J),I=1,3),J=1,7) /
    25862623     S 0.912418292E+05, 0.000000000E-00, 0.925887084E-04,
     
    26492686      END
    26502687      SUBROUTINE SWTT1(KNU,KABS,KIND, PU, PTR)
     2688      USE dimphy
    26512689      IMPLICIT none
    2652 #include "dimensions.h"
    2653 #include "dimphy.h"
    2654 #include "raddim.h"
     2690cym#include "dimensions.h"
     2691cym#include "dimphy.h"
     2692cym#include "raddim.h"
    26552693C
    26562694C-----------------------------------------------------------------------
     
    27012739      REAL*8 APAD(2,3,7), BPAD(2,3,7), D(2,3)
    27022740      SAVE APAD, BPAD, D
     2741c$OMP THREADPRIVATE(APAD, BPAD, D)
    27032742      DATA ((APAD(1,I,J),I=1,3),J=1,7) /
    27042743     S 0.912418292E+05, 0.000000000E-00, 0.925887084E-04,
     
    27782817     .              PTOPLW,PSOLLW,PTOPLW0,PSOLLW0,
    27792818     .              psollwdown,
     2819cIM  .              psollwdown,psollwdownclr,
     2820cIM  .              ptoplwdown,ptoplwdownclr)
    27802821     .              plwup, plwdn, plwup0, plwdn0)
     2822      USE dimphy
    27812823      IMPLICIT none
    2782 #include "dimensions.h"
    2783 #include "dimphy.h"
    2784 #include "raddim.h"
     2824cym#include "dimensions.h"
     2825cym#include "dimphy.h"
     2826cym#include "raddim.h"
    27852827#include "raddimlw.h"
    27862828#include "YOMCST.h"
     
    28442886c Rajout LF
    28452887      real*8 psollwdown(kdlon)    ! LONGWAVE downwards flux at surface
     2888c Rajout IM
     2889cIM   real*8 psollwdownclr(kdlon) ! LONGWAVE CS downwards flux at surface
     2890cIM   real*8 ptoplwdown(kdlon)    ! LONGWAVE downwards flux at T.O.A.
     2891cIM   real*8 ptoplwdownclr(kdlon) ! LONGWAVE CS downwards flux at T.O.A.
    28462892cIM
    28472893      REAL*8 plwup(KDLON,KFLEV+1)  ! LW up total sky
     
    28532899      REAL*8 ZOZ(KDLON,KFLEV)
    28542900c
    2855       REAL*8 ZFLUX(KDLON,2,KFLEV+1) ! RADIATIVE FLUXES (1:up; 2:down)
    2856       REAL*8 ZFLUC(KDLON,2,KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES
    2857       REAL*8 ZBINT(KDLON,KFLEV+1)            ! Intermediate variable
    2858       REAL*8 ZBSUI(KDLON)                    ! Intermediate variable
    2859       REAL*8 ZCTS(KDLON,KFLEV)               ! Intermediate variable
    2860       REAL*8 ZCNTRB(KDLON,KFLEV+1,KFLEV+1)   ! Intermediate variable
    2861       SAVE ZFLUX, ZFLUC, ZBINT, ZBSUI, ZCTS, ZCNTRB
     2901cym      REAL*8 ZFLUX(KDLON,2,KFLEV+1) ! RADIATIVE FLUXES (1:up; 2:down)
     2902cym      REAL*8 ZFLUC(KDLON,2,KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES
     2903cym      REAL*8 ZBINT(KDLON,KFLEV+1)            ! Intermediate variable
     2904cym      REAL*8 ZBSUI(KDLON)                    ! Intermediate variable
     2905cym      REAL*8,ZCTS(KDLON,KFLEV)               ! Intermediate variable
     2906cym      REAL*8 ZCNTRB(KDLON,KFLEV+1,KFLEV+1)   ! Intermediate variable
     2907cym      SAVE ZFLUX, ZFLUC, ZBINT, ZBSUI, ZCTS, ZCNTRB
     2908      REAL*8,allocatable,save :: ZFLUX(:,:,:) ! RADIATIVE FLUXES (1:up; 2:down)
     2909      REAL*8,allocatable,save :: ZFLUC(:,:,:) ! CLEAR-SKY RADIATIVE FLUXES
     2910      REAL*8,allocatable,save :: ZBINT(:,:)            ! Intermediate variable
     2911      REAL*8,allocatable,save :: ZBSUI(:)                    ! Intermediate variable
     2912      REAL*8,allocatable,save :: ZCTS(:,:)               ! Intermediate variable
     2913      REAL*8,allocatable,save :: ZCNTRB(:,:,:)   ! Intermediate variable
     2914c$OMP THREADPRIVATE(ZFLUX, ZFLUC, ZBINT, ZBSUI, ZCTS, ZCNTRB)
    28622915c
    28632916      INTEGER ilim, i, k, kpl1
     
    28712924      LOGICAL appel1er
    28722925      SAVE appel1er, itaplw0, itaplw
     2926c$OMP THREADPRIVATE(appel1er, itaplw0, itaplw)
    28732927      DATA appel1er /.TRUE./
    28742928      DATA itaplw0,itaplw /0,0/
     2929
    28752930C     ------------------------------------------------------------------
    28762931      IF (appel1er) THEN
     
    28782933         PRINT*, "LW cloudy-sky calling frequency: ", lwpas
    28792934         PRINT*, "   In general, they should be 1"
     2935cym
     2936         allocate(ZFLUX(KDLON,2,KFLEV+1) )
     2937         allocate(ZFLUC(KDLON,2,KFLEV+1) )
     2938         allocate(ZBINT(KDLON,KFLEV+1))
     2939         allocate(ZBSUI(KDLON))
     2940         allocate(ZCTS(KDLON,KFLEV))
     2941         allocate(ZCNTRB(KDLON,KFLEV+1,KFLEV+1))
    28802942         appel1er=.FALSE.
    28812943      ENDIF
     
    29403002     S               PAER,PDP,PPMB,PPSOL,POZ,PTAVE,PVIEW,PWV,
    29413003     S               PABCU)
     3004      USE dimphy
    29423005      IMPLICIT none
    2943 #include "dimensions.h"
    2944 #include "dimphy.h"
    2945 #include "raddim.h"
     3006cym#include "dimensions.h"
     3007cym#include "dimphy.h"
     3008cym#include "raddim.h"
    29463009#include "raddimlw.h"
    29473010#include "YOMCST.h"
     
    30383101      REAL*8 TREF
    30393102      SAVE TREF
     3103c$OMP THREADPRIVATE(TREF)
    30403104      REAL*8 RT1(2)
    30413105      SAVE RT1
     3106c$OMP THREADPRIVATE(RT1)
    30423107      REAL*8 RAER(5,5)
    30433108      SAVE RAER
     3109c$OMP THREADPRIVATE(RAER)
    30443110      REAL*8 AT(8,3), BT(8,3)
    30453111      SAVE AT, BT
     3112c$OMP THREADPRIVATE(AT, BT)
    30463113      REAL*8 OCT(4)
    30473114      SAVE OCT
     3115c$OMP THREADPRIVATE(OCT)
    30483116      DATA TREF /250.0/
    30493117      DATA (RT1(IG1),IG1=1,2) / -0.577350269, +0.577350269 /
     
    33333401      SUBROUTINE LWBV(KLIM,PDP,PDT0,PEMIS,PPMB,PTL,PTAVE,PABCU,
    33343402     S                PFLUC,PBINT,PBSUI,PCTS,PCNTRB)
     3403      USE dimphy
    33353404      IMPLICIT none
    3336 #include "dimensions.h"
    3337 #include "dimphy.h"
    3338 #include "raddim.h"
     3405cym#include "dimensions.h"
     3406cym#include "dimphy.h"
     3407cym#include "raddim.h"
    33393408#include "raddimlw.h"
    33403409#include "YOMCST.h"
     
    34243493     R               PBINT,PBSUIN,PCTS,PCNTRB,
    34253494     S               PFLUX)
     3495      USE dimphy
    34263496      IMPLICIT none
    3427 #include "dimensions.h"
    3428 #include "dimphy.h"
    3429 #include "raddim.h"
     3497cym#include "dimensions.h"
     3498cym#include "dimphy.h"
     3499cym#include "raddim.h"
    34303500#include "radepsi.h"
    34313501#include "radopt.h"
     
    38293899     S  , PB,PBINT,PBSUIN,PBSUR,PBTOP,PDBSL
    38303900     S  , PGA,PGB,PGASUR,PGBSUR,PGATOP,PGBTOP)
     3901      USE dimphy
    38313902      IMPLICIT none
    3832 #include "dimensions.h"
    3833 #include "dimphy.h"
    3834 #include "raddim.h"
     3903cym#include "dimensions.h"
     3904cym#include "dimphy.h"
     3905cym#include "raddim.h"
    38353906#include "raddimlw.h"
    38363907C
     
    39253996      REAL*8 TINTP(11)
    39263997      SAVE TINTP
     3998c$OMP THREADPRIVATE(TINTP)
    39273999      REAL*8 GA(11,16,3), GB(11,16,3)
    39284000      SAVE GA, GB
     4001c$OMP THREADPRIVATE(GA, GB)
    39294002      REAL*8 XP(6,6)
    39304003      SAVE XP
     4004c$OMP THREADPRIVATE(XP)
    39314005c
    39324006      DATA TINTP / 187.5, 200., 212.5, 225., 237.5, 250.,
     
    52405314     R  , PGA,PGB,PGASUR,PGBSUR,PGATOP,PGBTOP
    52415315     S  , PCNTRB,PCTS,PFLUC)
     5316       USE dimphy
    52425317      IMPLICIT none
    5243 #include "dimensions.h"
    5244 #include "dimphy.h"
    5245 #include "raddim.h"
     5318cym#include "dimensions.h"
     5319cym#include "dimphy.h"
     5320cym#include "raddim.h"
    52465321#include "raddimlw.h"
    52475322#include "YOMCST.h"
     
    53535428     R  , PGA,PGB,PGASUR,PGBSUR,PGATOP,PGBTOP
    53545429     S  , PCTS,PFLUC)
     5430       USE dimphy
    53555431      IMPLICIT none
    5356 #include "dimensions.h"
    5357 #include "dimphy.h"
    5358 #include "raddim.h"
     5432cym#include "dimensions.h"
     5433cym#include "dimphy.h"
     5434cym#include "raddim.h"
    53595435#include "raddimlw.h"
    53605436#include "radopt.h"
     
    56855761     R  , PGA,PGB
    56865762     S  , PCNTRB,PDISD,PDISU)
     5763      USE dimphy
    56875764      IMPLICIT none
    5688 #include "dimensions.h"
    5689 #include "dimphy.h"
    5690 #include "raddim.h"
     5765cym#include "dimensions.h"
     5766cym#include "dimphy.h"
     5767cym#include "raddim.h"
    56915768#include "raddimlw.h"
    56925769C
     
    59376014     R  , PABCU,PDBSL,PGA,PGB
    59386015     S  , PADJD,PADJU,PCNTRB,PDBDT)
     6016       USE dimphy
    59396017      IMPLICIT none
    5940 #include "dimensions.h"
    5941 #include "dimphy.h"
    5942 #include "raddim.h"
     6018cym#include "dimensions.h"
     6019cym#include "dimphy.h"
     6020cym#include "raddim.h"
    59436021#include "raddimlw.h"
    59446022C
     
    60016079      REAL*8 WG1(2)
    60026080      SAVE WG1
     6081c$OMP THREADPRIVATE(WG1)
    60036082      DATA (WG1(jk),jk=1,2) /1.0, 1.0/
    60046083C-----------------------------------------------------------------------
     
    61446223      END
    61456224      SUBROUTINE LWTT(PGA,PGB,PUU, PTT)
     6225       USE dimphy
    61466226      IMPLICIT none
    6147 #include "dimensions.h"
    6148 #include "dimphy.h"
    6149 #include "raddim.h"
     6227cym#include "dimensions.h"
     6228cym#include "dimphy.h"
     6229cym#include "raddim.h"
    61506230#include "raddimlw.h"
    61516231C
     
    63196399      END
    63206400      SUBROUTINE LWTTM(PGA,PGB,PUU1,PUU2, PTT)
     6401      USE dimphy
    63216402      IMPLICIT none
    6322 #include "dimensions.h"
    6323 #include "dimphy.h"
    6324 #include "raddim.h"
     6403cym#include "dimensions.h"
     6404cym#include "dimphy.h"
     6405cym#include "raddim.h"
    63256406#include "raddimlw.h"
    63266407C
Note: See TracChangeset for help on using the changeset viewer.