This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.
IF ( config_flags%use_tavg_for_tsk ) THEN
IF ( we_have_tsk .OR. we_have_tavgsfc ) THEN
! we are OK
ELSE
CALL wrf_error_fatal ( 'We either need TSK or TAVGSFC, verify these fields are coming from WPS' )
END IF
! Fix grid%tmn and grid%tsk.
fix_tsk_tmn : SELECT CASE ( model_config_rec%sf_surface_physics(grid%id) )
CASE ( SLABSCHEME , LSMSCHEME , NOAHMPSCHEME , RUCLSMSCHEME, PXLSMSCHEME,CLMSCHEME, SSIBSCHEME )
DO j = jts, MIN(jde-1,jte)
DO i = its, MIN(ide-1,ite)
IF ( skip_middle_points_t ( ids , ide , jds , jde , i , j , em_width , hold_ups ) ) CYCLE
IF ( ( grid%landmask(i,j) .LT. 0.5 ) .AND. ( flag_sst .EQ. 1 ) .AND. &
( grid%sst(i,j) .GT. 170. ) .AND. ( grid%sst(i,j) .LT. 400. ) ) THEN
grid%tmn(i,j) = grid%sst(i,j)
grid%tsk(i,j) = grid%sst(i,j)
ELSE IF ( grid%landmask(i,j) .LT. 0.5 ) THEN
grid%tmn(i,j) = grid%tsk(i,j)
END IF
END DO
END DO
END SELECT fix_tsk_tmn
! Is the grid%tsk reasonable?
IF ( internal_time_loop .NE. 1 ) THEN
DO j = jts, MIN(jde-1,jte)
DO i = its, MIN(ide-1,ite)
IF ( skip_middle_points_t ( ids , ide , jds , jde , i , j , em_width , hold_ups ) ) CYCLE
IF ( grid%tsk(i,j) .LT. 170 .or. grid%tsk(i,j) .GT. 400. ) THEN
grid%tsk(i,j) = grid%t_2(i,1,j)
END IF
END DO
END DO
Hi david,davidwrf said:Thanks for the detailed answer.
I now realized the skin temperature line in the Vtable.
I am still struggling with two points:
1. When I plot the SST field from the ERA5 raw data, it does not cover land areas.
2. When I omit the skin temperature field from ERA5, and then run WPS and real.exe, the TSK field in wrfinput shows
a very "nice" and detailed field that follows the detailed complex topography. It does not look like a field that in any sense
resembles an SST over land. Moreover, I tried it for 3 different events, and it turns out that the TSK fields produced in this way (in wrfinput) for the three cases are the same over land.
Hi Ming,Ming Chen said:David,
Please take a look at the code dyn_em/module_initialize_real.F, in which you will find the piece of codes below:
Code:IF ( config_flags%use_tavg_for_tsk ) THEN IF ( we_have_tsk .OR. we_have_tavgsfc ) THEN ! we are OK ELSE CALL wrf_error_fatal ( 'We either need TSK or TAVGSFC, verify these fields are coming from WPS' ) END IF
It indicates that WRF needs TSK as input.
In cases the input data doesn't have this variable, REAL tries to use SST to represent TSK:
Code:! Fix grid%tmn and grid%tsk. fix_tsk_tmn : SELECT CASE ( model_config_rec%sf_surface_physics(grid%id) ) CASE ( SLABSCHEME , LSMSCHEME , NOAHMPSCHEME , RUCLSMSCHEME, PXLSMSCHEME,CLMSCHEME, SSIBSCHEME ) DO j = jts, MIN(jde-1,jte) DO i = its, MIN(ide-1,ite) IF ( skip_middle_points_t ( ids , ide , jds , jde , i , j , em_width , hold_ups ) ) CYCLE IF ( ( grid%landmask(i,j) .LT. 0.5 ) .AND. ( flag_sst .EQ. 1 ) .AND. & ( grid%sst(i,j) .GT. 170. ) .AND. ( grid%sst(i,j) .LT. 400. ) ) THEN grid%tmn(i,j) = grid%sst(i,j) grid%tsk(i,j) = grid%sst(i,j) ELSE IF ( grid%landmask(i,j) .LT. 0.5 ) THEN grid%tmn(i,j) = grid%tsk(i,j) END IF END DO END DO END SELECT fix_tsk_tmn
If SST is not available, then t2 is used to represent TSK:
...Code:! Is the grid%tsk reasonable? IF ( internal_time_loop .NE. 1 ) THEN DO j = jts, MIN(jde-1,jte) DO i = its, MIN(ide-1,ite) IF ( skip_middle_points_t ( ids , ide , jds , jde , i , j , em_width , hold_ups ) ) CYCLE IF ( grid%tsk(i,j) .LT. 170 .or. grid%tsk(i,j) .GT. 400. ) THEN grid%tsk(i,j) = grid%t_2(i,1,j) END IF END DO END DO
Please take a look at the code and let me know if you still have questions.