Changeset 5159 for LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm
- Timestamp:
- Aug 2, 2024, 9:58:25 PM (5 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm
- Files:
-
- 38 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90
r5133 r5159 1 ! 1 2 2 ! $Id: aeropt_5wv_rrtm.F90 3288 2018-03-19 20:58:31Z oboucher $ 3 3 ! … … 16 16 USE YOMCST, ONLY: RD,RG 17 17 18 ! 18 19 19 ! Yves Balkanski le 12 avril 2006 20 20 ! Celine Deandreis … … 23 23 ! Olivier Boucher mars 2014 pour adaptation RRTM 24 24 ! 25 ! 25 26 26 ! Refractive indices for seasalt come from Shettle and Fenn (1979) 27 ! 27 28 28 ! Refractive indices from water come from Hale and Querry (1973) 29 ! 29 30 30 ! Refractive indices from Ammonium Sulfate Toon and Pollack (1976) 31 ! 31 32 32 ! Refractive indices for Dust, internal mixture of minerals coated with 1.5% hematite 33 33 ! by Volume (Balkanski et al., 2006) 34 ! 34 35 35 ! Refractive indices for POM: Kinne (pers. Communication 36 ! 36 37 37 ! Refractive index for BC from Shettle and Fenn (1979) 38 ! 38 39 39 ! Shettle, E. P., & Fenn, R. W. (1979), Models for the aerosols of the lower atmosphere and 40 40 ! the effects of humidity variations on their optical properties, U.S. Air Force Geophysics 41 41 ! Laboratory Rept. AFGL-TR-79-0214, Hanscomb Air Force Base, MA. 42 ! 42 43 43 ! Hale, G. M. and M. R. Querry, Optical constants of water in the 200-nm to 200-m 44 44 ! wavelength region, Appl. Opt., 12, 555-563, 1973. 45 ! 45 46 46 ! Toon, O. B. and J. B. Pollack, The optical constants of several atmospheric aerosol species: 47 47 ! Ammonium sulfate, aluminum oxide, and sodium chloride, J. Geohys. Res., 81, 5733-5748, 48 48 ! 1976. 49 ! 49 50 50 ! Balkanski, Y., M. Schulz, T. Claquin And O. Boucher, Reevaluation of mineral aerosol 51 51 ! radiative forcings suggests a better agreement with satellite and AERONET data, Atmospheric 52 52 ! Chemistry and Physics Discussions., 6, pp 8383-8419, 2006. 53 ! 53 54 54 IMPLICIT NONE 55 ! 55 56 56 ! Input arguments: 57 ! 57 58 58 REAL, DIMENSION(klon,klev), INTENT(IN) :: pdel 59 59 REAL, DIMENSION(klon,klev,naero_tot), INTENT(IN) :: m_allaer … … 63 63 REAL, DIMENSION(klon,klev), INTENT(IN) :: pplay 64 64 REAL, DIMENSION(klon,klev), INTENT(IN) :: t_seri 65 ! 65 66 66 ! Output arguments: 67 ! 67 68 68 REAL, DIMENSION(klon), INTENT(OUT) :: ai ! POLDER aerosol index 69 69 REAL, DIMENSION(klon,nwave,naero_tot), INTENT(OUT) :: tausum 70 70 REAL, DIMENSION(klon,naero_tot), INTENT(OUT) :: drytausum 71 71 REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT) :: tau 72 ! 72 73 73 ! Local 74 ! 74 75 75 INTEGER, PARAMETER :: las = nwave_sw 76 76 LOGICAL :: soluble … … 110 110 REAL :: abs_aeri_5wv(las,naero_insoluble) ! Abs. coeff. ** m2/g 111 111 112 ! 112 113 113 ! BC internal mixture 114 ! 114 115 115 INTEGER, PARAMETER :: nbclassbc = 6 ! Added by Rong Wang/OB for the 5 fractions 116 116 ! of BC in the soluble mode: … … 123 123 REAL :: abs_MG_5wv(nbre_RH,las,nbclassbc) 124 124 125 ! 125 126 126 ! Proprietes optiques 127 ! 127 128 128 REAL :: fact_RH(nbre_RH), BC_massfra 129 129 INTEGER :: n, classbc … … 196 196 ! Nitrate insoluble 197 197 0.726, 0.753, 0.780, 0.797, 0.811 / 198 ! 198 199 199 DATA abs_aers_5wv/ & 200 200 ! absorption BC Accumulation Soluble (AS) … … 303 303 4.505, 4.505, 4.505, 4.505, 4.520, 4.444, 4.356, 4.243, 4.089, 3.997, 3.912, 4.179, & 304 304 4.295, 4.295, 4.295, 4.295, 4.307, 4.239, 4.157, 4.045, 3.876, 3.757, 3.602, 3.569 / 305 ! 305 306 306 DATA abs_MG_5wv/ & 307 307 !--BC content=0.001 … … 405 405 ! interpolate from Sext to retrieve Sext_at_gridpoint_per_species 406 406 ! compute optical_thickness_at_gridpoint_per_species 407 ! 407 408 408 ! Calculations that need to be done since we are not in the subroutines INCA 409 409 ! -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/aeropt_6bands_rrtm.F90
r5154 r5159 1 ! 1 2 2 ! $Id: aeropt_6bands_rrtm.F90 4165 2022-05-26 19:56:53Z oboucher $ 3 ! 3 4 4 SUBROUTINE AEROPT_6BANDS_RRTM ( & 5 5 pdel, m_allaer, RHcl, & … … 20 20 ! Olivier Boucher f�vrier 2014 pour passage � RRTM 21 21 ! a partir des propri�t�s optiques fournies par Yves Balkanski 22 ! 22 23 23 IMPLICIT NONE 24 24 !! 25 25 ! Input arguments: 26 ! 26 27 27 REAL, DIMENSION(klon,klev), INTENT(IN) :: pdel 28 28 REAL, DIMENSION(klon,klev,naero_tot), INTENT(IN) :: m_allaer … … 33 33 REAL, DIMENSION(klon,klev), INTENT(IN) :: zrho 34 34 LOGICAL, INTENT(IN) :: ok_volcan ! volcanic diags 35 ! 35 36 36 ! Output arguments: 37 37 ! 2= total aerosols 38 38 ! 1= natural aerosols 39 ! 39 40 40 REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(OUT) :: tau_allaer ! epaisseur optique aerosol 41 41 REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(OUT) :: piz_allaer ! single scattering albedo aerosol 42 42 REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(OUT) :: cg_allaer ! asymmetry parameter aerosol 43 ! 43 44 44 ! Local 45 ! 45 46 46 LOGICAL :: soluble 47 47 INTEGER :: i, k,n, inu, m … … 77 77 REAL, DIMENSION(klon,klev,id_ASBCM_phy:id_ASBCM_phy,nbands_sw_rrtm) :: piz_ae_pi 78 78 REAL, DIMENSION(klon,klev,id_ASBCM_phy:id_ASBCM_phy,nbands_sw_rrtm) :: cg_ae_pi 79 ! 79 80 80 ! Proprietes optiques 81 ! 81 82 82 REAL:: alpha_aers_6bands(nbre_RH,nbands_sw_rrtm,naero_soluble) !--unit m2/g 83 83 REAL:: alpha_aeri_6bands(nbands_sw_rrtm,naero_insoluble) !--unit m2/g … … 88 88 ! 89 89 ! BC internal mixture 90 ! 90 91 91 INTEGER, PARAMETER :: nbclassbc = 6 ! Added by Rong Wang/OB for the 5 fractions 92 92 ! of BC in the soluble mode: … … 99 99 REAL :: cg_MG_6bands(nbre_RH,nbands_sw_rrtm,nbclassbc) 100 100 REAL :: piz_MG_6bands(nbre_RH,nbands_sw_rrtm,nbclassbc) 101 ! 101 102 102 INTEGER :: aerindex, classbc, classbc_pi 103 103 REAL :: tmp_var, tmp_var_pi, BC_massfra, BC_massfra_pi 104 104 CHARACTER*20 :: modname 105 ! 105 106 106 REAL, PARAMETER :: tau_min = 1.e-7 107 107 … … 526 526 ENDIF 527 527 528 ! 528 529 529 ! loop over modes, use of precalculated nmd and corresponding sigma 530 530 ! loop over wavelengths … … 796 796 797 797 IF (.NOT. ok_volcan) THEN 798 ! 798 799 799 !--this is the default case 800 800 !--in this case, index 1 of tau_allaer contains natural aerosols only 801 801 !--because the objective is to perform the double radiation call with and without anthropogenic aerosols 802 ! 802 803 803 tau_allaer(i,k,1,inu)=tau_ae_pi(i,k,id_ASSO4M_phy,inu)+tau_ae_pi(i,k,id_CSSO4M_phy,inu)+ & 804 804 tau_ae_pi(i,k,id_ASBCM_phy,inu)+tau_ae_pi(i,k,id_AIBCM_phy,inu)+ & … … 834 834 (tau_allaer(i,k,1,inu)*piz_allaer(i,k,1,inu)) 835 835 cg_allaer(i,k,1,inu)=MIN(MAX(cg_allaer(i,k,1,inu),0.0),1.0) 836 ! 836 837 837 ELSE 838 ! 838 839 839 !--this is the case for VOLMIP 840 840 !--in this case index 1 of tau_allaer contains all (natural+anthropogenic) aerosols (same as index 2 above) 841 841 !--but stratospheric aerosols will not be added in rrtm/readaerosolstrato2 as 842 842 !--the objective is to have the double radiation call with and without stratospheric aerosols 843 ! 843 844 844 tau_allaer(i,k,1,inu)=tau_allaer(i,k,2,inu) 845 845 … … 847 847 848 848 cg_allaer(i,k,1,inu) =cg_allaer(i,k,2,inu) 849 ! 849 850 850 ENDIF 851 851 ENDDO -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/aeropt_lw_rrtm.F90
r5154 r5159 1 ! 1 2 2 ! aeropt_lw_rrtm.F90 2014-05-13 C. Kleinschmitt 3 3 ! 2016-05-03 O. Boucher 4 4 ! 2016-12-17 O. Boucher 5 ! 5 6 6 ! This routine feeds aerosol LW properties to RRTM 7 7 ! we only consider absorption (not scattering) … … 20 20 IMPLICIT NONE 21 21 22 ! 22 23 23 ! Input arguments: 24 ! 24 25 25 LOGICAL, INTENT(IN) :: ok_alw 26 26 INTEGER, INTENT(IN) :: flag_aerosol 27 27 REAL, DIMENSION(klon,klev), INTENT(IN) :: pdel, zrho 28 28 REAL, DIMENSION(klon,klev,naero_tot), INTENT(IN) :: m_allaer, m_allaer_pi 29 ! 29 30 30 INTEGER inu, i, k 31 31 REAL :: zdh(klon,klev) 32 32 REAL :: tmp_var, tmp_var_pi 33 33 CHARACTER*20 modname 34 ! 34 35 35 !--absorption coefficient for CIDUST 36 36 REAL:: alpha_abs_CIDUST_16bands(nbands_lw_rrtm) !--unit m2/g … … 38 38 0.001, 0.003, 0.005, 0.006, 0.012, 0.030, 0.148, 0.098, & 39 39 0.017, 0.053, 0.031, 0.008, 0.010, 0.011, 0.013, 0.015 / 40 ! 40 41 41 modname='aeropt_lw_rrtm' 42 ! 42 43 43 IF (NLW.NE.nbands_lw_rrtm) THEN 44 44 CALL abort_physic(modname,'Erreur NLW doit etre egal a 16 pour cette routine',1) … … 46 46 ! 47 47 IF (ok_alw) THEN !--aerosol LW effects 48 ! 48 49 49 IF (flag_aerosol.EQ.5.OR.flag_aerosol.EQ.6.OR.flag_aerosol.EQ.7) THEN !-Dust 50 ! 50 51 51 zdh(:,:)=pdel(:,:)/(RG*zrho(:,:)) ! m 52 ! 52 53 53 DO k=1, klev 54 54 DO i=1, klon 55 ! 55 56 56 tmp_var =m_allaer(i,k,id_CIDUSTM_phy) /1.e6*zdh(i,k) !--g/m2 57 57 tmp_var_pi=m_allaer_pi(i,k,id_CIDUSTM_phy)/1.e6*zdh(i,k) !--g/m2 58 ! 58 59 59 DO inu=1, NLW 60 ! 60 61 61 !--total aerosol 62 62 tau_aero_lw_rrtm(i,k,2,inu) = MAX(1.e-15,tmp_var*alpha_abs_CIDUST_16bands(inu)) … … 64 64 ! tau_aero_lw_rrtm(:,:,1,inu) = MAX(1.e-15,tmp_var_pi*alpha_abs_CIDUST_16bands(inu)) 65 65 tau_aero_lw_rrtm(i,k,1,inu) = 1.e-15 !--test 66 ! 66 67 67 ENDDO 68 68 ENDDO 69 ! 69 70 70 ENDDO 71 71 ! 72 72 ENDIF 73 ! 73 74 74 ELSE !--no aerosol LW effects 75 ! 75 76 76 tau_aero_lw_rrtm = 1.e-15 77 77 ENDIF 78 ! 78 79 79 END SUBROUTINE AEROPT_LW_RRTM -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/dates.F90
r5158 r5159 1 1 subroutine dates_demo 2 2 ! -------------------------------------------------------------- 3 ! 3 4 4 ! Conseils a l'utilisateur: 5 ! 5 6 6 ! 1. VOUS COMPILEZ LES ENTIERS EN 32 BITS: 7 7 ! Utilisez alors les routines … … 17 17 ! les parametres subsequents assurant que seuls des entiers 18 18 ! representables en 32 bits y soient utilises. 19 ! 19 20 20 ! 2. VOUS COMPILEZ LES ENTIERS EN 64 BITS: 21 21 ! Vous pouvez alors utiliser toutes les routines ci-dessus … … 30 30 ! - amqhmsree_vers_dj: Conversion date gr�gorienne (en un seul r�el) > date julienne. 31 31 ! - dj_vers_amqhmsree: Conversion date julienne > date gr�gorienne (en un seul r�el). 32 ! 33 ! -------------------------------------------------------------- 34 ! 32 33 ! -------------------------------------------------------------- 34 35 35 ! D�finition des dates employ�es ci-dessous: 36 ! 36 37 37 ! Date julienne DJ: 38 38 ! Elle est compos�e d'un r�el. 39 39 ! R1: Ce r�el cro�t de 1 tous les jours, 40 40 ! et vaut 2451545.0 le 1er janvier 2000 � 12 UTC. 41 ! 41 42 42 ! Date gr�gorienne "en clair" AMQHMS: 43 43 ! Elle est compos�e de 5 entiers et d'un r�el. … … 80 80 character*200 clzue,clze,clech 81 81 character *(*) cdtit 82 ! 82 83 83 !------------------------------------------------- 84 84 ! Date de validit�. 85 85 !------------------------------------------------- 86 ! 86 87 87 zs=0. 88 88 zsssss=psssss/3600. … … 95 95 call dj_vers_amqhms(zdj,ianv,imov,iquv,ihev,imiv,zsv) ! date gr�gorienne de validit�. 96 96 if(pstati < 3600.) then 97 ! 97 98 98 !------------------------------------------------- 99 99 ! Ech�ance en minutes. 100 100 !------------------------------------------------- 101 ! 101 102 102 zech=pstati/60. ; clzue='mn' 103 103 elseif(pstati < 259200.) then 104 ! 104 105 105 !------------------------------------------------- 106 106 ! Ech�ance en heures. 107 107 !------------------------------------------------- 108 ! 108 109 109 zech=pstati/3600. ; clzue='h' 110 110 else 111 ! 111 112 112 !------------------------------------------------- 113 113 ! Ech�ance en jours. 114 114 !------------------------------------------------- 115 ! 115 116 116 zech=pstati/86400. ; clzue='j' 117 117 endif 118 ! 118 119 119 ! Affichage de l'echeance avec deux chiffres apres la virgule. 120 ! 120 121 121 write(clze,fmt='(f9.2)') zech 122 ! 122 123 123 ! Si l'echeance est voisine d'un entier a mieux que 10**-2 pres, 124 124 ! on l'affiche au format entier. 125 ! 125 126 126 if(clze(len_trim(clze)-2:len_trim(clze)) == '.00') then 127 127 clze=clze(1:len_trim(clze)-3) … … 130 130 ilze=len_trim(clze) 131 131 clech=clze(1:ilze)//clzue 132 ! 132 133 133 !------------------------------------------------- 134 134 ! Titre 3, de type 135 135 ! BASE 2000.01.15 00:00 +72H VALID 2000.01.18 15:00. 136 136 !------------------------------------------------- 137 ! 137 138 138 if(imi == 0 .and. imiv == 0) then 139 ! 139 140 140 !------------------------------------------------- 141 141 ! Les minutes de base et validit� sont nulles. 142 142 ! On ne les affiche pas. 143 143 !------------------------------------------------- 144 ! 144 145 145 write(cdtit,fmt='(a,i2,a,i2.2,a,i4.4,a,i2.2,3a,i2,a,i2.2,a,i4.4,a,i2.2,a)')& 146 146 &'BASE ',kqu,'.',kmo,'.',kan,' ',ihe,'h UTC + ',clech(1:len_trim(clech))& 147 147 &,', VALID ',iquv,'.',imov,'.',ianv,' ',ihev,'h UTC' 148 148 else 149 ! 149 150 150 !------------------------------------------------- 151 151 ! Les minutes de base ou validit� sont non nulles. 152 152 ! On les affiche. 153 153 !------------------------------------------------- 154 ! 154 155 155 write(cdtit,fmt='(a,i2,a,i2.2,a,i4.4,a,i2.2,a,i2.2,3a,i2,a,i2.2,a,i4.4,a,i2.2,a,i2.2,a)')& 156 156 &'BASE ',kqu,'.',kmo,'.',kan,' ',ihe,':',imi,' UTC + ',clech(1:len_trim(clech))& … … 207 207 character*3 cljour(0:6) 208 208 data cljour/'Dim','Lun','Mar','Mer','Jeu','Ven','Sam'/ 209 ! 209 210 210 !------------------------------------------------- 211 211 ! Date courante � la f90. 212 212 !------------------------------------------------- 213 ! 213 214 214 clgol1=' ' 215 215 clgol2=' ' 216 216 clgol3=' ' 217 217 call date_and_time(clgol1,clgol2,clgol3,idatat) 218 ! 218 219 219 !------------------------------------------------- 220 220 ! clgol1 est du type "AAAAMMQQ". 221 221 !------------------------------------------------- 222 ! 222 223 223 read(clgol1,fmt='(i4,2i2)') kaaaa,kmm,kqq 224 ! 224 225 225 !------------------------------------------------- 226 226 ! clgol2 est du type "HHMMSS.SSS". 227 227 !------------------------------------------------- 228 ! 228 229 229 read(clgol2,fmt='(2i2)') khh,kmi 230 230 read(clgol2(5:),fmt=*) zs 231 231 kss=nint(zs) 232 232 read(clgol1,fmt='(i8)') iaaaammqq 233 ! 233 234 234 !------------------------------------------------- 235 235 ! Jour de la semaine. 236 236 !------------------------------------------------- 237 ! 237 238 238 kjs=ijoursem(iaaaammqq) 239 239 cdjs=cljour(kjs) 240 ! 240 241 241 !------------------------------------------------- 242 242 ! Date totale. 243 243 !------------------------------------------------- 244 ! 244 245 245 write(cddt,fmt='(i4.4,a,2(i2.2,a),2a,i2.2,a,i2.2,a,i2.2)') & 246 246 &kaaaa,'_',kmm,'_',kqq,'_',cdjs,'_',khh,':',kmi,':',kss … … 253 253 ! ------- 254 254 ! 1999-08-17, J.M. Piriou. 255 ! 255 256 256 ! Modifications: 257 257 ! -------------- 258 ! 258 259 259 ! -------------------------------------------------------------------------- 260 260 ! En entree: … … 284 284 idate1=20000101 285 285 idate2=kaaaa*10000+kmm*100+kqq 286 ! 286 287 287 !------------------------------------------------- 288 288 ! Nombre de jours �coul�s entre la date 289 289 ! d'entr�e � 0h UTC et le 1er janvier 2000 � 0h UTC. 290 290 !------------------------------------------------- 291 ! 291 292 292 call ecartdj(idate1,idate2,iecart) 293 ! 293 294 294 !------------------------------------------------- 295 295 ! Date julienne. 296 296 !------------------------------------------------- 297 ! 297 298 298 pdj=2451545.0- 0.5 +real(iecart)+real(khh)/24. & 299 299 & +real(kmn)/1440.+ps/86400. … … 306 306 ! ------- 307 307 ! 94-10-31, J.M. Piriou. 308 ! 308 309 309 ! Modifications: 310 310 ! -------------- 311 ! 311 312 312 ! -------------------------------------------------------------------------- 313 313 ! En entree: … … 326 326 ! En sortie: 327 327 ! kdat2 date finale. 328 ! 328 329 329 ! -------------------------------------------------------------------------- 330 330 ! Exemple: call DAPLUS(19940503,1,456,ires) fournira … … 373 373 ! Cette routine est utilisable avec des entiers 32 bits ou 64 bits. 374 374 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 375 ! 375 376 376 ! ------------------------------------------------- 377 377 ! Date d'arrivee au jour pres. … … 409 409 ! si l'ecart entre les deux dates est inferieur a 2**31 secondes, 410 410 ! soit 68 ans!... 411 ! 411 412 412 ! Au-dela de cette duree, les entiers doivent etre 64 bits. 413 413 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ … … 429 429 INTEGER(KIND=4) :: KEC 430 430 character*(*) cd1,cd2 431 ! 431 432 432 ! ------------------------------------------------- 433 433 ! On lit les dates sur des entiers. 434 434 ! ------------------------------------------------- 435 ! 435 436 436 read(cd1,fmt='(i8,3i2)') iamq1,ih1,im1,is1 437 ! 437 438 438 ! ------------------------------------------------- 439 439 ! Calculs d'ecarts et de leur partition 440 440 ! en multiples de 86400 et sous-multiples. 441 441 ! ------------------------------------------------- 442 ! 442 443 443 isec=ih1*3600+im1*60+is1 ! nombre de secondes ecoulees depuis cd10h. 444 444 idelta=kec+isec ! nombre de secondes entre cd10h et cd2. 445 445 ireste=modulo(idelta,86400) ! nombre de secondes entre cd20h et cd2. 446 446 iecjours=(idelta-ireste)/86400 ! nombre de jours entre cd10h et cd20h. 447 ! 447 448 448 ! ------------------------------------------------- 449 449 ! Date d'arrivee au jour pres. 450 450 ! ------------------------------------------------- 451 ! 451 452 452 call daplus(iamq1,1,iecjours,iamq2) 453 ! 453 454 454 ! ------------------------------------------------- 455 455 ! Date finale a la seconde pres. 456 456 ! ------------------------------------------------- 457 ! 457 458 458 ih2=ireste/3600 459 459 ireste=ireste-3600*ih2 … … 470 470 ! ------- 471 471 ! 1999-08-17, J.M. Piriou. 472 ! 472 473 473 ! Modifications: 474 474 ! -------------- 475 ! 475 476 476 ! -------------------------------------------------------------------------- 477 477 ! En entree: … … 485 485 ! ps seconde 486 486 ! -------------------------------------------------------------------------- 487 ! 487 488 488 !------------------------------------------------- 489 489 ! Nombre de jours entre le 1er janvier 2000 � 0 UTC … … 508 508 REAL(KIND=8) :: ZFRAC 509 509 zecart=pdj-2451544.5 510 ! 510 511 511 !------------------------------------------------- 512 512 ! Nombre entier de jours. 513 513 !------------------------------------------------- 514 ! 514 515 515 zfrac=modulo(zecart, 1._8 ) 516 516 iecart=nint(zecart-zfrac) 517 ! 517 518 518 !------------------------------------------------- 519 519 ! Date gr�gorienne associ�e. 520 520 !------------------------------------------------- 521 ! 521 522 522 idate1=20000101 523 523 call daplusj(idate1,iecart,idate2) … … 526 526 kmm=mod(knouv,100) 527 527 kaaaa=knouv/100 528 ! 528 529 529 !------------------------------------------------- 530 530 ! Calcul de des heure, minute et seconde. 531 531 !------------------------------------------------- 532 ! 532 533 533 zfrac=(zecart-real(iecart))*24. 534 534 khh=int(zfrac) … … 544 544 ! ------- 545 545 ! 2002-11, J.M. Piriou. 546 ! 546 547 547 ! Modifications: 548 548 ! -------------- 549 ! 549 550 550 ! -------------------------------------------------------------------------- 551 551 ! En entree: … … 561 561 REAL(KIND=8) :: ZS 562 562 INTEGER(KIND=4) :: iaaaa,imm,iqq,ihh,imn 563 ! 563 564 564 !------------------------------------------------- 565 565 ! Conversion gr�gorien julien; cible 5 entiers et un r�el. 566 566 !------------------------------------------------- 567 ! 567 568 568 call dj_vers_amqhms(pdj,iaaaa,imm,iqq,ihh,imn,zs) 569 ! 569 570 570 !------------------------------------------------- 571 571 ! On passe de ces 5 entiers et un r�el � un seul r�el. 572 572 !------------------------------------------------- 573 ! 573 574 574 pgrer=real(iaaaa)*10000.+real(imm)*100. & 575 575 & + real(iqq)+real(ihh)/100. & … … 583 583 ! ------- 584 584 ! 2002-11, J.M. Piriou. 585 ! 585 586 586 ! Modifications: 587 587 ! -------------- 588 ! 588 589 589 ! -------------------------------------------------------------------------- 590 590 ! En entree: … … 600 600 REAL(KIND=8) :: ZS,zloc 601 601 INTEGER(KIND=4) :: iaaaa,imm,iqq,ihh,imn,iloc 602 ! 602 603 603 !------------------------------------------------- 604 604 ! On passe de cette date gr�gorienne donn�e 605 605 ! comme un seul r�el � 5 entiers et un r�el. 606 606 !------------------------------------------------- 607 ! 607 608 608 iloc=int(pgrer) 609 609 iqq=mod(iloc,100) … … 617 617 imn=mod(iloc,100) 618 618 ihh=iloc/100 619 ! 619 620 620 !------------------------------------------------- 621 621 ! Conversion gr�gorien julien; cible 5 entiers et un r�el. 622 622 !------------------------------------------------- 623 ! 623 624 624 call amqhms_vers_dj(iaaaa,imm,iqq,ihh,imn,zs,pdj) 625 625 end … … 631 631 ! ------- 632 632 ! 97-01-09, J.M. Piriou. 633 ! 633 634 634 ! Modifications: 635 635 ! -------------- 636 ! 636 637 637 ! -------------------------------------------------------------------------- 638 638 ! En entree: kopt option de precision sur les dates: … … 703 703 ! si l'ecart entre les deux dates est inferieur a 2**31 jours, 704 704 ! soit 5879489 ans!... 705 ! 705 706 706 ! Au-dela de cette duree, les entiers doivent etre 64 bits. 707 707 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 708 ! 708 709 709 ! ------------------------------------------------- 710 710 ! Ecart entre les deux dates au jour pres. … … 742 742 ! si l'ecart entre les deux dates est inferieur a 2**31 secondes, 743 743 ! soit 68 ans!... 744 ! 744 745 745 ! Au-dela de cette duree, les entiers doivent etre 64 bits. 746 746 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ … … 759 759 INTEGER(KIND=4) :: KECQ 760 760 character*(*) cd1,cd2 761 ! 761 762 762 ! ------------------------------------------------- 763 763 ! On lit les dates sur des entiers. 764 764 ! ------------------------------------------------- 765 ! 765 766 766 read(cd1,fmt='(i8,3i2)') iamq1,ih1,im1,is1 767 767 read(cd2,fmt='(i8,3i2)') iamq2,ih2,im2,is2 768 ! 768 769 769 ! ------------------------------------------------- 770 770 ! Ecart entre les deux dates au jour pres. 771 771 ! ------------------------------------------------- 772 ! 772 773 773 call ecartd(iamq1,iamq2,1,kecq) 774 ! 774 775 775 ! ------------------------------------------------- 776 776 ! Ecart en secondes. 777 777 ! ------------------------------------------------- 778 ! 778 779 779 kec=kecq*86400+(ih2-ih1)*3600+(im2-im1)*60+is2-is1 780 780 end … … 786 786 ! ------- 787 787 ! 92-05-27, J.M. Piriou. 788 ! 788 789 789 ! Modifications: 790 790 ! -------------- 791 ! 791 792 792 ! -------------------------------------------------------------------------- 793 793 ! En entree: kopt option de precision sur les dates: … … 837 837 INTEGER(KIND=4) :: KOPT 838 838 data idebm/0,31,59,90,120,151,181,212,243,273,304,334/ 839 ! 839 840 840 ! -------------------------------------------------------------------------- 841 841 ! ** 1. Calcul du nb de jours separant ki2 du 1er janv 1900 842 ! 842 843 843 ! * 1.1 Extraction des quantieme, mois et annee 844 844 if(kopt == 1) then … … 909 909 ! -------------------------------------------------------------------------- 910 910 ! ** 2. Calcul du nb de jours separant ii1 du 1er janv 1900 911 ! 911 912 912 ! * 2.1 Extraction des quantieme, mois et annee 913 913 ii1=19000101 … … 952 952 ! ------- 953 953 ! 92-05-27, J.M. Piriou. 954 ! 954 955 955 ! Modifications: 956 956 ! -------------- 957 ! 957 958 958 ! -------------------------------------------------------------------------- 959 959 ! En entree: kopt option de precision sur les dates: … … 1004 1004 ! -------------------------------------------------------------------------- 1005 1005 ! ** On determine la date approximative d'arrivee en annees decimales 1006 ! 1006 1007 1007 if(kopt == 1) then 1008 1008 ! Date de type AAAAMMQQ … … 1026 1026 ! -------------------------------------------------------------------------- 1027 1027 ! ** On determine la date en clair ii2p associee a la date decimale 1028 ! 1028 1029 1029 iaaaa=int(zarrdec) 1030 1030 zarrdec=12.*(zarrdec-real(iaaaa)) … … 1035 1035 ! -------------------------------------------------------------------------- 1036 1036 ! ** On calcule le nombre de jours separant 19000101 de ii2p 1037 ! 1037 1038 1038 call gregod(ii2p,1,igii2p) 1039 1039 imod=mod(kgre,iconv) … … 1042 1042 ! -------------------------------------------------------------------------- 1043 1043 ! ** On avance de iec jours par rapport a ii2p 1044 ! 1044 1045 1045 ! * L'annee est-elle bissextile? 1046 1046 ! Une annee est bissextile ssi elle est … … 1071 1071 ! -------------------------------------------------------------------------- 1072 1072 ! ** On met en forme la date finale 1073 ! 1073 1074 1074 idat=iqq+imm*100+iaaaa*10000 1075 1075 if(kopt == 2) then … … 1101 1101 ! ------- 1102 1102 ! 94-10-31, J.M. Piriou. 1103 ! 1103 1104 1104 ! Modifications: 1105 1105 ! -------------- 1106 ! 1106 1107 1107 ! -------------------------------------------------------------------------- 1108 1108 ! En entree: … … 1133 1133 ! ------- 1134 1134 ! 92-05-27, J.M. Piriou. 1135 ! 1135 1136 1136 ! Modifications: 1137 1137 ! -------------- 1138 ! 1138 1139 1139 ! -------------------------------------------------------------------------- 1140 1140 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/eq_regions_mod.F90
r5158 r5159 1 1 module eq_regions_mod 2 ! 2 3 3 ! Purpose. 4 4 ! -------- … … 7 7 ! equal area and small diameter. 8 8 ! the type. 9 ! 9 10 10 ! Background. 11 11 ! ----------- … … 21 21 ! points in an IFS gaussian grid and provide an optimal (i.e. exact) 22 22 ! distribution of grid points over regions. 23 ! 23 24 24 ! The following copyright notice for the eq_regions package is included from 25 25 ! the original MatLab release. 26 ! 26 27 27 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 28 28 ! + Release 1.10 2005-06-26 + … … 50 50 ! + + 51 51 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 52 ! 52 53 53 ! Author. 54 54 ! ------- 55 55 ! George Mozdzynski *ECMWF* 56 ! 56 57 57 ! Modifications. 58 58 ! -------------- 59 59 ! Original : 2006-04-15 60 ! 60 61 61 !-------------------------------------------------------------------------------- 62 62 … … 85 85 86 86 subroutine eq_regions(N) 87 ! 87 88 88 ! eq_regions uses the zonal equal area sphere partitioning algorithm to partition 89 89 ! the surface of a sphere into N regions of equal area and small diameter. 90 ! 90 91 91 integer(kind=jpim),intent(in) :: N 92 92 integer(kind=jpim) :: n_collars,j … … 100 100 if( N == 1 )then 101 101 102 ! 102 103 103 ! We have only one region, which must be the whole sphere. 104 ! 104 105 105 n_regions(1)=1 106 106 n_regions_ns=1 … … 108 108 else 109 109 110 ! 110 111 111 ! Given N, determine c_polar 112 112 ! the colatitude of the North polar spherical cap. 113 ! 113 114 114 c_polar = polar_colat(N) 115 ! 115 116 116 ! Given N, determine the ideal angle for spherical collars. 117 117 ! Based on N, this ideal angle, and c_polar, 118 118 ! determine n_collars, the number of collars between the polar caps. 119 ! 119 120 120 n_collars = num_collars(N,c_polar,ideal_collar_angle(N)) 121 121 n_regions_ns=n_collars+2 122 ! 122 123 123 ! Given N, c_polar and n_collars, determine r_regions, 124 124 ! a list of the ideal real number of regions in each collar, … … 130 130 allocate(r_regions(n_collars+2)) 131 131 call ideal_region_list(N,c_polar,n_collars,r_regions) 132 ! 132 133 133 ! Given N and r_regions, determine n_regions, a list of the natural number 134 134 ! of regions in each collar and the polar caps. … … 138 138 ! n_regions[n_collars+2] is 1. 139 139 ! The sum of n_regions is N. 140 ! 140 141 141 call round_to_naturals(N,n_collars,r_regions) 142 142 deallocate(r_regions) … … 160 160 161 161 function num_collars(N,c_polar,a_ideal) result(num_c) 162 ! 162 163 163 !NUM_COLLARS The number of collars between the polar caps 164 ! 164 165 165 ! Given N, an ideal angle, and c_polar, 166 166 ! determine n_collars, the number of collars between the polar caps. 167 ! 167 168 168 integer(kind=jpim),intent(in) :: N 169 169 real(kind=jprb),intent(in) :: a_ideal,c_polar … … 180 180 181 181 subroutine ideal_region_list(N,c_polar,n_collars,r_regions) 182 ! 182 183 183 !IDEAL_REGION_LIST The ideal real number of regions in each zone 184 ! 184 185 185 ! List the ideal real number of regions in each collar, plus the polar caps. 186 ! 186 187 187 ! Given N, c_polar and n_collars, determine r_regions, a list of the ideal real 188 188 ! number of regions in each collar, plus the polar caps. … … 191 191 ! r_regions[n_collars+2] is 1. 192 192 ! The sum of r_regions is N. 193 ! 193 194 194 integer(kind=jpim),intent(in) :: N,n_collars 195 195 real(kind=jprb),intent(in) :: c_polar … … 201 201 r_regions(1) = 1.0_jprb 202 202 if( n_collars > 0 )then 203 ! 203 204 204 ! Based on n_collars and c_polar, determine a_fitting, 205 205 ! the collar angle such that n_collars collars fit between the polar caps. 206 ! 206 207 207 a_fitting = (pi-2.0_jprb*c_polar)/float(n_collars) 208 208 ideal_region_area = area_of_ideal_region(N) … … 218 218 219 219 function ideal_collar_angle(N) result(ideal) 220 ! 220 221 221 ! IDEAL_COLLAR_ANGLE The ideal angle for spherical collars of an EQ partition 222 ! 222 223 223 ! IDEAL_COLLAR_ANGLE(N) sets ANGLE to the ideal angle for the 224 224 ! spherical collars of an EQ partition of the unit sphere S^2 into N regions. 225 ! 225 226 226 integer(kind=jpim),intent(in) :: N 227 227 real(kind=jprb) :: ideal … … 231 231 232 232 subroutine round_to_naturals(N,n_collars,r_regions) 233 ! 233 234 234 ! ROUND_TO_NATURALS Round off a given list of numbers of regions 235 ! 235 236 236 ! Given N and r_regions, determine n_regions, a list of the natural number 237 237 ! of regions in each collar and the polar caps. … … 241 241 ! n_regions[n_collars+2] is 1. 242 242 ! The sum of n_regions is N. 243 ! 243 244 244 integer(kind=jpim),intent(in) :: N,n_collars 245 245 real(kind=jprb),intent(in) :: r_regions(n_collars+2) … … 256 256 257 257 function polar_colat(N) result(polar_c) 258 ! 258 259 259 ! Given N, determine the colatitude of the North polar spherical cap. 260 ! 260 261 261 integer(kind=jpim),intent(in) :: N 262 262 real(kind=jprb) :: area … … 272 272 273 273 function area_of_ideal_region(N) result(area) 274 ! 274 275 275 ! AREA_OF_IDEAL_REGION(N) sets AREA to be the area of one of N equal 276 276 ! area regions on S^2, that is 1/N times AREA_OF_SPHERE. 277 ! 277 278 278 integer(kind=jpim),intent(in) :: N 279 279 real(kind=jprb) :: area_of_sphere … … 285 285 286 286 function sradius_of_cap(area) result(sradius) 287 ! 287 288 288 ! SRADIUS_OF_CAP(AREA) returns the spherical radius of 289 289 ! an S^2 spherical cap of area AREA. 290 ! 290 291 291 real(kind=jprb),intent(in) :: area 292 292 real(kind=jprb) :: sradius … … 296 296 297 297 function area_of_collar(a_top, a_bot) result(area) 298 ! 298 299 299 ! AREA_OF_COLLAR Area of spherical collar 300 ! 300 301 301 ! AREA_OF_COLLAR(A_TOP, A_BOT) sets AREA to be the area of an S^2 spherical 302 302 ! collar specified by A_TOP, A_BOT, where A_TOP is top (smaller) spherical radius, 303 303 ! A_BOT is bottom (larger) spherical radius. 304 ! 304 305 305 real(kind=jprb),intent(in) :: a_top,a_bot 306 306 real(kind=jprb) area … … 310 310 311 311 function area_of_cap(s_cap) result(area) 312 ! 312 313 313 ! AREA_OF_CAP Area of spherical cap 314 ! 314 315 315 ! AREA_OF_CAP(S_CAP) sets AREA to be the area of an S^2 spherical 316 316 ! cap of spherical radius S_CAP. 317 ! 317 318 318 real(kind=jprb),intent(in) :: s_cap 319 319 real(kind=jprb) area -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/gfl_subs.F90
r2010 r5159 582 582 583 583 !SUBROUTINE DEACT_CLOUD_GFL ! commente par MPL 10.12.08 (et REACT_CLOUD_GFL) 584 ! 584 585 585 !**** *DEACT_CLOUD_GFL* Deactivate prognostic cloud variables 586 ! 586 587 587 ! ------------------------------------------------------------------ 588 ! 588 589 589 !INTEGER(KIND=JPIM) :: JGFL 590 590 !REAL(KIND=JPRB) :: ZHOOK_HANDLE 591 ! 591 592 592 !#include "suslb.intfb.h" 593 ! 593 594 594 !IF (LHOOK) CALL DR_HOOK('GFL_SUBS:DEACT_CLOUD_GFL',0,ZHOOK_HANDLE) 595 ! 595 596 596 !IF (.NOT.L_CLD_DEACT .AND. & 597 597 ! & (YL%LACTIVE .OR. YI%LACTIVE .OR. & … … 611 611 ! IF (YA%LGP) YGFL%NUMGPFLDS=YGFL%NUMGPFLDS-1 612 612 ! IF (YCPF%LGP) YGFL%NUMGPFLDS=YGFL%NUMGPFLDS-1 613 ! 613 614 614 ! IF (YL%LT5) YGFL%NUMFLDS5=YGFL%NUMFLDS5-1 615 615 ! IF (YI%LT5) YGFL%NUMFLDS5=YGFL%NUMFLDS5-1 … … 618 618 ! IF (YA%LT5) YGFL%NUMFLDS5=YGFL%NUMFLDS5-1 619 619 ! IF (YCPF%LT5) YGFL%NUMFLDS5=YGFL%NUMFLDS5-1 620 ! 620 621 621 ! CALL FALSIFY_GFLC(YL) 622 622 ! CALL FALSIFY_GFLC(YI) … … 643 643 ! ENDDO 644 644 ! CALL SUSLB 645 ! 645 646 646 ! L_CLD_DEACT=.TRUE. 647 647 ! WRITE(NULOUT,*)' CLOUD FIELDS DE-ACTIVATAD, YGFL%NUMGPFLDS=', & 648 648 ! & YGFL%NUMGPFLDS,' YGFL%NUMFLDS_SL1=', YGFL%NUMFLDS_SL1 649 649 !ENDIF 650 ! 650 651 651 !IF (LHOOK) CALL DR_HOOK('GFL_SUBS:DEACT_CLOUD_GFL',1,ZHOOK_HANDLE) 652 ! 652 653 653 !END SUBROUTINE DEACT_CLOUD_GFL 654 ! 654 655 655 !!========================================================================= 656 ! 656 657 657 !SUBROUTINE REACT_CLOUD_GFL 658 658 !!**** *REACT_CLOUD_GFL* Reactivate prognostic cloud variables 659 ! 659 660 660 !INTEGER(KIND=JPIM) :: JGFL 661 661 !REAL(KIND=JPRB) :: ZHOOK_HANDLE … … 664 664 !! ------------------------------------------------------------------ 665 665 !IF (LHOOK) CALL DR_HOOK('GFL_SUBS:REACT_CLOUD_GFL',0,ZHOOK_HANDLE) 666 ! 666 667 667 !IF (L_CLD_DEACT) THEN 668 668 ! LLGPL = YL%LGP … … 673 673 ! CALL COPY_GFLC_GFLC(YI,YI_SAVE) 674 674 ! CALL COPY_GFLC_GFLC(YA,YA_SAVE) 675 ! 675 676 676 ! IF (.NOT. LLGPL .AND. YL%LGP) YGFL%NUMGPFLDS=YGFL%NUMGPFLDS+1 677 677 ! IF (.NOT. LLGPI .AND. YI%LGP) YGFL%NUMGPFLDS=YGFL%NUMGPFLDS+1 678 678 ! IF (.NOT. LLGPA .AND. YA%LGP) YGFL%NUMGPFLDS=YGFL%NUMGPFLDS+1 679 ! 679 680 680 ! YGFL%NUMFLDS_SL1 = 0 681 681 ! DO JGFL=1,YGFL%NUMFLDS … … 688 688 ! ENDDO 689 689 ! CALL SUSLB 690 ! 690 691 691 ! L_CLD_DEACT=.FALSE. 692 692 ! WRITE(NULOUT,*)' CLOUD FIELDS RE-ACTIVATAD, YGFL%NUMGPFLDS=', & 693 693 ! & YGFL%NUMGPFLDS,' YGFL%NUMFLDS_SL1=', YGFL%NUMFLDS_SL1 694 694 !ENDIF 695 ! 695 696 696 !IF (LHOOK) CALL DR_HOOK('GFL_SUBS:REACT_CLOUD_GFL',1,ZHOOK_HANDLE) 697 ! 697 698 698 !! ------------------------------------------------------------------ 699 699 !END SUBROUTINE REACT_CLOUD_GFL -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/gppref.F90
r1990 r5159 21 21 ! PRESH(KPROMA,0:KFLEV) - HALF LEVEL PRESSURE 22 22 ! PRESF(KPROMA,KFLEV) - FULL LEVEL PRESSURE 23 ! 23 24 24 ! Implicit arguments : NONE. 25 25 ! -------------------- … … 105 105 ! assumption that the top level input for pressure is 0 hPa. 106 106 ! This restriction is only necessary in the case of use of NDLNPR=1. 107 ! 107 108 108 ! LVERTFE : .T./.F. Finite element/conventional vertical discretisation. 109 109 ! NDLNPR : NDLNPR=0: conventional formulation of delta, i.e. ln(P(l)/P(l-1)). 110 110 ! NDLNPR=1: formulation of delta used in non hydrostatic model, 111 111 ! LAPRXPK : way of computing full-levels pressures in primitive equation 112 ! 112 113 113 LVERTFE=.TRUE. !!!!! A REVOIR (MPL) comment faut-il vraiment calculer PRESF ? 114 114 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/lwu.F90
r5154 r5159 1 ! 1 2 2 ! $Id$ 3 ! 3 4 4 SUBROUTINE LWU & 5 5 & (KIDIA, KFDIA, KLON, KLEV, & -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/namphy0.h
r1990 r5159 36 36 ! For ACCVIMPGY 37 37 &,ALFX,TCTC,TVFC,GAMAP1,RKDN,VVN,VVX,FENTRT,HCMIN,FQLIC,FNEBC,FEVAPC & 38 ! 38 39 39 &,RDPHIC,GWBFAUT,RWBF1,RWBF2,RAUITN,RAUITX,RAUIUSTE & 40 40 &,RSMDNEBX,RSMDTX,NSMTPA,NSMTPB -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/parkind1.F90
r1990 r5159 1 1 MODULE PARKIND1 2 ! 2 3 3 ! *** Define usual kinds for strong typing *** 4 ! 4 5 5 IMPLICIT NONE 6 6 SAVE 7 ! 7 8 8 ! Integer Kinds 9 9 ! ------------- 10 ! 10 11 11 INTEGER, PARAMETER :: JPIT = SELECTED_INT_KIND(2) 12 12 INTEGER, PARAMETER :: JPIS = SELECTED_INT_KIND(4) … … 22 22 #endif 23 23 24 ! 24 25 25 ! Real Kinds 26 26 ! ---------- 27 ! 27 28 28 INTEGER, PARAMETER :: JPRT = SELECTED_REAL_KIND(2,1) 29 29 INTEGER, PARAMETER :: JPRS = SELECTED_REAL_KIND(4,2) 30 30 INTEGER, PARAMETER :: JPRM = SELECTED_REAL_KIND(6,37) 31 31 INTEGER, PARAMETER :: JPRB = SELECTED_REAL_KIND(13,300) 32 ! 32 33 33 END MODULE PARKIND1 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/parkind2.F90
r1990 r5159 1 1 MODULE PARKIND2 2 ! 2 3 3 ! *** Define huge kinds for strong typing *** 4 ! 4 5 5 IMPLICIT NONE 6 6 SAVE 7 ! 7 8 8 ! Integer Kinds 9 9 ! ------------- 10 ! 10 11 11 INTEGER, PARAMETER :: JPIH = SELECTED_INT_KIND(18) 12 ! 12 13 13 ! Real Kinds 14 14 ! ---------- 15 ! 15 16 16 #ifdef REALHUGE 17 17 INTEGER, PARAMETER :: JPRH = SELECTED_REAL_KIND(31,291) … … 19 19 INTEGER, PARAMETER :: JPRH = SELECTED_REAL_KIND(13,300) 20 20 #endif 21 ! 21 22 22 END MODULE PARKIND2 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/radlsw.F90
r5154 r5159 1048 1048 1049 1049 ! ------------------------------------------------------------------ 1050 ! 1050 1051 1051 !* 2.7 DIFFUSIVITY FACTOR OR SATELLITE VIEWING ANGLE 1052 1052 ! --------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/read_rsun_rrtm.F90
r5154 r5159 3 3 !**************************************************************************************** 4 4 ! This routine will read the solar constant fraction per band 5 ! 5 6 6 ! Olivier Boucher with inputs from Marion Marchand 7 7 !**************************************************************************************** -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90
r5154 r5159 1 1 ! $Id: readaerosol_optic_rrtm.F90 4124 2022-04-08 14:47:04Z dcugnet $ 2 ! 2 3 3 SUBROUTINE readaerosol_optic_rrtm(debut, aerosol_couple, ok_alw, ok_volcan, & 4 4 flag_aerosol, flag_bc_internal_mixture, itap, rjourvrai, & … … 99 99 ! 100 100 !**************************************************************************************** 101 ! 102 ! 101 102 103 103 IF (aerosol_couple) THEN !--we get aerosols from tr_seri array from INCA 104 ! 104 105 105 !--copy fields from INCA tr_seri 106 106 !--convert to ug m-3 unit for consistency with offline fields 107 ! 107 108 108 itr = 0 109 109 DO iq = 1,nqtot … … 142 142 nitrcoarse(:,:) = tr_seri(:,:,id_CSNO3M) *zrho(:,:)*1.e9 ! CSNO3M 143 143 nitrinscoarse(:,:)= tr_seri(:,:,id_CINO3M) *zrho(:,:)*1.e9 ! CINO3M 144 ! 144 145 145 bcsol_pi(:,:) = 0.0 ! ASBCM pre-ind 146 146 pomsol_pi(:,:) = 0.0 ! ASPOMM pre-ind … … 156 156 nitrcoarse_pi(:,:) = 0.0 ! CSNO3M pre-ind 157 157 nitrinscoarse_pi(:,:)= 0.0 ! CINO3M 158 ! 158 159 159 ELSE !--not aerosol_couple 160 ! 160 161 161 ! Read and interpolate sulfate 162 162 IF ( flag_aerosol .EQ. 1 .OR. flag_aerosol .EQ. 6 .OR. flag_aerosol .EQ. 7 ) THEN … … 219 219 loaddust=0. 220 220 ENDIF 221 ! 221 222 222 ! Read and interpolate asno3m, csno3m, cino3m 223 223 IF (flag_aerosol .EQ. 6 .OR. flag_aerosol .EQ. 7 ) THEN … … 237 237 loadno3(:)=0.0 238 238 ENDIF 239 ! 239 240 240 ! CSSO4M is set to 0 as not reliable 241 241 sulfcoarse(:,:) = 0.0 ! CSSO4M (=SO4) + CSMSAM (=MSA) … … 244 244 ENDIF !--not aerosol_couple 245 245 246 ! 246 247 247 ! Store all aerosols in one variable 248 ! 248 249 249 m_allaer(:,:,id_ASBCM_phy) = bcsol(:,:) ! ASBCM 250 250 m_allaer(:,:,id_ASPOMM_phy) = pomsol(:,:) ! ASPOMM … … 278 278 m_allaer_pi(:,:,id_STRAT_phy) = 0.0 279 279 280 ! 280 281 281 ! Calculate the total mass of all soluble aersosols 282 282 ! to be revisited for AR6 … … 286 286 !**************************************************************************************** 287 287 ! 2) Calculate optical properties for the aerosols 288 ! 288 289 289 !**************************************************************************************** 290 290 DO k = 1, klev -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/readaerosolstrato1_rrtm.F90
r5133 r5159 1 ! 1 2 2 ! $Id: readaerosolstrato1_rrtm.F90 2526 2016-05-26 22:13:40Z oboucher $ 3 3 ! … … 57 57 DATA cg_sw_strat /0.6997170, 0.6810035, 0.7403592, 0.7562674, 0.6676504, 0.3478689/ 58 58 DATA piz_sw_strat /0.9999998, 0.9999998, 1.000000000, 0.9999958, 0.9977155, 0.4510679/ 59 ! 59 60 60 !--diagnostics AOD in the SW 61 61 ! alpha_sw_strat_wave is *not* normalised by the 550 nm extinction coefficient 62 62 REAL, DIMENSION(nwave_sw) :: alpha_sw_strat_wave 63 63 DATA alpha_sw_strat_wave/3.708007,4.125824,4.136584,3.887478,3.507738/ 64 ! 64 65 65 !--diagnostics AOD in the LW at 10 um (not normalised by the 550 nm ext coefficient 66 66 REAL :: alpha_lw_strat_wave(nwave_lw) 67 67 DATA alpha_lw_strat_wave/0.2746812/ 68 ! 68 69 69 REAL, DIMENSION(nbands_lw_rrtm) :: alpha_lw_abs_rrtm 70 70 DATA alpha_lw_abs_rrtm/ 8.8340312E-02, 6.9856711E-02, 6.2652975E-02, 5.7188231E-02, & … … 178 178 179 179 IF (is_mpi_root.AND.is_omp_root) THEN 180 ! 180 181 181 DEALLOCATE(tauaerstrat) 182 182 DEALLOCATE(tauaerstrat_mois) 183 183 DEALLOCATE(tauaerstrat_mois_glo) 184 ! 184 185 185 ENDIF !--is_mpi_root and is_omp_root 186 186 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90
r5154 r5159 1 ! 1 2 2 ! $Id: readaerosolstrato2_rrtm.F90 2526 2016-05-26 22:13:40Z oboucher $ 3 ! 3 4 4 SUBROUTINE readaerosolstrato2_rrtm(debut, ok_volcan) 5 5 … … 341 341 342 342 IF (.NOT. ok_volcan) THEN 343 ! 343 344 344 !--this is the default case 345 345 !--stratospheric aerosols are added to both index 2 and 1 for double radiation calls … … 367 367 ENDWHERE 368 368 ENDDO 369 ! 369 370 370 ELSE 371 ! 371 372 372 !--this is the VOLMIP case 373 373 !--stratospheric aerosols are only added to index 2 in this case … … 410 410 ENDWHERE 411 411 ENDDO 412 ! 412 413 413 ELSE 414 ! 414 415 415 !--this is the VOLMIP case 416 416 DO band=1, NLW … … 418 418 !--and we copy index 2 in index 1 because we want the same dust aerosol LW properties as above 419 419 tau_aero_lw_rrtm(:,:,1,band) = tau_aero_lw_rrtm(:,:,2,band) 420 ! 420 421 421 WHERE (stratomask.GT.0.999999) 422 422 !--stratospheric aerosols are only added to index 2 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/recmwf_aero.F90
r5154 r5159 1 ! 1 2 2 ! $Id: recmwf_aero.F90 4875 2024-03-26 10:29:06Z lguez $ 3 ! 3 4 4 !OPTIONS XOPT(NOEVAL) 5 5 SUBROUTINE RECMWF_AERO (KST, KEND, KPROMA, KTDIA , KLEV,& … … 464 464 465 465 !* 4.1 CALL TO ACTUAL RADIATION SCHEME 466 ! 466 467 467 !----now we make multiple calls to the radiation according to which 468 468 !----aerosol flags are on -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/rrtm_ecrt_140gp.F90
r5154 r5159 1 ! 1 2 2 ! $Id$ 3 ! 3 4 4 !****************** SUBROUTINE RRTM_ECRT_140GP ************************** 5 5 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/sdl_module.F90
r1990 r5159 43 43 !CHARACTER(LEN=*), PARAMETER :: CLNECMSG = '*** Calling NEC traceback ***' 44 44 !#endif 45 ! 45 46 46 !IF (PRESENT(KTID)) THEN 47 47 ! ITID = KTID … … 49 49 ! ITID = OML_MY_THREAD() 50 50 !ENDIF 51 ! 51 52 52 !IF (LHOOK) THEN 53 53 ! IPRINT_OPTION = 2 … … 55 55 ! CALL C_DRHOOK_PRINT(0, ITID, IPRINT_OPTION, ILEVEL) ! from drhook.c 56 56 !ENDIF 57 ! 57 58 58 !#ifdef VPP 59 59 ! CALL ERRTRA … … 117 117 !MPL 4.12.08 118 118 !#ifdef VPP 119 ! 119 120 120 !CALL VPP_ABORT() 121 ! 121 122 122 !#else 123 ! 123 124 124 !IRETURN_CODE=1 125 125 !CALL MPI_ABORT(KCOMM,IRETURN_CODE,IERROR) -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/srtm_cmbgb16.F90
r1990 r5159 1 1 SUBROUTINE SRTM_CMBGB16 2 2 3 ! 3 4 4 ! Original version: Michael J. Iacono; July, 1998 5 5 ! Revision for RRTM_SW: Michael J. Iacono; November, 2002 6 6 ! Revision for RRTMG_SW: Michael J. Iacono; December, 2003 7 ! 7 8 8 ! The subroutines CMBGB16->CMBGB29 input the absorption coefficient 9 9 ! data for each band, which are defined for 16 g-points and 14 spectral … … 12 12 ! function data in array SFLUXREF are combined without weighting. All 13 13 ! g-point reduced data are put into new arrays for use in RRTMG_SW. 14 ! 14 15 15 ! BAND 16: 2600-3250 cm-1 (low key- H2O,CH4; high key - CH4) 16 ! 16 17 17 !----------------------------------------------------------------------- 18 18 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/srtm_srtm_224gp.F90
r5154 r5159 1 ! 1 2 2 ! $Id$ 3 ! 3 4 4 SUBROUTINE SRTM_SRTM_224GP & 5 5 & (KIDIA, KFDIA, KLON, KLEV, KSW, KOVLP, & -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/su_aerop.F90
r5158 r5159 71 71 ! For sea-salt (_SS), 3 bins are considered (0.03, 0.50, 5.0, 20.) 72 72 ! For desert dust (_DD), 3 bins are considered (0.03, 0.55, 0.9, 20.) 73 ! 73 74 74 ! IF BIN LIMITS ARE CHANGED, MAKE SURE THAT THE RELEVANT SEDIMENTATION SPEEDS ARE 75 75 ! RECOMPUTED ACCORDINGLY -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/su_aerp.F90
r5158 r5159 107 107 !RVDPOCE = (/ 0.1_JPRB, 1.2_JPRB, 0.1_JPRB, 0.1_JPRB, 0.1_JPRB, 0.1_JPRB & 108 108 ! &, 0.1_JPRB, 1.2_JPRB, 1.2_JPRB, 1.2_JPRB, 1.5_JPRB, 1.5_JPRB /) 109 ! 109 110 110 !RVDPSIC = (/ 0.1_JPRB, 1.2_JPRB, 0.1_JPRB, 0.1_JPRB, 0.1_JPRB, 0.1_JPRB & 111 111 ! &, 0.1_JPRB, 1.2_JPRB, 1.2_JPRB, 1.2_JPRB, 1.5_JPRB, 1.5_JPRB /) 112 ! 112 113 113 !RVDPLND = (/ 0.1_JPRB, 1.2_JPRB, 0.1_JPRB, 0.1_JPRB, 0.1_JPRB, 0.1_JPRB & 114 114 ! &, 0.1_JPRB, 1.2_JPRB, 1.2_JPRB, 1.2_JPRB, 1.5_JPRB, 1.5_JPRB /) 115 ! 115 116 116 !RVDPLIC = (/ 0.1_JPRB, 1.2_JPRB, 0.1_JPRB, 0.1_JPRB, 0.1_JPRB, 0.1_JPRB & 117 117 ! &, 0.1_JPRB, 1.2_JPRB, 1.2_JPRB, 1.2_JPRB, 1.5_JPRB, 1.5_JPRB /) -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/suclopn.F90
r1990 r5159 1002 1002 ! RASWCE(JNU)=ZASWCE14(JNU) 1003 1003 ! RASWCF(JNU)=ZASWCF14(JNU)*1.E-03_JPRB 1004 ! 1004 1005 1005 ! REBCUA(JNU)=ZEBCUA14(JNU) 1006 1006 ! REBCUB(JNU)=ZEBCUB14(JNU) … … 1009 1009 ! REBCUE(JNU)=ZEBCUE14(JNU) 1010 1010 ! REBCUF(JNU)=ZEBCUF14(JNU) 1011 ! 1011 1012 1012 ! RYFWCA(JNU)=ZYFWCA14(JNU) 1013 1013 ! RYFWCB(JNU)=ZYFWCB14(JNU) … … 1016 1016 ! RYFWCE(JNU)=ZYFWCE14(JNU) 1017 1017 ! RYFWCF(JNU)=ZYFWCF14(JNU) 1018 ! 1018 1019 1019 ! RSUSHE(JNU)=ZSUSHE14(JNU)*1.E-02_JPRB 1020 1020 ! RSUSHF(JNU)=ZSUSHF14(JNU)*1.E-02_JPRB … … 1053 1053 !! RFUDD2(JNU)=ZFUDD214(JNU) 1054 1054 !! RFUDD3(JNU)=ZFUDD314(JNU) 1055 ! 1055 1056 1056 ! PRINT *,'SUCLOPN: 14-SPECTRAL INTERVALS --> RRTM_SW' 1057 1057 ! ENDDO -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/suecrad.F90
r5158 r5159 1 ! 1 2 2 ! $Id: suecrad.F90 4251 2022-09-20 00:22:43Z fhourdin $ 3 ! 3 4 4 SUBROUTINE SUECRAD (KULOUT, KLEV, PETAH) 5 5 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/sugfl.F90
r1990 r5159 104 104 105 105 ! 1. CASE LFPART2=F 106 ! 106 107 107 ! 1.1 Initial settings. 108 108 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/suphec.F90
r5154 r5159 129 129 130 130 IF (LHOOK) CALL DR_HOOK('SUPHEC',0,ZHOOK_HANDLE) 131 ! 131 132 132 IF (OK_BAD_ECMWF_THERMO) THEN 133 ! 133 134 134 ! Modify constants defined in suphel.F90 and set RVTMP2 to 0. 135 135 ! CALL GSTATS(1811,0) ! MPL 28.11.08 … … 169 169 ! Keep constants defined in suphel.F90 170 170 RTICE=RTT-23._JPRB 171 ! 171 172 172 ENDIF ! (OK_BAD_ECMWF_THERMO) 173 173 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/suphy.F90
r1990 r5159 34 34 ! SUPHYFL 35 35 ! SUHLPH 36 ! 36 37 37 ! Reference. 38 38 ! ---------- … … 99 99 print *,'---- SUPHY: avant SUPHMF' 100 100 CALL SUPHMF(KULOUT) 101 ! 101 102 102 print *,'---- SUPHY: avant SUGFL' 103 103 !SUGFL: Set up unified_treatment grid-point fields … … 117 117 ! Commente par MPL 20.11.08 118 118 !CALL SUHLPH(KULOUT) 119 ! 119 120 120 ! ------------------------------------------------------------------ 121 121 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/suphy0.F90
r1990 r5159 341 341 RWBF1=300._JPRB 342 342 RWBF2=4._JPRB 343 ! 343 344 344 RAUITN=233.15_JPRB 345 345 RAUITX=263.15_JPRB -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/surdi.F90
r2626 r5159 1 ! 1 2 2 ! $Id$ 3 ! 3 4 4 SUBROUTINE SURDI 5 5 -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/surhcri.F90
r1990 r5159 2 2 SUBROUTINE SURHCRI(KULOUT) 3 3 !----------------------------------------------------------------------- 4 ! 4 5 5 !**** *SURHCRI * - COMPUTATION OF THE CRTITICAL RELATIVE HUMIDITY 6 6 ! PROFILE FOR SMITH'S CONDENSATION SCHEME. 7 ! 7 8 8 !** Interface. 9 9 ! ---------- 10 10 ! *CALL* *SURHCRI* 11 ! 11 12 12 !----------------------------------------------------------------------- 13 ! 13 14 14 ! - ARGUMENTS D'ENTREE./INPUT ARGUMENTS. 15 15 ! ------------------------------------ 16 ! 16 17 17 !----------------------------------------------------------------------- 18 ! 18 19 19 ! - ARGUMENTS IMPLICITES. 20 20 ! --------------------- 21 ! 21 22 22 ! COMMON /YOMPHY/ 23 23 ! COMMON /YOMPHY0/ 24 ! 24 25 25 !* 26 26 !----------------------------------------------------------------------- 27 ! 27 28 28 ! Auteur. 29 29 ! ------- 30 30 ! 05-03, Luc Gerard (from Ph. Lopez acrhcri) 31 ! 31 32 32 ! Modifications. 33 33 ! -------------- 34 34 ! 06-10, nettoyage - R. Brozkova 35 35 !----------------------------------------------------------------------- 36 ! 36 37 37 USE PARKIND1 ,ONLY : JPIM ,JPRB 38 38 USE YOMHOOK ,ONLY : LHOOK, DR_HOOK 39 ! 39 40 40 USE YOMPHY0 , ONLY : RHCRIT1, RHCRIT2, RETAMIN, GRHCMOD, RHCRI ,NRHCRI 41 41 USE YOMDIM , ONLY : NFLEVG -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/susrtm.F90
r1990 r5159 40 40 ! minimize the effect on the resulting fluxes and cooling rates, and 41 41 ! caution should be used if the mapping is modified. 42 ! 42 43 43 ! JPGPT The total number of new g-points (NGPT) 44 44 ! NGC The number of new g-points in each band -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/yoeaeratm.F90
r2010 r5159 27 27 ! RMFMIN : minimum mass flux for convective aerosol transport 28 28 ! RMASSE : Molar mass: N.B.: either g/mol or Avogadro number 29 ! 29 30 30 ! REPSCAER : security on aerosol concentration: always >= 1.E-15 31 ! 31 32 32 ! LAERCLIMG : .T. to start prognostic aerosols with geographical monthly 33 33 ! mean climatology -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/yoewcou.F90
r2010 r5159 39 39 ! *RNORTW* REAL NORTH BOUNDARY OF THE WAVE MODEL. 40 40 ! *RDEGREW* REAL RESOLUTION OF THE WAVE MODEL (DEGREES). 41 ! 41 42 42 ! *MASK_WAVE_IN* INTEGER COMMS MASK FOR INPUT TO WAVE MODEL 43 43 ! *MASK_WAVE_OUT* INTEGER COMMS MASK FOR OUTPUT FROM WAVE MODEL 44 ! 44 45 45 ! *LWVIN_MASK_NOT_SET* LOGICAL indicates whether mask_wave_in 46 46 ! has been updated on the first call to the … … 64 64 ! *MWVIN_SENDIND* INTEGER global indexes of data on remote tasks that 65 65 ! the local task needs 66 ! 66 67 67 ! *MWVIN_RECVOFF* INTEGER nproc sized array containing offsets into 68 68 ! the MWVIN_RECVBUF array -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/yomct0.F90
r2010 r5159 463 463 LOGICAL :: LPC_OLD 464 464 LOGICAL :: LPC_NESC 465 ! 465 466 466 ! * FORCING 467 467 LOGICAL :: LSFORC -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/yomgrb.F90
r5158 r5159 280 280 ! NGRBCO2B - 210068 CO2 - biosphere flux 281 281 ! NGRBCO2A - 210069 CO2 - anthropogenic emissions 282 ! 282 283 283 !--------------------------------------------------- 284 284 ! NGRBGRG(JPGRG) - 210121 GRG1: Nitrogen dioxide -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/yomphy0.F90
r2010 r5159 352 352 ! TFVS : VITESSE DE CHUTE DES PRECIPITATIONS SOLIDES. 353 353 ! GRHCMOD : MODULATION IN CRITICAL RELATIVE HUMIDITY COMPUTATION. 354 ! 354 355 355 ! Pseudo prognostic TKE scheme 356 356 ! NUPTKE : TUNABLE VALUE FOR PSEUDO TKE SCHEME FOLLOWING … … 374 374 375 375 ! GCVALMX : MAXIMUM ACCEPTABLE VALUE FOR TOTAL MESH FRACTION 376 ! 376 377 377 ! Ascent properties 378 378 ! ECMNPI : ECMNP for ice, the original ECMNP being kept for liquid. 379 379 ! GFRIC : INVERSE OF CHARACTERISTIC TIME for ICE CONDENSATION in ud. 380 ! 380 381 381 ! Squeezing: 382 382 ! GCVSQDN : threshold value of sigma_d*q_cd*dp 383 383 ! GCVSQDR : fraction of the max to consider for squeezing 384 384 ! GCVSQDCX : maximum acceptable compression (<1) 385 ! 385 386 386 ! Downdraught: 387 387 ! GDDWPF : Influence of rain fall velocity on downdraught … … 389 389 ! GDDBETA : DOWNDRAUGHT EXPLICIT DETRAINMENT COEFFICIENT 390 390 ! TENTRD : DOWNDRAUGHT ENTRAINMENT RATE (S^2/M^2) 391 ! 391 392 392 ! Intensive Precipitation: 393 393 ! GRRMINA : MINIMUM REALISTIC PRECIPITATING MESH FRACTION … … 671 671 ! For ALARO-0 : 672 672 ! ------------------------------------------------------------------ 673 ! 673 674 674 ! RDPHIC : REFERENCE GEOPOTENTIAL FOR CLOUDINESS ADJUSTMENT. 675 675 ! GWBFAUT : GAIN FOR THE WEGENER BERGERON FINDEISEN PROCESS IN ACAUTO … … 677 677 ! RWBF2 : SECOND TUNING CONSTANT FOR BERGERON FINDEISEN PROCESS 678 678 ! IN ACPLUIE_PROG 679 ! 679 680 680 ! RAUITN : TEMPERATURE LEVELS FOR RQICRMIN 681 681 ! RAUITX : TEMPERATURE LEVELS FOR RQICRMAX … … 687 687 ! NSMTPA : NUMBER OF LEVELS BELOW Tt LEVEL FOR LSMTPS SMOOTHING 688 688 ! NSMTPB : NUMBER OF LEVELS ABOVE Tt LEVEL FOR LSMTPS SMOOTHING 689 ! 689 690 690 ! ------------------------------------------------------------------ 691 ! 691 692 692 REAL(KIND=JPRB) :: RDPHIC 693 693 REAL(KIND=JPRB) :: GWBFAUT -
LMDZ6/branches/Amaury_dev/libf/phylmd/rrtm/yomphy3.F90
r2010 r5159 88 88 ! : AT THE UPPER CASE OF PADE FUNCTIONS FOR GASES. 89 89 ! Parameters for cloud model: 90 ! 90 91 91 ! Notations: 92 92 ! g - asymmetry factor (unscaled) … … 98 98 ! iwc - ice water content 99 99 ! lwc - liquid water content 100 ! 100 101 101 ! First index of FCM arrays (FCM = Fitting parameters for Cloud Model) 102 102 ! denotes spectral band: 103 103 ! 1 - solar 104 104 ! 2 - thermal 105 ! 105 106 106 ! FCM_DEL_A(2) : Critical value of delta0 for computation of c_abs. 107 107 ! FCM_DEL_D(2) : Critical value of delta0 for computation of c_scat.
Note: See TracChangeset
for help on using the changeset viewer.