Ignore:
Timestamp:
Sep 26, 2023, 6:10:40 PM (16 months ago)
Author:
jbclement
Message:

Mars PCM 1D:
Addition of the file "start1D.txt" which mimics a "start.nc" file to be able to run chained simulations in 1D. Like this, key variables and profiles can be got from one run to the next. As a consequence, the subroutine "write_profile.F90" is replaced by "writerestart1D.F90".
JBC

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/writerestart1D.F90

    r3050 r3051  
    1 SUBROUTINE writeprofile(nlev,profilename,surfdata,profiledata)
     1SUBROUTINE writerestart1D(psurf,tsurf,nlayer,temp,u,v,nq,qnames,qsurf,q)
    22
    33implicit none
    44
    5 ! arguments
    6 integer, intent(in)               :: nlev
    7 real, intent(in)                  :: surfdata
    8 real, dimension(nlev), intent(in) :: profiledata
    9 character(len = 30), intent(in)   :: profilename
     5! Arguments
     6integer, intent(in)                           :: nlayer, nq
     7real, intent(in)                              :: psurf, tsurf
     8real, dimension(nlayer), intent(in)           :: temp, u, v
     9real, dimension(nlayer,nq), intent(in)        :: q
     10real, dimension(nq), intent(in)               :: qsurf
     11character(len = *), dimension(nq), intent(in) :: qnames
    1012
    11 ! Local
    12 integer :: il
     13! Local variables
     14integer :: il, iq
    1315
    14 ! Write the data
    15 open(1,file = 'profile_out_'//trim(profilename),form = 'formatted')
    16 write(1,*) surfdata
    17 do il = 1,nlev
    18     write(1,*) profiledata(il)
     16! Write the data needed for a restart in "restart1D.txt"
     17open(1,file = 'restart1D.txt',status = "replace",action = "write")
     18do iq = 1,nq
     19    write(1,*) qnames(iq), qsurf(iq), (q(il,iq), il = 1,nlayer)
    1920enddo
     21write(1,*) 'ps', psurf
     22write(1,*) 'u', (u(il), il = 1,nlayer)
     23write(1,*) 'v', (v(il), il = 1,nlayer)
     24write(1,*) 'teta', tsurf, (temp(il), il = 1,nlayer)
    2025close(1)
    21 return
    2226
    23 END
     27END SUBROUTINE writerestart1D
Note: See TracChangeset for help on using the changeset viewer.