Ignore:
Timestamp:
Apr 28, 2023, 2:28:08 PM (20 months ago)
Author:
romain.vande
Message:

Mars PCM + newstart + start_archive: Correct writing of variables inertiesoil and fluxgeo following r2919 and r2942
RV

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

Legend:

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

    r2943 r2952  
    3232     &               ini_surfdat_h_slope_var,end_surfdat_h_slope_var
    3333      use comsoil_h, only: inertiedat, inertiesoil,layer, mlayer,
    34      & nsoilmx, tsoil,ini_comsoil_h_slope_var, end_comsoil_h_slope_var
     34     & nsoilmx,tsoil,ini_comsoil_h_slope_var, end_comsoil_h_slope_var,
     35     & flux_geo
    3536      use control_mod, only: day_step, iphysiq, anneeref, planet_type
    3637      use geometry_mod, only: longitude,latitude,cell_area
     
    196197      REAL,ALLOCATABLE :: watercap_old_slope(:,:) ! Surface water ice (kg.m-2)
    197198      REAL,ALLOCATABLE :: tsoil_old_slope(:,:,:)
     199      REAL,ALLOCATABLE :: inertiesoil_old_slope(:,:,:)
    198200      REAL,ALLOCATABLE :: albedo_old_slope(:,:,:) ! Surface albedo in each solar band
     201      REAL,ALLOCATABLE :: flux_geo_old_slope(:,:)
    199202      integer :: iflat
    200203      integer :: nslope_old, nslope_new
     
    17981801        allocate(watercap_old_slope(ngridmx,nslope_old))
    17991802
     1803
    18001804        tsurf_old_slope(:,:)=tsurf(:,:)
    18011805        qsurf_old_slope(:,:,:)=qsurf(:,:,:)
     
    18091813
    18101814        allocate(tsoil_old_slope(ngridmx,nsoilmx,nslope_old))
    1811 
     1815        allocate(inertiesoil_old_slope(ngridmx,nsoilmx,nslope_old))
     1816        allocate(flux_geo_old_slope(ngridmx,nslope_old))
     1817
     1818        inertiesoil_old_slope(:,:,:)=inertiesoil(:,:,:)
    18121819        tsoil_old_slope(:,:,:)=tsoil(:,:,:)
     1820        flux_geo_old_slope(:,:)=flux_geo(:,:)
    18131821
    18141822        call end_comsoil_h_slope_var
     
    18311839             tsoil(:,:,islope)=tsoil_old_slope(:,:,1)
    18321840             albedo(:,:,islope)=albedo_old_slope(:,:,1)
     1841             inertiesoil(:,:,islope)=inertiesoil_old_slope(:,:,1)
     1842             flux_geo(:,islope)=flux_geo_old_slope(:,1)
    18331843          enddo
    18341844        elseif(nslope_new.eq.1) then
     
    18391849             tsoil(:,:,1)=tsoil_old_slope(:,:,iflat)
    18401850             albedo(:,:,1)=albedo_old_slope(:,:,iflat)
     1851             inertiesoil(:,:,1)=inertiesoil_old_slope(:,:,iflat)
     1852             flux_geo(:,1)=flux_geo_old_slope(:,iflat)
    18411853        elseif(nslope_old.eq.5 .and. nslope_new.eq.7) then
    18421854          do islope=1,nslope_new
     
    18471859             tsoil(:,:,islope)=tsoil_old_slope(:,:,iflat)
    18481860             albedo(:,:,islope)=albedo_old_slope(:,:,iflat)
     1861             inertiesoil(:,:,islope)=inertiesoil_old_slope(:,:,iflat)
     1862             flux_geo(:,islope)=flux_geo_old_slope(:,iflat)
    18491863          enddo
    18501864        elseif(nslope_old.eq.7 .and. nslope_new.eq.5) then
     
    18561870             tsoil(:,:,islope)=tsoil_old_slope(:,:,iflat)
    18571871             albedo(:,:,islope)=albedo_old_slope(:,:,iflat)
     1872             inertiesoil(:,:,islope)=inertiesoil_old_slope(:,:,iflat)
     1873             flux_geo(:,islope)=flux_geo_old_slope(:,iflat)
    18581874          enddo
    18591875        else
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/write_archive.F

    r2943 r2952  
    126126        ierr=NF_INQ_VARID(nid,nom,varid)
    127127
    128         if(nom.eq."tsoil") then
     128        if(nom.eq."tsoil" .or. nom.eq."inertiesoil") then
    129129
    130130         if (ierr.ne.NF_NOERR) then ! variable not defined yet
Note: See TracChangeset for help on using the changeset viewer.