Changeset 2313


Ignore:
Timestamp:
May 7, 2020, 9:58:54 PM (5 years ago)
Author:
abierjon
Message:

Mars GCM:
Following r2303 and r2308 and truly truly resolving Ticket #46 on concatnc:
Improved ergonomics of the user interface, with no more request to the user
in the midst of computations

AB

Location:
trunk/LMDZ.MARS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2312 r2313  
    30093009For now, only functional with simplified cloud scheme (so microphys=.false. and activice=.false. also recommended).
    30103010Initialisation of start files can be done with option 'inihdo' in newstart.
     3011
     3012== 07/05/2020 == AB
     3013Following r2303 and r2308 and truly truly resolving Ticket #46 on concatnc:
     3014Improved ergonomics of the user interface, with no more request to the user
     3015in the midst of computations
  • trunk/LMDZ.MARS/util/concatnc.F90

    r2308 r2313  
    157157write(*,*) "Starting day to be stored in the output file time axis?"
    158158write(*,*) "(e.g.: 100 if you want the output file to start at time=100 sols)"
    159 read(*,*) starttimeoffset
     159write(*,*) "Your answer will bypass any starting day value stored in the 1st"
     160write(*,*) "input file. Conversely, just type return if you want this 1st file's"
     161write(*,*) "value to be kept for the output file starting day."
     162read(*,*,iostat=ierr) starttimeoffset
     163if (ierr.ne.0) then
     164   ! if nothing or a character that is not a float is read
     165   write(*,*) "1st input file's starting day will serve as starting day for the outfile."
     166   firstsol='n'
     167else ! if the user gave a number
     168   write(*,*) "Your input day will serve as starting day for the outfile."
     169   firstsol='y'
     170endif
    160171
    161172!==============================================================================
     
    287298endif ! of if (tmpvar=="all")
    288299
    289 ! Name of the new file
    290 !==========================================================
    291 !filename=var(1)
    292 !do i=2, nbvar
    293 !   filename=trim(adjustl(filename))//"_"//var(i)
    294 !enddo
    295 !filename=trim(adjustl(filename))//".nc"
    296300
    297301!==============================================================================
     
    450454      ierr = NF_GET_VAR_REAL(nid,altvar,alt)
    451455#endif
    452       firstsol = 'n' ! defaut value
    453456      write(*,*)
    454457      if (ctllen .ne. 0) then
    455458         if (int(starttimeoffset) .ne. (int(ctlsol)+int(time(1))) ) then
    456459           write(*,*) "WARNING: Starting day of the first file is not ",&
    457                                 int(starttimeoffset)," but ",int(ctlsol)+int(time(1)),"!"
    458            write(*,*) "Answer:"
    459            write(*,*) " y to use the starting day you have inputted"
    460            write(*,*) " n to keep the starting day of the first file"
    461            write(*,*) "as the starting day of the output file"
    462            read(*,*) firstsol
     460                       int(starttimeoffset)," but ",int(ctlsol)+int(time(1)),"!"
    463461         endif
    464          
     462       
    465463         if (firstsol.eq.'y') then
    466            write(*,*) "The day given by the user is used as the starting day of the ouput file"
    467464           starttimeoffset = float(int(ctlsol)+int(time(1))) + ctl(27) - starttimeoffset
    468          else ! if firstsol.eq.'n' or other (default case, for retrocompatibility with previous concatnc.def)
    469            write(*,*) "The starting day of the 1st file is used as the starting day of the ouput file"
     465         else ! if firstsol.eq.'n'
    470466           starttimeoffset = 0
    471467         endif
    472          
     468
    473469         memotime=float(int(ctlsol)+int(time(1))) + ctl(27)
    474470         ctl(4) = 0.  ! values written in the output
     
    478474         if (int(starttimeoffset) .ne. (int(time(1))) ) then
    479475           write(*,*) "WARNING: Starting day of the first file is not ",&
    480                                 int(starttimeoffset)," but ",int(time(1)),"!"
    481            write(*,*) "Answer:"
    482            write(*,*) " y to use the starting day you have inputted"
    483            write(*,*) " n to keep the starting day of the first file"
    484            write(*,*) "as the starting day of the output file"
    485            read(*,*) firstsol
     476                       int(starttimeoffset)," but ",int(time(1)),"!"
    486477         endif
    487          
     478
    488479         if (firstsol.eq.'y') then
    489            write(*,*) "The day given by the user is used as the starting day of the ouput file"
    490480           starttimeoffset = int(time(1)) - starttimeoffset
    491          else ! if firstsol.eq.'n' or other (default case, for retrocompatibility with previous concatnc.def)
    492            write(*,*) "The starting day of the 1st file is used as the starting day of the ouput file"
     481         else ! if firstsol.eq.'n'
    493482           starttimeoffset = 0
    494483         endif
     
    499488   ! Initialize output file's lat,lon,alt and time dimensions
    500489      write(*,*)
    501       call initiate (filename,lat,lon,alt,ctl,GCM_layers,nout,&
     490      call initiate(filename,lat,lon,alt,ctl,GCM_layers,nout,&
    502491       latdimout,londimout,altdimout,timedimout,&
    503492       layerdimout,interlayerdimout,timevarout,axis)
  • trunk/LMDZ.MARS/util/concatnc.def

    r2308 r2313  
    88ps
    99
    10 n
    1110
    1211-----------------------------------------------------------------------
     
    16151) List of N files to be read  (N lines)
    17162) blank line at the end
    18 3) Starting sol of the run stored in the first input file?
     173) Starting sol of the output file?
     18(or a blank if you want to use the first file's
     19 starting sol = time(1)+controle(4) )
    19204) Output timescale ("sol" or "ls")
    20215) List of X variables to be kept (X lines) or 'all'
    21226) blank line at the end
    22 7) Use:
    23   - the sol given in 3) (answer "y")
    24   - or the starting sol of the first input file (answer "n") (default)
    25   as the starting sol of the output file ?
    2623
    2724The use is :
Note: See TracChangeset for help on using the changeset viewer.