123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- !### macro's #####################################################
- !
- #define TRACEBACK write (gol,'("in ",a," (",a,", line",i5,")")') rname, __FILE__, __LINE__; call goErr
- #define IF_NOTOK_RETURN(action) if (status/=0) then; TRACEBACK; action; return; end if
- #define IF_ERROR_RETURN(action) if (status> 0) then; TRACEBACK; action; return; end if
- !
- #include "tm5.inc"
- !
- !#################################################################
- module sources_sinks
- use GO, only : gol, goPr, goErr
-
- implicit none
- private
-
- public :: Sources_sinks_Init, Sources_sinks_Done ! Init and Done methods
- public :: Ss_monthly_update ! monthly initialization (photolysis,..)
- public :: ss_after_read_meteo_update ! Update SS after met fields are updated. Called from modelIntegration/Proces_update
- public :: sources_sinks_apply ! apply source : always called
- ! --- const --------------------------------------
- character(len=*), parameter :: mname = 'sources_sinks'
- contains
- ! ================================================================
-
- subroutine Sources_Sinks_Init( status )
-
- ! --- in/out --------------------------------
-
- integer, intent(out) :: status
-
- ! --- const ------------------------------
- character(len=*), parameter :: rname = mname//'/Sources_Sinks_Init'
-
- ! --- begin --------------------------------
-
- ! nothing to be init
- ! ok
- status = 0
-
- end subroutine Sources_Sinks_Init
-
-
- ! ***
-
-
- subroutine Sources_Sinks_Done( status )
-
- ! --- in/out --------------------------------
-
- integer, intent(out) :: status
-
- ! --- const ------------------------------
- character(len=*), parameter :: rname = mname//'/Sources_Sinks_Done'
- ! --- begin --------------------------------
-
- ! nothing to be done
- ! ok
- status = 0
-
- end subroutine Sources_Sinks_Done
-
-
-
- ! ================================================================
- !
- ! purpose
- ! -------
- ! initialise data needed for chemistry,
- ! e.g. read emissions and boundary conditions
- ! provides a way to input tracer specific values.
- !
- ! Called from tm5/TM5_Model_run, at run start and at beginning of each
- ! month.
- !
- !
- !---------------------------------------------------------------------
- subroutine ss_monthly_update( status )
- use datetime, only : calc_sm
- use dims, only : mlen, sec_month, sec_year, sec_day
- use dims, only : okdebug
- ! --- in/out --------------------------
- integer, intent(out) :: status
- ! --- local --------------------------
- character(len=*), parameter :: rname = mname//'/Ss_monthly_update'
- ! --- begin ---------------------------
- write (gol,'(a,": update time parameters for new month ...")') rname; call goPr
- call calc_sm( mlen, sec_day,sec_month,sec_year )
- if ( okdebug ) then
- write (gol,*) 'seconds in a day, month and year',sec_day,sec_month,sec_year; call goPr
- end if
- ! ok
- status = 0
- end subroutine ss_monthly_update
- !---------------------------------------------------------------------
- !
- ! subroutine that is called after reading new met fields
- ! (clouds, surface winds, etc.)
- ! In this routine, sources and sinks processes that depend on these data are updated.
- ! Routine is called from modelIntegration/Proces_Update
- !
- !---------------------------------------------------------------------
- subroutine ss_after_read_meteo_update( status )
-
- ! --- in/out ---------------------------------
-
- integer, intent(out) :: status
-
- ! --- const ---------------------------------
-
- character(len=*), parameter :: rname = 'trace_after_read'
- ! --- begin ---------------------------------
- ! nothing to be done
- ! ok
- status = 0
- end subroutine ss_after_read_meteo_update
- !---------------------------------------------------------------------
- !
- ! sources_sinks_apply
- !
- !
- ! purpose
- ! -------
- ! this subroutine changes the tracer mass and its slopes
- ! by chemical sources
- !
- ! interface
- ! ---------
- ! call source1
- !
- ! method
- ! ------
- !
- !
- !
- ! reference
- ! --------
- ! see above
- !
- !---------------------------------------------------------------------
- subroutine Sources_sinks_apply( region, tr, status )
- use GO , only : TDate
- ! --- in/out ---------------------------------
-
- integer, intent(in) :: region
- type(TDate), intent(in) :: tr(2) ! time range
- integer, intent(out) :: status
-
- ! --- const ---------------------------------------
- character(len=*), parameter :: rname = mname//'/Source1'
-
- ! --- begin ----------------------------------
-
- ! ok
- status = 0
-
- end subroutine Sources_sinks_apply
- end module sources_sinks
|