SIREN  NEMO 3.6
System and Interface for oceanic RElocatable Nesting
Functions/Subroutines
create_restart.f90 File Reference

This program creates restart file. More...

Functions/Subroutines

program create_restart
 
type(tvar) function create_restart_matrix (td_var, td_coord, id_nlevel, id_xghost)
 This function create variable, filled with matrix value. More...
 
subroutine create_restart_mask (td_var, td_mask)
 This subroutine use mask to filled land point with _FillValue. More...
 
subroutine create_restart_interp (td_var, id_rho, id_offset, id_iext, id_jext)
 This subroutine interpolate variable. More...
 
subroutine create_restart_check_depth (td_mpp, td_depth)
 This subroutine get depth variable value in an open mpp structure and check if agree with already input depth variable. More...
 
subroutine create_restart_check_time (td_mpp, td_time)
 This subroutine get date and time in an open mpp structure and check if agree with date and time already read. More...
 

Detailed Description

This program creates restart file.

method

Variables could be extracted from fine grid file, interpolated from coarse grid file or restart file. Variables could also be manually written.
Then they are split over new layout.

Note
method could be different for each variable.

how to

to create restart file:

Note
you could find a template of the namelist in templates directory.

create_restart.nam contains 9 namelists:

logger namelist (namlog):

config namelist (namcfg):

_coarse grid namelist (namcrs):

fine grid namelist (namfin):

vertical grid namelist (namzgr):

partial step namelist (namzps):

variable namelist (namvar):

nesting namelist (namnst):

output namelist (namout):

Author
J.Paul

Function/Subroutine Documentation

program create_restart ( )
Date
November, 2013 - Initial Version
September, 2014
  • add header for user
  • offset computed considering grid point
  • add attributes in output variable
June, 2015
  • extrapolate all land points, and add ln_extrap in namelist.
  • allow to change unit.
September, 2015
  • manage useless (dummy) variable, attributes, and dimension
October, 2016
  • dimension to be used select from configuration file
Note
Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
subroutine create_restart::create_restart_check_depth ( type(tmpp), intent(in)  td_mpp,
type(tvar), intent(inout)  td_depth 
)

This subroutine get depth variable value in an open mpp structure and check if agree with already input depth variable.

Author
J.Paul
Date
November, 2014 - Initial Version
Parameters
[in]td_mppmpp structure
[in,out]td_depthdepth variable structure
subroutine create_restart::create_restart_check_time ( type(tmpp), intent(in)  td_mpp,
type(tvar), intent(inout)  td_time 
)

This subroutine get date and time in an open mpp structure and check if agree with date and time already read.

Author
J.Paul
Date
November, 2014 - Initial Version
Parameters
[in]td_mppmpp structure
[in,out]td_timetime variable structure
subroutine create_restart::create_restart_interp ( type(tvar), intent(inout)  td_var,
integer(i4), dimension(:), intent(in)  id_rho,
integer(i4), dimension(:,:), intent(in)  id_offset,
integer(i4), intent(in), optional  id_iext,
integer(i4), intent(in), optional  id_jext 
)

This subroutine interpolate variable.

Author
J.Paul
Date
November, 2013 - Initial Version
June, 2015
  • do not use level anymore (for extrapolation)
Parameters
[in,out]td_varvariable structure
[in]id_rhoarray of refinment factor
[in]id_offsetarray of offset between fine and coarse grid
[in]id_iexti-direction size of extra bands (default=im_minext)
[in]id_jextj-direction size of extra bands (default=im_minext)
subroutine create_restart::create_restart_mask ( type(tvar), intent(inout)  td_var,
type(tvar), dimension(:), intent(in)  td_mask 
)

This subroutine use mask to filled land point with _FillValue.

Author
J.Paul
Date
November, 2013 - Initial Version
Parameters
[in,out]td_varvariable structure
[in]td_maskmask variable structure
type(tvar) function create_restart::create_restart_matrix ( type(tvar), intent(in)  td_var,
type(tmpp), intent(in)  td_coord,
integer(i4), intent(in)  id_nlevel,
integer(i4), dimension(:,:), intent(in)  id_xghost 
)

This function create variable, filled with matrix value.

A variable is create with the same name that the input variable, and with dimension of the coordinate file.
Then the variable array of value is split into equal subdomain. Each subdomain is filled with the associated value of the matrix.

Author
J.Paul
Date
November, 2013 - Initial Version
June, 2015
  • do not use level anymore
Parameters
[in]td_varvariable structure
[in]td_coordcoordinate file structure
[in]id_nlevelnumber of vertical level
[in]id_xghostghost cell array
Returns
variable structure