Changeset 979 for trunk/LMDZ.COMMON/libf/dyn3dpar
- Timestamp:
- Jun 5, 2013, 2:41:09 PM (12 years ago)
- Location:
- trunk/LMDZ.COMMON/libf/dyn3dpar
- Files:
-
- 2 added
- 4 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.