global_types.F90 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. !#################################################################
  2. !
  3. ! Type definitions.
  4. !
  5. ! Extracted from 'dims.F90'.
  6. !
  7. !### macro's #####################################################
  8. !
  9. #define TRACEBACK write (gol,'("in ",a," (",a,", line",i5,")")') rname, __FILE__, __LINE__; call goErr
  10. #define IF_NOTOK_RETURN(action) if (status/=0) then; TRACEBACK; action; return; end if
  11. #define IF_ERROR_RETURN(action) if (status> 0) then; TRACEBACK; action; return; end if
  12. !
  13. #include "tm5.inc"
  14. !
  15. !#################################################################
  16. module global_types
  17. use GO, only : gol, goPr, goErr
  18. implicit none
  19. public
  20. ! --- types -------------------------------
  21. ! define structures to contain dimensioned data:
  22. type region_data
  23. integer,dimension(:,:),pointer :: zoomed
  24. integer,dimension(:,:),pointer :: edge
  25. real,dimension(:),pointer :: dxyp ! area (m2)
  26. integer::halo
  27. end type region_data
  28. type wind_data
  29. ! am westward mass flux through east (kg/s) (halo = 1)
  30. ! bm northward mass flux through south (kg/s) (halo = 1)
  31. ! cm upward flux through bottom (kg/s) (halo = 1)
  32. !
  33. real,dimension(:,:,:),pointer :: am
  34. real,dimension(:,:,:),pointer :: bm
  35. real,dimension(:,:,:),pointer :: cm
  36. integer :: halo
  37. end type wind_data
  38. #ifndef without_convection
  39. type conv_data
  40. !
  41. ! entd entrainement downdraft (im,jm,lmax_conv)
  42. ! entu entrainement updraft
  43. ! detd detrainement downdraft
  44. ! detu detrainement updraft
  45. ! dkg diffusion coefs.
  46. ! cloud_base bottom updraft
  47. ! cloud_top top updraft
  48. ! cloud_lfs level of free sinking (downdraft)
  49. ! blh boundary layer height
  50. !
  51. #ifndef without_diffusion
  52. real,dimension(:,:,:),pointer :: dkg
  53. #endif
  54. integer,dimension(:,:),pointer :: cloud_base
  55. integer,dimension(:,:),pointer :: cloud_top
  56. integer,dimension(:,:),pointer :: cloud_lfs
  57. real,dimension(:,:),pointer :: blh
  58. end type conv_data
  59. #endif
  60. ! emis_data%surf : any type of surface data
  61. type emis_data
  62. real,dimension(:,:),pointer :: surf
  63. end type emis_data
  64. ! any type of mode surface data in all resolutions
  65. type aerosol_emis_data
  66. real,dimension(:,:,:),pointer :: surf
  67. end type aerosol_emis_data
  68. ! d3_data%d3 : 3D data, e.g. nox emissions
  69. type d3_data
  70. real,dimension(:,:,:),pointer :: d3
  71. integer :: halo
  72. end type d3_data
  73. ! d23_data%d23 : lat/pres fields, e.g. o3 climatology in ppmv
  74. type d23_data
  75. real,dimension(:,:),pointer :: d23
  76. end type d23_data
  77. ! d2_data%d2 : lat fields, e.g. hno3/o3 ratios at 10 hPa
  78. type d2_data
  79. real,dimension(:),pointer :: d2
  80. end type d2_data
  81. ! isop_data%scalef_isop : (jm,ntim) scalefactor isoprene emissions
  82. type isop_data
  83. real,dimension(:,:),pointer :: scalef_isop
  84. end type isop_data
  85. ! chem_data%rm : 'chemistry' (non-transported) tracers
  86. type chem_data
  87. real,dimension(:,:,:,:),pointer :: rm
  88. end type chem_data
  89. ! modal emissions
  90. type modal_emissions
  91. real,dimension(:,:,:,:), pointer :: d4 ! im,jm,bb_lm, mode_nm(mode)
  92. end type modal_emissions
  93. end module global_types