- Timestamp:
- Aug 23, 2016, 10:42:41 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F.new
r1579 r1580 13 13 ! - unified module_lmd_driver: old, new phys and LES - February 2011 14 14 ! - a new paradigm to prepare nested simulations - April 2014 15 ! - adapted to new interface philosophy & other planets - August 2016 15 16 !******************************************************************************* 16 17 MODULE module_lmd_driver … … 63 64 USE comm_wrf !! to get fields to be written from physiq 64 65 USE iniphysiq_mod !! to get iniphysiq subroutine 65 USE physiq_mod, only : physiq66 USE callphysiq_mod !! to call the LMD physics 66 67 #endif 67 68 … … 132 133 133 134 134 ! *** for MarsMode 20 ***135 ! *** for tracer Mode 20 *** 135 136 REAL :: tau_decay 136 137 ! *** ----------------------- *** … … 143 144 LOGICAL :: firstcall,lastcall 144 145 ! ---------- 145 REAL,DIMENSION(:,:),ALLOCATABLE :: pplev,pplay,pphi,pu,pv,pt, pw146 REAL,DIMENSION(:,:),ALLOCATABLE :: pplev,pplay,pphi,pu,pv,pt,flxw 146 147 REAL,DIMENSION(:,:,:),ALLOCATABLE :: pq 147 148 … … 191 192 !!!IDEALIZED IDEALIZED 192 193 193 194 !REAL, DIMENSION(:,:,:), ALLOCATABLE, SAVE :: & 195 ! UMAX, UMIN, VMAX, VMIN, WMAX, WMIN, TMAX, TMIN 196 197 194 !! arguments to physiq 195 CHARACTER(len=20),ALLOCATABLE :: tname(:) ! tracer names 196 REAL,ALLOCATABLE :: zpk_omp(:,:) 197 REAL,ALLOCATABLE :: zphis_omp(:) ! surface geopotential 198 REAL,ALLOCATABLE :: presnivs_omp(:) ! approximate pressure of atm. layers 199 REAL,ALLOCATABLE :: zrfi_omp(:,:) ! relative wind vorticity, in s-1 200 201 !! this is temporary and supposed to be set by namelist 202 character(len=10),save :: planet_type ! planet type ('earth','mars',...) 203 planet_type = "mars" 198 204 199 205 !================================================================== … … 225 231 226 232 227 print *,'** Mars** DOMAIN',id233 print *,'** ',planet_type,' ** DOMAIN',id 228 234 229 235 !-------------------------! … … 356 362 !!!***********!! 357 363 IF (JULYR .eq. 9999) THEN 358 PRINT *,'** Mars** IDEALIZED SIMULATION'359 PRINT *,'** Mars** BEWARE: input_coord must be here'364 PRINT *,'** ',planet_type,'** IDEALIZED SIMULATION' 365 PRINT *,'** ',planet_type,'** BEWARE: input_coord must be here' 360 366 open(unit=14,file='input_coord',form='formatted',status='old') 361 367 rewind(14) … … 370 376 ! ALLOCATE ! 371 377 !----------! 378 IF (.not.ALLOCATED(tname)) ALLOCATE(tname(nq)) 372 379 !-------------------------------------------------------------------------------! 373 380 ! outputs: ! … … 387 394 !!! 388 395 IF (test.NE.0) THEN 389 print *,'** Mars** NO CALL FOR PHYSICS, go to next step...',test396 print *,'** ',planet_type,'** NO CALL FOR PHYSICS, go to next step...',test 390 397 #ifdef SPECIAL_NEST_SAVE 391 398 pdpsrf(:)=dp_save(:,id) … … 418 425 ALLOCATE(pv(ngrid,nlayer)) !!!!! 419 426 ALLOCATE(pt(ngrid,nlayer)) !!!!! 420 ALLOCATE( pw(ngrid,nlayer)) !!!!!427 ALLOCATE(flxw(ngrid,nlayer)) !!!!! 421 428 ALLOCATE(pq(ngrid,nlayer,nq)) !!!!! 429 ALLOCATE(zpk_omp(ngrid,nlayer)) 430 ALLOCATE(zphis_omp(ngrid)) 431 ALLOCATE(presnivs_omp(nlayer)) 432 ALLOCATE(zrfi_omp(ngrid,nlayer)) 422 433 ! interm 423 434 ALLOCATE(dz8w_prof(nlayer)) … … 442 453 allocation_firstcall: IF (firstcall .EQV. .true.) THEN 443 454 !! tracers' name 444 PRINT *,'** Mars** TRACERS NAMES'445 CALL update_inputs_physiq_tracers(nq,MARS_MODE )455 PRINT *,'** ',planet_type,'** TRACERS NAMES' 456 CALL update_inputs_physiq_tracers(nq,MARS_MODE,tname) 446 457 !! PHYSICS VARIABLES (cf. iniphysiq in LMD GCM) 447 458 !! parameters are defined in the module_model_constants.F WRF routine 448 PRINT *,'** Mars** INITIALIZE ARRAYS FOR PHYSICS'459 PRINT *,'** ',planet_type,'** INITIALIZE ARRAYS FOR PHYSICS' 449 460 !! need to get initial time first 450 461 CALL update_inputs_physiq_time(& … … 538 549 pu(subs,:) = u_prof(:) 539 550 pv(subs,:) = v_prof(:) 540 pw(subs,:) = 0 !! NB: not used in the physics, only diagnostic...551 flxw(subs,:) = 0 !! NB: not used in the physics, only diagnostic... 541 552 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 542 553 !! for IDEALIZED CASES ONLY … … 584 595 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 585 596 pass_interface: IF ( (firstcall .EQV. .true.) .or. (max_dom .GT. 1) ) THEN 586 PRINT *,'** Mars** PASS INTERFACE. EITHER FIRSTCALL or NESTED SIMULATION.'597 PRINT *,'** ',planet_type,'** PASS INTERFACE. EITHER FIRSTCALL or NESTED SIMULATION.' 587 598 !!*******************************************!! 588 599 !!*******************************************!! … … 649 660 pdq(:,:,:)=0. 650 661 #ifndef NOPHYS 651 print *, '** Mars** CALL TO LMD PHYSICS'662 print *, '** ',planet_type,'** CALL TO LMD PHYSICS' 652 663 !!! 653 664 CALL update_inputs_physiq_time(& … … 657 668 ptime,pday,MY) 658 669 !!! 659 CALL physiq (ngrid,nlayer,nq, & 660 firstcall,lastcall,pday,ptime,ptimestep, & 661 pplev,pplay,pphi,pu,pv,pt,pq,pw, & 662 pdu,pdv,pdt,pdq,pdpsrf) 670 CALL call_physiq(planet_type,ngrid,nlayer,nq,tname, & 671 firstcall,lastcall, & 672 pday,ptime,ptimestep, & 673 pplev,pplay, & 674 zpk_omp,pphi,zphis_omp, & 675 presnivs_omp, & 676 pu,pv,zrfi_omp,pt,pq, & 677 flxw, & 678 pdu,pdv,pdt,pdq,pdpsrf) 679 !!! 663 680 #endif 664 681 … … 670 687 #endif 671 688 672 print *, '** Mars** CALL TO LMD PHYSICS DONE'689 print *, '** ',planet_type,'** CALL TO LMD PHYSICS DONE' 673 690 DEALLOCATE(pplev) 674 691 DEALLOCATE(pplay) … … 677 694 DEALLOCATE(pv) 678 695 DEALLOCATE(pt) 679 DEALLOCATE( pw)696 DEALLOCATE(flxw) 680 697 DEALLOCATE(pq) 698 DEALLOCATE(zpk_omp) 699 DEALLOCATE(zphis_omp) 700 DEALLOCATE(presnivs_omp) 701 DEALLOCATE(zrfi_omp) 702 681 703 682 704 !---------------------------------------------------------------------------------! … … 796 818 SCALAR(i,kps:kpe,j,:)=0. 797 819 CASE(20) 798 !! Marsmode 20 : add a passive tracer with radioactive-like decay820 !! tracer mode 20 : add a passive tracer with radioactive-like decay 799 821 IF ( (i == ips) .AND. (j == jps) ) print *, 'RADIOACTIVE-LIKE TRACER WITH SOURCE AT SURFACE LAYER.' 800 822 tau_decay=60.*10. !! why not make it a namelist argument? … … 817 839 !! END !! 818 840 !!*****!! 819 print *,'** Mars** END LMD PHYSICS'841 print *,'** ',planet_type,'** END LMD PHYSICS' 820 842 !----------------------------------------------------------------! 821 843 ! use debug (see solve_em) if you wanna display some message ... !
Note: See TracChangeset
for help on using the changeset viewer.