00001 !------------------------------------------------------------------------ 00002 ! Copyright 2006-2010, CERFACS, Toulouse, France. 00003 ! All rights reserved. Use is subject to license terms. 00004 !------------------------------------------------------------------------ 00005 !BOP 00006 ! 00007 !----------------------------------------------------------------------- 00008 ! 00009 ! The following routines initialize the structures and write them if needed 00010 ! 00011 !------------------------------------------------------------------------ 00012 !BOP 00013 ! 00014 ! !IROUTINE init_grids 00015 ! 00016 ! !INTERFACE 00017 SUBROUTINE init_grids (id_nb_grids, sda_smioc_grids, id_error) 00018 ! 00019 USE PSMILe_smioc 00020 IMPLICIT NONE 00021 ! 00022 ! !REVISED HISTORY 00023 ! Date Programmer Description 00024 ! ---------- ---------- ----------- 00025 ! 20/10/2003 S. Valcke Creation 00026 ! 30/12/2003 D. Declat Implemented as a module 00027 ! 00028 !EOP 00029 !---------------------------------------------------------------------- 00030 ! $Id: psmile_smioc.F90 1793 2008-11-25 14:58:31Z valcke $ 00031 ! $Author: valcke $ 00032 !---------------------------------------------------------------------- 00033 ! 00034 ! !INPUT PARAMETERS: 00035 INTEGER,INTENT(In):: id_nb_grids ! number of grids 00036 ! 00037 ! !RETURN VALUE: 00038 ! grids structure 00039 TYPE (smioc_grid),DIMENSION(id_nb_grids),INTENT(Out):: sda_smioc_grids 00040 ! 00041 ! returned error code 00042 INTEGER,INTENT(Out):: id_error 00043 ! 00044 ! !LOCAL VARIABLES 00045 ! Loop indices 00046 INTEGER :: ib_ng 00047 ! 00048 ! !DESCRIPTION 00049 ! This routines initialize a grid structure 00050 ! 00051 ! !REVISION HISTORY: 00052 ! Date Programmer Description 00053 ! ---------- ---------- ----------- 00054 ! 13/10/2003 Valcke Creation 00055 ! 00056 !EOP 00057 !----------------------------------------------------------------------- 00058 ! $Id $ 00059 ! $Author $ 00060 ! 00061 CHARACTER(len=len_cvs_string), SAVE :: mycvs = 00062 '$Id $' 00063 ! 00064 !---------------------------------------------------------------------- 00065 ! 00066 DO ib_ng = 1, id_nb_grids 00067 00068 sda_smioc_grids(ib_ng)%cg_grid_name = ' ' 00069 sda_smioc_grids(ib_ng)%ig_grid_id = PSMILe_undef 00070 sda_smioc_grids(ib_ng)%ig_comp_id = PSMILe_undef 00071 sda_smioc_grids(ib_ng)%iga_periodic(:) = PSMILe_undef 00072 END DO 00073 id_error = 0 00074 00075 END SUBROUTINE init_grids 00076 ! 00077 !------------------------------------------------------------------------