My Project
ice_grid.f90
Go to the documentation of this file.
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 !/===========================================================================/
13 ! CVS VERSION INFORMATION
14 ! $Id$
15 ! $Name$
16 ! $Revision$
17 !/===========================================================================/
18 
19 !=======================================================================
20 !BOP
21 !
22 ! !MODULE: ice_grid - spatial grids, masks and boundary conditions
23 !
24 ! !DESCRIPTION:
25 !
26 ! Spatial grids, masks, and boundary conditions
27 !
28 ! !REVISION HISTORY:
29 !
30 ! authors: Elizabeth C. Hunke, LANL
31 ! Tony Craig, NCAR
32 !
33 ! !INTERFACE:
34 !
35  module ice_grid
36 !
37 ! !USES:
38 !
39  use ice_kinds_mod
40  use ice_constants
41  use ice_domain
42  use ice_fileunits
43 ! use ice_mpi_internal
44  use ice_work, only: work_g1, work_g2, work_l1, worka
45 !====================================================================
46 ! link to FVCOM
47 ! use LIMS
48  USE mod_utils
49  use all_vars , only: vx,vy,art1,vxmin,vymin
50  ! need the area of t-cell
51 ! ggao
52 !
53 !EOP
54 !
55  implicit none
56 
57  character (len=char_len) :: &
58 ! grid_file & ! input file for POP grid info
59 ! , kmt_file & ! input file for POP grid info
60  grid_type ! rectangular (default) or displaced_pole
61 
62 ! real (kind=dbl_kind), dimension (imt_global,jmt_global) :: &
63 ! TLAT_G &! latitude of cell center T grid
64 ! , TLON_G ! longitude of cell center T grid
65 
66 ! real (kind=dbl_kind), dimension (imt_local,jmt_local) :: &
67 ! dxt &! width of T-cell through the middle (m)
68 ! , dyt &! height of T-cell through the middle (m)
69 ! , dxu &! width of U-cell through the middle (m)
70 ! , dyu &! height of U-cell through the middle (m)
71 ! , HTE &! length of eastern edge of T-cell (m)
72 ! , HTN &! length of northern edge of T-cell (m)
73 ! , HTS &! length of southern edge of T-cell
74 ! , HTW &! length of western edge of T-cell
75 ! , tarea &! area of T-cell (m^2)
76 ! , uarea &! area of U-cell (m^2)
77 ! , ULON &! longitude of velocity pts (radians)
78 ! , ULAT &! latitude of velocity pts (radians)
79 ! , TLON &! longitude of temp pts (radians)
80 ! , TLAT &! latitude of temp pts (radians)
81 ! , dxhy &! 0.5*(HTE - HTE)
82 ! , dyhx ! 0.5*(HTN - HTN)
83 
84 ! real (kind=dbl_kind), dimension (ilo:ihi,jlo:jhi) :: &
85 ! cyp &! 1.5*HTE - 0.5*HTE
86 ! , cxp &! 1.5*HTN - 0.5*HTN
87 ! , cym &! 0.5*HTE - 1.5*HTE
88 ! , cxm &! 0.5*HTN - 1.5*HTN
89 ! , dxt2 &! 0.5*dxt
90 ! , dyt2 &! 0.5*dyt
91 ! , dxt4 &! 0.25*dxt
92 ! , dyt4 &! 0.25*dyt
93 ! , tarear &! 1/tarea
94 ! , uarear &! 1/uarea
95 ! , tinyarea &! puny*tarea
96 ! , ANGLE &! for conversions between POP grid and lat/lon
97 ! , ANGLET &! ANGLE converted to T-cells
98 ! , tarean &! area of NH T-cells
99 ! , tareas ! area of SH T-cells
100 
101  ! Masks
102 ! real (kind=dbl_kind), dimension (imt_local,jmt_local) :: &
103 ! hm &! land/boundary mask, thickness (T-cell)
104 ! , uvm &! land/boundary mask, velocity (U-cell)
105 ! , mask_n &! northern hemisphere
106 ! , mask_s ! southern hemisphere
107 
108 ! logical (kind=log_kind) :: &
109 ! tmask(imt_local,jmt_local) &! land/boundary mask, thickness (T-cell)
110 ! , umask(imt_local,jmt_local) &! land/boundary mask, velocity (U-cell)
111 ! , icetmask(ilo:ihi,jlo:jhi) &! ice extent mask (T-cell)
112 ! , iceumask(ilo:ihi,jlo:jhi) ! ice extent mask (U-cell)
113 
114 ! real (kind=dbl_kind) :: &
115 ! shlat = -40.0_dbl_kind &! artificial masking edge
116 ! , nhlat = 35.0_dbl_kind ! artificial masking edge
117 
118  real (kind=dbl_kind), dimension(:,:),allocatable :: &
119  tlat_g &! latitude of cell center T grid
120  , tlon_g ! longitude of cell center T grid
121 
122  real (kind=dbl_kind), dimension (:,:),allocatable :: &
123  dxt &! width of T-cell through the middle (m)
124  , dyt &! height of T-cell through the middle (m)
125  , dxu &! width of U-cell through the middle (m)
126  , dyu &! height of U-cell through the middle (m)
127  , hte &! length of eastern edge of T-cell (m)
128  , htn &! length of northern edge of T-cell (m)
129  , hts &! length of southern edge of T-cell
130  , htw &! length of western edge of T-cell
131  , tarea &! area of T-cell (m^2)
132  , uarea &! area of U-cell (m^2)
133  , ulon &! longitude of velocity pts (radians)
134  , ulat &! latitude of velocity pts (radians)
135  , tlon &! longitude of temp pts (radians)
136  , tlat &! latitude of temp pts (radians)
137  , dxhy &! 0.5*(HTE - HTE)
138  , dyhx ! 0.5*(HTN - HTN)
139 
140  real (kind=dbl_kind), dimension (:,:),allocatable :: &
141  cyp &! 1.5*HTE - 0.5*HTE
142  , cxp &! 1.5*HTN - 0.5*HTN
143  , cym &! 0.5*HTE - 1.5*HTE
144  , cxm &! 0.5*HTN - 1.5*HTN
145  , dxt2 &! 0.5*dxt
146  , dyt2 &! 0.5*dyt
147  , dxt4 &! 0.25*dxt
148  , dyt4 &! 0.25*dyt
149  , tarear &! 1/tarea
150  , uarear &! 1/uarea
151  , tinyarea &! puny*tarea
152  , angle &! for conversions between POP grid and lat/lon
153  , anglet &! ANGLE converted to T-cells
154  , tarean &! area of NH T-cells
155  , tareas ! area of SH T-cells
156 
157  ! Masks
158  real (kind=dbl_kind), dimension (:,:),allocatable :: &
159  hm &! land/boundary mask, thickness (T-cell)
160  , uvm &! land/boundary mask, velocity (U-cell)
161  , mask_n &! northern hemisphere
162  , mask_s ! southern hemisphere
163 
164  logical (kind=log_kind), dimension (:,:),allocatable :: &
165  tmask &! land/boundary mask, thickness (T-cell)
166  , umask &! land/boundary mask, velocity (U-cell)
167  , icetmask &! ice extent mask (T-cell)
168  , iceumask ! ice extent mask (U-cell)
169 
170 
171  real (kind=dbl_kind) :: &
172  shlat = -40.0_dbl_kind &! artificial masking edge
173  , nhlat = 35.0_dbl_kind ! artificial masking edge
174 
175 !=======================================================================
176 
177  contains
178 
179 
180 !=======================================================================
181 
182 
183 
184 !BOP
185 !
186 ! !IROUTINE: init_grid - horizontal grid initialization
187 !
188 ! !INTERFACE:
189 !
190  subroutine init_grid
191 !
192 ! !DESCRIPTION:
193 !
194 ! Horizontal grid initialization:
195 !
196 ! HT{N,E} = cell widths on {N,E} sides of T cell;
197 ! U{LAT,LONG} = true {latitude,longitude} of U points;
198 ! D{X,Y}{T,U} = {x,y} spacing centered at {T,U} points.
199 !
200 ! !REVISION HISTORY:
201 !
202 ! author: Elizabeth C. Hunke, LANL
203 !
204 ! !USES:
205 !
206 ! use ice_exit
207 ! ggao
208 !
209 ! !INPUT/OUTPUT PARAMETERS:
210 !
211 !
212 !EOP
213 !
214  integer (kind=int_kind) :: i, j
215 
216  real (kind=dbl_kind) :: &
217  angle_0, angle_w, angle_s, angle_sw
218 
219  logical (kind=log_kind), dimension(ilo:ihi,jlo:jhi):: out_of_range
220 
221 ! if (grid_type == 'displaced_pole') then
222 ! call popgrid ! read POP grid lengths directly
223 ! elseif (grid_type == 'column') then
224 ! call columngrid ! column model grid
225 ! else
226 ! call rectgrid ! regular rectangular grid
227 ! endif
228 
229 !!--------------------------------------------------------------------------
230  !! All FVCOM grid are in water ! ggao
231  !!--------------------------------------------------------------------------
232  !!--------------------------------------------------------------------------
233  do j=jlo,jhi
234  do i=ilo,ihi
235  hm(i,j)= 1.0
236 
237  !!
238  write(nu_diag,*)'Please check the domain'
239  write(nu_diag,*)' and specify initial condiction for ICE MODEL'
240  call pstop
241 ! ULAT(i,J)=90.0_SP/rad_to_deg !! Specify the latitude !!yding
242 
243 
244 
245  tlon(i,j)=ulon(i,j) ! VX(I)/rad_to_deg ! longitude of temp pts (radians)
246  tlat(i,j)=ulat(i,j) ! VY(I)/rad_to_deg ! latitude of temp pts (radians)
247  end do
248  end do
249 
250 ! call bound(HTN)
251 ! call bound(HTE)
252 ! call bound(ULAT)
253 ! call bound(ULON)
254 
255  !-----------------------------------------------------------------
256  ! construct T-grid cell and U-grid cell widths
257  !-----------------------------------------------------------------
258 
259  do j=jlo,jhi
260  do i=ilo,ihi
261 
262 ! dxt(i,j) = p5*(HTN(i,j) + HTN(i,j-1))
263 ! dyt(i,j) = p5*(HTE(i,j) + HTE(i-1,j))
264 
265 ! tarea(i,j) = dxt(i,j)*dyt(i,j)
266 ! ggao AREA OF NODE-BASE CONTROl VOLUME
267 ! tarea(i,j) = ART1(j)
268 
269 ! dxu(i,j) = p5*(HTN(i,j) + HTN(i+1,j))
270 ! dyu(i,j) = p5*(HTE(i,j) + HTE(i,j+1))
271 
272 ! HTS(i,j) = HTN(i,j-1)
273 ! HTW(i,j) = HTE(i-1,j)
274 
275  enddo
276  enddo
277 
278  do j=1,jmt_local
279  do i=ilo,ihi
280 ! ggao AREA OF NODE-BASE CONTROl VOLUME
281 ! tarea(i,j) = ART1(j)
282 ! uarea(i,j) = ART1(j)
283  enddo
284  enddo
285 
286 
287 ! call bound(dxt)
288 ! call bound(dyt)
289 ! call bound(dxu)
290 ! call bound(dyu)
291 ! call bound(tarea)
292 ! call bound(HTS)
293 ! call bound(HTW)
294 
295  do j=jlo,jhi
296  do i=ilo,ihi
297 ! uarea(i,j) = p25*(tarea(i,j) + tarea(i+1,j) &
298 ! + tarea(i,j+1) + tarea(i+1,j+1)) ! m^2
299  enddo
300  enddo
301 ! call bound(uarea)
302 
303  ! grid length combinations
304  do j=jlo,jhi
305  do i=ilo,ihi
306 ! dxt2(i,j) = 0.5*dxt(i,j)
307 ! dyt2(i,j) = 0.5*dyt(i,j)
308 ! dxt4(i,j) = 0.25*dxt(i,j)
309 ! dyt4(i,j) = 0.25*dyt(i,j)
310 ! tarear(i,j) = 1./tarea(i,j)
311 ! uarear(i,j) = 1./uarea(i,j)
312 ! tinyarea(i,j) = puny*tarea(i,j)
313 
314 ! cyp(i,j) = (1.5*HTE(i,j) - 0.5*HTE(i-1,j))
315 ! cxp(i,j) = (1.5*HTN(i,j) - 0.5*HTN(i,j-1))
316 ! cym(i,j) = (0.5*HTE(i,j) - 1.5*HTE(i-1,j))
317 ! cxm(i,j) = (0.5*HTN(i,j) - 1.5*HTN(i,j-1))
318 
319 ! dxhy(i,j) = 0.5*(HTE(i,j) - HTE(i-1,j))
320 ! dyhx(i,j) = 0.5*(HTN(i,j) - HTN(i,j-1))
321  enddo
322  enddo
323 
324 ! call bound(dxhy)
325 ! call bound(dyhx)
326 
327 !-----------------------------------------------------------------
328 ! Calculate ANGLET to be compatible with POP ocean model
329 ! First, ensure that -pi <= ANGLE <= pi
330 !-----------------------------------------------------------------
331 
332 ! out_of_range = .false.
333 ! where (ANGLE < -pi .or. ANGLE > pi) out_of_range = .true.
334 ! if (count(out_of_range) > 0) then
335 ! call abort_ice ('init_grid: ANGLE out of expected range')
336 ! endif
337 ! ggao
338 
339 
340 !-----------------------------------------------------------------
341 ! Pad ANGLE so ghost cells can be used in averaging to get ANGLET
342 !-----------------------------------------------------------------
343 
344 ! ggao 0105-2007
345 ! work_l1(ilo:ihi,jlo:jhi) = ANGLE(ilo:ihi,jlo:jhi)
346 ! call bound (work_l1)
347 ! change end
348 
349 !-----------------------------------------------------------------
350 ! Compute ANGLE on T-grid
351 !-----------------------------------------------------------------
352 ! do j=jlo,jhi
353 ! do i=ilo,ihi
354 ! angle_0 = work_l1(i ,j ) ! w----0
355 ! angle_w = work_l1(i-1,j ) ! | |
356 ! angle_s = work_l1(i, j-1) ! | |
357 ! angle_sw = work_l1(i-1,j-1) ! sw---s
358 
359 ! if ( angle_0 < c0i ) then
360 ! if ( abs(angle_w - angle_0) > pi) &
361 ! angle_w = angle_w - pi2
362 ! if ( abs(angle_s - angle_0) > pi) &
363 ! angle_s = angle_s - pi2
364 ! if ( abs(angle_sw - angle_0) > pi) &
365 ! angle_sw = angle_sw - pi2
366 ! endif
367 
368 ! ANGLET(i,j) = angle_0 * p25 + angle_w * p25 &
369 ! + angle_s * p25 + angle_sw* p25
370 ! ANGLET(i,j) =0.0
371 ! enddo
372 ! enddo
373 ! ggao
374 
375 ! call Tlatlon ! get lat, lon on the T grid
376 ! call makemask ! velocity mask, hemisphere masks
377 
378 ! do j=1,jmt_global
379 ! do i=1,imt_global
380 ! work_g1(i,j) = float((j-1)*imt_global + i)
381 ! enddo
382 ! enddo
383 ! call global_scatter(work_g1,rndex_global)
384 ! index_global = nint(rndex_global)
385 ! ggao
386 
387  end subroutine init_grid
388 
389 !=======================================================================
390 !BOP
391 !
392 ! !IROUTINE: popgrid - reads and sets pop displaced pole grid and land mask
393 !
394 ! !INTERFACE:
395 !
396  subroutine popgrid
397 !
398 ! !DESCRIPTION:
399 !
400 ! POP displaced pole grid and land mask.
401 ! Grid record number, field and units are:
402 ! (1) ULAT (radians)
403 ! (2) ULON (radians)
404 ! (3) HTN (cm)
405 ! (4) HTE (cm)
406 ! (5) HUS (cm)
407 ! (6) HUW (cm)
408 ! (7) ANGLE (radians)
409 !
410 ! Land mask record number and field is (1) KMT.
411 !
412 ! !REVISION HISTORY:
413 !
414 ! author: Elizabeth C. Hunke, LANL
415 !
416 ! !USES:
417 !
418 ! use ice_read_write
419 ! ggao
420 !
421 ! !INPUT/OUTPUT PARAMETERS:
422 !
423 !
424 !EOP
425 !
426  integer (kind=int_kind) :: i, j
427  logical (kind=log_kind) :: scatter, diag
428 
429 ! change
430 ! call ice_open(nu_grid,grid_file,64)
431 ! call ice_open(nu_kmt,kmt_file,32)
432 
433  scatter = .true. ! scatter data to all processors
434  diag = .true. ! write diagnostic info
435 
436 ! call ice_read(nu_grid,1,worka,'rda8',scatter,diag)
437 ! ULAT(ilo:ihi,jlo:jhi)=worka(ilo:ihi,jlo:jhi)
438 ! call ice_read(nu_grid,2,worka,'rda8',scatter,diag)
439 ! ULON(ilo:ihi,jlo:jhi)=worka(ilo:ihi,jlo:jhi)
440 ! call ice_read(nu_grid,3,worka,'rda8',scatter,diag)
441 ! HTN(ilo:ihi,jlo:jhi)=worka(ilo:ihi,jlo:jhi)*cm_to_m
442 ! call ice_read(nu_grid,4,worka,'rda8',scatter,diag)
443 ! HTE(ilo:ihi,jlo:jhi)=worka(ilo:ihi,jlo:jhi)*cm_to_m
444 ! call ice_read(nu_grid,7,worka,'rda8',scatter,diag)
445 ! ANGLE(ilo:ihi,jlo:jhi)=worka(ilo:ihi,jlo:jhi)
446 ! call ice_read(nu_kmt,1,worka,'ida4',scatter,diag)
447 
448  if (my_task == master_task) then
449 ! close (nu_grid)
450 ! close (nu_kmt)
451  endif
452 
453 ! ggao change end
454 
455  do j=jlo,jhi
456  do i=ilo,ihi
457 ! hm(i,j) = worka(i,j)
458 ! if (hm(i,j) >= c1i) hm(i,j) = c1i
459 
460  ! uncomment to mask out tropics
461  ! Do this only if running uncoupled
462 !!! if (ULAT(i,j) > shlat/rad_to_deg .and.
463 !!! & ULAT(i,j) < nhlat/rad_to_deg) hm(i,j) = c0i
464  enddo
465  enddo
466 
467  end subroutine popgrid
468 
469 !=======================================================================
470 !BOP
471 !
472 ! !IROUTINE: columngrid - column grid and mask
473 !
474 ! !INTERFACE:
475 !
476  subroutine columngrid
477 !
478 ! !DESCRIPTION:
479 !
480 ! Column grid and mask
481 !
482 ! !REVISION HISTORY:
483 !
484 ! author: C. M. Bitz UW, (based on rectgrid by Hunke)
485 !
486 ! modified Nov. 2003 by William H. Lipscomb, LANL
487 !
488 ! !USES:
489 !
490  use ice_model_size
491 ! use ice_exit
492 ! ggao
493 
494 !
495 ! !INPUT/OUTPUT PARAMETERS:
496 !
497 !EOP
498 !
499  integer (kind=int_kind) :: i, j
500 
501  !-----------------------------------------------------------------
502  ! Calculate various geometric 2d arrays
503  !-----------------------------------------------------------------
504 
505 ! do j=jlo,jhi
506 ! do i=ilo,ihi
507 ! HTN (i,j) = 1.6e4_dbl_kind ! constant longitude spacing =
508 ! ! meaningless
509 ! HTE (i,j) = 1.6e4_dbl_kind ! constant latitude spacing =
510 ! ! meaningless
511 ! ULAT (i,j) = 75.5/rad_to_deg ! used to determine hemisphere and
512 ! ULON (i,j) = 170.0/rad_to_deg ! init_state, need not be exact
513 ! ANGLE(i,j) = c0i ! "square with the world"
514 ! enddo
515 ! enddo
516 
517  !-----------------------------------------------------------------
518  ! Verify that imt_global and jmt_global are 1
519  !-----------------------------------------------------------------
520 
521 ! if ((imt_global /= 1).or. (jmt_global /= 1)) then
522 ! write(nu_diag,*) &
523 ! 'Because you have selected the column model flag'
524 ! write(nu_diag,*) 'Please set imt_global=jmt_global=1 in file'
525 ! write(nu_diag,*) 'ice_model_size.F and recompile'
526 ! call abort_ice ('columngrid: check imt_global and jmt_global')
527 ! endif
528 
529  !-----------------------------------------------------------------
530  ! Construct T-cell land mask
531  !-----------------------------------------------------------------
532 
533 ! do j=1,jmt_global
534 ! do i=1,imt_global
535 ! work_g1(i,j) = c1i
536 ! enddo
537 ! enddo
538 
539 ! call global_scatter(work_g1,worka)
540 
541  do j=jlo,jhi
542  do i=ilo,ihi
543 ! hm(i,j) = worka(i,j)
544 ! for fvcom 1D
545  hm(i,j) = c1i !worka(i,j)
546  enddo
547  enddo
548 
549  end subroutine columngrid
550 
551 !=======================================================================
552 !BOP
553 !
554 ! !IROUTINE: rectgrid - regular rectangular grid and mask
555 !
556 ! !INTERFACE:
557 !
558  subroutine rectgrid
559 !
560 ! !DESCRIPTION:
561 !
562 ! Regular rectangular grid and mask
563 !
564 ! !REVISION HISTORY:
565 !
566 ! author: Elizabeth C. Hunke, LANL
567 !
568 ! !USES:
569 !
570  use ice_model_size
571 !
572 ! !INPUT/OUTPUT PARAMETERS:
573 !
574 !EOP
575 !
576  integer (kind=int_kind) :: i, j
577 
578  !-----------------------------------------------------------------
579  ! Calculate various geometric 2d arrays
580  !-----------------------------------------------------------------
581 
582  do j=jlo,jhi
583  do i=ilo,ihi
584 !!! HTN (i,j) = 3.1e4_dbl_kind ! constant longitude spacing =
585  ! POP <4/3> min, m
586 !!! HTE (i,j) = 3.1e4_dbl_kind ! constant latitude spacing =
587  ! POP <4/3> min, m
588 ! HTN (i,j) = 1.6e4_dbl_kind ! constant longitude spacing =
589  ! POP <2/3> min, m
590 ! HTE (i,j) = 1.6e4_dbl_kind ! constant latitude spacing =
591  ! POP <2/3> min, m
592 ! ULAT (i,j) = c0i ! remember to set Coriolis !
593 ! ULON (i,j) = c0i
594 ! ANGLE(i,j) = c0i ! "square with the world"
595  enddo
596  enddo
597 
598  !-----------------------------------------------------------------
599  ! Construct T-cell land mask
600  !-----------------------------------------------------------------
601 
602  do j=1,jmt_global ! initialize hm as land
603  do i=1,imt_global
604 ! work_g1(i,j) = c0i
605  enddo
606  enddo
607 
608 !!! do j=1,jmt_global ! open
609 !!! do i=1,imt_global ! open
610  do j=3,jmt_global-2 ! closed: NOTE jmt_global > 5
611  do i=3,imt_global-2 ! closed: NOTE imt_global > 5
612 ! work_g1(i,j) = c1i
613  enddo
614  enddo
615 
616 ! call global_scatter(work_g1,worka)
617 
618  do j=jlo,jhi
619  do i=ilo,ihi
620 ! hm(i,j) = worka(i,j)
621  enddo
622  enddo
623 
624  end subroutine rectgrid
625 
626 !=======================================================================
627 !BOP
628 !
629 ! !IROUTINE: makemask - makes logical land masks (T,U) and hemispheric masks
630 !
631 ! !INTERFACE:
632 !
633  subroutine makemask
634 !
635 ! !DESCRIPTION:
636 !
637 ! Sets the boundary values for the T cell land mask (hm) and
638 ! makes the logical land masks for T and U cells (tmask, umask).
639 ! Also creates hemisphere masks (mask-n northern, mask-s southern)
640 !
641 ! !REVISION HISTORY:
642 !
643 ! author: Elizabeth C. Hunke, LANL
644 !
645 ! !USES:
646 !
647 ! !INPUT/OUTPUT PARAMETERS:
648 !
649 !EOP
650 !
651  integer (kind=int_kind) :: i, j
652 
653 ! call bound(hm) !!! use real arrays to get boundary conditions
654 
655  !-----------------------------------------------------------------
656  ! construct T-cell and U-cell masks
657  !-----------------------------------------------------------------
658 
659  do j=jlo,jhi
660  do i=ilo,ihi
661  !! T and UV at the node
662  !! All FVCOM grid are in water ! ggao
663 ! UVM(i,J) =HM(i,J)
664 ! uvm(i,j) = min(hm(i,j),hm(i+1,j),hm(i,j+1),hm(i+1,j+1))
665 !
666  enddo
667  enddo
668 ! call bound(uvm) !!! use real arrays to get boundary conditions
669 
670 
671 
672  do j=1,jmt_local
673  do i=1,imt_local
674 ! tmask(i,j) = .false.
675 ! umask(i,j) = .false.
676 ! if ( hm(i,j) > p5) tmask(i,j) = .true.
677 ! if (uvm(i,j) > p5) umask(i,j) = .true.
678 !!--------------------------------------------------------------------------
679  !! All FVCOM grid are in water ! ggao
680  !!--------------------------------------------------------------------------
681  !!--------------------------------------------------------------------------
682 ! tmask(i,j) = .true.
683 ! umask(i,j) = .true.
684 
685  enddo
686  enddo
687 
688  !-----------------------------------------------------------------
689  ! create hemisphere masks
690  !-----------------------------------------------------------------
691 
692  do j=1,jmt_local
693  do i=1,imt_local
694 ! mask_n(i,j) = c0i
695 ! mask_s(i,j) = c0i
696  enddo
697  enddo
698  do j=jlo,jhi
699  do i=ilo,ihi
700 ! if (ULAT(i,j) >= -puny) mask_n(i,j) = c1i ! northern hemisphere
701 ! if (ULAT(i,j) < -puny) mask_s(i,j) = c1i ! southern hemisphere
702 
703 ! tarean(i,j) = tarea(i,j)*mask_n(i,j) ! N hemisphere area mask (m^2)
704 ! tareas(i,j) = tarea(i,j)*mask_s(i,j) ! S hemisphere area mask (m^2)
705  enddo
706  enddo
707 
708  end subroutine makemask
709 
710 !=======================================================================
711 !BOP
712 !
713 ! !IROUTINE: Tlatlon - initializes latitude and longitudes on T grid
714 !
715 ! !INTERFACE:
716 !
717  subroutine tlatlon
718 !
719 ! !DESCRIPTION:
720 !
721 ! Initializes latitude and longitude on T grid
722 !
723 ! !REVISION HISTORY:
724 !
725 ! author: Elizabeth C. Hunke, LANL; code originally based on POP grid
726 ! generation routine
727 !
728 ! !USES:
729 !
730  use ice_model_size
731 ! use ice_read_write ! if reading ULAT, ULON directly from file
732 !
733 ! !INPUT/OUTPUT PARAMETERS:
734 !
735 !EOP
736 !
737  integer (kind=int_kind) :: &
738  i, j ! horizontal indices
739 
740  integer (kind=int_kind) :: im1
741  real (kind=dbl_kind) :: &
742  z1,x1,y1,z2,x2,y2,z3,x3,y3,z4,x4,y4,tx,ty,tz,da
743 
744 ! allocate (work_g2(imt_global,jmt_global))
745 
746 ! call global_gather(work_g1,ULON(ilo:ihi,jlo:jhi))
747 ! call global_gather(work_g2,ULAT(ilo:ihi,jlo:jhi))
748 
749  if (my_task == master_task) then
750 
751  do j=2,jmt_global
752  do i=1,imt_global
753 
754  if (i==1) then
755  im1=imt_global
756  else
757  im1=i-1
758  endif
759 
760 ! z1 = cos(work_g2(im1,j-1))
761 ! x1 = cos(work_g1(im1,j-1))*z1
762 ! y1 = sin(work_g1(im1,j-1))*z1
763 ! z1 = sin(work_g2(im1,j-1))
764 
765 ! z2 = cos(work_g2(i,j-1))
766 ! x2 = cos(work_g1(i,j-1))*z2
767 ! y2 = sin(work_g1(i,j-1))*z2
768 ! z2 = sin(work_g2(i,j-1))
769 
770 ! z3 = cos(work_g2(im1,j))
771 ! x3 = cos(work_g1(im1,j))*z3
772 ! y3 = sin(work_g1(im1,j))*z3
773 ! z3 = sin(work_g2(im1,j))
774 
775 ! z4 = cos(work_g2(i,j))
776 ! x4 = cos(work_g1(i,j))*z4
777 ! y4 = sin(work_g1(i,j))*z4
778 ! z4 = sin(work_g2(i,j))
779 
780 ! tx = (x1+x2+x3+x4)/c4i
781 ! ty = (y1+y2+y3+y4)/c4i
782 ! tz = (z1+z2+z3+z4)/c4i
783 ! da = sqrt(tx**2+ty**2+tz**2)
784 
785 ! tz = tz/da
786 
787  ! TLON_G in radians East
788 ! TLON_G(i,j) = c0i
789 ! if (tx /= c0i .or. ty /= c0i) TLON_G(i,j) = atan2(ty,tx)
790 
791  ! TLAT_G in radians North
792 ! TLAT_G(i,j) = asin(tz)
793 
794  end do
795  end do
796 
797  ! j=1: linear approximation
798  do i=1,imt_global
799 ! TLON_G(i,1) = TLON_G(i,2)
800 ! TLAT_G(i,1) = c2i*TLAT_G(i,2) - TLAT_G(i,3)
801  end do
802 
803 ! write(nu_diag,*) ''
804 ! write(nu_diag,*) 'min/max ULON_G:',minval(work_g1),maxval(work_g1)
805 ! write(nu_diag,*) 'min/max TLON_G:',minval(TLON_G),maxval(TLON_G)
806 ! write(nu_diag,*) 'min/max ULAT_G:',minval(work_g2),maxval(work_g2)
807 ! write(nu_diag,*) 'min/max TLAT_G:',minval(TLAT_G),maxval(TLAT_G)
808 
809  endif ! master_task
810 
811 ! deallocate (work_g2)
812 
813 ! call global_scatter(TLON_G,worka)
814  do j=jlo,jhi
815  do i=ilo,ihi
816 ! TLON(i,j) = worka(i,j)
817  enddo
818  enddo
819 
820 ! call global_scatter(TLAT_G,worka)
821  do j=jlo,jhi
822  do i=ilo,ihi
823 ! TLAT(i,j) = worka(i,j)
824  enddo
825  enddo
826 
827 ! call bound(TLON)
828 ! call bound(TLAT)
829 
830  end subroutine tlatlon
831 
832 !=======================================================================
833 !BOP
834 !
835 ! !IROUTINE: t2ugrid - transfer from T-cell centers to U-cell centers
836 !
837 ! !INTERFACE:
838 !
839  subroutine t2ugrid(work)
840 !
841 ! !DESCRIPTION:
842 !
843 ! Transfer from T-cell centers to U-cell centers. Writes work into another
844 ! array that has ghost cells
845 !
846 ! !REVISION HISTORY:
847 !
848 ! author: Elizabeth C. Hunke, LANL
849 !
850 ! !USES:
851 !
852 ! !INPUT/OUTPUT PARAMETERS:
853 !
854  real (kind=dbl_kind) :: work(ilo:ihi,jlo:jhi)
855 !
856 !EOP
857 !
858  integer (kind=int_kind) :: i, j
859 
860  do j=jlo,jhi
861  do i=ilo,ihi
862 ! work_l1(i,j) = work(i,j)
863  enddo
864  enddo
865 ! call bound(work_l1)
866 ! call to_ugrid(work_l1,work)
867 
868  end subroutine t2ugrid
869 
870 !=======================================================================
871 !BOP
872 !
873 ! !IROUTINE: to_ugrid - shift from T-cell to U-cell midpoints
874 !
875 ! !INTERFACE:
876 !
877  subroutine to_ugrid(work1,work2)
878 !
879 ! !DESCRIPTION:
880 !
881 ! Shifts quantities from the T-cell midpoint (work1) to the U-cell
882 ! midpoint (work2)
883 !
884 ! !REVISION HISTORY:
885 !
886 ! author: Elizabeth C. Hunke, LANL
887 !
888 ! !USES:
889 !
890 ! !INPUT/OUTPUT PARAMETERS:
891 !
892  real (kind=dbl_kind) :: work1(imt_local,jmt_local) &
893  , work2(ilo:ihi,jlo:jhi)
894 !
895 !EOP
896 !
897  integer (kind=int_kind) :: i, j
898 
899  do j=jlo,jhi
900  do i=ilo,ihi
901 ! work2(i,j) = p25*(work1(i,j)*tarea(i,j) &
902 ! + work1(i+1,j)*tarea(i+1,j) &
903 ! + work1(i,j+1)*tarea(i,j+1) &
904 ! + work1(i+1,j+1)*tarea(i+1,j+1))/uarea(i,j)
905  enddo
906  enddo
907 
908  end subroutine to_ugrid
909 
910 !=======================================================================
911 !BOP
912 !
913 ! !IROUTINE: u2tgrid - transfer from U-cell centers to T-cell centers
914 !
915 ! !INTERFACE:
916 !
917  subroutine u2tgrid(work)
918 !
919 ! !DESCRIPTION:
920 !
921 ! Transfer from U-cell centers to T-cell centers. Writes work into
922 ! another array that has ghost cells
923 !
924 ! !REVISION HISTORY:
925 !
926 ! author: Elizabeth C. Hunke, LANL
927 !
928 ! !USES:
929 !
930 ! !INPUT/OUTPUT PARAMETERS:
931 !
932  real (kind=dbl_kind) :: work(ilo:ihi,jlo:jhi)
933 !
934 !EOP
935 !
936  integer (kind=int_kind) :: i, j
937 
938  do j=jlo,jhi
939  do i=ilo,ihi
940 ! work_l1(i,j) = work(i,j)
941  enddo
942  enddo
943 ! call bound(work_l1)
944 ! call to_tgrid(work_l1,work)
945 
946  end subroutine u2tgrid
947 
948 !=======================================================================
949 !BOP
950 !
951 ! !IROUTINE: to_tgrid - shifts array from U-cell to T-cell midpoints
952 !
953 ! !INTERFACE:
954 !
955  subroutine to_tgrid(work1,work2)
956 !
957 ! !DESCRIPTION:
958 !
959 ! Shifts quantities from the U-cell midpoint (work1) to the T-cell
960 ! midpoint (work2)
961 !
962 ! !REVISION HISTORY:
963 !
964 ! author: Elizabeth C. Hunke, LANL
965 !
966 ! !USES:
967 !
968 ! !INPUT/OUTPUT PARAMETERS:
969 !
970  real (kind=dbl_kind) :: work1(imt_local,jmt_local) &
971  , work2(ilo:ihi,jlo:jhi)
972 !
973 !EOP
974 !
975  integer (kind=int_kind) :: i, j
976 
977  do j=jlo,jhi
978  do i=ilo,ihi
979 ! work2(i,j) = p25*(work1(i,j) * uarea(i,j) &
980 ! + work1(i-1,j) * uarea(i-1,j) &
981 ! + work1(i,j-1) * uarea(i,j-1) &
982 ! + work1(i-1,j-1)* uarea(i-1,j-1))/tarea(i,j)
983  enddo
984  enddo
985 
986  end subroutine to_tgrid
987 
988 !=======================================================================
989 !BOP
990 !
991 ! !IROUTINE: bound - fills ghost cells with boundary information
992 !
993 ! !INTERFACE:
994 !
995  subroutine bound(work1)
996 !
997 ! !DESCRIPTION:
998 !
999 ! Fills ghost cells with boundary information
1000 !
1001 ! !REVISION HISTORY:
1002 !
1003 ! author: Tony Craig, NCAR
1004 !
1005 ! !USES:
1006 !
1007 ! !INPUT/OUTPUT PARAMETERS:
1008 !
1009  real (kind=dbl_kind) :: work1(1)
1010 !
1011 !EOP
1012 !
1013 ! call bound_ijn(1,work1,.true.,.true.,.true.,.true.)
1014 
1015  end subroutine bound
1016 
1017 !=======================================================================
1018 !BOP
1019 !
1020 ! !IROUTINE: bound_sw - fills south and west ghost cells
1021 !
1022 ! !INTERFACE:
1023 !
1024  subroutine bound_sw(work1)
1026 ! !DESCRIPTION:
1027 !
1028 ! Fills south and west ghost cells with boundary information
1029 !
1030 ! !REVISION HISTORY:
1031 !
1032 ! author: Tony Craig, NCAR
1033 !
1034 ! !INPUT/OUTPUT PARAMETERS:
1035 !
1036  real (kind=dbl_kind) :: work1(1)
1037 !
1038 !EOP
1039 !
1040  call bound_ijn(1,work1,.false.,.true.,.false.,.true.)
1041 
1042  end subroutine bound_sw
1043 
1044 !=======================================================================
1045 !BOP
1046 !
1047 ! !IROUTINE: bound_narr - fills neighboring ghost cells with boundary info
1048 !
1049 ! !INTERFACE:
1050 !
1051  subroutine bound_narr(narrays,work1)
1053 ! !DESCRIPTION:
1054 !
1055 ! Fills neighboring ghost cells with boundary information;
1056 ! several arrays at once (for performance)
1057 !
1058 ! !REVISION HISTORY:
1059 !
1060 ! authors: Tony Craig, NCAR
1061 ! Elizabeth C. Hunke, LANL
1062 !
1063 ! !USES:
1064 !
1065 ! !INPUT/OUTPUT PARAMETERS:
1066 !
1067  integer (kind=int_kind) :: narrays
1068  real (kind=dbl_kind) :: work1(1)
1069 !
1070 !EOP
1071 !
1072 ! call bound_ijn(narrays,work1,.true.,.true.,.true.,.true.)
1073 
1074  end subroutine bound_narr
1075 
1076 !=======================================================================
1077 !BOP
1078 !
1079 ! !IROUTINE: bound_narr_ne - fills north and east ghost cells
1080 !
1081 ! !INTERFACE:
1082 !
1083  subroutine bound_narr_ne(narrays,work1)
1085 ! !DESCRIPTION:
1086 !
1087 ! Fills north and east ghost cells with boundary information;
1088 ! several arrays at once (for performance)
1089 !
1090 ! !REVISION HISTORY:
1091 !
1092 ! authors: Tony Craig, NCAR
1093 ! Elizabeth C. Hunke, LANL
1094 !
1095 ! modified Nov. 2003 by William H. Lipscomb, LANL
1096 !
1097 ! !USES:
1098 !
1099 ! !INPUT/OUTPUT PARAMETERS:
1100 !
1101  integer (kind=int_kind) :: narrays
1102  real (kind=dbl_kind) :: work1(1)
1103 !
1104 !EOP
1105 !
1106 ! call bound_ijn(narrays,work1,.true.,.false.,.true.,.false.)
1107 
1108  end subroutine bound_narr_ne
1109 
1110 !=======================================================================
1111 !BOP
1112 !
1113 ! !IROUTINE: bound_ijn - Periodic/Neumann boundary conditions
1114 !
1115 ! !INTERFACE:
1116 !
1117  subroutine bound_ijn(nd,work1,north,south,east,west)
1119 ! !DESCRIPTION:
1120 !
1121 ! Periodic/Neumann conditions for global domain boundaries. \! Assumptions: a *single* row of ghost cells (num-ghost-cells=1); \! work1 array has form (i-index,j-index,number-arrays)
1122 !
1123 ! !REVISION HISTORY:
1124 !
1125 ! authors: Tony Craig, NCAR
1126 ! Elizabeth Hunke, LANL
1127 !
1128 ! !USES:
1129 !
1130 ! use ice_timers
1131 
1132 ! ggao
1133 !
1134 ! !INPUT/OUTPUT PARAMETERS:
1135 !
1136  integer (kind=int_kind) :: nd
1137  real (kind=dbl_kind) :: work1(imt_local,jmt_local,nd)
1138  logical (kind=log_kind) :: north,south,east,west
1139 !
1140 !EOP
1141 !
1142  integer (kind=int_kind) :: i, j, ni
1143 
1144 !#ifdef _MPI
1145 ! integer (kind=int_kind) :: icnt,jcnt &
1146 ! , status(MPI_STATUS_SIZE),request(4)
1147 ! real (kind=dbl_kind) :: workw(jlo:jhi,nd),worke(jlo:jhi,nd) &
1148 ! , workn(ilo-1:ihi+1,nd),works(ilo-1:ihi+1,nd)
1149 !#endif
1150 
1151 ! call ice_timer_start(10) ! bound
1152 
1153 !#ifdef _MPI
1154 ! jcnt=(jhi-jlo+1)*nd
1155 ! icnt=(ihi-ilo+1+2*num_ghost_cells)*nd
1156 !
1157  !-----------------------------------------------------------------
1158  ! west data to east data, west shift
1159  !-----------------------------------------------------------------
1160  if (east) then
1161 
1162  do ni=1,nd
1163  do j=jlo,jhi
1164 ! workw(j,ni)=work1(ilo,j,ni)
1165  enddo
1166  enddo
1167 
1168 ! call MPI_SENDRECV(workw,jcnt,MPI_REAL8,nbr_west,my_task, &
1169 ! worke,jcnt,MPI_REAL8,nbr_east,nbr_east, &
1170 ! MPI_COMM_ICE,status,ierr)
1171 
1172  do ni=1,nd
1173  do j=jlo,jhi
1174 ! work1(ihi+1,j,ni)=worke(j,ni)
1175  enddo
1176  enddo
1177 
1178  endif
1179 
1180  !-----------------------------------------------------------------
1181  ! east data to west data, east shift
1182  !-----------------------------------------------------------------
1183 ! if (west) then
1184 
1185  do ni=1,nd
1186  do j=jlo,jhi
1187 ! worke(j,ni)=work1(ihi,j,ni)
1188  enddo
1189  enddo
1190 
1191 ! call MPI_SENDRECV(worke,jcnt,MPI_REAL8,nbr_east,my_task, &
1192 ! workw,jcnt,MPI_REAL8,nbr_west,nbr_west,&
1193 ! MPI_COMM_ICE,status,ierr)
1194 
1195  do ni=1,nd
1196  do j=jlo,jhi
1197 ! work1(ilo-1,j,n)=workw(j,ni)
1198  enddo
1199  enddo
1200 
1201 ! endif
1202 
1203  !-----------------------------------------------------------------
1204  ! north data to south data, north shift
1205  !-----------------------------------------------------------------
1206 ! if (south) then
1207 ! if (nbr_south /= -1) then
1208 ! call MPI_IRECV(works, &
1209 ! icnt,MPI_REAL8,nbr_south,nbr_south, &
1210 ! MPI_COMM_ICE,request(1),ierr)
1211 ! else
1212 
1213 ! do ni=1,nd
1214 ! do i=ilo-1,ihi+1
1215 ! work1(i,jlo-1,ni)=work1(i,jlo,ni)
1216 ! enddo
1217 ! enddo
1218 
1219 ! endif
1220 ! if (nbr_north /= -1) then
1221 
1222 ! do ni=1,nd
1223 ! do i=ilo-1,ihi+1
1224 ! workn(i,n)=work1(i,jhi,ni)
1225 ! enddo
1226 ! enddo
1227 
1228 ! call MPI_ISEND (workn, &
1229 ! icnt,MPI_REAL8,nbr_north,my_task,&
1230 ! MPI_COMM_ICE,request(2),ierr)
1231 ! endif
1232 ! if (nbr_north /= -1) then
1233 ! call MPI_WAIT(request(2), status, ierr)
1234 ! endif
1235 ! if (nbr_south /= -1) then
1236 ! call MPI_WAIT(request(1), status, ierr)
1237 
1238 ! do ni=1,nd
1239 ! do i=ilo-1,ihi+1
1240 ! work1(i,jlo-1,ni)=works(i,ni)
1241 ! enddo
1242 ! enddo
1243 
1244 ! endif
1245 ! endif
1246 
1247  !-----------------------------------------------------------------
1248  ! south data to north data, south shift
1249  !-----------------------------------------------------------------
1250 ! if (north) then
1251 ! if (nbr_north /= -1) then
1252 ! call MPI_IRECV(workn, &
1253 ! icnt,MPI_REAL8,nbr_north,nbr_north, &
1254 ! MPI_COMM_ICE,request(3),ierr)
1255 ! else
1256 
1257  do ni=1,nd
1258  do i=ilo-1,ihi+1
1259 ! work1(i,jhi+1,ni)=work1(i,jhi,ni)
1260  enddo
1261  enddo
1262 
1263 ! endif
1264 ! if (nbr_south /= -1) then
1265 
1266  do ni=1,nd
1267  do i=ilo-1,ihi+1
1268 ! works(i,ni)=work1(i,jlo,ni)
1269  enddo
1270  enddo
1271 
1272 ! call MPI_ISEND (works, &
1273 ! icnt,MPI_REAL8,nbr_south,my_task, &
1274 ! MPI_COMM_ICE,request(4),ierr)
1275 ! endif
1276 ! if (nbr_south /= -1) then
1277 ! call MPI_WAIT(request(4), status, ierr)
1278 ! endif
1279 ! if (nbr_north /= -1) then
1280 ! call MPI_WAIT(request(3), status, ierr)
1281 
1282  do ni=1,nd
1283  do i=ilo-1,ihi+1
1284 ! work1(i,jhi+1,ni)=workn(i,ni)
1285  enddo
1286  enddo
1287 
1288 ! endif
1289 ! endif
1290 
1291 !#else
1292  !-----------------------------------------------------------------
1293  ! single domain
1294  !-----------------------------------------------------------------
1295 
1296  do ni=1,nd
1297 
1298  ! Periodic conditions
1299  do j=jlo,jhi
1300 ! work1(ilo-1,j,ni) = work1(ihi,j,ni)
1301 ! work1(ihi+1,j,ni) = work1(ilo,j,ni)
1302  enddo
1303 
1304  ! Neumann conditions (POP grid land points)
1305  do i=ilo-1,ihi+1
1306 ! work1(i,jlo-1,ni) = work1(i,jlo,ni)
1307 ! work1(i,jhi+1,ni) = work1(i,jhi,ni)
1308  enddo
1309 
1310  enddo ! ni
1311 !#endif
1312 ! call ice_timer_stop(10) ! bound
1313 
1314  end subroutine bound_ijn
1315 
1316 !=======================================================================
1317 
1318  end module ice_grid
1319 
1320 !=======================================================================
real(kind=dbl_kind), dimension(:,:), allocatable tarea
Definition: ice_grid.f90:122
real(kind=dbl_kind), dimension(:,:), allocatable tlat_g
Definition: ice_grid.f90:118
real(kind=dbl_kind), dimension(:,:), allocatable dxu
Definition: ice_grid.f90:122
real(kind=dbl_kind), dimension(:,:), allocatable cyp
Definition: ice_grid.f90:140
integer(kind=int_kind), parameter jmt_global
real(kind=dbl_kind), dimension(:,:), allocatable dyt4
Definition: ice_grid.f90:140
subroutine t2ugrid(work)
Definition: ice_grid.f90:840
integer, parameter dbl_kind
real(kind=dbl_kind), dimension(:,:), allocatable angle
Definition: ice_grid.f90:140
real(kind=dbl_kind), dimension(:,:), allocatable dyu
Definition: ice_grid.f90:122
real(kind=dbl_kind), dimension(:,:), allocatable dxhy
Definition: ice_grid.f90:122
real(kind=dbl_kind), dimension(:,:), allocatable dxt4
Definition: ice_grid.f90:140
real(sp), dimension(:), allocatable, target art1
Definition: mod_main.f90:1010
subroutine rectgrid
Definition: ice_grid.f90:559
integer(kind=int_kind) ihi
Definition: ice_domain.f90:101
real(kind=dbl_kind), dimension(:,:), allocatable dyhx
Definition: ice_grid.f90:122
real(kind=dbl_kind), dimension(:,:), allocatable ulon
Definition: ice_grid.f90:122
real(kind=dbl_kind), dimension(:,:), allocatable tlat
Definition: ice_grid.f90:122
real(kind=dbl_kind), dimension(:,:), allocatable tinyarea
Definition: ice_grid.f90:140
real(kind=dbl_kind), dimension(:,:), allocatable cxp
Definition: ice_grid.f90:140
real(kind=dbl_kind), dimension(:,:), allocatable dxt
Definition: ice_grid.f90:122
real(kind=dbl_kind), dimension(:,:), allocatable ulat
Definition: ice_grid.f90:122
real(sp) vymin
Definition: mod_main.f90:989
real(kind=dbl_kind), dimension(:,:), allocatable work_g2
Definition: ice_work.f90:51
subroutine bound_ijn(nd, work1, north, south, east, west)
Definition: ice_grid.f90:1118
real(kind=dbl_kind), dimension(:,:), allocatable anglet
Definition: ice_grid.f90:140
real(kind=dbl_kind), dimension(:,:), allocatable uvm
Definition: ice_grid.f90:158
real(kind=dbl_kind), dimension(:,:), allocatable mask_n
Definition: ice_grid.f90:158
subroutine popgrid
Definition: ice_grid.f90:397
real(kind=dbl_kind), dimension(:,:), allocatable uarea
Definition: ice_grid.f90:122
integer(kind=int_kind), parameter imt_global
integer(kind=int_kind) jlo
Definition: ice_domain.f90:101
real(sp), dimension(:), allocatable, target vx
Definition: mod_main.f90:1001
subroutine tlatlon
Definition: ice_grid.f90:718
real(kind=dbl_kind), dimension(:,:), allocatable uarear
Definition: ice_grid.f90:140
subroutine init_grid
Definition: ice_grid.f90:191
subroutine bound(work1)
Definition: ice_grid.f90:996
subroutine pstop
Definition: mod_utils.f90:273
real(sp), dimension(:), allocatable, target vy
Definition: mod_main.f90:1002
integer(kind=int_kind) ilo
Definition: ice_domain.f90:101
integer(kind=int_kind) jhi
Definition: ice_domain.f90:101
real(kind=dbl_kind), dimension(:,:), allocatable hts
Definition: ice_grid.f90:122
real(kind=dbl_kind) shlat
Definition: ice_grid.f90:171
real(kind=dbl_kind) nhlat
Definition: ice_grid.f90:171
subroutine to_tgrid(work1, work2)
Definition: ice_grid.f90:956
real(kind=dbl_kind), dimension(:,:), allocatable worka
Definition: ice_work.f90:61
real(kind=dbl_kind), dimension(:,:), allocatable htw
Definition: ice_grid.f90:122
character(len=char_len) grid_type
Definition: ice_grid.f90:57
real(kind=dbl_kind), dimension(:,:), allocatable dyt
Definition: ice_grid.f90:122
subroutine bound_sw(work1)
Definition: ice_grid.f90:1025
real(kind=dbl_kind), dimension(:,:), allocatable dxt2
Definition: ice_grid.f90:140
subroutine makemask
Definition: ice_grid.f90:634
integer(kind=int_kind), save my_task
Definition: ice_domain.f90:95
integer(kind=int_kind) imt_local
Definition: ice_domain.f90:101
real(kind=dbl_kind), dimension(:,:), allocatable cxm
Definition: ice_grid.f90:140
real(kind=dbl_kind), dimension(:,:), allocatable hm
Definition: ice_grid.f90:158
logical(kind=log_kind), dimension(:,:), allocatable iceumask
Definition: ice_grid.f90:164
real(kind=dbl_kind), dimension(:,:), allocatable tarean
Definition: ice_grid.f90:140
real(kind=dbl_kind), parameter c1i
subroutine bound_narr(narrays, work1)
Definition: ice_grid.f90:1052
real(kind=dbl_kind), dimension(:,:), allocatable work_l1
Definition: ice_work.f90:61
logical(kind=log_kind), dimension(:,:), allocatable umask
Definition: ice_grid.f90:164
real(kind=dbl_kind), dimension(:,:), allocatable htn
Definition: ice_grid.f90:122
subroutine to_ugrid(work1, work2)
Definition: ice_grid.f90:878
real(kind=dbl_kind), dimension(:,:), allocatable work_g1
Definition: ice_work.f90:50
real(kind=dbl_kind), dimension(:,:), allocatable dyt2
Definition: ice_grid.f90:140
subroutine columngrid
Definition: ice_grid.f90:477
real(kind=dbl_kind), dimension(:,:), allocatable tareas
Definition: ice_grid.f90:140
real(kind=dbl_kind), dimension(:,:), allocatable cym
Definition: ice_grid.f90:140
real(kind=dbl_kind), dimension(:,:), allocatable hte
Definition: ice_grid.f90:122
real(kind=dbl_kind), dimension(:,:), allocatable tlon
Definition: ice_grid.f90:122
integer(kind=int_kind), save master_task
Definition: ice_domain.f90:95
real(kind=dbl_kind), dimension(:,:), allocatable tarear
Definition: ice_grid.f90:140
subroutine bound_narr_ne(narrays, work1)
Definition: ice_grid.f90:1084
subroutine u2tgrid(work)
Definition: ice_grid.f90:918
real(kind=dbl_kind), dimension(:,:), allocatable tlon_g
Definition: ice_grid.f90:118
logical(kind=log_kind), dimension(:,:), allocatable icetmask
Definition: ice_grid.f90:164
integer(kind=int_kind) jmt_local
Definition: ice_domain.f90:101
logical(kind=log_kind), dimension(:,:), allocatable tmask
Definition: ice_grid.f90:164
real(kind=dbl_kind), dimension(:,:), allocatable mask_s
Definition: ice_grid.f90:158
real(sp) vxmin
Definition: mod_main.f90:989