|
| 1 | +subroutine cal_shortwave_rad_nemo(ice, tracers, partit, mesh) |
| 2 | + ! This routine is inherited from FESOM 1.4 and adopted appropreately. It calculates |
| 3 | + ! shortwave penetration into the ocean assuming the constant chlorophyll concentration. |
| 4 | + ! No penetration under the ice is applied. A decent way for ice region is to be discussed. |
| 5 | + ! This routine should be called after ice2oce coupling done if ice model is used. |
| 6 | + ! Ref.: Morel and Antoine 1994, Sweeney et al. 2005 |
| 7 | + USE MOD_MESH |
| 8 | + USE MOD_ICE |
| 9 | + USE o_PARAM |
| 10 | + USE o_ARRAYS |
| 11 | + USE MOD_PARSUP |
| 12 | + USE MOD_PARTIT |
| 13 | + USE MOD_TRACER |
| 14 | + USE g_CONFIG |
| 15 | + use g_forcing_arrays!, only: chl, sw_3d |
| 16 | + use g_comm_auto |
| 17 | + ! use i_param |
| 18 | + ! use i_arrays |
| 19 | + ! use i_therm_param |
| 20 | + ! use Toy_Channel_Nemo!, only: qsr_c, t_star |
| 21 | + IMPLICIT NONE |
| 22 | + type(t_ice) ,intent(in), target :: ice |
| 23 | + type(t_tracer), intent(inout), target :: tracers |
| 24 | + type(t_partit), intent(inout), target :: partit |
| 25 | + type(t_mesh), intent(in) , target :: mesh |
| 26 | + |
| 27 | + |
| 28 | + integer :: m, n2, n3, k, nzmax, nzmin |
| 29 | + real(kind=WP):: swsurf, aux, zTstar, ztrp |
| 30 | + real(kind=WP):: c, c2, c3, c4, c5 |
| 31 | + real(kind=WP):: v1, v2, sc1, sc2 |
| 32 | + real(kind=WP), pointer :: albw |
| 33 | + |
| 34 | + |
| 35 | +#include "associate_part_def.h" |
| 36 | +#include "associate_mesh_def.h" |
| 37 | +#include "associate_part_ass.h" |
| 38 | +#include "associate_mesh_ass.h" |
| 39 | + |
| 40 | + sw_3d=0.0_WP |
| 41 | + albw => ice%thermo%albw |
| 42 | + |
| 43 | + |
| 44 | + do n2=1, myDim_nod2D+eDim_nod2D |
| 45 | + |
| 46 | + !calculate heat flux |
| 47 | + zTstar = 28.3 ! intensity from 28.3 a -5 deg |
| 48 | + ztrp = 4.0 ! retroaction term on heat fluxes (W/m2/K) |
| 49 | + |
| 50 | + !lat = coord_nod2D(2,n2) |
| 51 | + |
| 52 | + !t_star (n2) = zTstar * cos(pi*((lat / rad - 5.0 ) / 107.0)) |
| 53 | + heat_flux(n2) = ztrp * (tracers%data(1)%values(1,n2) - t_star(n2)) |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + ! shortwave rad. |
| 58 | + swsurf=(1.0_WP-albw)*qsr_c(n2) |
| 59 | + ! the visible part (300nm-750nm) |
| 60 | + swsurf=swsurf*0.54_WP |
| 61 | + ! subtract visible sw rad. from heat_flux, which is '+' for upward |
| 62 | + |
| 63 | + !if (mype==0) write(*,*) "heat_flux_routine", heat_flux(100) |
| 64 | + !if (mype==0) write(*,*) "radiation_routine", qsr_c(100) |
| 65 | + |
| 66 | + heat_flux(n2)=heat_flux(n2)+swsurf |
| 67 | + |
| 68 | + ! attenuation func. for vis. sw rad. according to Morel/Antoine param. |
| 69 | + ! the four parameters in the func. |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + ! limit chl from below |
| 74 | + if (chl(n2) < 0.02_WP) chl(n2)=0.02_WP |
| 75 | + |
| 76 | + |
| 77 | + c=log10(chl(n2)) |
| 78 | + c2=c*c |
| 79 | + c3=c2*c |
| 80 | + c4=c3*c |
| 81 | + c5=c4*c |
| 82 | + ! --> coefficients come from Sweeney et al. 2005, "Impacts of shortwave |
| 83 | + ! penetration depthon large scale ocean circulation and heat transport" see |
| 84 | + ! Appendix A |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + v1=0.008_WP*c+0.132_WP*c2+0.038_WP*c3-0.017_WP*c4-0.007_WP*c5 |
| 89 | + v2=0.679_WP-v1 |
| 90 | + v1=0.321_WP+v1 |
| 91 | + sc1=1.54_WP-0.197_WP*c+0.166_WP*c2-0.252_WP*c3-0.055_WP*c4+0.042_WP*c5 |
| 92 | + sc2=7.925_WP-6.644_WP*c+3.662_WP*c2-1.815_WP*c3-0.218_WP*c4+0.502_WP*c5 |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + ! convert from heat flux [W/m2] to temperature flux [K m/s] |
| 97 | + swsurf=swsurf/vcpw |
| 98 | + ! vis. sw. rad. in the colume |
| 99 | + nzmax=(mesh%nlevels(n2)) |
| 100 | + nzmin=(mesh%ulevels(n2)) |
| 101 | + sw_3d(nzmin, n2)=swsurf |
| 102 | + do k=nzmin+1, nzmax |
| 103 | + aux=(v1*exp(mesh%zbar_3d_n(k,n2)/sc1)+v2*exp(mesh%zbar_3d_n(k,n2)/sc2)) |
| 104 | + sw_3d(k, n2)=swsurf*aux |
| 105 | + if (aux < 1.e-5_WP .OR. k==nzmax) then |
| 106 | + sw_3d(k, n2)=0.0_WP |
| 107 | + exit |
| 108 | + end if |
| 109 | + end do |
| 110 | + |
| 111 | + ! sw_3d --> TEMPERATURE FLUX through full depth level interfaces into/out off |
| 112 | + ! the tracer volume |
| 113 | + ! sum(sw_3d(1:nlevels(n2)-1,n2)-sw_3d(2:nlevels(n2),n2)) = swsurf !!! |
| 114 | + |
| 115 | +!for testing the subroutine |
| 116 | +!if (mype==30 .and. n2==100) then |
| 117 | +!write(*,*) 'heat_flux=', heat_flux(n2) |
| 118 | +!write(*,*) 'short/longwave=', shortwave(n2), longwave(n2), swsurf*vcpw |
| 119 | +!do k=1, nzmax |
| 120 | +! write(*,*) sw_3d(k, n2)*vcpw |
| 121 | +!end do |
| 122 | +!end if |
| 123 | + |
| 124 | + end do |
| 125 | +!call par_ex |
| 126 | +!stop |
| 127 | +end subroutine cal_shortwave_rad_nemo |
0 commit comments