Changeset 1315 for trunk/LMDZ.GENERIC/libf
- Timestamp:
- Jul 11, 2014, 4:15:06 PM (11 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 59 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/aeropacity.F90
r1308 r1315 67 67 68 68 LOGICAL,SAVE :: firstcall=.true. 69 !$OMP THREADPRIVATE(firstcall) 69 70 REAL CBRT 70 71 EXTERNAL CBRT … … 72 73 INTEGER,SAVE :: i_co2ice=0 ! co2 ice 73 74 INTEGER,SAVE :: i_h2oice=0 ! water ice 75 !$OMP THREADPRIVATE(i_co2ice,i_h2oice) 74 76 CHARACTER(LEN=20) :: tracername ! to temporarily store text 75 77 -
trunk/LMDZ.GENERIC/libf/phystd/aeroptproperties.F90
r1308 r1315 67 67 ! Pi! 68 68 REAL,SAVE :: pi 69 !$OMP THREADPRIVATE(pi) 69 70 ! Variables used by the Gauss-Legendre integration: 70 71 INTEGER radius_id,gausind … … 87 88 0.08327674160932,0.06267204829828, & 88 89 0.04060142982019,0.01761400714091/ 90 !$OMP THREADPRIVATE(radgaus,weightgaus) 89 91 ! Indices 90 92 INTEGER :: i,j,k,l,m,iaer,idomain … … 102 104 ! Grid used to remember which calculation is done 103 105 LOGICAL,SAVE :: checkgrid(refftabsize,nuefftabsize,naerkind,2) = .false. 106 !$OMP THREADPRIVATE(refftab,nuefftab,logvratgrid,vratgrid,checkgrid) 104 107 ! Optical properties of the grid (VISIBLE) 105 108 REAL,SAVE :: qsqrefVISgrid(refftabsize,nuefftabsize,L_NSPECTV,naerkind) … … 108 111 REAL,SAVE :: omegVISgrid(refftabsize,nuefftabsize,L_NSPECTV,naerkind) 109 112 REAL,SAVE :: gVISgrid(refftabsize,nuefftabsize,L_NSPECTV,naerkind) 113 !$OMP THREADPRIVATE(qsqrefVISgrid,qextVISgrid,qscatVISgrid,omegVISgrid,gVISgrid) 110 114 ! Optical properties of the grid (INFRARED) 111 115 REAL,SAVE :: qsqrefIRgrid(refftabsize,nuefftabsize,L_NSPECTI,naerkind) … … 114 118 REAL,SAVE :: omegIRgrid(refftabsize,nuefftabsize,L_NSPECTI,naerkind) 115 119 REAL,SAVE :: gIRgrid(refftabsize,nuefftabsize,L_NSPECTI,naerkind) 120 !$OMP THREADPRIVATE(qsqrefIRgrid,qextIRgrid,qscatIRgrid,omegIRgrid,gIRgrid) 116 121 ! Optical properties of the grid (REFERENCE WAVELENGTHS) 117 122 REAL,SAVE :: qrefVISgrid(refftabsize,nuefftabsize,naerkind) … … 121 126 REAL,SAVE :: omegrefVISgrid(refftabsize,nuefftabsize,naerkind) 122 127 REAL,SAVE :: omegrefIRgrid(refftabsize,nuefftabsize,naerkind) 128 !$OMP THREADPRIVATE(qrefVISgrid,qscatrefVISgrid,qrefIRgrid,qscatrefIRgrid,omegrefVISgrid,& 129 !$OMP omegrefIRgrid) 123 130 ! Firstcall 124 131 LOGICAL,SAVE :: firstcall = .true. 132 !$OMP THREADPRIVATE(firstcall) 125 133 ! Variables used by the Gauss-Legendre integration: 126 134 REAL,SAVE :: normd(refftabsize,nuefftabsize,naerkind,2) 127 135 REAL,SAVE :: dista(refftabsize,nuefftabsize,naerkind,2,ngau) 128 136 REAL,SAVE :: distb(refftabsize,nuefftabsize,naerkind,2,ngau) 137 !$OMP THREADPRIVATE(normd,dista,distb) 129 138 130 139 REAL,SAVE :: radGAUSa(ngau,naerkind,2) 131 140 REAL,SAVE :: radGAUSb(ngau,naerkind,2) 141 !$OMP THREADPRIVATE(radGAUSa,radGAUSb) 132 142 133 143 REAL,SAVE :: qsqrefVISa(L_NSPECTV,ngau,naerkind) … … 141 151 REAL,SAVE :: gVISa(L_NSPECTV,ngau,naerkind) 142 152 REAL,SAVE :: gVISb(L_NSPECTV,ngau,naerkind) 153 !$OMP THREADPRIVATE(qsqrefVISa,qrefVISa,qsqrefVISb,qrefVISb,omegVISa, & 154 !$OMP omegrefVISa,omegVISb,omegrefVISb,gVISa,gVISb) 143 155 144 156 REAL,SAVE :: qsqrefIRa(L_NSPECTI,ngau,naerkind) … … 152 164 REAL,SAVE :: gIRa(L_NSPECTI,ngau,naerkind) 153 165 REAL,SAVE :: gIRb(L_NSPECTI,ngau,naerkind) 166 !$OMP THREADPRIVATE(qsqrefIRa,qrefIRa,qsqrefIRb,qrefIRb,omegIRa,omegrefIRa,& 167 !$OMP omegIRb,omegrefIRb,gIRa,gIRb) 154 168 155 169 REAL :: radiusm -
trunk/LMDZ.GENERIC/libf/phystd/aerosol_mod.F90
r1151 r1315 16 16 ! two-layer simple aerosol model 17 17 integer :: iaero_back2lay = 0 18 !$OMP THREADPRIVATE(iaero_co2,iaero_h2o,iaero_dust,iaero_h2so4,noaero,iaero_back2lay) 18 19 19 20 !================================================================== -
trunk/LMDZ.GENERIC/libf/phystd/ave_stelspec.F90
r863 r1315 38 38 integer ifine 39 39 40 real,allocatable :: lam(:),stel_f(:)40 real,allocatable,save :: lam(:),stel_f(:) !read by master 41 41 real band,lamm,lamp 42 42 real dl … … 116 116 End Select 117 117 118 !$OMP MASTER 118 119 allocate(lam(Nfine),stel_f(Nfine)) 119 120 … … 153 154 close(111) 154 155 endif 156 !$OMP END MASTER 157 !$OMP BARRIER 155 158 156 159 ! sum data by band … … 173 176 174 177 STELLAR(1:L_NSPECTV)=STELLAR(1:L_NSPECTV)/sum(STELLAR(1:L_NSPECTV)) 175 deallocate(lam,stel_f) 176 178 !$OMP BARRIER 179 !$OMP MASTER 180 if (allocated(lam)) deallocate(lam) 181 if (allocated(stel_f)) deallocate(stel_f) 182 !$OMP END MASTER 183 !$OMP BARRIER 177 184 endif 178 185 -
trunk/LMDZ.GENERIC/libf/phystd/bilinearbig.F90
r919 r1315 14 14 real*8 f2d_arr(nX,nY) 15 15 real*8,save :: x,y 16 !$OMP THREADPRIVATE(x,y) 16 17 17 18 integer strlen -
trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90
r1308 r1315 12 12 use watercommon_h 13 13 use datafile_mod, only: datadir 14 use ioipsl_getincom 14 ! use ioipsl_getincom 15 use ioipsl_getincom_p 15 16 use gases_h 16 17 use radii_mod, only : su_aer_radii,co2_reffrad,h2o_reffrad,dust_reffrad,h2so4_reffrad,back2lay_reffrad … … 92 93 REAL,ALLOCATABLE,SAVE :: reffrad(:,:,:) ! aerosol effective radius (m) 93 94 REAL,ALLOCATABLE,SAVE :: nueffrad(:,:,:) ! aerosol effective variance 95 !$OMP THREADPRIVATE(reffrad,nueffrad) 94 96 95 97 !----------------------------------------------------------------------- … … 128 130 logical global1d 129 131 save szangle,global1d 132 !$OMP THREADPRIVATE(szangle,global1d) 130 133 real*8 taugsurf(L_NSPECTV,L_NGAUSS-1) 131 134 real*8 taugsurfi(L_NSPECTI,L_NGAUSS-1) … … 146 149 real, dimension(:,:,:), save, allocatable :: QREFvis3d 147 150 real, dimension(:,:,:), save, allocatable :: QREFir3d 151 !$OMP THREADPRIVATE(QXVAER,QSVAER,GVAER,QXIAER,QSIAER,GIAER,QREFvis3d,QREFir3d) 148 152 149 153 … … 214 218 ! set up correlated k 215 219 print*, "callcorrk: Correlated-k data base folder:",trim(datadir) 216 call getin ("corrkdir",corrkdir)220 call getin_p("corrkdir",corrkdir) 217 221 print*, "corrkdir = ",corrkdir 218 222 write( tmp1, '(i3)' ) L_NSPECTI … … 238 242 PRINT*, 'Simulate global averaged conditions ?' 239 243 global1d = .false. ! default value 240 call getin ("global1d",global1d)244 call getin_p("global1d",global1d) 241 245 write(*,*) "global1d = ",global1d 242 246 ! Test of incompatibility: … … 251 255 PRINT *,'(assumed for averaged solar flux S/4)' 252 256 szangle=60.0 ! default value 253 call getin ("szangle",szangle)257 call getin_p("szangle",szangle) 254 258 write(*,*) "szangle = ",szangle 255 259 endif … … 866 870 IF( ALLOCATED( gasi ) ) DEALLOCATE( gasi ) 867 871 IF( ALLOCATED( gasv ) ) DEALLOCATE( gasv ) 872 !$OMP BARRIER 873 !$OMP MASTER 868 874 IF( ALLOCATED( pgasref ) ) DEALLOCATE( pgasref ) 869 875 IF( ALLOCATED( tgasref ) ) DEALLOCATE( tgasref ) 870 876 IF( ALLOCATED( wrefvar ) ) DEALLOCATE( wrefvar ) 871 877 IF( ALLOCATED( pfgasref ) ) DEALLOCATE( pfgasref ) 878 !$OMP END MASTER 879 !$OMP BARRIER 872 880 IF ( ALLOCATED(reffrad)) DEALLOCATE(reffrad) 873 881 IF ( ALLOCATED(nueffrad)) DEALLOCATE(nueffrad) -
trunk/LMDZ.GENERIC/libf/phystd/callkeys.h
r1297 r1315 117 117 real J2 118 118 real MassPlanet 119 120 logical :: iscallphys=.false.!existence of callphys.def -
trunk/LMDZ.GENERIC/libf/phystd/callsedim.F
r1308 r1315 69 69 70 70 LOGICAL,SAVE :: firstcall=.true. 71 !$OMP THREADPRIVATE(firstcall) 71 72 72 73 c ** un petit test de coherence -
trunk/LMDZ.GENERIC/libf/phystd/comdiurn_h.F90
r787 r1315 6 6 real, allocatable, dimension(:) :: sinlon, coslon, sinlat, coslat 7 7 logical :: ldiurn 8 !$OMP THREADPRIVATE(sinlon,coslon,sinlat,coslat,ldiurn) !ldiurn is unused 8 9 9 10 end module comdiurn_h -
trunk/LMDZ.GENERIC/libf/phystd/comgeomfi_h.F90
r1295 r1315 6 6 REAL,ALLOCATABLE,DIMENSION(:) :: long,lati,area 7 7 REAL :: totarea, totarea_planet 8 !$OMP THREADPRIVATE(long,lati,area,totarea) 8 9 9 10 end module comgeomfi_h -
trunk/LMDZ.GENERIC/libf/phystd/comsaison_h.F90
r787 r1315 9 9 10 10 real, allocatable, dimension(:) :: mu0,fract 11 !$OMP THREADPRIVATE(isaison,callsais,dist_star,declin,mu0,fract) 11 12 12 13 end module comsaison_h -
trunk/LMDZ.GENERIC/libf/phystd/comsoil_h.F90
r1297 r1315 14 14 ! in physdem (or set via tabfi, or initialized in 15 15 ! soil_settings.F) 16 !$OMP THREADPRIVATE(layer,mlayer,inertiedat,volcapa) 16 17 17 18 contains -
trunk/LMDZ.GENERIC/libf/phystd/condense_cloud.F90
r1308 r1315 133 133 REAL,SAVE :: cpice=1000. 134 134 REAL,SAVE,ALLOCATABLE,DIMENSION(:) :: emisref 135 !$OMP THREADPRIVATE(latcond,ccond,cpice,emisref) 135 136 136 137 LOGICAL,SAVE :: firstcall=.true. 138 !$OMP THREADPRIVATE(firstcall) 137 139 REAL,EXTERNAL :: SSUM 138 140 … … 140 142 141 143 INTEGER,SAVE :: i_co2ice=0 ! co2 ice 144 !$OMP THREADPRIVATE(i_co2ice) 142 145 CHARACTER(LEN=20) :: tracername ! to temporarily store text 143 146 -
trunk/LMDZ.GENERIC/libf/phystd/convadj.F
r1308 r1315 67 67 INTEGER iq,ico2 68 68 save ico2 69 !$OMP THREADPRIVATE(ico2) 69 70 REAL zq(ngrid,nlay,nq), zq2(ngrid,nlay,nq) 70 71 REAL zqm(nq),zqco2m 71 72 real m_co2, m_noco2, A , B 72 73 save A, B 74 !$OMP THREADPRIVATE(A,B) 73 75 74 76 real mtot1, mtot2 , mm1, mm2 … … 77 79 save firstcall 78 80 data firstcall/.true./ 81 !$OMP THREADPRIVATE(firstcall) 79 82 80 83 ! for conservation test -
trunk/LMDZ.GENERIC/libf/phystd/dimphy.F90
r1216 r1315 2 2 3 3 INTEGER,SAVE :: klon ! number of atmospheric columns (for this OpenMP subgrid) 4 INTEGER,SAVE :: klev ! number of atmospheric layers 5 INTEGER,SAVE :: klevp1 ! number of atmospheric layers+1 6 INTEGER,SAVE :: klevm1 ! number of atmospheric layers-1 4 INTEGER,SAVE :: klev ! number of atmospheric layers, read by master 5 INTEGER,SAVE :: klevp1 ! number of atmospheric layers+1, read by master 6 INTEGER,SAVE :: klevm1 ! number of atmospheric layers-1, read by master 7 7 ! INTEGER,SAVE :: kflev 8 8 -
trunk/LMDZ.GENERIC/libf/phystd/gases_h.F90
r869 r1315 14 14 integer :: ngasmx 15 15 integer :: vgas 16 character*20,allocatable,DIMENSION(:) :: gnom ! name of the gas 16 character*20,allocatable,DIMENSION(:) :: gnom ! name of the gas, read by master 17 17 real,allocatable,DIMENSION(:) :: gfrac 18 18 … … 31 31 integer :: igas_C2H2 32 32 integer :: igas_C2H6 33 !!$OMP THREADPRIVATE(ngasmx,vgas,gnom,gfrac,& 34 ! !$OMP igas_H2,igas_He,igas_H2O,igas_CO2,igas_CO,igas_N2,& 35 ! !$OMP igas_O2,igas_SO2,igas_H2S,igas_CH4,igas_NH3,igas_C2H2,igas_C2H6) 33 36 34 37 end module gases_h -
trunk/LMDZ.GENERIC/libf/phystd/hydrol.F90
r1308 r1315 4 4 pctsrf_sic,sea_ice) 5 5 6 use ioipsl_getincom 6 ! use ioipsl_getincom 7 use ioipsl_getincom_p 7 8 use watercommon_h, only: T_h2O_ice_liq, RLFTT, rhowater, mx_eau_sol 8 9 USE surfdat_h … … 50 51 real albedoice 51 52 save albedoice 53 !$OMP THREADPRIVATE(albedoice) 52 54 53 55 real snowlayer … … 59 61 logical,save :: activerunoff ! enable simple runoff scheme? 60 62 logical,save :: oceanalbvary ! ocean albedo varies with the diurnal cycle? 63 !$OMP THREADPRIVATE(oceanbulkavg,activerunoff,oceanalbvary) 61 64 62 65 ! Arguments … … 66 69 real totalrunoff, tsea, oceanarea 67 70 save oceanarea 71 !$OMP THREADPRIVATE(runoff,oceanarea) 68 72 69 73 real ptimestep … … 96 100 97 101 integer, save :: ivap, iliq, iice 102 !$OMP THREADPRIVATE(ivap,iliq,iice) 98 103 99 104 logical, save :: firstcall 105 !$OMP THREADPRIVATE(firstcall) 100 106 101 107 data firstcall /.true./ … … 108 114 write(*,*)"Activate runnoff into oceans?" 109 115 activerunoff=.false. 110 call getin ("activerunoff",activerunoff)116 call getin_p("activerunoff",activerunoff) 111 117 write(*,*)" activerunoff = ",activerunoff 112 118 -
trunk/LMDZ.GENERIC/libf/phystd/inifis.F
r1308 r1315 50 50 use datafile_mod, only: datadir 51 51 ! to use 'getin' 52 USE ioipsl_getincom 52 ! USE ioipsl_getincom 53 USE ioipsl_getincom_p 53 54 IMPLICIT NONE 54 55 !#include "dimensions.h" … … 79 80 real psurf,pN2 ! added by RW for Gliese 581d N2+CO2 80 81 82 !$OMP MASTER 81 83 rad=prad 82 84 daysec=pdaysec … … 89 91 avocado = 6.02214179e23 ! added by RW 90 92 93 !$OMP END MASTER 94 !$OMP BARRIER 91 95 92 96 ! read in 'ecritphy' (frequency of calls to physics, in dynamical steps) 93 97 ! (also done in dyn3d/defrun_new but not in LMDZ.COMMON) 94 call getin ("ecritphy",ecritphy)98 call getin_p("ecritphy",ecritphy) 95 99 96 100 ! -------------------------------------------------------------- … … 98 102 ! -------------------------------------------------------------- 99 103 104 !$OMP MASTER 100 105 ! check that 'callphys.def' file is around 101 106 OPEN(99,file='callphys.def',status='old',form='formatted' 102 107 & ,iostat=ierr) 103 108 CLOSE(99) 109 IF(ierr.EQ.0) iscallphys=.true. !iscallphys initialised as false in callkeys.h 110 !$OMP END MASTER 111 !$OMP BARRIER 104 112 105 IF(ierr.EQ.0) THEN 113 !!! IF(ierr.EQ.0) THEN 114 IF(iscallphys) THEN 106 115 PRINT* 107 116 PRINT* … … 112 121 write(*,*) "Directory where external input files are:" 113 122 ! default 'datadir' is set in "datadir_mod" 114 call getin ("datadir",datadir) ! default path123 call getin_p("datadir",datadir) ! default path 115 124 write(*,*) " datadir = ",trim(datadir) 116 125 117 126 write(*,*) "Run with or without tracer transport ?" 118 127 tracer=.false. ! default value 119 call getin ("tracer",tracer)128 call getin_p("tracer",tracer) 120 129 write(*,*) " tracer = ",tracer 121 130 … … 123 132 & " due to tracer evaporation/condensation?" 124 133 mass_redistrib=.false. ! default value 125 call getin ("mass_redistrib",mass_redistrib)134 call getin_p("mass_redistrib",mass_redistrib) 126 135 write(*,*) " mass_redistrib = ",mass_redistrib 127 136 … … 129 138 write(*,*) "(if diurnal=false, diurnal averaged solar heating)" 130 139 diurnal=.true. ! default value 131 call getin ("diurnal",diurnal)140 call getin_p("diurnal",diurnal) 132 141 write(*,*) " diurnal = ",diurnal 133 142 … … 136 145 & "set in 'start'" 137 146 season=.true. ! default value 138 call getin ("season",season)147 call getin_p("season",season) 139 148 write(*,*) " season = ",season 140 149 141 150 write(*,*) "Tidally resonant rotation ?" 142 151 tlocked=.false. ! default value 143 call getin ("tlocked",tlocked)152 call getin_p("tlocked",tlocked) 144 153 write(*,*) "tlocked = ",tlocked 145 154 146 155 write(*,*) "Saturn ring shadowing ?" 147 156 rings_shadow = .false. 148 call getin ("rings_shadow", rings_shadow)157 call getin_p("rings_shadow", rings_shadow) 149 158 write(*,*) "rings_shadow = ", rings_shadow 150 159 151 160 write(*,*) "Compute latitude-dependent gravity field?" 152 161 oblate = .false. 153 call getin ("oblate", oblate)162 call getin_p("oblate", oblate) 154 163 write(*,*) "oblate = ", oblate 155 164 156 165 write(*,*) "Flattening of the planet (a-b)/a " 157 166 flatten = 0.0 158 call getin ("flatten", flatten)167 call getin_p("flatten", flatten) 159 168 write(*,*) "flatten = ", flatten 160 169 … … 162 171 write(*,*) "Needed if oblate=.true.: J2" 163 172 J2 = 0.0 164 call getin ("J2", J2)173 call getin_p("J2", J2) 165 174 write(*,*) "J2 = ", J2 166 175 167 176 write(*,*) "Needed if oblate=.true.: Planet mass (*1e24 kg)" 168 177 MassPlanet = 0.0 169 call getin ("MassPlanet", MassPlanet)178 call getin_p("MassPlanet", MassPlanet) 170 179 write(*,*) "MassPlanet = ", MassPlanet 171 180 172 181 write(*,*) "Needed if oblate=.true.: Planet mean radius (m)" 173 182 Rmean = 0.0 174 call getin ("Rmean", Rmean)183 call getin_p("Rmean", Rmean) 175 184 write(*,*) "Rmean = ", Rmean 176 185 … … 184 193 write(*,*) "Tidal resonance ratio ?" 185 194 nres=0 ! default value 186 call getin ("nres",nres)195 call getin_p("nres",nres) 187 196 write(*,*) "nres = ",nres 188 197 189 198 write(*,*) "Write some extra output to the screen ?" 190 199 lwrite=.false. ! default value 191 call getin ("lwrite",lwrite)200 call getin_p("lwrite",lwrite) 192 201 write(*,*) " lwrite = ",lwrite 193 202 194 203 write(*,*) "Save statistics in file stats.nc ?" 195 204 callstats=.true. ! default value 196 call getin ("callstats",callstats)205 call getin_p("callstats",callstats) 197 206 write(*,*) " callstats = ",callstats 198 207 199 208 write(*,*) "Test energy conservation of model physics ?" 200 209 enertest=.false. ! default value 201 call getin ("enertest",enertest)210 call getin_p("enertest",enertest) 202 211 write(*,*) " enertest = ",enertest 203 212 204 213 write(*,*) "Check to see if cpp values used match gases.def ?" 205 214 check_cpp_match=.true. ! default value 206 call getin ("check_cpp_match",check_cpp_match)215 call getin_p("check_cpp_match",check_cpp_match) 207 216 write(*,*) " check_cpp_match = ",check_cpp_match 208 217 209 218 write(*,*) "call radiative transfer ?" 210 219 callrad=.true. ! default value 211 call getin ("callrad",callrad)220 call getin_p("callrad",callrad) 212 221 write(*,*) " callrad = ",callrad 213 222 214 223 write(*,*) "call correlated-k radiative transfer ?" 215 224 corrk=.true. ! default value 216 call getin ("corrk",corrk)225 call getin_p("corrk",corrk) 217 226 write(*,*) " corrk = ",corrk 218 227 219 228 write(*,*) "prohibit calculations outside corrk T grid?" 220 229 strictboundcorrk=.true. ! default value 221 call getin ("strictboundcorrk",strictboundcorrk)230 call getin_p("strictboundcorrk",strictboundcorrk) 222 231 write(*,*) "strictboundcorrk = ",strictboundcorrk 223 232 … … 225 234 & "(matters only if callrad=T)" 226 235 callgasvis=.false. ! default value 227 call getin ("callgasvis",callgasvis)236 call getin_p("callgasvis",callgasvis) 228 237 write(*,*) " callgasvis = ",callgasvis 229 238 … … 231 240 & "(matters only if callrad=T)" 232 241 continuum=.true. ! default value 233 call getin ("continuum",continuum)242 call getin_p("continuum",continuum) 234 243 write(*,*) " continuum = ",continuum 235 244 236 245 write(*,*) "use analytic function for H2O continuum ?" 237 246 H2Ocont_simple=.false. ! default value 238 call getin ("H2Ocont_simple",H2Ocont_simple)247 call getin_p("H2Ocont_simple",H2Ocont_simple) 239 248 write(*,*) " H2Ocont_simple = ",H2Ocont_simple 240 249 241 250 write(*,*) "call turbulent vertical diffusion ?" 242 251 calldifv=.true. ! default value 243 call getin ("calldifv",calldifv)252 call getin_p("calldifv",calldifv) 244 253 write(*,*) " calldifv = ",calldifv 245 254 246 255 write(*,*) "use turbdiff instead of vdifc ?" 247 256 UseTurbDiff=.true. ! default value 248 call getin ("UseTurbDiff",UseTurbDiff)257 call getin_p("UseTurbDiff",UseTurbDiff) 249 258 write(*,*) " UseTurbDiff = ",UseTurbDiff 250 259 251 260 write(*,*) "call convective adjustment ?" 252 261 calladj=.true. ! default value 253 call getin ("calladj",calladj)262 call getin_p("calladj",calladj) 254 263 write(*,*) " calladj = ",calladj 255 264 256 265 write(*,*) "call CO2 condensation ?" 257 266 co2cond=.false. ! default value 258 call getin ("co2cond",co2cond)267 call getin_p("co2cond",co2cond) 259 268 write(*,*) " co2cond = ",co2cond 260 269 ! Test of incompatibility … … 266 275 write(*,*) "CO2 supersaturation level ?" 267 276 co2supsat=1.0 ! default value 268 call getin ("co2supsat",co2supsat)277 call getin_p("co2supsat",co2supsat) 269 278 write(*,*) " co2supsat = ",co2supsat 270 279 271 280 write(*,*) "Radiative timescale for Newtonian cooling ?" 272 281 tau_relax=30. ! default value 273 call getin ("tau_relax",tau_relax)282 call getin_p("tau_relax",tau_relax) 274 283 write(*,*) " tau_relax = ",tau_relax 275 284 tau_relax=tau_relax*24*3600 ! convert Earth days --> seconds … … 277 286 write(*,*)"call thermal conduction in the soil ?" 278 287 callsoil=.true. ! default value 279 call getin ("callsoil",callsoil)288 call getin_p("callsoil",callsoil) 280 289 write(*,*) " callsoil = ",callsoil 281 290 … … 283 292 & " physical timestep" 284 293 iradia=1 ! default value 285 call getin ("iradia",iradia)294 call getin_p("iradia",iradia) 286 295 write(*,*)" iradia = ",iradia 287 296 288 297 write(*,*)"Rayleigh scattering ?" 289 298 rayleigh=.false. 290 call getin ("rayleigh",rayleigh)299 call getin_p("rayleigh",rayleigh) 291 300 write(*,*)" rayleigh = ",rayleigh 292 301 293 302 write(*,*) "Use blackbody for stellar spectrum ?" 294 303 stelbbody=.false. ! default value 295 call getin ("stelbbody",stelbbody)304 call getin_p("stelbbody",stelbbody) 296 305 write(*,*) " stelbbody = ",stelbbody 297 306 298 307 write(*,*) "Stellar blackbody temperature ?" 299 308 stelTbb=5800.0 ! default value 300 call getin ("stelTbb",stelTbb)309 call getin_p("stelTbb",stelTbb) 301 310 write(*,*) " stelTbb = ",stelTbb 302 311 303 312 write(*,*)"Output mean OLR in 1D?" 304 313 meanOLR=.false. 305 call getin ("meanOLR",meanOLR)314 call getin_p("meanOLR",meanOLR) 306 315 write(*,*)" meanOLR = ",meanOLR 307 316 308 317 write(*,*)"Output spectral OLR in 3D?" 309 318 specOLR=.false. 310 call getin ("specOLR",specOLR)319 call getin_p("specOLR",specOLR) 311 320 write(*,*)" specOLR = ",specOLR 312 321 313 322 write(*,*)"Operate in kastprof mode?" 314 323 kastprof=.false. 315 call getin ("kastprof",kastprof)324 call getin_p("kastprof",kastprof) 316 325 write(*,*)" kastprof = ",kastprof 317 326 318 327 write(*,*)"Uniform absorption in radiative transfer?" 319 328 graybody=.false. 320 call getin ("graybody",graybody)329 call getin_p("graybody",graybody) 321 330 write(*,*)" graybody = ",graybody 322 331 … … 324 333 write(*,*) "Use slab-ocean ?" 325 334 ok_slab_ocean=.false. ! default value 326 call getin ("ok_slab_ocean",ok_slab_ocean)335 call getin_p("ok_slab_ocean",ok_slab_ocean) 327 336 write(*,*) "ok_slab_ocean = ",ok_slab_ocean 328 337 329 338 write(*,*) "Use slab-sea-ice ?" 330 339 ok_slab_sic=.true. ! default value 331 call getin ("ok_slab_sic",ok_slab_sic)340 call getin_p("ok_slab_sic",ok_slab_sic) 332 341 write(*,*) "ok_slab_sic = ",ok_slab_sic 333 342 334 343 write(*,*) "Use heat transport for the ocean ?" 335 344 ok_slab_heat_transp=.true. ! default value 336 call getin ("ok_slab_heat_transp",ok_slab_heat_transp)345 call getin_p("ok_slab_heat_transp",ok_slab_heat_transp) 337 346 write(*,*) "ok_slab_heat_transp = ",ok_slab_heat_transp 338 347 … … 348 357 write(*,*)"Stratospheric temperature for kastprof mode?" 349 358 Tstrat=167.0 350 call getin ("Tstrat",Tstrat)359 call getin_p("Tstrat",Tstrat) 351 360 write(*,*)" Tstrat = ",Tstrat 352 361 353 362 write(*,*)"Remove lower boundary?" 354 363 nosurf=.false. 355 call getin ("nosurf",nosurf)364 call getin_p("nosurf",nosurf) 356 365 write(*,*)" nosurf = ",nosurf 357 366 … … 366 375 . "... matters only if callsoil=F" 367 376 intheat=0. 368 call getin ("intheat",intheat)377 call getin_p("intheat",intheat) 369 378 write(*,*)" intheat = ",intheat 370 379 371 380 write(*,*)"Use Newtonian cooling for radiative transfer?" 372 381 newtonian=.false. 373 call getin ("newtonian",newtonian)382 call getin_p("newtonian",newtonian) 374 383 write(*,*)" newtonian = ",newtonian 375 384 … … 390 399 write(*,*)"Test physics timescale in 1D?" 391 400 testradtimes=.false. 392 call getin ("testradtimes",testradtimes)401 call getin_p("testradtimes",testradtimes) 393 402 write(*,*)" testradtimes = ",testradtimes 394 403 … … 402 411 write(*,*)"Default planetary temperature?" 403 412 tplanet=215.0 404 call getin ("tplanet",tplanet)413 call getin_p("tplanet",tplanet) 405 414 write(*,*)" tplanet = ",tplanet 406 415 407 416 write(*,*)"Which star?" 408 417 startype=1 ! default value = Sol 409 call getin ("startype",startype)418 call getin_p("startype",startype) 410 419 write(*,*)" startype = ",startype 411 420 412 421 write(*,*)"Value of stellar flux at 1 AU?" 413 422 Fat1AU=1356.0 ! default value = Sol today 414 call getin ("Fat1AU",Fat1AU)423 call getin_p("Fat1AU",Fat1AU) 415 424 write(*,*)" Fat1AU = ",Fat1AU 416 425 … … 420 429 write(*,*)"Varying H2O cloud fraction?" 421 430 CLFvarying=.false. ! default value 422 call getin ("CLFvarying",CLFvarying)431 call getin_p("CLFvarying",CLFvarying) 423 432 write(*,*)" CLFvarying = ",CLFvarying 424 433 425 434 write(*,*)"Value of fixed H2O cloud fraction?" 426 435 CLFfixval=1.0 ! default value 427 call getin ("CLFfixval",CLFfixval)436 call getin_p("CLFfixval",CLFfixval) 428 437 write(*,*)" CLFfixval = ",CLFfixval 429 438 430 439 write(*,*)"fixed radii for Cloud particles?" 431 440 radfixed=.false. ! default value 432 call getin ("radfixed",radfixed)441 call getin_p("radfixed",radfixed) 433 442 write(*,*)" radfixed = ",radfixed 434 443 … … 439 448 write(*,*)"Number mixing ratio of CO2 ice particles:" 440 449 Nmix_co2=1.e6 ! default value 441 call getin ("Nmix_co2",Nmix_co2)450 call getin_p("Nmix_co2",Nmix_co2) 442 451 write(*,*)" Nmix_co2 = ",Nmix_co2 443 452 444 453 ! write(*,*)"Number of radiatively active aerosols:" 445 454 ! naerkind=0. ! default value 446 ! call getin ("naerkind",naerkind)455 ! call getin_p("naerkind",naerkind) 447 456 ! write(*,*)" naerkind = ",naerkind 448 457 449 458 write(*,*)"Opacity of dust (if used):" 450 459 dusttau=0. ! default value 451 call getin ("dusttau",dusttau)460 call getin_p("dusttau",dusttau) 452 461 write(*,*)" dusttau = ",dusttau 453 462 454 463 write(*,*)"Radiatively active CO2 aerosols?" 455 464 aeroco2=.false. ! default value 456 call getin ("aeroco2",aeroco2)465 call getin_p("aeroco2",aeroco2) 457 466 write(*,*)" aeroco2 = ",aeroco2 458 467 459 468 write(*,*)"Fixed CO2 aerosol distribution?" 460 469 aerofixco2=.false. ! default value 461 call getin ("aerofixco2",aerofixco2)470 call getin_p("aerofixco2",aerofixco2) 462 471 write(*,*)" aerofixco2 = ",aerofixco2 463 472 464 473 write(*,*)"Radiatively active water ice?" 465 474 aeroh2o=.false. ! default value 466 call getin ("aeroh2o",aeroh2o)475 call getin_p("aeroh2o",aeroh2o) 467 476 write(*,*)" aeroh2o = ",aeroh2o 468 477 469 478 write(*,*)"Fixed H2O aerosol distribution?" 470 479 aerofixh2o=.false. ! default value 471 call getin ("aerofixh2o",aerofixh2o)480 call getin_p("aerofixh2o",aerofixh2o) 472 481 write(*,*)" aerofixh2o = ",aerofixh2o 473 482 474 483 write(*,*)"Radiatively active sulfuric acid aersols?" 475 484 aeroh2so4=.false. ! default value 476 call getin ("aeroh2so4",aeroh2so4)485 call getin_p("aeroh2so4",aeroh2so4) 477 486 write(*,*)" aeroh2so4 = ",aeroh2so4 478 487 … … 481 490 write(*,*)"Radiatively active two-layer aersols?" 482 491 aeroback2lay=.false. ! default value 483 call getin ("aeroback2lay",aeroback2lay)492 call getin_p("aeroback2lay",aeroback2lay) 484 493 write(*,*)" aeroback2lay = ",aeroback2lay 485 494 … … 487 496 & "in the tropospheric layer (visible)" 488 497 obs_tau_col_tropo=8.D0 489 call getin ("obs_tau_col_tropo",obs_tau_col_tropo)498 call getin_p("obs_tau_col_tropo",obs_tau_col_tropo) 490 499 write(*,*)" obs_tau_col_tropo = ",obs_tau_col_tropo 491 500 … … 493 502 & "in the stratospheric layer (visible)" 494 503 obs_tau_col_strato=0.08D0 495 call getin ("obs_tau_col_strato",obs_tau_col_strato)504 call getin_p("obs_tau_col_strato",obs_tau_col_strato) 496 505 write(*,*)" obs_tau_col_strato = ",obs_tau_col_strato 497 506 498 507 write(*,*)"TWOLAY AEROSOL: pres_bottom_tropo? in pa" 499 508 pres_bottom_tropo=66000.0 500 call getin ("pres_bottom_tropo",pres_bottom_tropo)509 call getin_p("pres_bottom_tropo",pres_bottom_tropo) 501 510 write(*,*)" pres_bottom_tropo = ",pres_bottom_tropo 502 511 503 512 write(*,*)"TWOLAY AEROSOL: pres_top_tropo? in pa" 504 513 pres_top_tropo=18000.0 505 call getin ("pres_top_tropo",pres_top_tropo)514 call getin_p("pres_top_tropo",pres_top_tropo) 506 515 write(*,*)" pres_top_tropo = ",pres_top_tropo 507 516 508 517 write(*,*)"TWOLAY AEROSOL: pres_bottom_strato? in pa" 509 518 pres_bottom_strato=2000.0 510 call getin ("pres_bottom_strato",pres_bottom_strato)519 call getin_p("pres_bottom_strato",pres_bottom_strato) 511 520 write(*,*)" pres_bottom_strato = ",pres_bottom_strato 512 521 513 522 write(*,*)"TWOLAY AEROSOL: pres_top_strato? in pa" 514 523 pres_top_strato=100.0 515 call getin ("pres_top_strato",pres_top_strato)524 call getin_p("pres_top_strato",pres_top_strato) 516 525 write(*,*)" pres_top_strato = ",pres_top_strato 517 526 … … 519 528 & "tropospheric layer, in meters" 520 529 size_tropo=2.e-6 521 call getin ("size_tropo",size_tropo)530 call getin_p("size_tropo",size_tropo) 522 531 write(*,*)" size_tropo = ",size_tropo 523 532 … … 525 534 & "stratospheric layer, in meters" 526 535 size_strato=1.e-7 527 call getin ("size_strato",size_strato)536 call getin_p("size_strato",size_strato) 528 537 write(*,*)" size_strato = ",size_strato 529 538 … … 532 541 write(*,*)"Cloud pressure level (with kastprof only):" 533 542 cloudlvl=0. ! default value 534 call getin ("cloudlvl",cloudlvl)543 call getin_p("cloudlvl",cloudlvl) 535 544 write(*,*)" cloudlvl = ",cloudlvl 536 545 … … 538 547 Tstrat=167.0 539 548 varactive=.false. 540 call getin ("varactive",varactive)549 call getin_p("varactive",varactive) 541 550 write(*,*)" varactive = ",varactive 542 551 543 552 write(*,*)"Is the variable gas species distribution set?" 544 553 varfixed=.false. 545 call getin ("varfixed",varfixed)554 call getin_p("varfixed",varfixed) 546 555 write(*,*)" varfixed = ",varfixed 547 556 548 557 write(*,*)"What is the saturation % of the variable species?" 549 558 satval=0.8 550 call getin ("satval",satval)559 call getin_p("satval",satval) 551 560 write(*,*)" satval = ",satval 552 561 … … 561 570 write(*,*) "Gravitationnal sedimentation ?" 562 571 sedimentation=.false. ! default value 563 call getin ("sedimentation",sedimentation)572 call getin_p("sedimentation",sedimentation) 564 573 write(*,*) " sedimentation = ",sedimentation 565 574 566 575 write(*,*) "Compute water cycle ?" 567 576 water=.false. ! default value 568 call getin ("water",water)577 call getin_p("water",water) 569 578 write(*,*) " water = ",water 570 579 … … 578 587 write(*,*) "Include water condensation ?" 579 588 watercond=.false. ! default value 580 call getin ("watercond",watercond)589 call getin_p("watercond",watercond) 581 590 write(*,*) " watercond = ",watercond 582 591 … … 590 599 write(*,*) "Include water precipitation ?" 591 600 waterrain=.false. ! default value 592 call getin ("waterrain",waterrain)601 call getin_p("waterrain",waterrain) 593 602 write(*,*) " waterrain = ",waterrain 594 603 595 604 write(*,*) "Include surface hydrology ?" 596 605 hydrology=.false. ! default value 597 call getin ("hydrology",hydrology)606 call getin_p("hydrology",hydrology) 598 607 write(*,*) " hydrology = ",hydrology 599 608 600 609 write(*,*) "Evolve surface water sources ?" 601 610 sourceevol=.false. ! default value 602 call getin ("sourceevol",sourceevol)611 call getin_p("sourceevol",sourceevol) 603 612 write(*,*) " sourceevol = ",sourceevol 604 613 605 614 write(*,*) "Ice evolution timestep ?" 606 615 icetstep=100.0 ! default value 607 call getin ("icetstep",icetstep)616 call getin_p("icetstep",icetstep) 608 617 write(*,*) " icetstep = ",icetstep 609 618 610 619 write(*,*) "Snow albedo ?" 611 620 albedosnow=0.5 ! default value 612 call getin ("albedosnow",albedosnow)621 call getin_p("albedosnow",albedosnow) 613 622 write(*,*) " albedosnow = ",albedosnow 614 623 615 624 write(*,*) "Maximum ice thickness ?" 616 625 maxicethick=2.0 ! default value 617 call getin ("maxicethick",maxicethick)626 call getin_p("maxicethick",maxicethick) 618 627 write(*,*) " maxicethick = ",maxicethick 619 628 620 629 write(*,*) "Freezing point of seawater ?" 621 630 Tsaldiff=-1.8 ! default value 622 call getin ("Tsaldiff",Tsaldiff)631 call getin_p("Tsaldiff",Tsaldiff) 623 632 write(*,*) " Tsaldiff = ",Tsaldiff 624 633 625 634 write(*,*) "Does user want to force cpp and mugaz?" 626 635 force_cpp=.false. ! default value 627 call getin ("force_cpp",force_cpp)636 call getin_p("force_cpp",force_cpp) 628 637 write(*,*) " force_cpp = ",force_cpp 629 638 … … 631 640 mugaz = -99999. 632 641 PRINT *,'MEAN MOLECULAR MASS in g mol-1 ?' 633 call getin ("mugaz",mugaz)642 call getin_p("mugaz",mugaz) 634 643 IF (mugaz.eq.-99999.) THEN 635 644 PRINT *, "mugaz must be set if force_cpp = T" … … 640 649 cpp = -99999. 641 650 PRINT *,'SPECIFIC HEAT CAPACITY in J K-1 kg-1 ?' 642 call getin ("cpp",cpp)651 call getin_p("cpp",cpp) 643 652 IF (cpp.eq.-99999.) THEN 644 653 PRINT *, "cpp must be set if force_cpp = T" … … 702 711 ENDDO 703 712 713 !$OMP MASTER 704 714 pi=2.*asin(1.) ! NB: pi is a common in comcstfi.h 715 !$OMP END MASTER 716 !$OMP BARRIER 705 717 706 718 ! allocate "comsoil_h" arrays -
trunk/LMDZ.GENERIC/libf/phystd/iniphysiq.F90
r1308 r1315 60 60 ENDIF 61 61 62 !$OMP PARALLEL PRIVATE(ibegin,iend) 63 !$OMP+SHARED(parea,pcu,pcv,plon,plat)62 !$OMP PARALLEL PRIVATE(ibegin,iend) & 63 !$OMP SHARED(parea,pcu,pcv,plon,plat) 64 64 65 65 offset=klon_mpi_begin-1 -
trunk/LMDZ.GENERIC/libf/phystd/interpolateH2H2.F90
r878 r1315 43 43 logical firstcall 44 44 45 save wn_arr, temp_arr, abs_arr 45 save wn_arr, temp_arr, abs_arr !read by master 46 46 47 47 character*100 dt_file … … 72 72 dt_file=TRIM(datadir)//'/continuum_data/H2-H2_norm_2011.cia' 73 73 74 !$OMP MASTER 74 75 open(33,file=dt_file,form='formatted',status='old',iostat=ios) 75 76 if (ios.ne.0) then ! file not found … … 102 103 endif 103 104 close(33) 105 !$OMP END MASTER 106 !$OMP BARRIER 104 107 105 108 print*,'interpolateH2H2: At wavenumber ',wn,' cm^-1' -
trunk/LMDZ.GENERIC/libf/phystd/interpolateH2He.F90
r878 r1315 45 45 logical firstcall 46 46 47 save wn_arr, temp_arr, abs_arr 47 save wn_arr, temp_arr, abs_arr !read by master 48 48 49 49 character*100 dt_file … … 73 73 ! 1.1 Open the ASCII files 74 74 dt_file=TRIM(datadir)//'/continuum_data/H2-He_norm_2011.cia' 75 75 76 !$OMP MASTER 76 77 open(33,file=dt_file,form='formatted',status='old',iostat=ios) 77 78 if (ios.ne.0) then ! file not found … … 104 105 endif 105 106 close(33) 107 !$OMP END MASTER 108 !$OMP BARRIER 106 109 107 110 print*,'interpolateH2He: At wavenumber ',wn,' cm^-1' -
trunk/LMDZ.GENERIC/libf/phystd/interpolateH2Ocont_CKD.F90
r878 r1315 43 43 logical firstcall 44 44 45 save wn_arr, temp_arr, abs_arrS, abs_arrF 45 save wn_arr, temp_arr, abs_arrS, abs_arrF !read by master 46 46 47 47 character*100 dt_file … … 57 57 ! 1.1 Open the ASCII files 58 58 59 !$OMP MASTER 59 60 ! nu array 60 61 dt_file=TRIM(datadir)//'/continuum_data/H2O_CONT_NU.dat' … … 129 130 print*,' H2O pressure ',presS,' Pa' 130 131 print*,' air pressure ',presF,' Pa' 132 !$OMP END MASTER 133 !$OMP BARRIER 131 134 132 135 endif -
trunk/LMDZ.GENERIC/libf/phystd/interpolateN2H2.F90
r879 r1315 44 44 logical firstcall 45 45 46 save wn_arr, temp_arr, abs_arr 46 save wn_arr, temp_arr, abs_arr !read by master 47 47 48 48 character*100 dt_file … … 72 72 dt_file=TRIM(datadir)//'/continuum_data/N2-H2_2011.cia' 73 73 74 !$OMP MASTER 74 75 open(33,file=dt_file,form='formatted',status='old',iostat=ios) 75 76 if (ios.ne.0) then ! file not found … … 102 103 endif 103 104 close(33) 105 !$OMP END MASTER 106 !$OMP BARRIER 104 107 105 108 print*,'interpolateN2H2: At wavenumber ',wn,' cm^-1' -
trunk/LMDZ.GENERIC/libf/phystd/interpolateN2N2.F90
r878 r1315 43 43 logical firstcall 44 44 45 save wn_arr, temp_arr, abs_arr 45 save wn_arr, temp_arr, abs_arr !read by master 46 46 47 47 character*100 dt_file … … 70 70 dt_file=TRIM(datadir)//'/continuum_data/N2-N2_2011.cia' 71 71 72 !$OMP MASTER 72 73 open(33,file=dt_file,form='formatted',status='old',iostat=ios) 73 74 if (ios.ne.0) then ! file not found … … 100 101 endif 101 102 close(33) 103 !$OMP END MASTER 104 !$OMP BARRIER 102 105 103 106 print*,'interpolateN2N2: At wavenumber ',wn,' cm^-1' -
trunk/LMDZ.GENERIC/libf/phystd/iostart.F90
r1297 r1315 5 5 INTEGER,SAVE :: nid_start ! NetCDF file identifier for startfi.nc file 6 6 INTEGER,SAVE :: nid_restart ! NetCDF file identifier for restartfi.nc file 7 !$OMP THREADPRIVATE(nid_start,nid_restart) 7 8 8 9 ! restartfi.nc file dimension identifiers: (see open_restartphy()) … … 16 17 INTEGER,SAVE :: idim8 ! "ocean_layers" dimension 17 18 INTEGER,SAVE :: timeindex ! current time index (for time-dependent fields) 19 !$OMP THREADPRIVATE(idim1,idim2,idim3,idim4,idim5,idim6,idim7,timeindex) 18 20 INTEGER,PARAMETER :: length=100 ! size of tab_cntrl array 19 21 … … 473 475 INTEGER :: ierr 474 476 LOGICAL,SAVE :: already_created=.false. 477 !$OMP THREADPRIVATE(already_created) 475 478 476 479 IF (is_master) THEN … … 956 959 INTEGER :: idim1d 957 960 logical,save :: firsttime=.true. 961 !$OMP THREADPRIVATE(firsttime) 958 962 959 963 IF (is_master) THEN -
trunk/LMDZ.GENERIC/libf/phystd/largescale.F90
r1308 r1315 4 4 5 5 ! to use 'getin' 6 use ioipsl_getincom 6 ! use ioipsl_getincom 7 use ioipsl_getincom_p 7 8 use watercommon_h, only : RLVTT, RCPD, RVTMP2, & 8 9 T_h2O_ice_clouds,T_h2O_ice_liq,Psat_waterDP,Lcpdqsat_waterDP … … 47 48 ! Options du programme 48 49 REAL, SAVE :: ratqs ! determine largeur de la distribution de vapeur 50 !$OMP THREADPRIVATE(ratqs) 49 51 50 52 ! Variables locales … … 69 71 DOUBLE PRECISION zx_q(ngrid) 70 72 LOGICAL,SAVE :: firstcall=.true. 73 !$OMP THREADPRIVATE(firstcall) 71 74 72 75 … … 75 78 write(*,*) "value for ratqs? " 76 79 ratqs=0.2 ! default value 77 call getin ("ratqs",ratqs)80 call getin_p("ratqs",ratqs) 78 81 write(*,*) " ratqs = ",ratqs 79 82 -
trunk/LMDZ.GENERIC/libf/phystd/mass_redistribution.F90
r1309 r1315 102 102 ! local saved variables 103 103 LOGICAL, SAVE :: firstcall=.true. 104 !$OMP THREADPRIVATE(firstcall) 104 105 105 106 !---------------------------------------------------------------------- -
trunk/LMDZ.GENERIC/libf/phystd/mod_grid_phy_lmdz.F90
r1216 r1315 12 12 INTEGER,SAVE :: nbp_lev ! == llm 13 13 INTEGER,SAVE :: klon_glo 14 !$OMP THREADPRIVATE(nbp_lon,nbp_lat,nbp_lev,klon_glo) 14 15 15 16 INTERFACE grid1dTo2d_glo -
trunk/LMDZ.GENERIC/libf/phystd/mod_phys_lmdz_mpi_data.F90
r1216 r1315 16 16 INTEGER,SAVE :: klon_mpi_end 17 17 INTEGER,SAVE :: klon_mpi 18 !!$OMP THREADPRIVATE(ii_begin,ii_end,jj_begin,jj_end,jj_nb,ij_begin,& 19 ! !$OMP ij_end,ij_nb,klon_mpi_begin,klon_mpi_end,klon_mpi) 18 20 19 21 INTEGER,SAVE,ALLOCATABLE,DIMENSION(:) :: jj_para_nb … … 31 33 INTEGER,SAVE,ALLOCATABLE,DIMENSION(:) :: klon_mpi_para_begin 32 34 INTEGER,SAVE,ALLOCATABLE,DIMENSION(:) :: klon_mpi_para_end 35 !!$OMP THREADPRIVATE(jj_para_nb,jj_para_begin,jj_para_end,ii_para_begin,ii_para_end,& 36 ! !$OMP ij_para_nb,ij_para_begin,ij_para_end,klon_mpi_para_nb,klon_mpi_para_begin,& 37 ! !$OMP klon_mpi_para_end) 33 38 34 39 … … 38 43 LOGICAL,SAVE :: is_mpi_root 39 44 LOGICAL,SAVE :: is_using_mpi 45 !!$OMP THREADPRIVATE(mpi_rank,mpi_size,mpi_root,is_mpi_root,is_using_mpi) 40 46 41 47 … … 43 49 LOGICAL,SAVE :: is_south_pole 44 50 INTEGER,SAVE :: COMM_LMDZ_PHY 51 !!$OMP THREADPRIVATE(is_north_pole,is_south_pole,COMM_LMDZ_PHY) 45 52 46 53 CONTAINS -
trunk/LMDZ.GENERIC/libf/phystd/mod_phys_lmdz_para.F90
r1216 r1315 13 13 14 14 !$OMP THREADPRIVATE(klon_loc,is_master) 15 !$OMP THREADPRIVATE(is_sequential,is_parallel) 15 16 16 17 CONTAINS -
trunk/LMDZ.GENERIC/libf/phystd/moistadj.F90
r1308 r1315 77 77 INTEGER,SAVE :: i_h2o=0 ! water vapour 78 78 INTEGER,SAVE :: i_ice=0 ! water ice 79 !$OMP THREADPRIVATE(i_h2o,i_ice) 79 80 80 81 LOGICAL,SAVE :: firstcall=.TRUE. 82 !$OMP THREADPRIVATE(firstcall) 81 83 82 84 IF (firstcall) THEN -
trunk/LMDZ.GENERIC/libf/phystd/newsedim.F
r1308 r1315 44 44 45 45 LOGICAL,SAVE :: firstcall=.true. 46 !$OMP THREADPRIVATE(firstcall) 46 47 47 48 c Traceurs : … … 62 63 c local and saved variable 63 64 real,save :: a,b 65 !$OMP THREADPRIVATE(a,b) 64 66 65 67 c ** un petit test de coherence -
trunk/LMDZ.GENERIC/libf/phystd/newstart.F
r1308 r1315 23 23 use datafile_mod, only: datadir 24 24 ! to use 'getin' 25 USE ioipsl_getincom, only: getin 25 ! USE ioipsl_getincom, only: getin 26 USE ioipsl_getincom_p, only: getin_p 26 27 use control_mod, only: day_step, iphysiq, anneeref 27 28 use phyredem, only: physdem0, physdem1 … … 481 482 ! First get the correct value of datadir, if not already done: 482 483 ! default 'datadir' is set in "datafile_mod" 483 call getin ("datadir",datadir)484 call getin_p("datadir",datadir) 484 485 write(*,*) 'Available surface data files are:' 485 486 filestring='ls '//trim(datadir)//' | grep .nc' -
trunk/LMDZ.GENERIC/libf/phystd/newtrelax.F90
r1308 r1315 38 38 real Trelax_V, Trelax_H 39 39 real,allocatable,dimension(:,:),save :: Trelax 40 !$OMP THREADPRIVATE(Trelax) 40 41 41 42 real T_trop ! relaxation temperature at tropopause (K) -
trunk/LMDZ.GENERIC/libf/phystd/ocean_slab_mod.F90
r1308 r1315 26 26 27 27 !LOGICAL, PRIVATE, SAVE :: ok_slab_sic,ok_slab_heaT_h2O_ice_liqBS 28 ! $OMP THREADPRIVATE(ok_slab_sic,ok_slab_heaT_h2O_ice_liqBS)28 !!$OMP THREADPRIVATE(ok_slab_sic,ok_slab_heaT_h2O_ice_liqBS) 29 29 !INTEGER, PRIVATE, SAVE :: slab_ekman, slab_cadj 30 ! $OMP THREADPRIVATE(slab_ekman,slab_cadj)30 !!$OMP THREADPRIVATE(slab_ekman,slab_cadj) 31 31 INTEGER, PRIVATE, SAVE :: lmt_pas, julien, idayvrai 32 32 !$OMP THREADPRIVATE(lmt_pas,julien,idayvrai) -
trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
r1312 r1315 188 188 real, dimension(:,:),allocatable,save :: tsoil ! sub-surface temperatures (K) 189 189 real, dimension(:),allocatable,save :: albedo ! Surface albedo 190 !$OMP THREADPRIVATE(tsurf,tsoil,albedo) 190 191 191 192 real,dimension(:),allocatable,save :: albedo0 ! Surface albedo 192 193 real,dimension(:),allocatable,save :: rnat ! added by BC 194 !$OMP THREADPRIVATE(albedo0,rnat) 193 195 194 196 real,dimension(:),allocatable,save :: emis ! Thermal IR surface emissivity … … 200 202 real,dimension(:,:),allocatable,save :: qsurf ! tracer on surface (e.g. kg.m-2) 201 203 real,dimension(:,:),allocatable,save :: q2 ! Turbulent Kinetic Energy 204 !$OMP THREADPRIVATE(emis,dtrad,fluxrad_sky,fluxrad,capcal,fluxgrd,qsurf,q2) 202 205 203 206 save day_ini, icount 207 !$OMP THREADPRIVATE(day_ini,icount) 204 208 205 209 ! Local variables : … … 227 231 real,dimension(:,:),allocatable,save :: zdtsw ! (K/s) 228 232 real,dimension(:),allocatable,save :: sensibFlux ! turbulent flux given by the atm to the surface 233 !$OMP THREADPRIVATE(fluxsurf_lw,fluxsurf_sw,fluxtop_lw,fluxabs_sw,fluxtop_dn,fluxdyn,OLR_nu,OSR_nu,& 234 !$OMP zdtlw,zdtsw,sensibFlux) 229 235 230 236 real zls ! solar longitude (rad) … … 298 304 real zdtdyn(ngrid,nlayer) 299 305 real,allocatable,dimension(:,:),save :: ztprevious 306 !$OMP THREADPRIVATE(ztprevious) 300 307 real reff(ngrid,nlayer) ! effective dust radius (used if doubleq=T) 301 308 real qtot1,qtot2 ! total aerosol mass … … 312 319 ! reinstated by RW for diagnostic 313 320 real,allocatable,dimension(:),save :: tau_col 321 !$OMP THREADPRIVATE(tau_col) 314 322 315 323 ! included by RW to reduce insanity of code … … 344 352 real dEtot, dEtots, AtmToSurf_TurbFlux 345 353 real,save :: dEtotSW, dEtotsSW, dEtotLW, dEtotsLW 354 !$OMP THREADPRIVATE(dEtotSW, dEtotsSW, dEtotLW, dEtotsLW) 346 355 real dEzRadsw(ngrid,nlayer),dEzRadlw(ngrid,nlayer),dEzdiff(ngrid,nlayer) 347 356 real dEdiffs(ngrid),dEdiff(ngrid) … … 360 369 ! included by BC for hydrology 361 370 real,allocatable,save :: hice(:) 371 !$OMP THREADPRIVATE(hice) 362 372 363 373 ! included by RW to test water conservation (by routine) … … 367 377 logical watertest 368 378 save watertest 379 !$OMP THREADPRIVATE(watertest) 369 380 370 381 ! included by RW for RH diagnostic … … 394 405 real,allocatable,dimension(:,:),save :: cloudfrac 395 406 real,allocatable,dimension(:),save :: totcloudfrac 407 !$OMP THREADPRIVATE(cloudfrac,totcloudfrac) 396 408 397 409 ! included by RW for vdifc water conservation test … … 402 414 ! double precision qsurf_hist(ngrid,nq) 403 415 real,allocatable,dimension(:,:),save :: qsurf_hist 416 !$OMP THREADPRIVATE(qsurf_hist) 404 417 405 418 ! included by RW for temp convadj conservation test … … 416 429 real,allocatable,dimension(:,:,:),save :: reffrad ! aerosol effective radius (m) 417 430 real,allocatable,dimension(:,:,:),save :: nueffrad ! aerosol effective radius variance 431 !$OMP THREADPRIVATE(reffrad,nueffrad) 418 432 ! real :: nueffrad_dummy(ngrid,nlayer,naerkind) !! AS. This is temporary. Check below why. 419 433 real :: reffh2oliq(ngrid,nlayer) ! liquid water particles effective radius (m) … … 429 443 integer num_run 430 444 logical,save :: ice_update 445 !$OMP THREADPRIVATE(ice_initial,ice_min,ice_update) 431 446 432 447 ! included by MS to compute the daily average of rings shadowing … … 447 462 real, dimension(:),allocatable,save :: zmasq 448 463 integer, dimension(:),allocatable,save ::knindex 464 !$OMP THREADPRIVATE(pctsrf_sic,tslab,tsea_ice,sea_ice,zmasq,knindex) 449 465 450 466 real :: tsurf2(ngrid) … … 630 646 ice_update=.false. 631 647 if(sourceevol)then 648 !$OMP MASTER 632 649 open(128,file='num_run',form='formatted', & 633 650 status="old",iostat=ierr) … … 639 656 read(128,*) num_run 640 657 close(128) 658 !$OMP END MASTER 659 !$OMP BARRIER 641 660 642 661 if(num_run.ne.0.and.mod(num_run,2).eq.0)then … … 2196 2215 2197 2216 ! deallocate gas variables 2217 !$OMP BARRIER 2218 !$OMP MASTER 2198 2219 IF ( ALLOCATED( gnom ) ) DEALLOCATE( gnom ) 2199 2220 IF ( ALLOCATED( gfrac ) ) DEALLOCATE( gfrac ) ! both allocated in su_gases.F90 2221 !$OMP END MASTER 2222 !$OMP BARRIER 2200 2223 2201 2224 ! deallocate saved arrays … … 2216 2239 IF ( ALLOCATED(q2)) DEALLOCATE(q2) 2217 2240 IF ( ALLOCATED(ztprevious)) DEALLOCATE(ztprevious) 2241 IF ( ALLOCATED(hice)) DEALLOCATE(hice) 2218 2242 IF ( ALLOCATED(cloudfrac)) DEALLOCATE(cloudfrac) 2219 2243 IF ( ALLOCATED(totcloudfrac)) DEALLOCATE(totcloudfrac) … … 2236 2260 IF ( ALLOCATED(zdtsw)) DEALLOCATE(zdtsw) 2237 2261 IF ( ALLOCATED(tau_col)) DEALLOCATE(tau_col) 2262 IF ( ALLOCATED(pctsrf_sic)) DEALLOCATE(pctsrf_sic) 2263 IF ( ALLOCATED(tslab)) DEALLOCATE(tslab) 2264 IF ( ALLOCATED(tsea_ice)) DEALLOCATE(tsea_ice) 2265 IF ( ALLOCATED(sea_ice)) DEALLOCATE(sea_ice) 2266 IF ( ALLOCATED(zmasq)) DEALLOCATE(zmasq) 2267 IF ( ALLOCATED(knindex)) DEALLOCATE(knindex) 2238 2268 2239 2269 !! this is defined in comsaison_h -
trunk/LMDZ.GENERIC/libf/phystd/planete_mod.F90
r1308 r1315 17 17 REAL :: p_elips 18 18 19 REAL :: preff ! reference surface pressure (Pa) 20 REAL,ALLOCATABLE :: ap(:) ! hybrid coordinate at layer interface 21 REAL,ALLOCATABLE :: bp(:) ! hybrid coordinate at layer interface 19 REAL :: preff ! reference surface pressure (Pa) !read by master 20 REAL,ALLOCATABLE :: ap(:) ! hybrid coordinate at layer interface !read by master 21 REAL,ALLOCATABLE :: bp(:) ! hybrid coordinate at layer interface !read by master 22 22 23 23 CONTAINS … … 31 31 real,intent(in) :: bp_dyn(nlayer+1) ! hybrid coordinate at interfaces 32 32 33 !$OMP MASTER 33 34 allocate(ap(nlayer+1)) 34 35 allocate(bp(nlayer+1)) … … 37 38 ap(:)=ap_dyn(:) 38 39 bp(:)=bp_dyn(:) 40 !$OMP END MASTER 41 !$OMP BARRIER 39 42 40 43 end subroutine ini_planete_mod -
trunk/LMDZ.GENERIC/libf/phystd/radcommon_h.F90
r1194 r1315 61 61 ! gIR : mean assymetry factor 62 62 63 REAL*8 BWNI(L_NSPECTI+1), WNOI(L_NSPECTI), DWNI(L_NSPECTI), WAVEI(L_NSPECTI) 64 REAL*8 BWNV(L_NSPECTV+1), WNOV(L_NSPECTV), DWNV(L_NSPECTV), WAVEV(L_NSPECTV) 63 REAL*8 BWNI(L_NSPECTI+1), WNOI(L_NSPECTI), DWNI(L_NSPECTI), WAVEI(L_NSPECTI) !BWNI read by master in setspi 64 REAL*8 BWNV(L_NSPECTV+1), WNOV(L_NSPECTV), DWNV(L_NSPECTV), WAVEV(L_NSPECTV) !BWNV read by master in setspv 65 65 REAL*8 STELLARF(L_NSPECTV), TAURAY(L_NSPECTV), TAURAYVAR(L_NSPECTV) 66 !$OMP THREADPRIVATE(WNOI,DWNI,WAVEI,& 67 !$OMP WNOV,DWNV,WAVEV,& 68 !$OMP STELLARF,TAURAY,TAURAYVAR) 66 69 67 70 REAL*8 blami(L_NSPECTI+1) 68 71 REAL*8 blamv(L_NSPECTV+1) ! these are needed by suaer.F90 72 !$OMP THREADPRIVATE(blami,blamv) 69 73 70 74 !! AS: introduced to avoid doing same computations again for continuum 71 75 INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: indi 72 76 INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: indv 77 !$OMP THREADPRIVATE(indi,indv) 73 78 74 79 !!! ALLOCATABLE STUFF SO THAT DIMENSIONS ARE READ in *.dat FILES -- AS 12/2011 … … 79 84 real*8 pgasmin, pgasmax 80 85 real*8 tgasmin, tgasmax 86 !$OMP THREADPRIVATE(gasi,gasv,& !wrefvar,pgasref,tgasref,pfgasref read by master in sugas_corrk 87 !$OMP FZEROI,FZEROV) !pgasmin,pgasmax,tgasmin,tgasmax read by master in sugas_corrk 81 88 82 89 real QVISsQREF(L_NSPECTV,naerkind,nsizemax) … … 86 93 real omegair(L_NSPECTI,naerkind,nsizemax) 87 94 real gir(L_NSPECTI,naerkind,nsizemax) 95 !$OMP THREADPRIVATE(QVISsQREF,omegavis,gvis,QIRsQREF,omegair,gir) 88 96 89 97 … … 102 110 103 111 DOUBLE PRECISION :: radiustab(naerkind,2,nsizemax) 112 !$OMP THREADPRIVATE(lamrefir,lamrefvis,radiustab) !nsize read by suaer_corrk 104 113 105 114 ! Extinction coefficient at reference wavelengths; … … 121 130 122 131 real*8 gweight(L_NGAUSS) 132 !$OMP THREADPRIVATE(QREFvis,QREFir,omegaREFvis,omegaREFir,& ! gweight read by master in sugas_corrk 133 !$OMP tstellar,planckir,PTOP,TAUREF) 123 134 124 135 ! If the gas optical depth (top to the surface) is less than … … 137 148 real*8 glat_ig 138 149 save glat_ig 150 !$OMP THREADPRIVATE(Cmk,glat_ig) 139 151 140 152 ! extinction of incoming sunlight (Saturn's rings, eclipses, etc...) … … 143 155 !Latitude-dependent gravity 144 156 REAL, DIMENSION(:), ALLOCATABLE :: glat 157 !$OMP THREADPRIVATE(glat,eclipse) 145 158 146 159 end module radcommon_h -
trunk/LMDZ.GENERIC/libf/phystd/radii_mod.F90
r1308 r1315 12 12 real, save :: Nmix_h2o 13 13 real, save :: Nmix_h2o_ice 14 !$OMP THREADPRIVATE(rad_h2o,rad_h2o_ice,Nmix_h2o,Nmix_h2o_ice) 14 15 real, parameter :: coef_chaud=0.13 15 16 real, parameter :: coef_froid=0.09 … … 32 33 !================================================================== 33 34 ! to use 'getin' 34 use ioipsl_getincom 35 ! use ioipsl_getincom 36 use ioipsl_getincom_p 35 37 use radinc_h, only: naerkind 36 38 use aerosol_mod … … 49 51 50 52 logical, save :: firstcall=.true. 53 !$OMP THREADPRIVATE(firstcall) 51 54 integer :: iaer 52 55 … … 99 102 write(*,*)"radius of H2O water particles:" 100 103 rad_h2o=13. ! default value 101 call getin ("rad_h2o",rad_h2o)104 call getin_p("rad_h2o",rad_h2o) 102 105 write(*,*)" rad_h2o = ",rad_h2o 103 106 104 107 write(*,*)"radius of H2O ice particles:" 105 108 rad_h2o_ice=35. ! default value 106 call getin ("rad_h2o_ice",rad_h2o_ice)109 call getin_p("rad_h2o_ice",rad_h2o_ice) 107 110 write(*,*)" rad_h2o_ice = ",rad_h2o_ice 108 111 … … 111 114 write(*,*)"Number mixing ratio of H2O water particles:" 112 115 Nmix_h2o=1.e6 ! default value 113 call getin ("Nmix_h2o",Nmix_h2o)116 call getin_p("Nmix_h2o",Nmix_h2o) 114 117 write(*,*)" Nmix_h2o = ",Nmix_h2o 115 118 116 119 write(*,*)"Number mixing ratio of H2O ice particles:" 117 120 Nmix_h2o_ice=Nmix_h2o ! default value 118 call getin ("Nmix_h2o_ice",Nmix_h2o_ice)121 call getin_p("Nmix_h2o_ice",Nmix_h2o_ice) 119 122 write(*,*)" Nmix_h2o_ice = ",Nmix_h2o_ice 120 123 endif -
trunk/LMDZ.GENERIC/libf/phystd/radinc_h.F90
r728 r1315 63 63 ! These are set in sugas_corrk 64 64 ! [uses allocatable arrays] -- AS 12/2011 65 integer :: L_NPREF, L_NTREF, L_REFVAR, L_PINT 65 integer :: L_NPREF, L_NTREF, L_REFVAR, L_PINT !L_NPREF, L_NTREF, L_REFVAR, L_PINT read by master in sugas_corrk 66 66 67 67 integer, parameter :: L_NGAUSS = 17 … … 92 92 character (len=100) :: corrkdir 93 93 save corrkdir 94 !$OMP THREADPRIVATE(corrkdir) 94 95 95 96 character (len=100) :: banddir 96 97 save banddir 98 !$OMP THREADPRIVATE(banddir) 97 99 98 100 end module radinc_h -
trunk/LMDZ.GENERIC/libf/phystd/rain.F90
r1308 r1315 2 2 3 3 4 use ioipsl_getincom, only: getin 4 ! to use 'getin' 5 ! use ioipsl_getincom 6 use ioipsl_getincom_p 5 7 use watercommon_h, only: T_h2O_ice_liq,T_h2O_ice_clouds, RLVTT, RCPD, RCPV, RV, RVTMP2,Psat_water,Tsat_water,rhowater 6 8 use radii_mod, only: h2o_cloudrad … … 63 65 REAL,PARAMETER :: Kboucher=1.19E8 64 66 REAL,SAVE :: c1 67 !$OMP THREADPRIVATE(precip_scheme,rainthreshold,cloud_sat,precip_timescale,Cboucher,c1) 65 68 66 69 INTEGER,PARAMETER :: ninter=5 67 70 68 71 logical,save :: evap_prec ! Does the rain evaporate? 72 !$OMP THREADPRIVATE(evap_prec) 69 73 70 74 ! for simple scheme … … 93 97 INTEGER, SAVE :: i_vap=0 ! water vapour 94 98 INTEGER, SAVE :: i_ice=0 ! water ice 99 !$OMP THREADPRIVATE(i_vap,i_ice) 95 100 96 101 LOGICAL,SAVE :: firstcall=.true. 102 !$OMP THREADPRIVATE(firstcall) 97 103 98 104 ! Online functions … … 115 121 write(*,*) "Precipitation scheme to use?" 116 122 precip_scheme=1 ! default value 117 call getin ("precip_scheme",precip_scheme)123 call getin_p("precip_scheme",precip_scheme) 118 124 write(*,*) " precip_scheme = ",precip_scheme 119 125 … … 121 127 write(*,*) "rainthreshold in simple scheme?" 122 128 rainthreshold=0. ! default value 123 call getin ("rainthreshold",rainthreshold)129 call getin_p("rainthreshold",rainthreshold) 124 130 write(*,*) " rainthreshold = ",rainthreshold 125 131 … … 127 133 write(*,*) "cloud water saturation level in non simple scheme?" 128 134 cloud_sat=2.6e-4 ! default value 129 call getin ("cloud_sat",cloud_sat)135 call getin_p("cloud_sat",cloud_sat) 130 136 write(*,*) " cloud_sat = ",cloud_sat 131 137 write(*,*) "precipitation timescale in non simple scheme?" 132 138 precip_timescale=3600. ! default value 133 call getin ("precip_timescale",precip_timescale)139 call getin_p("precip_timescale",precip_timescale) 134 140 write(*,*) " precip_timescale = ",precip_timescale 135 141 … … 137 143 write(*,*) "multiplicative constant in Boucher 95 precip scheme" 138 144 Cboucher=1. ! default value 139 call getin ("Cboucher",Cboucher)145 call getin_p("Cboucher",Cboucher) 140 146 write(*,*) " Cboucher = ",Cboucher 141 147 c1=1.00*1.097/rhowater*Cboucher*Kboucher … … 145 151 write(*,*) "re-evaporate precipitations?" 146 152 evap_prec=.true. ! default value 147 call getin ("evap_prec",evap_prec)153 call getin_p("evap_prec",evap_prec) 148 154 write(*,*) " evap_prec = ",evap_prec 149 155 -
trunk/LMDZ.GENERIC/libf/phystd/setspi.F90
r997 r1315 92 92 endif 93 93 94 !$OMP MASTER 94 95 nb=0 95 96 ierr=0 … … 121 122 BWNI(L_NSPECTI) =lastband(1) 122 123 BWNI(L_NSPECTI+1)=lastband(2) 124 !$OMP END MASTER 125 !$OMP BARRIER 123 126 124 127 print*,'' -
trunk/LMDZ.GENERIC/libf/phystd/setspv.F90
r997 r1315 69 69 call abort 70 70 endif 71 71 72 !$OMP MASTER 72 73 nb=0 73 74 ierr=0 … … 98 99 BWNV(L_NSPECTV) =lastband(1) 99 100 BWNV(L_NSPECTV+1)=lastband(2) 100 101 !$OMP END MASTER 102 !$OMP BARRIER 101 103 102 104 print*,'setspv: VI band limits:' -
trunk/LMDZ.GENERIC/libf/phystd/soil.F
r1308 r1315 45 45 real,dimension(:,:),save,allocatable :: beta ! beta_k coefficients 46 46 real,save :: mu 47 !$OMP THREADPRIVATE(mthermdiff,thermdiff,coefq,coefd,alph,beta,mu) 47 48 48 49 ! local variables: -
trunk/LMDZ.GENERIC/libf/phystd/stokes.F90
r253 r1315 33 33 real a,b,molrad,visc 34 34 save a,b 35 !$OMP THREADPRIVATE(a,b) 35 36 36 37 LOGICAL firstcall 37 38 SAVE firstcall 38 39 DATA firstcall/.true./ 40 !$OMP THREADPRIVATE(firstcall) 39 41 40 42 if (firstcall) then -
trunk/LMDZ.GENERIC/libf/phystd/su_gases.F90
r869 r1315 20 20 !================================================================== 21 21 22 !$OMP MASTER 22 23 ! load gas names from file 'gases.def' 23 24 open(90,file='gases.def',status='old',form='formatted',iostat=ierr) … … 122 123 endif 123 124 close(90) 125 !$OMP END MASTER 126 !$OMP BARRIER 124 127 125 128 end subroutine su_gases -
trunk/LMDZ.GENERIC/libf/phystd/suaer_corrk.F90
r1026 r1315 46 46 #include "callkeys.h" 47 47 ! Optical properties (read in external ASCII files) 48 INTEGER 49 ! the domain (VIS or IR) 48 INTEGER,SAVE :: nwvl ! Number of wavelengths in 49 ! the domain (VIS or IR), read by master 50 50 51 51 ! REAL :: solsir ! visible to infrared ratio … … 53 53 54 54 REAL, DIMENSION(:),& 55 ALLOCATABLE, SAVE :: wvl ! Wavelength axis 55 ALLOCATABLE, SAVE :: wvl ! Wavelength axis, read by master 56 56 REAL, DIMENSION(:),& 57 ALLOCATABLE, SAVE :: radiusdyn ! Particle size axis 57 ALLOCATABLE, SAVE :: radiusdyn ! Particle size axis, read by master 58 58 59 59 REAL, DIMENSION(:,:),& 60 ALLOCATABLE, SAVE :: ep,& ! Extinction coefficient Qext 61 omeg,& ! Single Scattering Albedo 62 gfactor ! Assymetry Factor 60 ALLOCATABLE, SAVE :: ep,& ! Extinction coefficient Qext, read by master 61 omeg,& ! Single Scattering Albedo, read by master 62 gfactor ! Assymetry Factor, read by master 63 63 64 64 ! Local variables: … … 98 98 99 99 CHARACTER(LEN=30), DIMENSION(naerkind,2), SAVE :: file_id 100 !$OMP THREADPRIVATE(file_id) 100 101 !---- Please indicate the names of the optical property files below 101 102 ! Please also choose the reference wavelengths of each aerosol … … 203 204 ! 1.1 Open the ASCII file 204 205 206 !$OMP MASTER 205 207 INQUIRE(FILE=TRIM(datadir)//& 206 208 '/'//TRIM(file_id(iaer,idomain)),& … … 339 341 endif 340 342 343 !$OMP END MASTER 344 !$OMP BARRIER 341 345 342 346 … … 432 436 !======================================================================== 433 437 434 DEALLOCATE(wvl) ! wvl 435 DEALLOCATE(radiusdyn) ! radiusdyn 436 DEALLOCATE(ep) ! ep 437 DEALLOCATE(omeg) ! omeg 438 DEALLOCATE(gfactor) ! g 438 !$OMP BARRIER 439 !$OMP MASTER 440 IF (ALLOCATED(wvl)) DEALLOCATE(wvl) ! wvl 441 IF (ALLOCATED(radiusdyn)) DEALLOCATE(radiusdyn) ! radiusdyn 442 IF (ALLOCATED(ep)) DEALLOCATE(ep) ! ep 443 IF (ALLOCATED(omeg)) DEALLOCATE(omeg) ! omeg 444 IF (ALLOCATED(gfactor)) DEALLOCATE(gfactor) ! g 445 !$OMP END MASTER 446 !$OMP BARRIER 439 447 440 448 END DO ! Loop on iaer -
trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90
r1297 r1315 28 28 29 29 use gases_h 30 use ioipsl_getincom 30 ! use ioipsl_getincom 31 use ioipsl_getincom_p 31 32 implicit none 32 33 … … 45 46 46 47 ! ALLOCATABLE ARRAYS -- AS 12/2011 47 REAL*8, DIMENSION(:,:,:,:,:), ALLOCATABLE :: gasi8, gasv848 character*20,allocatable,DIMENSION(:) :: gastype ! for check with gnom48 REAL*8, DIMENSION(:,:,:,:,:), ALLOCATABLE,SAVE :: gasi8, gasv8 !read by master 49 character*20,allocatable,DIMENSION(:),SAVE :: gastype ! for check with gnom, read by master 49 50 50 51 real*8 x, xi(4), yi(4), ans, p … … 76 77 endif 77 78 79 !$OMP MASTER 78 80 ! check that database matches varactive toggle 79 81 open(111,file=TRIM(file_path),form='formatted') … … 261 263 tgasmin = tgasref(1) 262 264 tgasmax = tgasref(L_NTREF) 265 !$OMP END MASTER 266 !$OMP BARRIER 263 267 264 268 !----------------------------------------------------------------------- … … 302 306 write(*,*)"graybody: constant absorption coefficient in visible:" 303 307 kappa_VI=-100000. 304 call getin ("kappa_VI",kappa_VI)308 call getin_p("kappa_VI",kappa_VI) 305 309 write(*,*)" kappa_VI = ",kappa_VI 306 310 kappa_VI=kappa_VI*1.e4* mugaz * 1.672621e-27 ! conversion from m^2/kg to cm^2/molecule … … 309 313 write(*,*)"graybody: constant absorption coefficient in InfraRed:" 310 314 kappa_IR=-100000. 311 call getin ("kappa_IR",kappa_IR)315 call getin_p("kappa_IR",kappa_IR) 312 316 write(*,*)" kappa_IR = ",kappa_IR 313 317 kappa_IR=kappa_IR*1.e4* mugaz * 1.672621e-27 ! conversion from m^2/kg to cm^2/molecule … … 320 324 End if 321 325 326 !$OMP MASTER 322 327 ! print*,corrkdir(1:4) 323 328 ! VISIBLE … … 361 366 gasv8(1:L_NTREF,1:L_NPREF,1:L_REFVAR,1:L_NSPECTV,1:L_NGAUSS)=0.0 362 367 endif 368 !$OMP END MASTER 369 !$OMP BARRIER 363 370 364 371 ! INFRA-RED 365 372 if ((corrkdir(1:4).eq.'null'))then !.or.(TRIM(corrkdir).eq.'null_LowTeffStar')) then 366 373 print*,'Infrared corrk gaseous absorption is set to zero if graybody=F' 374 !$OMP MASTER 367 375 gasi8(1:L_NTREF,1:L_NPREF,1:L_REFVAR,1:L_NSPECTI,1:L_NGAUSS)=0.0 368 else 376 !$OMP END MASTER 377 !$OMP BARRIER 378 else 369 379 file_id='/corrk_data/'//trim(adjustl(banddir))//'/corrk_gcm_IR.dat' 370 380 file_path=TRIM(datadir)//TRIM(file_id) … … 379 389 endif 380 390 391 !$OMP MASTER 381 392 open(111,file=TRIM(file_path),form='formatted') 382 393 read(111,*) gasi8 383 394 close(111) 395 !$OMP END MASTER 396 !$OMP BARRIER 384 397 385 398 ! 'fzero' is a currently unused feature that allows optimisation … … 423 436 endif 424 437 438 !$OMP MASTER 425 439 if(nIR_limit.eq.0) then 426 440 gasi8(1:L_NTREF,1:L_NPREF,1:L_REFVAR,1:L_NSPECTI,1:L_NGAUSS)= & … … 465 479 end do 466 480 end do 481 !$OMP END MASTER 482 !$OMP BARRIER 467 483 468 484 ! Interpolate the values: first the longwave … … 653 669 654 670 ! Deallocate local arrays 671 !$OMP BARRIER 672 !$OMP MASTER 655 673 IF( ALLOCATED( gasi8 ) ) DEALLOCATE( gasi8 ) 656 674 IF( ALLOCATED( gasv8 ) ) DEALLOCATE( gasv8 ) 657 675 IF( ALLOCATED( pgasref ) ) DEALLOCATE( pgasref ) 658 676 IF( ALLOCATED( gastype ) ) DEALLOCATE( gastype ) 677 !$OMP END MASTER 678 !$OMP BARRIER 659 679 660 680 return -
trunk/LMDZ.GENERIC/libf/phystd/surfdat_h.F90
r787 r1315 5 5 6 6 real,allocatable,dimension(:) :: albedodat ! albedo of bare ground 7 !$OMP THREADPRIVATE(albedodat) 7 8 ! Ehouarn: moved inertiedat to comsoil.h 8 9 ! real inertiedat, ! thermal inertia 9 10 real,allocatable,dimension(:) :: phisfi ! geopotential at ground level 11 !$OMP THREADPRIVATE(phisfi) 10 12 real,dimension(2) :: albedice 11 13 real,dimension(2) :: emisice ! ice emissivity; 1:Northern hemisphere 2:Southern hemisphere 12 14 real emissiv 13 15 real,dimension(2) :: iceradius, dtemisice 16 !$OMP THREADPRIVATE(albedice,emisice,emissiv,iceradius,dtemisice) 14 17 real,allocatable,dimension(:) :: zmea,zstd,zsig,zgam,zthe 18 !$OMP THREADPRIVATE(zmea,zstd,zsig,zgam,zthe) 15 19 16 20 real,allocatable,dimension(:) :: dryness !"Dryness coefficient" for grnd water ice sublimation … … 18 22 19 23 logical,allocatable,dimension(:) :: watercaptag !! was in watercap.h 24 !$OMP THREADPRIVATE(dryness,watercaptag) 20 25 21 26 end module surfdat_h -
trunk/LMDZ.GENERIC/libf/phystd/tracer_h.F90
r787 r1315 19 19 real rho_co2 ! CO2 ice density (kg.m-3) 20 20 real ref_r0 ! for computing reff=ref_r0*r0 (in log.n. distribution) 21 !$OMP THREADPRIVATE(noms,mmol,radius,rho_q,qext,alpha_lift,alpha_devil,qextrhor, & 22 !$OMP varian,r3n_q,rho_dust,rho_ice,rho_co2,ref_r0) 21 23 22 24 ! tracer indexes: these are initialized in initracer and should be 0 if the … … 47 49 integer :: igcm_ar_n2 ! for simulations using co2 +neutral gaz 48 50 integer :: igcm_co2_ice ! CO2 ice 51 !$OMP THREADPRIVATE(igcm_dustbin,igcm_dust_mass,igcm_dust_number,igcm_h2o_vap,igcm_h2o_ice, & 52 !$OMP igcm_co2,igcm_co,igcm_o,igcm_o1d,igcm_o2,igcm_o3,igcm_h,igcm_h2,igcm_oh, & 53 !$OMP igcm_ho2,igcm_h2o2,igcm_n2,igcm_ar,igcm_ar_n2,igcm_co2_ice) 49 54 50 55 end module tracer_h -
trunk/LMDZ.GENERIC/libf/phystd/turbdiff.F90
r1308 r1315 107 107 108 108 LOGICAL,SAVE :: firstcall=.true. 109 !$OMP THREADPRIVATE(firstcall) 109 110 110 111 ! Tracers … … 124 125 125 126 integer, save :: ivap, iliq, iliq_surf,iice_surf ! also make liq for clarity on surface... 127 !$OMP THREADPRIVATE(ivap,iliq,iliq_surf,iice_surf) 126 128 127 129 real, parameter :: karman=0.4 -
trunk/LMDZ.GENERIC/libf/phystd/vdif_cd.F
r135 r1315 55 55 DATA firstcal/.true./ 56 56 SAVE b,c,d,karman,c2b,c3bc,c3b,firstcal,umin2 57 !$OMP THREADPRIVATE(b,c,d,karman,c2b,c3bc,c3b,firstcal,umin2) 57 58 58 59 c----------------------------------------------------------------------- -
trunk/LMDZ.GENERIC/libf/phystd/vdifc.F
r1308 r1315 96 96 LOGICAL firstcall 97 97 SAVE firstcall 98 !$OMP THREADPRIVATE(firstcall) 98 99 99 100 LOGICAL lastcall … … 105 106 ! REAL acond,bcond 106 107 ! SAVE acond,bcond 108 !!$OMP THREADPRIVATE(acond,bcond) 107 109 ! DATA latcond,tcond1mb/5.9e5,136.27/ 108 110 … … 132 134 integer ivap, iice ! also make liq for clarity on surface... 133 135 save ivap, iice 136 !$OMP THREADPRIVATE(ivap,iice) 134 137 135 138 real, parameter :: karman=0.4 -
trunk/LMDZ.GENERIC/libf/phystd/watercommon_h.F90
r1255 r1315 19 19 20 20 real, save :: epsi, RCPD, RCPV, RV, RVTMP2 21 !$OMP THREADPRIVATE(epsi,RCPD,RCPV,RV,RVTMP2) 21 22 22 23 contains -
trunk/LMDZ.GENERIC/libf/phystd/writediagfi.F
r1216 r1315 68 68 69 69 real*4,save :: date 70 !$OMP THREADPRIVATE(date) 70 71 71 72 REAL phis(ip1jmp1) … … 78 79 integer,save :: zitau=0 79 80 character(len=20),save :: firstnom='1234567890' 81 !$OMP THREADPRIVATE(zitau,firstnom) 80 82 81 83 ! Ajouts 82 84 integer, save :: ntime=0 85 !$OMP THREADPRIVATE(ntime) 83 86 integer :: idim,varid 84 87 integer :: nid … … 95 98 character(len=120),save :: nom_def(n_nom_def_max) 96 99 logical,save :: firstcall=.true. 100 !$OMP THREADPRIVATE(firstcall) !diagfi_def,n_nom_def,nom_def read in diagfi.def 97 101 98 102 #ifndef MESOSCALE … … 128 132 firstcall=.false. 129 133 134 !$OMP MASTER 130 135 ! Open diagfi.def definition file if there is one: 131 136 open(99,file="diagfi.def",status='old',form='formatted', … … 151 156 diagfi_def=.false. 152 157 endif 158 !$OMP END MASTER 159 !$OMP BARRIER 153 160 END IF ! of IF (firstcall) 154 161 -
trunk/LMDZ.GENERIC/libf/phystd/writediagsoil.F90
r1216 r1315 46 46 character(len=20),save :: firstname="1234567890" 47 47 integer,save :: zitau=0 48 !$OMP THREADPRIVATE(date,isample,ntime,firstname,zitau) 48 49 49 50 character(len=30) :: filename="diagsoil.nc" -
trunk/LMDZ.GENERIC/libf/phystd/writediagspecIR.F
r1308 r1315 91 91 data firstnom /'1234567890'/ 92 92 data zitau /0/ 93 !$OMP THREADPRIVATE(firstnom,zitau,date) 93 94 94 95 ! Ajouts 95 96 integer, save :: ntime=0 97 !$OMP THREADPRIVATE(ntime) 96 98 integer :: idim,varid 97 99 integer :: nid -
trunk/LMDZ.GENERIC/libf/phystd/writediagspecVI.F
r1308 r1315 91 91 data firstnom /'1234567890'/ 92 92 data zitau /0/ 93 !$OMP THREADPRIVATE(firstnom,zitau,date) 93 94 94 95 ! Ajouts 95 96 integer, save :: ntime=0 97 !$OMP THREADPRIVATE(ntime) 96 98 integer :: idim,varid 97 99 integer :: nid -
trunk/LMDZ.GENERIC/libf/phystd/wstats.F90
r1308 r1315 22 22 character (len=50) :: namebis 23 23 character (len=50), save :: firstvar 24 !$OMP THREADPRIVATE(firstvar) 24 25 integer :: ierr,varid,nbdim,nid 25 26 integer :: meanid,sdid … … 30 31 31 32 integer, save :: step=0 33 !$OMP THREADPRIVATE(firstcall,indx,step) 32 34 33 35 ! Added to work in parallel mode
Note: See TracChangeset
for help on using the changeset viewer.