Changeset 2926


Ignore:
Timestamp:
Mar 31, 2023, 11:48:38 AM (21 months ago)
Author:
romain.vande
Message:

1D Mars PCM:
Following r2924, the 1D model always output a restarfi
RV

Location:
trunk/LMDZ.MARS
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2924 r2926  
    39703970+ Minor correction of iostart error message.
    39713971
     3972==31/03/2023 == RV
     3973The 1D model always output a restarfi
     3974
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F

    r2924 r2926  
    686686     
    687687
    688 
    689 
    690688! Initialize soil properties and temperature
    691689! ------------------------------------------
     
    792790     &              tsurf,tsoil,albedo,emis,q2,qsurf,tauscaling,
    793791     &              totcloudfrac,wstar,watercap)
    794       else
    795          CALL phyetat0 ("startfi.nc",0,0,
    796      &         nsoilmx,ngrid,nlayer,nq,
    797      &         day0,time,
    798      &         tsurf,tsoil,albedo_read,emis,
    799      &         q2,qsurf,tauscaling,totcloudfrac,wstar,
    800      &         watercap,def_slope,def_slope_mean,subslope_dist)
    801          day=real(day0)
    802          albedo(1,1)=albedo_read(1,1,1)
    803792      endif !(.not. startfile_1D )
    804793
     
    950939        CALL endg1d(1,nlayer,zlay/1000.,ndt)
    951940
    952 c      if(startfile_1D) then
    953 c       call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid,
    954 c     &              llm,nq,dtphys,float(day0),0.,cell_area,
    955 c     &              albedodat,inertiedat,def_slope,subslope_dist)
    956 c       call physdem1("restartfi.nc",nsoilmx,ngrid,llm,nq,
    957 c     &              dtphys,time,
    958 c     &              tsurf,tsoil,albedo,emis,q2,qsurf,tauscaling,
    959 c     &              totcloudfrac,wstar,watercap)
    960 c      endif! startfile_1D
    961 
    962941      write(*,*) "testphys1d: Everything is cool."
    963942
  • trunk/LMDZ.MARS/libf/phymars/iostart.F90

    r2924 r2926  
    55    INTEGER,SAVE :: nid_start ! NetCDF file identifier for startfi.nc file
    66    INTEGER,SAVE :: nid_restart ! NetCDF file identifier for restartfi.nc file
     7    LOGICAL,SAVE :: first_time1d=.false.
    78   
    89    ! restartfi.nc file dimension identifiers: (see open_restartphy())
     
    472473    INTEGER                     :: ierr
    473474    LOGICAL,SAVE :: already_created=.false.
     475    LOGICAL,SAVE :: already_created_restarfi_1d=.false.
     476
     477      if(klon_glo.eq.1 .and. filename.eq."restartfi.nc" .and. .not.already_created_restarfi_1d) then
     478        already_created=.false.
     479        already_created_restarfi_1d=.true.
     480        first_time1d=.true.
     481      endif
    474482   
    475483    IF (is_master) THEN
     
    9951003      IF (var_name=="Time") THEN
    9961004        ! Very specific case of "Time" variable
    997         if (firsttime) then
     1005        if (firsttime .or. first_time1d) then
    9981006          ! Create the "Time variable"
    9991007          ierr=NF90_REDEF(nid_restart)
     
    10091017         
    10101018          firsttime=.false.
     1019          if(first_time1d) first_time1d=.false.
    10111020        endif
    10121021        ! Append "time" value
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2924 r2926  
    545545
    546546      logical :: write_restart
    547       logical,save :: startfile_1D
    548547
    549548c=======================================================================
     
    749748
    750749#ifndef MESOSCALE
    751       startfile_1D=.false.
    752       call getin("startfile_1D",startfile_1D)
    753          if (ngrid.ne.1 .or. startfile_1D) then
     750         if(ngrid.ne.1) then
    754751           ! no need to compute slopes when in 1D; it is an input
    755            if (callslope) call getslopes(ngrid,phisfi)
    756            ! no need to create a restart file in 1d
     752         if (callslope) call getslopes(ngrid,phisfi)
     753         endif !1D
    757754         if (ecritstart.GT.0) then
    758755             call physdem0("restartfi.nc",longitude,latitude,
     
    768765     &                   subslope_dist)
    769766          endif
    770          endif
    771767
    772768c        Initialize mountain mesh fraction for the entrainment by top flows param.
     
    25512547c        ----------------------------------------------------------
    25522548
    2553         IF (startfile_1D) THEN
    2554 
    25552549#ifndef MESOSCALE
    25562550c        -------------------------------------------------------------------
     
    26152609
    26162610#endif
    2617 
    2618          ENDIF ! startfile_1D
    26192611
    26202612         IF (ngrid.NE.1) then
Note: See TracChangeset for help on using the changeset viewer.