23# if defined PIO_LIB && defined DISTRIBUTE
60 integer,
intent(in) :: model
64 logical :: gotfile, lwrite
66 integer :: nghost, tile
67 integer :: imin, imax, jmin, jmax
69 integer :: i_padd, j_padd
72 integer :: maxhaloleni, maxhalolenj
74 integer :: ibry, inp, out, i, ic, ifield, itrc, j, ng, npts
75 integer :: sequence, varid
78 real(
r8),
parameter :: spv = 0.0_r8
80 character (len=*),
parameter :: myfile = &
98 IF (.not.gotfile)
THEN
100 10
FORMAT (/,
' INP_PAR - Unable to ROMS standard input file, ', &
113#if defined SPLIT_4DVAR && SUPPRESS_REPORT
137 20
FORMAT (80(
'-'),/, &
138 ' Model Input Parameters: ROMS version ',a,/, &
149#if defined SPLIT_4DVAR && SUPPRESS_REPORT
166 OPEN (15, file=trim(
iparnam), form=
'formatted', status=
'old')
177 OPEN (25, file=trim(
bparnam), form=
'formatted', status=
'old')
188 OPEN (35, file=trim(
sparnam), form=
'formatted', status=
'old')
240#if defined SSH_TIDES || defined UV_TIDES
267 SELECT CASE (
grx(ng)%IOtype)
270# if defined PIO_LIB && defined DISTRIBUTE
276 40
FORMAT (/,
' INP_PAR - Illegal output type,', &
285 IF (trim(
dim_name(i)).eq.
'xi_rho')
THEN
287 i_padd=(
lm(ng)+2)/2-(
lm(ng)+1)/2
288 xtr_im(ng)=xtr_lm(ng)+i_padd
289 ELSE IF (trim(
dim_name(i)).eq.
'eta_rho')
THEN
291 j_padd=(
mm(ng)+2)/2-(
mm(ng)+1)/2
292 xtr_jm(ng)=xtr_mm(ng)+j_padd
295 IF (xtr_lm(ng).eq.0)
THEN
296 WRITE (
stdout,20)
'xi_rho', trim(
grx(ng)%name)
300 IF (xtr_jm(ng).eq.0)
THEN
301 WRITE (
stdout,20)
'eta_rho', trim(
grx(ng)%name)
305 45
FORMAT (/,
' INP_PAR - error inquiring dimension: ',a,2x, &
306 &
'in input NetCDF file: ',a)
312 CALL tile_indices (model, xtr_im, xtr_jm, xtr_lm, xtr_mm, &
313 & xtr_bounds, xtr_domain, xtr_iobounds)
330 IF (
master.and.lwrite)
THEN
339#if !defined DISTRIBUTE && defined ADJOINT
348 npts=(
bounds(ng)%Iend(tile)- &
349 &
bounds(ng)%Istr(tile)+1)* &
350 & (
bounds(ng)%Jend(tile)- &
351 &
bounds(ng)%Jstr(tile)+1)*
n(ng)
353 npts=(
bounds(ng)%Iend(tile)- &
354 &
bounds(ng)%Istr(tile)+1)* &
355 & (
bounds(ng)%Jend(tile)- &
356 &
bounds(ng)%Jstr(tile)+1)
359 &
bounds(ng)%Istr(tile), &
360 &
bounds(ng)%Iend(tile), &
361 &
bounds(ng)%Jstr(tile), &
362 &
bounds(ng)%Jend(tile), &
364 IF ((
bounds(ng)%Iend(tile)- &
365 &
bounds(ng)%Istr(tile)+1).lt.2)
THEN
368 &
'Istr = ',
bounds(ng)%Istr(tile), &
369 &
' Iend = ',
bounds(ng)%Iend(tile), &
374 IF ((
bounds(ng)%Jend(tile)- &
375 &
bounds(ng)%Jstr(tile)+1).lt.2)
THEN
378 &
'Jstr = ',
bounds(ng)%Jstr(tile), &
379 &
' Jend = ',
bounds(ng)%Jend(tile), &
387 50
FORMAT (/,
' Tile partition information for Grid ',i2.2,
':',2x, &
388 & i0,
'x',i0,
'x',i0,2x,
'tiling: ',i0,
'x',i0,/,/, &
389 & 5x,
'tile',5x,
'Istr',5x,
'Iend',5x,
'Jstr',5x,
'Jend', &
392 50
FORMAT (/,
' Tile partition information for Grid ',i2.2,
':',2x, &
393 & i0,
'x',i0,2x,
'tiling: ',i0,
'x',i0,/,/, &
394 & 5x,
'tile',5x,
'Istr',5x,
'Iend',5x,
'Jstr',5x,
'Jend', &
397#if !defined DISTRIBUTE && defined ADJOINT
398 60
FORMAT (/,
' INP_PAR - illegal domain decomposition for the ', &
399 &
'Adjoint model.',/,11x,
'Partitions are ', &
400 &
'allowed in distributed-menory (MPI) applications.'/)
402 70
FORMAT (5(4x,i5),1x,i8)
403 80
FORMAT (/,
' INP_PAR - domain decomposition error in input ', &
404 &
'script file for grid: ',i2.2,/, &
405 & /,11x,
'The domain partition parameter, ',a,i0, &
406 & /,11x,
'is incompatible with grid size, ',a,i0, &
407 & /,11x,
'because it yields too small tile, ',a,i0,a,i0, &
408 & /,11x,
'Decrease partition parameter: ',a)
418 IF (
master.and.lwrite)
THEN
421 WRITE (
stdout,100) tile, &
422 &
domain(ng)%Xmin_rho(tile), &
423 &
domain(ng)%Xmax_rho(tile), &
424 &
domain(ng)%Ymin_rho(tile), &
425 &
domain(ng)%Ymax_rho(tile),
'RHO-points'
429 WRITE (
stdout,100) tile, &
430 &
domain(ng)%Xmin_u(tile), &
431 &
domain(ng)%Xmax_u(tile), &
432 &
domain(ng)%Ymin_u(tile), &
433 &
domain(ng)%Ymax_u(tile),
' U-points'
437 WRITE (
stdout,100) tile, &
438 &
domain(ng)%Xmin_v(tile), &
439 &
domain(ng)%Xmax_v(tile), &
440 &
domain(ng)%Ymin_v(tile), &
441 &
domain(ng)%Ymax_v(tile),
' V-points'
443 90
FORMAT (/,
' Tile minimum and maximum fractional coordinates', &
444 &
' for Grid ',i2.2,
':'/, &
446 &
' (interior and boundary points)',/,/, &
448 &
' (interior points only)',/,/, &
450 & 5x,
'tile',5x,
'Xmin',5x,
'Xmax',5x,
'Ymin',5x,
'Ymax', &
452 100
FORMAT (5x,i4,4f9.2,2x,a)
475 imin=
bounds(ng)%LBi(tile)-1
476 imax=
bounds(ng)%UBi(tile)+1
477 jmin=
bounds(ng)%LBj(tile)-1
478 jmax=
bounds(ng)%UBj(tile)+1
479 maxhaloleni=max(maxhaloleni,(imax-imin+1))
480 maxhalolenj=max(maxhalolenj,(jmax-jmin+1))
482 halosizei(ng)=nghost*maxhaloleni+6*nghost
483 halosizej(ng)=nghost*maxhalolenj+6*nghost
484 tileside(ng)=max(maxhaloleni,maxhalolenj)
485 tilesize(ng)=maxhaloleni*maxhalolenj
486 IF (
master.and.lwrite)
THEN
489 110
FORMAT (/,
' Maximum halo size in XI and ETA directions:',/, &
490 & /,
' HaloSizeI(',i1,
') = ',i7, &
491 & /,
' HaloSizeJ(',i1,
') = ',i7, &
492 & /,
' TileSide(',i1,
') = ',i7, &
493 & /,
' TileSize(',i1,
') = ',i7,/)
498#if defined FOUR_DVAR || defined VERIFICATION
504 OPEN (35, file=trim(
aparnam), form=
'formatted', status=
'old')
515 OPEN (45, file=trim(
fposnam), form=
'formatted', status=
'old')
520#if defined FLOATS && defined FLOAT_BIOLOGY
526 OPEN (50, file=trim(
fbionam), form=
'formatted', status=
'old')
537 OPEN (55, file=trim(
sposnam), form=
'formatted', status=
'old')
548 IF (
master.and.lwrite)
THEN
549 WRITE (out,120)
'NLM'
550 120
FORMAT (/,1x,
'Tracer Advection Scheme: ',a,/,1x,24(
'='),/, &
551 & /,1x,
'Variable',t25,
'Grid',t31,
'Horizontal', &
552 & t50,
'Vertical', /,1x,
'---------',t25,
'----', &
553 & t31,2(
'------------',7x))
558# if defined ADJOINT || defined TANGENT || defined TL_IOMS
560 IF (
master.and.lwrite)
THEN
561 WRITE (out,120)
'TLM, RPM, and ADM'
567#if defined TANGENT || defined TL_IOMS
599 IF (
master.and.lwrite)
THEN
600 WRITE (out,130)
'NLM'
601 130
FORMAT (/,1x,
'Lateral Boundary Conditions: ',a,/,1x,28(
'='),/, &
602 & /,1x,
'Variable',t25,
'Grid',t31,
'West Edge', &
603 & t44,
'South Edge', t57,
'East Edge',t70,
'North Edge', &
604 & /,1x,
'---------',t25,
'----',t31,4(
'----------',3x))
606 IF (
idbvar(ifield).gt.0)
THEN
611#if defined ADJOINT || defined TANGENT || defined TL_IOMS
613 WRITE (out,130)
'TLM, RPM, and ADM'
615 IF (
idbvar(ifield).gt.0)
THEN
638#if defined TANGENT || defined TL_IOMS
660#if defined ADJOINT || defined TANGENT || defined TL_IOMS
667# if defined TS_MIX_CLIMA && (defined TS_DIF2 || defined TS_DIF4)
699 IF (
znudg(ng).gt.0.0_r8)
THEN
705 IF (
m2nudg(ng).gt.0.0_r8)
THEN
712 IF (
m3nudg(ng).gt.0.0_r8)
THEN
747 IF (
lbc(ibry,
istvar(itrc),ng)%nudging)
THEN
756#if defined SO_SEMI || \
757 (defined stochastic_opt &&
800#if defined TANGENT || defined TL_IOMS
808 tl_lbc(i,j,ng)%Chapman_explicit = &
809 &
ad_lbc(i,j,ng)%Chapman_explicit
810 tl_lbc(i,j,ng)%Chapman_implicit = &
811 &
ad_lbc(i,j,ng)%Chapman_implicit
844 IF (varid.gt.
mv)
THEN
853 WRITE (
vname(1,varid),
'(a)') &
855 WRITE (
vname(2,varid),
'(a,a)') &
856 & trim(adjustl(
vname(2,
idtvar(i)))),
' climatology'
857 WRITE (
vname(3,varid),
'(a)') &
859 WRITE (
vname(4,varid),
'(a,a)') &
860 & trim(
vname(1,varid)),
', scalar, series'
861 WRITE (
vname(5,varid),
'(a,a)') &
876 IF (varid.gt.
mv)
THEN
878 140
FORMAT (/,
' INP_PAR - too small dimension ', &
879 &
'parameter, MV = ',2i5,/,15x, &
880 &
'change file mod_ncparam.F and recompile.')
885 fscale(varid,ng)=1.0_r8/86400
888 WRITE (
vname(1,varid),
'(a,a)') &
890 WRITE (
vname(2,varid),
'(a,a)') &
892 &
', inverse nudging coefficients'
893 WRITE (
vname(3,varid),
'(a,1x,a)') &
895 WRITE (
vname(4,varid),
'(a,a)') &
896 & trim(
vname(1,varid)),
', scalar'
897 WRITE (
vname(5,varid),
'(a)')
'nulvar'
908 IF (
master.and.lwrite)
THEN
subroutine read_biopar(model, inp, out, lwrite)
subroutine read_icepar(model, inp, out, lwrite)
subroutine, public get_date(date_str)
subroutine, public inp_par(model)
subroutine lbc_report(iunit, ifield, s)
character(len=256) aparnam
character(len=256) fbionam
type(t_io), dimension(:), allocatable grx
character(len=256) bparnam
character(len=256) sparnam
character(len=256) fposnam
character(len=256) sourcefile
character(len=256) iparnam
character(len=256) sposnam
integer, parameter io_nf90
integer, parameter io_pio
integer, dimension(:), allocatable idbvar
integer, dimension(:), allocatable idtbot
integer, dimension(:), allocatable idtsur
character(len=44) date_str
integer, dimension(:), allocatable idtclm
integer, dimension(:), allocatable idtvar
integer, dimension(:), allocatable istvar
real(dp), dimension(:,:), allocatable fscale
integer, dimension(:), allocatable idtnud
character(len=maxlen), dimension(6, 0:nv) vname
integer, dimension(:,:,:), allocatable iinfo
character(len=100), dimension(mdims) dim_name
integer, dimension(mdims) dim_size
subroutine, public netcdf_get_dim(ng, model, ncname, ncid, dimname, dimsize, dimid)
type(t_adv), dimension(:,:), allocatable hadvection
type(t_lbc), dimension(:,:,:), allocatable ad_lbc
type(t_adv), dimension(:,:), allocatable tl_hadvection
integer, dimension(:), allocatable tilesize
type(t_adv), dimension(:,:), allocatable ad_hadvection
integer, dimension(:), allocatable im
integer, dimension(:), allocatable ntclm
integer, dimension(:), allocatable n
type(t_bounds), dimension(:), allocatable bounds
type(t_lbc), dimension(:,:,:), allocatable tl_lbc
integer, parameter r3dvar
integer, dimension(:), allocatable jm
integer, dimension(:), allocatable halobry
integer, dimension(:), allocatable halosizei
type(t_iobounds), dimension(:), allocatable iobounds
integer, dimension(:), allocatable halosizej
type(t_adv), dimension(:,:), allocatable tl_vadvection
type(t_lbc), dimension(:,:,:), allocatable lbc
type(t_domain), dimension(:), allocatable domain
integer, dimension(:), allocatable lm
type(t_adv), dimension(:,:), allocatable vadvection
integer, dimension(:), allocatable ntilei
integer, dimension(:), allocatable nt
integer, dimension(:), allocatable mm
integer, dimension(:), allocatable tileside
type(t_adv), dimension(:,:), allocatable ad_vadvection
integer, dimension(:), allocatable ntilej
subroutine, public pio_netcdf_get_dim(ng, model, ncname, piofile, dimname, dimsize, dimid)
real(r8), dimension(:), allocatable tkenu4
real(dp), dimension(:,:), allocatable m3obc_out
logical, dimension(:), allocatable luvsponge
logical, dimension(:), allocatable lnudgem2clm
real(dp), dimension(:), allocatable dt
logical, dimension(:), allocatable lsponge
logical, dimension(:), allocatable lprocessobc
logical, dimension(:), allocatable ewperiodic
logical, dimension(:), allocatable nsperiodic
logical, dimension(:), allocatable lnudging
real(dp), dimension(:), allocatable znudg
logical, dimension(:), allocatable lm3clm
real(dp), dimension(:,:,:), allocatable tobc_out
logical, dimension(:), allocatable lsshclm
real(dp), dimension(:), allocatable m2nudg
real(dp), dimension(:,:), allocatable fsobc_out
logical, dimension(:), allocatable lprocesstides
real(dp), dimension(:,:,:), allocatable tobc_in
real(dp), dimension(:,:), allocatable tnudg
logical, dimension(:,:), allocatable ltracersponge
integer, dimension(:), allocatable ndtfast
real(r8), dimension(:), allocatable ad_visc4
real(dp), dimension(:), allocatable obcfac
real(r8), dimension(:), allocatable tl_visc4
logical, dimension(:), allocatable lwrtinfo
logical, dimension(:), allocatable nudgingcoeff
logical, dimension(:), allocatable lnudgem3clm
logical, dimension(:,:), allocatable compositegrid
real(r8), dimension(:), allocatable nl_visc4
logical, dimension(:), allocatable lclimatology
logical, dimension(:), allocatable lm2clm
real(dp), dimension(:), allocatable m3nudg
real(dp), dimension(:), allocatable dtfast
real(dp), dimension(:,:), allocatable m2obc_out
logical, dimension(:), allocatable refinedgrid
logical, dimension(:,:), allocatable ltracerclm
integer, dimension(:), allocatable refinescale
logical, dimension(:,:), allocatable lnudgetclm
real(r8), dimension(:), allocatable so_decay
real(dp), dimension(:,:), allocatable m2obc_in
real(dp), dimension(:,:), allocatable fsobc_in
real(dp), dimension(:,:), allocatable m3obc_in
character(len=2048) coptions
subroutine ran_seed(sequence, size, put, get)
integer function, public stdinp_unit(mymaster, gotfile)
logical function, public founderror(flag, noerr, line, routine)
subroutine tadv_report(iunit, model, hadv, vadv, lwrite)
subroutine, public tile_obs_bounds(model, my_im, my_jm, my_lm, my_mm, my_domain)
subroutine, public tile_indices(model, my_im, my_jm, my_lm, my_mm, my_bounds, my_domain, my_iobounds)
subroutine read_fltbiopar(model, inp, out, lwrite)
subroutine read_asspar(model, inp, out, lwrite)
subroutine read_fltpar(model, inp, out, lwrite)
subroutine read_phypar(model, inp, out, lwrite)
subroutine read_stapar(model, inp, out, lwrite)
subroutine read_sedpar(model, inp, out, lwrite)