Difference between revisions of "Adding dH/dt module"

From Interactive System for Ice sheet Simulation
Jump to: navigation, search
(New page: This page contains step-by-step instructions for adding a new module to Glimmer-CISM. In this case, the module is a first-order, upwinding advection scheme for mass transport (dH/dt) using...)
 
Line 3: Line 3:
 
===step 1 ===
 
===step 1 ===
 
(i) Create a module that contains the necessary subroutines. For now, these will just be "stubs", which we will fill in later.
 
(i) Create a module that contains the necessary subroutines. For now, these will just be "stubs", which we will fill in later.
 +
 +
<source lang=fortran>module fo_upwind_advect_mod
 +
 +
! subroutines for mass advection scheme based on 1st order upwinding
 +
 +
    contains
 +
 +
!----------------------------------------------------------------------
 +
 +
    subroutine fo_upwind_advect_init( )
 +
 +
    ! initialization for 1st-order upwinding mass advection
 +
 +
    end subroutine fo_upwind_advect_init
 +
 +
!----------------------------------------------------------------------
 +
 +
    subroutine fo_upwind_advect_final( )
 +
 +
    ! finalization for 1st-order upwinding mass advection
 +
 +
    end subroutine fo_upwind_advect_final
 +
 +
!----------------------------------------------------------------------
 +
 +
    subroutine fo_upwind_advect_main( )
 +
 +
    ! 1st-order upwinding mass advection
 +
 +
    end subroutine fo_upwind_advect_main
 +
 +
!----------------------------------------------------------------------
 +
 +
end module fo_upwind_advect_mod</source>

Revision as of 10:46, 22 July 2009

This page contains step-by-step instructions for adding a new module to Glimmer-CISM. In this case, the module is a first-order, upwinding advection scheme for mass transport (dH/dt) using velocities calculated from a higher-order dynamics model. The procedure, however, is generic and could apply to adding almost any module.

step 1

(i) Create a module that contains the necessary subroutines. For now, these will just be "stubs", which we will fill in later.

module fo_upwind_advect_mod
 
! subroutines for mass advection scheme based on 1st order upwinding
 
    contains
 
!----------------------------------------------------------------------
 
    subroutine fo_upwind_advect_init( )
 
    ! initialization for 1st-order upwinding mass advection
 
    end subroutine fo_upwind_advect_init
 
!----------------------------------------------------------------------
 
    subroutine fo_upwind_advect_final( )
 
    ! finalization for 1st-order upwinding mass advection
 
    end subroutine fo_upwind_advect_final
 
!----------------------------------------------------------------------
 
    subroutine fo_upwind_advect_main( )
 
    ! 1st-order upwinding mass advection
 
    end subroutine fo_upwind_advect_main
 
!----------------------------------------------------------------------
 
end module fo_upwind_advect_mod