- Timestamp:
- 2016-10-13T11:08:38+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_coord.f90
r6393 r7025 76 76 !> 77 77 !> * _nesting namelist (namnst)_:<br/> 78 !> you could define sub domain with coarse grid indices or with coordinates. 78 79 !> - in_imin0 : i-direction lower left point indice 79 80 !> of coarse grid subdomain to be used … … 84 85 !> - in_jmax0 : j-direction upper right point indice 85 86 !> of coarse grid subdomain to be used 87 !> - rn_lonmin0 : lower left longitude of coarse grid subdomain to be used 88 !> - rn_lonmax0 : upper right longitude of coarse grid subdomain to be used 89 !> - rn_latmin0 : lower left latitude of coarse grid subdomain to be used 90 !> - rn_latmax0 : upper right latitude of coarse grid subdomain to be used 86 91 !> - in_rhoi : refinement factor in i-direction 87 92 !> - in_rhoj : refinement factor in j-direction<br/> 88 93 !> 89 94 !> \image html grid_zoom_40.png 90 !> \image latex grid_zoom_40.png 95 !> <center> \image latex grid_zoom_40.png 96 !> </center> 91 97 !> 92 98 !> * _output namelist (namout)_: … … 102 108 !> @date September, 2015 103 109 !> - manage useless (dummy) variable, attributes, and dimension 110 !> @date September, 2016 111 !> - allow to use coordinate to define subdomain 104 112 !> 105 113 !> @note Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 139 147 INTEGER(i4) :: il_nvar 140 148 INTEGER(i4) :: il_ew 149 INTEGER(i4) :: il_imin0 150 INTEGER(i4) :: il_imax0 151 INTEGER(i4) :: il_jmin0 152 INTEGER(i4) :: il_jmax0 153 141 154 INTEGER(i4) , DIMENSION(ip_maxdim) :: il_rho 155 INTEGER(i4) , DIMENSION(2) :: il_index 142 156 INTEGER(i4) , DIMENSION(2,2,ip_npoint) :: il_offset 143 157 … … 177 191 178 192 !namnst 193 REAL(sp) :: rn_lonmin0 = -360. 194 REAL(sp) :: rn_lonmax0 = -360. 195 REAL(sp) :: rn_latmin0 = -360. 196 REAL(sp) :: rn_latmax0 = -360. 179 197 INTEGER(i4) :: in_imin0 = 0 180 198 INTEGER(i4) :: in_imax0 = 0 … … 207 225 208 226 NAMELIST /namnst/ & ! nesting namelist 227 & rn_lonmin0, & !< lower left coarse grid longitude 228 & rn_lonmax0, & !< upper right coarse grid longitude 229 & rn_latmin0, & !< lower left coarse grid latitude 230 & rn_latmax0, & !< upper right coarse grid latitude 209 231 & in_imin0, & !< i-direction lower left point indice 210 232 & in_imax0, & !< i-direction upper right point indice … … 301 323 302 324 ! check nesting parameters 303 IF( in_imin0 < 0 .OR. in_imax0 < 0 .OR. in_jmin0 < 0 .OR. in_jmax0 < 0)THEN 325 il_index(:)=0 326 IF( rn_lonmin0 >= -180. .AND. rn_lonmin0 <= 360 .AND. & 327 & rn_latmin0 >= -90. .AND. rn_latmin0 <= 90. )THEN 328 329 il_index(:)=grid_get_closest(tl_coord0, & 330 & REAL(rn_lonmin0,dp), REAL(rn_latmin0,dp), & 331 & cd_pos='ll') 332 il_imin0=il_index(1) 333 il_jmin0=il_index(2) 334 ELSE 335 il_imin0=in_imin0 336 il_jmin0=in_jmin0 337 ENDIF 338 339 il_index(:)=0 340 IF( rn_lonmax0 >= -180. .AND. rn_lonmax0 <= 360 .AND. & 341 & rn_latmax0 >= -90. .AND. rn_latmax0 <= 90. )THEN 342 il_index(:)=grid_get_closest(tl_coord0, & 343 & REAL(rn_lonmax0,dp), REAL(rn_latmax0,dp), & 344 & cd_pos='ur') 345 il_imax0=il_index(1) 346 il_jmax0=il_index(2) 347 ELSE 348 il_imax0=in_imax0 349 il_jmax0=in_jmax0 350 ENDIF 351 352 ! forced indices for east west cyclic domain 353 IF( rn_lonmin0 == rn_lonmax0 .AND. & 354 & rn_lonmin0 /= -360. )THEN 355 il_imin0=0 356 il_imax0=0 357 ENDIF 358 359 IF( il_imin0 < 0 .OR. il_imax0 < 0 .OR. il_jmin0 < 0 .OR. il_jmax0 < 0)THEN 304 360 CALL logger_fatal("CREATE COORD: invalid points indices."//& 305 361 & " check namelist "//TRIM(cl_namelist)) … … 318 374 319 375 ! check domain validity 320 CALL grid_check_dom(tl_coord0, i n_imin0, in_imax0, in_jmin0, in_jmax0 )376 CALL grid_check_dom(tl_coord0, il_imin0, il_imax0, il_jmin0, il_jmax0 ) 321 377 322 378 ! compute domain 323 379 tl_dom=dom_init( tl_coord0, & 324 & i n_imin0, in_imax0,&325 & i n_jmin0, in_jmax0 )380 & il_imin0, il_imax0,& 381 & il_jmin0, il_jmax0 ) 326 382 327 383 ! add extra band (if need be) to compute interpolation
Note: See TracChangeset
for help on using the changeset viewer.