00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 MODULE seq_infodata_mod
00025
00026
00027
00028 use shr_kind_mod, only : SHR_KIND_CS, SHR_KIND_CL, SHR_KIND_IN, &
00029 SHR_KIND_R8, SHR_KIND_I8
00030 use shr_sys_mod, only : shr_sys_flush, shr_sys_abort, shr_sys_getenv
00031 use shr_ncio_mod, only : shr_ncio_descripType, shr_ncio_open, &
00032 shr_ncio_close
00033 use seq_comm_mct, only : logunit, loglevel
00034 use seq_comm_mct, only : seq_comm_setptrs, seq_comm_iamroot
00035 use shr_orb_mod
00036
00037 implicit none
00038
00039 private
00040
00041
00042
00043 public :: seq_infodata_type
00044
00045
00046
00047 public :: seq_infodata_Init
00048 public :: seq_infodata_GetData
00049 public :: seq_infodata_PutData
00050 public :: seq_infodata_Restart
00051 public :: seq_infodata_Print
00052 public :: seq_infodata_Exchange
00053
00054
00055
00056
00057
00058
00059 character(len=*), public, parameter :: seq_infodata_start_type_start = "startup"
00060 character(len=*), public, parameter :: seq_infodata_start_type_cont = "continue"
00061 character(len=*), public, parameter :: seq_infodata_start_type_brnch = "branch"
00062
00063
00064
00065 type seq_infodata_type
00066 private
00067
00068
00069 character(SHR_KIND_CL) :: start_type
00070 character(SHR_KIND_CS) :: case_name
00071 character(SHR_KIND_CL) :: case_desc
00072 character(SHR_KIND_CL) :: model_version
00073 character(SHR_KIND_CS) :: username
00074 character(SHR_KIND_CS) :: hostname
00075 character(SHR_KIND_CL) :: timing_dir
00076 character(SHR_KIND_CL) :: tchkpt_dir
00077 logical :: atm_adiabatic
00078 logical :: atm_ideal_phys
00079 logical :: aqua_planet
00080 integer(SHR_KIND_IN) :: aqua_planet_sst
00081 logical :: brnch_retain_casename
00082 logical :: read_restart
00083 character(SHR_KIND_CL) :: restart_pfile
00084 character(SHR_KIND_CL) :: restart_file
00085 logical :: single_column
00086 real (SHR_KIND_R8) :: scmlat
00087 real (SHR_KIND_R8) :: scmlon
00088 character(SHR_KIND_CS) :: logFilePostFix
00089 character(SHR_KIND_CL) :: outPathRoot
00090 logical :: perpetual
00091 integer(SHR_KIND_IN) :: perpetual_ymd
00092 real(SHR_KIND_R8) :: orb_eccen
00093 real(SHR_KIND_R8) :: orb_obliqr
00094 real(SHR_KIND_R8) :: orb_lambm0
00095 real(SHR_KIND_R8) :: orb_mvelpp
00096 character(SHR_KIND_CL) :: flux_epbal
00097 logical :: flux_albav
00098 logical :: samegrid_ao
00099 logical :: samegrid_ro
00100 logical :: samegrid_al
00101 logical :: shr_map_dopole
00102 logical :: npfix
00103 character(SHR_KIND_CS) :: aoflux_grid
00104 logical :: ocean_tight_coupling
00105 logical :: cpl_cdf64
00106 logical :: do_budgets
00107 logical :: do_histinit
00108 integer :: budget_inst
00109 integer :: budget_daily
00110 integer :: budget_month
00111 integer :: budget_ann
00112 integer :: budget_ltann
00113 integer :: budget_ltend
00114 logical :: drv_threading
00115 logical :: histaux_a2x
00116 logical :: histaux_a2x3hr
00117 logical :: histaux_a2x3hrp
00118 logical :: histaux_a2x24hr
00119 logical :: histaux_l2x
00120 logical :: histaux_r2x
00121 real(SHR_KIND_R8) :: eps_frac
00122 real(SHR_KIND_R8) :: eps_amask
00123 real(SHR_KIND_R8) :: eps_agrid
00124 real(SHR_KIND_R8) :: eps_aarea
00125 real(SHR_KIND_R8) :: eps_omask
00126 real(SHR_KIND_R8) :: eps_ogrid
00127 real(SHR_KIND_R8) :: eps_oarea
00128
00129
00130 integer(SHR_KIND_IN) :: info_debug
00131 logical :: bfbflag
00132
00133
00134 logical :: atm_present
00135 logical :: atm_prognostic
00136 logical :: lnd_present
00137 logical :: lnd_prognostic
00138 logical :: rof_present
00139 logical :: ocn_present
00140 logical :: ocn_prognostic
00141 logical :: ocnrof_prognostic
00142 logical :: ice_present
00143 logical :: ice_prognostic
00144 logical :: glc_present
00145 logical :: glc_prognostic
00146 logical :: sno_present
00147 logical :: sno_prognostic
00148 logical :: dead_comps
00149 integer(SHR_KIND_IN) :: atm_nx
00150 integer(SHR_KIND_IN) :: atm_ny
00151 integer(SHR_KIND_IN) :: lnd_nx
00152 integer(SHR_KIND_IN) :: lnd_ny
00153 integer(SHR_KIND_IN) :: ice_nx
00154 integer(SHR_KIND_IN) :: ice_ny
00155 integer(SHR_KIND_IN) :: ocn_nx
00156 integer(SHR_KIND_IN) :: ocn_ny
00157 integer(SHR_KIND_IN) :: rof_nx
00158 integer(SHR_KIND_IN) :: rof_ny
00159 integer(SHR_KIND_IN) :: glc_nx
00160 integer(SHR_KIND_IN) :: glc_ny
00161 integer(SHR_KIND_IN) :: sno_nx
00162 integer(SHR_KIND_IN) :: sno_ny
00163
00164
00165 real(SHR_KIND_R8) :: nextsw_cday
00166 real(SHR_KIND_R8) :: precip_fact
00167 integer(SHR_KIND_IN) :: atm_phase
00168 integer(SHR_KIND_IN) :: lnd_phase
00169 integer(SHR_KIND_IN) :: ice_phase
00170 integer(SHR_KIND_IN) :: ocn_phase
00171 integer(SHR_KIND_IN) :: glc_phase
00172 logical :: atm_aero
00173 logical :: glcrun_alarm
00174 logical :: glc_g2supdate
00175
00176
00177 character(SHR_KIND_CS) :: rest_case_name
00178 end type seq_infodata_type
00179
00180
00181
00182
00183
00184
00185 integer, parameter :: nrestvar = 17
00186 character(len=*),parameter :: restname(nrestvar) =
00187 (/'case_name ','case_desc ',
00188 'atm_adiabatic ','atm_ideal_phys ','aqua_planet ',
00189 'single_column ','scmlon ','scmlat ',
00190 'perpetual ','perpetual_ymd ','flux_albav ','flux_epbal ',
00191 'orb_eccen ','orb_lambm0 ','orb_mvelpp ',
00192 'nextsw_cday ','precip_fact ' /)
00193 character(len=*),parameter :: restlnam(nrestvar) =
00194 (/'case name ','case description',
00195 'atm adiabatic fl','atm ideal phys f','aqua planet flag',
00196 'single column fl','scam longitude ','scam latitude ',
00197 'perpetual flag ','perpetual date ','flux albav flag ','flux epbal opt ',
00198 'orb eccentricity','lon perh at ve ','mov ve lon perh ',
00199 'radiat calc time','precip factor ' /)
00200 character(len=*),parameter :: restunit(nrestvar) =
00201 (/'name ','name ',
00202 'logical ','logical ','logical ',
00203 'logical ','degrees ','degrees ',
00204 'logical ','date [YYYYMMDD] ','logical ','name ',
00205 'nondim ','radians ','radians ',
00206 'calday ','nondim ' /)
00207 character(len=*),parameter :: resttype(nrestvar) =
00208 (/'char ','char ',
00209 'logical ','logical ','logical ',
00210 'logical ','real8 ','real8 ',
00211 'logical ','integer ','logical ','char ',
00212 'real8 ','real8 ','real8 ',
00213 'real8 ','real8 ' /)
00214
00215 character(len=*),parameter :: sp_str = 'str_undefined'
00216
00217
00218 CONTAINS
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233 SUBROUTINE seq_infodata_Init( infodata, nmlfile, ID)
00234
00235
00236
00237 use shr_file_mod, only : shr_file_getUnit, shr_file_freeUnit
00238 use shr_string_mod, only : shr_string_toUpper, shr_string_listAppend
00239
00240 implicit none
00241
00242
00243
00244 type(seq_infodata_type), intent(INOUT) :: infodata
00245 character(len=*), intent(IN) :: nmlfile
00246 integer(SHR_KIND_IN), intent(IN) :: ID
00247
00248
00249
00250
00251 character(len=*), parameter :: subname = '(seq_infodata_Init) '
00252 integer(SHR_KIND_IN),parameter :: aqua_perpetual_ymd = 321
00253
00254 integer :: mpicom
00255 integer :: ierr
00256 integer :: unitn
00257
00258
00259 character(SHR_KIND_CL) :: case_desc
00260 character(SHR_KIND_CS) :: case_name
00261 character(SHR_KIND_CL) :: model_version
00262 character(SHR_KIND_CS) :: username
00263 character(SHR_KIND_CS) :: hostname
00264 character(SHR_KIND_CL) :: start_type
00265 character(SHR_KIND_CL) :: timing_dir
00266 character(SHR_KIND_CL) :: tchkpt_dir
00267 logical :: atm_adiabatic
00268 logical :: atm_ideal_phys
00269 logical :: aqua_planet
00270 integer(SHR_KIND_IN) :: aqua_planet_sst
00271 logical :: brnch_retain_casename
00272 integer(SHR_KIND_IN) :: info_debug
00273 logical :: bfbflag
00274 character(SHR_KIND_CL) :: restart_pfile
00275 character(SHR_KIND_CL) :: restart_file
00276 logical :: single_column
00277 real (SHR_KIND_R8) :: scmlat
00278 real (SHR_KIND_R8) :: scmlon
00279 character(SHR_KIND_CS) :: logFilePostFix
00280 character(SHR_KIND_CL) :: outPathRoot
00281 logical :: perpetual
00282 integer(SHR_KIND_IN) :: perpetual_ymd
00283 integer(SHR_KIND_IN) :: orb_iyear_AD
00284 real(SHR_KIND_R8) :: orb_obliq
00285 real(SHR_KIND_R8) :: orb_eccen
00286 real(SHR_KIND_R8) :: orb_mvelp
00287 real(SHR_KIND_R8) :: orb_obliqr
00288 real(SHR_KIND_R8) :: orb_lambm0
00289 real(SHR_KIND_R8) :: orb_mvelpp
00290 character(SHR_KIND_CL) :: flux_epbal
00291 logical :: flux_albav
00292 logical :: samegrid_ao
00293 logical :: samegrid_ro
00294 logical :: samegrid_al
00295 logical :: shr_map_dopole
00296 logical :: npfix
00297 character(SHR_KIND_CS) :: aoflux_grid
00298 logical :: ocean_tight_coupling
00299 logical :: cpl_cdf64
00300 logical :: do_budgets
00301 logical :: do_histinit
00302 integer :: budget_inst
00303 integer :: budget_daily
00304 integer :: budget_month
00305 integer :: budget_ann
00306 integer :: budget_ltann
00307 integer :: budget_ltend
00308 logical :: histaux_a2x
00309 logical :: histaux_a2x3hr
00310 logical :: histaux_a2x3hrp
00311 logical :: histaux_a2x24hr
00312 logical :: histaux_l2x
00313 logical :: histaux_r2x
00314 logical :: drv_threading
00315 real(SHR_KIND_R8) :: eps_frac
00316 real(SHR_KIND_R8) :: eps_amask
00317 real(SHR_KIND_R8) :: eps_agrid
00318 real(SHR_KIND_R8) :: eps_aarea
00319 real(SHR_KIND_R8) :: eps_omask
00320 real(SHR_KIND_R8) :: eps_ogrid
00321 real(SHR_KIND_R8) :: eps_oarea
00322
00323
00324 namelist /seq_infodata_inparm/ &
00325 case_desc, case_name, start_type, tchkpt_dir, &
00326 model_version, username, hostname, timing_dir, &
00327 atm_adiabatic, atm_ideal_phys, aqua_planet,aqua_planet_sst, &
00328 brnch_retain_casename, info_debug, bfbflag, &
00329 restart_pfile, restart_file, &
00330 single_column, scmlat, &
00331 scmlon, logFilePostFix, outPathRoot, &
00332 perpetual, perpetual_ymd, flux_epbal, flux_albav, &
00333 orb_iyear_AD, orb_obliq, orb_eccen, orb_mvelp, &
00334 samegrid_ao, samegrid_ro, samegrid_al, &
00335 shr_map_dopole, npfix, aoflux_grid, do_histinit, &
00336 ocean_tight_coupling, do_budgets, drv_threading, &
00337 budget_inst, budget_daily, budget_month, &
00338 budget_ann, budget_ltann, budget_ltend, &
00339 histaux_a2x ,histaux_a2x3hr,histaux_a2x3hrp, &
00340 histaux_a2x24hr,histaux_l2x ,histaux_r2x, &
00341 cpl_cdf64, eps_frac, eps_amask, &
00342 eps_agrid, eps_aarea, eps_omask, eps_ogrid, &
00343 eps_oarea
00344
00345
00346
00347 call seq_comm_setptrs(ID,mpicom=mpicom)
00348
00349
00350
00351
00352 if (seq_comm_iamroot(ID)) then
00353
00354
00355
00356
00357 case_desc = ' '
00358 case_name = ' '
00359 model_version = 'unknown'
00360 username = 'unknown'
00361 hostname = 'unknown'
00362 timing_dir = '.'
00363 tchkpt_dir = '.'
00364 start_type = ' '
00365 atm_ideal_phys = .false.
00366 atm_adiabatic = .false.
00367 aqua_planet = .false.
00368 aqua_planet_sst = 1
00369 brnch_retain_casename = .false.
00370 info_debug = 1
00371 bfbflag = .false.
00372 restart_pfile = 'rpointer.drv'
00373 restart_file = trim(sp_str)
00374 single_column = .false.
00375 scmlat = -999.
00376 scmlon = -999.
00377 logFilePostFix = '.log'
00378 outPathRoot = './'
00379 perpetual = .false.
00380 perpetual_ymd = -999
00381 orb_iyear_AD = SHR_ORB_UNDEF_INT
00382 orb_obliq = SHR_ORB_UNDEF_REAL
00383 orb_eccen = SHR_ORB_UNDEF_REAL
00384 orb_mvelp = SHR_ORB_UNDEF_REAL
00385 flux_epbal = 'off'
00386 flux_albav = .false.
00387 samegrid_ao = .true.
00388 samegrid_ro = .false.
00389 samegrid_al = .true.
00390 shr_map_dopole = .true.
00391 npfix = .true.
00392 aoflux_grid = 'ocn'
00393 ocean_tight_coupling = .false.
00394 cpl_cdf64 = .true.
00395 do_budgets = .false.
00396 do_histinit = .false.
00397 budget_inst = 0
00398 budget_daily = 0
00399 budget_month = 1
00400 budget_ann = 1
00401 budget_ltann = 1
00402 budget_ltend = 0
00403 histaux_a2x = .false.
00404 histaux_a2x3hr = .false.
00405 histaux_a2x3hrp = .false.
00406 histaux_a2x24hr = .false.
00407 histaux_l2x = .false.
00408 histaux_r2x = .false.
00409 drv_threading = .false.
00410 eps_frac = 1.0e-02_SHR_KIND_R8
00411 eps_amask = 1.0e-13_SHR_KIND_R8
00412 eps_agrid = 1.0e-12_SHR_KIND_R8
00413 eps_aarea = 9.0e-07_SHR_KIND_R8
00414 eps_omask = 1.0e-06_SHR_KIND_R8
00415 eps_ogrid = 1.0e-02_SHR_KIND_R8
00416 eps_oarea = 1.0e-01_SHR_KIND_R8
00417
00418
00419
00420 unitn = shr_file_getUnit()
00421 write(logunit,"(A)") subname,' read seq_infodata_inparm namelist from: '//trim(nmlfile)
00422 open( unitn, file=trim(nmlfile), status='old' )
00423 ierr = 1
00424 do while( ierr /= 0 )
00425 read(unitn,nml=seq_infodata_inparm,iostat=ierr)
00426 if (ierr < 0) then
00427 call shr_sys_abort( subname//':: namelist read returns an'// &
00428 ' end of file or end of record condition' )
00429 end if
00430 end do
00431 close(unitn)
00432 call shr_file_freeUnit( unitn )
00433
00434
00435
00436
00437 infodata%case_desc = case_desc
00438 infodata%case_name = case_name
00439 infodata%model_version = model_version
00440 infodata%username = username
00441 infodata%hostname = hostname
00442 infodata%start_type = start_type
00443 infodata%timing_dir = timing_dir
00444 infodata%tchkpt_dir = tchkpt_dir
00445 infodata%atm_ideal_phys = atm_ideal_phys
00446 infodata%atm_adiabatic = atm_adiabatic
00447 infodata%aqua_planet = aqua_planet
00448 infodata%aqua_planet_sst = aqua_planet_sst
00449 infodata%brnch_retain_casename = brnch_retain_casename
00450 infodata%restart_pfile = restart_pfile
00451 infodata%restart_file = restart_file
00452 infodata%single_column = single_column
00453 infodata%scmlat = scmlat
00454 infodata%scmlon = scmlon
00455 infodata%logFilePostFix = logFilePostFix
00456 infodata%outPathRoot = outPathRoot
00457 infodata%perpetual = perpetual
00458 infodata%perpetual_ymd = perpetual_ymd
00459 infodata%flux_epbal = flux_epbal
00460 infodata%flux_albav = flux_albav
00461 infodata%samegrid_ao = samegrid_ao
00462 infodata%samegrid_ro = samegrid_ro
00463 infodata%samegrid_al = samegrid_al
00464 infodata%shr_map_dopole = shr_map_dopole
00465 infodata%npfix = npfix
00466 infodata%aoflux_grid = aoflux_grid
00467 infodata%ocean_tight_coupling = ocean_tight_coupling
00468 infodata%cpl_cdf64 = cpl_cdf64
00469 infodata%do_budgets = do_budgets
00470 infodata%do_histinit = do_histinit
00471 infodata%budget_inst = budget_inst
00472 infodata%budget_daily = budget_daily
00473 infodata%budget_month = budget_month
00474 infodata%budget_ann = budget_ann
00475 infodata%budget_ltann = budget_ltann
00476 infodata%budget_ltend = budget_ltend
00477 infodata%histaux_a2x = histaux_a2x
00478 infodata%histaux_a2x3hr = histaux_a2x3hr
00479 infodata%histaux_a2x3hrp = histaux_a2x3hrp
00480 infodata%histaux_a2x24hr = histaux_a2x24hr
00481 infodata%histaux_l2x = histaux_l2x
00482 infodata%histaux_r2x = histaux_r2x
00483 infodata%drv_threading = drv_threading
00484 infodata%eps_frac = eps_frac
00485 infodata%eps_amask = eps_amask
00486 infodata%eps_agrid = eps_agrid
00487 infodata%eps_aarea = eps_aarea
00488 infodata%eps_omask = eps_omask
00489 infodata%eps_ogrid = eps_ogrid
00490 infodata%eps_oarea = eps_oarea
00491
00492 infodata%info_debug = info_debug
00493 infodata%bfbflag = bfbflag
00494
00495 infodata%atm_present = .true.
00496 infodata%lnd_present = .true.
00497 if (single_column) then
00498 infodata%rof_present = .false.
00499 else
00500 infodata%rof_present = .true.
00501 end if
00502 infodata%ocn_present = .true.
00503 infodata%ice_present = .true.
00504 infodata%glc_present = .true.
00505 infodata%sno_present = .false.
00506 infodata%atm_prognostic = .false.
00507 infodata%lnd_prognostic = .false.
00508 infodata%ocn_prognostic = .false.
00509 infodata%ocnrof_prognostic = .false.
00510 infodata%ice_prognostic = .false.
00511 infodata%glc_prognostic = .false.
00512 infodata%sno_prognostic = .false.
00513 infodata%dead_comps = .false.
00514 infodata%atm_nx = 0
00515 infodata%atm_ny = 0
00516 infodata%lnd_nx = 0
00517 infodata%lnd_ny = 0
00518 infodata%rof_nx = 0
00519 infodata%rof_ny = 0
00520 infodata%ice_nx = 0
00521 infodata%ice_ny = 0
00522 infodata%ocn_nx = 0
00523 infodata%ocn_ny = 0
00524 infodata%glc_nx = 0
00525 infodata%glc_ny = 0
00526 infodata%sno_nx = 0
00527 infodata%sno_ny = 0
00528
00529 infodata%nextsw_cday = -1.0_SHR_KIND_R8
00530 infodata%precip_fact = 1.0_SHR_KIND_R8
00531 infodata%atm_phase = 1
00532 infodata%lnd_phase = 1
00533 infodata%ocn_phase = 1
00534 infodata%ice_phase = 1
00535 infodata%glc_phase = 1
00536 infodata%atm_aero = .false.
00537 infodata%glcrun_alarm = .false.
00538 infodata%glc_g2supdate= .false.
00539
00540 call shr_orb_params(orb_iyear_AD, orb_eccen, orb_obliq, orb_mvelp, &
00541 orb_obliqr, orb_lambm0, orb_mvelpp, .true.)
00542 infodata%orb_eccen = orb_eccen
00543 infodata%orb_obliqr = orb_obliqr
00544 infodata%orb_lambm0 = orb_lambm0
00545 infodata%orb_mvelpp = orb_mvelpp
00546
00547
00548 infodata%rest_case_name = ' '
00549 infodata%read_restart = .false.
00550 if (trim(start_type) == trim(seq_infodata_start_type_cont) .or. &
00551 trim(start_type) == trim(seq_infodata_start_type_brnch)) then
00552 infodata%read_restart = .true.
00553 endif
00554 if (infodata%read_restart) then
00555 call seq_infodata_Restart('read', infodata)
00556 endif
00557
00558 if (infodata%aqua_planet) then
00559 infodata%atm_present = .true.
00560 infodata%lnd_present = .false.
00561 infodata%rof_present = .false.
00562 infodata%ice_present = .false.
00563 infodata%ocn_present = .true.
00564 infodata%glc_present = .false.
00565 infodata%sno_present = .false.
00566 end if
00567 if (infodata%atm_adiabatic .or. infodata%atm_ideal_phys) then
00568 infodata%atm_present = .true.
00569 infodata%lnd_present = .false.
00570 infodata%rof_present = .false.
00571 infodata%ice_present = .false.
00572 infodata%ocn_present = .false.
00573 infodata%glc_present = .false.
00574 infodata%sno_present = .false.
00575 end if
00576
00577 if ( infodata%aqua_planet ) then
00578 infodata%aqua_planet_sst = 1
00579 infodata%perpetual = .true.
00580 infodata%perpetual_ymd = aqua_perpetual_ymd
00581 endif
00582
00583
00584 call seq_infodata_Check( infodata )
00585
00586 end if
00587
00588 call seq_infodata_bcast(infodata,mpicom)
00589
00590 END SUBROUTINE seq_infodata_Init
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602 SUBROUTINE seq_infodata_GetData( infodata, case_name, case_desc, timing_dir, &
00603 model_version, username, hostname, rest_case_name, tchkpt_dir, &
00604 start_type, restart_pfile, restart_file, perpetual, perpetual_ymd, &
00605 aqua_planet,aqua_planet_sst, atm_ideal_phys, atm_adiabatic, brnch_retain_casename, &
00606 single_column, scmlat,scmlon,logFilePostFix, outPathRoot, &
00607 atm_present, atm_prognostic, lnd_present, lnd_prognostic, &
00608 rof_present, ocn_present, ocn_prognostic, ocnrof_prognostic, &
00609 ice_present, ice_prognostic, glc_present, glc_prognostic, &
00610 sno_present, sno_prognostic, bfbflag, samegrid_ro, &
00611 samegrid_ao, samegrid_al, info_debug, dead_comps, read_restart, &
00612 shr_map_dopole, npfix, aoflux_grid, &
00613 nextsw_cday, precip_fact, flux_epbal, flux_albav, glcrun_alarm, &
00614 glc_g2supdate, atm_aero, &
00615 ocean_tight_coupling, do_budgets, do_histinit, drv_threading, &
00616 budget_inst, budget_daily, budget_month, &
00617 budget_ann, budget_ltann, budget_ltend , &
00618 histaux_a2x , histaux_a2x3hr, histaux_a2x3hrp , &
00619 histaux_a2x24hr, histaux_l2x , histaux_r2x , &
00620 cpl_cdf64, &
00621 orb_eccen, orb_obliqr, orb_lambm0, orb_mvelpp, glc_phase, &
00622 atm_phase, lnd_phase, ocn_phase, ice_phase, atm_nx, atm_ny, &
00623 lnd_nx, lnd_ny, rof_nx, rof_ny, ice_nx, ice_ny, ocn_nx, ocn_ny, &
00624 glc_nx, glc_ny, sno_nx, sno_ny, eps_frac, eps_amask, &
00625 eps_agrid, eps_aarea, eps_omask, eps_ogrid, eps_oarea )
00626
00627
00628 implicit none
00629
00630
00631
00632 type(seq_infodata_type), intent(IN) :: infodata
00633 character(len=*), optional, intent(OUT) :: start_type
00634 character(len=*), optional, intent(OUT) :: case_name
00635 character(len=*), optional, intent(OUT) :: case_desc
00636 character(len=*), optional, intent(OUT) :: model_version
00637 character(len=*), optional, intent(OUT) :: username
00638 character(len=*), optional, intent(OUT) :: hostname
00639 character(len=*), optional, intent(OUT) :: rest_case_name
00640 character(len=*), optional, intent(OUT) :: timing_dir
00641 character(len=*), optional, intent(OUT) :: tchkpt_dir
00642 logical, optional, intent(OUT) :: atm_adiabatic
00643 logical, optional, intent(OUT) :: atm_ideal_phys
00644 logical, optional, intent(OUT) :: aqua_planet
00645 integer(SHR_KIND_IN),optional, intent(OUT) :: aqua_planet_sst
00646 logical, optional, intent(OUT) :: brnch_retain_casename
00647 logical, optional, intent(OUT) :: read_restart
00648 character(len=*), optional, intent(OUT) :: restart_pfile
00649 character(len=*), optional, intent(OUT) :: restart_file
00650 logical, optional, intent(OUT) :: single_column
00651 real (SHR_KIND_R8), optional, intent(OUT) :: scmlat
00652 real (SHR_KIND_R8), optional, intent(OUT) :: scmlon
00653 character(len=*), optional, intent(OUT) :: logFilePostFix
00654 character(len=*), optional, intent(OUT) :: outPathRoot
00655 logical, optional, intent(OUT) :: perpetual
00656 integer, optional, intent(OUT) :: perpetual_ymd
00657 real(SHR_KIND_R8) ,optional, intent(OUT) :: orb_eccen
00658 real(SHR_KIND_R8) ,optional, intent(OUT) :: orb_obliqr
00659 real(SHR_KIND_R8) ,optional, intent(OUT) :: orb_lambm0
00660 real(SHR_KIND_R8) ,optional, intent(OUT) :: orb_mvelpp
00661 character(len=*) ,optional, intent(OUT) :: flux_epbal
00662 logical ,optional, intent(OUT) :: flux_albav
00663 logical ,optional, intent(OUT) :: samegrid_ao
00664 logical ,optional, intent(OUT) :: samegrid_ro
00665 logical ,optional, intent(OUT) :: samegrid_al
00666 logical ,optional, intent(OUT) :: shr_map_dopole
00667 logical ,optional, intent(OUT) :: npfix
00668 character(len=*) ,optional, intent(OUT) :: aoflux_grid
00669 logical ,optional, intent(OUT) :: ocean_tight_coupling
00670 logical ,optional, intent(OUT) :: cpl_cdf64
00671 logical ,optional, intent(OUT) :: do_budgets
00672 logical ,optional, intent(OUT) :: do_histinit
00673 integer ,optional, intent(OUT) :: budget_inst
00674 integer ,optional, intent(OUT) :: budget_daily
00675 integer ,optional, intent(OUT) :: budget_month
00676 integer ,optional, intent(OUT) :: budget_ann
00677 integer ,optional, intent(OUT) :: budget_ltann
00678 integer ,optional, intent(OUT) :: budget_ltend
00679 logical ,optional, intent(OUT) :: histaux_a2x
00680 logical ,optional, intent(OUT) :: histaux_a2x3hr
00681 logical ,optional, intent(OUT) :: histaux_a2x3hrp
00682 logical ,optional, intent(OUT) :: histaux_a2x24hr
00683 logical ,optional, intent(OUT) :: histaux_l2x
00684 logical ,optional, intent(OUT) :: histaux_r2x
00685 logical ,optional, intent(OUT) :: drv_threading
00686 real(SHR_KIND_R8) ,optional, intent(OUT) :: eps_frac
00687 real(SHR_KIND_R8) ,optional, intent(OUT) :: eps_amask
00688 real(SHR_KIND_R8) ,optional, intent(OUT) :: eps_agrid
00689 real(SHR_KIND_R8) ,optional, intent(OUT) :: eps_aarea
00690 real(SHR_KIND_R8) ,optional, intent(OUT) :: eps_omask
00691 real(SHR_KIND_R8) ,optional, intent(OUT) :: eps_ogrid
00692 real(SHR_KIND_R8) ,optional, intent(OUT) :: eps_oarea
00693
00694 integer(SHR_KIND_IN),optional, intent(OUT) :: info_debug
00695 logical ,optional, intent(OUT) :: bfbflag
00696 logical ,optional, intent(OUT) :: dead_comps
00697
00698 logical ,optional, intent(OUT) :: atm_present
00699 logical ,optional, intent(OUT) :: atm_prognostic
00700 logical ,optional, intent(OUT) :: lnd_present
00701 logical ,optional, intent(OUT) :: lnd_prognostic
00702 logical ,optional, intent(OUT) :: rof_present
00703 logical ,optional, intent(OUT) :: ocn_present
00704 logical ,optional, intent(OUT) :: ocn_prognostic
00705 logical ,optional, intent(OUT) :: ocnrof_prognostic
00706 logical ,optional, intent(OUT) :: ice_present
00707 logical ,optional, intent(OUT) :: ice_prognostic
00708 logical ,optional, intent(OUT) :: glc_present
00709 logical ,optional, intent(OUT) :: glc_prognostic
00710 logical ,optional, intent(OUT) :: sno_present
00711 logical ,optional, intent(OUT) :: sno_prognostic
00712 integer(SHR_KIND_IN),optional, intent(OUT) :: atm_nx
00713 integer(SHR_KIND_IN),optional, intent(OUT) :: atm_ny
00714 integer(SHR_KIND_IN),optional, intent(OUT) :: lnd_nx
00715 integer(SHR_KIND_IN),optional, intent(OUT) :: lnd_ny
00716 integer(SHR_KIND_IN),optional, intent(OUT) :: rof_nx
00717 integer(SHR_KIND_IN),optional, intent(OUT) :: rof_ny
00718 integer(SHR_KIND_IN),optional, intent(OUT) :: ice_nx
00719 integer(SHR_KIND_IN),optional, intent(OUT) :: ice_ny
00720 integer(SHR_KIND_IN),optional, intent(OUT) :: ocn_nx
00721 integer(SHR_KIND_IN),optional, intent(OUT) :: ocn_ny
00722 integer(SHR_KIND_IN),optional, intent(OUT) :: glc_nx
00723 integer(SHR_KIND_IN),optional, intent(OUT) :: glc_ny
00724 integer(SHR_KIND_IN),optional, intent(OUT) :: sno_nx
00725 integer(SHR_KIND_IN),optional, intent(OUT) :: sno_ny
00726
00727 real(SHR_KIND_R8) ,optional, intent(OUT) :: nextsw_cday
00728 real(SHR_KIND_R8) ,optional, intent(OUT) :: precip_fact
00729 integer(SHR_KIND_IN),optional, intent(OUT) :: atm_phase
00730 integer(SHR_KIND_IN),optional, intent(OUT) :: lnd_phase
00731 integer(SHR_KIND_IN),optional, intent(OUT) :: ice_phase
00732 integer(SHR_KIND_IN),optional, intent(OUT) :: ocn_phase
00733 integer(SHR_KIND_IN),optional, intent(OUT) :: glc_phase
00734 logical ,optional, intent(OUT) :: atm_aero
00735 logical ,optional, intent(OUT) :: glcrun_alarm
00736 logical ,optional, intent(OUT) :: glc_g2supdate
00737
00738
00739
00740
00741 character(len=*), parameter :: subname = '(seq_infodata_GetData) '
00742
00743
00744
00745 if ( present(start_type) ) start_type = infodata%start_type
00746 if ( present(case_name) ) case_name = infodata%case_name
00747 if ( present(case_desc) ) case_desc = infodata%case_desc
00748 if ( present(model_version) ) model_version = infodata%model_version
00749 if ( present(username) ) username = infodata%username
00750 if ( present(hostname) ) hostname = infodata%hostname
00751 if ( present(rest_case_name) ) rest_case_name = infodata%rest_case_name
00752 if ( present(timing_dir) ) timing_dir = infodata%timing_dir
00753 if ( present(tchkpt_dir) ) tchkpt_dir = infodata%tchkpt_dir
00754 if ( present(atm_adiabatic) ) atm_adiabatic = infodata%atm_adiabatic
00755 if ( present(atm_ideal_phys) ) atm_ideal_phys = infodata%atm_ideal_phys
00756 if ( present(aqua_planet) ) aqua_planet = infodata%aqua_planet
00757 if ( present(aqua_planet_sst)) aqua_planet_sst= infodata%aqua_planet_sst
00758 if ( present(brnch_retain_casename) ) &
00759 brnch_retain_casename = infodata%brnch_retain_casename
00760 if ( present(read_restart) ) read_restart = infodata%read_restart
00761 if ( present(restart_pfile) ) restart_pfile = infodata%restart_pfile
00762 if ( present(restart_file) ) restart_file = infodata%restart_file
00763 if ( present(single_column) ) single_column = infodata%single_column
00764 if ( present(scmlat) ) scmlat = infodata%scmlat
00765 if ( present(scmlon) ) scmlon = infodata%scmlon
00766 if ( present(logFilePostFix) ) logFilePostFix = infodata%logFilePostFix
00767 if ( present(outPathRoot) ) outPathRoot = infodata%outPathRoot
00768 if ( present(perpetual) ) perpetual = infodata%perpetual
00769 if ( present(perpetual_ymd) ) perpetual_ymd = infodata%perpetual_ymd
00770 if ( present(orb_eccen) ) orb_eccen = infodata%orb_eccen
00771 if ( present(orb_obliqr) ) orb_obliqr = infodata%orb_obliqr
00772 if ( present(orb_lambm0) ) orb_lambm0 = infodata%orb_lambm0
00773 if ( present(orb_mvelpp) ) orb_mvelpp = infodata%orb_mvelpp
00774 if ( present(flux_epbal) ) flux_epbal = infodata%flux_epbal
00775 if ( present(flux_albav) ) flux_albav = infodata%flux_albav
00776 if ( present(samegrid_ao) ) samegrid_ao = infodata%samegrid_ao
00777 if ( present(samegrid_ro) ) samegrid_ro = infodata%samegrid_ro
00778 if ( present(samegrid_al) ) samegrid_al = infodata%samegrid_al
00779 if ( present(shr_map_dopole) ) shr_map_dopole = infodata%shr_map_dopole
00780 if ( present(npfix) ) npfix = infodata%npfix
00781 if ( present(aoflux_grid) ) aoflux_grid = infodata%aoflux_grid
00782 if ( present(ocean_tight_coupling)) ocean_tight_coupling = infodata%ocean_tight_coupling
00783 if ( present(cpl_cdf64) ) cpl_cdf64 = infodata%cpl_cdf64
00784 if ( present(do_budgets) ) do_budgets = infodata%do_budgets
00785 if ( present(do_histinit) ) do_histinit = infodata%do_histinit
00786 if ( present(budget_inst) ) budget_inst = infodata%budget_inst
00787 if ( present(budget_daily) ) budget_daily = infodata%budget_daily
00788 if ( present(budget_month) ) budget_month = infodata%budget_month
00789 if ( present(budget_ann) ) budget_ann = infodata%budget_ann
00790 if ( present(budget_ltann) ) budget_ltann = infodata%budget_ltann
00791 if ( present(budget_ltend) ) budget_ltend = infodata%budget_ltend
00792 if ( present(histaux_a2x) ) histaux_a2x = infodata%histaux_a2x
00793 if ( present(histaux_a2x3hr) ) histaux_a2x3hr = infodata%histaux_a2x3hr
00794 if ( present(histaux_a2x3hrp)) histaux_a2x3hrp= infodata%histaux_a2x3hrp
00795 if ( present(histaux_a2x24hr)) histaux_a2x24hr= infodata%histaux_a2x24hr
00796 if ( present(histaux_l2x) ) histaux_l2x = infodata%histaux_l2x
00797 if ( present(histaux_r2x) ) histaux_r2x = infodata%histaux_r2x
00798 if ( present(drv_threading) ) drv_threading = infodata%drv_threading
00799 if ( present(eps_frac) ) eps_frac = infodata%eps_frac
00800 if ( present(eps_amask) ) eps_amask = infodata%eps_amask
00801 if ( present(eps_agrid) ) eps_agrid = infodata%eps_agrid
00802 if ( present(eps_aarea) ) eps_aarea = infodata%eps_aarea
00803 if ( present(eps_omask) ) eps_omask = infodata%eps_omask
00804 if ( present(eps_ogrid) ) eps_ogrid = infodata%eps_ogrid
00805 if ( present(eps_oarea) ) eps_oarea = infodata%eps_oarea
00806
00807 if ( present(info_debug) ) info_debug = infodata%info_debug
00808 if ( present(bfbflag) ) bfbflag = infodata%bfbflag
00809 if ( present(dead_comps) ) dead_comps = infodata%dead_comps
00810
00811 if ( present(atm_present) ) atm_present = infodata%atm_present
00812 if ( present(atm_prognostic) ) atm_prognostic = infodata%atm_prognostic
00813 if ( present(lnd_present) ) lnd_present = infodata%lnd_present
00814 if ( present(lnd_prognostic) ) lnd_prognostic = infodata%lnd_prognostic
00815 if ( present(rof_present) ) rof_present = infodata%rof_present
00816 if ( present(ocn_present) ) ocn_present = infodata%ocn_present
00817 if ( present(ocn_prognostic) ) ocn_prognostic = infodata%ocn_prognostic
00818 if ( present(ocnrof_prognostic) ) ocnrof_prognostic = infodata%ocnrof_prognostic
00819 if ( present(ice_present) ) ice_present = infodata%ice_present
00820 if ( present(ice_prognostic) ) ice_prognostic = infodata%ice_prognostic
00821 if ( present(glc_present) ) glc_present = infodata%glc_present
00822 if ( present(glc_prognostic) ) glc_prognostic = infodata%glc_prognostic
00823 if ( present(sno_present) ) sno_present = infodata%sno_present
00824 if ( present(sno_prognostic) ) sno_prognostic = infodata%sno_prognostic
00825 if ( present(atm_nx) ) atm_nx = infodata%atm_nx
00826 if ( present(atm_ny) ) atm_ny = infodata%atm_ny
00827 if ( present(lnd_nx) ) lnd_nx = infodata%lnd_nx
00828 if ( present(lnd_ny) ) lnd_ny = infodata%lnd_ny
00829 if ( present(rof_nx) ) rof_nx = infodata%rof_nx
00830 if ( present(rof_ny) ) rof_ny = infodata%rof_ny
00831 if ( present(ice_nx) ) ice_nx = infodata%ice_nx
00832 if ( present(ice_ny) ) ice_ny = infodata%ice_ny
00833 if ( present(ocn_nx) ) ocn_nx = infodata%ocn_nx
00834 if ( present(ocn_ny) ) ocn_ny = infodata%ocn_ny
00835 if ( present(glc_nx) ) glc_nx = infodata%glc_nx
00836 if ( present(glc_ny) ) glc_ny = infodata%glc_ny
00837 if ( present(sno_nx) ) sno_nx = infodata%sno_nx
00838 if ( present(sno_ny) ) sno_ny = infodata%sno_ny
00839
00840 if ( present(nextsw_cday) ) nextsw_cday = infodata%nextsw_cday
00841 if ( present(precip_fact) ) precip_fact = infodata%precip_fact
00842 if ( present(atm_phase) ) atm_phase = infodata%atm_phase
00843 if ( present(lnd_phase) ) lnd_phase = infodata%lnd_phase
00844 if ( present(ice_phase) ) ice_phase = infodata%ice_phase
00845 if ( present(ocn_phase) ) ocn_phase = infodata%ocn_phase
00846 if ( present(glc_phase) ) glc_phase = infodata%glc_phase
00847 if ( present(atm_aero) ) atm_aero = infodata%atm_aero
00848 if ( present(glcrun_alarm) ) glcrun_alarm = infodata%glcrun_alarm
00849 if ( present(glc_g2supdate) ) glc_g2supdate = infodata%glc_g2supdate
00850
00851 END SUBROUTINE seq_infodata_GetData
00852
00853
00854
00855
00856
00857
00858
00859
00860
00861
00862 SUBROUTINE seq_infodata_PutData( infodata, case_name, case_desc, timing_dir, &
00863 model_version, username, hostname, rest_case_name, tchkpt_dir, &
00864 start_type, restart_pfile, restart_file, perpetual, perpetual_ymd, &
00865 aqua_planet,aqua_planet_sst, atm_ideal_phys, atm_adiabatic, brnch_retain_casename, &
00866 single_column, scmlat,scmlon,logFilePostFix, outPathRoot, &
00867 atm_present, atm_prognostic, lnd_present, lnd_prognostic, &
00868 rof_present, ocn_present, ocn_prognostic, ocnrof_prognostic, &
00869 ice_present, ice_prognostic, glc_present, glc_prognostic, &
00870 sno_present, sno_prognostic, bfbflag, samegrid_ro, &
00871 samegrid_ao, samegrid_al, info_debug, dead_comps, read_restart, &
00872 shr_map_dopole, npfix, aoflux_grid, &
00873 nextsw_cday, precip_fact, flux_epbal, flux_albav, glcrun_alarm, &
00874 glc_g2supdate, atm_aero, &
00875 ocean_tight_coupling, do_budgets, do_histinit, drv_threading, &
00876 budget_inst, budget_daily, budget_month, &
00877 budget_ann, budget_ltann, budget_ltend , &
00878 histaux_a2x , histaux_a2x3hr, histaux_a2x3hrp , &
00879 histaux_a2x24hr, histaux_l2x , histaux_r2x , &
00880 cpl_cdf64, &
00881 orb_eccen, orb_obliqr, orb_lambm0, orb_mvelpp, glc_phase, &
00882 atm_phase, lnd_phase, ocn_phase, ice_phase, atm_nx, atm_ny, &
00883 lnd_nx, lnd_ny, rof_nx, rof_ny, ice_nx, ice_ny, ocn_nx, ocn_ny, &
00884 glc_nx, glc_ny, sno_nx, sno_ny, eps_frac, eps_amask, &
00885 eps_agrid, eps_aarea, eps_omask, eps_ogrid, eps_oarea )
00886
00887
00888 implicit none
00889
00890
00891
00892 type(seq_infodata_type), intent(INOUT) :: infodata
00893 character(len=*), optional, intent(IN) :: start_type
00894 character(len=*), optional, intent(IN) :: case_name
00895 character(len=*), optional, intent(IN) :: case_desc
00896 character(len=*), optional, intent(IN) :: model_version
00897 character(len=*), optional, intent(IN) :: username
00898 character(len=*), optional, intent(IN) :: hostname
00899 character(len=*), optional, intent(IN) :: rest_case_name
00900 character(len=*), optional, intent(IN) :: timing_dir
00901 character(len=*), optional, intent(IN) :: tchkpt_dir
00902 logical, optional, intent(IN) :: atm_adiabatic
00903 logical, optional, intent(IN) :: atm_ideal_phys
00904 logical, optional, intent(IN) :: aqua_planet
00905 integer(SHR_KIND_IN),optional, intent(IN) :: aqua_planet_sst
00906 logical, optional, intent(IN) :: brnch_retain_casename
00907 logical, optional, intent(IN) :: read_restart
00908 character(len=*), optional, intent(IN) :: restart_pfile
00909 character(len=*), optional, intent(IN) :: restart_file
00910 logical, optional, intent(IN) :: single_column
00911 real (SHR_KIND_R8), optional, intent(IN) :: scmlat
00912 real (SHR_KIND_R8), optional, intent(IN) :: scmlon
00913 character(len=*), optional, intent(IN) :: logFilePostFix
00914 character(len=*), optional, intent(IN) :: outPathRoot
00915 logical, optional, intent(IN) :: perpetual
00916 integer, optional, intent(IN) :: perpetual_ymd
00917 real(SHR_KIND_R8) ,optional, intent(IN) :: orb_eccen
00918 real(SHR_KIND_R8) ,optional, intent(IN) :: orb_obliqr
00919 real(SHR_KIND_R8) ,optional, intent(IN) :: orb_lambm0
00920 real(SHR_KIND_R8) ,optional, intent(IN) :: orb_mvelpp
00921 character(len=*) ,optional, intent(IN) :: flux_epbal
00922 logical ,optional, intent(IN) :: flux_albav
00923 logical ,optional, intent(IN) :: samegrid_ao
00924 logical ,optional, intent(IN) :: samegrid_ro
00925 logical ,optional, intent(IN) :: samegrid_al
00926 logical ,optional, intent(IN) :: shr_map_dopole
00927 logical ,optional, intent(IN) :: npfix
00928 character(len=*) ,optional, intent(IN) :: aoflux_grid
00929 logical ,optional, intent(IN) :: ocean_tight_coupling
00930 logical ,optional, intent(IN) :: cpl_cdf64
00931 logical ,optional, intent(IN) :: do_budgets
00932 logical ,optional, intent(IN) :: do_histinit
00933 integer ,optional, intent(IN) :: budget_inst
00934 integer ,optional, intent(IN) :: budget_daily
00935 integer ,optional, intent(IN) :: budget_month
00936 integer ,optional, intent(IN) :: budget_ann
00937 integer ,optional, intent(IN) :: budget_ltann
00938 integer ,optional, intent(IN) :: budget_ltend
00939 logical ,optional, intent(IN) :: histaux_a2x
00940 logical ,optional, intent(IN) :: histaux_a2x3hr
00941 logical ,optional, intent(IN) :: histaux_a2x3hrp
00942 logical ,optional, intent(IN) :: histaux_a2x24hr
00943 logical ,optional, intent(IN) :: histaux_l2x
00944 logical ,optional, intent(IN) :: histaux_r2x
00945 logical ,optional, intent(IN) :: drv_threading
00946 real(SHR_KIND_R8) ,optional, intent(IN) :: eps_frac
00947 real(SHR_KIND_R8) ,optional, intent(IN) :: eps_amask
00948 real(SHR_KIND_R8) ,optional, intent(IN) :: eps_agrid
00949 real(SHR_KIND_R8) ,optional, intent(IN) :: eps_aarea
00950 real(SHR_KIND_R8) ,optional, intent(IN) :: eps_omask
00951 real(SHR_KIND_R8) ,optional, intent(IN) :: eps_ogrid
00952 real(SHR_KIND_R8) ,optional, intent(IN) :: eps_oarea
00953
00954 integer(SHR_KIND_IN),optional, intent(IN) :: info_debug
00955 logical ,optional, intent(IN) :: bfbflag
00956 logical ,optional, intent(IN) :: dead_comps
00957
00958 logical ,optional, intent(IN) :: atm_present
00959 logical ,optional, intent(IN) :: atm_prognostic
00960 logical ,optional, intent(IN) :: lnd_present
00961 logical ,optional, intent(IN) :: lnd_prognostic
00962 logical ,optional, intent(IN) :: rof_present
00963 logical ,optional, intent(IN) :: ocn_present
00964 logical ,optional, intent(IN) :: ocn_prognostic
00965 logical ,optional, intent(IN) :: ocnrof_prognostic
00966 logical ,optional, intent(IN) :: ice_present
00967 logical ,optional, intent(IN) :: ice_prognostic
00968 logical ,optional, intent(IN) :: glc_present
00969 logical ,optional, intent(IN) :: glc_prognostic
00970 logical ,optional, intent(IN) :: sno_present
00971 logical ,optional, intent(IN) :: sno_prognostic
00972 integer(SHR_KIND_IN),optional, intent(IN) :: atm_nx
00973 integer(SHR_KIND_IN),optional, intent(IN) :: atm_ny
00974 integer(SHR_KIND_IN),optional, intent(IN) :: lnd_nx
00975 integer(SHR_KIND_IN),optional, intent(IN) :: lnd_ny
00976 integer(SHR_KIND_IN),optional, intent(IN) :: rof_nx
00977 integer(SHR_KIND_IN),optional, intent(IN) :: rof_ny
00978 integer(SHR_KIND_IN),optional, intent(IN) :: ice_nx
00979 integer(SHR_KIND_IN),optional, intent(IN) :: ice_ny
00980 integer(SHR_KIND_IN),optional, intent(IN) :: ocn_nx
00981 integer(SHR_KIND_IN),optional, intent(IN) :: ocn_ny
00982 integer(SHR_KIND_IN),optional, intent(IN) :: glc_nx
00983 integer(SHR_KIND_IN),optional, intent(IN) :: glc_ny
00984 integer(SHR_KIND_IN),optional, intent(IN) :: sno_nx
00985 integer(SHR_KIND_IN),optional, intent(IN) :: sno_ny
00986
00987 real(SHR_KIND_R8) ,optional, intent(IN) :: nextsw_cday
00988 real(SHR_KIND_R8) ,optional, intent(IN) :: precip_fact
00989 integer(SHR_KIND_IN),optional, intent(IN) :: atm_phase
00990 integer(SHR_KIND_IN),optional, intent(IN) :: lnd_phase
00991 integer(SHR_KIND_IN),optional, intent(IN) :: ice_phase
00992 integer(SHR_KIND_IN),optional, intent(IN) :: ocn_phase
00993 integer(SHR_KIND_IN),optional, intent(IN) :: glc_phase
00994 logical ,optional, intent(IN) :: atm_aero
00995 logical ,optional, intent(IN) :: glcrun_alarm
00996 logical ,optional, intent(IN) :: glc_g2supdate
00997
00998
00999
01000
01001 character(len=*), parameter :: subname = '(seq_infodata_PutData) '
01002
01003
01004
01005 if ( present(start_type) ) infodata%start_type = start_type
01006 if ( present(case_name) ) infodata%case_name = case_name
01007 if ( present(case_desc) ) infodata%case_desc = case_desc
01008 if ( present(model_version) ) infodata%model_version = model_version
01009 if ( present(username) ) infodata%username = username
01010 if ( present(hostname) ) infodata%hostname = hostname
01011 if ( present(rest_case_name) ) infodata%rest_case_name = rest_case_name
01012 if ( present(timing_dir) ) infodata%timing_dir = timing_dir
01013 if ( present(tchkpt_dir) ) infodata%tchkpt_dir = tchkpt_dir
01014 if ( present(atm_adiabatic) ) infodata%atm_adiabatic = atm_adiabatic
01015 if ( present(atm_ideal_phys) ) infodata%atm_ideal_phys = atm_ideal_phys
01016 if ( present(aqua_planet) ) infodata%aqua_planet = aqua_planet
01017 if ( present(aqua_planet_sst)) infodata%aqua_planet_sst= aqua_planet_sst
01018 if ( present(brnch_retain_casename)) infodata%brnch_retain_casename = brnch_retain_casename
01019 if ( present(read_restart) ) infodata%read_restart = read_restart
01020 if ( present(restart_pfile) ) infodata%restart_pfile = restart_pfile
01021 if ( present(restart_file) ) infodata%restart_file = restart_file
01022 if ( present(single_column) ) infodata%single_column = single_column
01023 if ( present(scmlat) ) infodata%scmlat = scmlat
01024 if ( present(scmlon) ) infodata%scmlon = scmlon
01025 if ( present(logFilePostFix) ) infodata%logFilePostFix = logFilePostFix
01026 if ( present(outPathRoot) ) infodata%outPathRoot = outPathRoot
01027 if ( present(perpetual) ) infodata%perpetual = perpetual
01028 if ( present(perpetual_ymd) ) infodata%perpetual_ymd = perpetual_ymd
01029 if ( present(orb_eccen) ) infodata%orb_eccen = orb_eccen
01030 if ( present(orb_obliqr) ) infodata%orb_obliqr = orb_obliqr
01031 if ( present(orb_lambm0) ) infodata%orb_lambm0 = orb_lambm0
01032 if ( present(orb_mvelpp) ) infodata%orb_mvelpp = orb_mvelpp
01033 if ( present(flux_epbal) ) infodata%flux_epbal = flux_epbal
01034 if ( present(flux_albav) ) infodata%flux_albav = flux_albav
01035 if ( present(samegrid_ao) ) infodata%samegrid_ao = samegrid_ao
01036 if ( present(samegrid_ro) ) infodata%samegrid_ro = samegrid_ro
01037 if ( present(samegrid_al) ) infodata%samegrid_al = samegrid_al
01038 if ( present(shr_map_dopole) ) infodata%shr_map_dopole = shr_map_dopole
01039 if ( present(npfix) ) infodata%npfix = npfix
01040 if ( present(aoflux_grid) ) infodata%aoflux_grid = aoflux_grid
01041 if ( present(ocean_tight_coupling)) infodata%ocean_tight_coupling = ocean_tight_coupling
01042 if ( present(cpl_cdf64) ) infodata%cpl_cdf64 = cpl_cdf64
01043 if ( present(do_budgets) ) infodata%do_budgets = do_budgets
01044 if ( present(do_histinit) ) infodata%do_histinit = do_histinit
01045 if ( present(budget_inst) ) infodata%budget_inst = budget_inst
01046 if ( present(budget_daily) ) infodata%budget_daily = budget_daily
01047 if ( present(budget_month) ) infodata%budget_month = budget_month
01048 if ( present(budget_ann) ) infodata%budget_ann = budget_ann
01049 if ( present(budget_ltann) ) infodata%budget_ltann = budget_ltann
01050 if ( present(budget_ltend) ) infodata%budget_ltend = budget_ltend
01051 if ( present(histaux_a2x) ) infodata%histaux_a2x = histaux_a2x
01052 if ( present(histaux_a2x3hr) ) infodata%histaux_a2x3hr = histaux_a2x3hr
01053 if ( present(histaux_a2x3hrp)) infodata%histaux_a2x3hrp= histaux_a2x3hrp
01054 if ( present(histaux_a2x24hr)) infodata%histaux_a2x24hr= histaux_a2x24hr
01055 if ( present(histaux_l2x) ) infodata%histaux_l2x = histaux_l2x
01056 if ( present(histaux_r2x) ) infodata%histaux_r2x = histaux_r2x
01057 if ( present(drv_threading) ) infodata%drv_threading = drv_threading
01058 if ( present(eps_frac) ) infodata%eps_frac = eps_frac
01059 if ( present(eps_amask) ) infodata%eps_amask = eps_amask
01060 if ( present(eps_agrid) ) infodata%eps_agrid = eps_agrid
01061 if ( present(eps_aarea) ) infodata%eps_aarea = eps_aarea
01062 if ( present(eps_omask) ) infodata%eps_omask = eps_omask
01063 if ( present(eps_ogrid) ) infodata%eps_ogrid = eps_ogrid
01064 if ( present(eps_oarea) ) infodata%eps_oarea = eps_oarea
01065
01066 if ( present(info_debug) ) infodata%info_debug = info_debug
01067 if ( present(bfbflag) ) infodata%bfbflag = bfbflag
01068 if ( present(dead_comps) ) infodata%dead_comps = dead_comps
01069
01070 if ( present(atm_present) ) infodata%atm_present = atm_present
01071 if ( present(atm_prognostic) ) infodata%atm_prognostic = atm_prognostic
01072 if ( present(lnd_present) ) infodata%lnd_present = lnd_present
01073 if ( present(lnd_prognostic) ) infodata%lnd_prognostic = lnd_prognostic
01074 if ( present(rof_present) ) infodata%rof_present = rof_present
01075 if ( present(ocn_present) ) infodata%ocn_present = ocn_present
01076 if ( present(ocn_prognostic) ) infodata%ocn_prognostic = ocn_prognostic
01077 if ( present(ocnrof_prognostic)) infodata%ocnrof_prognostic = ocnrof_prognostic
01078 if ( present(ice_present) ) infodata%ice_present = ice_present
01079 if ( present(ice_prognostic) ) infodata%ice_prognostic = ice_prognostic
01080 if ( present(glc_present) ) infodata%glc_present = glc_present
01081 if ( present(glc_prognostic) ) infodata%glc_prognostic = glc_prognostic
01082 if ( present(sno_present) ) infodata%sno_present = sno_present
01083 if ( present(sno_prognostic) ) infodata%sno_prognostic = sno_prognostic
01084 if ( present(atm_nx) ) infodata%atm_nx = atm_nx
01085 if ( present(atm_ny) ) infodata%atm_ny = atm_ny
01086 if ( present(lnd_nx) ) infodata%lnd_nx = lnd_nx
01087 if ( present(lnd_ny) ) infodata%lnd_ny = lnd_ny
01088 if ( present(rof_nx) ) infodata%rof_nx = rof_nx
01089 if ( present(rof_ny) ) infodata%rof_ny = rof_ny
01090 if ( present(ice_nx) ) infodata%ice_nx = ice_nx
01091 if ( present(ice_ny) ) infodata%ice_ny = ice_ny
01092 if ( present(ocn_nx) ) infodata%ocn_nx = ocn_nx
01093 if ( present(ocn_ny) ) infodata%ocn_ny = ocn_ny
01094 if ( present(glc_nx) ) infodata%glc_nx = glc_nx
01095 if ( present(glc_ny) ) infodata%glc_ny = glc_ny
01096 if ( present(sno_nx) ) infodata%sno_nx = sno_nx
01097 if ( present(sno_ny) ) infodata%sno_ny = sno_ny
01098
01099 if ( present(nextsw_cday) ) infodata%nextsw_cday = nextsw_cday
01100 if ( present(precip_fact) ) infodata%precip_fact = precip_fact
01101 if ( present(atm_phase) ) infodata%atm_phase = atm_phase
01102 if ( present(lnd_phase) ) infodata%lnd_phase = lnd_phase
01103 if ( present(ice_phase) ) infodata%ice_phase = ice_phase
01104 if ( present(ocn_phase) ) infodata%ocn_phase = ocn_phase
01105 if ( present(glc_phase) ) infodata%glc_phase = glc_phase
01106 if ( present(atm_aero) ) infodata%atm_aero = atm_aero
01107 if ( present(glcrun_alarm) ) infodata%glcrun_alarm = glcrun_alarm
01108 if ( present(glc_g2supdate) ) infodata%glc_g2supdate = glc_g2supdate
01109
01110 END SUBROUTINE seq_infodata_PutData
01111
01112
01113
01114
01115
01116
01117
01118
01119
01120
01121
01122
01123 subroutine seq_infodata_bcast(infodata,mpicom)
01124
01125 use shr_mpi_mod, only : shr_mpi_bcast
01126
01127 implicit none
01128
01129
01130
01131 type(seq_infodata_type), intent(INOUT) :: infodata
01132 integer(SHR_KIND_IN), intent(IN) :: mpicom
01133
01134
01135
01136
01137
01138
01139
01140
01141
01142 call shr_mpi_bcast(infodata%start_type, mpicom)
01143 call shr_mpi_bcast(infodata%case_desc, mpicom)
01144 call shr_mpi_bcast(infodata%model_version, mpicom)
01145 call shr_mpi_bcast(infodata%username, mpicom)
01146 call shr_mpi_bcast(infodata%hostname, mpicom)
01147 call shr_mpi_bcast(infodata%case_name, mpicom)
01148 call shr_mpi_bcast(infodata%timing_dir, mpicom)
01149 call shr_mpi_bcast(infodata%tchkpt_dir, mpicom)
01150 call shr_mpi_bcast(infodata%atm_ideal_phys, mpicom)
01151 call shr_mpi_bcast(infodata%atm_adiabatic, mpicom)
01152 call shr_mpi_bcast(infodata%aqua_planet, mpicom)
01153 call shr_mpi_bcast(infodata%aqua_planet_sst, mpicom)
01154 call shr_mpi_bcast(infodata%brnch_retain_casename, mpicom)
01155 call shr_mpi_bcast(infodata%read_restart, mpicom)
01156 call shr_mpi_bcast(infodata%restart_pfile, mpicom)
01157 call shr_mpi_bcast(infodata%restart_file, mpicom)
01158 call shr_mpi_bcast(infodata%single_column, mpicom)
01159 call shr_mpi_bcast(infodata%scmlat, mpicom)
01160 call shr_mpi_bcast(infodata%scmlon, mpicom)
01161 call shr_mpi_bcast(infodata%logFilePostFix, mpicom)
01162 call shr_mpi_bcast(infodata%outPathRoot, mpicom)
01163 call shr_mpi_bcast(infodata%perpetual, mpicom)
01164 call shr_mpi_bcast(infodata%perpetual_ymd, mpicom)
01165 call shr_mpi_bcast(infodata%orb_eccen, mpicom)
01166 call shr_mpi_bcast(infodata%orb_obliqr, mpicom)
01167 call shr_mpi_bcast(infodata%orb_lambm0, mpicom)
01168 call shr_mpi_bcast(infodata%orb_mvelpp, mpicom)
01169 call shr_mpi_bcast(infodata%flux_epbal, mpicom)
01170 call shr_mpi_bcast(infodata%flux_albav, mpicom)
01171 call shr_mpi_bcast(infodata%samegrid_ao, mpicom)
01172 call shr_mpi_bcast(infodata%samegrid_ro, mpicom)
01173 call shr_mpi_bcast(infodata%samegrid_al, mpicom)
01174 call shr_mpi_bcast(infodata%shr_map_dopole, mpicom)
01175 call shr_mpi_bcast(infodata%npfix, mpicom)
01176 call shr_mpi_bcast(infodata%aoflux_grid, mpicom)
01177 call shr_mpi_bcast(infodata%ocean_tight_coupling, mpicom)
01178 call shr_mpi_bcast(infodata%cpl_cdf64, mpicom)
01179 call shr_mpi_bcast(infodata%do_budgets, mpicom)
01180 call shr_mpi_bcast(infodata%do_histinit, mpicom)
01181 call shr_mpi_bcast(infodata%budget_inst, mpicom)
01182 call shr_mpi_bcast(infodata%budget_daily, mpicom)
01183 call shr_mpi_bcast(infodata%budget_month, mpicom)
01184 call shr_mpi_bcast(infodata%budget_ann, mpicom)
01185 call shr_mpi_bcast(infodata%budget_ltann, mpicom)
01186 call shr_mpi_bcast(infodata%budget_ltend, mpicom)
01187 call shr_mpi_bcast(infodata%histaux_a2x ,mpicom)
01188 call shr_mpi_bcast(infodata%histaux_a2x3hr ,mpicom)
01189 call shr_mpi_bcast(infodata%histaux_a2x3hrp ,mpicom)
01190 call shr_mpi_bcast(infodata%histaux_a2x24hr ,mpicom)
01191 call shr_mpi_bcast(infodata%histaux_l2x ,mpicom)
01192 call shr_mpi_bcast(infodata%histaux_r2x ,mpicom)
01193 call shr_mpi_bcast(infodata%drv_threading, mpicom)
01194 call shr_mpi_bcast(infodata%eps_frac, mpicom)
01195 call shr_mpi_bcast(infodata%eps_amask, mpicom)
01196 call shr_mpi_bcast(infodata%eps_agrid, mpicom)
01197 call shr_mpi_bcast(infodata%eps_aarea, mpicom)
01198 call shr_mpi_bcast(infodata%eps_omask, mpicom)
01199 call shr_mpi_bcast(infodata%eps_ogrid, mpicom)
01200 call shr_mpi_bcast(infodata%eps_oarea, mpicom)
01201
01202 call shr_mpi_bcast(infodata%info_debug, mpicom)
01203 call shr_mpi_bcast(infodata%bfbflag, mpicom)
01204 call shr_mpi_bcast(infodata%dead_comps, mpicom)
01205
01206 call shr_mpi_bcast(infodata%atm_present, mpicom)
01207 call shr_mpi_bcast(infodata%atm_prognostic, mpicom)
01208 call shr_mpi_bcast(infodata%lnd_present, mpicom)
01209 call shr_mpi_bcast(infodata%lnd_prognostic, mpicom)
01210 call shr_mpi_bcast(infodata%rof_present, mpicom)
01211 call shr_mpi_bcast(infodata%ocn_present, mpicom)
01212 call shr_mpi_bcast(infodata%ocn_prognostic, mpicom)
01213 call shr_mpi_bcast(infodata%ocnrof_prognostic, mpicom)
01214 call shr_mpi_bcast(infodata%ice_present, mpicom)
01215 call shr_mpi_bcast(infodata%ice_prognostic, mpicom)
01216 call shr_mpi_bcast(infodata%glc_present, mpicom)
01217 call shr_mpi_bcast(infodata%glc_prognostic, mpicom)
01218 call shr_mpi_bcast(infodata%sno_present, mpicom)
01219 call shr_mpi_bcast(infodata%sno_prognostic, mpicom)
01220
01221 call shr_mpi_bcast(infodata%atm_nx, mpicom)
01222 call shr_mpi_bcast(infodata%atm_ny, mpicom)
01223 call shr_mpi_bcast(infodata%lnd_nx, mpicom)
01224 call shr_mpi_bcast(infodata%lnd_ny, mpicom)
01225 call shr_mpi_bcast(infodata%rof_nx, mpicom)
01226 call shr_mpi_bcast(infodata%rof_ny, mpicom)
01227 call shr_mpi_bcast(infodata%ice_nx, mpicom)
01228 call shr_mpi_bcast(infodata%ice_ny, mpicom)
01229 call shr_mpi_bcast(infodata%ocn_nx, mpicom)
01230 call shr_mpi_bcast(infodata%ocn_ny, mpicom)
01231 call shr_mpi_bcast(infodata%glc_nx, mpicom)
01232 call shr_mpi_bcast(infodata%glc_ny, mpicom)
01233 call shr_mpi_bcast(infodata%sno_nx, mpicom)
01234 call shr_mpi_bcast(infodata%sno_ny, mpicom)
01235
01236 call shr_mpi_bcast(infodata%nextsw_cday, mpicom)
01237 call shr_mpi_bcast(infodata%precip_fact, mpicom)
01238 call shr_mpi_bcast(infodata%atm_phase, mpicom)
01239 call shr_mpi_bcast(infodata%lnd_phase, mpicom)
01240 call shr_mpi_bcast(infodata%ice_phase, mpicom)
01241 call shr_mpi_bcast(infodata%ocn_phase, mpicom)
01242 call shr_mpi_bcast(infodata%glc_phase, mpicom)
01243 call shr_mpi_bcast(infodata%atm_aero, mpicom)
01244 call shr_mpi_bcast(infodata%glcrun_alarm, mpicom)
01245 call shr_mpi_bcast(infodata%glc_g2supdate, mpicom)
01246
01247 end subroutine seq_infodata_bcast
01248
01249
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259
01260 subroutine seq_infodata_Exchange(infodata,ID,type)
01261
01262 use shr_mpi_mod, only : shr_mpi_bcast
01263
01264 implicit none
01265
01266
01267
01268 type(seq_infodata_type), intent(INOUT) :: infodata
01269 integer(SHR_KIND_IN), intent(IN) :: ID
01270 character(len=*), intent(IN) :: type
01271
01272
01273
01274
01275 integer(SHR_KIND_IN) :: mpicom
01276 integer(SHR_KIND_IN) :: pebcast
01277 logical :: atm2cpli,atm2cplr
01278 logical :: lnd2cpli,lnd2cplr
01279 logical :: ocn2cpli,ocn2cplr
01280 logical :: ice2cpli,ice2cplr
01281 logical :: glc2cpli,glc2cplr
01282 logical :: cpl2i,cpl2r
01283 logical :: logset
01284 logical :: deads
01285 character(len=*), parameter :: subname = '(seq_infodata_Exchange) '
01286
01287
01288
01289
01290
01291
01292 call seq_comm_setptrs(ID,mpicom=mpicom,cmppe=pebcast)
01293
01294 logset = .false.
01295
01296 atm2cpli = .false.
01297 atm2cplr = .false.
01298 lnd2cpli = .false.
01299 lnd2cplr = .false.
01300 ocn2cpli = .false.
01301 ocn2cplr = .false.
01302 ice2cpli = .false.
01303 ice2cplr = .false.
01304 glc2cpli = .false.
01305 glc2cplr = .false.
01306 cpl2i = .false.
01307 cpl2r = .false.
01308
01309
01310
01311 if (trim(type) == 'atm2cpl_init') then
01312 atm2cpli = .true.
01313 atm2cplr = .true.
01314 logset = .true.
01315 endif
01316 if (trim(type) == 'atm2cpl_run') then
01317 atm2cplr = .true.
01318 logset = .true.
01319 endif
01320
01321 if (trim(type) == 'lnd2cpl_init') then
01322 lnd2cpli = .true.
01323 lnd2cplr = .true.
01324 logset = .true.
01325 endif
01326 if (trim(type) == 'lnd2cpl_run') then
01327 lnd2cplr = .true.
01328 logset = .true.
01329 endif
01330
01331 if (trim(type) == 'ocn2cpl_init') then
01332 ocn2cpli = .true.
01333 ocn2cplr = .true.
01334 logset = .true.
01335 endif
01336 if (trim(type) == 'ocn2cpl_run') then
01337 ocn2cplr = .true.
01338 logset = .true.
01339 endif
01340
01341 if (trim(type) == 'ice2cpl_init') then
01342 ice2cpli = .true.
01343 ice2cplr = .true.
01344 logset = .true.
01345 endif
01346 if (trim(type) == 'ice2cpl_run') then
01347 ice2cplr = .true.
01348 logset = .true.
01349 endif
01350
01351 if (trim(type) == 'glc2cpl_init') then
01352 glc2cpli = .true.
01353 glc2cplr = .true.
01354 logset = .true.
01355 endif
01356 if (trim(type) == 'glc2cpl_run') then
01357 glc2cplr = .true.
01358 logset = .true.
01359 endif
01360
01361 if (trim(type) == 'cpl2atm_init' .or. &
01362 trim(type) == 'cpl2lnd_init' .or. &
01363 trim(type) == 'cpl2ocn_init' .or. &
01364 trim(type) == 'cpl2glc_init' .or. &
01365 trim(type) == 'cpl2ice_init') then
01366 cpl2i = .true.
01367 cpl2r = .true.
01368 call seq_comm_setptrs(ID,cplpe=pebcast)
01369 logset = .true.
01370 endif
01371
01372 if (trim(type) == 'cpl2atm_run' .or. &
01373 trim(type) == 'cpl2lnd_run' .or. &
01374 trim(type) == 'cpl2ocn_run' .or. &
01375 trim(type) == 'cpl2glc_run' .or. &
01376 trim(type) == 'cpl2ice_run') then
01377 cpl2r = .true.
01378 call seq_comm_setptrs(ID,cplpe=pebcast)
01379 logset = .true.
01380 endif
01381
01382
01383
01384 if (.not. logset) then
01385 write(logunit,*) trim(subname),' ERROR: type invalid ',trim(type)
01386 call shr_sys_abort()
01387 endif
01388
01389
01390
01391 if (atm2cpli) then
01392 call shr_mpi_bcast(infodata%atm_present, mpicom,pebcast=pebcast)
01393 call shr_mpi_bcast(infodata%atm_prognostic, mpicom,pebcast=pebcast)
01394 call shr_mpi_bcast(infodata%atm_nx, mpicom,pebcast=pebcast)
01395 call shr_mpi_bcast(infodata%atm_ny, mpicom,pebcast=pebcast)
01396 call shr_mpi_bcast(infodata%atm_aero, mpicom,pebcast=pebcast)
01397
01398 deads = infodata%dead_comps
01399 call shr_mpi_bcast(deads, mpicom,pebcast=pebcast)
01400 if (deads .or. infodata%dead_comps) infodata%dead_comps = .true.
01401 endif
01402
01403 if (lnd2cpli) then
01404 call shr_mpi_bcast(infodata%lnd_present, mpicom,pebcast=pebcast)
01405 call shr_mpi_bcast(infodata%lnd_prognostic, mpicom,pebcast=pebcast)
01406 call shr_mpi_bcast(infodata%rof_present, mpicom,pebcast=pebcast)
01407 call shr_mpi_bcast(infodata%sno_present, mpicom,pebcast=pebcast)
01408 call shr_mpi_bcast(infodata%sno_prognostic, mpicom,pebcast=pebcast)
01409 call shr_mpi_bcast(infodata%lnd_nx, mpicom,pebcast=pebcast)
01410 call shr_mpi_bcast(infodata%lnd_ny, mpicom,pebcast=pebcast)
01411 call shr_mpi_bcast(infodata%rof_nx, mpicom,pebcast=pebcast)
01412 call shr_mpi_bcast(infodata%rof_ny, mpicom,pebcast=pebcast)
01413 call shr_mpi_bcast(infodata%sno_nx, mpicom,pebcast=pebcast)
01414 call shr_mpi_bcast(infodata%sno_ny, mpicom,pebcast=pebcast)
01415
01416 deads = infodata%dead_comps
01417 call shr_mpi_bcast(deads, mpicom,pebcast=pebcast)
01418 if (deads .or. infodata%dead_comps) infodata%dead_comps = .true.
01419 endif
01420
01421 if (ocn2cpli) then
01422 call shr_mpi_bcast(infodata%ocn_present, mpicom,pebcast=pebcast)
01423 call shr_mpi_bcast(infodata%ocn_prognostic, mpicom,pebcast=pebcast)
01424 call shr_mpi_bcast(infodata%ocnrof_prognostic,mpicom,pebcast=pebcast)
01425 call shr_mpi_bcast(infodata%ocn_nx, mpicom,pebcast=pebcast)
01426 call shr_mpi_bcast(infodata%ocn_ny, mpicom,pebcast=pebcast)
01427
01428 deads = infodata%dead_comps
01429 call shr_mpi_bcast(deads, mpicom,pebcast=pebcast)
01430 if (deads .or. infodata%dead_comps) infodata%dead_comps = .true.
01431 endif
01432
01433 if (ice2cpli) then
01434 call shr_mpi_bcast(infodata%ice_present, mpicom,pebcast=pebcast)
01435 call shr_mpi_bcast(infodata%ice_prognostic, mpicom,pebcast=pebcast)
01436 call shr_mpi_bcast(infodata%ice_nx, mpicom,pebcast=pebcast)
01437 call shr_mpi_bcast(infodata%ice_ny, mpicom,pebcast=pebcast)
01438
01439 deads = infodata%dead_comps
01440 call shr_mpi_bcast(deads, mpicom,pebcast=pebcast)
01441 if (deads .or. infodata%dead_comps) infodata%dead_comps = .true.
01442 endif
01443
01444 if (glc2cpli) then
01445 call shr_mpi_bcast(infodata%glc_present, mpicom,pebcast=pebcast)
01446 call shr_mpi_bcast(infodata%glc_prognostic, mpicom,pebcast=pebcast)
01447 call shr_mpi_bcast(infodata%glc_nx, mpicom,pebcast=pebcast)
01448 call shr_mpi_bcast(infodata%glc_ny, mpicom,pebcast=pebcast)
01449
01450 deads = infodata%dead_comps
01451 call shr_mpi_bcast(deads, mpicom,pebcast=pebcast)
01452 if (deads .or. infodata%dead_comps) infodata%dead_comps = .true.
01453 endif
01454
01455 if (cpl2i) then
01456 call shr_mpi_bcast(infodata%atm_present, mpicom,pebcast=pebcast)
01457 call shr_mpi_bcast(infodata%atm_prognostic, mpicom,pebcast=pebcast)
01458 call shr_mpi_bcast(infodata%lnd_present, mpicom,pebcast=pebcast)
01459 call shr_mpi_bcast(infodata%lnd_prognostic, mpicom,pebcast=pebcast)
01460 call shr_mpi_bcast(infodata%rof_present, mpicom,pebcast=pebcast)
01461 call shr_mpi_bcast(infodata%ocn_present, mpicom,pebcast=pebcast)
01462 call shr_mpi_bcast(infodata%ocn_prognostic, mpicom,pebcast=pebcast)
01463 call shr_mpi_bcast(infodata%ocnrof_prognostic,mpicom,pebcast=pebcast)
01464 call shr_mpi_bcast(infodata%ice_present, mpicom,pebcast=pebcast)
01465 call shr_mpi_bcast(infodata%ice_prognostic, mpicom,pebcast=pebcast)
01466 call shr_mpi_bcast(infodata%glc_present, mpicom,pebcast=pebcast)
01467 call shr_mpi_bcast(infodata%glc_prognostic, mpicom,pebcast=pebcast)
01468 call shr_mpi_bcast(infodata%sno_present, mpicom,pebcast=pebcast)
01469 call shr_mpi_bcast(infodata%sno_prognostic, mpicom,pebcast=pebcast)
01470 call shr_mpi_bcast(infodata%dead_comps, mpicom,pebcast=pebcast)
01471 call shr_mpi_bcast(infodata%atm_aero, mpicom,pebcast=pebcast)
01472 endif
01473
01474 if (atm2cplr) then
01475 call shr_mpi_bcast(infodata%nextsw_cday, mpicom,pebcast=pebcast)
01476 endif
01477
01478 if (ocn2cplr) then
01479 call shr_mpi_bcast(infodata%precip_fact, mpicom,pebcast=pebcast)
01480 endif
01481
01482 if (cpl2r) then
01483 call shr_mpi_bcast(infodata%nextsw_cday, mpicom,pebcast=pebcast)
01484 call shr_mpi_bcast(infodata%precip_fact, mpicom,pebcast=pebcast)
01485 call shr_mpi_bcast(infodata%glcrun_alarm, mpicom,pebcast=pebcast)
01486 call shr_mpi_bcast(infodata%glc_g2supdate, mpicom,pebcast=pebcast)
01487 endif
01488
01489 end subroutine seq_infodata_Exchange
01490
01491
01492
01493
01494
01495
01496
01497
01498
01499
01500
01501
01502 subroutine seq_infodata_Check( infodata )
01503
01504
01505
01506 use shr_string_mod, only: shr_string_listIntersect
01507
01508 implicit none
01509
01510
01511
01512 type(seq_infodata_type), intent(INOUT) :: infodata
01513
01514
01515
01516
01517 character(len=*), parameter :: subname = '(seq_infodata_Check) '
01518 integer :: lastchar
01519 integer :: rc
01520
01521
01522
01523
01524
01525
01526 lastchar = len(infodata%case_name)
01527 if ( len_trim(infodata%case_name) == 0) then
01528 call shr_sys_abort( subname//': variable case_name must be set, aborting')
01529 end if
01530 if (infodata%case_name(lastchar:lastchar) /= ' ') then
01531 write(logunit,"(A,I4,A)")'ERROR: case_name must not exceed ', len(infodata%case_name)-1, &
01532 ' characters'
01533 call shr_sys_abort( subname//': variable case_name must be set, aborting')
01534 end if
01535
01536
01537 if ( infodata%atm_adiabatic .and. (infodata%atm_ideal_phys .or. &
01538 infodata%aqua_planet) )then
01539 call shr_sys_abort( subname//': only one of atm_adiabatic, ' // &
01540 'atm_ideal_phys or aqua_planet can be set' )
01541 end if
01542
01543
01544 if ( len_trim(infodata%restart_pfile) == 0 ) then
01545 call shr_sys_abort( subname//': restart_pfile must be set' )
01546 end if
01547
01548
01549 if ( len_trim(infodata%logFilePostFix) == 0 ) then
01550 call shr_sys_abort( subname//': logFilePostFix must be set to something not blank' )
01551 end if
01552
01553
01554 if ( len_trim(infodata%outPathRoot) == 0 ) then
01555 call shr_sys_abort( subname//': outPathRoot must be set' )
01556 end if
01557 if ( index(infodata%outPathRoot,"/",back=.true.) /= &
01558 len_trim(infodata%outPathRoot) ) then
01559 call shr_sys_abort( subname//': outPathRoot must end with a slash' )
01560 end if
01561
01562
01563 if ((trim(infodata%start_type) /= seq_infodata_start_type_start) .and. &
01564 (trim(infodata%start_type) /= seq_infodata_start_type_cont ) .and. &
01565 (trim(infodata%start_type) /= seq_infodata_start_type_brnch)) then
01566 call shr_sys_abort(subname//': start_type invalid = '//trim(infodata%start_type))
01567 end if
01568
01569 if ((trim(infodata%start_type) == seq_infodata_start_type_cont ) .and. &
01570 (trim(infodata%case_name) /= trim(infodata%rest_case_name))) then
01571 call shr_sys_abort(subname//': invalid continue restart case name = '//trim(infodata%rest_case_name))
01572 endif
01573
01574 if (infodata%orb_eccen == SHR_ORB_UNDEF_REAL .or. &
01575 infodata%orb_obliqr == SHR_ORB_UNDEF_REAL .or. &
01576 infodata%orb_mvelpp == SHR_ORB_UNDEF_REAL .or. &
01577 infodata%orb_lambm0 == SHR_ORB_UNDEF_REAL) then
01578 call shr_sys_abort(subname//': orb params incorrect')
01579 endif
01580
01581 END SUBROUTINE seq_infodata_Check
01582
01583
01584
01585
01586
01587
01588
01589
01590
01591
01592
01593 SUBROUTINE seq_infodata_print( infodata )
01594
01595 implicit none
01596
01597
01598
01599 type(seq_infodata_type), intent(IN) :: infodata
01600
01601
01602
01603
01604 character(len=*), parameter :: subname = '(seq_infodata_print) '
01605 character(len=*), parameter :: F0A = "(2A,A)"
01606 character(len=*), parameter :: F0L = "(2A,L3)"
01607 character(len=*), parameter :: F0I = "(2A,I10)"
01608 character(len=*), parameter :: F0S = "(2A,I4)"
01609 character(len=*), parameter :: F0R = "(2A,g22.14)"
01610
01611
01612
01613
01614
01615
01616 write(logunit,F0A) subname,'Start type = ', trim(infodata%start_type)
01617 write(logunit,F0A) subname,'Case name = ', trim(infodata%case_name)
01618 write(logunit,F0A) subname,'Case description = ', trim(infodata%case_desc)
01619 write(logunit,F0A) subname,'Model version = ', trim(infodata%model_version)
01620 write(logunit,F0A) subname,'Username = ', trim(infodata%username)
01621 write(logunit,F0A) subname,'Hostname = ', trim(infodata%hostname)
01622 write(logunit,F0A) subname,'Timing Dir = ', trim(infodata%timing_dir)
01623 write(logunit,F0A) subname,'Timing Checkpoint Dir = ', trim(infodata%tchkpt_dir)
01624 write(logunit,F0A) subname,'Restart case name = ', trim(infodata%rest_case_name)
01625
01626 write(logunit,F0L) subname,'atm_ideal_phys = ', infodata%atm_ideal_phys
01627 write(logunit,F0L) subname,'atm adiabatic mode = ', infodata%atm_adiabatic
01628 write(logunit,F0L) subname,'aqua_planet mode = ', infodata%aqua_planet
01629 write(logunit,F0I) subname,'aqua_planet analytic sst = ', infodata%aqua_planet_sst
01630 write(logunit,F0L) subname,'brnch_retain_casename = ', infodata%brnch_retain_casename
01631
01632 write(logunit,F0L) subname,'read_restart flag = ', infodata%read_restart
01633 write(logunit,F0A) subname,'Restart pointer file = ', trim(infodata%restart_pfile)
01634 write(logunit,F0A) subname,'Restart file (full path) = ', trim(infodata%restart_file)
01635
01636 write(logunit,F0L) subname,'single_column = ', infodata%single_column
01637 write(logunit,F0R) subname,'scmlat = ', infodata%scmlat
01638 write(logunit,F0R) subname,'scmlon = ', infodata%scmlon
01639
01640 write(logunit,F0A) subname,'Log output end name = ', trim(infodata%logFilePostFix)
01641 write(logunit,F0A) subname,'Output path dir = ', trim(infodata%outPathRoot)
01642
01643 write(logunit,F0L) subname,'perpetual = ', infodata%perpetual
01644 write(logunit,F0I) subname,'perpetual_ymd = ', infodata%perpetual_ymd
01645
01646 write(logunit,F0R) subname,'orb_eccen = ', infodata%orb_eccen
01647 write(logunit,F0R) subname,'orb_obliqr = ', infodata%orb_obliqr
01648 write(logunit,F0R) subname,'orb_lambm0 = ', infodata%orb_lambm0
01649 write(logunit,F0R) subname,'orb_mvelpp = ', infodata%orb_mvelpp
01650
01651 write(logunit,F0A) subname,'flux_epbal = ', trim(infodata%flux_epbal)
01652 write(logunit,F0L) subname,'flux_albav = ', infodata%flux_albav
01653 write(logunit,F0L) subname,'samegrid_ao = ', infodata%samegrid_ao
01654 write(logunit,F0L) subname,'samegrid_ro = ', infodata%samegrid_ro
01655 write(logunit,F0L) subname,'samegrid_al = ', infodata%samegrid_al
01656 write(logunit,F0L) subname,'shr_map_dopole = ', infodata%shr_map_dopole
01657 write(logunit,F0L) subname,'npfix = ', infodata%npfix
01658 write(logunit,F0A) subname,'aoflux_grid = ', trim(infodata%aoflux_grid)
01659 write(logunit,F0L) subname,'ocean_tight_coupling = ', infodata%ocean_tight_coupling
01660 write(logunit,F0L) subname,'cpl_cdf64 = ', infodata%cpl_cdf64
01661 write(logunit,F0L) subname,'do_budgets = ', infodata%do_budgets
01662 write(logunit,F0L) subname,'do_histinit = ', infodata%do_histinit
01663 write(logunit,F0S) subname,'budget_inst = ', infodata%budget_inst
01664 write(logunit,F0S) subname,'budget_daily = ', infodata%budget_daily
01665 write(logunit,F0S) subname,'budget_month = ', infodata%budget_month
01666 write(logunit,F0S) subname,'budget_ann = ', infodata%budget_ann
01667 write(logunit,F0S) subname,'budget_ltann = ', infodata%budget_ltann
01668 write(logunit,F0S) subname,'budget_ltend = ', infodata%budget_ltend
01669 write(logunit,F0L) subname,'histaux_a2x = ', infodata%histaux_a2x
01670 write(logunit,F0L) subname,'histaux_a2x3hr = ', infodata%histaux_a2x3hr
01671 write(logunit,F0L) subname,'histaux_a2x3hrp = ', infodata%histaux_a2x3hrp
01672 write(logunit,F0L) subname,'histaux_a2x24hr = ', infodata%histaux_a2x24hr
01673 write(logunit,F0L) subname,'histaux_l2x = ', infodata%histaux_l2x
01674 write(logunit,F0L) subname,'histaux_r2x = ', infodata%histaux_r2x
01675 write(logunit,F0L) subname,'drv_threading = ', infodata%drv_threading
01676
01677 write(logunit,F0R) subname,'eps_frac = ', infodata%eps_frac
01678 write(logunit,F0R) subname,'eps_amask = ', infodata%eps_amask
01679 write(logunit,F0R) subname,'eps_agrid = ', infodata%eps_agrid
01680 write(logunit,F0R) subname,'eps_aarea = ', infodata%eps_aarea
01681 write(logunit,F0R) subname,'eps_omask = ', infodata%eps_omask
01682 write(logunit,F0R) subname,'eps_ogrid = ', infodata%eps_ogrid
01683 write(logunit,F0R) subname,'eps_oarea = ', infodata%eps_oarea
01684
01685 write(logunit,F0S) subname,'info_debug = ', infodata%info_debug
01686 write(logunit,F0L) subname,'bfbflag = ', infodata%bfbflag
01687 write(logunit,F0L) subname,'dead_comps = ', infodata%dead_comps
01688
01689 write(logunit,F0L) subname,'atm_present = ', infodata%atm_present
01690 write(logunit,F0L) subname,'atm_prognostic = ', infodata%atm_prognostic
01691 write(logunit,F0L) subname,'lnd_present = ', infodata%lnd_present
01692 write(logunit,F0L) subname,'lnd_prognostic = ', infodata%lnd_prognostic
01693 write(logunit,F0L) subname,'rof_present = ', infodata%rof_present
01694 write(logunit,F0L) subname,'ocn_present = ', infodata%ocn_present
01695 write(logunit,F0L) subname,'ocn_prognostic = ', infodata%ocn_prognostic
01696 write(logunit,F0L) subname,'ocnrof_prognostic = ', infodata%ocnrof_prognostic
01697 write(logunit,F0L) subname,'ice_present = ', infodata%ice_present
01698 write(logunit,F0L) subname,'ice_prognostic = ', infodata%ice_prognostic
01699 write(logunit,F0L) subname,'glc_present = ', infodata%glc_present
01700 write(logunit,F0L) subname,'glc_prognostic = ', infodata%glc_prognostic
01701 write(logunit,F0L) subname,'sno_present = ', infodata%sno_present
01702 write(logunit,F0L) subname,'sno_prognostic = ', infodata%sno_prognostic
01703
01704 write(logunit,F0I) subname,'atm_nx = ', infodata%atm_nx
01705 write(logunit,F0I) subname,'atm_ny = ', infodata%atm_ny
01706 write(logunit,F0I) subname,'lnd_nx = ', infodata%lnd_nx
01707 write(logunit,F0I) subname,'lnd_ny = ', infodata%lnd_ny
01708 write(logunit,F0I) subname,'rof_nx = ', infodata%rof_nx
01709 write(logunit,F0I) subname,'rof_ny = ', infodata%rof_ny
01710 write(logunit,F0I) subname,'ice_nx = ', infodata%ice_nx
01711 write(logunit,F0I) subname,'ice_ny = ', infodata%ice_ny
01712 write(logunit,F0I) subname,'ocn_nx = ', infodata%ocn_nx
01713 write(logunit,F0I) subname,'ocn_ny = ', infodata%ocn_ny
01714 write(logunit,F0I) subname,'glc_nx = ', infodata%glc_nx
01715 write(logunit,F0I) subname,'glc_ny = ', infodata%glc_ny
01716 write(logunit,F0I) subname,'sno_nx = ', infodata%sno_nx
01717 write(logunit,F0I) subname,'sno_ny = ', infodata%sno_ny
01718
01719 write(logunit,F0R) subname,'nextsw_cday = ', infodata%nextsw_cday
01720 write(logunit,F0R) subname,'precip_fact = ', infodata%precip_fact
01721 write(logunit,F0L) subname,'atm_aero = ', infodata%atm_aero
01722
01723 write(logunit,F0S) subname,'atm_phase = ', infodata%atm_phase
01724 write(logunit,F0S) subname,'lnd_phase = ', infodata%lnd_phase
01725 write(logunit,F0S) subname,'ocn_phase = ', infodata%ocn_phase
01726 write(logunit,F0S) subname,'ice_phase = ', infodata%ice_phase
01727 write(logunit,F0S) subname,'glc_phase = ', infodata%glc_phase
01728
01729 write(logunit,F0L) subname,'glcrun_alarm = ', infodata%glcrun_alarm
01730 write(logunit,F0L) subname,'glc_g2supdate = ', infodata%glc_g2supdate
01731
01732
01733 END SUBROUTINE seq_infodata_print
01734
01735
01736
01737
01738
01739
01740
01741
01742
01743
01744
01745 subroutine seq_infodata_Restart( type, infodata, restart_file, mpicom)
01746
01747
01748 use shr_ncio_mod, only : shr_ncio_descripType, shr_ncio_descripInit, &
01749 shr_ncio_descripSetDefault, &
01750 shr_ncio_open, shr_ncio_close, &
01751 shr_ncio_descripRead, shr_ncio_descripName, &
01752 shr_ncio_descripPutData, shr_ncio_descripWrite, &
01753 shr_ncio_descripGetInteger, &
01754 shr_ncio_descripGetRealR8, &
01755 shr_ncio_descripGetString, &
01756 shr_ncio_descripGetLogical, &
01757 shr_ncio_setDebug
01758 use shr_string_mod, only : shr_string_listGetIndexF
01759 use shr_file_mod, only : shr_file_getUnit, shr_file_freeUnit
01760 use shr_mpi_mod, only : shr_mpi_bcast
01761
01762 implicit none
01763
01764
01765
01766 character(len=*), intent(IN) :: type
01767 type(seq_infodata_type), intent(INOUT) :: infodata
01768 character(SHR_KIND_CL), optional, intent(IN) :: restart_file
01769 integer, optional, intent(IN) :: mpicom
01770
01771
01772
01773
01774 character(len=*), parameter :: subname = '(seq_infodata_Restart) '
01775 integer :: iam
01776 logical :: lmaster
01777 integer :: n
01778 integer :: ncId
01779 logical :: exists
01780 character(SHR_KIND_CL) :: lrestart_file
01781 integer(SHR_KIND_IN) :: intvar
01782 real(SHR_KIND_R8) :: real8var
01783 logical :: logvar
01784 character(SHR_KIND_CL) :: strvar
01785 logical :: doread
01786 integer :: iun
01787 integer :: ierr
01788
01789 type(shr_ncio_descripType) :: restvar(nrestvar)
01790 integer(SHR_KIND_IN), parameter :: intFill = -9876
01791 real(SHR_KIND_R8) , parameter :: real8Fill = -9876._SHR_KIND_R8
01792 character(len=*), parameter :: prefix = "seq_infodata_"
01793
01794
01795
01796
01797
01798 if (trim(type) == 'read') then
01799 doread = .true.
01800 elseif (trim(type) == 'write') then
01801 doread = .false.
01802 else
01803 write(logunit,*) subname,' ERROR: invalid type ',trim(type)
01804 call shr_sys_abort()
01805 endif
01806
01807 iam = 0
01808 if ( present(mpicom) )then
01809 call mpi_comm_rank(mpicom,iam,ierr)
01810 endif
01811 lmaster = .false.
01812 if (iam == 0) lmaster = .true.
01813
01814
01815
01816
01817 call shr_ncio_descripSetDefault( nrestvar, restvar )
01818 do n = 1, nrestvar
01819 if (trim(resttype(n)) == 'integer') then
01820 call shr_ncio_descripInit( restvar(n), restname(n), &
01821 LongName = restlnam(n), units = restunit(n), &
01822 IntegerData =.true., IntegerFill = IntFill )
01823 elseif (trim(resttype(n)) == 'real8') then
01824 call shr_ncio_descripInit( restvar(n), restname(n), &
01825 LongName = restlnam(n), units = restunit(n), &
01826 RealR8Data =.true., RealR8Fill = real8Fill )
01827 elseif (trim(resttype(n)) == 'logical') then
01828 call shr_ncio_descripInit( restvar(n), restname(n), &
01829 LongName = restlnam(n), units = restunit(n), &
01830 LogicalData =.true. )
01831 elseif (trim(resttype(n)) == 'char') then
01832 call shr_ncio_descripInit( restvar(n), restname(n), &
01833 LongName = restlnam(n), units = restunit(n), &
01834 StringData =.true. )
01835 else
01836 write(logunit,*) subname,' ERROR descripInit not implemented for type ',trim(resttype(n))
01837 call shr_sys_abort()
01838 endif
01839 enddo
01840
01841
01842
01843
01844 if (.not.doread) then
01845 do n = 1, nrestvar
01846 selectcase (trim(restname(n)))
01847 case('case_name')
01848 strvar = infodata%case_name
01849 case('case_desc')
01850 strvar = infodata%case_desc
01851 case('atm_adiabatic')
01852 logvar = infodata%atm_adiabatic
01853 case('atm_ideal_phys')
01854 logvar = infodata%atm_ideal_phys
01855 case('aqua_planet')
01856 logvar = infodata%aqua_planet
01857 case('aqua_planet_sst')
01858 intvar = infodata%aqua_planet_sst
01859 case('single_column')
01860 logvar = infodata%single_column
01861 case('scmlon')
01862 real8var = infodata%scmlon
01863 case('scmlat')
01864 real8var = infodata%scmlat
01865 case('perpetual')
01866 logvar = infodata%perpetual
01867 case('perpetual_ymd')
01868 intvar = infodata%perpetual_ymd
01869 case('flux_albav')
01870 logvar = infodata%flux_albav
01871 case('flux_epbal')
01872 strvar = infodata%flux_epbal
01873 case('orb_eccen')
01874 real8var = infodata%orb_eccen
01875 case('orb_lambm0')
01876 real8var = infodata%orb_lambm0
01877 case('orb_mvelpp')
01878 real8var = infodata%orb_mvelpp
01879 case('nextsw_cday')
01880 real8var = infodata%nextsw_cday
01881 case('precip_fact')
01882 real8var = infodata%precip_fact
01883
01884 case default
01885 write(logunit,*) subname,' ERROR descripPut not implemented for name ',trim(restname(n))
01886 call shr_sys_abort()
01887 endselect
01888
01889 if (trim(resttype(n)) == 'integer') then
01890 call shr_ncio_descripPutData( restvar(n), restname(n), IntegerData=intvar )
01891 elseif (trim(resttype(n)) == 'real8') then
01892 call shr_ncio_descripPutData( restvar(n), restname(n), RealR8Data =real8var )
01893 elseif (trim(resttype(n)) == 'logical') then
01894 call shr_ncio_descripPutData( restvar(n), restname(n), LogicalData=logvar )
01895 elseif (trim(resttype(n)) == 'char') then
01896 call shr_ncio_descripPutData( restvar(n), restname(n), StringData =trim(strvar) )
01897 else
01898 write(logunit,*) subname,' ERROR descripPut not implemented for type ',trim(resttype(n))
01899 call shr_sys_abort()
01900 end if
01901 enddo
01902
01903
01904
01905 if (.not. present(restart_file)) then
01906 write(logunit,"(A)") subname," ERROR: on write, must provide restart_file"
01907 call shr_sys_abort()
01908 endif
01909
01910
01911
01912 if (lmaster) then
01913 iun = shr_file_getUnit()
01914 if (loglevel > 0) write(logunit,"(3A)") subname," write rpointer file ", &
01915 trim(infodata%restart_pfile)
01916 open(iun, file=infodata%restart_pfile, form='FORMATTED')
01917 write(iun,'(a)') restart_file
01918 close(iun)
01919 call shr_file_freeUnit( iun )
01920 endif
01921
01922
01923
01924 call shr_ncio_open( restart_file, lmaster, FileType=prefix, &
01925 ncId=ncId, exists=exists, writing=.true.,clobber=.true. )
01926 if ( present(mpicom) )then
01927 call shr_ncio_descripWrite( ncId, nrestvar, prefix=prefix, mpicom=mpicom, &
01928 mastertask=lmaster, exists=exists, var=restvar )
01929 else
01930 call shr_ncio_descripWrite( ncId, nrestvar, prefix=prefix, &
01931 exists=exists, var=restvar )
01932 end if
01933 call shr_ncio_close( ncId, lmaster, type=prefix, NCFileName=restart_file )
01934
01935 endif
01936
01937
01938
01939
01940
01941
01942
01943 if (doread) then
01944
01945
01946
01947 if (present(restart_file)) then
01948 write(logunit,"(A)") subname," ERROR: on read, do not provide restart_file"
01949 call shr_sys_abort()
01950 endif
01951
01952
01953
01954 if (trim(infodata%restart_file) == trim(sp_str)) then
01955 if (lmaster) then
01956 iun = shr_file_getUnit()
01957 if (loglevel > 0) write(logunit,"(3A)") subname," read rpointer file ", &
01958 trim(infodata%restart_pfile)
01959 open(iun, file=infodata%restart_pfile, form='FORMATTED', status='old')
01960 read(iun,'(a)') lrestart_file
01961 close(iun)
01962 call shr_file_freeUnit( iun )
01963 write(logunit,"(3A)") subname,' restart file from rpointer= ', &
01964 trim(lrestart_file)
01965 endif
01966 if (present(mpicom)) call shr_mpi_bcast(lrestart_file,mpicom)
01967 infodata%restart_file = lrestart_file
01968 endif
01969
01970
01971 call shr_ncio_open( infodata%restart_file, lmaster, FileType=prefix, &
01972 ncId=ncId, exists=exists, writing=.false. )
01973 if ( present(MPICom) )then
01974 call shr_ncio_descripRead( ncId, nrestvar, prefix=prefix, mpicom=MPICom, &
01975 mastertask=lmaster, var=restvar )
01976 else
01977 call shr_ncio_descripRead( ncId, nrestvar, prefix=prefix, &
01978 var=restvar )
01979 end if
01980 call shr_ncio_close( ncId, lmaster, type=prefix, NCFileName=infodata%restart_file )
01981
01982 do n = 1, nrestvar
01983
01984
01985 if (trim(shr_ncio_descripName(restvar(n))) /= trim(restname(n))) then
01986 write(logunit,*) subname,' ERROR restvar name no match with restname ', &
01987 trim(shr_ncio_descripName(restvar(n))),' ',trim(restname(n))
01988 call shr_sys_abort()
01989 endif
01990
01991 if (trim(resttype(n)) == 'integer') then
01992 intvar = shr_ncio_descripGetInteger(restvar(n))
01993 if (lmaster.and.loglevel > 1) write(logunit) subname,' read ',trim(restname(n)),intvar
01994 elseif (trim(resttype(n)) == 'real8') then
01995 real8var = shr_ncio_descripGetRealR8 (restvar(n))
01996 if (lmaster.and.loglevel > 1) write(logunit) subname,' read ',trim(restname(n)),real8var
01997 elseif (trim(resttype(n)) == 'logical') then
01998 logvar = shr_ncio_descripGetLogical(restvar(n))
01999 if (lmaster.and.loglevel > 1) write(logunit) subname,' read ',trim(restname(n)),logvar
02000 elseif (trim(resttype(n)) == 'char') then
02001 strvar = shr_ncio_descripGetString (restvar(n))
02002 if (lmaster.and.loglevel > 1) write(logunit) subname,' read ',trim(restname(n)),trim(strvar)
02003 else
02004 write(logunit,*) subname,' ERROR descripGet not implemented for type ',trim(resttype(n))
02005 call shr_sys_abort()
02006 endif
02007
02008
02009
02010
02011 selectcase (trim(restname(n)))
02012 case('case_name')
02013 infodata%rest_case_name = trim(strvar)
02014 case('case_desc')
02015
02016 case('atm_adiabatic')
02017
02018 case('atm_ideal_phys')
02019
02020 case('aqua_planet')
02021
02022 case('aqua_planet_sst')
02023
02024 case('single_column')
02025
02026 case('scmlon')
02027
02028 case('scmlat')
02029
02030 case('perpetual')
02031
02032 case('perpetual_ymd')
02033
02034 case('flux_albav')
02035
02036 case('flux_epbal')
02037
02038 case('orb_eccen')
02039
02040 case('orb_lambm0')
02041
02042 case('orb_mvelpp')
02043
02044 case('nextsw_cday')
02045 infodata%nextsw_cday = real8var
02046 case('precip_fact')
02047 infodata%precip_fact = real8var
02048
02049 case default
02050 write(logunit,*) subname,' ERROR descripGet not implemented for ',trim(restname(n))
02051 call shr_sys_abort()
02052 endselect
02053 enddo
02054
02055 endif
02056
02057 end subroutine seq_infodata_Restart
02058
02059
02060
02061
02062 END MODULE seq_infodata_mod