Ignore:
Timestamp:
May 23, 2012, 4:32:58 PM (13 years ago)
Author:
acolaitis
Message:

ADAPTED RESTART IN MESOSCALE AND LES.
Warning: MMM always puts the initialization state as the first frame in outputs :

init,frame1,frame2,...,frameN

Hence, when using runs restarting from one another, one will get:

init,frame1,frame2,...,frameN
frameN,frameN+1,...,frame2N

Dont forget to remove the initialization frame before concatenating your netcdfs !!

HOW TO USE THE RESTART IN LES AND MESOSCALE ?
Exemple :
=========


INITIALIZE FIRST RUN (ideal.exe or real.exe)
FIRST RUN



FIRST RUN


EXTRACT FROM namelist.input:

&time_control
run_seconds = 60 !! Duration of simulation [LES: !=0]
history_interval_s = 10 !! Frequency of outputs in seconds [LES: !=0]
frames_per_outfile = 37 !! Size of time dimension in files
start_year = 9999 !! Idealized simulation [LES: 9999]
start_month = 01
start_day = 01
start_hour = 00
start_minute = 00
start_second = 00
end_year = 9999 !! Idealized simulation [LES: 9999]
restart = .false. !! (*) whether this run is a restart run
restart_interval = 1 !! (*) restart output file interval in minutes
io_form_history = 2 !! (*) Choice of NETCDF for ouputs
io_form_restart = 2 !! (*) Choice of NETCDF for ouputs
io_form_input = 2 !! (*) Choice of NETCDF for ouputs
io_form_boundary = 2 !! (*) Choice of NETCDF for ouputs
debug_level = 0 !! (*) Verbose level
/

This will produce a restart file : wrfrst_d01_9999-01-01_00:01:00
(and a regular output file)


SECOND RUN, RESTART FROM FIRST
YOU DONT NEED TO RECOMPUTE START FILES (no need for ideal.exe or real.exe)


EXTRACT FROM namelist.input:

&time_control
run_seconds = 60 !! Duration of simulation [LES: !=0]
history_interval_s = 10 !! Frequency of outputs in seconds [LES: !=0]
frames_per_outfile = 37 !! Size of time dimension in files
start_year = 9999 !! Idealized simulation [LES: 9999]
start_month = 01
start_day = 01
start_hour = 00
start_minute = 01
start_second = 00
end_year = 9999 !! Idealized simulation [LES: 9999]
restart = .true. !! (*) whether this run is a restart run
restart_interval = 1 !! (*) restart output file interval in minutes
io_form_history = 2 !! (*) Choice of NETCDF for ouputs
io_form_restart = 2 !! (*) Choice of NETCDF for ouputs
io_form_input = 2 !! (*) Choice of NETCDF for ouputs
io_form_boundary = 2 !! (*) Choice of NETCDF for ouputs
debug_level = 0 !! (*) Verbose level
/

This requires wrfrst_d01_9999-01-01_00:01:00 to be present
This will produce a restart file : wrfrst_d01_9999-01-01_00:02:00


etc ad infinitum !


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F

    r577 r667  
    233233   REAL :: wappel_phys
    234234   LOGICAL :: flag_LES
    235 
     235   LOGICAL, SAVE :: flag_first_restart
    236236!**************************************************
    237237! IMPORTANT: pour travailler avec grid nesting
     
    359359!----------------------------------------------!
    360360IF (elaps .eq. 0.) THEN
     361   flag_first_restart = .false.
     362ELSE
     363   flag_first_restart=flag_first_restart.OR.(.NOT. ALLOCATED(dp_save))
     364ENDIF
     365
     366IF ((elaps .eq. 0.).or.flag_first_restart) THEN
    361367firstcall=.true.  !! for continuity with GCM, physics are always called at the first WRF timestep
    362368  !firstcall=.false. !! just in case you'd want to get rid of the physics
     
    367373   PRINT *, '**** check **** OK I ALLOCATE one save ARRAY for all NESTS ', max_dom, id
    368374   !! here are the arrays that would be useful to save physics tendencies
    369    ALLOCATE(dp_save(ngrid,max_dom)) 
     375   ALLOCATE(dp_save(ngrid,max_dom))
    370376   ALLOCATE(du_save(ngrid,nlayer,max_dom))
    371    ALLOCATE(dv_save(ngrid,nlayer,max_dom)) 
    372    ALLOCATE(dt_save(ngrid,nlayer,max_dom))     
    373    ALLOCATE(dq_save(ngrid,nlayer,nq,max_dom)) 
     377   ALLOCATE(dv_save(ngrid,nlayer,max_dom))
     378   ALLOCATE(dt_save(ngrid,nlayer,max_dom))
     379   ALLOCATE(dq_save(ngrid,nlayer,nq,max_dom))
    374380   dp_save(:,:)=0.    !! initialize these arrays ...
    375381   du_save(:,:,:)=0.
     
    378384   dq_save(:,:,:,:)=0.
    379385ENDIF
     386IF (id .lt. max_dom) THEN
     387   flag_first_restart=.true.
     388ELSE
     389   flag_first_restart=.false.
     390ENDIF
    380391#else
    381392ALLOCATE(dp_save(ngrid)) !! here are the arrays that would be useful to save physics tendencies
    382393ALLOCATE(du_save(ngrid,nlayer))
    383 ALLOCATE(dv_save(ngrid,nlayer)) 
    384 ALLOCATE(dt_save(ngrid,nlayer))     
    385 ALLOCATE(dq_save(ngrid,nlayer,nq)) 
     394ALLOCATE(dv_save(ngrid,nlayer))
     395ALLOCATE(dt_save(ngrid,nlayer))
     396ALLOCATE(dq_save(ngrid,nlayer,nq))
    386397dp_save(:)=0.    !! initialize these arrays ...
    387398du_save(:,:)=0.
    388399dv_save(:,:)=0.
    389 dt_save(:,:)=0.   
     400dt_save(:,:)=0.
    390401dq_save(:,:,:)=0.
     402flag_first_restart=.false.
    391403#endif
    392404!! put here some general information you'd like to print just once
    393405    print *, 'TILES: ', i_start,i_end, j_start, j_end  ! numbers for simple runs, arrays for parallel runs
    394     print *, 'DOMAIN: ', ids, ide, jds, jde 
     406    print *, 'DOMAIN: ', ids, ide, jds, jde
    395407    print *, 'MEMORY: ', ims, ime, jms, jme
    396408    print *, 'ADVECTED TRACERS: ', num_3d_s-1
Note: See TracChangeset for help on using the changeset viewer.