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

This program creates fine grid bathymetry file. More...

Functions/Subroutines

program create_bathy
 
type(tvar) function create_bathy_matrix (td_var, td_coord)
 This function create variable, filled with matrix value. More...
 
type(tvar) function create_bathy_extract (td_var, td_mpp, td_coord)
 This function extract variable from file over coordinate domain and return variable structure. More...
 
type(tvar) function create_bathy_get_var (td_var, td_mpp, id_imin, id_jmin, id_imax, id_jmax, id_offset, id_rho)
 This function get coarse grid variable, interpolate variable, and return variable structure over fine grid. More...
 
subroutine create_bathy_interp (td_var, id_rho, id_offset, id_iext, id_jext)
 This subroutine interpolate variable. More...
 
subroutine create_bathy_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_bathy_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 fine grid bathymetry file.

method

Bathymetry could be extracted from fine grid Bathymetry file, interpolated from coarse grid Bathymetry file, or manually written.

how to

to create fine grid bathymetry file:

./SIREN/bin/create_bathy create_bathy.nam


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

create_bathy.nam contains 7 namelists:

logger namelist (namlog):

config namelist (namcfg):

coarse grid namelist (namcrs):

fine grid namelist (namfin):

variable namelist (namvar):

nesting namelist (namnst):

output namelist (namout):

Author
J.Paul

Function/Subroutine Documentation

program create_bathy ( )
Date
November, 2013 - Initial Version
Sepember, 2014
  • add header for user
  • Bug fix, compute offset depending of grid point
June, 2015
  • extrapolate all land points.
  • allow to change unit.
September, 2015
  • manage useless (dummy) variable, attributes, and dimension
January,2016
  • add create_bathy_check_depth as in create_boundary
  • add create_bathy_check_time as in create_boundary
February, 2016
  • do not closed sea for east-west cyclic domain
October, 2016
  • dimension to be used select from configuration file
Todo:
  • check tl_multi is not empty
Note
Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
subroutine create_bathy::create_bathy_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
January, 2016 - Initial Version
Parameters
[in]td_mppmpp structure
[in,out]td_depthdepth variable structure
subroutine create_bathy::create_bathy_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
January, 2016 - Initial Version
Parameters
[in]td_mppmpp structure
[in,out]td_timetime variable structure
type(tvar) function create_bathy::create_bathy_extract ( type(tvar), intent(in)  td_var,
type(tmpp), intent(in)  td_mpp,
type(tmpp), intent(in)  td_coord 
)

This function extract variable from file over coordinate domain and return variable structure.

Author
J.Paul
Date
November, 2013 - Initial Version
Parameters
[in]td_varvariable structure
[in]td_mppmpp file structure
[in]td_coordcoordinate file structure
Returns
variable structure
type(tvar) function create_bathy::create_bathy_get_var ( type(tvar), intent(in)  td_var,
type(tmpp), intent(in)  td_mpp,
integer(i4), intent(in)  id_imin,
integer(i4), intent(in)  id_jmin,
integer(i4), intent(in)  id_imax,
integer(i4), intent(in)  id_jmax,
integer(i4), dimension(:,:), intent(in)  id_offset,
integer(i4), dimension(:), intent(in)  id_rho 
)

This function get coarse grid variable, interpolate variable, and return variable structure over fine grid.

Author
J.Paul
Date
November, 2013 - Initial Version
Parameters
[in]td_varvariable structure
[in]td_mppmpp file structure
[in]id_imini-direction lower left corner indice
[in]id_imaxi-direction upper right corner indice
[in]id_jminj-direction lower left corner indice
[in]id_jmaxj-direction upper right corner indice
[in]id_offsetoffset between fine grid and coarse grid
[in]id_rhoarray of refinement factor
Returns
variable structure
subroutine create_bathy::create_bathy_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
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)
type(tvar) function create_bathy::create_bathy_matrix ( type(tvar), intent(in)  td_var,
type(tmpp), intent(in)  td_coord 
)

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 corresponding value of the matrix.

Author
J.Paul
Date
November, 2013 - Initial Version
Parameters
[in]td_varvariable structure
[in]td_coordcoordinate file structure
Returns
variable structure