Ignore:
Timestamp:
Aug 30, 2016, 3:04:29 PM (9 years ago)
Author:
aslmd
Message:

moved interface for outputs from module_lmd_driver to update_outputs_physiq_mod. updated the nophysics case by adding a case dynphy_wrf_void_lmd_new which will serve as a template for a physiq interface

Location:
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys
Files:
5 added
2 edited

Legend:

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

    r1582 r1590  
    153153END SUBROUTINE update_outputs_physiq_turb
    154154
     155!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     156!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     157SUBROUTINE update_outputs_physiq_diag( &
     158            ims,ime,jms,jme,kms,kme,&
     159            ips,ipe,jps,jpe,kps,kpe,&
     160            SWDOWNZ,TAU_DUST,QSURFDUST,&
     161            MTOT,ICETOT,TAU_ICE,&
     162            HR_SW,HR_LW,&
     163            RDUST,VMR_ICE,RICE)
     164
     165   USE comm_wrf !! to get fields to be written from physiq
     166
     167   INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme
     168   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,kps,kpe
     169   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: &
     170     SWDOWNZ,TAU_DUST,QSURFDUST,&
     171     MTOT,ICETOT,TAU_ICE
     172   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: &
     173     HR_SW,HR_LW,RDUST,VMR_ICE,RICE
     174   INTEGER :: i,j,subs
     175
     176   DO j = jps,jpe
     177   DO i = ips,ipe
     178
     179     !-----------------------------------!
     180     ! 1D subscript for physics "cursor" !
     181     !-----------------------------------!
     182     subs = (j-jps)*(ipe-ips+1)+(i-ips+1)
     183
     184     !! get diagnostics from physics
     185     SWDOWNZ(i,j) = comm_SWDOWNZ(subs)
     186     TAU_DUST(i,j) = comm_TAU_DUST(subs)
     187     QSURFDUST(i,j) = comm_QSURFDUST(subs)
     188     MTOT(i,j) = comm_MTOT(subs)
     189     ICETOT(i,j) = comm_ICETOT(subs)
     190     TAU_ICE(i,j) = comm_TAU_ICE(subs)
     191     HR_SW(i,kps:kpe,j) = comm_HR_SW(subs,kps:kpe)
     192     HR_LW(i,kps:kpe,j) = comm_HR_LW(subs,kps:kpe)
     193     RDUST(i,kps:kpe,j) = comm_RDUST(subs,kps:kpe)
     194     VMR_ICE(i,kps:kpe,j) = comm_VMR_ICE(subs,kps:kpe)
     195     RICE(i,kps:kpe,j) = comm_RICE(subs,kps:kpe)
     196
     197   ENDDO
     198   ENDDO
     199
     200   CALL deallocate_comm_wrf
     201
     202END SUBROUTINE update_outputs_physiq_diag
     203
    155204END MODULE update_outputs_physiq_mod
    156205
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F.new

    r1584 r1590  
    4040        isfflx, diff_opt, km_opt, &
    4141        HISTORY_INTERVAL, &
    42 ! sert a rien ce NOPHYS. il le faudrait sur tout.
    43 #ifndef NOPHYS
    4442        HR_SW,HR_LW,SWDOWNZ,&
    4543        TAU_DUST,RDUST,QSURFDUST,&
     
    4745        HFMAX,ZMAX,&
    4846        USTM,HFX,&
    49 #endif
    5047        SLPX,SLPY,RESTART)
    5148! NB: module_lmd_driver_output1.inc : output arguments generated from Registry
     
    6057   USE module_model_constants
    6158   USE module_wrf_error
    62 #ifndef NOPHYS
     59   !!!!!!!! interface modules
    6360   USE update_inputs_physiq_mod !! to set inputs for physiq
    6461   USE update_outputs_physiq_mod !! to get outputs from physiq
    65    USE comm_wrf !! to get fields to be written from physiq
    6662   USE iniphysiq_mod !! to get iniphysiq subroutine
    6763   USE callphysiq_mod !! to call the LMD physics
    68 #endif
     64   !!!!!!!! interface modules
    6965
    7066!==================================================================
     
    414410!----------!
    415411! inputs ...
    416 #ifndef NOPHYS
    417 CALL allocate_comm_wrf(ngrid,nlayer)
    418 #endif
    419412ALLOCATE(pplev(ngrid,nlayer+1))  !!!!!
    420413ALLOCATE(pplay(ngrid,nlayer))    !!!!!
     
    447440!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    448441
    449 #ifndef NOPHYS
    450442!! INITIALIZE AND ALLOCATE EVERYTHING !! here, only firstcall
    451443allocation_firstcall: IF (firstcall .EQV. .true.) THEN
     
    470462                     1./reradius,g,r_d,cp,1)
    471463ENDIF allocation_firstcall
    472 #endif
    473464
    474465!!*****************************!!
     
    657648pdt(:,:)=0.
    658649pdq(:,:,:)=0.
    659 #ifndef NOPHYS
    660650print *, '** ',planet_type,'** CALL TO LMD PHYSICS'
    661651!!!
     
    676666                       pdu,pdv,pdt,pdq,pdpsrf)
    677667!!!
    678 #endif
    679668
    680669!! specific scenario. necessary to add the right amount of dust.
     
    745734            M_Q2,M_WSTAR,&
    746735            HFMAX,ZMAX,USTM,HFX)
    747 
    748 DO j = jps,jpe
    749 DO i = ips,ipe
    750 
    751   subs = (j-jps)*(ipe-ips+1)+(i-ips+1)
    752 
    753   !! output only (cf comm_wrf)
    754   SWDOWNZ(i,j) = comm_SWDOWNZ(subs)
    755   TAU_DUST(i,j) = comm_TAU_DUST(subs)
    756   QSURFDUST(i,j) = comm_QSURFDUST(subs)
    757   MTOT(i,j) = comm_MTOT(subs)
    758   ICETOT(i,j) = comm_ICETOT(subs)
    759   TAU_ICE(i,j) = comm_TAU_ICE(subs)
    760   HR_SW(i,kps:kpe,j) = comm_HR_SW(subs,kps:kpe)
    761   HR_LW(i,kps:kpe,j) = comm_HR_LW(subs,kps:kpe)
    762   RDUST(i,kps:kpe,j) = comm_RDUST(subs,kps:kpe)
    763   VMR_ICE(i,kps:kpe,j) = comm_VMR_ICE(subs,kps:kpe)
    764   RICE(i,kps:kpe,j) = comm_RICE(subs,kps:kpe)
    765 
    766 ENDDO
    767 ENDDO
    768 
    769 CALL deallocate_comm_wrf
    770 
     736!!!
     737CALL update_outputs_physiq_diag( &
     738            ims,ime,jms,jme,kms,kme,&
     739            ips,ipe,jps,jpe,kps,kpe,&
     740            SWDOWNZ,TAU_DUST,QSURFDUST,&
     741            MTOT,ICETOT,TAU_ICE,&
     742            HR_SW,HR_LW,&
     743            RDUST,VMR_ICE,RICE)
     744!!!
    771745ENDIF call_physics
    772746
Note: See TracChangeset for help on using the changeset viewer.