Ignore:
Timestamp:
Apr 17, 2023, 12:07:33 PM (19 months ago)
Author:
llange
Message:

Mars PCM
Following r-2942: Fix a bug in newstart when rewriting inertiesoil. Inertiesoil is now also managed in startarchive.
When using startarchive or newstart, inertiesoil is set to inertiedat.
LL

File:
1 edited

Legend:

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

    r2913 r2943  
    6666      REAL,ALLOCATABLE :: tsurf(:,:)        ! Surface temperature
    6767      REAL,ALLOCATABLE :: tsoil(:,:,:) ! Soil temperature
     68      REAL,ALLOCATABLE :: inertiesoil(:,:,:) ! Soil thermal inertia (!= inertiedat which is for present day climate)
    6869      REAL,ALLOCATABLE :: watercap(:,:)        ! h2o ice layer
    6970      REAL :: tauscaling(ngridmx) ! dust conversion factor
     
    8384      REAL,ALLOCATABLE :: tsurfS(:,:)
    8485      REAL,ALLOCATABLE :: tsoilS(:,:,:)
    85       REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia
     86      REAL,ALLOCATABLE :: inertiesoilS(:,:,:)! Variable Soil Thermal Inertia  (obtained from PEM)
     87      REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia for inertie dat (present day climate)
    8688      REAL,ALLOCATABLE :: watercapS(:,:)
    8789      REAL :: tauscalingS(ip1jmp1)
     
    165167      allocate(tsurf(ngridmx,nslope))
    166168      allocate(tsoil(ngridmx,nsoilmx,nslope))
     169      allocate(inertiesoil(ngridmx,nsoilmx,nslope))
    167170      allocate(watercap(ngridmx,nslope))
    168171      allocate(emis(ngridmx,nslope))
     
    172175      allocate(tsurfS(ip1jmp1,nslope))
    173176      allocate(tsoilS(ip1jmp1,nsoilmx,nslope))
     177      allocate(inertiesoilS(ip1jmp1,nsoilmx,nslope))
    174178      allocate(watercapS(ip1jmp1,nslope))
    175179      allocate(emisS(ip1jmp1,nslope))
     
    264268c watercap --> watercapS
    265269c tsoil --> tsoilS
     270c inertiesoil --> inertiesoilS
    266271c inertiedat --> ithS
    267272c emis --> emisS
     
    281286      call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,tsoil(:,:,islope),
    282287     &    tsoilS(:,:,islope))
     288      call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,inertiesoil(:,:,islope),
     289     &    inertiesoil(:,:,islope))
    283290      ! Note: thermal inertia "inertiedat" is in comsoil.h
    284291      call gr_fi_dyn(1,ngridmx,iip1,jjp1,emis(:,islope),
     
    451458      call write_archive(nid,ntime,'tsoil','Soil temperature',
    452459     &     'K',-3,tsoilS(:,:,:))
    453 
    454460! Write soil thermal inertia
    455       call write_archive(nid,ntime,'inertiedat',
     461      call write_archive(nid,ntime,'inertiesoil','Soil TI',
     462     &     'J.s-1/2.m-2.K-1',-3,inertiesoilS(:,:,:))
     463! Write soil thermal inertia for current climate
     464      call write_archive(nid,ntime,'inertiedat - present day TI',
    456465     &     'Soil thermal inertia',
    457466     &     'J.s-1/2.m-2.K-1',-3,ithS)
Note: See TracChangeset for help on using the changeset viewer.