86 real(RP),
public,
allocatable ::
ocean_t2 (:,:)
87 real(RP),
public,
allocatable ::
ocean_q2 (:,:)
92 real(RP),
public,
allocatable ::
atmos_w (:,:)
93 real(RP),
public,
allocatable ::
atmos_u (:,:)
94 real(RP),
public,
allocatable ::
atmos_v (:,:)
96 real(RP),
public,
allocatable ::
atmos_qv (:,:)
112 logical,
private :: ocean_vars_checkrange = .false.
114 integer,
private,
parameter :: vmax = 14
115 integer,
private,
parameter :: i_temp = 1
116 integer,
private,
parameter :: i_sfc_temp = 2
117 integer,
private,
parameter :: i_alb_lw = 3
118 integer,
private,
parameter :: i_alb_sw = 4
119 integer,
private,
parameter :: i_sfc_z0m = 5
120 integer,
private,
parameter :: i_sfc_z0h = 6
121 integer,
private,
parameter :: i_sfc_z0e = 7
122 integer,
private,
parameter :: i_sflx_mw = 8
123 integer,
private,
parameter :: i_sflx_mu = 9
124 integer,
private,
parameter :: i_sflx_mv = 10
125 integer,
private,
parameter :: i_sflx_sh = 11
126 integer,
private,
parameter :: i_sflx_lh = 12
127 integer,
private,
parameter :: i_sflx_wh = 13
128 integer,
private,
parameter :: i_sflx_evap = 14
130 character(len=H_SHORT),
private :: var_name(vmax)
131 character(len=H_MID),
private :: var_desc(vmax)
132 character(len=H_SHORT),
private :: var_unit(vmax)
133 integer,
private :: var_id(vmax)
134 integer,
private :: restart_fid = -1
136 logical,
private :: ocean_restart_in_check_coordinates = .true.
138 data var_name /
'OCEAN_TEMP', &
152 data var_desc /
'temperature at uppermost ocean layer', &
153 'ocean surface skin temperature', &
154 'ocean surface albedo (longwave)', &
155 'ocean surface albedo (shortwave)', &
156 'ocean surface roughness length (momentum)', &
157 'ocean surface roughness length (heat)', &
158 'ocean surface roughness length (vapor)', &
159 'ocean surface w-momentum flux', &
160 'ocean surface u-momentum flux', &
161 'ocean surface v-momentum flux', &
162 'ocean surface sensible heat flux', &
163 'ocean surface latent heat flux', &
164 'ocean surface water heat flux', &
165 'ocean surface water vapor flux' /
166 data var_unit /
'K', &
192 namelist / param_ocean_vars / &
195 ocean_restart_in_check_coordinates, &
201 ocean_vars_checkrange
208 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[VARS] / Categ[OCEAN] / Origin[SCALE-RM]' 291 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 292 elseif( ierr > 0 )
then 293 write(*,*)
'xxx Not appropriate names in namelist PARAM_OCEAN_VARS. Check!' 299 if(
io_l )
write(
io_fid_log,*)
'*** List of prognostic variables (OCEAN) ***' 301 '*** |',
'VARNAME ',
'|', &
302 'DESCRIPTION ',
'[',
'UNIT ',
']' 304 if(
io_l )
write(
io_fid_log,
'(1x,A,I3,A,A24,A,A48,A,A12,A)') &
305 '*** NO.',iv,
'|',var_name(iv),
'|',var_desc(iv),
'[',var_unit(iv),
']' 335 fileio_check_coordinates
340 character(len=19) :: timelabel
341 character(len=H_LONG) :: basename
345 if(
io_l )
write(
io_fid_log,*)
'*** Open restart file (OCEAN) ***' 361 if ( ocean_restart_in_check_coordinates )
then 362 call fileio_check_coordinates( restart_fid )
366 if(
io_l )
write(
io_fid_log,*)
'*** restart file for ocean is not specified.' 381 if ( restart_fid /= -1 )
then 383 if(
io_l )
write(
io_fid_log,*)
'*** Read from restart file (OCEAN) ***' 386 restart_fid, var_name(i_temp),
'XY', step=1 )
388 restart_fid, var_name(i_sfc_temp),
'XY', step=1 )
390 restart_fid, var_name(i_alb_lw),
'XY', step=1 )
392 restart_fid, var_name(i_alb_sw),
'XY', step=1 )
394 restart_fid, var_name(i_sfc_z0m),
'XY', step=1 )
396 restart_fid, var_name(i_sfc_z0h),
'XY', step=1 )
398 restart_fid, var_name(i_sfc_z0e),
'XY', step=1 )
401 restart_fid, var_name(i_sflx_mw),
'XY', step=1 )
403 restart_fid, var_name(i_sflx_mu),
'XY', step=1 )
405 restart_fid, var_name(i_sflx_mv),
'XY', step=1 )
407 restart_fid, var_name(i_sflx_sh),
'XY', step=1 )
409 restart_fid, var_name(i_sflx_lh),
'XY', step=1 )
411 restart_fid, var_name(i_sflx_wh),
'XY', step=1 )
413 restart_fid, var_name(i_sflx_evap),
'XY', step=1 )
419 if(
io_l )
write(
io_fid_log,*)
'*** invalid restart file ID for ocean.' 433 if ( ocean_vars_checkrange )
then 450 call hist_in(
ocean_temp(:,:), var_name(i_temp), var_desc(i_temp), var_unit(i_temp) )
451 call hist_in(
ocean_sfc_temp(:,:), var_name(i_sfc_temp), var_desc(i_sfc_temp), var_unit(i_sfc_temp) )
452 call hist_in(
ocean_sfc_albedo(:,:,i_lw), var_name(i_alb_lw), var_desc(i_alb_lw), var_unit(i_alb_lw) )
453 call hist_in(
ocean_sfc_albedo(:,:,i_sw), var_name(i_alb_sw), var_desc(i_alb_sw), var_unit(i_alb_sw) )
454 call hist_in(
ocean_sfc_z0m(:,:), var_name(i_sfc_z0m), var_desc(i_sfc_z0m), var_unit(i_sfc_z0m) )
455 call hist_in(
ocean_sfc_z0h(:,:), var_name(i_sfc_z0h), var_desc(i_sfc_z0h), var_unit(i_sfc_z0h) )
456 call hist_in(
ocean_sfc_z0e(:,:), var_name(i_sfc_z0e), var_desc(i_sfc_z0e), var_unit(i_sfc_z0e) )
458 call hist_in(
ocean_sflx_mw(:,:), var_name(i_sflx_mw), var_desc(i_sflx_mw), var_unit(i_sflx_mw) )
459 call hist_in(
ocean_sflx_mu(:,:), var_name(i_sflx_mu), var_desc(i_sflx_mu), var_unit(i_sflx_mu) )
460 call hist_in(
ocean_sflx_mv(:,:), var_name(i_sflx_mv), var_desc(i_sflx_mv), var_unit(i_sflx_mv) )
461 call hist_in(
ocean_sflx_sh(:,:), var_name(i_sflx_sh), var_desc(i_sflx_sh), var_unit(i_sflx_sh) )
462 call hist_in(
ocean_sflx_lh(:,:), var_name(i_sflx_lh), var_desc(i_sflx_lh), var_unit(i_sflx_lh) )
463 call hist_in(
ocean_sflx_wh(:,:), var_name(i_sflx_wh), var_desc(i_sflx_wh), var_unit(i_sflx_wh) )
464 call hist_in(
ocean_sflx_evap(:,:), var_name(i_sflx_evap), var_desc(i_sflx_evap), var_unit(i_sflx_evap) )
482 call stat_total( total,
ocean_temp(:,:), var_name(i_temp) )
483 call stat_total( total,
ocean_sfc_temp(:,:), var_name(i_sfc_temp) )
486 call stat_total( total,
ocean_sfc_z0m(:,:), var_name(i_sfc_z0m) )
487 call stat_total( total,
ocean_sfc_z0h(:,:), var_name(i_sfc_z0h) )
488 call stat_total( total,
ocean_sfc_z0e(:,:), var_name(i_sfc_z0e) )
490 call stat_total( total,
ocean_sflx_mw(:,:), var_name(i_sflx_mw) )
491 call stat_total( total,
ocean_sflx_mu(:,:), var_name(i_sflx_mu) )
492 call stat_total( total,
ocean_sflx_mv(:,:), var_name(i_sflx_mv) )
493 call stat_total( total,
ocean_sflx_sh(:,:), var_name(i_sflx_sh) )
494 call stat_total( total,
ocean_sflx_lh(:,:), var_name(i_sflx_lh) )
495 call stat_total( total,
ocean_sflx_wh(:,:), var_name(i_sflx_wh) )
508 OCEAN_SFC_albedo_in, &
514 real(RP),
intent(in) :: ocean_temp_in (
ia,
ja)
515 real(RP),
intent(in) :: ocean_sfc_temp_in (
ia,
ja)
516 real(RP),
intent(in) :: ocean_sfc_albedo_in(
ia,
ja,2)
517 real(RP),
intent(in) :: ocean_sfc_z0m_in (
ia,
ja)
518 real(RP),
intent(in) :: ocean_sfc_z0h_in (
ia,
ja)
519 real(RP),
intent(in) :: ocean_sfc_z0e_in (
ia,
ja)
523 if(
io_l )
write(
io_fid_log,*)
'*** External Input file (ocean) ***' 556 character(len=19) :: timelabel
557 character(len=H_LONG) :: basename
563 if(
io_l )
write(
io_fid_log,*)
'*** Create restart file (OCEAN) ***' 589 if ( restart_fid /= -1 )
then 604 if ( restart_fid /= -1 )
then 606 if(
io_l )
write(
io_fid_log,*)
'*** Close restart file (OCEAN) ***' 624 if ( restart_fid /= -1 )
then 626 call fileio_def_var( restart_fid, var_id(i_temp), var_name(i_temp), var_desc(i_temp), &
628 call fileio_def_var( restart_fid, var_id(i_sfc_temp), var_name(i_sfc_temp), var_desc(i_sfc_temp), &
630 call fileio_def_var( restart_fid, var_id(i_alb_lw), var_name(i_alb_lw), var_desc(i_alb_lw), &
632 call fileio_def_var( restart_fid, var_id(i_alb_sw), var_name(i_alb_sw), var_desc(i_alb_sw), &
634 call fileio_def_var( restart_fid, var_id(i_sfc_z0m), var_name(i_sfc_z0m), var_desc(i_sfc_z0m), &
636 call fileio_def_var( restart_fid, var_id(i_sfc_z0h), var_name(i_sfc_z0h), var_desc(i_sfc_z0h), &
638 call fileio_def_var( restart_fid, var_id(i_sfc_z0e), var_name(i_sfc_z0e), var_desc(i_sfc_z0e), &
640 call fileio_def_var( restart_fid, var_id(i_sflx_mw), var_name(i_sflx_mw), var_desc(i_sflx_mw), &
642 call fileio_def_var( restart_fid, var_id(i_sflx_mu), var_name(i_sflx_mu), var_desc(i_sflx_mu), &
644 call fileio_def_var( restart_fid, var_id(i_sflx_mv), var_name(i_sflx_mv), var_desc(i_sflx_mv), &
646 call fileio_def_var( restart_fid, var_id(i_sflx_sh), var_name(i_sflx_sh), var_desc(i_sflx_sh), &
648 call fileio_def_var( restart_fid, var_id(i_sflx_lh), var_name(i_sflx_lh), var_desc(i_sflx_lh), &
650 call fileio_def_var( restart_fid, var_id(i_sflx_wh), var_name(i_sflx_wh), var_desc(i_sflx_wh), &
652 call fileio_def_var( restart_fid, var_id(i_sflx_evap), var_name(i_sflx_evap), var_desc(i_sflx_evap), &
668 if ( restart_fid /= -1 )
then 672 call fileio_write_var( restart_fid, var_id(i_temp),
ocean_temp(:,:), &
673 var_name(i_temp),
'XY', nohalo=.true. )
674 call fileio_write_var( restart_fid, var_id(i_sfc_temp),
ocean_sfc_temp(:,:), &
675 var_name(i_sfc_temp),
'XY', nohalo=.true. )
676 call fileio_write_var( restart_fid, var_id(i_alb_lw),
ocean_sfc_albedo(:,:,i_lw), &
677 var_name(i_alb_lw),
'XY', nohalo=.true. )
678 call fileio_write_var( restart_fid, var_id(i_alb_sw),
ocean_sfc_albedo(:,:,i_sw), &
679 var_name(i_alb_sw),
'XY', nohalo=.true. )
680 call fileio_write_var( restart_fid, var_id(i_sfc_z0m),
ocean_sfc_z0m(:,:), &
681 var_name(i_sfc_z0m),
'XY', nohalo=.true. )
682 call fileio_write_var( restart_fid, var_id(i_sfc_z0h),
ocean_sfc_z0h(:,:), &
683 var_name(i_sfc_z0h),
'XY', nohalo=.true. )
684 call fileio_write_var( restart_fid, var_id(i_sfc_z0e),
ocean_sfc_z0e(:,:), &
685 var_name(i_sfc_z0e),
'XY', nohalo=.true. )
686 call fileio_write_var( restart_fid, var_id(i_sflx_mw),
ocean_sflx_mw(:,:), &
687 var_name(i_sflx_mw),
'XY', nohalo=.true. )
688 call fileio_write_var( restart_fid, var_id(i_sflx_mu),
ocean_sflx_mu(:,:), &
689 var_name(i_sflx_mu),
'XY', nohalo=.true. )
690 call fileio_write_var( restart_fid, var_id(i_sflx_mv),
ocean_sflx_mv(:,:), &
691 var_name(i_sflx_mv),
'XY', nohalo=.true. )
692 call fileio_write_var( restart_fid, var_id(i_sflx_sh),
ocean_sflx_sh(:,:), &
693 var_name(i_sflx_sh),
'XY', nohalo=.true. )
694 call fileio_write_var( restart_fid, var_id(i_sflx_lh),
ocean_sflx_lh(:,:), &
695 var_name(i_sflx_lh),
'XY', nohalo=.true. )
696 call fileio_write_var( restart_fid, var_id(i_sflx_wh),
ocean_sflx_wh(:,:), &
697 var_name(i_sflx_wh),
'XY', nohalo=.true. )
698 call fileio_write_var( restart_fid, var_id(i_sflx_evap),
ocean_sflx_evap(:,:), &
699 var_name(i_sflx_evap),
'XY', nohalo=.true. )
real(rp), dimension(:,:), allocatable, public ocean_v10
ocean surface velocity v at 10m [m/s]
integer, public is
start point of inner domain: x, local
real(rp), dimension(:,:), allocatable, public atmos_w
logical, public statistics_checktotal
calc&report variable totals to logfile?
real(rp), dimension(:,:), allocatable, public ocean_sfc_temp_t
tendency of OCEAN_SFC_TEMP
integer, public je
end point of inner domain: y, local
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0e_t
tendency of OCEAN_SFC_Z0E
real(rp), dimension(:,:,:), allocatable, public ocean_sfc_albedo
ocean surface albedo (0-1)
real(rp), dimension(:,:), allocatable, public atmos_dens
integer, public const_i_lw
long-wave radiation index
subroutine, public prc_mpistop
Abort MPI.
subroutine, public ocean_vars_restart_open
Open ocean restart file for read.
real(rp), dimension(:,:,:), allocatable, public ocean_sfc_albedo_t
tendency of OCEAN_SFC_alebdo
logical, public io_l
output log or not? (this process)
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0e
ocean surface roughness length for vapor [m]
real(rp), dimension(:,:), allocatable, public ocean_temp
temperature at uppermost ocean layer [K]
subroutine, public ocean_vars_restart_write
Write ocean variables to restart file.
subroutine, public fileio_flush(fid)
Flush all pending requests to a netCDF file (PnetCDF only)
real(rp), dimension(:,:), allocatable, public atmos_v
subroutine, public ocean_vars_history
History output set for ocean variables.
character(len=h_short), public ocean_restart_out_dtype
REAL4 or REAL8.
real(rp), dimension(:,:), allocatable, public ocean_sflx_wh
ocean surface water heat flux [J/m2/s]
subroutine, public ocean_vars_restart_def_var
Define ocean variables in restart file.
real(rp), dimension(:,:), allocatable, public atmos_sflx_lw
subroutine, public ocean_vars_restart_enddef
Exit netCDF define mode.
real(rp), dimension(:,:), allocatable, public ocean_temp_t
tendency of OCEAN_TEMP
real(rp), public const_undef
subroutine, public ocean_vars_restart_create
Create ocean restart file.
logical, public io_nml
output log or not? (for namelist, this process)
real(rp), dimension(:,:), allocatable, public atmos_cossza
integer, public ia
of whole cells: x, local, with HALO
real(rp), dimension(:,:), allocatable, public ocean_sflx_mv
ocean surface v-momentum flux [kg/m2/s]
subroutine, public time_gettimelabel(timelabel)
generate time label
real(rp), dimension(:,:), allocatable, public atmos_sfc_pres
real(rp), dimension(:,:), allocatable, public atmos_qv
logical, public ocean_restart_out_postfix_timelabel
Add timelabel to the basename of output file?
subroutine, public ocean_vars_total
Budget monitor for ocean.
subroutine, public fileio_create(fid, basename, title, datatype, date, subsec, append, nozcoord)
Create/open a netCDF file.
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0h_t
tendency of OCEAN_SFC_Z0H
logical, public ocean_restart_in_postfix_timelabel
Add timelabel to the basename of input file?
integer, public js
start point of inner domain: y, local
real(rp), dimension(:,:), allocatable, public atmos_sflx_prec
subroutine, public ocean_vars_external_in(OCEAN_TEMP_in, OCEAN_SFC_TEMP_in, OCEAN_SFC_albedo_in, OCEAN_SFC_Z0M_in, OCEAN_SFC_Z0H_in, OCEAN_SFC_Z0E_in)
Input from External I/O.
real(rp), dimension(:,:), allocatable, public atmos_temp
subroutine, public ocean_vars_restart_read
Read ocean restart.
real(rp), dimension(:,:), allocatable, public ocean_sflx_mw
ocean surface w-momentum flux [kg/m2/s]
real(rp), dimension(:,:), allocatable, public ocean_sflx_mu
ocean surface u-momentum flux [kg/m2/s]
real(rp), dimension(:,:), allocatable, public ocean_q2
ocean surface water vapor at 2m [kg/kg]
subroutine, public fileio_enddef(fid)
Exit netCDF file define mode.
real(rp), dimension(:,:), allocatable, public atmos_u
integer, public ie
end point of inner domain: x, local
real(rp), dimension(:,:), allocatable, public atmos_sflx_sw
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0m
ocean surface roughness length for momentum [m]
real(rp), dimension(:,:), allocatable, public atmos_pbl
logical, public io_aggregate
do parallel I/O through PnetCDF
subroutine, public fileio_open(fid, basename)
open a netCDF file for read
integer, public const_i_sw
short-wave radiation index
subroutine, public fileio_def_var(fid, vid, varname, desc, unit, axistype, datatype, timeintv, nsteps)
Define a variable to file.
subroutine, public ocean_vars_setup
Setup.
real(rp), dimension(:,:), allocatable, public ocean_sflx_sh
ocean surface sensible heat flux [J/m2/s]
character(len=h_long), public ocean_restart_in_basename
Basename of the input file.
real(rp), dimension(:,:), allocatable, public ocean_sfc_temp
ocean surface skin temperature [K]
subroutine, public fileio_close(fid)
Close a netCDF file.
character(len=h_long), public ocean_restart_out_basename
Basename of the output file.
integer, public io_fid_conf
Config file ID.
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0m_t
tendency of OCEAN_SFC_Z0M
logical, public ocean_restart_output
Output restart file?
integer, public io_fid_log
Log file ID.
subroutine, public ocean_vars_restart_close
Close restart file.
real(rp), dimension(:,:), allocatable, public atmos_pres
real(rp), dimension(:,:), allocatable, public ocean_sflx_lh
ocean surface latent heat flux [J/m2/s]
real(rp), dimension(:,:), allocatable, public ocean_u10
ocean surface velocity u at 10m [m/s]
real(rp), dimension(:,:), allocatable, public ocean_sflx_evap
ocean surface water vapor flux [kg/m2/s]
real(rp), dimension(:,:), allocatable, public ocean_sfc_z0h
ocean surface roughness length for heat [m]
real(rp), dimension(:,:), allocatable, public ocean_t2
ocean surface temperature at 2m [K]
integer, public io_fid_nml
Log file ID (only for output namelist)
character(len=h_mid), public ocean_restart_out_title
Title of the output file.
integer, public ja
of whole cells: y, local, with HALO