Ignore:
Timestamp:
Aug 23, 2016, 8:04:18 AM (8 years ago)
Author:
aslmd
Message:

Goal: make the mesoscale model compliant
with new interface philosophy and adapted
to easy interfacing with any physics

Commit 3: call to iniphysiq in module_lmd_driver

  • iniphysiq is in WRFV2/phys
  • geometry is initialized in update_inputs_physiq_mod

This call is planet-independent and follows the
same philosophy as iniphysiq in dynphy_lonlat
for the LMDz GCM

NB: mesoscale model now compiles and runs with HEAD version
results completely compatible with v1520 version (same physics)

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

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/Makefile

    r1577 r1579  
    1111        update_inputs_physiq_mod.o \
    1212        update_outputs_physiq_mod.o \
     13        iniphysiq_mod.o \
    1314        module_lmd_driver.o
    1415 
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F.new

    r1578 r1579  
    6262   USE update_outputs_physiq_mod !! to get outputs from physiq
    6363   USE comm_wrf !! to get fields to be written from physiq
     64   USE iniphysiq_mod !! to get iniphysiq subroutine
    6465   USE physiq_mod, only : physiq
    65    USE phys_state_var_init_mod, only : phys_state_var_init
    66    !!! ajouter init_time (voir iniphysiq. ne plus le faire dans la physiq)
    6766#endif
    6867
     
    454453            lct_input,lon_input,ls_input,&
    455454            ptime,pday,MY)
    456   !!
    457   CALL phys_state_var_init(ngrid,nlayer,nq,&
    458                            floor(pday),ptime,&
    459                            wdaysec,ptimestep,1/reradius,g,r_d,cp)
    460455  !! Fill planetary parameters in modules
    461456  !! Values defined in the module_model_constants.F WRF routine
    462457  CALL update_inputs_physiq_constants
    463   !! Read callphys.def !!
    464   call conf_phys(ngrid,nlayer,nq)
     458  !! Initialize physics
     459  CALL iniphysiq(ngrid,nlayer,nq,ptime,wappel_phys,&
     460                     wdaysec,floor(pday),ptimestep, &
     461                     1./reradius,g,r_d,cp,1)
    465462ENDIF allocation_firstcall
    466463#endif
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/update_inputs_physiq_mod.F

    r1577 r1579  
    227227            XLAT,XLONG)
    228228
     229   ! in WRF (share)
    229230   USE module_model_constants, only: DEGRAD
     231   ! in LMD (phymars)
    230232   use comgeomfi_h, only: ini_fillgeom
     233   ! in LMD (phy_common)
     234   USE mod_grid_phy_lmdz, ONLY: init_grid_phy_lmdz
     235   USE geometry_mod, ONLY: latitude,latitude_deg,&
     236                           longitude,longitude_deg,&
     237                           cell_area
    231238
    232239   INTEGER, INTENT(IN) :: ims,ime,jms,jme
     
    273280   !! FILL GEOMETRICAL ARRAYS !!
    274281   call ini_fillgeom(ngrid,plat,plon,parea)
     282
     283   !!! ----------------------------------------------------------
     284   !!! --- initializing geometry in phy_common
     285   !!! --- (this is quite planet-independent)
     286   !!! ----------------------------------------------------------
     287   ! initialize mod_grid_phy_lmdz
     288   CALL init_grid_phy_lmdz(1,1,ipe-ips+1,jpe-jps+1,nlayer)
     289   ! fill in geometry_mod variables
     290   ! ... copy over local grid longitudes and latitudes
     291   ! ... partly what is done in init_geometry
     292   IF(.not.ALLOCATED(longitude)) ALLOCATE(longitude(ngrid))
     293   IF(.not.ALLOCATED(longitude_deg)) ALLOCATE(longitude_deg(ngrid))
     294   IF(.not.ALLOCATED(latitude)) ALLOCATE(latitude(ngrid))
     295   IF(.not.ALLOCATED(latitude_deg)) ALLOCATE(latitude_deg(ngrid))
     296   IF(.not.ALLOCATED(cell_area)) ALLOCATE(cell_area(ngrid))
     297   longitude(:) = plon(:)
     298   latitude(:) = plat(:)
     299   longitude_deg(:) = plon(:)/DEGRAD
     300   latitude_deg(:) = plat(:)/DEGRAD
     301   cell_area(:) = parea(:)
     302   !!! ----------------------------------------------------------
    275303
    276304END SUBROUTINE update_inputs_physiq_geom
Note: See TracChangeset for help on using the changeset viewer.