Ignore:
Timestamp:
Apr 14, 2020, 10:41:14 AM (5 years ago)
Author:
adelavois
Message:

MARS GCM:
Minor update of revision 2281 in order to run martian physics with callsoil option when no startfi.nc

File:
1 edited

Legend:

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

    r2282 r2285  
    3636     &                      igcm_topdust_number
    3737      use comsoil_h, only: inertiedat, ! soil thermal inertia
    38      &                     tsoil, nsoilmx ! number of subsurface layers
     38     &                     tsoil, nsoilmx,!number of subsurface layers
     39     &                     mlayer,layer ! soil mid layer depths
    3940      use geometry_mod, only: longitude, latitude, cell_area,
    4041     &                        longitude_deg
     
    479480      REAL hsummit(ngrid)
    480481
     482c when no startfi file is asked for init
     483      real alpha,lay1 ! coefficients for building layers
     484      integer iloop
     485
    481486!      LOGICAL startphy_file
    482487
     
    517522     &         mem_Mccn_co2,mem_Nccn_co2,
    518523     &         mem_Mh2o_co2,watercap)
     524
    519525
    520526#else
     
    541547           ! starting without startfi.nc and with callsoil
    542548           ! is not yet possible as soildepth default is not defined
    543            if (callsoil) then
    544               call abort_physic("physiq","callsoil option is not",
    545      &                     "yet available without startfi",1)
     549           if (callsoil) then                     
     550              ! default mlayer distribution, following a power law:
     551              !  mlayer(k)=lay1*alpha**(k-1/2)
     552              lay1=2.e-4
     553              alpha=2
     554              do iloop=0,nsoilmx-1
     555                 mlayer(iloop)=lay1*(alpha**(iloop-0.5))
     556              enddo
     557              lay1=sqrt(mlayer(0)*mlayer(1))
     558              alpha=mlayer(1)/mlayer(0)
     559              do iloop=1,nsoilmx
     560                 layer(iloop)=lay1*(alpha**(iloop-1))
     561              enddo
    546562           endif
    547563           ! additionnal "academic" initialization of physics
     
    558574        endif
    559575#endif
    560 
    561576         if (pday.ne.day_ini) then
    562577           write(*,*) "PHYSIQ: ERROR: bad synchronization between ",
Note: See TracChangeset for help on using the changeset viewer.