Changeset 5117 for LMDZ6/branches/Amaury_dev/libf/phylmd/Dust
- Timestamp:
- Jul 24, 2024, 4:23:34 PM (6 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/coarsemission.f90
r5116 r5117 49 49 ! REAL prfl(klon,klev), psfl(klon,klev) !--large-scale 50 50 LOGICAL :: debutphy, lafinphy 51 REAL, intent(in) :: xlat(klon) ! latitudes pour chaque point52 REAL, intent(in) :: xlon(klon) ! longitudes pour chaque point51 REAL, INTENT(IN) :: xlat(klon) ! latitudes pour chaque point 52 REAL, INTENT(IN) :: xlon(klon) ! longitudes pour chaque point 53 53 REAL, DIMENSION(klon), INTENT(IN) :: zu10m 54 54 REAL, DIMENSION(klon), INTENT(IN) :: zv10m … … 195 195 196 196 DO i = 1, klon 197 if(maskd(i)>0) THEN197 IF (maskd(i)>0) THEN 198 198 IF(id_fine>0) source_tr(i, id_fine) = & 199 199 scale_param_dustacc(iregion_dust(i)) * & -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfc.f90
r5116 r5117 35 35 36 36 ierr = nf90_open ("limitcarbon.nc", nf90_nowrite, nid1) 37 if(ierr/=nf90_noerr) THEN37 IF (ierr/=nf90_noerr) THEN 38 38 WRITE(6, *)' Pb d''ouverture du fichier limitbc.nc' 39 39 WRITE(6, *)' ierr = ', ierr 40 40 CALL exit(1) 41 endif41 ENDIF 42 42 43 43 ! Tranche a lire: -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfc_new.f90
r5116 r5117 58 58 59 59 ierr = nf90_open ("carbon_emissions.nc", nf90_nowrite, nid1) 60 if(ierr/=nf90_noerr) THEN60 IF (ierr/=nf90_noerr) THEN 61 61 WRITE(6, *)' Pb d''ouverture du fichier limitbc.nc' 62 62 WRITE(6, *)' ierr = ', ierr -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfs.f90
r5116 r5117 36 36 37 37 ierr = nf90_open ("limitsoufre.nc", nf90_nowrite, nid) 38 if(ierr/=nf90_noerr) THEN38 IF (ierr/=nf90_noerr) THEN 39 39 WRITE(6, *)' Pb d''ouverture du fichier limitsoufre.nc' 40 40 WRITE(6, *)' ierr = ', ierr 41 41 CALL exit(1) 42 endif42 ENDIF 43 43 44 44 ! Tranche a lire: -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/condsurfs_new.f90
r5116 r5117 61 61 62 62 ierr = nf90_open ("sulphur_emissions_antro.nc", nf90_nowrite, nid) 63 if(ierr/=nf90_noerr) THEN63 IF (ierr/=nf90_noerr) THEN 64 64 WRITE(6, *)' Pb d''ouverture du fichier sulphur_emissions_antro' 65 65 WRITE(6, *)' ierr = ', ierr … … 130 130 !======================================================================= 131 131 ierr = nf90_open ("sulphur_emissions_nat.nc", nf90_nowrite, nid) 132 if(ierr/=nf90_noerr) THEN132 IF (ierr/=nf90_noerr) THEN 133 133 WRITE(6, *)' Pb d''ouverture du fichier sulphur_emissions_nat' 134 134 WRITE(6, *)' ierr = ', ierr … … 185 185 print *, ' Jour = ', jour 186 186 ierr = nf90_open ("sulphur_emissions_volc.nc", nf90_nowrite, nid) 187 if(ierr/=nf90_noerr) THEN187 IF (ierr/=nf90_noerr) THEN 188 188 WRITE(6, *)' Pb d''ouverture du fichier sulphur_emissions_volc' 189 189 WRITE(6, *)' ierr = ', ierr -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/dustemission_mod.F90
r5116 r5117 17 17 INTEGER, PARAMETER :: nats=14 !number of mineral types (14 here for sand, 18 18 ! silt, clay etc.) 19 integer, parameter :: nclass=20000019 INTEGER, parameter :: nclass=200000 20 20 21 21 22 22 real , parameter :: dmin=0.0001 23 23 real , parameter :: dmax=0.2 24 integer, parameter :: nspe=nmode*3+124 INTEGER, parameter :: nspe=nmode*3+1 25 25 real ,parameter :: vkarm=0.41 26 26 !JE20150202 : updating scheme to chimere13b <<< 27 27 ! original values 28 ! integer, parameter :: div1=3.29 ! integer, parameter :: div2=3.30 ! integer, parameter :: div3=3.28 ! INTEGER, parameter :: div1=3. 29 ! INTEGER, parameter :: div2=3. 30 ! INTEGER, parameter :: div3=3. 31 31 ! real , parameter :: e1=3.61/div1 32 32 ! real , parameter :: e2=3.52/div2 … … 41 41 ! Div=3 from S. Alfaro (Sow et al ACPD 2011) 42 42 !JE 20150206 43 ! integer, parameter :: div1=3.44 ! integer, parameter :: div2=3.45 ! integer, parameter :: div3=3.46 integer, parameter :: div1=6.47 integer, parameter :: div2=6.48 integer, parameter :: div3=6.43 ! INTEGER, parameter :: div1=3. 44 ! INTEGER, parameter :: div2=3. 45 ! INTEGER, parameter :: div3=3. 46 INTEGER, parameter :: div1=6. 47 INTEGER, parameter :: div2=6. 48 INTEGER, parameter :: div3=6. 49 49 real , parameter :: e1=3.61/div1 50 50 real , parameter :: e2=3.52/div2 … … 59 59 ! real , parameter :: cd=1.0*roa/gravity 60 60 !JE20150202>>>> 61 real,parameter :: beta=16300.62 real, parameter, dimension(3) :: diam=(/1.5,6.7,14.2/)61 REAL,parameter :: beta=16300. 62 REAL, parameter, DIMENSION(3) :: diam=(/1.5,6.7,14.2/) 63 63 INTEGER, PARAMETER :: ndistb=3 64 real, parameter, dimension(3) :: sig=(/1.7,1.6,1.5/)64 REAL, parameter, DIMENSION(3) :: sig=(/1.7,1.6,1.5/) 65 65 66 66 ! INTEGER, PARAMETER :: nbinsHR=3000 !original … … 259 259 maskdustloc(k)=0 260 260 do i=1,ntyp 261 if(masklisa(k,i)>0) THEN261 IF (masklisa(k,i)>0) THEN 262 262 maskdustloc(k)=1 263 263 endif … … 296 296 INTEGER,DIMENSION(klon) :: maskdust ! where the emissions were calculated 297 297 REAL,DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 298 ! real,parameter :: sizeacclow=0.03299 ! real,parameter :: sizeacchigh=0.5300 ! real,parameter :: sizecoalow=0.5301 ! real,parameter :: sizecoahigh=10. ! in micrometers302 real,parameter :: sizeacclow=0.06303 real,parameter :: sizeacchigh=1.0304 real,parameter :: sizecoalow=1.0305 real,parameter :: sizecoahigh=6. !20 ! diameter in micrometers306 real,parameter :: sizescolow=6.307 real,parameter :: sizescohigh=30. ! in micrometers298 ! REAL,parameter :: sizeacclow=0.03 299 ! REAL,parameter :: sizeacchigh=0.5 300 ! REAL,parameter :: sizecoalow=0.5 301 ! REAL,parameter :: sizecoahigh=10. ! in micrometers 302 REAL,parameter :: sizeacclow=0.06 303 REAL,parameter :: sizeacchigh=1.0 304 REAL,parameter :: sizecoalow=1.0 305 REAL,parameter :: sizecoahigh=6. !20 ! diameter in micrometers 306 REAL,parameter :: sizescolow=6. 307 REAL,parameter :: sizescohigh=30. ! in micrometers 308 308 !-------------------------------- 309 ! real,parameter :: tuningfactorfine=0.9 ! factor for fine bins!!! important!!310 real,parameter :: tuningfactorfine=0.8 ! factor for fine bins!!! important!!311 ! real,parameter :: tuningfactorfine=4.5 ! factor for fine bins!!! important!!312 ! real,parameter :: tuningfactorcoa=3.6 ! factor for coarse bins!!! important!!313 real,parameter :: tuningfactorcoa=3.25 ! factor for coarse bins!!! important!!314 ! real,parameter :: tuningfactorcoa=4.5 ! factor for coarse bins!!! important!!315 ! real,parameter :: tuningfactorsco=3.6 ! factor for supercoarse bins!!! important!!316 real,parameter :: tuningfactorsco=3.25 ! factor for supercoarse bins!!! important!!317 ! real,parameter :: tuningfactorsco=4.5 ! factor for supercoarse bins!!! important!!318 real,parameter :: basesumemission= 0.0 !1.e-6 ! emissions to SUM to each land pixel FOR ASSIMILATION ONLY important!! in mg/m2/s, per bin309 ! REAL,parameter :: tuningfactorfine=0.9 ! factor for fine bins!!! important!! 310 REAL,parameter :: tuningfactorfine=0.8 ! factor for fine bins!!! important!! 311 ! REAL,parameter :: tuningfactorfine=4.5 ! factor for fine bins!!! important!! 312 ! REAL,parameter :: tuningfactorcoa=3.6 ! factor for coarse bins!!! important!! 313 REAL,parameter :: tuningfactorcoa=3.25 ! factor for coarse bins!!! important!! 314 ! REAL,parameter :: tuningfactorcoa=4.5 ! factor for coarse bins!!! important!! 315 ! REAL,parameter :: tuningfactorsco=3.6 ! factor for supercoarse bins!!! important!! 316 REAL,parameter :: tuningfactorsco=3.25 ! factor for supercoarse bins!!! important!! 317 ! REAL,parameter :: tuningfactorsco=4.5 ! factor for supercoarse bins!!! important!! 318 REAL,parameter :: basesumemission= 0.0 !1.e-6 ! emissions to SUM to each land pixel FOR ASSIMILATION ONLY important!! in mg/m2/s, per bin 319 319 !basesumemission = 1.e-6 increase the AOD in about 12% (0.03 of AOD) , 320 320 !while 1e-8 increase in about 0.12% (0.003 of AOD) 321 321 322 real,dimension(klon) :: basesumacc,basesumcoa,basesumsco322 REAL,DIMENSION(klon) :: basesumacc,basesumcoa,basesumsco 323 323 !-------------------------------- 324 !JE20140915 real,parameter :: sizeacclow=0.06325 !JE20140915 real,parameter :: sizeacchigh=1.0326 !JE20140915 real,parameter :: sizecoalow=1.0327 !JE20140915 real,parameter :: sizecoahigh=10. !20 ! diameter in micrometers328 !JE20140915 real,parameter :: sizescolow=10.329 !JE20140915 real,parameter :: sizescohigh=30. ! in micrometers330 331 332 333 logical:: debutphy324 !JE20140915 REAL,parameter :: sizeacclow=0.06 325 !JE20140915 REAL,parameter :: sizeacchigh=1.0 326 !JE20140915 REAL,parameter :: sizecoalow=1.0 327 !JE20140915 REAL,parameter :: sizecoahigh=10. !20 ! diameter in micrometers 328 !JE20140915 REAL,parameter :: sizescolow=10. 329 !JE20140915 REAL,parameter :: sizescohigh=30. ! in micrometers 330 331 332 333 LOGICAL :: debutphy 334 334 REAL :: diff, auxr1,auxr2,auxr3,auxr4 335 real,dimension(klon,nbins) :: itvmean336 real,dimension(klon,nbins+1) :: itv2337 ! real,dimension(klon_glo,nbins) :: itvmean_glo338 ! real,dimension(:,:) , allocatable:: itvmean_glo339 ! real,dimension(:,:), allocatable:: itv2_glo335 REAL,DIMENSION(klon,nbins) :: itvmean 336 REAL,DIMENSION(klon,nbins+1) :: itv2 337 ! REAL,DIMENSION(klon_glo,nbins) :: itvmean_glo 338 ! REAL,DIMENSION(:,:) , ALLOCATABLE :: itvmean_glo 339 ! REAL,DIMENSION(:,:), ALLOCATABLE :: itv2_glo 340 340 341 integer, save :: counter,counter1 !dbg341 INTEGER, save :: counter,counter1 !dbg 342 342 REAL, DIMENSION(:,:),ALLOCATABLE,SAVE :: emisbinlocalmean,emisbinlocalmean2 !dbg 343 343 REAL, DIMENSION(:,:),ALLOCATABLE :: emisbinlocalmean2_glo 344 logical:: writeaerosoldistrib344 LOGICAL :: writeaerosoldistrib 345 345 !$OMP THREADPRIVATE(iminacclow,iminacchigh,imincoalow,imincoahigh) 346 346 347 347 writeaerosoldistrib=.FALSE. 348 348 IF (debutphy) THEN 349 if (sizedustmin>sizeacclow .or. sizedustmax<sizescohigh) THEN349 IF (sizedustmin>sizeacclow .OR. sizedustmax<sizescohigh) THEN 350 350 CALL abort_gcm('adaptdustemission', 'Dust range problem',1) 351 endif351 ENDIF 352 352 print *,'FINE DUST BIN: tuning EMISSION factor= ',tuningfactorfine 353 353 print *,'COA DUST BIN: tuning EMISSION factor= ',tuningfactorcoa … … 359 359 auxr4=9999. 360 360 do i=1,nbins+1 361 if(abs(sizeacclow-itv(i))<auxr1) THEN361 IF (abs(sizeacclow-itv(i))<auxr1) THEN 362 362 auxr1=abs( sizeacclow-itv(i)) 363 363 iminacclow=i 364 364 endif 365 if(abs(sizeacchigh-itv(i))<auxr2) THEN365 IF (abs(sizeacchigh-itv(i))<auxr2) THEN 366 366 auxr2=abs( sizeacchigh-itv(i)) 367 367 iminacchigh=i 368 368 imincoalow=i 369 369 endif 370 if(abs(sizecoahigh-itv(i))<auxr3) THEN370 IF (abs(sizecoahigh-itv(i))<auxr3) THEN 371 371 auxr3=abs( sizecoahigh-itv(i)) 372 372 imincoahigh=i 373 373 iminscolow=i 374 374 endif 375 if(abs(sizescohigh-itv(i))<auxr4) THEN375 IF (abs(sizescohigh-itv(i))<auxr4) THEN 376 376 auxr4=abs( sizescohigh-itv(i)) 377 377 iminscohigh=i … … 478 478 ! 480 = 5 days 479 479 IF (MOD(counter,1440)== 0) THEN 480 !if (MOD(counter,480). eq. 0) THEN480 !if (MOD(counter,480).EQ. 0) THEN 481 481 do k = 1,klon 482 482 do i=1,nbins … … 671 671 !print *,Pini(i,1),Pini(i,2),Pini(i,3),Pini(i,4),Pini(i,5) 672 672 DO nts=1,ntyp 673 !IF(xlon(i).ge.longmin. and.xlon(i).le.longmax.and. &674 !& xlat(i).ge.latmin. and.xlat(i).le.latmax &675 !& . and.pctsrf(i)>0.5.and.Pini(i,nts)>0.)THEN673 !IF(xlon(i).ge.longmin.AND.xlon(i).le.longmax.AND. & 674 !& xlat(i).ge.latmin.AND.xlat(i).le.latmax & 675 !& .AND.pctsrf(i)>0.5.AND.Pini(i,nts)>0.)THEN 676 676 ! JE20150605<< easier to read 677 IF(pctsrf(i,is_ter)>0.5. and.Pini(i,nts)>0.)THEN677 IF(pctsrf(i,is_ter)>0.5.AND.Pini(i,nts)>0.)THEN 678 678 ! JE20150605>> 679 679 sol(i,nts) = solini(i,nts) … … 774 774 cc=sqrt(1+ddust*(sizeclass(i)**(-2.5))) 775 775 xk=sqrt(abs(rop*gravity*sizeclass(i)/roa)) 776 if(bb<10.) THEN776 IF (bb<10.) THEN 777 777 dd=sqrt(1.928*(bb**0.092)-1.) 778 778 uth(i)=0.129*xk*cc/dd … … 848 848 do k=1,ntyp 849 849 ! PRINT*,'IKKK ',i,klon,k,ntyp 850 if(zos(i,k)==0..or.z01(i,k)==0.) THEN850 IF (zos(i,k)==0..or.z01(i,k)==0.) THEN 851 851 ! if (zos(i,k)<=0..or.z01(i,k)<=0.) THEN 852 852 ! if (zos(i,k)<0..or.z01(i,k)<0.) THEN … … 876 876 ! PRINT*,'IKKK D ',i,klon,k,ntyp 877 877 endif 878 if(feff(i,k)<0.)feff(i,k)=0.879 if(feffdbg(i,k)<0.)feffdbg(i,k)=0.880 if(feff(i,k)>1.)feff(i,k)=1.881 if(feffdbg(i,k)>1.)feffdbg(i,k)=1.878 IF (feff(i,k)<0.)feff(i,k)=0. 879 IF (feffdbg(i,k)<0.)feffdbg(i,k)=0. 880 IF (feff(i,k)>1.)feff(i,k)=1. 881 IF (feffdbg(i,k)>1.)feffdbg(i,k)=1. 882 882 ! PRINT*,'IKKK E ',i,klon,k,ntyp 883 883 endif … … 885 885 enddo 886 886 ! JE20150120<< 887 if(flag_feff == 0) THEN887 IF (flag_feff == 0) THEN 888 888 print *,'JE_dbg FORCED deactivated feff' 889 889 do i=1,klon … … 892 892 enddo 893 893 enddo 894 endif894 ENDIF 895 895 ! JE20150120>> 896 896 … … 1011 1011 ! GOTO 60 1012 1012 ! END IF 1013 ! IF(nb. eq.miniso)THEN1013 ! IF(nb.EQ.miniso)THEN 1014 1014 ! binsISOGRAD(k)=binsHR(nb) 1015 1015 ! istart=nb+1 … … 1239 1239 1240 1240 1241 !IF(n. eq.1.and.nat.eq.99)GOTO 801242 ! IF(n. eq.1) PRINT*,'nat1=',nat,'sol1=',sol(i,n)1243 IF(n==1. and.nat==99)GOTO 801241 !IF(n.EQ.1.AND.nat.EQ.99)GOTO 80 1242 ! IF(n.EQ.1) PRINT*,'nat1=',nat,'sol1=',sol(i,n) 1243 IF(n==1.AND.nat==99)GOTO 80 1244 1244 1245 1245 ENDIF 1246 1246 IF(.TRUE.) THEN 1247 1247 nat=int(sol(i,n)) 1248 IF(n == 1 . and. nat >= 14 .or. nat < 1 .or. nat > 19) GOTO 801248 IF(n == 1 .AND. nat >= 14 .OR. nat < 1 .OR. nat > 19) GOTO 80 1249 1249 ENDIF 1250 1250 !JE20150129>>>> … … 1256 1256 ustarsalt=0. 1257 1257 IF(ceff<=0..or.z0salt==0.)GOTO 80 1258 IF(cerod==0. or.cpcent==0.)GOTO 801258 IF(cerod==0.OR.cpcent==0.)GOTO 80 1259 1259 ! in cm: utmin, umin, z10m, z0salt, ustarns 1260 1260 ! in meters: modwm … … 1275 1275 do ni=1,kfin 1276 1276 fdp1=1.-(uth2(ni)/(ceff*ustarsalt)) 1277 if(fdp1<=0..or.srel2(nat,ni)==0.) THEN1277 IF (fdp1<=0..or.srel2(nat,ni)==0.) THEN 1278 1278 ad1=0. 1279 1279 ad2=0. … … 1374 1374 IMPLICIT NONE 1375 1375 1376 integeri,n,kfin,ideb,ifin,istep,kfin21377 realdsmin,dsmax1376 INTEGER i,n,kfin,ideb,ifin,istep,kfin2 1377 REAL dsmin,dsmax 1378 1378 1379 1379 ! estimation of the reduced soil size distribution … … 1426 1426 1427 1427 IMPLICIT NONE 1428 integeri1,i2,nclass,iout,ismin,ismax,k2,ihalf,idiff1429 realsiz(nclass),ds1428 INTEGER i1,i2,nclass,iout,ismin,ismax,k2,ihalf,idiff 1429 REAL siz(nclass),ds 1430 1430 !c----------------------------- 1431 1431 iout=0 -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_orig.F90
r5116 r5117 102 102 ! else 103 103 ! PRINT*,'beta from Reddy and Bocuher 2004 (original version), inscav_fisrt=',inscav_fisrt 104 ! endif104 ! ENDIF 105 105 106 106 alpha_r=0.001 ! coefficient d'impaction pour la pluie … … 201 201 ! incloud scavenging 202 202 ! IF(inscav_fisrt) THEN 203 if(iflag_lscav == 4) THEN203 IF (iflag_lscav == 4) THEN 204 204 beta=beta_fisrt(i,k)*rneb(i,k) 205 205 else … … 208 208 beta=beta/zmass(i,k)/oliq 209 209 beta=MAX(0.,beta) 210 endif ! (iflag_lscav . eq. 4)210 endif ! (iflag_lscav .EQ. 4) 211 211 beta_v1(i,k)=beta !! for output 212 212 … … 282 282 ! +d_tr_bcscav(i,k,it)*(paprs(i,k)-paprs(i,k+1))/RG & 283 283 ! +d_tr_evap(i,k,it)*(paprs(i,k)-paprs(i,k+1))/RG 284 ! IF(it. eq.3) WRITE(*,'(I2,2X,a,e20.12,2X,a,e20.12,2X,a,e20.12,2X,a,e20.12)'),&284 ! IF(it.EQ.3) WRITE(*,'(I2,2X,a,e20.12,2X,a,e20.12,2X,a,e20.12,2X,a,e20.12)'),& 285 285 ! k,'lsc conserv ',conserv,'insc',d_tr_insc(i,k,it),'bc',d_tr_bcscav(i,k,it),'ev',d_tr_evap(i,k,it) 286 286 ! ENDDO -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_spl.F90
r5116 r5117 112 112 ! else 113 113 ! PRINT*,'beta from Reddy and Bocuher 2004 (original version), inscav_fisrt=',inscav_fisrt 114 ! endif114 ! ENDIF 115 115 116 116 !JE alpha_r=0.001 ! coefficient d'impaction pour la pluie … … 212 212 ! incloud scavenging 213 213 ! IF(inscav_fisrt) THEN 214 if(iflag_lscav == 4) THEN214 IF (iflag_lscav == 4) THEN 215 215 beta=beta_fisrt(i,k)*rneb(i,k) 216 216 else … … 219 219 beta=beta/zmass(i,k)/oliq 220 220 beta=MAX(0.,beta) 221 endif ! (iflag_lscav . eq. 4)221 endif ! (iflag_lscav .EQ. 4) 222 222 beta_v1(i,k)=beta !! for output 223 223 … … 293 293 ! +d_tr_bcscav(i,k,it)*(paprs(i,k)-paprs(i,k+1))/RG & 294 294 ! +d_tr_evap(i,k,it)*(paprs(i,k)-paprs(i,k+1))/RG 295 ! IF(it. eq.3) WRITE(*,'(I2,2X,a,e20.12,2X,a,e20.12,2X,a,e20.12,2X,a,e20.12)'),&295 ! IF(it.EQ.3) WRITE(*,'(I2,2X,a,e20.12,2X,a,e20.12,2X,a,e20.12,2X,a,e20.12)'),& 296 296 ! k,'lsc conserv ',conserv,'insc',d_tr_insc(i,k,it),'bc',d_tr_bcscav(i,k,it),'ev',d_tr_evap(i,k,it) 297 297 ! ENDDO -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/minmaxqfi2.f90
r5116 r5117 24 24 zqmax = zq(ijmax, lmax) 25 25 26 IF(zqmin<qmin. or.zqmax>qmax) &26 IF(zqmin<qmin.OR.zqmax>qmax) & 27 27 WRITE(*, 9999) comment, & 28 28 ijmin, lmin, zqmin, ijmax, lmax, zqmax -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/minmaxsource.f90
r5116 r5117 25 25 zqmax = zq(ijmax, lmax) 26 26 27 IF(zqmin<qmin. or.zqmax>qmax) &27 IF(zqmin<qmin.OR.zqmax>qmax) & 28 28 WRITE(*, 9999) comment, & 29 29 ijmin, lmin, zqmin, ijmax, lmax, zqmax -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/neutral.f90
r5116 r5117 43 43 do i = 1, klon 44 44 45 if(u10_mps(i) < 0.) u10_mps(i) = 0.045 IF (u10_mps(i) < 0.) u10_mps(i) = 0.0 46 46 47 if(obklen_m(i) < 0.) THEN47 IF (obklen_m(i) < 0.) THEN 48 48 phi = (1. - 160. / obklen_m(i))**(-0.25) 49 49 phi_inv = 1. / phi … … 55 55 f3 = atan(dum1) 56 56 psi = 2. * log(f1) + log(f2) - 2. * f3 + pi / 2. 57 else if(obklen_m(i) > 0.) THEN57 ELSE IF (obklen_m(i) > 0.) THEN 58 58 psi = -50. / obklen_m(i) 59 59 end if … … 61 61 u10n_mps(i) = u10_mps(i) + (ustar_mps(i) * psi / von_karman) 62 62 ! u10n set to 0. if -1 < obklen < 20 63 if ((obklen_m(i)>-1.).and.(obklen_m(i)<20.)) THEN63 IF ((obklen_m(i)>-1.).AND.(obklen_m(i)<20.)) THEN 64 64 u10n_mps(i) = 0. 65 65 endif 66 if(u10n_mps(i) < 0.) u10n_mps(i) = 0.066 IF (u10n_mps(i) < 0.) u10n_mps(i) = 0.0 67 67 68 68 enddo -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phys_output_write_spl_mod.F90
r5116 r5117 393 393 ! ug Pour les sorties XIOS 394 394 USE lmdz_xios, ONLY: xios_update_calendar, using_xios 395 USE wxios, ONLY: wxios_closedef, missing_val_xios => missing_val395 USE lmdz_wxios, ONLY: wxios_closedef, missing_val_xios => missing_val 396 396 USE phys_cal_mod, ONLY: mth_len 397 397 USE lmdz_yomcst … … 928 928 CALL histwrite_phy(o_wdtrainA, wdtrainA) 929 929 CALL histwrite_phy(o_wdtrainM, wdtrainM) 930 ENDIF !(iflag_con.EQ.3. or.iflag_con.EQ.30)930 ENDIF !(iflag_con.EQ.3.OR.iflag_con.EQ.30) 931 931 !!! nrlmd le 10/04/2012 932 932 IF (iflag_trig_bl>=1) THEN … … 1067 1067 CALL histwrite_phy(o_swsrfcs_ant, solsw0_aero(:,2)) 1068 1068 !cf 1069 IF (. not. aerosol_couple) THEN1069 IF (.NOT. aerosol_couple) THEN 1070 1070 CALL histwrite_phy(o_swtoacf_nat, topswcf_aero(:,1)) 1071 1071 CALL histwrite_phy(o_swsrfcf_nat, solswcf_aero(:,1)) … … 1219 1219 ENDIF 1220 1220 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 1221 ELSEIF (iflag_thermals>=1. and.iflag_wake==1)THEN1221 ELSEIF (iflag_thermals>=1.AND.iflag_wake==1)THEN 1222 1222 IF (vars_defined) THEN 1223 1223 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phytracr_spl_mod.F90
r5116 r5117 828 828 ! ------- 829 829 830 real, intent(in) :: pdtphys ! pas d'integration pour la physique (seconde)831 REAL, intent(in) :: jD_cur, jH_cur832 real, intent(in) :: ftsol(klon, nbsrf) ! temperature du sol par type833 real, intent(in) :: t_seri(klon, klev) ! temperature834 real, intent(in) :: u_seri(klon, klev) ! vent835 real, intent(in) :: v_seri(klon, klev) ! vent836 real, intent(in) :: q_seri(klon, klev) ! vapeur d eau kg/kg830 REAL, INTENT(IN) :: pdtphys ! pas d'integration pour la physique (seconde) 831 REAL, INTENT(IN) :: jD_cur, jH_cur 832 REAL, INTENT(IN) :: ftsol(klon, nbsrf) ! temperature du sol par type 833 REAL, INTENT(IN) :: t_seri(klon, klev) ! temperature 834 REAL, INTENT(IN) :: u_seri(klon, klev) ! vent 835 REAL, INTENT(IN) :: v_seri(klon, klev) ! vent 836 REAL, INTENT(IN) :: q_seri(klon, klev) ! vapeur d eau kg/kg 837 837 838 838 LOGICAL, INTENT(IN) :: lafin 839 839 840 realtr_seri(klon, klev, nbtr) ! traceur841 realtmp_var(klon, klev) ! auxiliary variable to replace traceur842 realtmp_var2(klon, nbtr) ! auxiliary variable to replace source843 realtmp_var3(klon, klev, nbtr) ! auxiliary variable 3D844 realdummy1d ! JE auxiliary variable845 realaux_var2(klon) ! auxiliary variable to replace traceur846 realaux_var3(klon, klev) ! auxiliary variable to replace traceur847 reald_tr(klon, klev, nbtr) ! traceur tendance848 realsconc_seri(klon, nbtr) ! surface concentration of traceur849 850 integernbjour840 REAL tr_seri(klon, klev, nbtr) ! traceur 841 REAL tmp_var(klon, klev) ! auxiliary variable to replace traceur 842 REAL tmp_var2(klon, nbtr) ! auxiliary variable to replace source 843 REAL tmp_var3(klon, klev, nbtr) ! auxiliary variable 3D 844 REAL dummy1d ! JE auxiliary variable 845 REAL aux_var2(klon) ! auxiliary variable to replace traceur 846 REAL aux_var3(klon, klev) ! auxiliary variable to replace traceur 847 REAL d_tr(klon, klev, nbtr) ! traceur tendance 848 REAL sconc_seri(klon, nbtr) ! surface concentration of traceur 849 850 INTEGER nbjour 851 851 save nbjour 852 852 !$OMP THREADPRIVATE(nbjour) … … 898 898 !JE20150518>> 899 899 900 real, intent(in) :: paprs(klon, klev + 1) ! pression pour chaque inter-couche (en Pa)901 real, intent(in) :: pplay(klon, klev) ! pression pour le mileu de chaque couche (en Pa)902 real, intent(in) :: RHcl(klon, klev) ! humidite relativen ciel clair903 realznivsig(klev) ! indice des couches904 realpaire(klon)905 real, intent(in) :: pphis(klon)906 real, intent(in) :: pctsrf(klon, nbsrf)907 logical, intent(in) :: debutphy ! le flag de l'initialisation de la physique900 REAL, INTENT(IN) :: paprs(klon, klev + 1) ! pression pour chaque inter-couche (en Pa) 901 REAL, INTENT(IN) :: pplay(klon, klev) ! pression pour le mileu de chaque couche (en Pa) 902 REAL, INTENT(IN) :: RHcl(klon, klev) ! humidite relativen ciel clair 903 REAL znivsig(klev) ! indice des couches 904 REAL paire(klon) 905 REAL, INTENT(IN) :: pphis(klon) 906 REAL, INTENT(IN) :: pctsrf(klon, nbsrf) 907 logical, INTENT(IN) :: debutphy ! le flag de l'initialisation de la physique 908 908 909 909 ! Scaling Parameters: … … 950 950 ! ----------- 951 951 952 REAL, intent(in) :: pmfu(klon, klev) ! flux de masse dans le panache montant953 REAL, intent(in) :: pmfd(klon, klev) ! flux de masse dans le panache descendant954 REAL, intent(in) :: pen_u(klon, klev) ! flux entraine dans le panache montant955 REAL, intent(in) :: pde_u(klon, klev) ! flux detraine dans le panache montant956 REAL, intent(in) :: pen_d(klon, klev) ! flux entraine dans le panache descendant957 REAL, intent(in) :: pde_d(klon, klev) ! flux detraine dans le panache descendant952 REAL, INTENT(IN) :: pmfu(klon, klev) ! flux de masse dans le panache montant 953 REAL, INTENT(IN) :: pmfd(klon, klev) ! flux de masse dans le panache descendant 954 REAL, INTENT(IN) :: pen_u(klon, klev) ! flux entraine dans le panache montant 955 REAL, INTENT(IN) :: pde_u(klon, klev) ! flux detraine dans le panache montant 956 REAL, INTENT(IN) :: pen_d(klon, klev) ! flux entraine dans le panache descendant 957 REAL, INTENT(IN) :: pde_d(klon, klev) ! flux detraine dans le panache descendant 958 958 959 959 ! Convection KE scheme: … … 1023 1023 ! --------- 1024 1024 1025 REAL, intent(in) :: pmflxr(klon, klev + 1), pmflxs(klon, klev + 1) !--convection1026 REAL, intent(in) :: prfl(klon, klev + 1), psfl(klon, klev + 1) !--large-scale1025 REAL, INTENT(IN) :: pmflxr(klon, klev + 1), pmflxs(klon, klev + 1) !--convection 1026 REAL, INTENT(IN) :: prfl(klon, klev + 1), psfl(klon, klev + 1) !--large-scale 1027 1027 REAL :: ql_incl ! contenu en eau liquide nuageuse dans le nuage ! ql_incl=oliq/rneb 1028 1028 REAL :: ql_incloud_ref ! ref value of in-cloud condensed water content … … 1047 1047 ! -------------- 1048 1048 1049 REAL, intent(in) :: coefh(klon, klev) ! coeff melange CL1050 REAL, intent(in) :: cdragh(klon), cdragm(klon)1051 REAL, intent(in) :: yu1(klon) ! vent dans la 1iere couche1052 REAL, intent(in) :: yv1(klon) ! vent dans la 1iere couche1049 REAL, INTENT(IN) :: coefh(klon, klev) ! coeff melange CL 1050 REAL, INTENT(IN) :: cdragh(klon), cdragm(klon) 1051 REAL, INTENT(IN) :: yu1(klon) ! vent dans la 1iere couche 1052 REAL, INTENT(IN) :: yv1(klon) ! vent dans la 1iere couche 1053 1053 1054 1054 … … 1071 1071 ! ----------- 1072 1072 1073 REAL, intent(in) :: rlat(klon) ! latitudes pour chaque point1074 REAL, intent(in) :: rlon(klon) ! longitudes pour chaque point1073 REAL, INTENT(IN) :: rlat(klon) ! latitudes pour chaque point 1074 REAL, INTENT(IN) :: rlon(klon) ! longitudes pour chaque point 1075 1075 1076 1076 INTEGER i, k, iq, itr, j, ig … … 1164 1164 ! REAL his_g2paer(klon) ! gastoparticle in aerosol units (check!) 1165 1165 1166 INTEGER, intent(in) :: iflag_conv1166 INTEGER, INTENT(IN) :: iflag_conv 1167 1167 LOGICAL iscm3 ! debug variable. for checkmass ! JE 1168 1168 … … 1213 1213 source_tr = 0. 1214 1214 1215 if(debutphy) THEN1215 IF (debutphy) THEN 1216 1216 #ifdef IOPHYS_DUST 1217 1217 CALL iophys_ini(pdtphys) … … 1394 1394 enddo 1395 1395 ! check consistency with dust emission scheme: 1396 if(ok_chimeredust) THEN1397 if (.not.(id_scdu>0 .and. id_codu>0 .and. id_fine>0)) THEN1396 IF (ok_chimeredust) THEN 1397 IF (.NOT.(id_scdu>0 .AND. id_codu>0 .AND. id_fine>0)) THEN 1398 1398 CALL abort_gcm('phytracr_mod', 'pb in ok_chimdust 0', 1) 1399 1399 endif 1400 1400 else 1401 if(id_scdu>0) THEN1401 IF (id_scdu>0) THEN 1402 1402 CALL abort_gcm('phytracr_mod', 'pb in ok_chimdust 1 SCDU', 1) 1403 1403 endif 1404 if ((id_codu <= 0) .or. (id_fine<=0)) THEN1404 IF ((id_codu <= 0) .OR. (id_fine<=0)) THEN 1405 1405 CALL abort_gcm('phytracr_mod', 'pb in ok_chimdust 1', 1) 1406 1406 endif … … 1521 1521 1522 1522 iscm3 = .FALSE. 1523 if(debutphy) THEN1523 IF (debutphy) THEN 1524 1524 !$OMP MASTER 1525 1525 CALL suphel … … 4442 4442 REAL scale_param(nbreg) 4443 4443 !local vars 4444 integernid, ierr, nvarid4445 realrcode, auxreal4446 integerstart(4), count(4), status4444 INTEGER nid, ierr, nvarid 4445 REAL rcode, auxreal 4446 INTEGER start(4), count(4), status 4447 4447 ! local 4448 4448 CHARACTER*104 varname 4449 4449 CHARACTER*2 aux_2s 4450 integeri, j, ig4450 INTEGER i, j, ig 4451 4451 !$OMP MASTER 4452 4452 IF (is_mpi_root .AND. is_omp_root) THEN 4453 4453 ierr = nf90_open(trim(adjustl(filescaleparams)), nf90_nowrite, nid) 4454 if(ierr == nf90_noerr) THEN4454 IF (ierr == nf90_noerr) THEN 4455 4455 do i = 1, nbreg 4456 4456 WRITE(aux_2s, '(i2.2)') i -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/precuremission.f90
r5104 r5117 98 98 tsol, pctsrf, lmt_dmsconc, lmt_dms) 99 99 100 IF (. not.bateau) THEN100 IF (.NOT.bateau) THEN 101 101 DO i = 1, klon 102 102 lmt_so2ba(i) = 0.0 -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_dust.f90
r5116 r5117 26 26 !$OMP MASTER 27 27 IF (is_mpi_root .AND. is_omp_root) THEN 28 if(debutphy) THEN28 IF (debutphy) THEN 29 29 ncid1 = nf90_open('dust.nc', nf90_nowrite, rcode) 30 30 varid1 = nf90_inq_varid(ncid1, 'EMISSION', rcode) -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_newemissions.f90
r5113 r5117 30 30 INCLUDE 'chem_spla.h' 31 31 32 logical:: debutphy, lafinphy, edgar32 LOGICAL :: debutphy, lafinphy, edgar 33 33 INTEGER :: test_vent, test_day, step_vent, flag_dms, nbjour 34 34 INTEGER :: julien, i, iday -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_surface.F90
r5116 r5117 18 18 character*10 varname 19 19 20 realtmp_dyn(iip1,jjp1)21 realtmp_dyn_glo(nbp_lon+1,nbp_lat)20 REAL tmp_dyn(iip1,jjp1) 21 REAL tmp_dyn_glo(nbp_lon+1,nbp_lat) 22 22 REAL tmp_dyn_invers(iip1,jjp1) 23 realtmp_dyn_invers_glo(nbp_lon+1,nbp_lat)24 realtmp_fi(klon)25 realtmp_fi_glo(klon_glo)26 realsurfa(klon,5)27 realsurfa_glo(klon_glo,5)23 REAL tmp_dyn_invers_glo(nbp_lon+1,nbp_lat) 24 REAL tmp_fi(klon) 25 REAL tmp_fi_glo(klon_glo) 26 REAL surfa(klon,5) 27 REAL surfa_glo(klon_glo,5) 28 28 29 integerncid30 integervarid31 integerrcode32 integerstart(2),count(2),status33 integeri,j,l,ig29 INTEGER ncid 30 INTEGER varid 31 INTEGER rcode 32 INTEGER start(2),count(2),status 33 INTEGER i,j,l,ig 34 34 character*1 str1 35 35 36 36 !JE20140526<< 37 37 character*4 :: latstr,aux4s 38 logical:: outcycle, isinversed39 real, dimension(jjp1) :: lats40 real, dimension(nbp_lat) :: lats_glo38 LOGICAL :: outcycle, isinversed 39 REAL, DIMENSION(jjp1) :: lats 40 REAL, DIMENSION(nbp_lat) :: lats_glo 41 41 REAL :: rcode2 42 integer, dimension(1) :: startj,endj42 INTEGER, DIMENSION(1) :: startj,endj 43 43 !JE20140526>> 44 44 !$OMP MASTER … … 53 53 isinversed=.FALSE. 54 54 do i=1,5 55 if(i==1) aux4s='latu'56 if(i==2) aux4s='LATU'57 if(i==3) aux4s='LatU'58 if(i==4) aux4s='Latu'59 if(i==5) aux4s='latU'55 IF (i==1) aux4s='latu' 56 IF (i==2) aux4s='LATU' 57 IF (i==3) aux4s='LatU' 58 IF (i==4) aux4s='Latu' 59 IF (i==5) aux4s='latU' 60 60 status = nf90_inq_varid (ncid, aux4s, rcode) 61 61 ! print *,'stat,i',status,i,outcycle,aux4s 62 62 ! print *,'ifclause',status.NE. nf90_noerr ,outcycle == .FALSE. 63 IF ((. not.(status/= nf90_noerr) ).and.( .not. outcycle )) THEN63 IF ((.NOT.(status/= nf90_noerr) ).AND.( .NOT. outcycle )) THEN 64 64 outcycle=.TRUE. 65 65 latstr=aux4s … … 78 78 79 79 ! check if netcdf is latitude inversed or not. 80 if(lats_glo(1)<lats_glo(2)) isinversed=.TRUE.80 IF (lats_glo(1)<lats_glo(2)) isinversed=.TRUE. 81 81 ! JE20140526>> 82 82 … … 118 118 !JE20140526<< 119 119 ! CALL gr_dyn_fi(1, iip1, jjp1, klon, tmp_dyn_invers, tmp_fi) 120 if(isinversed) THEN120 IF (isinversed) THEN 121 121 CALL gr_dyn_fi(1, nbp_lon+1, nbp_lat, klon_glo, & 122 122 tmp_dyn_invers_glo, tmp_fi_glo) -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_vent.f90
r5116 r5117 26 26 !$OMP MASTER 27 27 IF (is_mpi_root .AND. is_omp_root) THEN 28 if(debutphy) THEN28 IF (debutphy) THEN 29 29 ncidu1 = nf90_open('u10m.nc', nf90_nowrite, rcode) 30 30 varidu1 = nf90_inq_varid(ncidu1, 'U10M', rcode) -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/satellite_out_spla.F90
r5112 r5117 16 16 INTEGER :: i 17 17 REAL :: overpassaqua, overpassterra 18 REAL, dimension(klon) :: rlat,rlon18 REAL,DIMENSION(klon) :: rlat,rlon 19 19 20 20
Note: See TracChangeset
for help on using the changeset viewer.