Ignore:
Timestamp:
Aug 30, 2016, 3:04:29 PM (8 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
Files:
5 added
5 edited

Legend:

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

    r1586 r1590  
    644644     &        ,KM_OPT=config_flags%km_opt         &
    645645     &        ,HISTORY_INTERVAL=model_config_rec%history_interval(1)  &
    646 #ifndef NOPHYS
    647646          !------------------!
    648647          ! OUTPUT VARIABLES !
     
    667666#include "module_lmd_driver_output4.inc"
    668667#endif
    669 #endif
    670668     &        ,SLPX=grid%slpx,SLPY=grid%slpy,RESTART=config_flags%restart)
    671669ENDIF
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/SCRIPTS/copy_model

    r1588 r1590  
    4747ln -sf $WRFSRC/WRFV2/call_meso_inifis?.inc .
    4848ln -sf $WRFSRC/WRFV2/call_meso_physiq?.inc .
    49 
    50 sed s+"YORGLYORGL"+"$laphysiq"+g $WRFSRC/WRFV2/physics.sed > physics.sed
    5149
    5250#\rm meso_dimphys.h
     
    139137mkdir external/io_mcel
    140138ln -sf $WRFSRC/WRFV2/external/io_mcel/* external/io_mcel/
    141 mkdir $laphysiq
    142 mkdir $laphysiq/libf
    143 ln -sf $WRFSRC/WRFV2/$laphysiq/makegcm* $laphysiq/
    144 ln -sf $WRFSRC/WRFV2/$laphysiq/meso_dimphys.h* $laphysiq/
    145 ln -sf $WRFSRC/WRFV2/$laphysiq/create_make_gcm $laphysiq/
    146 #ln -sf $WRFSRC/WRFV2/$laphysiq/makefile $laphysiq/
    147 ln -sf $WRFSRC/WRFV2/$laphysiq/libf/duplicate* $laphysiq/libf/
    148 ln -sf $WRFSRC/WRFV2/$laphysiq/libf/generate* $laphysiq/libf/
    149139
    150 mkdir $laphysiq/libf/grid
    151 ln -sf $WRFSRC/WRFV2/$laphysiq/libf/grid/* $laphysiq/libf/grid/
    152 mkdir $laphysiq/libf/phymars
    153 ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phymars/* $laphysiq/libf/phymars/
    154 ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phy_common/* $laphysiq/libf/phymars/
    155 mkdir $laphysiq/libf/dyn3d
    156 ln -sf $WRFSRC/WRFV2/$laphysiq/libf/dyn3d/* $laphysiq/libf/dyn3d/
    157 mkdir $laphysiq/libf/aeronomars
    158 ln -sf $WRFSRC/WRFV2/$laphysiq/libf/aeronomars/* $laphysiq/libf/aeronomars/
    159 mkdir $laphysiq/libf/bibio
    160 ln -sf $WRFSRC/WRFV2/$laphysiq/libf/bibio/* $laphysiq/libf/bibio/
    161 mkdir $laphysiq/libo
    162 #touch $laphysiq/makefile
     140if [[ "${laphysiq}" == *"void"* ]]
     141then
     142
     143  ## case with no physics
     144  rm -f physics.sed
     145  touch physics.sed
     146
     147else
     148
     149  ## case with physics
     150  mkdir $laphysiq
     151  mkdir $laphysiq/libf
     152  ln -sf $WRFSRC/WRFV2/$laphysiq/makegcm* $laphysiq/
     153  ln -sf $WRFSRC/WRFV2/$laphysiq/meso_dimphys.h* $laphysiq/
     154  ln -sf $WRFSRC/WRFV2/$laphysiq/create_make_gcm $laphysiq/
     155  #ln -sf $WRFSRC/WRFV2/$laphysiq/makefile $laphysiq/
     156  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/duplicate* $laphysiq/libf/
     157  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/generate* $laphysiq/libf/
     158
     159  mkdir $laphysiq/libf/grid
     160  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/grid/* $laphysiq/libf/grid/
     161  mkdir $laphysiq/libf/phymars
     162  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phymars/* $laphysiq/libf/phymars/
     163  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phy_common/* $laphysiq/libf/phymars/
     164  mkdir $laphysiq/libf/dyn3d
     165  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/dyn3d/* $laphysiq/libf/dyn3d/
     166  mkdir $laphysiq/libf/aeronomars
     167  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/aeronomars/* $laphysiq/libf/aeronomars/
     168  mkdir $laphysiq/libf/bibio
     169  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/bibio/* $laphysiq/libf/bibio/
     170  mkdir $laphysiq/libo
     171  #touch $laphysiq/makefile
     172
     173  \rm $laphysiq/libf/phymars/dimphys.h
     174
     175  sed s+"YORGLYORGL"+"$laphysiq"+g $WRFSRC/WRFV2/physics.sed > physics.sed
     176fi
    163177
    164178mkdir test
     
    167181ln -sf $WRFSRC/WRFV2/test/em_real/* test/em_real/
    168182
    169 cd $laphysiq/libf/phymars/
    170 \rm dimphys.h
    171 #ln -sf ../../../meso_dimphys.h dimphys.h
    172 cd ../../..
    173 
    174183echo '*** end'
    175184
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F

    r1584 r1590  
    886886     &        ,KM_OPT=config_flags%km_opt         &
    887887     &        ,HISTORY_INTERVAL=model_config_rec%history_interval(1)  &
    888 #ifndef NOPHYS
    889888          !------------------!
    890889          ! OUTPUT VARIABLES !
     
    908907#else
    909908#include "module_lmd_driver_output4.inc"
    910 #endif
    911909#endif
    912910     &        ,SLPX=grid%slpx,SLPY=grid%slpy,RESTART=config_flags%restart)
  • 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.