Changeset 86


Ignore:
Timestamp:
Mar 3, 2011, 12:38:49 PM (14 years ago)
Author:
aslmd
Message:

*
mars + LMD_MM_MARS
* Precompilation flag MESOSCALE for better transparency

* in shared phymars between GCM and mesoscale model

*

M 85 mars/libf/phymars/meso_physiq.F
M 85 mars/libf/phymars/meso_inifis.F
Added a pre-compilation flag MESOSCALE so that the LMDZ.MARS GCM
will compile without stating errors because of mesoscale routines.

M 85 mars/libf/phymars/newcondens.F
M 85 mars/libf/phymars/testphys1d.F
M 85 mars/libf/phymars/dustlift.F
D 85 mars/libf/phymars/meso_testphys1d.F
D 85 mars/libf/phymars/meso_dustlift.F
D 85 mars/libf/phymars/meso_newcondens.F
Now, this MESOSCALE precompilation flag can be used to lower
the number of meso_* routines when adaptations for mesoscale
applications are not very extended.
--> Three meso_* routines were deleted and changes are
now impacted under the MESOSCALE flag in the original GCM routines
--> Completely transparent for GCM compilation since it is devoid
of the -DMESOSCALE option
--> Very good for syncing because changes in dustlift, newcondens
will be directly available in the mesoscale model

M 84 mesoscale/LMD_MM_MARS/makemeso
Changed meso_testphys1d in testphys1d

M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_pgf
M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_mpifort
M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_ifort
M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_g95
M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_mpi
Added the option -DMESOSCALE in these scripts

*
LMD_MM_MARS
* Various minor changes related to water cycle and plotting routines

* Also included the GW test case

*

A 0 mesoscale/LMDZ.MARS.new/myGCM/DEFS_JB/callphys.def.orig
M 84 mesoscale/NOTES.txt
D 84 mesoscale/LMD_MM_MARS/SRC/ARWpost/idl
M 84 mesoscale/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM
M 84 mesoscale/LMD_MM_MARS/SIMU/gnome_launch.meso
M 85 mesoscale/PLOT/MINIMAL/map_latlon.pro
D 85 mesoscale/PLOT/SPEC/LES/getget.pro
M 85 mesoscale/PLOT/SPEC/MAP/map_uvt.pro
A + - mesoscale/PLOT/SPEC/getget.pro
A 0 mesoscale/PLOT/RESERVE/obsolete
A 0 mesoscale/TESTS/TESTGW.tar.gz
M 84 000-USERS

