Ignore:
Timestamp:
May 11, 2023, 5:40:03 PM (20 months ago)
Author:
romain.vande
Message:

Mars PEM :

Adapt PEM to the subslope PCM configuration, it is now fully compatible.

Create a PEM folder in deftank that contains:

run_pem1: a bash file that runs chained simulation of PEM as well as running a parameterizable number of PCM simulation in between.

It also takes care of reshaping XIOS output as well as renaming outputs etc… in the spirit of run_month1.

It is written for Irene machine and the header needs to be adapted for other machines.

run_PEM.def: A text file that shows the possible parameters to choose before a PEM simulation.

It should be included at the end of run.def just like callphys.def

ob_ex_lsp.asc: An ascii file containing the obliquity, eccentricity, ls_peri data from Laskar in Martian year.
README: A txt file explaining the content of the folder

Adapt field_def_physics_mars.xml to consider the case with 7 subslopes in the PCM.
Change context_lmdz_physics.xml to be able to output the file needed by the PEM.

Correct a few other minor bugs.

RV

Location:
trunk/LMDZ.MARS/libf/phymars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/call_dayperi.F

    r2448 r2963  
    1717c   Lsperi      solar longitude (Ls) of perohelion (rad)
    1818c   e_elips       Excentricity
     19c   real year_day      ! number of sols per Mars yar
    1920c
    2021c   output
    2122c   ------
    2223c   dayperi       Martian date at perihelion (sol)
    23 c   real year_day      ! number of sols per Mars yar
     24
    2425c-----------------------------------------------------------------------
    2526
  • trunk/LMDZ.MARS/libf/phymars/iniorbit.F

    r1382 r2963  
    6868
    6969      timeperi=2.*atan(sqrt((1.+e_elips)/(1.-e_elips))*tan(zx0/2.))
     70      if(timeperi.lt.0) timeperi=-timeperi
    7071      PRINT*,'iniorbit: Perihelion solar long. Ls (deg)=',
    7172     &       360.-timeperi*180./pi
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2953 r2963  
    545545      logical :: write_restart
    546546
     547! Variable for ice table
     548      REAL :: rhowater_surf(ngrid,nslope)
     549      REAL :: rhowater_surf_sat(ngrid,nslope)
     550      REAL :: rhowater_soil(ngrid,nsoilmx,nslope)
     551      REAL,PARAMETER  :: alph_clap = -6143.7
     552      REAL,PARAMETER :: beta_clap = 28.9074
     553      REAL :: pvap_surf(ngrid)
     554      REAL,PARAMETER :: m_co2 = 44.01E-3  ! CO2 molecular mass (kg/mol)   
     555      REAL,PARAMETER :: m_noco2 = 33.37E-3  ! Non condensible mol mass (kg/mol)   
     556      REAL :: ztmp1,ztmp2
     557
    547558c=======================================================================
    548559      pdq(:,:,:) = 0.
     
    789800      call update_xios_timestep     
    790801#endif
     802
     803
    791804
    792805
     
    14981511             dwatercap(ig,:)=dwatercap(ig,:)+dwatercap_dif(ig,:)
    14991512          ENDDO
     1513
    15001514          call compute_meshgridavg(ngrid,nq,albedo,emis,tsurf,zdqsdif,
    15011515     &   albedo_meshavg,emis_meshavg,tsurf_meshavg,zdqsdif_meshavg_tmp)
     
    15591573           ENDDO
    15601574         ENDDO
     1575
    15611576         IF (turb_resolved) THEN
    15621577            write(*,*) 'Turbulent-resolving mode !'
     
    21602175      endif ! of if (callthermos)
    21612176#endif
     2177
    21622178c-----------------------------------------------------------------------
    21632179c   11. Carbon dioxide condensation-sublimation:
     
    38223838           endif !not.scavenging
    38233839        ENDIF ! of IF (water)
     3840
     3841! Output needed by the PEM
     3842          DO ig = 1,ngrid
     3843            ztmp1 =(1/m_co2 - 1/m_noco2)
     3844            ztmp2=1/m_noco2
     3845            pvap_surf(ig) = 1/(ztmp1*zq(ig,1,igcm_co2)+ztmp2)
     3846     &      * zq(ig,1,igcm_h2o_vap)/(mmol(igcm_h2o_vap)*1.e-3)*ps(ig)
     3847
     3848            DO islope = 1,nslope
     3849             rhowater_surf_sat(ig,islope)  =
     3850     &         exp(alph_clap/tsurf(ig,islope)+beta_clap)
     3851     &         / tsurf(ig,islope)
     3852 
     3853             if(qsurf(ig,igcm_h2o_ice,islope).gt.(1.e-4)) then
     3854               rhowater_surf(ig,islope) =
     3855     &         exp(alph_clap/tsurf(ig,islope)+beta_clap)
     3856     &         / tsurf(ig,islope)
     3857             else
     3858              rhowater_surf(ig,islope) = pvap_surf(ig)
     3859     &         / tsurf(ig,islope)
     3860             endif
     3861             DO isoil = 1,nsoilmx
     3862             rhowater_soil(ig,isoil,islope) =
     3863     &         exp(alph_clap/tsoil(ig,isoil,islope)+beta_clap)
     3864     &         / tsoil(ig,isoil,islope)
     3865             ENDDO
     3866          ENDDO
     3867        ENDDO
     3868
     3869      DO islope = 1,nslope
     3870        write(str2(1:2),'(i2.2)') islope
     3871        CALL send_xios_field("Waterdensity_soil_slope"//str2,
     3872     &     rhowater_soil(:,:,islope))
     3873        CALL send_xios_field("Waterdensity_surface"//str2,
     3874     &     rhowater_surf(:,islope))
     3875      ENDDO
     3876
     3877      CALL send_xios_field("h2o_layer1",zq(:,1,igcm_h2o_vap))
     3878      CALL send_xios_field("co2_layer1",zq(:,1,igcm_co2))
     3879
    38243880!PREVIOUSLY IN 1D ONLY
    38253881
  • trunk/LMDZ.MARS/libf/phymars/rocketduststorm_mod.F90

    r2953 r2963  
    532532                          'lapse rate in the rocket dust storm', &
    533533                                    'K/m',lapserate(:,:))
    534         call write_output('rds_deltahr', &
    535                           'extra heating rate in the rocket dust storm', &
    536                                     'K/s',deltahr(:,:))
     534!        call write_output('rds_deltahr', &
     535!                          'extra heating rate in the rocket dust storm', &
     536!                                    'K/s',deltahr(:,:))
    537537!        call write_output('scheme','which scheme',&
    538538!                                                   ' ',real(scheme(:)))
Note: See TracChangeset for help on using the changeset viewer.