Ignore:
Timestamp:
Jul 5, 2022, 11:56:26 PM (2 years ago)
Author:
aslmd
Message:

small bug fix on the name of in WRF planet_type check callphysi_mod for Titan

MESOSCALE interface: modifications of local time management for idealized studies (LES) of Titan. removed undefined variables pday ptime.

MESOSCALE. Titan. bug fix: added a test to set surface roughness to a default value in case it is not set thus zero. moved the setting of Z0 outside the loop since it is not (yet?) varying with space in the Titan model

MESOSCALE. Titan. adding a comment for future work in turb_mod

added missing implicit none and kps kpe (found by comparing with updata_outputs from Mars). a couple cosmetic spaces to have something closer to Mars for comparisons.

added diagnostics in update_outputs that were sent to comm_wrf module but not invoked in update_outputs to be available for I/O

alternate computation of sensible heat flux in Titan LES. equivalent to Mars. results are strictly similar to what could be obtained within vdifc or turbdiff computations.

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

Legend:

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

    r2295 r2742  
    3030! Sanity check on physics package type
    3131  IF (debut_split) THEN
    32     IF (planet_type.ne."generic") THEN
     32    IF (planet_type.ne."titan") THEN
    3333     PRINT*,"wrong planet_type for this physics package"
    3434     STOP
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_titan_lmd_new/update_inputs_physiq_mod.F

    r2367 r2742  
    2020            lct_input,lon_input,ls_input,&
    2121            MY)
     22
    2223  USE variables_mod, only: JD_cur,JH_cur_split,phour_ini
    23   use callkeys_mod, only : tlocked
     24  !use callkeys_mod, only : tlocked
     25  !! JD_cur <> pday ! Julian day
     26  !! JH_cur_split <> ptime ! Julian hour (fraction of day)
     27
    2428  INTEGER, INTENT(IN) :: JULDAY, JULYR
    2529  REAL, INTENT(IN) :: GMT,elaps,lon_input,ls_input,lct_input
    2630  REAL,INTENT(OUT) :: MY
    27   REAL :: sec,nsec
    28  
     31
    2932  IF (JULYR .ne. 9999) THEN
     33    !
     34    ! specified
     35    !
    3036    JH_cur_split = (GMT + elaps/57420.) !! universal time (0<JH_cur_split<1): JH_cur_split=0.5 at 12:00 UT
    3137    JH_cur_split = MODULO(JH_cur_split,24.)   !! the two arguments of MODULO must be of the same type
     
    3642    MY = INT(MY)
    3743  ELSE
     44    !
     45    ! idealized
     46    !
    3847    JH_cur_split = lct_input - lon_input / 15. + elaps/57420.0
    39     JD_cur =  INT((57420.0*(lct_input - lon_input / 15.) + elaps)/1378080)
    40     JH_cur_split = MODULO(ptime,24.)
     48    JH_cur_split = MODULO(JH_cur_split,24.)
    4149    JH_cur_split = JH_cur_split / 24.
    42     JD_cur = MODULO(int(pday),365)
     50    JD_cur = INT((57420.0*(lct_input - lon_input / 15.) + elaps)/1378080) !! ls2sol???
     51    JD_cur = MODULO(int(pday),365) !! 365 to be changed
    4352    MY = 2024
     53    !day_ini = floor(ls2sol(ls_input)) !! JD_cur at firstcall is day_ini
    4454  ENDIF
     55  print *,'** Titan ** TIME IS', JD_cur, JH_cur_split*24.
    4556
    4657END SUBROUTINE update_inputs_physiq_time
     
    303314   REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN   )  :: M_GW 
    304315
     316   !! TITAN: constant surface roughness
     317   !! see below commented part if varying is needed
     318   z0 = CST_Z0
     319   IF (z0 == 0.) THEN
     320       PRINT *, 'WELL, z0 is 0, this is no good. Setting to default value from Tokano 2006'
     321       z0 = 0.005 ! (m) value for Huygens landing site from Tokano 2006
     322   ENDIF
     323
    305324   !print*,'ALLOCATED(phisfi)',ALLOCATED(phisfi)
    306325   !print*,'size phisfi',size(phisfi)
     
    347366     ! Variable surface roughness !
    348367     !----------------------------!
    349      z0 = CST_Z0
    350368     !IF (JULYR .ne. 9999) THEN
    351369     ! IF (CST_Z0 == 0) THEN
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_titan_lmd_new/update_outputs_physiq_mod.F

    r2295 r2742  
    1414   !use surfdat_h, only: tsurf, co2ice, qsurf
    1515   use phys_state_var_mod, only : tsurf,qsurf
     16   implicit none
    1617
    1718   INTEGER, INTENT(IN) :: ims,ime,jms,jme
     
    5051   !use comsoil_h, only: tsoil
    5152    use phys_state_var_mod, only : tsoil
     53   implicit none
    5254
    5355   INTEGER, INTENT(IN) :: ims,ime,jms,jme
     
    8486   !use dimradmars_mod, only: fluxrad
    8587   use phys_state_var_mod, only : fluxrad
     88   implicit none
    8689
    8790   INTEGER, INTENT(IN) :: ims,ime,jms,jme
     
    119122                        !hfmax_th,zmax_th
    120123   !use phys_state_var_mod, only : q2,sensibFlux
     124   implicit none
    121125
    122126   INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme
    123    INTEGER, INTENT(IN) :: ips,ipe,jps,jpe
    124    INTEGER :: i,j,subs   
     127   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,kps,kpe
     128   INTEGER :: i,j,subs
    125129   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT)  :: &
    126130     M_WSTAR,HFMAX,ZMAX,USTM,HFX
    127131   REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT) :: M_Q2
    128  
     132
    129133   DO j = jps,jpe
    130134   DO i = ips,ipe
     
    140144     M_Q2(i,kps:kpe+1,j) = q2(subs,:)
    141145     M_WSTAR(i,j) = wstar(subs)
     146
    142147     !! output only (arrays already in phys modules)
    143148     !HFMAX(i,j) = HFMAX_TH(subs)
    144149     !ZMAX(i,j) = ZMAX_TH(subs)
    145150     USTM(i,j) = ustar(subs)
    146      HFX(i,j) = sensibFlux(subs) ! *-1 ?????
     151     HFX(i,j) = sensibFlux(subs) !! test like Mars
     152     !!! sensible heat flux
     153     !!! ... minus sign important because
     154     !!! ... in physics sensibFlux is AtmToSurf_TurbFlux
     155     !HFX(i,j) = -sensibFlux(subs)
    147156
    148157   ENDDO
     
    163172            RAIN,SNOW,REEVAP,SURFRAIN,ALBEQ,FLUXTOP_DN,FLUXABS_SW,FLUXTOP_LW,FLUXSURF_SW,&
    164173            FLUXSURF_LW,FLXGRD,LSCEZ,H2OICE_REFF,LATENT_HF)
    165 
     174   
    166175   USE comm_wrf !! to get fields to be written from physiq
    167176
     
    178187   INTEGER :: i,j,subs
    179188
     189
    180190   DO j = jps,jpe
    181191   DO i = ips,ipe
     
    189199     HR_SW(i,kps:kpe,j) = comm_HR_SW(subs,kps:kpe)
    190200     HR_LW(i,kps:kpe,j) = comm_HR_LW(subs,kps:kpe)
     201     FLUXTOP_DN(i,j)=comm_FLUXTOP_DN(subs)
     202     FLUXABS_SW(i,j)=comm_FLUXABS_SW(subs)
     203     FLUXTOP_LW(i,j)=comm_FLUXTOP_LW(subs)
     204     FLUXSURF_SW(i,j)=comm_FLUXSURF_SW(subs)
     205     FLUXSURF_LW(i,j)=comm_FLUXSURF_LW(subs)
     206     FLXGRD(i,j)=comm_FLXGRD(subs)
    191207
    192208   ENDDO
Note: See TracChangeset for help on using the changeset viewer.