Location:
trunk
Files:
14 added
4 deleted
17 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/000-USERS

    r80 r86  
    1 Last update: 20/02/2011
    2 
    31------------------------------------------------------------------------------------------------------------------------
    42CONTRIBUTORS [are allowed to commit]
  • trunk/mars/libf/phymars/dustlift.F

    r38 r86  
    1       SUBROUTINE dustlift(ngrid,nlay,nq,rho,pcdh_true,pcdh,co2ice,
     1      SUBROUTINE dustlift(ngrid,nlay,nq,rho,
     2     $                  pcdh_true,pcdh,co2ice,
    23     $                  dqslift)
    34      IMPLICIT NONE
     
    4445      DATA stress_seuil/0.0225/   ! stress seuil soulevement (N.m2)
    4546
     47#ifdef MESOSCALE
     48!!!! AS: In the mesoscale model we'd like to easily set
     49!!!! AS: ... stress for lifting
     50!!!! AS: you have to compile with -DMESOSCALE to do so
     51      REAL alpha
     52      INTEGER ierr
     53        OPEN(99,file='stress.def',status='old',form='formatted'
     54     .   ,iostat=ierr)
     55        !!! no file => default values
     56        IF(ierr.EQ.0) THEN
     57          READ(99,*) stress_seuil
     58          READ(99,*) alpha
     59          write(*,*) 'USER-DEFINED threshold: ', stress_seuil, alpha
     60          CLOSE(99)
     61          alpha_lift(1:nq) = alpha
     62        ENDIF
     63#endif
    4664
    4765c     ---------------------------------
  • trunk/mars/libf/phymars/meso_inifis.F

    r47 r86  
    106106      CHARACTER ch1*12
    107107      CHARACTER ch80*80
     108
     109#ifdef MESOSCALE
    108110
    109111!      logical chem, h2o
     
    807809!
    808810!      RETURN
     811
     812#endif
     813
    809814      END
  • trunk/mars/libf/phymars/meso_physiq.F

    r83 r86  
    1010     $            wisoil,wdsoil,
    1111     $            wecritphys,
     12#ifdef MESOSCALE
    1213     $            output_tab2d, output_tab3d,
     14#endif
    1315     $            flag_LES)
    1416
     
    152154#include "netcdf.inc"
    153155
     156!!!!**** SPECIFIC TO MESOSCALE
     157#ifdef MESOSCALE
    154158#include "meso_slope.h"
    155159#include "wrf_output_2d.h"
    156160#include "wrf_output_3d.h"
     161#endif
    157162
    158163#include "advtrac.h"   !!! this is necessary for tracers (in dyn3d)
     
    172177      REAL zh(ngridmx,nlayermx)      ! potential temperature (K)
    173178      LOGICAL firstcall,lastcall
    174 c ****WRF
     179!!! ****WRF WRF specific to mesoscale
    175180      INTEGER wday_ini
    176181      REAL wtsurf(ngridmx)  ! input only ay firstcall - output
     
    183188      REAL wq2(ngridmx,nlayermx+1)
    184189      REAL wecritphys
     190#ifdef MESOSCALE
    185191      REAL output_tab2d(ngridmx,n2d)
    186192      REAL output_tab3d(ngridmx,nlayer,n3d)
     193#endif
    187194      REAL sl_ls, sl_lct, sl_lat, sl_tau, sl_alb, sl_the, sl_psi
    188195      REAL sl_fl0, sl_flu
     
    196203      integer iloop
    197204      INTEGER tracerset    !!! this corresponds to config%mars
    198 c ****WRF
     205!!! ****WRF WRF specific to mesoscale
    199206      REAL pday
    200207      REAL ptime
     
    353360
    354361c=======================================================================
     362#ifdef MESOSCALE
    355363
    356364c 1. Initialisation:
     
    10361044
    10371045      IF (callcond) THEN
    1038          CALL meso_newcondens(ngrid,nlayer,nq,ptimestep,
     1046         CALL newcondens(ngrid,nlayer,nq,ptimestep,
    10391047     $              capcal,pplay,pplev,tsurf,pt,
    10401048     $              pphi,pdt,pdu,pdv,zdtsurf,pu,pv,pq,pdq,
     
    18901898      icount=icount+1
    18911899      write(*,*) 'now, back to the dynamical core...'
     1900#endif
    18921901      RETURN
    18931902      END
  • trunk/mars/libf/phymars/newcondens.F

    r38 r86  
    590590             zqm(nlayer+1,iq)= zq(nlayer,iq)
    591591            enddo
    592  
     592
     593#ifdef MESOSCALE
     594!!!! AS: This part must be commented in the mesoscale model
     595!!!! AS: ... to avoid instabilities.
     596!!!! AS: you have to compile with -DMESOSCALE to do so
     597#else 
    593598c           Tendencies on T, U, V, Q
    594599c           """"""""""""""""""""""""
     
    614619
    615620            END DO
     621#endif
    616622
    617623c           Tendencies on Q
  • trunk/mars/libf/phymars/testphys1d.F

    r38 r86  
    408408
    409409!Mars possible matter with dtphys in input and include!!!
     410#ifdef MESOSCALE
     411      CALL meso_inifis(1,llm,day0,daysec,dtphys,
     412#else
    410413      CALL inifis(1,llm,day0,daysec,dtphys,
     414#endif
    411415     .            lati,long,area,rad,g,r,cpp)
    412416c   Initialisation pour prendre en compte les vents en 1-D
     
    591595c       appel de la physique
    592596c       --------------------
    593 
     597#ifdef MESOSCALE
     598      CALL meso_physiq (1,llm,nqmx,
     599#else
    594600      CALL physiq (1,llm,nqmx,
     601#endif
    595602     ,     firstcall,lastcall,
    596603     ,     day,time,dtphys,
  • trunk/mesoscale/LMD_MM_MARS/SIMU/gnome_launch.meso

    r81 r86  
    1313## @ class =CP
    1414# @ environment=tmpdir=$(job_name).$(jobid).results
     15# @ notification = never
    1516# @ queue
    1617grep "^# @" $0
  • trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM

    r81 r86  
    101101state  real  HR_NIR    ikj  misc  1  -  rd   "HR_NIR"    "HEATING RATE nirco2"             "K/s"     #SAVEMARS3 zdtnirco2
    102102state  real  HR_NLTE   ikj  misc  1  -  rd   "HR_NLTE"   "HEATING RATE nlte"               "K/s"     #SAVEMARS3 zdtnlte
    103 state  real  ALBBARE   ij   misc  1  -  rhd  "ALBBARE"   "SOIL ALBEDO"                     ""        #SAVEMARS2 albedodat
     103state  real  ALBBARE   ij   misc  1  -  rd   "ALBBARE"   "SOIL ALBEDO"                     ""        #SAVEMARS2 albedodat
    104104state  real  VMR_ICE   ikj  misc  1  -  rhd  "VMR_ICE"   "VOL. MIXING RATIO ICE"           "ppm"     #SAVEMARS3 vmr
     105state  real  TAU_ICE   ij   misc  1  -  rhd  "TAU_ICE"   "CLOUD OD at 825 cm-1 TES"        ""        #SAVEMARS2 tauTES
    105106####
    106107####
  • trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_g95

    r69 r86  
    181181# Ehouarn 'g95' compiler
    182182# Aymeric : added option for NETCDF libraries
    183    set optim90=" -O2 -fno-second-underscore -fstatic -fzero -Wall "
    184    set optimtru90=" -O2 -fno-second-underscore -fstatic -fzero -Wall "
     183   set optim90=" -DMESOSCALE -O2 -fno-second-underscore -fstatic -fzero -Wall "
     184   set optimtru90=" -DMESOSCALE -O2 -fno-second-underscore -fstatic -fzero -Wall "
    185185#   set opt_link=" -Mfree -L/usr/local/pgi/linux86/lib -lpgf90 -lpgftnrtl -lpghpf -lpghpf2 -L$NCDFLIB -lnetcdf -Wl,-Bstatic "
    186186# Ehouarn: there is no /usr/local/pgi/linux86/lib, but it doesn't matter
     
    378378#           set optim90="-mcmodel=medium"
    379379#         Aymeric : thought I'd complete the g95 debugging
    380           set optim="$optim"" -g -fbounds-check "
    381           set optim90="$optim90"" -g -fbounds-check "
    382           set optimtru90="$optimtru90"" -g -fbounds-check "
     380          set optim="$optim"" -g -fbounds-check -DMESOSCALE "
     381          set optim90="$optim90"" -g -fbounds-check -DMESOSCALE "
     382          set optimtru90="$optimtru90"" -g -fbounds-check -DMESOSCALE "
    383383        else
    384384           echo "pas d option debug predefinie pour cette machine"
  • trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_ifort

    r78 r86  
    181181# Ehouarn 'ifort' compiler
    182182   #NB: on gnome -O3 ==> NaNs ...
    183    set optim=" -O2 -ip -mkl=sequential -align common "
    184    set optim90=" -O2 -ip -mkl=sequential -align common "
    185    set optimtru90=" -O2 -ip -mkl=sequential -align common "
     183   set optim=" -DMESOSCALE -O2 -ip -mkl=sequential -align common "
     184   set optim90=" -DMESOSCALE -O2 -ip -mkl=sequential -align common "
     185   set optimtru90=" -DMESOSCALE -O2 -ip -mkl=sequential -align common "
    186186#   set opt_link=" -Mfree -lpgf90 -lpgftnrtl -lpghpf -lpghpf2 -L$NCDFLIB -lnetcdf -Bstatic "
    187187   set mod_loc_dir=$LIBOGCM
     
    374374        else if $LINUX then
    375375           ## for ifort
    376              set optim=" -g -no-ftz -traceback -ftrapuv -fp-stack-check "
    377              set optim90=" -g -no-ftz -traceback -ftrapuv -fp-stack-check "
    378              set optimtru90=" -g -no-ftz -traceback -ftrapuv -fp-stack-check "
     376             set optim=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check "
     377             set optim90=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check "
     378             set optimtru90=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check "
    379379        else
    380380           echo "pas d option debug predefinie pour cette machine"
  • trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_mpi

    r69 r86  
    189189##-Ktrap=fp
    190190#   set optim90=" -fast -I. -Mlarge_arrays -mcmodel=medium"
    191    set optim=" -O2 -I. -Munroll -Mcache_align" #-C #-fpic" #-Mlarge_arrays -mcmodel=medium
    192    set optim90=" -O2 -I. -Munroll -Mcache_align" #-C #-fpic" #-Mlarge_arrays -mcmodel=medium
     191   set optim=" -DMESOSCALE -O2 -I. -Munroll -Mcache_align" #-C #-fpic" #-Mlarge_arrays -mcmodel=medium
     192   set optim90=" -DMESOSCALE -O2 -I. -Munroll -Mcache_align" #-C #-fpic" #-Mlarge_arrays -mcmodel=medium
    193193## Aymeric: added handling of large arrays and large memory
    194194## Aymeric: get rid of -Mfree for mpi
    195195#   set optimtru90=" -fast -c -Mlarge_arrays -mcmodel=medium"
    196   set optimtru90=" -O2 -I. -Munroll -Mcache_align" #-C #-fpic" #-Mlarge_arrays -mcmodel=medium
     196  set optimtru90=" -DMESOSCALE -O2 -I. -Munroll -Mcache_align" #-C #-fpic" #-Mlarge_arrays -mcmodel=medium
    197197#   set opt_link=" -Mfree -L/usr/local/pgi/linux86/lib -lpgf90 -lpgftnrtl -lpghpf -lpghpf2 -L$NCDFLIB -lnetcdf -Wl,-Bstatic "
    198198# Ehouarn: there is no /usr/local/pgi/linux86/lib, but it doesn't matter
     
    388388           set optim90="$optim90"" -G1 "
    389389        else if $LINUX then
    390            set optim90="-g -Mbounds "
     390           set optim90="-DMESOSCALE -g -Mbounds "
    391391        else
    392392           echo "pas d option debug predefinie pour cette machine"
  • trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_mpifort

    r78 r86  
    181181# Ehouarn 'ifort' compiler
    182182   #NB: on gnome -O3 ==> NaNs ...
    183    set optim=" -O2 -ip -mkl=sequential -align common "
    184    set optim90=" -O2 -ip -mkl=sequential -align common "
    185    set optimtru90=" -O2 -ip -mkl=sequential -align common "
     183   set optim=" -DMESOSCALE -O2 -ip -mkl=sequential -align common "
     184   set optim90=" -DMESOSCALE -O2 -ip -mkl=sequential -align common "
     185   set optimtru90=" -DMESOSCALE -O2 -ip -mkl=sequential -align common "
    186186#   set opt_link=" -Mfree -lpgf90 -lpgftnrtl -lpghpf -lpghpf2 -L$NCDFLIB -lnetcdf -Bstatic "
    187187   set mod_loc_dir=$LIBOGCM
     
    374374        else if $LINUX then
    375375           ## for ifort
    376              set optim=" -g -no-ftz -traceback -ftrapuv -fp-stack-check "
    377              set optim90=" -g -no-ftz -traceback -ftrapuv -fp-stack-check "
    378              set optimtru90=" -g -no-ftz -traceback -ftrapuv -fp-stack-check "
     376             set optim=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check "
     377             set optim90=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check "
     378             set optimtru90=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check "
    379379        else
    380380           echo "pas d option debug predefinie pour cette machine"
  • trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_pgf

    r69 r86  
    180180else if $LINUX then
    181181##-Ktrap=fp
    182    set optim90=" -fast -I."
    183    set optimtru90=" -fast -c -Mfree"
     182   set optim90=" -DMESOSCALE -fast -I."
     183   set optimtru90=" -DMESOSCALE -fast -c -Mfree"
    184184#   set opt_link=" -Mfree -L/usr/local/pgi/linux86/lib -lpgf90 -lpgftnrtl -lpghpf -lpghpf2 -L$NCDFLIB -lnetcdf -Wl,-Bstatic "
    185185# Ehouarn: there is no /usr/local/pgi/linux86/lib, but it doesn't matter
     
    379379           set optim90="$optim90"" -G1 "
    380380        else if $LINUX then
    381            set optim90="-g -Mbounds "
     381           set optim90="-g -Mbounds -DMESOSCALE "
    382382        else
    383383           echo "pas d option debug predefinie pour cette machine"
  • trunk/mesoscale/LMD_MM_MARS/makemeso

    r81 r86  
    439439       touch callkeys.h.meso 
    440440         ln -sf meso_callkeys.h callkeys.h
    441        touch dustlift.F.meso
    442          ln -sf meso_dustlift.F dustlift.F  ## attention avec "ancienne nouvelle physique"
     441       #touch dustlift.F.meso
     442       #  ln -sf meso_dustlift.F dustlift.F  ## attention avec "ancienne nouvelle physique"
    443443       touch readtesassim.F90.meso
    444444         ln -sf meso_readtesassim.F90 readtesassim.F90  ## attention idem
     
    467467  then
    468468    echo 'DEBUG DEBUG DEBUG DEBUG'
    469     nohup makegcm_${compilo} -debug -t ${tra} -p mars -d ${physz} meso_testphys1d | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
     469    nohup makegcm_${compilo} -debug -t ${tra} -p mars -d ${physz} testphys1d | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
    470470  else
    471     nohup makegcm_${compilo} -t ${tra} -p mars -d ${physz} meso_testphys1d | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
     471    nohup makegcm_${compilo} -t ${tra} -p mars -d ${physz} testphys1d | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
    472472  fi
    473473  echo ... done
  • trunk/mesoscale/NOTES.txt

    r84 r86  
     1
     2A FAIRE:::: mettre des flags precompilo dans les meso_
     3les reporter dans makegcm
    14
    25changer le renormalisation dans aeropacity ????
  • trunk/mesoscale/PLOT/MINIMAL/map_latlon.pro

    r85 r86  
    389389        c_labels=findgen(n_elements(lev))*0., $
    390390;        c_charsize=!P.charsize/2, $
    391         color=0;50;75;100tropclair;150;0;, $
     391        color=75;0;50;75;100tropclair;150;0;, $
    392392;       /noerase, $
    393393;       xtitle=xtitleset, $
  • trunk/mesoscale/PLOT/SPEC/MAP/map_uvt.pro

    r85 r86  
    2424;
    2525if (n_elements(field1) ne 0) then getcdf, file=filename, charvar=field1, invar=cfield1
    26 u = getget(filename, 'Um', count=[0,0,1,1], offset=[0,0,nlevel,ntime])
    27 v = getget(filename, 'Vm', count=[0,0,1,1], offset=[0,0,nlevel,ntime])
     26if ( (n_elements(overvector_x) ne 0) or (n_elements(field1) eq 0) ) then begin
     27   u = getget(filename, 'Um', count=[0,0,1,1], offset=[0,0,nlevel,ntime])
     28   v = getget(filename, 'Vm', count=[0,0,1,1], offset=[0,0,nlevel,ntime])
     29endif
    2830getcdf, file=filename, charvar='XLONG', invar=longi
    2931getcdf, file=filename, charvar='XLAT', invar=lati
     
    4244        if (no3d ne 'true') then cfield1 = cfield1 (sp:nx-sp-1,sp:ny-sp-1,*,*) else cfield1 = cfield1 (sp:nx-sp-1,sp:ny-sp-1,*)
    4345endif
    44 u               = u             (sp:nx-sp-1,sp:ny-sp-1);,*,*)
    45 v               = v             (sp:nx-sp-1,sp:ny-sp-1);,*,*)
     46if ( (n_elements(overvector_x) ne 0) or (n_elements(field1) eq 0) ) then begin
     47  u             = u             (sp:nx-sp-1,sp:ny-sp-1);,*,*)
     48  v             = v             (sp:nx-sp-1,sp:ny-sp-1);,*,*)
     49endif
    4650longi           = longi         (sp:nx-sp-1,sp:ny-sp-1,*)
    4751lati            = lati          (sp:nx-sp-1,sp:ny-sp-1,*)
     
    5559lon = reform(longi(*,*,ntime))
    5660lat = reform(lati(*,*,ntime))
    57 overvector_x = u;reform(u(*,*,nlevel,ntime))
    58 overvector_y = v;reform(v(*,*,nlevel,ntime))
     61if (n_elements(overvector_x) ne 0) then begin
     62  overvector_x = u;reform(u(*,*,nlevel,ntime))
     63  overvector_y = v;reform(v(*,*,nlevel,ntime))
     64endif
    5965if (n_elements(field1) eq 0) then begin
    6066        print, 'field1: horizontal velocity'
Note: See TracChangeset for help on using the changeset viewer.