Ignore:
Timestamp:
Nov 17, 2023, 2:38:58 PM (14 months ago)
Author:
jbclement
Message:

Mars PCM/PEM:
Cleaning of the 1D initialization: any reference of the PEM has been removed from "init_testphys1D_mod.F90". This way is much cleaner even though it needs more code.
JBC

File:
1 edited

Legend:

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

    r3117 r3129  
    1515use turb_mod,            only: q2
    1616use write_output_mod,    only: write_output
     17use ioipsl_getincom,     only: getin ! To use 'getin'
    1718use init_testphys1d_mod, only: init_testphys1d
    1819use writerestart1D_mod,  only: writerestart1D
     
    8990integer                 :: nq = 1 ! number of tracers
    9091real, dimension(1)      :: latitude, longitude, cell_area
    91 logical                 :: there
    9292character(2)            :: str2
    9393character(7)            :: str7
     
    9595
    9696! RV & JBC: Use of starting files for 1D
    97 logical :: startfiles_1D, therestart1D, therestartfi
     97logical :: startfiles_1D, therestart1D, therestartfi, there
    9898
    9999! JN & JBC: Force atmospheric water profiles
     
    115115!call initcomgeomphy
    116116
    117 call init_testphys1d(.false.,ngrid,nlayer,odpref,nq,q,time,psurf,u,v,temp,startfiles_1D,therestart1D, &
    118                      therestartfi,ndt,ptif,pks,dttestphys,zqsat,dq,dqdyn,day0,day,gru,grv,w,          &
     117startfiles_1D = .false.
     118!------------------------------------------------------
     119! Loading run parameters from "run.def" file
     120!------------------------------------------------------
     121! check if 'run.def' file is around. Otherwise reading parameters
     122! from callphys.def via getin() routine won't work.
     123inquire(file = 'run.def',exist = there)
     124if (.not. there) then
     125    write(*,*) 'Cannot find required file "run.def"'
     126    write(*,*) '  (which should contain some input parameters along with the following line: INCLUDEDEF=callphys.def)'
     127    write(*,*) ' ... might as well stop here ...'
     128    error stop
     129endif
     130
     131startfiles_1D = .false. ! Default value
     132write(*,*) 'Do you want to use starting files and/or to write restarting files?'
     133call getin('startfiles_1D',startfiles_1D)
     134write(*,*) 'startfiles_1D =', startfiles_1D
     135
     136therestart1D = .false. ! Default value
     137inquire(file = 'start1D.txt',exist = therestart1D)
     138if (startfiles_1D .and. .not. therestart1D) then
     139    write(*,*) 'There is no "start1D.txt" file!'
     140    write(*,*) 'Initialization is done with default values.'
     141endif
     142therestartfi = .false. ! Default value
     143inquire(file = 'startfi.nc',exist = therestartfi)
     144if (.not. therestartfi) then
     145    write(*,*) 'There is no "startfi.nc" file!'
     146    write(*,*) 'Initialization is done with default values.'
     147endif
     148
     149call init_testphys1d('start1D.txt','startfi.nc',startfiles_1D,therestart1D,therestartfi,ngrid,nlayer,odpref, &
     150                     nq,q,time,psurf,u,v,temp,ndt,ptif,pks,dttestphys,zqsat,dq,dqdyn,day0,day,gru,grv,w,     &
    119151                     play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau)
    120152
Note: See TracChangeset for help on using the changeset viewer.