Ignore:
Timestamp:
Jun 13, 2011, 5:36:43 PM (14 years ago)
Author:
aslmd
Message:

MESOSCALE: changements pour compiler / faire tourner le LES sans recours a la physique martienne [doit normalement egalement fonctionner avec modele mesoscale, non teste cependant]. principalement ajout d'un dossier LESnewphys_, d'une option -x dans makemeso et d'un flag NOPHYS dans module_lmd_driver ainsi que solve_em ou assimiles. l'objectif est de preparer la realisation de cas universels idealises, par exemple couche de nuages sur Venus.

Location:
trunk/MESOSCALE/LMD_MM_MARS
Files:
22 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_first_rk_step_part1.F

    r94 r156  
    644644     &        ,TAVE=grid%tave, TSTD=grid%tstd &
    645645     &        ,HISTORY_INTERVAL=model_config_rec%history_interval(1)  &
     646#ifndef NOPHYS
    646647          !------------------!
    647648          ! OUTPUT VARIABLES !
    648649          !------------------!
    649650#include "module_lmd_driver_output4.inc"
     651#endif
    650652     &        ,SLPX=grid%slpx,SLPY=grid%slpy)
    651653ENDIF
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F

    r94 r156  
    881881     &        ,TAVE=grid%em_tave, TSTD=grid%em_tstd &
    882882     &        ,HISTORY_INTERVAL=model_config_rec%history_interval(1)  &
     883#ifndef NOPHYS
    883884          !------------------!
    884885          ! OUTPUT VARIABLES !
    885886          !------------------!
    886887#include "module_lmd_driver_output4.inc"
     888#endif
    887889     &        ,SLPX=grid%slpx,SLPY=grid%slpy)
    888890ENDIF
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F

    r155 r156  
    4848        TAVE, TSTD, &
    4949        HISTORY_INTERVAL, &
     50#ifndef NOPHYS
    5051#include "module_lmd_driver_output1.inc"
     52#endif
    5153        SLPX,SLPY)
    5254! NB: module_lmd_driver_output1.inc : output arguments generated from Registry
     
    7173!==================================================================
    7274
     75#ifndef NOPHYS
    7376!! the only common needed is the one defining the physical grid
    7477!! -- path is hardcoded, but the structure is not subject to change
     
    8689include "../mars_lmd/libf/phymars/wrf_output_2d.h"
    8790include "../mars_lmd/libf/phymars/wrf_output_3d.h"
     91#endif
    8892
    8993!==================================================================
     
    142146! 2D : TSK, PSFC
    143147! 3D : RTHBLTEN,RUBLTEN,RVBLTEN
     148#ifndef NOPHYS
    144149#include "module_lmd_driver_output2.inc"
    145150   REAL, DIMENSION(:,:), ALLOCATABLE :: output_tab2d
    146151   REAL, DIMENSION(:,:,:), ALLOCATABLE :: output_tab3d
     152#else
     153   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT)  :: PSFC,TSK
     154   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(OUT)  :: RTHBLTEN,RUBLTEN,RVBLTEN
     155#endif
    147156!-------------------------------------------
    148157! OUTPUT VARIABLES
     
    337346IF (elaps .eq. 0.) THEN
    338347firstcall=.true.  !! for continuity with GCM, physics are always called at the first WRF timestep
    339       !firstcall=.false. ! just in case you'd want to get rid of the physics
     348  !firstcall=.false. !! just in case you'd want to get rid of the physics
    340349test=0
    341350#ifdef SPECIAL_NEST_SAVE
     
    565574ALLOCATE(wpsi(ngrid))
    566575ALLOCATE(wtsurf(ngrid))
     576#ifndef NOPHYS
    567577ALLOCATE(output_tab2d(ngrid,n2d))
    568578ALLOCATE(output_tab3d(ngrid,nlayer,n3d))
     579#endif
    569580ALLOCATE(wco2ice(ngrid))
    570581ALLOCATE(wemis(ngrid))
     
    10421053!!***********************!!
    10431054IF (firstcall .EQV. .true.) THEN
     1055#ifndef NOPHYS
    10441056print *, '** Mars ** LMD INITIALIZATION'
    10451057#include "../call_meso_inifis.inc"
    10461058!!! le # est important pour newphys
     1059#endif
    10471060DEALLOCATE(aire_vec)
    10481061DEALLOCATE(lat_vec)
     
    10781091!    tracerdyn                 call tracer in dynamical part of GCM ?           !
    10791092!-------------------------------------------------------------------------------!
    1080 print *, '** Mars ** CALL TO LMD PHYSICS'
    10811093pdpsrf(:)=0.
    10821094pdu(:,:)=0.
     
    10841096pdt(:,:)=0.
    10851097pdq(:,:,:)=0.
     1098#ifndef NOPHYS
     1099print *, '** Mars ** CALL TO LMD PHYSICS'
    10861100#include "../call_meso_physiq.inc"
    10871101!!! le # est important pour newphys
     1102#endif
    10881103DEALLOCATE(pplev)
    10891104DEALLOCATE(pplay)
     
    11101125! PHYSIQ OUTPUT IN THE WRF FILE !
    11111126!-------------------------------!
     1127#ifndef NOPHYS
    11121128DO j = jps,jpe
    11131129DO i = ips,ipe
     
    11311147DEALLOCATE(output_tab2d)
    11321148DEALLOCATE(output_tab3d)
    1133 
     1149#endif
    11341150
    11351151!!!!!! PATCH SPECIAL STORM
  • trunk/MESOSCALE/LMD_MM_MARS/makemeso

    r153 r156  
    3535phys=""
    3636scenario=""
    37 while getopts "drc:njhgpfs:" options; do
     37while getopts "drc:njhgpfs:x" options; do
    3838  case $options in
    3939   d ) donotcompile=1;;       ## just to check the compile folder
     
    4646   f ) fresh_start=1;;        ## a fresh start
    4747   s ) scenario="${OPTARG}";; ## a specific scenario, you need a corresponding "mars_lmd_..."
     48   x ) phys="nophys_";donotcompilephys=1;; ## a case with no LMD physics included
    4849   h ) echo "
    4950# Use:   
     
    7374#
    7475# makemeso -s storm          ## a specific scenario, you need a corresponding mars_lmd_... (only for newphys)
     76#
     77# makemeso -x                ## a case with no LMD physics included
    7578" ; exit ;;
    7679  esac
     
    213216         if [[ "${config}" == "les" ]]
    214217         then
    215            sed s+"PWD/SRC/"+"PWD/SRC/LES/"+g copy_model > copy_model_tmp
     218           ### NB: With physics: LES folder // Without physics : LESnophys_ folder
     219           ### ---- because differences in 'modif' folder ----
     220           sed s+"PWD/SRC/"+"PWD/SRC/LES$phys/"+g copy_model > copy_model_tmp
    216221         else
    217222           cp copy_model copy_model_tmp
     
    451456
    452457
     458  ### here a case structure would be great
     459
    453460  if [[ "${phys}" == "newphys_" ]]
    454461  then
     
    467474          mv -f yeah configure.wrf
    468475        fi
     476
     477  ################
     478  if [[ "${phys}" == "nophys_" ]]
     479  then
     480     if [[ "${config}" == "les" ]]  ### LES is different because of WRFV3
     481     then
     482       sed s+"ARCH_LOCAL      =       "+"ARCH_LOCAL      =       -DNOPHYS "+g configure.wrf > yeah ; mv -f yeah configure.wrf
     483       sed s+"-L../mars_lmd/libo -llmd"+""+g configure.wrf > yeah ; mv -f yeah configure.wrf
     484     else
     485       ### not tested yet but should be working 
     486       echo CAUTION CAUTION CAUTION NOT FULLY TESTED
     487       sed s+"ARCHFLAGS       =       "+"ARCHFLAGS       =       -DNOPHYS "+g configure.wrf > yeah ; mv -f yeah configure.wrf
     488       sed s+"-L../mars_lmd/libo -llmd"+""+g configure.wrf > yeah ; mv -f yeah configure.wrf
     489     fi
     490  fi
     491  ################
    469492
    470493  if [ ${debug} -ne 0 ]   # not working for xlf!
     
    657680  echo 2. compiling WRF dynamical core ...
    658681
    659   if [[ ! ( -f "call_meso_physiq.inc" ) ]]
    660   then
    661    echo 'did you compile the physics ? no call_meso_physiq.inc !'
    662    exit
     682  if [[ "${phys}" == "nophys_" ]]
     683  then
     684   echo 'NO LMD PHYSICS included'
     685  else
     686   if [[ ! ( -f "call_meso_physiq.inc" ) ]]
     687   then
     688    echo 'did you compile the physics ? no call_meso_physiq.inc !'
     689    exit
     690   fi
    663691  fi
    664692
Note: See TracChangeset for help on using the changeset viewer.