next up previous contents
Next: 2.1 Calling Tree Up: CSIM Code Reference Manual Previous: 1 Introduction   Contents

2 Overview of CSIM4 Code

The CSIM4 source code is maintained in the Concurrent Version System (CVS) at NCAR. It can be accessed off the web, or by a CVS checkout (co) command online at NCAR. The source code is written in Fortran 90, and consists of thirty-one files all resident in a single source directory. The main driver file is 'ice.F', which runs the sea ice model.

Each source code file contains a single module of the same name as the file (excluding the suffix .F), with the exception of the main driver file (ice.F). For example, the file ice_scaling.F contains the module ice_scaling. Within most modules are various data declarations and subroutines, along with protex commands for automatic documentation.

The modules can be organized as in Table 1 in the approximate order of call in the driver file ice.F. The four modules at the end of the table refer to optional and io routines.

Table 1: Source Code Modules
Module Description
ice.F Main driver
--ice_mpi_internal.F Sets MPI tasks
--ice_timers.F Timers for performance
--ice_model_size.F Defines global domain, category, layer sizes
--ice_kinds_mod.F Definitions of common data types
--ice_state.F Defines ice state variables
--ice_domain.F Local domain sizes; parallel info
---ice_constants.F Sets physical constants
---ice_init.F Parameter and variable initilizations
---ice_grid.F Spatial grids, masks and boundary conditions
---ice_calendar.F Calendar routines for managing time
---ice_flux.F Assigns flux arrays: from, to coupler and internal
---ice_itd.F Initilizes and redistributies ice in the itd
---ice_therm_driver.F Driver for thermodynamics and itd
-----ice_atmo.F Calculate atmosphere-ice stability based fluxes
-----ice_vthermo.F Sets up vertical thermodynamics
-----ice_tstm.F Energy conserving thermodynamics
-----ice_dh.F Grow/melt snow/ice and adjust temperature profile
-----ice_itd_linear.F Linear remapping scheme for itd
---ice_scaling.F Scale fluxes to coupler
---ice_coupling.F Message passing to and from coupler
---ice_dyn_evp.F EVP dynamics
---ice_transport.F Advection
---ice_mechred.F Mechanical redistribution
---ice_albedo.F Snow/Ice albedo
---ice_history.F Restart and history files
---ice_diagnostics.F Diagnostic printout
--ice_prnpnt.F Print data for selected points
--ice_read_write.F Read/write io
--ice_ocean.F Slab ocean mixed layer
--ice_prescribed.F Prescribed ice

The logical structure of the code is: initialization and time stepping loop, which involves receiving forcing data from the coupler, a partial thermodynamic calculation to compute the flux exchange with the atmosphere, sending of the output to the coupler, completion of the thermodynamic calculation, linear remapping, calculation of the ice velocities, advection, mechanical redistribution and albedos. Note that while this logical structure is present in the driver ice.F, the reader must wade through the options of prescribed ice and ocean mixed layer to actually recognize it as these options alter the calling sequence.

This particular order of computations is necessary for coupled model accuracy as well as load balancing. For accuracy in radiant energy absorbed, the albedos used by the atmosphere in calculating the down shortwave should be the same as those used in the surface energy absorption in the sea ice thermodynamics. This requires that the snow/ice albedos be updated in the sea ice model after the thermodynamic calculation with the down shortwave is completed. For load balancing, the atmosphere and sea ice can run in parallel more efficiently if the atmosphere-ice surface exchange is separated from the rest of the sea ice thermodynamics. Hence, the sea ice model computes the atmosphere-ice fluxes as soon as it receives forcing data from the coupler, and returns the output fluxes to the coupler as soon as they are computed.

Because the sea ice model domain is limited globally, further improvements in load balancing arise from limiting the total amount of data exchanged between the sea ice model and the coupler (further explained in the Data Structure's section).

It should be noted that the coupler requires the fluxes to be in the form of per unit ice area (for it summation over ocean/land/ice fluxes in exchange with the atmosphere). Thus, the atmosphere-ice fluxes computed in the ice model (aggregated over thickness distribution) are further divided by the aggregate ice area (see module ice_scaling) before being sent to the coupler.

next up previous contents
Next: 2.1 Calling Tree Up: CSIM Code Reference Manual Previous: 1 Introduction   Contents