[4015] | 1 | MODULE crs |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE crs_dom *** |
---|
| 4 | !! Declare the coarse grid domain and other public variables |
---|
| 5 | !! then allocate them if needed. |
---|
| 6 | !!====================================================================== |
---|
| 7 | !! History 2012-06 Editing (J. Simeon, G. Madec, C. Ethe, C. Calone) Original code |
---|
| 8 | !!---------------------------------------------------------------------- |
---|
| 9 | USE par_oce |
---|
| 10 | USE dom_oce |
---|
| 11 | USE in_out_manager |
---|
| 12 | |
---|
| 13 | IMPLICIT NONE |
---|
| 14 | PUBLIC |
---|
| 15 | |
---|
| 16 | PUBLIC crs_dom_alloc ! Called from crsini.F90 |
---|
[4064] | 17 | PUBLIC crs_dom_alloc2 ! Called from crsini.F90 |
---|
[4015] | 18 | PUBLIC dom_grid_glo |
---|
| 19 | PUBLIC dom_grid_crs |
---|
| 20 | |
---|
| 21 | ! Domain variables |
---|
| 22 | INTEGER :: jpiglo_crs , & !: 1st dimension of global coarse grid domain |
---|
| 23 | jpjglo_crs !: 2nd dimension of global coarse grid domain |
---|
| 24 | INTEGER :: jpi_crs , & !: 1st dimension of local coarse grid domain |
---|
| 25 | jpj_crs !: 2nd dimension of local coarse grid domain |
---|
| 26 | INTEGER :: jpi_full , & !: 1st dimension of local parent grid domain |
---|
| 27 | jpj_full !: 2nd dimension of local parent grid domain |
---|
| 28 | |
---|
| 29 | INTEGER :: nistr , njstr |
---|
| 30 | INTEGER :: niend , njend |
---|
| 31 | |
---|
| 32 | INTEGER :: jpi_crsm1, jpj_crsm1 !: loop indices |
---|
| 33 | INTEGER :: jpiglo_crsm1, jpjglo_crsm1 !: loop indices |
---|
| 34 | INTEGER :: nperio_full, nperio_crs !: jperio of parent and coarse grids |
---|
| 35 | INTEGER :: npolj_full, npolj_crs !: north fold mark |
---|
| 36 | INTEGER :: jpiglo_full, jpjglo_full !: jpiglo / jpjglo |
---|
| 37 | INTEGER :: npiglo, npjglo !: jpjglo |
---|
| 38 | INTEGER :: nlci_full, nlcj_full !: i-, j-dimension of local or sub domain on parent grid |
---|
| 39 | INTEGER :: nldi_full, nldj_full !: starting indices of internal sub-domain on parent grid |
---|
| 40 | INTEGER :: nlei_full, nlej_full !: ending indices of internal sub-domain on parent grid |
---|
| 41 | INTEGER :: nlci_crs, nlcj_crs !: i-, j-dimension of local or sub domain on coarse grid |
---|
| 42 | INTEGER :: nldi_crs, nldj_crs !: starting indices of internal sub-domain on coarse grid |
---|
| 43 | INTEGER :: nlei_crs, nlej_crs !: ending indices of internal sub-domain on coarse grid |
---|
[4064] | 44 | |
---|
[4015] | 45 | INTEGER :: narea_full, narea_crs !: node |
---|
| 46 | INTEGER :: jpnij_full, jpnij_crs !: =jpni*jpnj, the pe decomposition |
---|
| 47 | INTEGER :: jpim1_full, jpjm1_full !: |
---|
| 48 | INTEGER :: nimpp_full, njmpp_full !: global position of point (1,1) of subdomain on parent grid |
---|
| 49 | INTEGER :: nimpp_crs, njmpp_crs !: set to 1,1 for now . Valid only for monoproc |
---|
| 50 | INTEGER :: nreci_full, nrecj_full |
---|
| 51 | INTEGER :: nreci_crs, nrecj_crs |
---|
| 52 | !cc |
---|
| 53 | INTEGER :: noea_full, nowe_full !: index of the local neighboring processors in |
---|
| 54 | INTEGER :: noso_full, nono_full !: east, west, south and north directions |
---|
| 55 | INTEGER :: npne_full, npnw_full !: index of north east and north west processor |
---|
| 56 | INTEGER :: npse_full, npsw_full !: index of south east and south west processor |
---|
| 57 | INTEGER :: nbne_full, nbnw_full !: logical of north east & north west processor |
---|
| 58 | INTEGER :: nbse_full, nbsw_full !: logical of south east & south west processor |
---|
| 59 | INTEGER :: nidom_full !: ??? |
---|
| 60 | INTEGER :: nproc_full !:number for local processor |
---|
| 61 | INTEGER :: nbondi_full, nbondj_full !: mark of i- and j-direction local boundaries |
---|
| 62 | INTEGER :: noea_crs, nowe_crs !: index of the local neighboring processors in |
---|
| 63 | INTEGER :: noso_crs, nono_crs !: east, west, south and north directions |
---|
| 64 | INTEGER :: npne_crs, npnw_crs !: index of north east and north west processor |
---|
| 65 | INTEGER :: npse_crs, npsw_crs !: index of south east and south west processor |
---|
| 66 | INTEGER :: nbne_crs, nbnw_crs !: logical of north east & north west processor |
---|
| 67 | INTEGER :: nbse_crs, nbsw_crs !: logical of south east & south west processor |
---|
| 68 | INTEGER :: nidom_crs !: ??? |
---|
| 69 | INTEGER :: nproc_crs !:number for local processor |
---|
| 70 | INTEGER :: nbondi_crs, nbondj_crs !: mark of i- and j-direction local boundaries |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | INTEGER, DIMENSION(:), ALLOCATABLE :: mis_crs, mie_crs, mis2_crs, mie2_crs ! starting and ending i-indices of parent subset |
---|
| 74 | INTEGER, DIMENSION(:), ALLOCATABLE :: mjs_crs, mje_crs, mjs2_crs, mje2_crs ! starting and ending j-indices of parent subset |
---|
| 75 | INTEGER, DIMENSION(:), ALLOCATABLE :: mjg_crs, mig_crs |
---|
[4064] | 76 | INTEGER, DIMENSION(:), ALLOCATABLE :: mi0_crs, mi1_crs, mj0_crs, mj1_crs |
---|
[4015] | 77 | INTEGER :: mxbinctr, mybinctr ! central point in grid box |
---|
| 78 | INTEGER, DIMENSION(:), ALLOCATABLE :: nlcit_crs, nlcit_full !: dimensions of every subdomain |
---|
| 79 | INTEGER, DIMENSION(:), ALLOCATABLE :: nldit_crs, nldit_full !: first, last indoor index for each i-domain |
---|
| 80 | INTEGER, DIMENSION(:), ALLOCATABLE :: nleit_crs, nleit_full !: first, last indoor index for each j-domain |
---|
| 81 | INTEGER, DIMENSION(:), ALLOCATABLE :: nimppt_crs, nimppt_full !: first, last indoor index for each j-domain |
---|
| 82 | INTEGER, DIMENSION(:), ALLOCATABLE :: nlcjt_crs, nlcjt_full !: dimensions of every subdomain |
---|
| 83 | INTEGER, DIMENSION(:), ALLOCATABLE :: nldjt_crs, nldjt_full !: first, last indoor index for each i-domain |
---|
| 84 | INTEGER, DIMENSION(:), ALLOCATABLE :: nlejt_crs, nlejt_full !: first, last indoor index for each j-domain |
---|
| 85 | INTEGER, DIMENSION(:), ALLOCATABLE :: njmppt_crs, njmppt_full !: first, last indoor index for each j-domain |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | ! Masks |
---|
| 89 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmask_crs, umask_crs, vmask_crs, fmask_crs |
---|
| 90 | REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: tmask_i_crs, rnfmsk_crs, tpol_crs, fpol_crs |
---|
| 91 | |
---|
| 92 | ! REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tmask_i_crs, tpol, fpol |
---|
| 93 | |
---|
| 94 | ! Scale factors |
---|
| 95 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: e1t_crs, e2t_crs, e1e2t_crs ! horizontal scale factors grid type T |
---|
| 96 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: e1u_crs, e2u_crs ! horizontal scale factors grid type U |
---|
| 97 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: e1v_crs, e2v_crs ! horizontal scale factors grid type V |
---|
| 98 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: e1f_crs, e2f_crs ! horizontal scale factors grid type F |
---|
| 99 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: e3t_crs, e3u_crs, e3v_crs, e3f_crs, e3w_crs |
---|
[4064] | 100 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: e3t_max_crs, e3u_max_crs, e3v_max_crs, e3f_max_crs, e3w_max_crs |
---|
[4015] | 101 | |
---|
| 102 | ! Surface |
---|
| 103 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: e1e2w_crs, e2e3u_crs, e1e3v_crs |
---|
| 104 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: e1e2w_msk, e2e3u_msk, e1e3v_msk |
---|
| 105 | ! vertical scale factors |
---|
| 106 | ! Coordinates |
---|
| 107 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gphit_crs, glamt_crs, gphif_crs, glamf_crs |
---|
| 108 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gphiu_crs, glamu_crs, gphiv_crs, glamv_crs |
---|
| 109 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ff_crs |
---|
| 110 | INTEGER, DIMENSION(:,:), ALLOCATABLE :: mbathy_crs, mbkt_crs, mbku_crs, mbkv_crs |
---|
| 111 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: gdept_crs, gdepu_crs, gdepv_crs, gdepw_crs |
---|
| 112 | |
---|
| 113 | ! Weights |
---|
| 114 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: facsurfv, facsurfu, facvol_t, facvol_w |
---|
| 115 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ocean_volume_crs_t, ocean_volume_crs_w, bt_crs, r1_bt_crs |
---|
| 116 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: crs_surfu_wgt, crs_surfv_wgt, crs_surfw_wgt, crs_volt_wgt |
---|
| 117 | |
---|
| 118 | ! CRS Namelist |
---|
| 119 | INTEGER :: nn_factx = 3 !: reduction factor of x-dimension of the parent grid |
---|
| 120 | INTEGER :: nn_facty = 3 !: reduction factor of y-dimension of the parent grid |
---|
| 121 | INTEGER :: nn_binref = 0 !: 0 = binning starts north fold (equator could be asymmetric) |
---|
| 122 | !: 1 = binning centers at equator (north fold my have artifacts) |
---|
| 123 | !: for even reduction factors, equator placed in bin biased south |
---|
[9367] | 124 | LOGICAL :: ln_msh_crs = .TRUE. !: =T Create a meshmask file for CRS |
---|
[9169] | 125 | INTEGER :: nn_crs_kz = 0 !: type of Kz coarsening ( =0->VOL ; =1->MAX ; =2->MIN) |
---|
| 126 | LOGICAL :: ln_crs_wn = .FALSE. !: coarsening wn or computation using horizontal divergence |
---|
[4015] | 127 | ! |
---|
| 128 | INTEGER :: nrestx, nresty !: for determining odd or even reduction factor |
---|
| 129 | |
---|
| 130 | |
---|
| 131 | ! Grid reduction factors |
---|
| 132 | REAL(wp) :: rfactx_r !: inverse of x-dim reduction factor |
---|
| 133 | REAL(wp) :: rfacty_r !: inverse of y-dim reduction factor |
---|
| 134 | REAL(wp) :: rfactxy |
---|
| 135 | |
---|
| 136 | ! Physical and dynamical ocean fields for output or passing to TOP, time-mean fields |
---|
| 137 | REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: tsn_crs |
---|
[9019] | 138 | REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE :: un_crs, vn_crs, wn_crs |
---|
[4015] | 139 | REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE :: hdivn_crs |
---|
| 140 | REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: sshn_crs |
---|
| 141 | ! |
---|
| 142 | ! Surface fluxes to pass to TOP |
---|
[4064] | 143 | REAL(wp), PUBLIC, DIMENSION(:,:) , ALLOCATABLE :: qsr_crs, fr_i_crs, wndm_crs |
---|
| 144 | REAL(wp), PUBLIC, DIMENSION(:,:) , ALLOCATABLE :: emp_crs, emp_b_crs, sfx_crs |
---|
[4015] | 145 | REAL(wp), PUBLIC, DIMENSION(:,:) , ALLOCATABLE :: utau_crs, vtau_crs |
---|
| 146 | REAL(wp), PUBLIC, DIMENSION(:,:) , ALLOCATABLE :: rnf_crs |
---|
| 147 | |
---|
| 148 | ! Vertical diffusion |
---|
[9019] | 149 | REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: avt_crs !: temperature vertical diffusivity coeff. [m2/s] at w-point |
---|
| 150 | REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: avs_crs !: salinity vertical diffusivity coeff. [m2/s] at w-point |
---|
[4015] | 151 | |
---|
| 152 | ! Mixing and Mixed Layer Depth |
---|
| 153 | INTEGER, PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: nmln_crs, hmld_crs, hmlp_crs, hmlpt_crs |
---|
| 154 | |
---|
[6140] | 155 | !!---------------------------------------------------------------------- |
---|
[9598] | 156 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
[5215] | 157 | !! $Id$ |
---|
[10068] | 158 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[6140] | 159 | !!---------------------------------------------------------------------- |
---|
[4015] | 160 | CONTAINS |
---|
| 161 | |
---|
| 162 | INTEGER FUNCTION crs_dom_alloc() |
---|
| 163 | !!------------------------------------------------------------------- |
---|
| 164 | !! *** FUNCTION crs_dom_alloc *** |
---|
| 165 | !! ** Purpose : Allocate public crs arrays |
---|
| 166 | !!------------------------------------------------------------------- |
---|
| 167 | !! Local variables |
---|
| 168 | INTEGER, DIMENSION(17) :: ierr |
---|
| 169 | |
---|
| 170 | ierr(:) = 0 |
---|
| 171 | |
---|
| 172 | ! Set up bins for coarse grid, horizontal only. |
---|
[4064] | 173 | ALLOCATE( mis2_crs(jpiglo_crs), mie2_crs(jpiglo_crs), & |
---|
| 174 | & mjs2_crs(jpjglo_crs), mje2_crs(jpjglo_crs), & |
---|
| 175 | & mi0_crs (jpiglo_crs), mi1_crs (jpiglo_crs), & |
---|
| 176 | & mj0_crs (jpjglo_crs), mj1_crs (jpjglo_crs), & |
---|
| 177 | & mig_crs (jpi_crs) , mjg_crs (jpj_crs) , STAT=ierr(1) ) |
---|
[4015] | 178 | |
---|
[4064] | 179 | |
---|
[4015] | 180 | ! Set up Mask and Mesh |
---|
| 181 | ALLOCATE( tmask_crs(jpi_crs,jpj_crs,jpk) , fmask_crs(jpi_crs,jpj_crs,jpk) , & |
---|
| 182 | & umask_crs(jpi_crs,jpj_crs,jpk) , vmask_crs(jpi_crs,jpj_crs,jpk) , STAT=ierr(2)) |
---|
| 183 | |
---|
[4064] | 184 | ALLOCATE( tmask_i_crs(jpi_crs,jpj_crs) , rnfmsk_crs(jpi_crs,jpj_crs), & |
---|
| 185 | & tpol_crs(jpiglo_crs,jpjglo_crs), fpol_crs(jpiglo_crs,jpjglo_crs), STAT=ierr(3) ) |
---|
[4015] | 186 | |
---|
| 187 | ALLOCATE( gphit_crs(jpi_crs,jpj_crs) , glamt_crs(jpi_crs,jpj_crs) , & |
---|
| 188 | & gphiu_crs(jpi_crs,jpj_crs) , glamu_crs(jpi_crs,jpj_crs) , & |
---|
| 189 | & gphiv_crs(jpi_crs,jpj_crs) , glamv_crs(jpi_crs,jpj_crs) , & |
---|
| 190 | & gphif_crs(jpi_crs,jpj_crs) , glamf_crs(jpi_crs,jpj_crs) , & |
---|
| 191 | & ff_crs(jpi_crs,jpj_crs) , STAT=ierr(4)) |
---|
| 192 | |
---|
| 193 | ALLOCATE( e1t_crs(jpi_crs,jpj_crs) , e2t_crs(jpi_crs,jpj_crs) , & |
---|
| 194 | & e1u_crs(jpi_crs,jpj_crs) , e2u_crs(jpi_crs,jpj_crs) , & |
---|
| 195 | & e1v_crs(jpi_crs,jpj_crs) , e2v_crs(jpi_crs,jpj_crs) , & |
---|
| 196 | & e1f_crs(jpi_crs,jpj_crs) , e2f_crs(jpi_crs,jpj_crs) , & |
---|
| 197 | & e1e2t_crs(jpi_crs,jpj_crs), STAT=ierr(5)) |
---|
| 198 | |
---|
[4064] | 199 | ALLOCATE( e3t_crs(jpi_crs,jpj_crs,jpk) , e3w_crs(jpi_crs,jpj_crs,jpk) , & |
---|
| 200 | & e3u_crs(jpi_crs,jpj_crs,jpk) , e3v_crs(jpi_crs,jpj_crs,jpk) , & |
---|
| 201 | & e3f_crs(jpi_crs,jpj_crs,jpk) , e1e2w_msk(jpi_crs,jpj_crs,jpk) , & |
---|
| 202 | & e2e3u_msk(jpi_crs,jpj_crs,jpk) , e1e3v_msk(jpi_crs,jpj_crs,jpk) , & |
---|
| 203 | & e1e2w_crs(jpi_crs,jpj_crs,jpk) , e2e3u_crs(jpi_crs,jpj_crs,jpk) , & |
---|
| 204 | & e1e3v_crs(jpi_crs,jpj_crs,jpk) , e3t_max_crs(jpi_crs,jpj_crs,jpk), & |
---|
| 205 | & e3w_max_crs(jpi_crs,jpj_crs,jpk), e3u_max_crs(jpi_crs,jpj_crs,jpk), & |
---|
| 206 | & e3v_max_crs(jpi_crs,jpj_crs,jpk), STAT=ierr(6)) |
---|
[4015] | 207 | |
---|
| 208 | |
---|
[4064] | 209 | ALLOCATE( facsurfv(jpi_crs,jpj_crs,jpk), facsurfu(jpi_crs,jpj_crs,jpk) , & |
---|
| 210 | & facvol_t(jpi_crs,jpj_crs,jpk), facvol_w(jpi_crs,jpj_crs,jpk) , & |
---|
| 211 | & ocean_volume_crs_t(jpi_crs,jpj_crs,jpk), ocean_volume_crs_w(jpi_crs,jpj_crs,jpk), & |
---|
| 212 | & bt_crs(jpi_crs,jpj_crs,jpk) , r1_bt_crs(jpi_crs,jpj_crs,jpk) , STAT=ierr(7)) |
---|
[4015] | 213 | |
---|
| 214 | |
---|
[4064] | 215 | ALLOCATE( crs_surfu_wgt(jpi_crs,jpj_crs,jpk), crs_surfv_wgt(jpi_crs,jpj_crs,jpk) , & |
---|
| 216 | & crs_surfw_wgt(jpi_crs,jpj_crs,jpk), crs_volt_wgt(jpi_crs,jpj_crs,jpk) , STAT=ierr(8)) |
---|
[4015] | 217 | |
---|
| 218 | |
---|
[4064] | 219 | ALLOCATE( mbathy_crs(jpi_crs,jpj_crs), mbkt_crs(jpi_crs,jpj_crs) , & |
---|
| 220 | & mbku_crs(jpi_crs,jpj_crs) , mbkv_crs(jpi_crs,jpj_crs) , STAT=ierr(9)) |
---|
[4015] | 221 | |
---|
[4064] | 222 | ALLOCATE( gdept_crs(jpi_crs,jpj_crs,jpk), gdepu_crs(jpi_crs,jpj_crs,jpk) , & |
---|
| 223 | & gdepv_crs(jpi_crs,jpj_crs,jpk), gdepw_crs(jpi_crs,jpj_crs,jpk) , STAT=ierr(10) ) |
---|
[4015] | 224 | |
---|
| 225 | |
---|
[9019] | 226 | ALLOCATE( un_crs(jpi_crs,jpj_crs,jpk) , vn_crs (jpi_crs,jpj_crs,jpk) , & |
---|
| 227 | & wn_crs(jpi_crs,jpj_crs,jpk) , hdivn_crs(jpi_crs,jpj_crs,jpk) , STAT=ierr(11)) |
---|
[4015] | 228 | |
---|
[4064] | 229 | ALLOCATE( sshn_crs(jpi_crs,jpj_crs), emp_crs (jpi_crs,jpj_crs), emp_b_crs(jpi_crs,jpj_crs), & |
---|
| 230 | & qsr_crs(jpi_crs ,jpj_crs), wndm_crs(jpi_crs,jpj_crs), utau_crs(jpi_crs,jpj_crs) , & |
---|
| 231 | & vtau_crs(jpi_crs,jpj_crs), rnf_crs(jpi_crs ,jpj_crs), & |
---|
| 232 | & fr_i_crs(jpi_crs,jpj_crs), sfx_crs(jpi_crs ,jpj_crs), STAT=ierr(12) ) |
---|
[4015] | 233 | |
---|
[9019] | 234 | ALLOCATE( tsn_crs(jpi_crs,jpj_crs,jpk,jpts), avt_crs(jpi_crs,jpj_crs,jpk), & |
---|
| 235 | & avs_crs(jpi_crs,jpj_crs,jpk), STAT=ierr(13) ) |
---|
[4015] | 236 | |
---|
| 237 | ALLOCATE( nmln_crs(jpi_crs,jpj_crs) , hmld_crs(jpi_crs,jpj_crs) , & |
---|
| 238 | & hmlp_crs(jpi_crs,jpj_crs) , hmlpt_crs(jpi_crs,jpj_crs) , STAT=ierr(14) ) |
---|
| 239 | |
---|
[9019] | 240 | ALLOCATE( nimppt_crs (jpnij) , nlcit_crs (jpnij) , nldit_crs (jpnij) , nleit_crs (jpnij), & |
---|
| 241 | & nimppt_full(jpnij) , nlcit_full(jpnij) , nldit_full(jpnij) , nleit_full(jpnij), & |
---|
| 242 | njmppt_crs (jpnij) , nlcjt_crs (jpnij) , nldjt_crs (jpnij) , nlejt_crs (jpnij), & |
---|
| 243 | & njmppt_full(jpnij) , nlcjt_full(jpnij) , nldjt_full(jpnij) , nlejt_full(jpnij) , STAT=ierr(15) ) |
---|
| 244 | |
---|
[4015] | 245 | crs_dom_alloc = MAXVAL(ierr) |
---|
[9019] | 246 | ! |
---|
[4015] | 247 | END FUNCTION crs_dom_alloc |
---|
[6140] | 248 | |
---|
| 249 | |
---|
[4015] | 250 | INTEGER FUNCTION crs_dom_alloc2() |
---|
| 251 | !!------------------------------------------------------------------- |
---|
| 252 | !! *** FUNCTION crs_dom_alloc *** |
---|
| 253 | !! ** Purpose : Allocate public crs arrays |
---|
| 254 | !!------------------------------------------------------------------- |
---|
| 255 | !! Local variables |
---|
| 256 | INTEGER, DIMENSION(1) :: ierr |
---|
| 257 | |
---|
| 258 | ierr(:) = 0 |
---|
| 259 | |
---|
| 260 | ALLOCATE( mjs_crs(nlej_crs) , mje_crs(nlej_crs), mis_crs(nlei_crs) , mie_crs(nlei_crs), STAT=ierr(1) ) |
---|
| 261 | crs_dom_alloc2 = MAXVAL(ierr) |
---|
| 262 | |
---|
[6140] | 263 | END FUNCTION crs_dom_alloc2 |
---|
[4015] | 264 | |
---|
[6140] | 265 | |
---|
[4015] | 266 | SUBROUTINE dom_grid_glo |
---|
| 267 | !!-------------------------------------------------------------------- |
---|
| 268 | !! *** MODULE dom_grid_glo *** |
---|
| 269 | !! |
---|
| 270 | !! ** Purpose : +Return back to parent grid domain |
---|
| 271 | !!--------------------------------------------------------------------- |
---|
| 272 | |
---|
| 273 | ! Return to parent grid domain |
---|
| 274 | jpi = jpi_full |
---|
| 275 | jpj = jpj_full |
---|
| 276 | jpim1 = jpim1_full |
---|
| 277 | jpjm1 = jpjm1_full |
---|
[9667] | 278 | jperio = nperio_full |
---|
[4015] | 279 | |
---|
| 280 | npolj = npolj_full |
---|
| 281 | jpiglo = jpiglo_full |
---|
| 282 | jpjglo = jpjglo_full |
---|
| 283 | |
---|
| 284 | nlci = nlci_full |
---|
| 285 | nlcj = nlcj_full |
---|
| 286 | nldi = nldi_full |
---|
| 287 | nldj = nldj_full |
---|
| 288 | nlei = nlei_full |
---|
| 289 | nlej = nlej_full |
---|
| 290 | nimpp = nimpp_full |
---|
| 291 | njmpp = njmpp_full |
---|
| 292 | |
---|
| 293 | nlcit(:) = nlcit_full(:) |
---|
| 294 | nldit(:) = nldit_full(:) |
---|
| 295 | nleit(:) = nleit_full(:) |
---|
| 296 | nimppt(:) = nimppt_full(:) |
---|
| 297 | nlcjt(:) = nlcjt_full(:) |
---|
| 298 | nldjt(:) = nldjt_full(:) |
---|
| 299 | nlejt(:) = nlejt_full(:) |
---|
| 300 | njmppt(:) = njmppt_full(:) |
---|
| 301 | |
---|
| 302 | END SUBROUTINE dom_grid_glo |
---|
| 303 | |
---|
[6140] | 304 | |
---|
[4015] | 305 | SUBROUTINE dom_grid_crs |
---|
| 306 | !!-------------------------------------------------------------------- |
---|
| 307 | !! *** MODULE dom_grid_crs *** |
---|
| 308 | !! |
---|
| 309 | !! ** Purpose : Save the parent grid information & Switch to coarse grid domain |
---|
| 310 | !!--------------------------------------------------------------------- |
---|
| 311 | ! |
---|
| 312 | ! Switch to coarse grid domain |
---|
| 313 | jpi = jpi_crs |
---|
| 314 | jpj = jpj_crs |
---|
| 315 | jpim1 = jpi_crsm1 |
---|
| 316 | jpjm1 = jpj_crsm1 |
---|
[9667] | 317 | jperio = nperio_crs |
---|
[4015] | 318 | |
---|
| 319 | npolj = npolj_crs |
---|
| 320 | jpiglo = jpiglo_crs |
---|
| 321 | jpjglo = jpjglo_crs |
---|
| 322 | |
---|
| 323 | |
---|
| 324 | nlci = nlci_crs |
---|
| 325 | nlcj = nlcj_crs |
---|
| 326 | nldi = nldi_crs |
---|
| 327 | nlei = nlei_crs |
---|
| 328 | nlej = nlej_crs |
---|
| 329 | nldj = nldj_crs |
---|
| 330 | nimpp = nimpp_crs |
---|
| 331 | njmpp = njmpp_crs |
---|
| 332 | |
---|
| 333 | nlcit(:) = nlcit_crs(:) |
---|
| 334 | nldit(:) = nldit_crs(:) |
---|
| 335 | nleit(:) = nleit_crs(:) |
---|
| 336 | nimppt(:) = nimppt_crs(:) |
---|
| 337 | nlcjt(:) = nlcjt_crs(:) |
---|
| 338 | nldjt(:) = nldjt_crs(:) |
---|
| 339 | nlejt(:) = nlejt_crs(:) |
---|
| 340 | njmppt(:) = njmppt_crs(:) |
---|
| 341 | ! |
---|
| 342 | END SUBROUTINE dom_grid_crs |
---|
| 343 | |
---|
| 344 | !!====================================================================== |
---|
| 345 | END MODULE crs |
---|
| 346 | |
---|