diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index 9b92e4764..2b14a7cd1 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -9,7 +9,9 @@ module module_physics_driver use ozne_def, only: levozp, oz_coeff, oz_pres use h2o_def, only: levh2o, h2o_coeff, h2o_pres use gfs_fv3_needs, only: get_prs_fv3, get_phi_fv3 - use module_nst_water_prop, only: get_dtzm_2d + use sfc_nst, only: sfc_nst_run + use sfc_nst_pre, only: sfc_nst_pre_run + use sfc_nst_post, only: sfc_nst_post_run use GFS_typedefs, only: GFS_statein_type, GFS_stateout_type, & GFS_sfcprop_type, GFS_coupling_type, & GFS_control_type, GFS_grid_type, & @@ -885,59 +887,41 @@ subroutine GFS_physics_driver & if (Model%nstf_name(1) > 0) then - do i = 1, im - if ( islmsk(i) == 0 ) then - tem = (Sfcprop%oro(i)-Sfcprop%oro_uf(i)) * rlapse - tseal(i) = Sfcprop%tsfc(i) + tem - tsurf(i) = tsurf(i) + tem - endif - enddo - - call sfc_nst (im, Model%lsoil, Statein%pgr, Statein%ugrs, & - Statein%vgrs, Statein%tgrs, Statein%qgrs, & - Sfcprop%tref, cd, cdq, Statein%prsl(1,1), work3, & - islmsk, Grid%xlon, Grid%sinlat, stress, & - Radtend%semis, gabsbdlw, adjsfcnsw, Sfcprop%tprcp, & - dtf, kdt, Model%solhr, xcosz, & - Tbd%phy_f2d(1,Model%num_p2d), flag_iter, & - flag_guess, Model%nstf_name, lprnt, ipr, & + call sfc_nst_pre_run(im, islmsk, Sfcprop%oro, Sfcprop%oro_uf, & + Sfcprop%tsfc, & ! --- Input/output - tseal, tsurf, Sfcprop%xt, Sfcprop%xs, Sfcprop%xu, & - Sfcprop%xv, Sfcprop%xz, Sfcprop%zm, Sfcprop%xtts, & - Sfcprop%xzts, Sfcprop%dt_cool, Sfcprop%z_c, & - Sfcprop%c_0, Sfcprop%c_d, Sfcprop%w_0, Sfcprop%w_d,& - Sfcprop%d_conv, Sfcprop%ifd, Sfcprop%qrain, & + tsurf, & ! --- outputs: - qss, gflx, Diag%cmm, Diag%chh, evap, hflx, ep1d) - -! if (lprnt) print *,' tseaz2=',tseal(ipr),' tref=',tref(ipr), -! & ' dt_cool=',dt_cool(ipr),' dt_warm=',2.0*xt(ipr)/xz(ipr), -! & ' kdt=',kdt - - do i = 1, im - if ( islmsk(i) == 0 ) then - tsurf(i) = tsurf(i) - (Sfcprop%oro(i)-Sfcprop%oro_uf(i)) * rlapse - endif - enddo + tseal) + + call sfc_nst_run (im, Model%lsoil, Statein%pgr, Statein%ugrs(:,1), & + Statein%vgrs(:,1), Statein%tgrs(:,1), & + Statein%qgrs(:,1,1), Sfcprop%tref, cd, cdq, & + Statein%prsl(:,1), work3, islmsk, Grid%xlon, & + Grid%sinlat, stress, Radtend%semis, gabsbdlw, & + adjsfcnsw, Sfcprop%tprcp, dtf, kdt, Model%solhr, & + xcosz, Tbd%phy_f2d(:,Model%num_p2d), flag_iter, & + flag_guess, Model%nstf_name(1), Model%nstf_name(4),& + Model%nstf_name(5), lprnt, ipr, & +! --- Input/output + tseal, tsurf, Sfcprop%xt, Sfcprop%xs, Sfcprop%xu, & + Sfcprop%xv, Sfcprop%xz, Sfcprop%zm, Sfcprop%xtts, & + Sfcprop%xzts, Sfcprop%dt_cool, Sfcprop%z_c, & + Sfcprop%c_0, Sfcprop%c_d, Sfcprop%w_0, Sfcprop%w_d,& + Sfcprop%d_conv, Sfcprop%ifd, Sfcprop%qrain, & +! --- outputs: + qss, gflx, Diag%cmm, Diag%chh, evap, hflx, ep1d) -! --- ... run nsst model ... --- - if (Model%nstf_name(1) > 1) then - zsea1 = 0.001*real(Model%nstf_name(4)) - zsea2 = 0.001*real(Model%nstf_name(5)) - call get_dtzm_2d (Sfcprop%xt, Sfcprop%xz, Sfcprop%dt_cool, & - Sfcprop%z_c, Sfcprop%slmsk, zsea1, zsea2, & - im, 1, dtzm) - do i = 1, im - if ( islmsk(i) == 0 ) then - Sfcprop%tsfc(i) = max(271.2,Sfcprop%tref(i) + dtzm(i)) - & - (Sfcprop%oro(i)-Sfcprop%oro_uf(i))*rlapse - endif - enddo - endif - -! if (lprnt) print *,' tseaz2=',tsea(ipr),' tref=',tref(ipr), & -! & ' dt_cool=',dt_cool(ipr),' dt_warm=',dt_warm(ipr),' kdt=',kdt + call sfc_nst_post_run(im, islmsk, Sfcprop%oro, Sfcprop%oro_uf, & + Model%nstf_name(1), Model%nstf_name(4), & + Model%nstf_name(5), Sfcprop%xt, Sfcprop%xz, & + Sfcprop%dt_cool, Sfcprop%z_c, Sfcprop%slmsk, & + Sfcprop%tref, Grid%xlon, & +! --- Input/output + tsurf, & +! --- outputs: + dtzm, Sfcprop%tsfc) else diff --git a/physics/docs/img/NSST.png b/physics/docs/img/NSST.png new file mode 100644 index 000000000..60c62eaaf Binary files /dev/null and b/physics/docs/img/NSST.png differ diff --git a/physics/docs/library.bib b/physics/docs/library.bib index 991b7d21b..113ad6dd6 100644 --- a/physics/docs/library.bib +++ b/physics/docs/library.bib @@ -59,6 +59,24 @@ @article{king_and_harshvardhan_1986 Volume = {43}, Year = {1986}} +@url{Li_2015, + Author = {Xu Li}, + Title = {The development of the NSST within the NCEP GFS/CFS}, + Url = {http://cpo.noaa.gov/sites/cpo/MAPP/workshops/rtf_technical_ws/presentations/21_Xu_Li.pdf}} + +@url{Li_Derber_2009, + Author = {Xu Li and John Derber}, + Title = {Near Sea Surface Temperatures (NSST) Analysis in NCEP GFS}, + Url = {https://www.jcsda.noaa.gov/documents/meetings/wkshp2008/4/JCSDA_2008_Li.pdf}} + +@article{Fairall_all_1996, + Author = {C. W. Fairall and E. F. Bradley and J. S. Godfrey and G. A. Wick and J. B. Edson and G. S. Young}, + Journal = {J. Geophys. Res.}, + Pages = {1295-1308}, + Title = {Cool-skin and warm-layer effects on sea surface temperature}, + Volume = {101(C1)}, + Year = {1996}} + @url{key_2002, Address = {Madison, Wisconsin}, Author = {J.R. Key}, diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index f36df0285..526de4263 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -1,33 +1,143 @@ !> \file sfc_nst.f !! This file contains the GFS NSST model. + module sfc_nst + + contains + !> \defgroup GFS_NSST GFS Near Sea Surface Temperature !! @{ -!! \brief Brief description of the parameterization -!! \section diagram Calling Hierarchy Diagram -!! \section intraphysics Intraphysics Communication +!! \brief Near Sea Surface Temperature (NSST) is a temperature profile just below the sea surface. The GFS NSST scheme is used to forecast the NSST for two main purposes: supply SSTs to the atmospheric model for the calculation of air-sea heat and moisture fluxes and providing a sub-layer temperature profile forecast for use as a first guess in the Gridpoint Statistical Interpolator (GSI) data assimilation code. +!! +!! The GFS NSST scheme was initially developed at NCEP by Xu Li in 2007, and subsequently received contributions by S. Moorthi, Y.-T. Hu and J. Derber, leading to operational implementation in the GFS in 2017 (Li 2015 \cite Li_2015, and Li and Derber 2009 \cite Li_Derber_2009). The GFS NSST scheme predicts the vertical profile of sea temperature between the surface and a reference level (zr), which is on the order of 5 m. Only two physical process are considered in this scheme: diurnal thermocline layer warming and thermal skin layer (also known as sub-layer) cooling. All other process that could influence NSST are ignored in this simple scheme. +!! +!!This profile is a composed by subdividing the near-surface layer in three parts +!! +!!T(z) = Tr + T’w (z) + T’c (z), +!! +!!where +!!Ts = T(z=0) is the SST +!!T’c (z) is the temperature profile in the skin layer (0 < z <= zc) +!!T’w (z) is the temperature profile in the warm layer (0 < z <= zr) +!!Tr is the reference temperature +!!zc is the depth of the skin layer +!! +!!Prediction for the skin layer is made using the Thermal Skin-layer Model (TSM), while prediction for the thermocline is based on the Diurnal Thermocline Model (DTM), both with an origin on Fairall et al. (1996) \cite Fairall_all_1996. Atmospheric inputs include short- and long-wave radiation, surface pressure, surface layer winds, temperature and specific humidity, and rainfall. +!! +!! \htmlonly +!! \endhtmlonly +!! @image html NSST.png "Figure 1: NSST profile." +!! +!! \section intraphysics Intraphysics Communication +!! +!! This space is reserved for a description of how this scheme uses information from other scheme types and/or how information calculated in this scheme is used in other scheme types. -!> \brief Brief description of the subroutine +!> \brief This subroutine is empty since there are no procedures that need to be done to initialize the GFS NSST code. +!! +!! This subroutine is empty since there are no procedures that need to be done to initialize the GFS NSST code. !! -!! \section arg_table_NSST_run Arguments -!! | local var name | longname | description | units | rank | type | kind | intent | optional | -!! |----------------|-------------------------------------------------------|------------------------------------|---------|------|---------|-----------|--------|----------| -!! | im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | +!! \section arg_table_sfc_nst_init Argument Table !! -!! \section general General Algorithm -!! \section detailed Detailed Algorithm -!! @{ - subroutine sfc_nst & + subroutine sfc_nst_init + + end + +!> \brief This subroutine is empty since there are no procedures that need to be done to finalize the GFS NSST code. +!! +!! This subroutine is empty since there are no procedures that need to be done to finalize the GFS NSST code. +!! +!! \section arg_table_sfc_nst_finalize Argument Table +!! + subroutine sfc_nst_finalize + + end + +!> \brief This subroutine calls the Thermal Skin-layer and Diurnal Thermocline models to update the NSST profile. +!! +!! This subroutine calls the Thermal Skin-layer and Diurnal Thermocline models to update the NSST profile. +!! +!!\section arg_table_sfc_nst_run Argument Table +!!| local var name | longname | description | units | rank | type | kind | intent | optional | +!!|----------------|------------------------------------------------------------------------------|----------------------------------------------- |---------------|------|---------|-----------|--------|----------| +!!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | +!!| km | soil_vertical_dimension | vertical layer dimension | index | 0 | integer | | in | F | +!!| ps | surface_air_pressure | surface pressure | Pa | 1 | real | kind_phys | in | F | +!!| u1 | x_wind_at_lowest_model_layer | x component of surface layer wind | m s-1 | 1 | real | kind_phys | in | F | +!!| v1 | y_wind_at_lowest_model_layer | y component of surface layer wind | m s-1 | 1 | real | kind_phys | in | F | +!!| t1 | air_temperature_at_lowest_model_layer | surface layer mean temperature | K | 1 | real | kind_phys | in | F | +!!| q1 | specific_humidity_at_lowest_model_layer | surface layer mean specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | +!!| tref | sea_surface_foundation_temperature | reference/foundation temperature | K | 1 | real | kind_phys | in | F | +!!| cm | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | in | F | +!!| ch | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | in | F | +!!| prsl1 | air_pressure_at_lowest_model_layer | surface layer mean pressure | Pa | 1 | real | kind_phys | in | F | +!!| prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer | Exner function at 1st layer | ratio | 1 | real | kind_phys | in | F | +!!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | +!!| xlon | longitude | longitude | radians | 1 | real | kind_phys | in | F | +!!| sinlat | sine_of_latitude | sin of latitude | none | 1 | real | kind_phys | in | F | +!!| stress | surface_wind_stress | wind stress | m2 s-2 | 1 | real | kind_phys | in | F | +!!| sfcemis | surface_longwave_emissivity | surface longwave emissivity | frac | 1 | real | kind_phys | in | F | +!!| dlwflx | surface_downwelling_longwave_flux | total sky surface downward longwave flux | W m-2 | 1 | real | kind_phys | in | F | +!!| sfcnsw | surface_net_downward_shortwave_flux | total sky sfc netsw flx into ocean | W m-2 | 1 | real | kind_phys | in | F | +!!| rain | precipitation_amount_in_one_dynamics_time_step | rainfall rate | kg m-2 s-1 | 1 | real | kind_phys | in | F | +!!| timestep | time_step_for_dynamics | timestep interval | s | 0 | real | kind_phys | in | F | +!!| kdt | index_of_time_step | time step counter | count | 0 | integer | | in | F | +!!| solhr | forecast_hour | fcst hour at the end of prev time step | none | 0 | real | kind_phys | in | F | +!!| xcosz | instantaneous_cosine_of_zenith_angle | cosine of solar zenith angle | none | 1 | real | kind_phys | in | F | +!!| ddvel | surface_wind_enhancement_due_to_convection | wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | +!!| flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | in | F | +!!| flag_guess | flag_for_guess_run | flag for guess run | flag | 1 | logical | | in | F | +!!| nstf_name1 | flag_for_nsstm_run | NSSTM flag: off/uncoupled/coupled=0/1/2 | flag | 1 | integer | | in | F | +!!| nstf_name4 | vertical_temperature_average_range_lower_bound | zsea1 | mm | 1 | integer | | in | F | +!!| nstf_name5 | vertical_temperature_average_range_upper_bound | zsea2 | mm | 1 | integer | | in | F | +!!| lprnt | flag_print | flag for printing diagnostics to output | flag | 0 | logical | | in | F | +!!| ipr | horizontal_index_of_printed_column | horizontal index of printed column | index | 0 | integer | | in | F | +!!| tskin | surface_skin_temperature | ocean surface skin temperature | K | 1 | real | kind_phys | inout | F | +!!| tsurf | surface_skin_temperature_after_iteration | ocean surface skin temperature for guess run | K | 1 | real | kind_phys | inout | F | +!!| xt | diurnal thermocline layer_heat_content | heat content in diurnal thermocline layer | K m | 1 | real | kind_phys | inout | F | +!!| xs | sea_water_salinity | salinity content in diurnal thermocline layer | ppt m | 1 | real | kind_phys | inout | F | +!!| xu | diurnal_thermocline_layer_x_current | u-current content in diurnal thermocline layer | m2 s-1 | 1 | real | kind_phys | inout | F | +!!| xv | diurnal_thermocline_layer_y_current | v-current content in diurnal thermocline layer | m2 s-1 | 1 | real | kind_phys | inout | F | +!!| xz | diurnal_thermocline_layer_thickness | diurnal thermocline layer thickness | m | 1 | real | kind_phys | inout | F | +!!| zm | ocean_mixed_layer_thickness | mixed layer thickness | m | 1 | real | kind_phys | inout | F | +!!| xtts | sensitivity_of_dtl_heat_content_to_surface_temperature | d(xt)/d(ts) | m | 1 | real | kind_phys | inout | F | +!!| xzts | sensitivity_of_dtl_thickness_to_surface_temperature | d(xz)/d(ts) | m K-1 | 1 | real | kind_phys | inout | F | +!!| dt_cool | sub-layer_cooling_amount | sub-layer cooling amount | K | 1 | real | kind_phys | inout | F | +!!| z_c | sub-layer_cooling_thickness | sub-layer cooling thickness | m | 1 | real | kind_phys | inout | F | +!!| c_0 | coefficient_c_0 | coefficient1 to calculate d(tz)/d(ts) | none | 1 | real | kind_phys | inout | F | +!!| c_d | coefficient_c_d | coefficient2 to calculate d(tz)/d(ts) | none | 1 | real | kind_phys | inout | F | +!!| w_0 | coefficient_w_0 | coefficient3 to calculate d(tz)/d(ts) | none | 1 | real | kind_phys | inout | F | +!!| w_d | coefficient_w_d | coefficient4 to calculate d(tz)/d(ts) | none | 1 | real | kind_phys | inout | F | +!!| d_conv | free_convection_layer_thickness | thickness of free convection layer | m | 1 | real | kind_phys | inout | F | +!!| ifd | index_of_dtlm_start | index to start dtlm run or not | index | 1 | real | kind_phys | inout | F | +!!| qrain | sensible_heat_flux_due_to_rainfall | sensible heat flux due to rainfall | W | 1 | real | kind_phys | inout | F | +!!| qsurf | surface_specific_humidity | surface air saturation specific humidity | kg kg-1 | 1 | real | kind_phys | out | F | +!!| gflux | upward_heat_flux_in_soil | soil heat flux | W m-2 | 1 | real | kind_phys | out | F | +!!| cmm | surface_drag_wind_speed_for_momentum_in_air | surf mom exch coef time mean surf wind | m s-1 | 1 | real | kind_phys | out | F | +!!| chh | surface_drag_mass_flux_for_heat_and_moisture_in_air | surf h&m exch coef time surf wind & density | kg m-2 s-1 | 1 | real | kind_phys | out | F | +!!| evap | kinematic_surface_upward_latent_heat_flux | kinematic from latent heat flux | kg kg-1 m s-1 | 1 | real | kind_phys | out | F | +!!| hflx | kinematic_surface_upward_sensible_heat_flux | kinematic sensible heat flux | K m s-1 | 1 | real | kind_phys | out | F | +!!| ep | surface_upward_potential_latent_heat_flux | potential evaporation | W m-2 | 1 | real | kind_phys | out | F | +!! +!! \section NSST_general_algorithm General Algorithm +!! +!! This is the main subroutine for the NSST scheme, and it calls the DTM and TSM. +!! +!! \section NSST_detailed_algorithm +!! +!! Under construction +!! +!! @{ + subroutine sfc_nst_run & & ( im, km, ps, u1, v1, t1, q1, tref, cm, ch, & & prsl1, prslki, islimsk, xlon, sinlat, stress, & & sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, & - & ddvel, flag_iter, flag_guess, nstf_name, & - & lprnt, ipr, & ! inputs from here and above + & ddvel, flag_iter, flag_guess, nstf_name1, nstf_name4, & + & nstf_name5, lprnt, ipr, & ! inputs from here and above & tskin, tsurf, xt, xs, xu, xv, xz, zm, xtts, xzts, dt_cool, & & z_c, c_0, c_d, w_0, w_d, d_conv, ifd, qrain, & ! in/outs from here and above & qsurf, gflux, cmm, chh, evap, hflx, ep & ! outputs & ) -! + ! ===================================================================== ! ! description: ! ! ! @@ -39,8 +149,8 @@ subroutine sfc_nst & ! ( im, km, ps, u1, v1, t1, q1, tref, cm, ch, ! ! prsl1, prslki, islimsk, xlon, sinlat, stress, ! ! sfcemis, dlwflx, sfcnsw, rain, timestep, kdt,solhr,xcosz, ! -! ddvel, flag_iter, flag_guess, nstf_name, ! -! lprnt, ipr, ! +! ddvel, flag_iter, flag_guess, nstf_name1, nstf_name4, ! +! nstf_name5, lprnt, ipr, ! ! input/outputs: ! ! tskin, tsurf, xt, xs, xu, xv, xz, zm, xtts, xzts, dt_cool, ! ! z_c, c_0, c_d, w_0, w_d, d_conv, ifd, qrain, ! @@ -98,20 +208,16 @@ subroutine sfc_nst & ! flag_iter- logical, execution or not im ! ! when iter = 1, flag_iter = .true. for all grids im ! ! when iter = 2, flag_iter = .true. when wind < 2 im ! -! for both land and ocean (when nstf_name(1) > 0) im ! +! for both land and ocean (when nstf_name1 > 0) im ! ! flag_guess-logical, .true.= guess step to get CD et al im ! ! when iter = 1, flag_guess = .true. when wind < 2 im ! ! when iter = 2, flag_guess = .false. for all grids im ! -! nstf_name -integer array, NSST related flag parameters 1 ! -! nstf_name(1) : 0 = NSSTM off 1 ! -! 1 = NSSTM on but uncoupled 1 ! -! 2 = NSSTM on and coupled 1 ! -! nstf_name(2) : 1 = NSSTM spin up on 1 ! -! 0 = NSSTM spin up off 1 ! -! nstf_name(3) : 1 = NSST analysis on 1 ! -! 0 = NSSTM analysis off 1 ! -! nstf_name(4) : zsea1 in mm 1 ! -! nstf_name(5) : zsea2 in mm 1 ! +! nstf_name - integers , NSST related flag parameters 1 ! +! nstf_name1 : 0 = NSSTM off 1 ! +! 1 = NSSTM on but uncoupled 1 ! +! 2 = NSSTM on and coupled 1 ! +! nstf_name4 : zsea1 in mm 1 ! +! nstf_name5 : zsea2 in mm 1 ! ! lprnt - logical, control flag for check print out 1 ! ! ipr - integer, grid index for check print out 1 ! ! ! @@ -178,7 +284,8 @@ subroutine sfc_nst & ! --- inputs: - integer, intent(in) :: im, km, kdt, ipr,nstf_name(5) + integer, intent(in) :: im, km, kdt, ipr, nstf_name1, nstf_name4, & + & nstf_name5 real (kind=kind_phys), dimension(im), intent(in) :: ps, u1, v1, & & t1, q1, tref, cm, ch, prsl1, prslki, xlon,xcosz, & & sinlat, stress, sfcemis, dlwflx, sfcnsw, rain, ddvel @@ -307,8 +414,9 @@ subroutine sfc_nst & ! run nst model: dtm + slm ! - zsea1 = 0.001*real(nstf_name(4)) - zsea2 = 0.001*real(nstf_name(5)) + zsea1 = 0.001*real(nstf_name4) + zsea2 = 0.001*real(nstf_name5) + do i = 1, im if ( flag(i) ) then tsea = tsurf(i) @@ -546,16 +654,16 @@ subroutine sfc_nst & ! update tskin when coupled and not guess run ! (all other NSST variables have been updated in this case) ! - if ( nstf_name(1) > 1 ) then + if ( nstf_name1 > 1 ) then tskin(i) = tsurf(i) - endif ! if ( nstf_name(1) > 1 then + endif ! if ( nstf_name1 > 1 then endif ! if(flag_guess(i)) then endif ! if((islimsk(i).eq. 0.) ) then enddo ! if (lprnt .and. i == ipr) print *,' beg xz8=',xz(i) - if ( nstf_name(1) > 1 ) then + if ( nstf_name1 > 1 ) then ! --- ... latent and sensible heat flux over open water with updated tskin ! for the grids of open water and the iteration is on do i = 1, im @@ -567,7 +675,7 @@ subroutine sfc_nst & hflx(i) = rch(i) * (tskin(i) - theta1(i)) endif enddo - endif ! if ( nstf_name(1) > 1 ) then + endif ! if ( nstf_name1 > 1 ) then ! do i=1,im @@ -583,3 +691,247 @@ subroutine sfc_nst & return end !> @} +!! @} + end module + + + + module sfc_nst_pre + + contains + +!> \defgroup GFS_NSST_PRE GFS Near Sea Surface Temperature Pre +!! @{ +!! \brief Brief description of the parameterization +!! +!! Blah blah blah description of parameterization +!! +!! \section diagram Calling Hierarchy Diagram +!! +!! Blah blah blah diagram +!! +!! \section intraphysics Intraphysics Communication +!! +!! The NSST scheme is one of the three schemes used to represent the +!! surface in the GFS physics suite. The other two are the Noah land +!! surface model and the sice simplified ice model. +!! +!> \brief Brief description of the subroutine +!! +!! Blah blah description of subroutine +!! +!! \section arg_table_sfc_nst_init Argument Table +!! + subroutine sfc_nst_pre_init + + end + +!> \brief Brief description of the subroutine +!! +!! Blah blah description of subroutine +!! +!! \section arg_table_sfc_nst_finalize Argument Table +!! + subroutine sfc_nst_pre_finalize + + end + +!> \brief Brief description of the subroutine +!! +!! Blah blah description of subroutine +!! +!!\section arg_table_sfc_nst_pre_run Argument Table +!!| local var name | longname | description | units | rank | type | kind | intent | optional | +!!|----------------|------------------------------------------------------------------------------|----------------------------------------------- |---------------|------|---------|-----------|--------|----------| +!!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | +!!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | +!!| oro | orography | orography | | 1 | real | kind_phys | in | F | +!!| oro_uf | orography_unfiltered | unfiltered orographyo | | 1 | real | kind_phys | in | F | +!!| tsfc | surface_skin_temperature | ocean surface skin temperature | K | 1 | real | kind_phys | in | F | +!!| tsurf | surface_skin_temperature_after_iteration | ocean surface skin temperature for guess run | K | 1 | real | kind_phys | inout | F | +!!| tskin | surface_skin_temperature | ocean surface skin temperature | K | 1 | real | kind_phys | out | F | +!! +!! \section NSST_general_algorithm General Algorithm +!! +!! Blah blah general algorithm +!! +!! \section NSST_detailed_algorithm Detailed Algorithm +!! @{ + subroutine sfc_nst_pre_run & + & ( im, islimsk, oro, oro_uf, tsfc, tsurf, tskin ) + + use machine , only : kind_phys + use physcons, only: rlapse + + implicit none + +! --- inputs: + integer, intent(in) :: im + integer, dimension(im), intent(in) :: islimsk + real (kind=kind_phys), dimension(im), intent(in) :: oro, oro_uf + real (kind=kind_phys), dimension(im), intent(in) :: tsfc + +! --- input/outputs: + real (kind=kind_phys), dimension(im), intent(inout) :: tsurf + +! --- outputs: + real (kind=kind_phys), dimension(im), intent(out) :: tskin + +! --- locals + integer :: i + real(kind=kind_phys) :: tem + + do i = 1, im + if ( islimsk(i) == 0 ) then + tem = (oro(i)-oro_uf(i)) * rlapse + tskin(i) = tsfc(i) + tem + tsurf(i) = tsurf(i) + tem + endif + enddo + + return + end + +!> @} +!! @} + end module + + + + + module sfc_nst_post + + contains + +!> \defgroup GFS_NSST_POST GFS Near Sea Surface Temperature Post +!! @{ +!! \brief Brief description of the parameterization +!! +!! Blah blah blah description of parameterization +!! +!! \section diagram Calling Hierarchy Diagram +!! +!! Blah blah blah diagram +!! +!! \section intraphysics Intraphysics Communication +!! +!! Blah blah blah intraphysics communication + +!> \brief Brief description of the subroutine +!! +!! Blah blah description of subroutine +!! +!! \section arg_table_sfc_nst_init Argument Table +!! + subroutine sfc_nst_post_init + + end + +!> \brief Brief description of the subroutine +!! +!! Blah blah description of subroutine +!! +!! \section arg_table_sfc_nst_finalize Argument Table +!! + subroutine sfc_nst_post_finalize + + end + +!> \brief Brief description of the subroutine +!! +!! Blah blah description of subroutine +!! +!!\section arg_table_sfc_nst_post_run Argument Table +!!| local var name | longname | description | units | rank | type | kind | intent | optional | +!!|----------------|------------------------------------------------------------------------------|----------------------------------------------- |---------------|------|---------|-----------|--------|----------| +!!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | +!!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | +!!| oro | orography | orography | | 1 | real | kind_phys | in | F | +!!| oro_uf | orography_unfiltered | unfiltered orographyo | | 1 | real | kind_phys | in | F | +!!| nstf_name1 | flag_for_nsstm_run | NSSTM flag: off/uncoupled/coupled=0/1/2 | flag | 1 | integer | | in | F | +!!| nstf_name4 | vertical_temperature_average_range_lower_bound | zsea1 | mm | 1 | integer | | in | F | +!!| nstf_name5 | vertical_temperature_average_range_upper_bound | zsea2 | mm | 1 | integer | | in | F | +!!| xt | diurnal thermocline layer_heat_content | heat content in diurnal thermocline layer | K m | 1 | real | kind_phys | in | F | +!!| xz | diurnal_thermocline_layer_thickness | diurnal thermocline layer thickness | m | 1 | real | kind_phys | in | F | +!!| dt_cool | sub-layer_cooling_amount | sub-layer cooling amount | K | 1 | real | kind_phys | in | F | +!!| z_c | sub-layer_cooling_thickness | sub-layer cooling thickness | m | 1 | real | kind_phys | in | F | +!!| rslimsk | sea_land_ice_mask_real | landmask: sea/land/ice=0/1/2 | flag | 1 | real | kind_phys | in | F | +!!| tref | sea_surface_foundation_temperature | reference/foundation temperature | K | 1 | real | kind_phys | in | F | +!!| xlon | longitude | longitude | radians | 1 | real | kind_phys | in | F | +!!| tsurf | surface_skin_temperature_after_iteration | ocean surface skin temperature for guess run | K | 1 | real | kind_phys | inout | F | +!!| dtzm | mean_change_over_depth_in_sea_water_temperature | mean of dT(z) (zsea1 to zsea2) | K | 1 | real | kind_phys | out | F | +!!| tsfc | surface_skin_temperature | ocean surface skin temperature | K | 1 | real | kind_phys | out | F | +!! +!! \section NSST_general_algorithm General Algorithm +!! +!! Blah blah general algorithm +!! +!! \section NSST_detailed_algorithm Detailed Algorithm +!! @{ + subroutine sfc_nst_post_run & + & ( im, islimsk, oro, oro_uf, nstf_name1, nstf_name4, & + & nstf_name5, xt, xz, dt_cool, z_c, rslimsk, tref, xlon, & + & tsurf, dtzm, tsfc & + & ) + + use machine , only : kind_phys + use physcons, only: rlapse + use module_nst_water_prop, only: get_dtzm_2d + + implicit none + +! --- inputs: + integer, intent(in) :: im + integer, dimension(im), intent(in) :: islimsk + real (kind=kind_phys), dimension(im), intent(in) :: oro, oro_uf + integer, intent(in) :: nstf_name1, nstf_name4, nstf_name5 + real (kind=kind_phys), dimension(im), intent(in) :: xt, xz, & + & dt_cool, z_c, rslimsk, tref, xlon + +! --- input/outputs: + real (kind=kind_phys), dimension(im), intent(inout) :: tsurf + +! --- outputs: + real (kind=kind_phys), dimension(size(xlon,1)), intent(out) :: & + & dtzm + real (kind=kind_phys), dimension(im), intent(out) :: tsfc + +! --- locals + integer :: i + real(kind=kind_phys) :: zsea1, zsea2 + +! if (lprnt) print *,' tseaz2=',tseal(ipr),' tref=',tref(ipr), +! & ' dt_cool=',dt_cool(ipr),' dt_warm=',2.0*xt(ipr)/xz(ipr), +! & ' kdt=',kdt + + do i = 1, im + if ( islimsk(i) == 0 ) then + tsurf(i) = tsurf(i) - (oro(i)-oro_uf(i)) * rlapse + endif + enddo + +! --- ... run nsst model ... --- + + if (nstf_name1 > 1) then + zsea1 = 0.001*real(nstf_name4) + zsea2 = 0.001*real(nstf_name5) + call get_dtzm_2d (xt, xz, dt_cool, & + & z_c, rslimsk, zsea1, zsea2, & + & im, 1, dtzm) + do i = 1, im + if ( islimsk(i) == 0 ) then + tsfc(i) = max(271.2,tref(i) + dtzm(i)) - & + & (oro(i)-oro_uf(i))*rlapse + endif + enddo + endif + +! if (lprnt) print *,' tseaz2=',tsea(ipr),' tref=',tref(ipr), & +! & ' dt_cool=',dt_cool(ipr),' dt_warm=',dt_warm(ipr),' kdt=',kdt + + return + end + +!> @} +!! @} + end module