[825] | 1 | MODULE limmsh |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE limmsh *** |
---|
| 4 | !! LIM ice model : definition of the ice mesh parameters |
---|
| 5 | !!====================================================================== |
---|
[1608] | 6 | !! History : 3.2 ! 2008-01 (NEMO team) LIM-3: adaptation from LIM-2 |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
[825] | 8 | #if defined key_lim3 |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
[834] | 10 | !! 'key_lim3' LIM3 sea-ice model |
---|
[825] | 11 | !!---------------------------------------------------------------------- |
---|
[3625] | 12 | !! lim_msh : definition of the ice mesh |
---|
[825] | 13 | !!---------------------------------------------------------------------- |
---|
[1608] | 14 | USE phycst ! physical constants |
---|
| 15 | USE dom_oce ! ocean domain |
---|
| 16 | USE dom_ice ! sea-ice domain |
---|
| 17 | USE in_out_manager ! I/O manager |
---|
[2715] | 18 | USE lbclnk ! lateral boundary condition - MPP exchanges |
---|
| 19 | USE lib_mpp ! MPP library |
---|
[3625] | 20 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
[825] | 21 | |
---|
| 22 | IMPLICIT NONE |
---|
| 23 | PRIVATE |
---|
| 24 | |
---|
[5123] | 25 | PUBLIC lim_msh ! routine called by sbcice_lim.F90 |
---|
[825] | 26 | |
---|
| 27 | !!---------------------------------------------------------------------- |
---|
[4161] | 28 | !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) |
---|
[1156] | 29 | !! $Id$ |
---|
[2715] | 30 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[825] | 31 | !!---------------------------------------------------------------------- |
---|
| 32 | CONTAINS |
---|
| 33 | |
---|
| 34 | SUBROUTINE lim_msh |
---|
| 35 | !!------------------------------------------------------------------- |
---|
| 36 | !! *** ROUTINE lim_msh *** |
---|
| 37 | !! |
---|
| 38 | !! ** Purpose : Definition of the charact. of the numerical grid |
---|
| 39 | !! |
---|
| 40 | !! ** Action : - Initialisation of some variables |
---|
| 41 | !! - Definition of some constants linked with the grid |
---|
| 42 | !! - Definition of the metric coef. for the sea/ice |
---|
| 43 | !! |
---|
[1608] | 44 | !! Reference : Deleersnijder et al. Ocean Modelling 100, 7-10 |
---|
[825] | 45 | !!--------------------------------------------------------------------- |
---|
[1608] | 46 | INTEGER :: ji, jj ! dummy loop indices |
---|
[2715] | 47 | REAL(wp) :: zusden ! local scalar |
---|
[825] | 48 | !!--------------------------------------------------------------------- |
---|
| 49 | |
---|
| 50 | IF(lwp) THEN |
---|
| 51 | WRITE(numout,*) |
---|
[1608] | 52 | WRITE(numout,*) 'lim_msh : LIM-3 sea-ice model, mesh initialization' |
---|
[825] | 53 | WRITE(numout,*) '~~~~~~~' |
---|
| 54 | ENDIF |
---|
[921] | 55 | |
---|
[1923] | 56 | IF( jphgr_msh == 2 .OR. jphgr_msh == 3 .OR. jphgr_msh == 5 ) & |
---|
[2715] | 57 | & CALL ctl_stop(' Coriolis parameter in LIM not set for f- or beta-plane') |
---|
[1923] | 58 | |
---|
[1608] | 59 | ! !== coriolis factor & Equator position ==! |
---|
| 60 | njeq = INT( jpj / 2 ) |
---|
[825] | 61 | njeqm1 = njeq - 1 |
---|
[1608] | 62 | ! |
---|
| 63 | fcor(:,:) = 2. * omega * SIN( gphit(:,:) * rad ) ! coriolis factor |
---|
| 64 | ! |
---|
[825] | 65 | IF( fcor(1,1) * fcor(1,nlcj) < 0.e0 ) THEN ! local domain include both hemisphere |
---|
| 66 | l_jeq = .TRUE. |
---|
| 67 | njeq = 1 |
---|
| 68 | DO WHILE ( njeq <= jpj .AND. fcor(1,njeq) < 0.e0 ) |
---|
| 69 | njeq = njeq + 1 |
---|
| 70 | END DO |
---|
| 71 | IF(lwp ) WRITE(numout,*) ' the equator is inside the domain at about njeq = ', njeq |
---|
| 72 | ELSEIF( fcor(1,1) < 0.e0 ) THEN |
---|
| 73 | l_jeq = .FALSE. |
---|
| 74 | njeq = jpj |
---|
| 75 | IF(lwp ) WRITE(numout,*) ' the model domain is entirely in the southern hemisphere: njeq = ', njeq |
---|
| 76 | ELSE |
---|
| 77 | l_jeq = .FALSE. |
---|
| 78 | njeq = 2 |
---|
| 79 | IF(lwp ) WRITE(numout,*) ' the model domain is entirely in the northern hemisphere: njeq = ', njeq |
---|
| 80 | ENDIF |
---|
[1608] | 81 | ! |
---|
[825] | 82 | njeqm1 = njeq - 1 |
---|
| 83 | |
---|
| 84 | |
---|
[1608] | 85 | ! !== metric coefficients for sea ice dynamic ==! |
---|
[825] | 86 | wght(:,:,:,:) = 0.e0 |
---|
[1608] | 87 | !!gm Optimisation : wght to be defined at F-point, not I-point and change in limrhg |
---|
[825] | 88 | DO jj = 2, jpj |
---|
| 89 | DO ji = 2, jpi |
---|
[1608] | 90 | zusden = 1.e0 / ( ( e1t(ji,jj) + e1t(ji-1,jj ) ) & |
---|
| 91 | & * ( e2t(ji,jj) + e2t(ji ,jj-1) ) ) |
---|
[825] | 92 | wght(ji,jj,1,1) = zusden * e1t(ji ,jj) * e2t(ji,jj ) |
---|
| 93 | wght(ji,jj,1,2) = zusden * e1t(ji ,jj) * e2t(ji,jj-1) |
---|
| 94 | wght(ji,jj,2,1) = zusden * e1t(ji-1,jj) * e2t(ji,jj ) |
---|
| 95 | wght(ji,jj,2,2) = zusden * e1t(ji-1,jj) * e2t(ji,jj-1) |
---|
| 96 | END DO |
---|
| 97 | END DO |
---|
| 98 | CALL lbc_lnk( wght(:,:,1,1), 'I', 1. ) ! CAUTION: even with the lbc_lnk at ice U-V-point |
---|
| 99 | CALL lbc_lnk( wght(:,:,1,2), 'I', 1. ) ! the value of wght at jpj is wrong |
---|
| 100 | CALL lbc_lnk( wght(:,:,2,1), 'I', 1. ) ! but it is never used |
---|
| 101 | CALL lbc_lnk( wght(:,:,2,2), 'I', 1. ) |
---|
[1608] | 102 | !!gm end |
---|
[921] | 103 | |
---|
[1608] | 104 | ! |
---|
[825] | 105 | END SUBROUTINE lim_msh |
---|
| 106 | |
---|
| 107 | #else |
---|
| 108 | !!---------------------------------------------------------------------- |
---|
| 109 | !! Default option Dummy Module NO LIM sea-ice model |
---|
| 110 | !!---------------------------------------------------------------------- |
---|
| 111 | CONTAINS |
---|
| 112 | SUBROUTINE lim_msh ! Dummy routine |
---|
| 113 | END SUBROUTINE lim_msh |
---|
| 114 | #endif |
---|
| 115 | |
---|
| 116 | !!====================================================================== |
---|
| 117 | END MODULE limmsh |
---|