00001 !======================================================================= 00002 ! 00003 !BOP 00004 ! 00005 ! !MODULE: CICE_InitMod - performs CICE initialization 00006 ! 00007 ! !DESCRIPTION: 00008 ! 00009 ! This module contains the CICE initialization routine that sets model 00010 ! parameters and initializes the grid and CICE state variables. 00011 ! 00012 ! !REVISION HISTORY: 00013 ! SVN:$Id: CICE_InitMod.F90 52 2007-01-30 18:04:24Z eclare $ 00014 ! 00015 ! authors Elizabeth C. Hunke, LANL 00016 ! William H. Lipscomb, LANL 00017 ! Philip W. Jones, LANL 00018 ! 00019 ! 2006: Converted to free form source (F90) by Elizabeth Hunke 00020 ! 00021 ! !INTERFACE: 00022 ! 00023 module CICE_InitMod 00024 ! 00025 ! !USES: 00026 ! 00027 use ice_aerosol 00028 use ice_age 00029 use ice_FY 00030 use ice_calendar 00031 use ice_communicate 00032 use ice_diagnostics 00033 use ice_domain 00034 use ice_dyn_evp 00035 use ice_exit 00036 use ice_fileunits 00037 use ice_flux 00038 use ice_grid 00039 use ice_history 00040 use ice_restart 00041 use ice_init 00042 use ice_itd 00043 use ice_kinds_mod 00044 use ice_mechred 00045 use ice_meltpond 00046 use ice_orbital 00047 use ice_shortwave 00048 use ice_state, only: tr_aero, tr_iage, tr_FY, tr_pond 00049 use ice_therm_itd 00050 use ice_therm_vertical 00051 use ice_timers 00052 use ice_transport_driver 00053 use ice_transport_remap 00054 use ice_work 00055 use ice_prescribed_mod 00056 use ice_prescaero_mod 00057 00058 implicit none 00059 private 00060 save 00061 00062 ! !PUBLIC MEMBER FUNCTIONS: 00063 00064 public :: CICE_Init 00065 00066 ! 00067 !EOP 00068 ! 00069 !======================================================================= 00070 00071 contains 00072 00073 !======================================================================= 00074 !BOP 00075 ! 00076 ! !ROUTINE: CICE_Init - initialize CICE model 00077 ! 00078 ! !DESCRIPTION: 00079 ! 00080 ! Initialize CICE model. 00081 ! 00082 ! !REVISION HISTORY: same as module 00083 ! 00084 ! !INTERFACE: 00085 ! 00086 subroutine CICE_Init( mpicom_ice ) 00087 ! 00088 ! !USES: 00089 ! 00090 ! 00091 ! !INPUT/OUTPUT PARAMETERS: 00092 ! 00093 integer (kind=int_kind), intent(in) :: 00094 mpicom_ice ! communicator for sequential ccsm 00095 !EOP 00096 ! 00097 ! local temporary variables 00098 00099 character(len=char_len_long) :: fname 00100 00101 call init_communicate( mpicom_ice ) ! initial setup for message passing 00102 call init_fileunits ! set unit numbers (including nu_diag) 00103 call input_data ! namelist variables 00104 call init_work ! work arrays 00105 00106 call init_domain_blocks ! set up block decomposition 00107 call init_grid1 ! domain distribution 00108 call init_ice_timers ! initialize all timers 00109 call ice_timer_start(timer_total) ! start timing entire run 00110 call init_grid2 ! grid variables 00111 00112 call init_calendar ! initialize some calendar stuff 00113 call init_hist (dt) ! initialize output history file 00114 call init_evp (dt_dyn) ! define evp dynamics parameters, variables 00115 call init_coupler_flux ! initialize fluxes exchanged with coupler 00116 call init_thermo_vertical ! initialize vertical thermodynamics 00117 call init_itd ! initialize ice thickness distribution 00118 call calendar(time) ! determine the initial date 00119 call init_state ! initialize the ice state 00120 call init_transport ! initialize horizontal transport 00121 call ice_prescribed_init 00122 call ice_prescaero_init 00123 00124 if (runtype == 'continue') then ! start from core restart file 00125 ! given by pointer in ice_in 00126 if (restart_format == 'bin') then 00127 call restartfile() 00128 else 00129 call restartfile(usepio=.true.) 00130 end if 00131 call calendar(time) ! For continuation runs. 00132 else if (restart) then 00133 ! ice_ic = core restart file or 'default' or 'none' 00134 if (index(ice_ic,'nc') == 0) then 00135 call restartfile (ice_ic) 00136 else 00137 call restartfile (usepio=.true., ice_ic=ice_ic) 00138 end if 00139 endif 00140 00141 ! tracers 00142 if (tr_iage) call init_age ! ice age tracer 00143 if (tr_FY) call init_FY ! FY area tracer 00144 if (tr_pond) call init_meltponds ! melt ponds 00145 if (tr_aero) call init_aerosol ! ice aerosol MH 00146 00147 call init_diags ! initialize diagnostic output points 00148 call init_history_therm ! initialize thermo history variables 00149 call init_history_dyn ! initialize dynamic history variables 00150 00151 ! Initialize shortwave components using swdn from previous timestep 00152 ! if restarting. These components will be scaled to current forcing 00153 ! in prep_radiation. 00154 if (runtype == 'continue' .or. restart) & 00155 call init_shortwave ! initialize radiative transfer 00156 00157 #if (defined _NOIO) 00158 ! Not enought memory on BGL to write a history file yet! 00159 ! if(write_ic .and. .not.prescribed_ice) call ice_write_hist(dt) 00160 #else 00161 if(write_ic .and. .not.prescribed_ice) call ice_write_hist(dt) 00162 #endif 00163 write_ic = .false. 00164 00165 end subroutine CICE_Init 00166 00167 !======================================================================= 00168 00169 end module CICE_InitMod 00170 00171 !=======================================================================