Skip to content
Snippets Groups Projects
Commit af12b5ce authored by RODIER Quentin's avatar RODIER Quentin
Browse files

Philippe 10/04/2020: LATLON_to_XY program, correction to new I/O structure

parent e1dff52e
No related branches found
No related tags found
No related merge requests found
......@@ -55,22 +55,29 @@
!! no transfer of the file when closing Dec. 09, 1996 (V.Masson)
!! + changes call to READ_HGRID
!! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O
!! Philippe Wautelet: 10/04/2020 correction to new I/O structure
!----------------------------------------------------------------------------
!
!* 0. DECLARATION
! -----------
!
USE MODD_GRID
USE MODD_DIM_n
USE MODD_GRID
USE MODD_IO_ll, ONLY: TFILEDATA
USE MODD_PGDDIM
USE MODD_PGDGRID
USE MODD_PARAMETERS
USE MODD_LUNIT
!
USE MODE_FIELD, ONLY: INI_FIELD_LIST
USE MODE_FM
USE MODE_FMREAD
USE MODE_GRIDPROJ
USE MODE_IO_ll
USE MODE_IO_MANAGE_STRUCT, ONLY : IO_FILE_ADD2LIST
USE MODE_MODELN_HANDLER, ONLY: GOTO_MODEL
USE MODE_SPLITTINGZ_ll
USE MODE_POS
!
USE MODI_INI_CST
USE MODI_READ_HGRID
......@@ -97,6 +104,7 @@ INTEGER :: II,IJ ! indexes of the point
REAL :: ZI,ZJ ! fractionnal indexes of the point
TYPE(TFILEDATA),POINTER :: TZINIFILE => NULL()
TYPE(TFILEDATA),POINTER :: TZNMLFILE => NULL()
LOGICAL :: GFOUND
!
!* 0.3 Declaration of namelists
! ------------------------
......@@ -113,19 +121,38 @@ NAMELIST/NAM_INIFILE/ YINIFILE
!* 1. Initializations
! ---------------
!
CALL INI_CST
CALL GOTO_MODEL(1)
!
CALL VERSION()
!
CPROGRAM='LAT2XY'
!
CALL INITIO_ll()
!
CALL INI_CST()
!
CALL INI_FIELD_LIST(1)
!
!* 2. Reading of namelist file
! ------------------------
!
CALL INITIO_ll()
!
CALL IO_FILE_ADD2LIST(TZNMLFILE,'LATLON2XY1.nam','NML','READ')
CALL IO_FILE_OPEN_ll(TZNMLFILE)
INAM=TZNMLFILE%NLU
READ(INAM,NAM_INIFILE)
!
READ(INAM,NAM_CONFIO)
CALL POSNAM(INAM,'NAM_INIFILE',GFOUND)
IF (GFOUND) THEN
READ(UNIT=INAM,NML=NAM_INIFILE)
PRINT*, ' namelist NAM_INIFILE read'
END IF
!
CALL POSNAM(INAM,'NAM_CONFIO',GFOUND)
IF (GFOUND) THEN
READ(UNIT=INAM,NML=NAM_CONFIO)
PRINT*, ' namelist NAM_CONFIO read'
END IF
!
CALL SET_CONFIO_ll()
CALL IO_FILE_CLOSE_ll(TZNMLFILE)
!
......@@ -135,6 +162,15 @@ CALL IO_FILE_CLOSE_ll(TZNMLFILE)
CALL IO_FILE_ADD2LIST(TZINIFILE,TRIM(YINIFILE),'UNKNOWN','READ',KLFITYPE=2,KLFIVERB=2)
CALL IO_FILE_OPEN_ll(TZINIFILE)
!
CALL IO_READ_FIELD(TZINIFILE,'IMAX', NIMAX)
CALL IO_READ_FIELD(TZINIFILE,'JMAX', NJMAX)
NKMAX = 1
CALL IO_READ_FIELD(TZINIFILE,'JPHEXT',JPHEXT)
!
CALL SET_JP_ll(1,JPHEXT,JPVEXT,JPHEXT)
CALL SET_DIM_ll(NIMAX, NJMAX, NKMAX)
CALL INI_PARAZ_ll(IRESP)
!
!* 2. Reading of MESONH file
! ----------------------
!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment