Defines, declares, initializes, and updates surface fractions.
These fractions are used for merging fields onto various domains. This particular implementation of this module makes certain assumptions about which domains exist and the relationships between them. These assumptions are hard-coded into this software implementation.
ASSUMPTIONS:
For each domain (atm,lnd,ice,ocn) there are four fractions:
three that could be used for merging, and one which indicatates the
fraction of the cell which is active.
REVISION HISTORY:
2002-Aug-21 - B. Kauffman, 1st version.INTERFACE:
module frac_modUSES:
use shr_sys_mod ! shared system routines
use shr_timer_mod ! shared timer routines
use shr_mpi_mod ! shared mpi layer
use cpl_kind_mod ! kinds
use cpl_comm_mod ! mpi/mph communicator info
use cpl_mct_mod ! mct interface
use cpl_const_mod ! constants
use cpl_domain_mod ! defines domain
use cpl_bundle_mod ! defines bundle
use cpl_map_mod ! access to map data types and methods
use cpl_control_mod, only: dbug=>cpl_control_infoDBug
implicit none
private ! except
PUBLIC TYPES:
! no public typesPUBLIC MEMBER FUNCTIONS:
public :: frac_init ! one-time initialization of fraction values
public :: frac_set ! time-variant update of fraction values
PUBLIC DATA MEMBERS:
!--- note: these could be declared in data_mod.F90 ---
!--- or in a cpl/frac_mod.F90 & passed down from main program ---
type(cpl_bundle),public :: bun_frac_a ! surface fractions on atm domain
type(cpl_bundle),public :: bun_frac_i ! surface fractions on ice domain
type(cpl_bundle),public :: bun_frac_l ! surface fractions on lnd domain
type(cpl_bundle),public :: bun_frac_o ! surface fractions on ocn domain
character(*),parameter :: frac_fields = 'afrac:ifrac:lfrac:ofrac'
Initialize all the fraction bundles bun_frac_* using the input domains domain_. All fractions are derived from the (time-invariant) ice/ocn domain masks plus the (time-variant) ice fraction.
This initialization routine sets the time-invariant values.
REVISION HISTORY:
2002-aug-21 - B. Kauffman, 1st version.INTERFACE:
subroutine frac_init(map_o2a,domain_a,domain_i,domain_l,domain_o)USES:
INPUT/OUTPUT PARAMETERS:
type(cpl_map ),intent(inout) :: map_o2a ! use to map ice-frac from ocn -> atm
type(cpl_domain),intent(in ) :: domain_a ! domain of atm fraction bundle
type(cpl_domain),intent(in ) :: domain_i ! domain of ice fraction bundle
type(cpl_domain),intent(in ) :: domain_l ! domain of lnd fraction bundle
type(cpl_domain),intent(in ) :: domain_o ! domain of ocn fraction bundle
Set/update the fraction bundles to account for time varying sea-ice distribution using the ice fraction information in the input real array ifrac_i.
Update bun_frac_i, then bun_frac_o, then use map_o2a to update bun_frac_a. Make use of bun_frac_l.
The companion initialization routine frac_init must be called first to set the time-invariant values.
REMARKS:
The domain_* arguments should be removed because they aren't used.REVISION HISTORY:
2002-aug-21 - B. Kauffman, 1st version.INTERFACE:
subroutine frac_set(ifrac_i,map_o2a,domain_a,domain_i,domain_l,domain_o)USES:
INPUT/OUTPUT PARAMETERS:
real(R8) ,intent(in ) :: ifrac_i(:) ! temporary data array on atm domain
type(cpl_map ),intent(inout) :: map_o2a ! use to map ifrac from ocn -> atm
type(cpl_domain),intent(in ) :: domain_a ! domain of atm fraction bundle
type(cpl_domain),intent(in ) :: domain_i ! domain of ice fraction bundle
type(cpl_domain),intent(in ) :: domain_l ! domain of lnd fraction bundle
type(cpl_domain),intent(in ) :: domain_o ! domain of ocn fraction bundle