Changeset 2943 for trunk/LMDZ.MARS


Ignore:
Timestamp:
Apr 17, 2023, 12:07:33 PM (20 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

Location:
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars
Files:
5 edited

Legend:

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

    r2935 r2943  
    11      SUBROUTINE lect_start_archive(ngrid,nlayer,nqtot,
    2      &     date,tsurf,tsoil,albedo,emis,q2,
     2     &     date,tsurf,tsoil,inertiesoil,albedo,emis,q2,
    33     &     t,ucov,vcov,ps,h,phisold_newgrid,
    44     &     q,qsurf,tauscaling,totcloudfrac,surfith,nid,
     
    4949      REAL,INTENT(OUT) :: tsurf(ngrid,nslope) ! surface temperature
    5050      REAL,INTENT(OUT) :: tsoil(ngrid,nsoilmx,nslope) ! soil temperature
     51      REAL,INTENT(OUT) :: inertiesoil(ngrid,nsoilmx,nslope) ! soil thermal inertia
    5152      REAL,INTENT(OUT) :: albedo(ngrid,2,nslope) ! surface albedo
    5253      REAL,INTENT(OUT) :: emis(ngrid,nslope) ! ground emissivity
     
    218219      integer :: ndims
    219220      integer, dimension(:), allocatable :: dimids
     221      integer :: islope
    220222c=======================================================================
    221223
     
    13541356     &                  inertiedatS,inertiedat)
    13551357     
     1358
     1359      do islope = 1,nslope
     1360       inertiesoil(:,:,islope) = inertiedat(:,:)
     1361      enddo
    13561362c-----------------------------------------------------------------------
    13571363c 6.2.2 Soil temperature
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F

    r2942 r2943  
    437437        write(*,*) 'Reading file START_ARCHIVE'
    438438        CALL lect_start_archive(ngridmx,llm,nqtot,
    439      &   date,tsurf,tsoil,albedo,emis,q2,
     439     &   date,tsurf,tsoil,inertiesoil,albedo,emis,q2,
    440440     &   t,ucov,vcov,ps,teta,phisold_newgrid,q,qsurf,
    441441     &   tauscaling,totcloudfrac,surfith,nid,watercap)
     
    19841984      call physdem1("restartfi.nc",nsoilmx,ngridmx,llm,nqtot,
    19851985     &              dtphys,hour_ini,
    1986      &              tsurf,tsoil,albedo,emis,q2,qsurf,tauscaling,
    1987      &              totcloudfrac,wstar,watercap)
     1986     &              tsurf,tsoil,inertiesoil,albedo,emis,q2,qsurf,
     1987     &              tauscaling,totcloudfrac,wstar,watercap)
    19881988
    19891989c=======================================================================
  • 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)
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive_SSO.F

    r2914 r2943  
    6969      REAL,ALLOCATABLE :: tsurf(:,:)        ! Surface temperature
    7070      REAL,ALLOCATABLE :: tsoil(:,:,:) ! Soil temperature
     71      REAL,ALLOCATABLE :: inertiesoil(:,:,:) ! Soil thermal inertia (!= inertiedat which is for present day climate)
    7172      REAL,ALLOCATABLE :: watercap(:,:)        ! h2o ice layer
    7273      REAL tauscaling(ngridmx) ! dust conversion factor
     
    8990      REAL,ALLOCATABLE :: tsurfS(:,:)
    9091      REAL,ALLOCATABLE :: tsoilS(:,:,:)
    91       REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia
     92      REAL,ALLOCATABLE :: inertiesoilS(:,:,:)! Variable Soil Thermal Inertia  (obtained from PEM)
     93      REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia for inertie dat (present day climate)
    9294      REAL,ALLOCATABLE :: watercapS(:,:)
    9395      REAL tauscalingS(ip1jmp1)
     
    183185      allocate(tsurf(ngridmx,nslope))
    184186      allocate(tsoil(ngridmx,nsoilmx,nslope))
     187      allocate(inertiesoil(ngridmx,nsoilmx,nslope))
    185188      allocate(watercap(ngridmx,nslope))
    186189      allocate(emis(ngridmx,nslope))
     
    190193      allocate(tsurfS(ip1jmp1,nslope))
    191194      allocate(tsoilS(ip1jmp1,nsoilmx,nslope))
     195      allocate(inertiesoilS(ip1jmp1,nsoilmx,nslope))
    192196      allocate(watercapS(ip1jmp1,nslope))
    193197      allocate(emisS(ip1jmp1,nslope))
     
    281285c tsurf --> tsurfS
    282286c tsoil --> tsoilS
     287c inertiesoil ---> inertiesoilS
    283288c emis --> emisS
    284289c q2 --> q2S
     
    296301      call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,tsoil(:,:,islope),
    297302     &    tsoilS(:,:,islope))
     303      call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,inertiesoil(:,:,islope),
     304     &    inertiesoil(:,:,islope))
    298305      ! Note: thermal inertia "inertiedat" is in comsoil.h
    299306      call gr_fi_dyn(1,ngridmx,iip1,jjp1,emis(:,islope),
     
    490497      call write_archive(nid,ntime,'tsoil','Soil temperature',
    491498     &     'K',-3,tsoilS(:,:,:))
    492 
    493499! Write soil thermal inertia
     500      call write_archive(nid,ntime,'inertiesoil','Soil TI',
     501     &     'J.s-1/2.m-2.K-1',-3,inertiesoilS(:,:,:))
     502! Write soil thermal inertia for current climate
    494503      call write_archive(nid,ntime,'inertiedat',
    495504     &     'Soil thermal inertia',
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/write_archive.F

    r2914 r2943  
    8181
    8282! Creation de la variable si elle n'existait pas
    83 
     83                   
    8484              write (*,*) "====================="
    8585              write (*,*) "creation de ",nom
     
    224224     &        nom.eq."ps" .or. nom.eq."q2surf" .or. nom.eq."ZMEA" .or.
    225225     &        nom.eq."ZSTD" .or. nom.eq."ZSIG" .or. nom.eq."ZTHE" .or.
    226      &        nom.eq."ZGAM" .or. nom.eq."albedodat" .or. 
     226     &        nom.eq."ZGAM" .or. nom.eq."albedodat" .or.
    227227     &        nom.eq."z0" .or. nom.eq."summit" .or. nom.eq."hmons"
    228228     &        .or. nom.eq."base") then
     
    238238              write (*,*) "====================="
    239239              write (*,*) "creation de ",nom
    240 
    241240              call def_var(nid,nom,titre,unite,3,id,varid,ierr)
    242241
     
    276275              write (*,*) "====================="
    277276              write (*,*) "creation de ",nom
    278 
    279277              call def_var(nid,nom,titre,unite,4,id,varid,ierr)
    280278
     
    323321              write (*,*) "====================="
    324322              write (*,*) "creation de ",nom
    325 
    326323              call def_var(nid,nom,titre,unite,1,id,varid,ierr)
    327324
Note: See TracChangeset for help on using the changeset viewer.