- Timestamp:
- Jan 18, 2022, 4:28:31 PM (3 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2615 r2616 3595 3595 3596 3596 == 18/01/2022 == RV 3597 Put all the "save" variables as "!$OMP THREADPRIVATE" in aeronomars 3597 Put all the "save" variables as "!$OMP THREADPRIVATE" in phymars. 3598 The code can now be tested (comparison between restart(fi), diagfi files) 3599 Compile with the option : -parallel mpi_omp, add these lines in the bash: 3600 export OMP_NUM_THREADS= N 3601 export OMP_STACKSIZE=200M 3602 with "N" of the order of #levels/10 3603 -
trunk/LMDZ.MARS/libf/phymars/calldrag_noro_mod.F
r1912 r2616 108 108 109 109 LOGICAL firstcall 110 111 !$OMP THREADPRIVATE(firstcall) 112 110 113 DATA firstcall/.true./ 111 114 SAVE firstcall -
trunk/LMDZ.MARS/libf/phymars/callsedim_mod.F
r2589 r2616 102 102 ! ! CCNs (m) 103 103 real,save :: beta ! correction for the shape of the ice particles (cf. newsedim) 104 105 !$OMP THREADPRIVATE(beta) 106 104 107 c for ice radius computation 105 108 REAL Mo,No … … 128 131 real,parameter :: rdimin=1.e-8 ! 1.e-7 129 132 real,parameter :: rdimax=1.e-4 133 134 !$OMP THREADPRIVATE(rd,rdi) 130 135 131 136 c 2) Second size distribution for the log-normal integration … … 138 143 real sigma0 139 144 145 !$OMP THREADPRIVATE(rr) 146 140 147 c 3) Other local variables used in doubleq 141 148 … … 164 171 INTEGER,SAVE :: iccnco2_meteor_mass ! index of tracer containing CCN number 165 172 INTEGER,SAVE :: ico2_ice ! index of tracer containing CCN number 173 174 !$OMP THREADPRIVATE(idust_mass,idust_number,iccn_mass,iccn_number) 175 !$OMP THREADPRIVATE(istormdust_mass,istormdust_number,itopdust_mass) 176 !$OMP THREADPRIVATE(itopdust_number) 177 !$OMP THREADPRIVATE(iccnco2_number,iccnco2_mass,iccnco2_h2o_number) 178 !$OMP THREADPRIVATE(iccnco2_h2o_mass_ice) 179 !$OMP THREADPRIVATE(iccnco2_h2o_mass_ccn,ico2_ice) 166 180 167 181 168 182 LOGICAL,SAVE :: firstcall=.true. 183 184 !$OMP THREADPRIVATE(firstcall) 169 185 170 186 -
trunk/LMDZ.MARS/libf/phymars/co2cloud.F90
r2589 r2616 208 208 logical, save :: & 209 209 firstcall = .true. ! Used to compute saved variables 210 211 !$OMP THREADPRIVATE(imicroco2,sigma_iceco2,microtimestep) 212 !$OMP THREADPRIVATE(dev2,Qext1bins,Qextv1mic,radv,rb_cldco2) 213 !$OMP THREADPRIVATE(firstcall) 214 210 215 !----------------------------------------------------------------------------------------------------------------------! 211 216 !-----3) Variables: -
trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F
r2601 r2616 4 4 5 5 logical, save :: scavco2cond = .false. ! flag for using scavenging_by_co2 6 !$OMP THREADPRIVATE(scavco2cond) 6 7 7 8 CONTAINS … … 131 132 132 133 real :: emisref(ngrid) 134 !$OMP THREADPRIVATE(emisref) 133 135 134 136 REAL zdq_scav(ngrid,nlayer,nq) ! tendency due to scavenging by co2 … … 156 158 157 159 LOGICAL,SAVE :: firstcall = .true. !,firstcall2=.true. 160 161 !$OMP THREADPRIVATE(ico2,qco2,mmean,acond,bcond,ccond,m_co2,m_noco2) 162 !$OMP THREADPRIVATE(A,B,firstcall) 158 163 159 164 c D.BARDET: for debug … … 166 171 REAL masseq(nlayer),wq(nlayer+1) 167 172 INTEGER ifils,iq2 173 168 174 c---------------------------------------------------------------------- 169 175 -
trunk/LMDZ.MARS/libf/phymars/co2snow.F
r2447 r2616 90 90 logical, save :: 91 91 & firstcall = .true. 92 93 !$OMP THREADPRIVATE(Kscat,firstcall) 94 92 95 c======================================================================= 93 96 c BEGIN -
trunk/LMDZ.MARS/libf/phymars/comm_wrf.F90
r1590 r2616 17 17 REAL,SAVE,ALLOCATABLE :: comm_TAU_ICE(:) 18 18 REAL,SAVE,ALLOCATABLE :: comm_RICE(:,:) 19 20 !$OMP THREADPRIVATE(comm_HR_LW,comm_HR_SW,comm_ICETOT,comm_MTOT,comm_QSURFDUST) 21 !$OMP THREADPRIVATE(comm_RDUST,comm_RICE,comm_SWDOWNZ,comm_TAU_DUST,comm_TAU_ICE) 22 !$OMP THREADPRIVATE(comm_VMR_ICE) 19 23 20 24 contains -
trunk/LMDZ.MARS/libf/phymars/compute_dtau_mod.F90
r2417 r2616 8 8 REAL,SAVE,ALLOCATABLE :: dtau(:) ! Dust opacity difference (at 610Pa) 9 9 ! between GCM and dust scenario 10 11 !$OMP THREADPRIVATE(ti_injection_sol,tf_injection_sol,dtau) 10 12 11 13 CONTAINS … … 44 46 45 47 LOGICAL, SAVE :: firstcall=.TRUE. ! signals first call to physics 48 49 !$OMP THREADPRIVATE(nb_daystep,local_time_prev,firstcall) 46 50 47 51 -
trunk/LMDZ.MARS/libf/phymars/comsoil_h.F90
r2578 r2616 14 14 ! soil_settings.F) 15 15 16 !$OMP THREADPRIVATE(layer,mlayer,inertiedat )16 !$OMP THREADPRIVATE(layer,mlayer,inertiedat,volcapa) 17 17 18 18 ! variables (FC: built in firstcall in soil.F) -
trunk/LMDZ.MARS/libf/phymars/dimphy.F90
r1130 r2616 7 7 ! INTEGER,SAVE :: kflev 8 8 9 !$OMP THREADPRIVATE(klon )9 !$OMP THREADPRIVATE(klon,klev,klevp1,klevm1) 10 10 11 11 CONTAINS -
trunk/LMDZ.MARS/libf/phymars/dust_rad_adjust_mod.F90
r2584 r2616 40 40 real :: weight ! interpolation weight 41 41 real,save :: zday_prev_call=-666. ! stored value of zday from previous call 42 43 !$OMP THREADPRIVATE( local_time,local_time_prevdt,zday_scenario,zday_scenario_next) 44 !$OMP THREADPRIVATE(firstcall,tau_pref_scenario_next,zday_prev_call) 45 42 46 43 47 ! 0. preliminary stuff -
trunk/LMDZ.MARS/libf/phymars/dustlift.F
r1266 r2616 48 48 SAVE stress_seuil 49 49 DATA stress_seuil/0.0225/ ! stress seuil soulevement (N.m2) 50 51 !$OMP THREADPRIVATE(stress_seuil) 50 52 51 53 #ifdef MESOSCALE -
trunk/LMDZ.MARS/libf/phymars/eofdump_mod.F90
r2398 r2616 37 37 38 38 LOGICAL,SAVE :: firstcall=.true. 39 40 !$OMP THREADPRIVATE(count,firstcall) 39 41 40 42 !------------------------------------------------------- … … 95 97 logical,save :: firstcall=.true. 96 98 integer,save :: npgrid 99 100 !$OMP THREADPRIVATE(firstcall,npgrid) 97 101 98 102 -
trunk/LMDZ.MARS/libf/phymars/improvedclouds_mod.F
r2437 r2616 71 71 DATA firstcall/.true./ 72 72 SAVE firstcall 73 74 !$OMP THREADPRIVATE(firstcall) 73 75 74 76 REAL*8 derf ! Error function … … 123 125 DOUBLE PRECISION dr_cld(nbin_cld) ! width of each rad_cld bin (m) 124 126 DOUBLE PRECISION vol_cld(nbin_cld) ! particle volume for each bin (m3) 127 128 !$OMP THREADPRIVATE(rb_cld) 125 129 126 130 127 131 REAL sigma_ice ! Variance of the ice and CCN distributions 128 132 SAVE sigma_ice 133 134 !$OMP THREADPRIVATE(sigma_ice) 129 135 130 136 … … 137 143 LOGICAL test_flag ! flag for test/debuging outputs 138 144 SAVE test_flag 145 146 !$OMP THREADPRIVATE(test_flag) 139 147 140 148 -
trunk/LMDZ.MARS/libf/phymars/improvedco2clouds_mod.F90
r2592 r2616 142 142 real, save :: & 143 143 sigma_ice ! Variance of the h2o ice and CCN distributions 144 145 !$OMP THREADPRIVATE(sigma_ice) 144 146 145 147 double precision, save :: & … … 147 149 meteor(nlev_meteor,nbin_meteor), &! Meteoritic flux read from file uMeteor 148 150 dev3 ! 1. / ( sqrt(2.) * sigma_ice ) 151 152 !$OMP THREADPRIVATE(meteor,dev3) 149 153 150 154 logical, save :: & 151 155 firstcall = .true. ! Used to compute saved variables 156 157 !$OMP THREADPRIVATE(firstcall) 158 152 159 !----------------------------------------------------------------------------------------------------------------------! 153 160 !----3) Variables: … … 243 250 ! 0.1. Bonus: meteoritic component, extract data 244 251 !----------------------------------------------------------------------------------------------------------------------! 252 245 253 if (meteo_flux) then 246 254 ! Check if file exists -
trunk/LMDZ.MARS/libf/phymars/initracer.F
r2589 r2616 122 122 igcm_ohplus=0 123 123 igcm_elec=0 124 124 125 125 ! 1. find dust tracers 126 126 count=0 -
trunk/LMDZ.MARS/libf/phymars/newsedim_mod.F
r2448 r2616 52 52 LOGICAL,SAVE :: firstcall=.true. 53 53 54 !$OMP THREADPRIVATE(firstcall) 55 54 56 c Traceurs : 55 57 c ~~~~~~~~ … … 69 71 c local and saved variable 70 72 real,save :: a,b 73 74 !$OMP THREADPRIVATE(a,b) 71 75 72 76 -
trunk/LMDZ.MARS/libf/phymars/nirco2abs.F
r2398 r2616 81 81 integer,save :: ico2=0 ! index of "co2" tracer 82 82 integer,save :: io=0 ! index of "o" tracer 83 84 !$OMP THREADPRIVATE(firstcall,ico2,io) 85 83 86 c p0noonlte is a pressure below which non LTE effects are significant. 84 87 c REAL p0nonlte -
trunk/LMDZ.MARS/libf/phymars/nlte_calc.F
r2398 r2616 28 28 subroutine MZESC110 (ig,nl_cts_real, nzy_cts_real,ierr,varerr) 29 29 c*********************************************************************** 30 31 30 implicit none 32 31 … … 354 353 355 354 else 356 357 355 call intzhunt (iaquiZ, zl(i),c1,p1,mr1,t1, con) 358 356 do kr=1,nbox -
trunk/LMDZ.MARS/libf/phymars/nuclea.F
r2561 r2616 49 49 50 50 LOGICAL firstcall 51 52 !$OMP THREADPRIVATE(firstcall) 53 51 54 DATA firstcall/.true./ 52 55 SAVE firstcall -
trunk/LMDZ.MARS/libf/phymars/orodrag_mod.F
r1913 r2616 86 86 parameter(kidia=1) 87 87 integer, save :: kfdia ! =NDLO2 88 89 !$OMP THREADPRIVATE(kfdia) 88 90 89 91 include "yoegwd.h" -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r2602 r2616 519 519 logical,save :: check_physics_inputs=.false. 520 520 logical,save :: check_physics_outputs=.false. 521 522 !$OMP THREADPRIVATE(check_physics_inputs,check_physics_outputs) 523 521 524 522 525 c======================================================================= … … 958 961 #ifdef DUSTSTORM 959 962 !! specific case: save the quantity of dust before adding perturbation 963 960 964 if (firstcall) then 961 965 pq_tmp(1:ngrid,1:nlayer,1)=pq(1:ngrid,1:nlayer,igcm_dust_mass) … … 985 989 & rstormdust,rtopdust,totstormfract,clearatm,dsords,dsotop, 986 990 & alpha_hmons,nohmons,clearsky,totcloudfrac) 991 987 992 ! case of sub-grid water ice clouds: callradite for the clear case 988 993 IF (CLFvarying) THEN … … 1058 1063 & odpref,tau_pref_gcm(igout), 1059 1064 & odpref,tau(igout,1)*odpref/zplev(igout,1) 1065 1066 1060 1067 c --------------------------------------------------------- 1061 1068 c Call slope parameterization for direct and scattered flux 1062 1069 c --------------------------------------------------------- 1063 1070 IF(callslope) THEN 1071 1064 1072 print *, 'Slope scheme is on and computing...' 1065 1073 DO ig=1,ngrid … … 1297 1305 1298 1306 IF(calllott)THEN 1299 1300 1307 CALL calldrag_noro(ngrid,nlayer,ptimestep, 1301 1308 & zplay,zplev,pt,pu,pv,zdtgw,zdugw,zdvgw) … … 1315 1322 1316 1323 IF (calldifv) THEN 1317 1318 1324 DO ig=1,ngrid 1319 1325 zflubid(ig)=fluxrad(ig)+fluxgrd(ig) … … 1337 1343 . .and. callrichsl 1338 1344 . .and. .not.turb_resolved) THEN 1345 1339 1346 DO ig=1, ngrid 1340 1347 IF (zh(ig,1) .lt. tsurf(ig)) THEN … … 1350 1357 1351 1358 IF (tke_heat_flux .ne. 0.) THEN 1359 1352 1360 zz1(:)=(pt(:,1)+pdt(:,1)*ptimestep)*(r/g)* 1353 1361 & (-alog(zplay(:,1)/zplev(:,1))) -
trunk/LMDZ.MARS/libf/phymars/rocketduststorm_mod.F90
r2584 r2616 160 160 161 161 LOGICAL,SAVE :: firstcall=.true. 162 163 !$OMP THREADPRIVATE(firstcall) 162 164 163 165 ! variables for the radiative transfer -
trunk/LMDZ.MARS/libf/phymars/surfini.F
r2508 r2616 45 45 ! For visualisation : > /u/tnalmd/bin/watercaps gcm_txt_output_file 46 46 INTEGER,SAVE :: icelocationmode = 4 47 48 !$OMP THREADPRIVATE(icelocationmode) 47 49 48 50 … … 64 66 65 67 REAL,SAVE :: min_icevalue = 500. 68 69 !$OMP THREADPRIVATE(min_icevalue) 70 66 71 character(len=50) :: string = 'thermal' 67 72 -
trunk/LMDZ.MARS/libf/phymars/swrayleigh.F
r1226 r2616 52 52 S .248261E+00,-.302031E+00, .129662E+00/ 53 53 save cray 54 55 !$OMP THREADPRIVATE(cray) 56 54 57 c---------------------------------------------------------------------- 55 58 -
trunk/LMDZ.MARS/libf/phymars/thermcell_main_mars.F90
r1226 r2616 185 185 REAL zhc(ngrid,nlayer) 186 186 REAL ratiom(ngrid,nlayer) 187 188 !$OMP THREADPRIVATE(A,B) 187 189 188 190 ! ========================================= -
trunk/LMDZ.MARS/libf/phymars/topmons_mod.F90
r2584 r2616 111 111 !-------------------------------------------------------- 112 112 LOGICAL,SAVE :: firstcall=.true. 113 114 !$OMP THREADPRIVATE(firstcall) 115 113 116 INTEGER l,ig,tsub,iq,ll 114 117 REAL zq0(ngrid,nlayer,nq) ! initial tracers -
trunk/LMDZ.MARS/libf/phymars/vdif_cd.F
r1238 r2616 56 56 57 57 REAL karman,nu ! Von Karman constant and fluid kinematic viscosity 58 58 59 LOGICAL firstcal 59 60 DATA karman,nu/.41,0.001/ 60 61 DATA firstcal/.true./ 61 62 SAVE karman,nu 63 64 !$OMP THREADPRIVATE(karman,nu) 62 65 63 66 c Local(2): -
trunk/LMDZ.MARS/libf/phymars/vdif_kc.F
r1779 r2616 210 210 INTEGER ico2,iq 211 211 SAVE ico2 212 213 !$OMP THREADPRIVATE(ico2) 214 212 215 REAL m_co2, m_noco2, A , B 213 216 SAVE A, B 217 218 !$OMP THREADPRIVATE(A,B) 219 214 220 LOGICAL firstcall 215 221 save firstcall 222 223 !$OMP THREADPRIVATE(firstcall) 224 216 225 data firstcall/.true./ 217 226 REAL zhc(ngrid,nlay) -
trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F
r2593 r2616 120 120 LOGICAL,SAVE :: firstcall=.true. 121 121 122 !$OMP THREADPRIVATE(firstcall) 122 123 123 124 c variable added for CO2 condensation: … … 127 128 REAL,PARAMETER :: tcond1mb=136.27 128 129 REAL,SAVE :: acond,bcond 130 131 !$OMP THREADPRIVATE(acond,bcond) 129 132 130 133 c Subtimestep & implicit treatment of water vapor … … 175 178 REAL,SAVE :: ccond 176 179 180 !$OMP THREADPRIVATE(ccond) 181 177 182 c Theta_m formulation for mass-variation scheme : 178 183 c ~~~~~~~ … … 183 188 REAL vmr_co2(ngrid,nlay) 184 189 REAL qco2,mmean 190 191 !$OMP THREADPRIVATE(ico2,m_co2,m_noco2,A,B) 185 192 186 193 REAL,INTENT(OUT) :: sensibFlux(ngrid) -
trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F
r2578 r2616 97 97 REAL,SAVE :: microtimestep_prev=-999 98 98 99 !$OMP THREADPRIVATE(imicro,microtimestep) 100 !$OMP THREADPRIVATE(microtimestep_prev) 99 101 ! tendency given by clouds (inside the micro loop) 100 102 REAL subpdqcloud(ngrid,nlay,nq) ! cf. pdqcloud … … 111 113 INTEGER iq,ig,l 112 114 LOGICAL,SAVE :: firstcall=.true. 115 116 !$OMP THREADPRIVATE(firstcall) 113 117 114 118 ! Representation of sub-grid water ice clouds A. Pottier 2013 … … 128 132 REAL :: mincloud ! min cloud frac 129 133 LOGICAL, save :: flagcloud=.true. 134 135 !$OMP THREADPRIVATE(flagcloud) 130 136 131 137 c ** un petit test de coherence -
trunk/LMDZ.MARS/libf/phymars/writediagmicrofi.F
r2573 r2616 75 75 real*4,save :: date 76 76 real*4,save :: subdate=0. 77 !$OMP THREADPRIVATE(date )77 !$OMP THREADPRIVATE(date,subdate) 78 78 79 79 REAL phis((nbp_lon+1),nbp_lat) -
trunk/LMDZ.MARS/libf/phymars/wstats_mod.F90
r2573 r2616 42 42 character (len=50) :: namebis 43 43 character (len=50), save :: firstvar 44 !$OMP THREADPRIVATE( firstvar)44 !$OMP THREADPRIVATE(mean3d,sd3d,dx3,mean2d,sd2d,dx2,firstvar) 45 45 integer :: ierr,varid,nbdim,nid 46 46 integer :: meanid,sdid … … 59 59 character(len=120),save :: name_def(n_name_def_max) 60 60 logical :: getout ! to trigger an early exit if variable not in output list 61 62 !$OMP THREADPRIVATE(stats_def,n_name_def,name_def) 61 63 62 64 ! Added to work in parallel mode -
trunk/LMDZ.MARS/libf/phymars/yamada4.F
r2311 r2616 76 76 LOGICAL first 77 77 INTEGER ipas,nlev 78 79 !$OMP THREADPRIVATE(first,ipas) 80 78 81 SAVE first,ipas 79 82 !FH/IM DATA first,ipas/.true.,0/ … … 94 97 REAL ric,rifc,b1,kap 95 98 SAVE ric,rifc,b1,kap 99 100 !$OMP THREADPRIVATE(ric,rifc,b1,kap) 101 96 102 DATA ric,rifc,b1,kap/0.195,0.191,16.6,0.4/ 97 103 REAL frif,falpha,fsm … … 102 108 s ,w2yam(ngrid,nlay),t2yam(ngrid,nlay) 103 109 LOGICAL,SAVE :: firstcall=.true. 110 111 !$OMP THREADPRIVATE(firstcall) 112 104 113 frif(ri)=0.6588*(ri+0.1776-sqrt(ri*ri-0.3221*ri+0.03156)) 105 114 falpha(ri)=1.318*(0.2231-ri)/(0.2341-ri) … … 112 121 ! MARS 113 122 REAL,SAVE :: q2min,q2max,knmin,kmmin 123 124 !$OMP THREADPRIVATE(q2min,q2max,knmin,kmmin) 125 114 126 DATA q2min,q2max,knmin,kmmin/1.E-10,1.E+2,1.E-5,1.E-5/ 115 127 INTEGER ico2,iq … … 123 135 REAL ztimestep 124 136 INTEGER :: ndt 137 138 !$OMP THREADPRIVATE(ico2,A,B) 125 139 126 140 nlev=nlay+1
Note: See TracChangeset
for help on using the changeset viewer.