Changeset 2952 for trunk/LMDZ.MARS


Ignore:
Timestamp:
Apr 28, 2023, 2:28:08 PM (19 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
Files:
4 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
  • trunk/LMDZ.MARS/libf/phymars/comsoil_h.F90

    r2951 r2952  
    8484    allocate(alph(ngrid,nsoilmx-1,nslope))
    8585    allocate(beta(ngrid,nsoilmx-1,nslope))
     86    allocate(flux_geo(ngrid,nslope))
    8687 
    8788  end subroutine ini_comsoil_h_slope_var
     
    99100    if (allocated(alph)) deallocate(alph)
    100101    if (allocated(beta)) deallocate(beta)
     102    if (allocated(flux_geo)) deallocate(flux_geo)
    101103
    102104  end subroutine end_comsoil_h_slope_var
  • trunk/LMDZ.MARS/libf/phymars/iostart.F90

    r2946 r2952  
    836836            ierr=NF90_REDEF(nid_restart)
    837837#ifdef NC_DOUBLE
    838             if(field_name.eq. "tsoil") then
     838            if(field_name.eq. "tsoil".or. field_name.eq. "inertiesoil") then
    839839            ierr=NF90_DEF_VAR(nid_restart,field_name,NF90_DOUBLE,&
    840840                              (/idim2,idim3,idim8,idim7/),nvarid)
     
    844844            endif
    845845#else
    846             if(field_name.eq. "tsoil") then
     846            if(field_name.eq. "tsoil".or. field_name.eq. "inertiesoil") then
    847847            ierr=NF90_DEF_VAR(nid_restart,field_name,NF90_FLOAT,&
    848848                              (/idim2,idim3,idim8,idim7/),nvarid)
     
    10151015          IF (LEN_TRIM(title) > 0) ierr=NF90_PUT_ATT(nid_restart,nvarid,"title",title)
    10161016          ierr=NF90_ENDDEF(nid_restart)
    1017          
    10181017          firsttime=.false.
    10191018          if(first_time1d) first_time1d=.false.
Note: See TracChangeset for help on using the changeset viewer.