[3] | 1 | MODULE trasbc |
---|
| 2 | !!============================================================================== |
---|
| 3 | !! *** MODULE trasbc *** |
---|
| 4 | !! Ocean active tracers: surface boundary condition |
---|
| 5 | !!============================================================================== |
---|
[2528] | 6 | !! History : OPA ! 1998-10 (G. Madec, G. Roullet, M. Imbard) Original code |
---|
| 7 | !! 8.2 ! 2001-02 (D. Ludicone) sea ice and free surface |
---|
| 8 | !! NEMO 1.0 ! 2002-06 (G. Madec) F90: Free form and module |
---|
| 9 | !! 3.3 ! 2010-04 (M. Leclair, G. Madec) Forcing averaged over 2 time steps |
---|
| 10 | !! - ! 2010-09 (C. Ethe, G. Madec) Merge TRA-TRC |
---|
[3] | 11 | !!---------------------------------------------------------------------- |
---|
[503] | 12 | |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
[3] | 14 | !! tra_sbc : update the tracer trend at ocean surface |
---|
| 15 | !!---------------------------------------------------------------------- |
---|
| 16 | USE oce ! ocean dynamics and active tracers |
---|
[888] | 17 | USE sbc_oce ! surface boundary condition: ocean |
---|
[3] | 18 | USE dom_oce ! ocean space domain variables |
---|
| 19 | USE phycst ! physical constant |
---|
[216] | 20 | USE traqsr ! solar radiation penetration |
---|
[2528] | 21 | USE trdmod_oce ! ocean trends |
---|
| 22 | USE trdtra ! ocean trends |
---|
[3] | 23 | USE in_out_manager ! I/O manager |
---|
[258] | 24 | USE prtctl ! Print control |
---|
[2528] | 25 | USE restart ! ocean restart |
---|
| 26 | USE sbcrnf ! River runoff |
---|
| 27 | USE sbcmod ! ln_rnf |
---|
| 28 | USE iom |
---|
| 29 | USE lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
[3186] | 30 | USE wrk_nemo ! Memory Allocation |
---|
[3159] | 31 | USE timing ! Timing |
---|
[3] | 32 | |
---|
| 33 | IMPLICIT NONE |
---|
| 34 | PRIVATE |
---|
| 35 | |
---|
[503] | 36 | PUBLIC tra_sbc ! routine called by step.F90 |
---|
[3] | 37 | |
---|
| 38 | !! * Substitutions |
---|
| 39 | # include "domzgr_substitute.h90" |
---|
| 40 | # include "vectopt_loop_substitute.h90" |
---|
| 41 | !!---------------------------------------------------------------------- |
---|
[2528] | 42 | !! NEMO/OPA 3.3 , NEMO Consortium (2010) |
---|
[888] | 43 | !! $Id$ |
---|
[2715] | 44 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[3] | 45 | !!---------------------------------------------------------------------- |
---|
| 46 | CONTAINS |
---|
| 47 | |
---|
| 48 | SUBROUTINE tra_sbc ( kt ) |
---|
| 49 | !!---------------------------------------------------------------------- |
---|
| 50 | !! *** ROUTINE tra_sbc *** |
---|
| 51 | !! |
---|
| 52 | !! ** Purpose : Compute the tracer surface boundary condition trend of |
---|
| 53 | !! (flux through the interface, concentration/dilution effect) |
---|
| 54 | !! and add it to the general trend of tracer equations. |
---|
| 55 | !! |
---|
| 56 | !! ** Method : |
---|
[664] | 57 | !! Following Roullet and Madec (2000), the air-sea flux can be divided |
---|
| 58 | !! into three effects: (1) Fext, external forcing; |
---|
| 59 | !! (2) Fwi, concentration/dilution effect due to water exchanged |
---|
| 60 | !! at the surface by evaporation, precipitations and runoff (E-P-R); |
---|
| 61 | !! (3) Fwe, tracer carried with the water that is exchanged. |
---|
| 62 | !! |
---|
| 63 | !! Fext, flux through the air-sea interface for temperature and salt: |
---|
[3] | 64 | !! - temperature : heat flux q (w/m2). If penetrative solar |
---|
| 65 | !! radiation q is only the non solar part of the heat flux, the |
---|
| 66 | !! solar part is added in traqsr.F routine. |
---|
| 67 | !! ta = ta + q /(rau0 rcp e3t) for k=1 |
---|
| 68 | !! - salinity : no salt flux |
---|
[664] | 69 | !! |
---|
| 70 | !! The formulation for Fwb and Fwi vary according to the free |
---|
| 71 | !! surface formulation (linear or variable volume). |
---|
| 72 | !! * Linear free surface |
---|
| 73 | !! The surface freshwater flux modifies the ocean volume |
---|
[3] | 74 | !! and thus the concentration of a tracer and the temperature. |
---|
| 75 | !! First order of the effect of surface freshwater exchange |
---|
| 76 | !! for salinity, it can be neglected on temperature (especially |
---|
[664] | 77 | !! as the temperature of precipitations and runoffs is usually |
---|
| 78 | !! unknown). |
---|
[3] | 79 | !! - temperature : we assume that the temperature of both |
---|
| 80 | !! precipitations and runoffs is equal to the SST, thus there |
---|
| 81 | !! is no additional flux since in this case, the concentration |
---|
| 82 | !! dilution effect is balanced by the net heat flux associated |
---|
[664] | 83 | !! to the freshwater exchange (Fwe+Fwi=0): |
---|
| 84 | !! (Tp P - Te E) + SST (P-E) = 0 when Tp=Te=SST |
---|
[3] | 85 | !! - salinity : evaporation, precipitation and runoff |
---|
[664] | 86 | !! water has a zero salinity (Fwe=0), thus only Fwi remains: |
---|
[3] | 87 | !! sa = sa + emp * sn / e3t for k=1 |
---|
| 88 | !! where emp, the surface freshwater budget (evaporation minus |
---|
| 89 | !! precipitation minus runoff) given in kg/m2/s is divided |
---|
[1739] | 90 | !! by 1035 kg/m3 (density of ocena water) to obtain m/s. |
---|
[664] | 91 | !! Note: even though Fwe does not appear explicitly for |
---|
| 92 | !! temperature in this routine, the heat carried by the water |
---|
| 93 | !! exchanged through the surface is part of the total heat flux |
---|
| 94 | !! forcing and must be taken into account in the global heat |
---|
| 95 | !! balance). |
---|
| 96 | !! * nonlinear free surface (variable volume, lk_vvl) |
---|
| 97 | !! contrary to the linear free surface case, Fwi is properly |
---|
| 98 | !! taken into account by using the true layer thicknesses to |
---|
| 99 | !! calculate tracer content and advection. There is no need to |
---|
| 100 | !! deal with it in this routine. |
---|
| 101 | !! - temperature: Fwe=SST (P-E+R) is added to Fext. |
---|
| 102 | !! - salinity: Fwe = 0, there is no surface flux of salt. |
---|
[3] | 103 | !! |
---|
| 104 | !! ** Action : - Update the 1st level of (ta,sa) with the trend associated |
---|
| 105 | !! with the tracer surface boundary condition |
---|
| 106 | !! - save the trend it in ttrd ('key_trdtra') |
---|
[503] | 107 | !!---------------------------------------------------------------------- |
---|
[2528] | 108 | INTEGER, INTENT(in) :: kt ! ocean time-step index |
---|
[3] | 109 | !! |
---|
[2528] | 110 | INTEGER :: ji, jj, jk, jn ! dummy loop indices |
---|
| 111 | REAL(wp) :: zfact, z1_e3t, zsrau, zdep |
---|
[3159] | 112 | REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdt, ztrds |
---|
[3] | 113 | !!---------------------------------------------------------------------- |
---|
[3159] | 114 | ! |
---|
| 115 | IF( nn_timing == 1 ) CALL timing_start('tra_sbc') |
---|
| 116 | ! |
---|
[3] | 117 | IF( kt == nit000 ) THEN |
---|
| 118 | IF(lwp) WRITE(numout,*) |
---|
| 119 | IF(lwp) WRITE(numout,*) 'tra_sbc : TRAcer Surface Boundary Condition' |
---|
| 120 | IF(lwp) WRITE(numout,*) '~~~~~~~ ' |
---|
| 121 | ENDIF |
---|
| 122 | |
---|
[1739] | 123 | zsrau = 1. / rau0 ! initialization |
---|
[3] | 124 | |
---|
[2528] | 125 | IF( l_trdtra ) THEN !* Save ta and sa trends |
---|
[3159] | 126 | CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds ) |
---|
| 127 | ztrdt(:,:,:) = tsa(:,:,:,jp_tem) |
---|
| 128 | ztrds(:,:,:) = tsa(:,:,:,jp_sal) |
---|
[216] | 129 | ENDIF |
---|
| 130 | |
---|
[2528] | 131 | !!gm IF( .NOT.ln_traqsr ) qsr(:,:) = 0.e0 ! no solar radiation penetration |
---|
| 132 | IF( .NOT.ln_traqsr ) THEN ! no solar radiation penetration |
---|
| 133 | qns(:,:) = qns(:,:) + qsr(:,:) ! total heat flux in qns |
---|
| 134 | qsr(:,:) = 0.e0 ! qsr set to zero |
---|
| 135 | ENDIF |
---|
[3] | 136 | |
---|
[2528] | 137 | !---------------------------------------- |
---|
| 138 | ! EMP, EMPS and QNS effects |
---|
| 139 | !---------------------------------------- |
---|
| 140 | ! Set before sbc tracer content fields |
---|
| 141 | ! ************************************ |
---|
| 142 | IF( kt == nit000 ) THEN ! Set the forcing field at nit000 - 1 |
---|
| 143 | ! ! ----------------------------------- |
---|
| 144 | IF( ln_rstart .AND. & ! Restart: read in restart file |
---|
| 145 | & iom_varid( numror, 'sbc_hc_b', ldstop = .FALSE. ) > 0 ) THEN |
---|
| 146 | IF(lwp) WRITE(numout,*) ' nit000-1 surface tracer content forcing fields red in the restart file' |
---|
| 147 | zfact = 0.5e0 |
---|
| 148 | CALL iom_get( numror, jpdom_autoglo, 'sbc_hc_b', sbc_tsc_b(:,:,jp_tem) ) ! before heat content sbc trend |
---|
| 149 | CALL iom_get( numror, jpdom_autoglo, 'sbc_sc_b', sbc_tsc_b(:,:,jp_sal) ) ! before salt content sbc trend |
---|
| 150 | ELSE ! No restart or restart not found: Euler forward time stepping |
---|
| 151 | zfact = 1.e0 |
---|
| 152 | sbc_tsc_b(:,:,:) = 0.e0 |
---|
| 153 | ENDIF |
---|
| 154 | ELSE ! Swap of forcing fields |
---|
| 155 | ! ! ---------------------- |
---|
| 156 | zfact = 0.5e0 |
---|
| 157 | sbc_tsc_b(:,:,:) = sbc_tsc(:,:,:) |
---|
| 158 | ENDIF |
---|
| 159 | ! Compute now sbc tracer content fields |
---|
| 160 | ! ************************************* |
---|
| 161 | |
---|
| 162 | ! Concentration dilution effect on (t,s) due to |
---|
| 163 | ! evaporation, precipitation and qns, but not river runoff |
---|
| 164 | |
---|
| 165 | IF( lk_vvl ) THEN ! Variable Volume case |
---|
[3275] | 166 | DO jj = 1, jpj |
---|
| 167 | DO ji = 1, jpi |
---|
[2528] | 168 | ! temperature : heat flux + cooling/heating effet of EMP flux |
---|
| 169 | sbc_tsc(ji,jj,jp_tem) = ro0cpr * qns(ji,jj) - zsrau * emp(ji,jj) * tsn(ji,jj,1,jp_tem) |
---|
| 170 | ! concent./dilut. effect due to sea-ice melt/formation and (possibly) SSS restoration |
---|
| 171 | sbc_tsc(ji,jj,jp_sal) = ( emps(ji,jj) - emp(ji,jj) ) * zsrau * tsn(ji,jj,1,jp_sal) |
---|
| 172 | END DO |
---|
[3] | 173 | END DO |
---|
[2528] | 174 | ELSE ! Constant Volume case |
---|
| 175 | DO jj = 2, jpj |
---|
| 176 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
| 177 | ! temperature : heat flux |
---|
| 178 | sbc_tsc(ji,jj,jp_tem) = ro0cpr * qns(ji,jj) |
---|
| 179 | ! salinity : salt flux + concent./dilut. effect (both in emps) |
---|
| 180 | sbc_tsc(ji,jj,jp_sal) = zsrau * emps(ji,jj) * tsn(ji,jj,1,jp_sal) |
---|
| 181 | END DO |
---|
| 182 | END DO |
---|
| 183 | ENDIF |
---|
| 184 | ! Concentration dilution effect on (t,s) due to evapouration, precipitation and qns, but not river runoff |
---|
| 185 | DO jn = 1, jpts |
---|
| 186 | DO jj = 2, jpj |
---|
| 187 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
| 188 | z1_e3t = zfact / fse3t(ji,jj,1) |
---|
| 189 | tsa(ji,jj,1,jn) = tsa(ji,jj,1,jn) + ( sbc_tsc_b(ji,jj,jn) + sbc_tsc(ji,jj,jn) ) * z1_e3t |
---|
| 190 | END DO |
---|
| 191 | END DO |
---|
[3] | 192 | END DO |
---|
[2528] | 193 | ! Write in the ocean restart file |
---|
| 194 | ! ******************************* |
---|
| 195 | IF( lrst_oce ) THEN |
---|
| 196 | IF(lwp) WRITE(numout,*) |
---|
| 197 | IF(lwp) WRITE(numout,*) 'sbc : ocean surface tracer content forcing fields written in ocean restart file ', & |
---|
| 198 | & 'at it= ', kt,' date= ', ndastp |
---|
| 199 | IF(lwp) WRITE(numout,*) '~~~~' |
---|
| 200 | CALL iom_rstput( kt, nitrst, numrow, 'sbc_hc_b', sbc_tsc(:,:,jp_tem) ) |
---|
| 201 | CALL iom_rstput( kt, nitrst, numrow, 'sbc_sc_b', sbc_tsc(:,:,jp_sal) ) |
---|
| 202 | ENDIF |
---|
| 203 | ! |
---|
| 204 | !---------------------------------------- |
---|
| 205 | ! River Runoff effects |
---|
| 206 | !---------------------------------------- |
---|
| 207 | ! |
---|
| 208 | zfact = 0.5e0 |
---|
[216] | 209 | |
---|
[2528] | 210 | ! Effect on (t,s) due to river runoff (dilution effect automatically applied via vertical tracer advection) |
---|
| 211 | IF( ln_rnf ) THEN |
---|
| 212 | DO jj = 2, jpj |
---|
| 213 | DO ji = fs_2, fs_jpim1 |
---|
| 214 | zdep = 1. / h_rnf(ji,jj) |
---|
| 215 | zdep = zfact * zdep |
---|
[2715] | 216 | IF ( rnf(ji,jj) /= 0._wp ) THEN |
---|
[2528] | 217 | DO jk = 1, nk_rnf(ji,jj) |
---|
| 218 | tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) & |
---|
| 219 | & + ( rnf_tsc_b(ji,jj,jp_tem) + rnf_tsc(ji,jj,jp_tem) ) * zdep |
---|
| 220 | IF( ln_rnf_sal ) tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) & |
---|
| 221 | & + ( rnf_tsc_b(ji,jj,jp_sal) + rnf_tsc(ji,jj,jp_sal) ) * zdep |
---|
[2715] | 222 | END DO |
---|
[2528] | 223 | ENDIF |
---|
[2715] | 224 | END DO |
---|
| 225 | END DO |
---|
[2528] | 226 | ENDIF |
---|
| 227 | !!gm It should be useless |
---|
| 228 | CALL lbc_lnk( tsa(:,:,:,jp_tem), 'T', 1. ) ; CALL lbc_lnk( tsa(:,:,:,jp_sal), 'T', 1. ) |
---|
| 229 | |
---|
| 230 | IF( l_trdtra ) THEN ! save the horizontal diffusive trends for further diagnostics |
---|
| 231 | ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) |
---|
| 232 | ztrds(:,:,:) = tsa(:,:,:,jp_sal) - ztrds(:,:,:) |
---|
| 233 | CALL trd_tra( kt, 'TRA', jp_tem, jptra_trd_nsr, ztrdt ) |
---|
| 234 | CALL trd_tra( kt, 'TRA', jp_sal, jptra_trd_nsr, ztrds ) |
---|
[3159] | 235 | CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds ) |
---|
[216] | 236 | ENDIF |
---|
[503] | 237 | ! |
---|
[2528] | 238 | IF(ln_ctl) CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' sbc - Ta: ', mask1=tmask, & |
---|
| 239 | & tab3d_2=tsa(:,:,:,jp_sal), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) |
---|
[503] | 240 | ! |
---|
[3159] | 241 | IF( nn_timing == 1 ) CALL timing_stop('tra_sbc') |
---|
| 242 | ! |
---|
[3] | 243 | END SUBROUTINE tra_sbc |
---|
| 244 | |
---|
| 245 | !!====================================================================== |
---|
| 246 | END MODULE trasbc |
---|