123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- !
- #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: WET_DEPOSITION
- !
- ! !DESCRIPTION: ** DUMMY ** but holds convective precipitation (CP) and large scale
- ! precipitation (LSP) budgets variables.
- !
- !\\
- !\\
- ! !INTERFACE:
- !
- MODULE WET_DEPOSITION
- !
- ! !USES:
- !
- use GO, only : gol, goErr, goPr
- use dims, only : nregions
- use chem_param, only : ntracet
- use tm5_distgrid, only : dgrid, Get_DistGrid
- IMPLICIT NONE
- PRIVATE
- !
- ! !PUBLIC MEMBER FUNCTIONS:
- !
- public :: Wet_Deposition_Init, Wet_Deposition_Done
- public :: calc_cvsfac, calculate_lsp_scav, lspscav
- !
- ! !PUBLIC DATA MEMBERS:
- !
- real, public :: cvsfac(ntracet) = 0.0 ! scavenging efficiencies, used in convection
- real, public :: cp_scale = 0.5 ! default amount of rain (converted to m/s) with maximum CP removal on 1x1 degree
- #ifdef with_budgets
-
- real, dimension(nregions), public :: sum_wetdep ! global wet dep budget for tracer #1 (includes both LSP and CP; meaningful on root only)
- type, public :: buddep_data
- ! budgets in each column, split vertically...
- real,dimension(:,:,:,:),pointer :: lsp ! (i, j, nbud_vg, ntracet) computed here
- real,dimension(:,:,:,:),pointer :: cp ! (i, j, nbud_vg, ntracet) computed in convection
- end type buddep_data
- type(buddep_data), dimension(nregions), target, public :: buddep_dat ! ... for each region
- #endif
- !
- ! !PRIVATE DATA MEMBERS:
- !
- character(len=*), parameter :: mname = 'wet_deposition'
- !
- !
- ! !REVISION HISTORY:
- ! version March 2003, adapted for TM5 MK from KNMI version
- ! 29 Feb 2012 - P. Le Sager - adapted for lon-lat MPI domain decomposition
- !
- ! !REMARKS:
- !
- !EOP
- !------------------------------------------------------------------------
- CONTAINS
- !--------------------------------------------------------------------------
- ! TM5 !
- !--------------------------------------------------------------------------
- !BOP
- !
- ! !IROUTINE: WET_DEPOSITION_INIT
- !
- ! !DESCRIPTION:
- !\\
- !\\
- ! !INTERFACE:
- !
- SUBROUTINE WET_DEPOSITION_INIT( status )
- !
- ! !USES:
- !
- #ifdef with_budgets
- use budget_global, only : nbud_vg
- #endif
- !
- ! !OUTPUT PARAMETERS:
- !
- integer, intent(out) :: status
- !
- ! !REVISION HISTORY:
- ! 29 Feb 2012 - P. Le Sager - adapted for lon-lat MPI domain decomposition
- !
- !EOP
- !------------------------------------------------------------------------
- !BOC
- character(len=*), parameter :: rname = mname//'/Wet_Deposition_Init'
- integer :: region, i1, i2, j1, j2
- ! --- begin ------------------------------------
- write (gol,*) 'maximum removal CP precip on 1x1 at rain rate (mm/hr) :', cp_scale; call goPr
- cp_scale = cp_scale/(1e3*3600.) ! to m/s!
- ! budgets
- #ifdef with_budgets
- do region = 1, nregions
- CALL GET_DISTGRID( DGRID(region), I_STRT=i1, I_STOP=i2, J_STRT=j1, J_STOP=j2 )
- sum_wetdep(region) = 0.0
- allocate( buddep_dat(region)%lsp(i1:i2, j1:j2, nbud_vg, ntracet))
- buddep_dat(region)%lsp = 0.0
- allocate( buddep_dat(region)%cp (i1:i2, j1:j2, nbud_vg, ntracet))
- buddep_dat(region)%cp = 0.0
- enddo
- #endif
- ! ok
- status = 0
- END SUBROUTINE WET_DEPOSITION_INIT
- !EOC
- !--------------------------------------------------------------------------
- ! TM5 !
- !--------------------------------------------------------------------------
- !BOP
- !
- ! !IROUTINE: WET_DEPOSITION_DONE
- !
- ! !DESCRIPTION: deallocate scavenging coeff. & write wet dep and convection
- ! budgets into file.
- !\\
- !\\
- ! !INTERFACE:
- !
- SUBROUTINE WET_DEPOSITION_DONE( status )
- !
- ! !USES:
- !
- use dims, only : nregions
- !
- ! !OUTPUT PARAMETERS:
- !
- integer, intent(out) :: status
- !
- ! !REVISION HISTORY:
- ! 29 Feb 2012 - P. Le Sager - adapted for lon-lat MPI domain decomposition
- !
- !EOP
- !------------------------------------------------------------------------
- !BOC
- character(len=*), parameter :: rname = mname//'/Wet_Deposition_Done'
- integer :: region
- ! --- begin ----------------------------------
- #ifdef with_budgets
- do region = 1, nregions
- deallocate( buddep_dat(region)%lsp )
- deallocate( buddep_dat(region)%cp )
- end do
- #endif /* WITH_BUDGET */
- ! ok
- status = 0
- END SUBROUTINE WET_DEPOSITION_DONE
- !EOC
- !--------------------------------------------------------------------------
- ! TM5 !
- !--------------------------------------------------------------------------
- !BOP
- !
- ! !IROUTINE: CALC_CVSFAC
- !
- ! !DESCRIPTION: dummy
- !
- !\\
- !\\
- ! !INTERFACE:
- !
- SUBROUTINE CALC_CVSFAC
- END SUBROUTINE CALC_CVSFAC
- !EOC
- !--------------------------------------------------------------------------
- ! TM5 !
- !--------------------------------------------------------------------------
- !BOP
- !
- ! !IROUTINE: LSPSCAV
- !
- ! !DESCRIPTION: dummy
- !
- !\\
- !\\
- ! !INTERFACE:
- !
- SUBROUTINE LSPSCAV( region )
- !
- ! !INPUT PARAMETERS:
- !
- integer,intent(in) :: region
- !
- ! !REVISION HISTORY:
- !
- !
- !EOP
- !------------------------------------------------------------------------
- !BOC
- END SUBROUTINE LSPSCAV
- !EOC
- !--------------------------------------------------------------------------
- ! TM5 !
- !--------------------------------------------------------------------------
- !BOP
- !
- ! !IROUTINE: CALCULATE_LSP_SCAV
- !
- ! !DESCRIPTION: dummy
- !
- !\\
- !\\
- ! !INTERFACE:
- !
- SUBROUTINE CALCULATE_LSP_SCAV( region )
- !
- ! !INPUT PARAMETERS:
- !
- integer, intent(in) :: region
- !
- ! !REVISION HISTORY:
- !
- !
- ! !REMARKS:
- !
- !EOP
- !------------------------------------------------------------------------
- !BOC
- END SUBROUTINE CALCULATE_LSP_SCAV
- !EOC
- END MODULE WET_DEPOSITION
|