1. Data structure utilities#

SUBROUTINE COPISD (TYPESD, BASE, SD1, SD2)

Purpose: to duplicate a data structure (SD1) under another name (SD2). SD2 will have the same content as SD1.

IN

TYPESD

K*

type of the 2 data structures SD1et SD2.

See the list of types allowed today in the header of the Fortran routine »

IN

BASE

K1

“G”/”V”: name of the base where SD2 will be created

IN JXIN

SD1

K*

ASD name SD1

IN JXOUT

SD2

K*

ASD name SD2

LOGICAL FUNCTION IDENSD (TYPESD, SD1, SD2)

Purpose: to test the identity of the content of 2 data structures SD1 and SD2

IN

TYPESD

K*

type of the 2 data structures to be compared. See the list of types allowed today in the header of the Fortran routine

IN JXIN

SD1

K*

ASD name SD1

IN JXIN

SD2

K*

SD name SD2

OUT

IDENSD

L

. TRUE.: the 2SD SD1et SD2sont identical. FALSE.: the different SD1et SD2sont 2SD

SUBROUTINE EXISD (TYPESD, NOMSD, IRET)

Purpose: answer the question: « Is there a data structure of type TYPSD and name NOMSD? ».

IN

TYPESD

K*

type of data structure to be tested. See the list of types allowed today in the header of the Fortran routine

IN JXIN

NOMSD

K*

name of the SD to be tested

OUT

IRET

I

0: data structure doesn’t exist 1: the data structure exists

SUBROUTINE DETRSD (TYPESD, NOMSD)

Purpose: to destroy a data structure of type TYPSD and name NOMSD. That is to say destroy all the JEVEUX objects that make it up.

IN

TYPESD

K*

Type of data structure to be tested. See the list of types allowed today in the header of the Fortran routine

IN JXIN

NOMSD

K*

name of the SD to be destroyed

SUBROUTINE IMPRSD (TYPESD, NOMSD, IFIC, TITRE)

Purpose: to « legibly » print a data structure

IN

TYPESD

K*

Type of data structure to be tested. Types allowed today: CHAMP, CHAMP_S

IN JXIN

NOMSD

K*

name of the SD to be printed

IN

IFIC

I

logical file number ASCII for printing

IN

TITRE

K*

title given in print.

SUBROUTINE UTIMSD (IFIC, NIVEAU, LATTR, LCONT, SCH1, IPOS, BASE)

Purpose: To completely print a data structure. That is to say, print the « raw » content of the JEVEUX objects that compose it.

In reality, we don’t really treat data structures: we look for all JEVEUX objects whose names contain a certain string of characters. But it turns out that in general, all objects in an SD have names that start with the same string.

Example 1:

CALL UTIMSD (6,2,. FALSE.,. TRUE. , CHAMP (1:19) ,1, 'V')

Do the « dump » of the field named CHAMP and which is located on the VOLATILE base. Attributes for JEVEUX objects are not printed. The result is printed in the.mess file.

Example 2:

CALL UTIMSD (8,0,. FALSE.,. FALSE.., '. DESC ',20, '')

Write the names of all objects whose names contain the string “. DESC “in position 20. The result is printed in the.resu file.