123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- !
- #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"
- !
- !-----------------------------------------------------------------------------
- ! TM5 !
- !-----------------------------------------------------------------------------
- !BOP
- !
- ! !MODULE: USER_INPUT
- !
- ! !DESCRIPTION: provide routine for user to specify his/her own startup
- ! values.
- !\\
- !\\
- ! !INTERFACE:
- !
- MODULE USER_INPUT
- !
- ! !USES:
- !
- use GO, only : gol, goPr, goErr
- implicit none
- private
- !
- ! !PUBLIC MEMBER FUNCTIONS:
- !
- public :: user_input_start
- !
- ! !PRIVATE DATA MEMBERS:
- !
- character(len=*), parameter :: mname = 'user_input'
- !
- ! !REVISION HISTORY:
- !
- ! !REMARKS:
- !
- !EOP
- !------------------------------------------------------------------------
-
- CONTAINS
-
- !--------------------------------------------------------------------------
- ! TM5 !
- !--------------------------------------------------------------------------
- !BOP
- !
- ! !IROUTINE: USER_INPUT_START
- !
- ! !DESCRIPTION:
- !\\
- !\\
- ! !INTERFACE:
- !
- SUBROUTINE USER_INPUT_START( status )
- !
- ! !USES:
- !
- use chem_param, only : fscale
- use dims, only : nregions
- use meteodata, only : m_dat
- use chem_param, only : ntracet
- use global_data, only : mass_dat
- !
- ! !OUTPUT PARAMETERS:
- !
- integer, intent(out) :: status
- !
- ! !REVISION HISTORY:
- ! 16 May 2014 - T. van Noije - created for initializing CO2 to constant vmr
- !
- ! !REMARKS:
- !
- !EOP
- !------------------------------------------------------------------------------
- !BOC
- character(len=*), parameter :: rname = mname//'/user_input_start'
- real, dimension(:,:,:), pointer :: m
- integer n, region
- ! --- begin --------------------------------
- do region=1,nregions
- m => m_dat(region)%data
- do n=1,ntracet
- ! set CO2 concentrations to 354 ppm (1990) or 284 ppm (1850)
- !mass_dat(region)%rm(:,:,:,n) = 3.54e-4 * m / fscale(n)
- mass_dat(region)%rm(:,:,:,n) = 2.8432e-4 * m / fscale(n)
- enddo
- #ifdef slopes
- mass_dat(region)%rxm = 0.0
- mass_dat(region)%rym = 0.0
- mass_dat(region)%rzm = 0.0
- #ifdef secmom
- mass_dat(region)%rxxm = 0.0
- mass_dat(region)%rxym = 0.0
- mass_dat(region)%rxzm = 0.0
- mass_dat(region)%ryym = 0.0
- mass_dat(region)%ryzm = 0.0
- mass_dat(region)%rzzm = 0.0
- #endif
- #endif
- nullify(m)
- enddo
- write(gol,*) ' rm initialized at volume mixing ratio of 284 ppm (CO2)'; call goPr
- ! ok
- status=0
- END SUBROUTINE USER_INPUT_START
- !EOC
- END MODULE USER_INPUT
|