Changeset 1593 for trunk/LMDZ.MARS/libf
- Timestamp:
- Sep 9, 2016, 4:04:54 PM (9 years ago)
- Location:
- trunk/LMDZ.MARS/libf
- Files:
-
- 2 deleted
- 6 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/dyn3d/comdissip.h
r38 r1593 1 c-----------------------------------------------------------------------2 cINCLUDE dissip.h1 !----------------------------------------------------------------------- 2 ! INCLUDE dissip.h 3 3 4 COMMON/comdissip/ 5 $niterdis,coefdis,tetavel,tetatemp,gamdissip4 COMMON/comdissip/ & 5 & niterdis,coefdis,tetavel,tetatemp,gamdissip 6 6 7 7 … … 10 10 REAL tetavel,tetatemp,coefdis,gamdissip 11 11 12 c-----------------------------------------------------------------------12 !----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/dyn3d/control_mod.F90
r1532 r1593 12 12 integer,save :: anneeref ! reference year # ! not used 13 13 real,save :: periodav 14 integer,save :: ecritphy ! output data in "diagfi.nc" every ecritphy dynamical steps14 ! integer,save :: ecritphy ! output data in "diagfi.nc" every ecritphy dynamical steps 15 15 integer,save :: ecritstart ! output data in "start.nc" every ecritstart dynamical steps 16 16 real,save :: timestart ! time start for run in "start.nc" -
trunk/LMDZ.MARS/libf/dyn3d/defrun_new.F
r1422 r1593 38 38 ! to use 'getin' 39 39 use ioipsl_getincom, only: getin 40 use sponge_mod,only: callsponge,nsponge,mode_sponge,tetasponge 40 41 use control_mod, only: ndynstep, day_step, iperiod, iconser, 41 & idissip, iphysiq, anneeref, ecritphy,42 & idissip, iphysiq, anneeref, 42 43 & ecritstart, timestart, nday_r 43 USE logic_mod, ONLY: hybrid,purmats, physic,grireg,fxyhypb,ysinus44 USE logic_mod, ONLY: hybrid,purmats,fxyhypb,ysinus,iflag_phys 44 45 USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, 45 46 . alphax,alphay,taux,tauy … … 50 51 !#include "control.h" 51 52 #include "comdissnew.h" 52 #include "sponge.h"53 53 #include "iniprint.h" 54 54 c … … 226 226 WRITE(lunout,*) "" 227 227 WRITE(lunout,*) "avec ou sans physique" 228 physic=.true. ! default value 229 call getin("physic",physic) 230 WRITE(lunout,*)" physic = ",physic 228 ! physic=.true. ! default value 229 ! call getin("physic",physic) 230 ! WRITE(lunout,*)" physic = ",physic 231 iflag_phys=1 ! default value 232 call getin("iflag_phys",iflag_phys) 233 WRITE(lunout,*)" iflag_phys = ",iflag_phys 231 234 232 235 WRITE(lunout,*) "" … … 243 246 endif 244 247 245 WRITE(lunout,*) ""246 WRITE(lunout,*) "choix d'une grille reguliere"247 grireg=.true.248 call getin("grireg",grireg)249 WRITE(lunout,*)" grireg = ",grireg248 ! WRITE(lunout,*) "" 249 ! WRITE(lunout,*) "choix d'une grille reguliere" 250 ! grireg=.true. 251 ! call getin("grireg",grireg) 252 ! WRITE(lunout,*)" grireg = ",grireg 250 253 251 254 ccc .... P.Le Van, ajout le 03/01/96 pour l'ecriture phys ... 252 255 c 253 WRITE(lunout,*) ""254 WRITE(lunout,*) "frequence (en pas) de l'ecriture ",255 & "du fichier diagfi.nc"256 ecritphy=240257 call getin("ecritphy",ecritphy)258 ! verify that ecriphy is indeed a multiple of iphysiq259 if (((1.*ecritphy)/iphysiq).ne.(ecritphy/iphysiq)) then260 write(lunout,*)" Error! ecritphy must be a multiple",261 & " of iphysiq, but ecritphy=",ecritphy," and iphysiq=",262 & iphysiq263 else264 WRITE(lunout,*)" ecritphy = ",ecritphy265 endif256 ! WRITE(lunout,*) "" 257 ! WRITE(lunout,*) "frequence (en pas) de l'ecriture ", 258 ! & "du fichier diagfi.nc" 259 ! ecritphy=240 260 ! call getin("ecritphy",ecritphy) 261 ! ! verify that ecriphy is indeed a multiple of iphysiq 262 ! if (((1.*ecritphy)/iphysiq).ne.(ecritphy/iphysiq)) then 263 ! write(lunout,*)" Error! ecritphy must be a multiple", 264 ! & " of iphysiq, but ecritphy=",ecritphy," and iphysiq=", 265 ! & iphysiq 266 ! else 267 ! WRITE(lunout,*)" ecritphy = ",ecritphy 268 ! endif 266 269 267 270 ccc .... T.Navarro, read start time (06/2013) ... -
trunk/LMDZ.MARS/libf/dyn3d/gcm.F
r1576 r1593 4 4 use infotrac, only: iniadvtrac, nqtot, iadv 5 5 use control_mod, only: day_step, iperiod, iphysiq, ndynstep, 6 & nday_r, idissip, iconser, ecritstart, 7 & ecritphy 6 & nday_r, idissip, iconser, ecritstart 8 7 use filtreg_mod, only: inifilr 9 8 ! use comgeomphy, only: initcomgeomphy 10 9 USE mod_const_mpi, ONLY: COMM_LMDZ 11 10 USE comvert_mod, ONLY: ap,bp 11 use sponge_mod, only: callsponge,mode_sponge,sponge 12 12 USE comconst_mod, ONLY: daysec,dtvr,dtphys,dtdiss,rad,g,r,cpp 13 13 USE logic_mod, ONLY: ecripar,forward,leapf,apphys,statcl,conser, 14 . apdiss,purmats,physic,apphys14 . apdiss,purmats,iflag_phys,apphys 15 15 USE temps_mod, ONLY: day_ini,day_end,dt,itaufin 16 16 USE iniphysiq_mod, ONLY: iniphysiq … … 54 54 #include "netcdf.inc" 55 55 #include "tracstoke.h" 56 #include "sponge.h"57 56 !#include"advtrac.h" 58 57 … … 66 65 REAL,allocatable :: q(:,:,:) ! champs advectes 67 66 REAL ps(ip1jmp1) ! pression au sol 68 REAL pext(ip1jmp1) ! pression extensive67 ! REAL pext(ip1jmp1) ! pression extensive 69 68 REAL p (ip1jmp1,llmp1 ) ! pression aux interfac.des couches 70 69 REAL pks(ip1jmp1) ! exner au sol … … 255 254 & rlatu,rlatv,rlonu,rlonv, 256 255 & aire,cu,cv,rad,g,r,cpp, 257 & 1) 258 ! & iflag_phys) 256 & iflag_phys) 259 257 !#endif 260 258 ! call_iniphys=.false. … … 394 392 IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE. 395 393 IF( MOD(itau,iphysiq ).EQ.0.AND..NOT.forward 396 $ .AND. physic) apphys = .TRUE.394 $ .AND. (iflag_phys.eq.1) ) apphys = .TRUE. 397 395 ELSE 398 396 IF( MOD(itau ,iconser) .EQ. 0 ) conser = .TRUE. 399 397 IF( MOD(itau+1,idissip) .EQ. 0 ) apdiss = .TRUE. 400 IF( MOD(itau+1,iphysiq).EQ.0. AND. physic ) apphys = .TRUE. 398 IF( MOD(itau+1,iphysiq).EQ.0 399 & .AND. (iflag_phys.eq.1) ) apphys = .TRUE. 401 400 END IF 402 401 … … 452 451 c 453 452 ENDIF 454 453 END IF ! tracer 455 454 456 455 … … 488 487 rdayvrai = rdaym_ini + day_ini 489 488 490 IF ( ecritphy.LT.1. ) THEN 491 rday_ecri = rdaym_ini 492 ELSE 489 ! Ehouarn: what was this for ?? 490 ! IF ( ecritphy.LT.1. ) THEN 491 ! rday_ecri = rdaym_ini 492 ! ELSE 493 493 rday_ecri = INT( rdayvrai ) 494 ENDIF494 ! ENDIF 495 495 c 496 496 CALL calfis( nqtot, lafin ,rdayvrai,rday_ecri,time , … … 522 522 c Sponge layer 523 523 c ~~~~~~~~~~~~ 524 DO ij=1, ip1jmp1525 pext(ij)=ps(ij)*aire(ij)526 ENDDO527 524 IF (callsponge) THEN 528 CALL sponge(ucov,vcov,teta,p ext,dtdiss,mode_sponge)525 CALL sponge(ucov,vcov,teta,ps,dtdiss,mode_sponge) 529 526 ENDIF 530 527 -
trunk/LMDZ.MARS/libf/dyn3d/logic_mod.F90
r1422 r1593 3 3 IMPLICIT NONE 4 4 5 LOGICAL purmats, physic,forward,leapf,apphys,grireg,statcl,conser, &5 LOGICAL purmats,forward,leapf,apphys,statcl,conser, & 6 6 & apdiss,apdelq,saison,ecripar,fxyhypb,ysinus,hybrid 7 7 8 INTEGER iflag_phys ! ==1 if calling a physics package 8 9 9 10 END MODULE logic_mod -
trunk/LMDZ.MARS/libf/dyn3d/sponge_mod.F90
r1592 r1593 1 subroutine sponge(ucov,vcov,h,pext,dt,mode) 1 module sponge_mod 2 3 implicit none 4 5 ! sponge parameters (set/read via conf_gcm.F) 6 logical,save :: callsponge ! do we use a sponge on upper layers 7 integer,save :: mode_sponge ! sponge mode 8 integer,save :: nsponge ! number of sponge layers 9 real,save :: tetasponge ! sponge time scale (s) at topmost layer 10 11 12 contains 13 14 subroutine sponge(ucov,vcov,h,ps,dt,mode) 2 15 3 16 ! Sponge routine: Quench ucov, vcov and potential temperature near the … … 10 23 ! Time scale for quenching at top level is given by 'tetasponge' (read from 11 24 ! def file) and doubles as level indexes decrease. 25 ! Quenching is modeled as: A(t)=Am+A0exp(-lambda*t) 26 ! where Am is the zonal average of the field (or zero), and lambda the inverse 27 ! of the characteristic quenching/relaxation time scale 28 ! Thus, assuming Am to be time-independent, field at time t+dt is given by: 29 ! A(t+dt)=A(t)-(A(t)-Am)*(1-exp(-lambda*dt)) 12 30 13 31 USE comvert_mod, ONLY: ap,bp,preff … … 18 36 #include "comdissip.h" 19 37 #include "comgeom2.h" 20 #include "sponge.h"21 38 22 39 ! Arguments: … … 25 42 real,intent(inout) :: vcov(iip1,jjm,llm) ! covariant meridional wind 26 43 real,intent(inout) :: h(iip1,jjp1,llm) ! potential temperature 27 real,intent(in) :: pext(iip1,jjp1) ! extensive pressure 44 ! real,intent(in) :: pext(iip1,jjp1) ! extensive pressure 45 real,intent(in) :: ps(iip1,jjp1) ! surface pressure (Pa) 28 46 real,intent(in) :: dt ! time step 29 47 integer,intent(in) :: mode ! sponge mode 30 48 31 cLocal:32 c------49 ! Local: 50 ! ------ 33 51 34 52 real,save :: sig_s(llm) !sigma au milieu des couches 35 53 REAL vm,um,hm,ptot(jjp1) 36 54 real,save :: cst(llm) 55 real :: pext(iip1,jjp1) ! extensive pressure 37 56 38 57 INTEGER l,i,j … … 75 94 endif ! of if (firstcall) 76 95 77 c----------------------------------------------------------------------- 78 c calcul de la dissipation: 79 c ------------------------- 96 !----------------------------------------------------------------------- 97 ! calcul de la dissipation: 98 ! ------------------------- 99 100 pext(1:iip1,1:jjp1)=ps(1:iip1,1:jjp1)*aire(1:iip1,1:jjp1) 80 101 81 102 do j=1,jjp1 … … 83 104 enddo 84 105 85 cpotential temperature106 ! potential temperature 86 107 do l=l0,llm 87 108 do j=1,jjp1 … … 98 119 enddo 99 120 100 czonal wind121 ! zonal wind 101 122 do l=l0,llm 102 123 do j=2,jjm … … 104 125 if(mode.ge.1) then 105 126 do i=1,iim 106 um=um+0.5*ucov(i,j,l)*(pext(i,j)+pext(i+1,j)) 107 s/cu(i,j)127 um=um+0.5*ucov(i,j,l)*(pext(i,j)+pext(i+1,j)) & 128 /cu(i,j) 108 129 enddo 109 130 um=um/ptot(j) … … 116 137 enddo 117 138 118 cmeridional wind139 ! meridional wind 119 140 do l=l0,llm 120 141 do j=1,jjm … … 122 143 if(mode.ge.2) then 123 144 do i=1,iim 124 vm=vm+vcov(i,j,l)*(pext(i,j)+pext(i,j+1)) 125 s/cv(i,j)145 vm=vm+vcov(i,j,l)*(pext(i,j)+pext(i,j+1)) & 146 /cv(i,j) 126 147 enddo 127 148 vm=vm/(ptot(j)+ptot(j+1)) … … 134 155 enddo 135 156 136 end 157 end subroutine sponge 158 159 end module sponge_mod 160 -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive.F
r1543 r1593 29 29 USE comvert_mod, ONLY: ap,bp 30 30 USE comconst_mod, ONLY: daysec,dtphys,rad,g,r,cpp 31 USE logic_mod, ONLY: grireg32 31 USE temps_mod, ONLY: day_ini,hour_ini 33 32 USE iniphysiq_mod, ONLY: iniphysiq … … 117 116 118 117 CALL defrun_new(99, .TRUE. ) 119 grireg = .TRUE.120 118 121 119 planet_type='mars'
Note: See TracChangeset
for help on using the changeset viewer.