[821] | 1 | MODULE limistate_2 |
---|
[3] | 2 | !!====================================================================== |
---|
[821] | 3 | !! *** MODULE limistate_2 *** |
---|
[3] | 4 | !! Initialisation of diagnostics ice variables |
---|
| 5 | !!====================================================================== |
---|
[888] | 6 | !! History : 1.0 ! 01-04 (C. Ethe, G. Madec) Original code |
---|
| 7 | !! 2.0 ! 03-08 (G. Madec) add lim_istate_init |
---|
[508] | 8 | !! ! 04-04 (S. Theetten) initialization from a file |
---|
| 9 | !! ! 06-07 (S. Masson) IOM to read the restart |
---|
[888] | 10 | !! ! 07-10 (G. Madec) surface module |
---|
[508] | 11 | !!-------------------------------------------------------------------- |
---|
[821] | 12 | #if defined key_lim2 |
---|
[3] | 13 | !!---------------------------------------------------------------------- |
---|
[821] | 14 | !! 'key_lim2' : LIM 2.0 sea-ice model |
---|
[3] | 15 | !!---------------------------------------------------------------------- |
---|
[821] | 16 | !! lim_istate_2 : Initialisation of diagnostics ice variables |
---|
| 17 | !! lim_istate_init_2 : initialization of ice state and namelist read |
---|
[3] | 18 | !!---------------------------------------------------------------------- |
---|
| 19 | USE phycst |
---|
[821] | 20 | USE par_ice_2 ! ice parameters |
---|
| 21 | USE dom_ice_2 |
---|
[1037] | 22 | USE eosbn2 ! equation of state |
---|
[508] | 23 | USE lbclnk |
---|
[888] | 24 | USE oce |
---|
[821] | 25 | USE ice_2 |
---|
[508] | 26 | USE iom |
---|
| 27 | USE in_out_manager |
---|
[3625] | 28 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
[3] | 29 | |
---|
| 30 | IMPLICIT NONE |
---|
| 31 | PRIVATE |
---|
| 32 | |
---|
[821] | 33 | PUBLIC lim_istate_2 ! routine called by lim_init_2.F90 |
---|
[3] | 34 | |
---|
[4990] | 35 | ! !! ** namelist (namiceini) ** |
---|
| 36 | LOGICAL :: ln_limini ! Ice initialization state |
---|
[4147] | 37 | REAL(wp) :: ttest ! threshold water temperature for initial sea ice |
---|
| 38 | REAL(wp) :: hninn ! initial snow thickness in the north |
---|
| 39 | REAL(wp) :: hginn ! initial ice thickness in the north |
---|
| 40 | REAL(wp) :: alinn ! initial leads area in the north |
---|
| 41 | REAL(wp) :: hnins ! initial snow thickness in the south |
---|
| 42 | REAL(wp) :: hgins ! initial ice thickness in the south |
---|
| 43 | REAL(wp) :: alins ! initial leads area in the south |
---|
[1228] | 44 | |
---|
| 45 | REAL(wp) :: zero = 0.e0 ! constant value = 0 |
---|
| 46 | REAL(wp) :: zone = 1.e0 ! constant value = 1 |
---|
[3] | 47 | !!---------------------------------------------------------------------- |
---|
[2528] | 48 | !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010) |
---|
[1156] | 49 | !! $Id$ |
---|
[2528] | 50 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[3] | 51 | !!---------------------------------------------------------------------- |
---|
| 52 | CONTAINS |
---|
| 53 | |
---|
[821] | 54 | SUBROUTINE lim_istate_2 |
---|
[3] | 55 | !!------------------------------------------------------------------- |
---|
[821] | 56 | !! *** ROUTINE lim_istate_2 *** |
---|
[3] | 57 | !! |
---|
[77] | 58 | !! ** Purpose : defined the sea-ice initial state |
---|
| 59 | !! |
---|
| 60 | !! ** Method : restart from a state defined in a binary file |
---|
| 61 | !! or from arbitrary sea-ice conditions |
---|
[3] | 62 | !!-------------------------------------------------------------------- |
---|
[508] | 63 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
[1045] | 64 | REAL(wp) :: zidto ! temporary scalar |
---|
[3] | 65 | !-------------------------------------------------------------------- |
---|
[888] | 66 | |
---|
| 67 | CALL lim_istate_init_2 ! reading the initials parameters of the ice |
---|
[3] | 68 | |
---|
[888] | 69 | IF( .NOT. ln_limini ) THEN |
---|
[419] | 70 | |
---|
[4990] | 71 | tfu(:,:) = eos_fzp( tsn(:,:,1,jp_sal) ) * tmask(:,:,1) ! freezing/melting point of sea water [Celcius] |
---|
[1037] | 72 | |
---|
[419] | 73 | DO jj = 1, jpj |
---|
| 74 | DO ji = 1, jpi |
---|
[1037] | 75 | ! ! ice if sst <= t-freez + ttest |
---|
[3294] | 76 | IF( tsn(ji,jj,1,jp_tem) - tfu(ji,jj) >= ttest ) THEN ; zidto = 0.e0 ! no ice |
---|
| 77 | ELSE ; zidto = 1.e0 ! ice |
---|
[1037] | 78 | ENDIF |
---|
| 79 | ! |
---|
[419] | 80 | IF( fcor(ji,jj) >= 0.e0 ) THEN !-- Northern hemisphere. |
---|
| 81 | hicif(ji,jj) = zidto * hginn |
---|
| 82 | frld(ji,jj) = zidto * alinn + ( 1.0 - zidto ) * 1.0 |
---|
| 83 | hsnif(ji,jj) = zidto * hninn |
---|
| 84 | ELSE !--- Southern hemisphere. |
---|
| 85 | hicif(ji,jj) = zidto * hgins |
---|
| 86 | frld(ji,jj) = zidto * alins + ( 1.0 - zidto ) * 1.0 |
---|
| 87 | hsnif(ji,jj) = zidto * hnins |
---|
| 88 | ENDIF |
---|
| 89 | END DO |
---|
| 90 | END DO |
---|
[1037] | 91 | |
---|
| 92 | tfu(:,:) = tfu(:,:) + rt0 ! ftu converted from Celsius to Kelvin (rt0 over land) |
---|
[419] | 93 | |
---|
| 94 | sist (:,:) = tfu(:,:) |
---|
| 95 | tbif (:,:,1) = tfu(:,:) |
---|
| 96 | tbif (:,:,2) = tfu(:,:) |
---|
| 97 | tbif (:,:,3) = tfu(:,:) |
---|
[888] | 98 | |
---|
[419] | 99 | ENDIF |
---|
[888] | 100 | |
---|
[3] | 101 | fsbbq (:,:) = 0.e0 |
---|
| 102 | qstoif(:,:) = 0.e0 |
---|
[1470] | 103 | u_ice (:,:) = 0.e0 |
---|
| 104 | v_ice (:,:) = 0.e0 |
---|
[3] | 105 | |
---|
[77] | 106 | !--- Moments for advection. |
---|
[3] | 107 | |
---|
[77] | 108 | sxice (:,:) = 0.e0 ; sxsn (:,:) = 0.e0 ; sxa (:,:) = 0.e0 |
---|
| 109 | syice (:,:) = 0.e0 ; sysn (:,:) = 0.e0 ; sya (:,:) = 0.e0 |
---|
| 110 | sxxice(:,:) = 0.e0 ; sxxsn(:,:) = 0.e0 ; sxxa (:,:) = 0.e0 |
---|
| 111 | syyice(:,:) = 0.e0 ; syysn(:,:) = 0.e0 ; syya (:,:) = 0.e0 |
---|
| 112 | sxyice(:,:) = 0.e0 ; sxysn(:,:) = 0.e0 ; sxya (:,:) = 0.e0 |
---|
[3] | 113 | |
---|
[77] | 114 | sxc0 (:,:) = 0.e0 ; sxc1 (:,:) = 0.e0 ; sxc2 (:,:) = 0.e0 |
---|
| 115 | syc0 (:,:) = 0.e0 ; syc1 (:,:) = 0.e0 ; syc2 (:,:) = 0.e0 |
---|
| 116 | sxxc0 (:,:) = 0.e0 ; sxxc1(:,:) = 0.e0 ; sxxc2(:,:) = 0.e0 |
---|
| 117 | syyc0 (:,:) = 0.e0 ; syyc1(:,:) = 0.e0 ; syyc2(:,:) = 0.e0 |
---|
| 118 | sxyc0 (:,:) = 0.e0 ; sxyc1(:,:) = 0.e0 ; sxyc2(:,:) = 0.e0 |
---|
[3] | 119 | |
---|
[77] | 120 | sxst (:,:) = 0.e0 |
---|
| 121 | syst (:,:) = 0.e0 |
---|
| 122 | sxxst (:,:) = 0.e0 |
---|
| 123 | syyst (:,:) = 0.e0 |
---|
| 124 | sxyst (:,:) = 0.e0 |
---|
[2855] | 125 | #if ! defined key_lim2_vp |
---|
| 126 | stress1_i (:,:) = 0._wp ! EVP rheology |
---|
| 127 | stress2_i (:,:) = 0._wp |
---|
| 128 | stress12_i(:,:) = 0._wp |
---|
| 129 | #endif |
---|
[3] | 130 | |
---|
[77] | 131 | !-- lateral boundary conditions |
---|
| 132 | CALL lbc_lnk( hicif, 'T', 1. ) |
---|
| 133 | CALL lbc_lnk( frld , 'T', 1. ) |
---|
[299] | 134 | |
---|
| 135 | ! C A U T I O N frld = 1 over land and lbc_lnk put zero along |
---|
| 136 | ! ************* closed boundaries herefore we force to one over land |
---|
| 137 | frld(:,:) = tms(:,:) * frld(:,:) + ( 1. - tms(:,:) ) |
---|
| 138 | |
---|
[77] | 139 | CALL lbc_lnk( hsnif, 'T', 1. ) |
---|
[888] | 140 | CALL lbc_lnk( sist , 'T', 1. , pval = rt0 ) ! set rt0 on closed boundary (required by bulk formulation) |
---|
[77] | 141 | DO jk = 1, jplayersp1 |
---|
| 142 | CALL lbc_lnk(tbif(:,:,jk), 'T', 1. ) |
---|
| 143 | END DO |
---|
| 144 | CALL lbc_lnk( fsbbq , 'T', 1. ) |
---|
| 145 | CALL lbc_lnk( qstoif , 'T', 1. ) |
---|
[888] | 146 | |
---|
[821] | 147 | END SUBROUTINE lim_istate_2 |
---|
[3] | 148 | |
---|
| 149 | |
---|
[821] | 150 | SUBROUTINE lim_istate_init_2 |
---|
[3] | 151 | !!------------------------------------------------------------------- |
---|
[821] | 152 | !! *** ROUTINE lim_istate_init_2 *** |
---|
[3] | 153 | !! |
---|
[77] | 154 | !! ** Purpose : Definition of initial state of the ice |
---|
[3] | 155 | !! |
---|
[77] | 156 | !! ** Method : Read the namiceini namelist and check the parameter |
---|
[888] | 157 | !! values called at the first timestep (nit000) |
---|
[3] | 158 | !! |
---|
[77] | 159 | !! ** input : Namelist namiceini |
---|
[3] | 160 | !!------------------------------------------------------------------- |
---|
[508] | 161 | INTEGER :: inum_ice |
---|
[673] | 162 | INTEGER :: ji,jj |
---|
[4147] | 163 | INTEGER :: ios ! Local integer output status for namelist read |
---|
[419] | 164 | |
---|
[675] | 165 | NAMELIST/namiceini/ ln_limini, ttest, hninn, hginn, alinn, & |
---|
[419] | 166 | & hnins, hgins, alins |
---|
[3] | 167 | !!------------------------------------------------------------------- |
---|
[4147] | 168 | |
---|
| 169 | REWIND( numnam_ice_ref ) ! Namelist namiceini in reference namelist : Ice initial state |
---|
| 170 | READ ( numnam_ice_ref, namiceini, IOSTAT = ios, ERR = 901) |
---|
| 171 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceini in reference namelist', lwp ) |
---|
| 172 | |
---|
| 173 | REWIND( numnam_ice_cfg ) ! Namelist namiceini in configuration namelist : Ice initial state |
---|
| 174 | READ ( numnam_ice_cfg, namiceini, IOSTAT = ios, ERR = 902 ) |
---|
| 175 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceini in configuration namelist', lwp ) |
---|
[4624] | 176 | IF(lwm) WRITE ( numoni, namiceini ) |
---|
[888] | 177 | ! |
---|
| 178 | IF(lwp) THEN |
---|
| 179 | WRITE(numout,*) |
---|
| 180 | WRITE(numout,*) 'lim_istate_init_2 : ice parameters inititialisation ' |
---|
| 181 | WRITE(numout,*) '~~~~~~~~~~~~~~~~~' |
---|
| 182 | WRITE(numout,*) ' threshold water temp. for initial sea-ice ttest = ', ttest |
---|
| 183 | WRITE(numout,*) ' initial snow thickness in the north hninn = ', hninn |
---|
| 184 | WRITE(numout,*) ' initial ice thickness in the north hginn = ', hginn |
---|
| 185 | WRITE(numout,*) ' initial leads area in the north alinn = ', alinn |
---|
| 186 | WRITE(numout,*) ' initial snow thickness in the south hnins = ', hnins |
---|
| 187 | WRITE(numout,*) ' initial ice thickness in the south hgins = ', hgins |
---|
| 188 | WRITE(numout,*) ' initial leads area in the south alins = ', alins |
---|
| 189 | WRITE(numout,*) ' Ice state initialization using input file ln_limini = ', ln_limini |
---|
[3] | 190 | ENDIF |
---|
[419] | 191 | |
---|
| 192 | IF( ln_limini ) THEN ! Ice initialization using input file |
---|
[888] | 193 | ! |
---|
[508] | 194 | CALL iom_open( 'Ice_initialization.nc', inum_ice ) |
---|
[888] | 195 | ! |
---|
[508] | 196 | IF( inum_ice > 0 ) THEN |
---|
[888] | 197 | IF(lwp) WRITE(numout,*) |
---|
| 198 | IF(lwp) WRITE(numout,*) ' ice state initialization with : Ice_initialization.nc' |
---|
[3] | 199 | |
---|
[888] | 200 | CALL iom_get( inum_ice, jpdom_data, 'hicif', hicif ) |
---|
| 201 | CALL iom_get( inum_ice, jpdom_data, 'hsnif', hsnif ) |
---|
| 202 | CALL iom_get( inum_ice, jpdom_data, 'frld' , frld ) |
---|
| 203 | CALL iom_get( inum_ice, jpdom_data, 'ts' , sist ) |
---|
[673] | 204 | CALL iom_get( inum_ice, jpdom_unknown, 'tbif', tbif(1:nlci,1:nlcj,:), & |
---|
[508] | 205 | & kstart = (/ mig(1),mjg(1),1 /), kcount = (/ nlci,nlcj,jplayersp1 /) ) |
---|
[673] | 206 | ! put some values in the extra-halo... |
---|
| 207 | DO jj = nlcj+1, jpj ; tbif(1:nlci,jj,:) = tbif(1:nlci,nlej,:) ; END DO |
---|
| 208 | DO ji = nlci+1, jpi ; tbif(ji ,: ,:) = tbif(nlei ,: ,:) ; END DO |
---|
[508] | 209 | |
---|
| 210 | CALL iom_close( inum_ice) |
---|
[888] | 211 | ! |
---|
[419] | 212 | ENDIF |
---|
| 213 | ENDIF |
---|
[888] | 214 | ! |
---|
[821] | 215 | END SUBROUTINE lim_istate_init_2 |
---|
[3] | 216 | |
---|
| 217 | #else |
---|
| 218 | !!---------------------------------------------------------------------- |
---|
[821] | 219 | !! Default option : Empty module NO LIM 2.0 sea-ice model |
---|
[3] | 220 | !!---------------------------------------------------------------------- |
---|
| 221 | CONTAINS |
---|
[821] | 222 | SUBROUTINE lim_istate_2 ! Empty routine |
---|
| 223 | END SUBROUTINE lim_istate_2 |
---|
[3] | 224 | #endif |
---|
| 225 | |
---|
| 226 | !!====================================================================== |
---|
[821] | 227 | END MODULE limistate_2 |
---|