43 USE modi_open_trip_namelist
44 USE modi_close_trip_namelist
59 INTEGER,
INTENT(IN) :: KLISTING
79 REAL,
DIMENSION(:),
ALLOCATABLE :: ZLON
80 REAL,
DIMENSION(:),
ALLOCATABLE :: ZLAT
83 REAL(KIND=JPRB) :: ZHOOK_HANDLE
85 NAMELIST/nam_trip_grid/tlonmin, tlonmax, tlatmin, tlatmax, tres
91 IF (
lhook)
CALL dr_hook(
'READ_NAM_TRIP_GRID',0,zhook_handle)
100 CALL trip_posnam(ilunam,
'NAM_TRIP_GRID',gfound,klisting)
102 READ(unit=ilunam,nml=nam_trip_grid)
104 WRITE(klisting,*)
'READ_NAM_TRIP_GRID: NAM_TRIP_GRID not found in namelist' 105 CALL abort_trip(
'READ_NAM_TRIP_GRID: NAM_TRIP_GRID not found in namelist')
110 IF(tres/=0.5.AND.tres/=1.0)
THEN 111 IF(tres<0.08.OR.tres>0.09)
THEN 112 WRITE(klisting,*)
'Error : The resolution of the TRIP grid must be 1deg or 0.5deg ' 113 WRITE(klisting,*)
' or 0.083333deg over France ' 114 WRITE(klisting,*)
' In NAM_TRIP_GRID, TRES should be 0.083333 or 0.5 or 1. ' 115 CALL abort_trip(
'READ_NAM_TRIP_GRID: The resolution of the TRIP grid must be 1deg or 0.5deg or 0.083333deg')
117 tres=
REAL(nint(tres*12.))/12.
125 ilon = int((tlonmax-tlonmin)/tres)
126 ilat = int((tlatmax-tlatmin)/tres)
135 zwork = tlonmin-(tres/2.)
141 zwork =tlatmin-(tres/2.)
152 ALLOCATE(tpg%XTRIP_GRID(7+ilon+ilat))
153 tpg%XTRIP_GRID(:) = 0.0
155 CALL put_trip_grid(tpg%XTRIP_GRID,tlonmin,tlonmax,tlatmin,tlatmax,tres,ilon,ilat,zlon,zlat)
160 IF (
lhook)
CALL dr_hook(
'READ_NAM_TRIP_GRID',1,zhook_handle)
subroutine read_nam_trip_grid(TPG, KLISTING)
subroutine put_trip_grid(PTRIP_GRID, PLONMIN, PLONMAX, PLATMIN, PLATMAX, PRES, KLON, KLAT, PLON, PLAT)
subroutine close_trip_namelist(KLUNAM)
subroutine open_trip_namelist(KLUNAM)
subroutine abort_trip(YTEXT)
subroutine trip_posnam(KULNAM, HDNAML, OFOUND, KLISTING)