Changeset 979 for trunk/LMDZ.COMMON/libf
- Timestamp:
- Jun 5, 2013, 2:41:09 PM (12 years ago)
- Location:
- trunk/LMDZ.COMMON/libf
- Files:
-
- 4 added
- 7 deleted
- 16 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3d/comconst.h
r887 r979 29 29 REAL g ! (m/s2) gravity 30 30 REAL omeg ! (rad/s) rotation rate of the planet 31 ! Dissipation factors, for Earth model: 32 REAL dissip_factz,dissip_zref !dissip_deltaz 33 ! Dissipation factors, for other planets: 31 34 REAL dissip_fac_mid,dissip_fac_up,dissip_deltaz,dissip_hdelta 32 35 REAL dissip_pupstart -
trunk/LMDZ.COMMON/libf/dyn3d/comdissnew.h
r1 r979 12 12 13 13 COMMON/comdissnew/ lstardis,nitergdiv,nitergrot,niterh,tetagdiv, & 14 & tetagrot,tetatemp,coefdis 14 & tetagrot,tetatemp,coefdis, vert_prof_dissip 15 15 16 16 LOGICAL lstardis 17 17 INTEGER nitergdiv, nitergrot, niterh 18 19 ! For the Earth model: 20 integer vert_prof_dissip ! vertical profile of horizontal dissipation 21 ! Allowed values: 22 ! 0: rational fraction, function of pressure 23 ! 1: tanh of altitude 24 18 25 REAL tetagdiv, tetagrot, tetatemp, coefdis 19 26 -
trunk/LMDZ.COMMON/libf/dyn3d/conf_gcm.F
r617 r979 14 14 #endif 15 15 USE infotrac, ONLY : type_trac 16 use assert_m, only: assert 17 16 18 IMPLICIT NONE 17 19 c----------------------------------------------------------------------- … … 88 90 CALL getin('lunout', lunout) 89 91 IF (lunout /= 5 .and. lunout /= 6) THEN 90 OPEN(lunout,FILE='lmdz.out') 92 OPEN(UNIT=lunout,FILE='lmdz.out',ACTION='write', 93 & STATUS='unknown',FORM='formatted') 91 94 ENDIF 92 95 … … 311 314 CALL getin('tetatemp',tetatemp ) 312 315 316 ! For Earth model only: 317 ! Parametres controlant la variation sur la verticale des constantes de 318 ! dissipation. 319 ! Pour le moment actifs uniquement dans la version a 39 niveaux 320 ! avec ok_strato=y 321 322 dissip_factz=4. 323 dissip_deltaz=10. 324 dissip_zref=30. 325 CALL getin('dissip_factz',dissip_factz ) 326 CALL getin('dissip_deltaz',dissip_deltaz ) 327 CALL getin('dissip_zref',dissip_zref ) 328 329 ! For other planets: 313 330 ! Parametres controlant la variation sur la verticale des constantes de 314 331 ! dissipation. … … 474 491 write(lunout,*)'STOP !!!' 475 492 write(lunout,*)'use_filtre_fft n est pas implemente dans dyn3d' 476 STOP 493 STOP 1 477 494 ENDIF 478 495 … … 484 501 ok_strato=.TRUE. 485 502 CALL getin('ok_strato',ok_strato) 503 504 ! NB: vert_prof_dissip is Earth-specific; should not impact other models 505 if (planet_type=="earth") then 506 vert_prof_dissip = merge(1, 0, ok_strato .and. llm==39) 507 CALL getin('vert_prof_dissip', vert_prof_dissip) 508 call assert(vert_prof_dissip == 0 .or. vert_prof_dissip == 1, 509 $ "bad value for vert_prof_dissip") 510 else 511 vert_prof_dissip=0 512 endif 486 513 487 514 !Config Key = ok_gradsfile … … 834 861 write(lunout,*)' day_step = ', day_step 835 862 write(lunout,*)' iperiod = ', iperiod 863 write(lunout,*)' nsplit_phys = ', nsplit_phys 836 864 write(lunout,*)' iconser = ', iconser 837 865 write(lunout,*)' iecri = ', iecri -
trunk/LMDZ.COMMON/libf/dyn3d/gcm.F
r965 r979 428 428 429 429 CALL inidissip( lstardis, nitergdiv, nitergrot, niterh , 430 * tetagdiv, tetagrot , tetatemp 430 * tetagdiv, tetagrot , tetatemp, vert_prof_dissip) 431 431 432 432 c----------------------------------------------------------------------- -
trunk/LMDZ.COMMON/libf/dyn3d/guide_mod.F90
r776 r979 12 12 USE Write_Field 13 13 use netcdf, only: nf90_nowrite, nf90_open, nf90_inq_varid, nf90_close 14 use pres2lev_mod 14 15 15 16 IMPLICIT NONE -
trunk/LMDZ.COMMON/libf/dyn3d/inidissip.F90
r776 r979 3 3 ! 4 4 SUBROUTINE inidissip ( lstardis,nitergdiv,nitergrot,niterh , & 5 tetagdiv,tetagrot,tetatemp 5 tetagdiv,tetagrot,tetatemp, vert_prof_dissip) 6 6 !======================================================================= 7 7 ! initialisation de la dissipation horizontale … … 11 11 ! ------------- 12 12 13 USE control_mod, only : dissip_period,iperiod 13 USE control_mod, only : dissip_period,iperiod,planet_type 14 14 15 15 IMPLICIT NONE … … 26 26 REAL,INTENT(in) :: tetagdiv,tetagrot,tetatemp 27 27 28 integer, INTENT(in):: vert_prof_dissip ! for the Earth model !! 29 ! Vertical profile of horizontal dissipation 30 ! Allowed values: 31 ! 0: rational fraction, function of pressure 32 ! 1: tanh of altitude 33 28 34 ! Local variables: 29 35 REAL fact,zvert(llm),zz … … 35 41 INTEGER l,ij,idum,ii 36 42 REAL tetamin 43 REAL pseudoz 37 44 REAL Pup 38 45 character (len=80) :: abort_message … … 166 173 ! variation verticale du coefficient de dissipation: 167 174 ! -------------------------------------------------- 168 175 176 if (planet_type.eq."earth") then 177 178 if (vert_prof_dissip == 1) then 179 do l=1,llm 180 pseudoz=8.*log(preff/presnivs(l)) 181 zvert(l)=1+ & 182 (tanh((pseudoz-dissip_zref)/dissip_deltaz)+1.)/2. & 183 *(dissip_factz-1.) 184 enddo 185 else 186 DO l=1,llm 187 zvert(l)=1. 188 ENDDO 189 fact=2. 190 DO l = 1, llm 191 zz = 1. - preff/presnivs(l) 192 zvert(l)= fact -( fact-1.)/( 1.+zz*zz ) 193 ENDDO 194 endif ! of if (vert_prof_dissip == 1) 195 196 else ! other planets 197 169 198 ! First step: going from 1 to dissip_fac_mid (in gcm.def) 170 199 !============ 171 DO l=1,llm200 DO l=1,llm 172 201 zz = 1. - preff/presnivs(l) 173 202 zvert(l)= dissip_fac_mid -( dissip_fac_mid-1.)/( 1.+zz*zz ) 174 ENDDO175 176 write(lunout,*) 'Dissipation : '177 write(lunout,*) 'Multiplication de la dissipation en altitude :'178 write(lunout,*) ' dissip_fac_mid =', dissip_fac_mid203 ENDDO 204 205 write(lunout,*) 'Dissipation : ' 206 write(lunout,*) 'Multiplication de la dissipation en altitude :' 207 write(lunout,*) ' dissip_fac_mid =', dissip_fac_mid 179 208 180 209 ! Second step if ok_strato: from dissip_fac_mid to dissip_fac_up (in gcm.def) … … 188 217 ! atmosphere par celui-ci. 189 218 190 if (ok_strato) then219 if (ok_strato) then 191 220 192 221 Pup = dissip_pupstart*exp(-0.5*dissip_deltaz/dissip_hdelta) … … 201 230 dissip_pupstart,'Pa', dissip_deltaz , '(km)' 202 231 203 endif 232 endif ! of if (ok_strato) 233 234 endif ! of if (planet_type.eq."earth") 204 235 205 236 -
trunk/LMDZ.COMMON/libf/dyn3dpar/abort_gcm.F
r66 r979 1 1 ! 2 ! $Id: abort_gcm.F 1 475 2011-01-21 14:41:03Z emillour $2 ! $Id: abort_gcm.F 1748 2013-04-24 14:18:40Z emillour $ 3 3 ! 4 4 c … … 24 24 25 25 character(len=*) modname 26 integer ierr 26 integer ierr, ierror_mpi 27 27 character(len=*) message 28 28 … … 47 47 else 48 48 write(lunout,*) 'Houston, we have a problem ', ierr 49 #ifdef CPP_MPI 50 C$OMP CRITICAL (MPI_ABORT_GCM) 51 call MPI_ABORT(COMM_LMDZ, 1, ierror_mpi) 52 C$OMP END CRITICAL (MPI_ABORT_GCM) 53 #else 49 54 stop 1 55 #endif 50 56 endif 51 57 END -
trunk/LMDZ.COMMON/libf/dyn3dpar/comconst.h
r887 r979 29 29 REAL g ! (m/s2) gravity 30 30 REAL omeg ! (rad/s) rotation rate of the planet 31 ! Dissipation factors, for Earth model: 32 REAL dissip_factz,dissip_zref !dissip_deltaz 33 ! Dissipation factors, for other planets: 31 34 REAL dissip_fac_mid,dissip_fac_up,dissip_deltaz,dissip_hdelta 32 35 REAL dissip_pupstart -
trunk/LMDZ.COMMON/libf/dyn3dpar/comdissnew.h
r1 r979 12 12 13 13 COMMON/comdissnew/ lstardis,nitergdiv,nitergrot,niterh,tetagdiv, & 14 & tetagrot,tetatemp,coefdis 14 & tetagrot,tetatemp,coefdis, vert_prof_dissip 15 15 16 16 LOGICAL lstardis 17 17 INTEGER nitergdiv, nitergrot, niterh 18 19 ! For the Earth model: 20 integer vert_prof_dissip ! vertical profile of horizontal dissipation 21 ! Allowed values: 22 ! 0: rational fraction, function of pressure 23 ! 1: tanh of altitude 24 18 25 REAL tetagdiv, tetagrot, tetatemp, coefdis 19 26 -
trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F
r617 r979 18 18 USE control_mod 19 19 USE infotrac, ONLY : type_trac 20 use assert_m, only: assert 20 21 IMPLICIT NONE 21 22 c----------------------------------------------------------------------- … … 54 55 LOGICAL fxyhypbb, ysinuss 55 56 INTEGER i 56 57 character(len=*),parameter :: modname="conf_gcm" 58 character (len=80) :: abort_message 59 #ifdef CPP_OMP 60 integer,external :: OMP_GET_NUM_THREADS 61 #endif 57 62 c 58 63 c ------------------------------------------------------------------- … … 83 88 c initialisations: 84 89 c ---------------- 85 adjust=.false. 86 call getin('adjust',adjust) 87 88 itaumax=0 89 call getin('itaumax',itaumax); 90 if (itaumax<=0) itaumax=HUGE(itaumax) 91 90 92 91 !Config Key = lunout 93 92 !Config Desc = unite de fichier pour les impressions … … 103 102 ENDIF 104 103 104 adjust=.false. 105 call getin('adjust',adjust) 106 107 #ifdef CPP_OMP 108 ! adjust=y not implemented in case of OpenMP threads... 109 !$OMP PARALLEL 110 if ((OMP_GET_NUM_THREADS()>1).and.adjust) then 111 write(lunout,*)'conf_gcm: Error, adjust should be set to n' 112 &,' when running with OpenMP threads' 113 abort_message = 'Wrong value for adjust' 114 call abort_gcm(modname,abort_message,1) 115 endif 116 !$OMP END PARALLEL 117 #endif 118 119 itaumax=0 120 call getin('itaumax',itaumax); 121 if (itaumax<=0) itaumax=HUGE(itaumax) 122 105 123 !Config Key = prt_level 106 124 !Config Desc = niveau d'impressions de débogage … … 323 341 CALL getin('tetatemp',tetatemp ) 324 342 343 ! For Earth model only: 344 ! Parametres controlant la variation sur la verticale des constantes de 345 ! dissipation. 346 ! Pour le moment actifs uniquement dans la version a 39 niveaux 347 ! avec ok_strato=y 348 349 dissip_factz=4. 350 dissip_deltaz=10. 351 dissip_zref=30. 352 CALL getin('dissip_factz',dissip_factz ) 353 CALL getin('dissip_deltaz',dissip_deltaz ) 354 CALL getin('dissip_zref',dissip_zref ) 355 356 ! For other planets: 325 357 ! Parametres controlant la variation sur la verticale des constantes de 326 358 ! dissipation. … … 494 526 write(lunout,*)"Le zoom en longitude est incompatible", 495 527 & " avec l'utilisation du filtre FFT ", 496 & "---> filtre FFT désactivé"528 & "---> FFT filter not active" 497 529 use_filtre_fft=.FALSE. 498 530 ENDIF … … 525 557 ok_strato=.TRUE. 526 558 CALL getin('ok_strato',ok_strato) 559 560 ! NB: vert_prof_dissip is Earth-specific; should not impact other models 561 if (planet_type=="earth") then 562 vert_prof_dissip = merge(1, 0, ok_strato .and. llm==39) 563 CALL getin('vert_prof_dissip', vert_prof_dissip) 564 call assert(vert_prof_dissip == 0 .or. vert_prof_dissip == 1, 565 $ "bad value for vert_prof_dissip") 566 else 567 vert_prof_dissip=0 568 endif 527 569 528 570 !Config Key = ok_gradsfile … … 875 917 write(lunout,*)' day_step = ', day_step 876 918 write(lunout,*)' iperiod = ', iperiod 919 write(lunout,*)' nsplit_phys = ', nsplit_phys 877 920 write(lunout,*)' iconser = ', iconser 878 921 write(lunout,*)' iecri = ', iecri -
trunk/LMDZ.COMMON/libf/dyn3dpar/gcm.F
r965 r979 443 443 444 444 CALL inidissip( lstardis, nitergdiv, nitergrot, niterh , 445 * tetagdiv, tetagrot , tetatemp 445 * tetagdiv, tetagrot , tetatemp, vert_prof_dissip) 446 446 447 447 c----------------------------------------------------------------------- -
trunk/LMDZ.COMMON/libf/dyn3dpar/guide_p_mod.F90
r776 r979 11 11 USE getparam 12 12 USE Write_Field_p 13 use netcdf, only: nf90_nowrite, nf90_open, nf90_inq_varid, nf90_close 13 USE netcdf, ONLY: nf90_nowrite, nf90_open, nf90_inq_varid, nf90_close 14 USE pres2lev_mod 14 15 15 16 IMPLICIT NONE -
trunk/LMDZ.COMMON/libf/dyn3dpar/inidissip.F90
r776 r979 3 3 ! 4 4 SUBROUTINE inidissip ( lstardis,nitergdiv,nitergrot,niterh , & 5 tetagdiv,tetagrot,tetatemp 5 tetagdiv,tetagrot,tetatemp, vert_prof_dissip) 6 6 !======================================================================= 7 7 ! initialisation de la dissipation horizontale … … 11 11 ! ------------- 12 12 13 USE control_mod, only : dissip_period,iperiod 13 USE control_mod, only : dissip_period,iperiod,planet_type 14 14 15 15 IMPLICIT NONE … … 26 26 REAL,INTENT(in) :: tetagdiv,tetagrot,tetatemp 27 27 28 integer, INTENT(in):: vert_prof_dissip ! for the Earth model !! 29 ! Vertical profile of horizontal dissipation 30 ! Allowed values: 31 ! 0: rational fraction, function of pressure 32 ! 1: tanh of altitude 33 28 34 ! Local variables: 29 35 REAL fact,zvert(llm),zz … … 35 41 INTEGER l,ij,idum,ii 36 42 REAL tetamin 43 REAL pseudoz 37 44 REAL Pup 38 45 character (len=80) :: abort_message … … 166 173 ! variation verticale du coefficient de dissipation: 167 174 ! -------------------------------------------------- 168 175 176 if (planet_type.eq."earth") then 177 178 if (vert_prof_dissip == 1) then 179 do l=1,llm 180 pseudoz=8.*log(preff/presnivs(l)) 181 zvert(l)=1+ & 182 (tanh((pseudoz-dissip_zref)/dissip_deltaz)+1.)/2. & 183 *(dissip_factz-1.) 184 enddo 185 else 186 DO l=1,llm 187 zvert(l)=1. 188 ENDDO 189 fact=2. 190 DO l = 1, llm 191 zz = 1. - preff/presnivs(l) 192 zvert(l)= fact -( fact-1.)/( 1.+zz*zz ) 193 ENDDO 194 endif ! of if (vert_prof_dissip == 1) 195 196 else ! other planets 197 169 198 ! First step: going from 1 to dissip_fac_mid (in gcm.def) 170 199 !============ 171 DO l=1,llm200 DO l=1,llm 172 201 zz = 1. - preff/presnivs(l) 173 202 zvert(l)= dissip_fac_mid -( dissip_fac_mid-1.)/( 1.+zz*zz ) 174 ENDDO175 176 write(lunout,*) 'Dissipation : '177 write(lunout,*) 'Multiplication de la dissipation en altitude :'178 write(lunout,*) ' dissip_fac_mid =', dissip_fac_mid203 ENDDO 204 205 write(lunout,*) 'Dissipation : ' 206 write(lunout,*) 'Multiplication de la dissipation en altitude :' 207 write(lunout,*) ' dissip_fac_mid =', dissip_fac_mid 179 208 180 209 ! Second step if ok_strato: from dissip_fac_mid to dissip_fac_up (in gcm.def) … … 188 217 ! atmosphere par celui-ci. 189 218 190 if (ok_strato) then219 if (ok_strato) then 191 220 192 221 Pup = dissip_pupstart*exp(-0.5*dissip_deltaz/dissip_hdelta) … … 201 230 dissip_pupstart,'Pa', dissip_deltaz , '(km)' 202 231 203 endif 232 endif ! of if (ok_strato) 233 234 endif ! of if (planet_type.eq."earth") 204 235 205 236 -
trunk/LMDZ.COMMON/libf/filtrez/filtreg.F
r1 r979 185 185 DO j = jdfil,jffil 186 186 #ifdef BLAS 187 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0,187 CALL SGEMM("N", "N", iim, nbniv, iim, 1.0, 188 188 & matrinvn(1,1,j), 189 189 & iim, champ(1,j,1), iip1*nlat, 0.0, … … 199 199 DO j = jdfil,jffil 200 200 #ifdef BLAS 201 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0,201 CALL SGEMM("N", "N", iim, nbniv, iim, 1.0, 202 202 & matriceun(1,1,j), 203 203 & iim, champ(1,j,1), iip1*nlat, 0.0, … … 213 213 DO j = jdfil,jffil 214 214 #ifdef BLAS 215 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0,215 CALL SGEMM("N", "N", iim, nbniv, iim, 1.0, 216 216 & matricevn(1,1,j), 217 217 & iim, champ(1,j,1), iip1*nlat, 0.0, … … 231 231 DO j = jdfil,jffil 232 232 #ifdef BLAS 233 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0,233 CALL SGEMM("N", "N", iim, nbniv, iim, 1.0, 234 234 & matrinvs(1,1,j-jfiltsu+1), 235 235 & iim, champ(1,j,1), iip1*nlat, 0.0, … … 247 247 DO j = jdfil,jffil 248 248 #ifdef BLAS 249 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0,249 CALL SGEMM("N", "N", iim, nbniv, iim, 1.0, 250 250 & matriceus(1,1,j-jfiltsu+1), 251 251 & iim, champ(1,j,1), iip1*nlat, 0.0, … … 262 262 DO j = jdfil,jffil 263 263 #ifdef BLAS 264 CALL DGEMM("N", "N", iim, nbniv, iim, 1.0,264 CALL SGEMM("N", "N", iim, nbniv, iim, 1.0, 265 265 & matricevs(1,1,j-jfiltsv+1), 266 266 & iim, champ(1,j,1), iip1*nlat, 0.0, -
trunk/LMDZ.COMMON/libf/filtrez/filtreg_mod.F90
r492 r979 10 10 11 11 SUBROUTINE inifilr 12 USE mod_filtre_fft 13 !12 USE mod_filtre_fft, ONLY : use_filtre_fft,Init_filtre_fft 13 USE mod_filtre_fft_loc, ONLY : Init_filtre_fft_loc=>Init_filtre_fft ! 14 14 ! ... H. Upadhyaya, O.Sharma ... 15 15 ! … … 541 541 CALL Init_filtre_fft(coefilu,modfrstu,jfiltnu,jfiltsu, & 542 542 coefilv,modfrstv,jfiltnv,jfiltsv) 543 CALL Init_filtre_fft_loc(coefilu,modfrstu,jfiltnu,jfiltsu, & 544 coefilv,modfrstv,jfiltnv,jfiltsv) 543 545 ENDIF 544 546 -
trunk/LMDZ.COMMON/libf/filtrez/mod_fft.F90
r1 r979 3 3 #ifdef FFT_MATHKEISAN 4 4 USE mod_fft_mathkeisan 5 #elif FFT_FFTW 5 #else 6 #ifdef FFT_FFTW 6 7 USE mod_fft_fftw 7 #elif FFT_MKL 8 #else 9 #ifdef FFT_MKL 8 10 USE mod_fft_mkl 9 11 #else 10 12 USE mod_fft_wrapper 11 13 #endif 14 #endif 15 #endif 12 16 13 17 END MODULE mod_fft
Note: See TracChangeset
for help on using the changeset viewer.