Ignore:
Timestamp:
Nov 27, 2016, 1:28:38 PM (8 years ago)
Author:
aslmd
Message:

MESOSCALE: modified treatment of tracer names to be compliant with big changes in r1621. now the mesoscale model compiles fine again. and interface is a bit simpler.

Location:
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_mars_lmd_new/callphysiq_mod.F

    r1582 r1634  
    1212CONTAINS
    1313
    14 SUBROUTINE call_physiq(planet_type, klon,llm,nqtot,tname,                 &
     14SUBROUTINE call_physiq(planet_type, klon,llm,nqtot,                       &
    1515                       debut_split,lafin_split,                           &
    1616                       jD_cur,jH_cur_split,zdt_split,                     &
     
    3030  INTEGER,INTENT(IN) :: llm  ! number of atmospheric layers
    3131  INTEGER,INTENT(IN) :: nqtot ! number of tracers
    32   CHARACTER(len=*),INTENT(IN) :: tname(nqtot) ! tracer names
    3332  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first call to physics
    3433  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last call to physics
     
    7776
    7877! Set dummy variables for Mars to zero (additional and prob useless security)
    79 ! NB: tname already filled with tracers' names (though not used here)
    8078  zpk_omp(:,:)=0.
    8179  zphis_omp(:)=0.
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_mars_lmd_new/iniphysiq_mod.F

    r1582 r1634  
    1010use time_phylmdz_mod, only: iphysiq, day_step, ecritstart,ecritphy,&
    1111                            dtphys,daysec,day_ini,hour_ini
     12use update_inputs_physiq_mod, only: traceurs
    1213
    1314implicit none
     
    3637
    3738!! initialize physical constants and arrays
    38 call phys_state_var_init(ngrid,nlayer,nq, &
     39call phys_state_var_init(ngrid,nlayer,nq, traceurs, &
    3940                         pdayref,phour_ini,punjours,ptimestep, &
    4041                         prad,pg,pr,pcpp)
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_mars_lmd_new/update_inputs_physiq_mod.F

    r1595 r1634  
    11MODULE update_inputs_physiq_mod
     2
     3IMPLICIT NONE
     4
     5CHARACTER(len=20),save,allocatable,dimension(:) :: traceurs ! tracer names
    26
    37CONTAINS
     
    101105!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    102106!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    103 SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE,tname)
    104 
    105   use tracer_mod, only: noms
     107SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE)
    106108
    107109  INTEGER, INTENT(IN) :: nq,MARS_MODE
    108   CHARACTER(len=*), INTENT(INOUT) :: tname(nq) ! tracer names
    109 
    110   !! TRACERS
    111   ALLOCATE(noms(nq)) !! est fait dans initracer normalement
    112                      !! tableau dans tracer_mod.F90
     110
     111  ALLOCATE(traceurs(nq))
    113112
    114113  !!! name of tracers to mimic entries in tracer.def
     
    117116  SELECT CASE (MARS_MODE)
    118117    CASE(0,10) 
    119       noms(nq) = 'co2'
     118      traceurs(nq) = 'co2'
    120119    CASE(1)    ! scalar:qh2o,qh2o_ice
    121       noms(1)  = 'h2o_vap'
    122       noms(2)  = 'h2o_ice'
     120      traceurs(1)  = 'h2o_vap'
     121      traceurs(2)  = 'h2o_ice'
    123122    CASE(2)    ! scalar:qdust
    124       noms(1)  = 'dust01'
     123      traceurs(1)  = 'dust01'
    125124    CASE(3)    ! scalar:qdust,qdustn
    126       noms(1)  = 'dust_mass'
    127       noms(2)  = 'dust_number'
     125      traceurs(1)  = 'dust_mass'
     126      traceurs(2)  = 'dust_number'
    128127    CASE(11)   ! scalar:qh2o,qh2o_ice,qdust,qdustn
    129       noms(1)  = 'h2o_vap'
    130       noms(2)  = 'h2o_ice'
    131       noms(3)  = 'dust_mass'
    132       noms(4)  = 'dust_number'
     128      traceurs(1)  = 'h2o_vap'
     129      traceurs(2)  = 'h2o_ice'
     130      traceurs(3)  = 'dust_mass'
     131      traceurs(4)  = 'dust_number'
    133132    CASE(12)
    134       noms(1)  = 'h2o_vap'
    135       noms(2)  = 'h2o_ice'
    136       noms(3)  = 'dust_mass'
    137       noms(4)  = 'dust_number'
    138       noms(5)  = 'ccn_mass'
    139       noms(6)  = 'ccn_number'
     133      traceurs(1)  = 'h2o_vap'
     134      traceurs(2)  = 'h2o_ice'
     135      traceurs(3)  = 'dust_mass'
     136      traceurs(4)  = 'dust_number'
     137      traceurs(5)  = 'ccn_mass'
     138      traceurs(6)  = 'ccn_number'
    140139    CASE(20)
    141       noms(1) = 'qtrac1'
     140      traceurs(1) = 'qtrac1'
    142141    CASE(42)
    143       noms(1)  = 'co2'
    144       noms(2)  = 'co'
    145       noms(3)  = 'o'
    146       noms(4)  = 'o1d'
    147       noms(5)  = 'o2'
    148       noms(6)  = 'o3'
    149       noms(7)  = 'h'
    150       noms(8)  = 'h2'
    151       noms(9)  = 'oh'
    152       noms(10)  = 'ho2'
    153       noms(11)  = 'h2o2'
    154       noms(12)  = 'ch4'
    155       noms(13)  = 'n2'
    156       noms(14)  = 'ar'
    157       noms(15)  = 'h2o_ice'
    158       noms(16)  = 'h2o_vap'
    159       noms(17)  = 'dust_mass'
    160       noms(18)  = 'dust_number'
     142      traceurs(1)  = 'co2'
     143      traceurs(2)  = 'co'
     144      traceurs(3)  = 'o'
     145      traceurs(4)  = 'o1d'
     146      traceurs(5)  = 'o2'
     147      traceurs(6)  = 'o3'
     148      traceurs(7)  = 'h'
     149      traceurs(8)  = 'h2'
     150      traceurs(9)  = 'oh'
     151      traceurs(10)  = 'ho2'
     152      traceurs(11)  = 'h2o2'
     153      traceurs(12)  = 'ch4'
     154      traceurs(13)  = 'n2'
     155      traceurs(14)  = 'ar'
     156      traceurs(15)  = 'h2o_ice'
     157      traceurs(16)  = 'h2o_vap'
     158      traceurs(17)  = 'dust_mass'
     159      traceurs(18)  = 'dust_number'
    161160  END SELECT
    162161
     
    164163  !! OUTPUT FOR CHECKING !!
    165164  !!---------------------!!
    166   print*,"check: noms",noms
    167   tname = noms
    168   print*,"check: tname",tname
     165  print*,"check: traceurs",traceurs
    169166
    170167END SUBROUTINE update_inputs_physiq_tracers
     
    315312            M_ALBEDO,CST_AL,&
    316313            M_TSURF,M_EMISS,M_CO2ICE,&
    317             M_GW,M_Z0,&
     314            M_GW,M_Z0,CST_Z0,&
    318315            M_H2OICE,&
    319316            phisfi_val)
     
    326323   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,MARS_MODE
    327324   INTEGER :: i,j,subs,nlast
    328    REAL, INTENT(IN  ) :: CST_AL, phisfi_val
     325   REAL, INTENT(IN  ) :: CST_AL, phisfi_val, CST_Z0
    329326   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
    330327     M_ALBEDO,M_TSURF,M_EMISS,M_CO2ICE,M_H2OICE,M_Z0
     
    470467   INTEGER, INTENT(IN) :: ims,ime,jms,jme
    471468   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,nsoil
    472    INTEGER :: i,j,subs,nlast
     469   INTEGER :: i,j,subs,nlast,k
    473470   REAL, INTENT(IN  ) :: CST_TI
    474471   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_prescribed_void_lmd_new/callphysiq_mod.F

    r1603 r1634  
    1212CONTAINS
    1313
    14 SUBROUTINE call_physiq(planet_type, klon,llm,nqtot,tname,                 &
     14SUBROUTINE call_physiq(planet_type, klon,llm,nqtot,                       &
    1515                       debut_split,lafin_split,                           &
    1616                       jD_cur,jH_cur_split,zdt_split,                     &
     
    2828  INTEGER,INTENT(IN) :: llm  ! number of atmospheric layers
    2929  INTEGER,INTENT(IN) :: nqtot ! number of tracers
    30   CHARACTER(len=*),INTENT(IN) :: tname(nqtot) ! tracer names
    3130  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first call to physics
    3231  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last call to physics
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_prescribed_void_lmd_new/update_inputs_physiq_mod.F

    r1603 r1634  
    2929!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    3030!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    31 SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE,tname)
     31SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE)
    3232
    3333  INTEGER, INTENT(IN) :: nq,MARS_MODE
    34   CHARACTER(len=*), INTENT(INOUT) :: tname(nq) ! tracer names
    3534
    3635END SUBROUTINE update_inputs_physiq_tracers
     
    4443!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    4544!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    46 SUBROUTINE update_inputs_physiq_geom(nlayer, &
     45SUBROUTINE update_inputs_physiq_geom( &
    4746            ims,ime,jms,jme,&
    4847            ips,ipe,jps,jpe,&
    49             JULYR,ngrid,&
     48            JULYR,ngrid,nlayer,&
    5049            DX,DY,MSFT,&
    5150            lat_input, lon_input,&
     
    5352
    5453   INTEGER, INTENT(IN) :: ims,ime,jms,jme
    55    INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,ngrid
     54   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,ngrid,nlayer
    5655   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
    5756     MSFT,XLAT,XLONG
     
    6968            M_ALBEDO,CST_AL,&
    7069            M_TSURF,M_EMISS,M_CO2ICE,&
    71             M_GW,M_Z0,&
     70            M_GW,M_Z0,CST_Z0,&
    7271            M_H2OICE,&
    7372            phisfi_val)
     
    7675   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,MARS_MODE
    7776   INTEGER :: i,j,subs,nlast
    78    REAL, INTENT(IN  ) :: CST_AL, phisfi_val
     77   REAL, INTENT(IN  ) :: CST_AL, phisfi_val, CST_Z0
    7978   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
    8079     M_ALBEDO,M_TSURF,M_EMISS,M_CO2ICE,M_H2OICE,M_Z0
     
    9594   INTEGER, INTENT(IN) :: ims,ime,jms,jme
    9695   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,nsoil
    97    INTEGER :: i,j,subs,nlast
     96   INTEGER :: i,j,subs,nlast,k
    9897   REAL, INTENT(IN  ) :: CST_TI
    9998   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_venus_lmd_new/callphysiq_mod.F

    r1596 r1634  
    3131  INTEGER,INTENT(IN) :: llm  ! number of atmospheric layers
    3232  INTEGER,INTENT(IN) :: nqtot ! number of tracers
    33   !CHARACTER(len=*),INTENT(IN) :: tname(nqtot) ! tracer names
    3433  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first call to physics
    3534  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last call to physics
     
    7877
    7978! Set dummy variables for Mars to zero (additional and prob useless security)
    80 ! NB: tname already filled with tracers' names (though not used here)
    8179  zpk_omp=(zplay_omp/p0)**rcp
    8280  zphis_omp(:)=zphi_omp(1,1)
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_venus_lmd_new/update_inputs_physiq_mod.F

    r1596 r1634  
    11MODULE update_inputs_physiq_mod
     2
     3IMPLICIT NONE
     4
     5CHARACTER(len=20),save,allocatable,dimension(:) :: traceurs ! tracer names
    26
    37CONTAINS
     
    1317!SUBROUTINE update_inputs_physiq_slope
    1418
    15 !cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
    16 
    17 
    18 !c  Returns solar longitude, Ls (in deg.), from day number (in sol),
    19 !c  where sol=0=Ls=0 at the northern hemisphere spring equinox
    20 
    21 
    22 !!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
    2319
    2420!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    5248!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    5349!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    54 SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE,tname)
     50SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE)
    5551
    5652  !use infotrac
     
    5854  implicit none
    5955  INTEGER, INTENT(IN) :: nq,MARS_MODE
    60   CHARACTER(len=*), INTENT(INOUT) :: tname(nq) ! tracer names
    61 
    62   tname(:)='zolbxs'
     56
     57  ALLOCATE(traceurs(nq))
     58  traceurs(:)='zolbxs'
    6359  !call infotrac_init ! Need traceur.def
    6460
     
    188184            M_ALBEDO,CST_AL,&
    189185            M_TSURF,M_EMISS,M_CO2ICE,&
    190             M_GW,M_Z0,&
     186            M_GW,M_Z0,CST_Z0,&
    191187            M_H2OICE,&
    192188            phisfi_val)
     
    199195   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,MARS_MODE
    200196   INTEGER :: i,j,subs,nlast
    201    REAL, INTENT(IN  ) :: CST_AL, phisfi_val
     197   REAL, INTENT(IN  ) :: CST_AL, phisfi_val, CST_Z0
    202198   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
    203199     M_ALBEDO,M_TSURF,M_EMISS,M_CO2ICE,M_H2OICE,M_Z0
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/callphysiq_mod.F

    r1590 r1634  
    1212CONTAINS
    1313
    14 SUBROUTINE call_physiq(planet_type, klon,llm,nqtot,tname,                 &
     14SUBROUTINE call_physiq(planet_type, klon,llm,nqtot,                       &
    1515                       debut_split,lafin_split,                           &
    1616                       jD_cur,jH_cur_split,zdt_split,                     &
     
    2929  INTEGER,INTENT(IN) :: llm  ! number of atmospheric layers
    3030  INTEGER,INTENT(IN) :: nqtot ! number of tracers
    31   CHARACTER(len=*),INTENT(IN) :: tname(nqtot) ! tracer names
    3231  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first call to physics
    3332  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last call to physics
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/update_inputs_physiq_mod.F

    r1595 r1634  
    2929!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    3030!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    31 SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE,tname)
     31SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE)
    3232
    3333  INTEGER, INTENT(IN) :: nq,MARS_MODE
    34   CHARACTER(len=*), INTENT(INOUT) :: tname(nq) ! tracer names
    3534
    3635END SUBROUTINE update_inputs_physiq_tracers
     
    6968            M_ALBEDO,CST_AL,&
    7069            M_TSURF,M_EMISS,M_CO2ICE,&
    71             M_GW,M_Z0,&
     70            M_GW,M_Z0,CST_Z0,&
    7271            M_H2OICE,&
    7372            phisfi_val)
     
    7675   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,MARS_MODE
    7776   INTEGER :: i,j,subs,nlast
    78    REAL, INTENT(IN  ) :: CST_AL, phisfi_val
     77   REAL, INTENT(IN  ) :: CST_AL, phisfi_val, CST_Z0
    7978   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
    8079     M_ALBEDO,M_TSURF,M_EMISS,M_CO2ICE,M_H2OICE,M_Z0
     
    9594   INTEGER, INTENT(IN) :: ims,ime,jms,jme
    9695   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,nsoil
    97    INTEGER :: i,j,subs,nlast
     96   INTEGER :: i,j,subs,nlast,k
    9897   REAL, INTENT(IN  ) :: CST_TI
    9998   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F.new

    r1595 r1634  
    191191
    192192   !! arguments to physiq
    193    CHARACTER(len=20),ALLOCATABLE :: tname(:) ! tracer names
    194193   REAL,ALLOCATABLE :: zpk_omp(:,:)
    195194   REAL,ALLOCATABLE :: zphis_omp(:) ! surface geopotential
     
    370369! ALLOCATE !
    371370!----------!
    372 IF (.not.ALLOCATED(tname)) ALLOCATE(tname(nq))
    373371!-------------------------------------------------------------------------------!
    374372! outputs:                                                                      !       
     
    444442  !! tracers' name
    445443  PRINT *,'** ',planet_type,'** TRACERS NAMES'
    446   CALL update_inputs_physiq_tracers(nq,MARS_MODE,tname)
     444  CALL update_inputs_physiq_tracers(nq,MARS_MODE)
    447445  !! PHYSICS VARIABLES (cf. iniphysiq in LMD GCM)
    448446  !! parameters are defined in the module_model_constants.F WRF routine
     
    615613            M_ALBEDO,CST_AL,&
    616614            M_TSURF,M_EMISS,M_CO2ICE,&
    617             M_GW,M_Z0,&
     615            M_GW,M_Z0,CST_Z0,&
    618616            M_H2OICE,&
    619617            phisfi_val)
     
    656654            ptime,pday,MY)
    657655!!!
    658 CALL call_physiq(planet_type,ngrid,nlayer,nq,tname, &
     656CALL call_physiq(planet_type,ngrid,nlayer,nq,      &
    659657                       firstcall,lastcall,          &
    660658                       pday,ptime,ptimestep,        &
Note: See TracChangeset for help on using the changeset viewer.