Changeset 1248


Ignore:
Timestamp:
May 11, 2014, 4:01:21 PM (11 years ago)
Author:
aslmd
Message:

MESOSCALE. Added the possibility to use the second correction by Wee et al. 2012. Not activated by default. Note that tests showed that differences in the Martian case for simu at z<50km are negligible (not tested upward).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F

    r1236 r1248  
    145145!****MARS
    146146      INTEGER :: hypsometric_opt = 1 ! classic
     147      INTEGER :: interp_theta = .true. ! classic
    147148      !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction
     149      !INTEGER :: interp_theta = .false. ! Wee et al. 2012 correction
    148150      REAL :: pfu, pfd, phm
    149151
     
    11731175                               its , ite , jts , jte , kts , kte )
    11741176         END IF
    1175    
     1177 
     1178IF ( interp_theta ) THEN
    11761179         !  The input field is temperature, we want potential temp.
    11771180!****MARS: here em_p_gc is really needed !
     
    11801183                           ims , ime , jms , jme , 1   , num_metgrid_levels , &
    11811184                           its , ite , jts , jte , 1   , num_metgrid_levels )
    1182    
     1185ENDIF   
     1186
    11831187
    11841188
     
    12611265                            ims , ime , jms , jme , kms , kme , &
    12621266                            its , ite , jts , jte , kts , kte )
    1263  
     1267
     1268         !  Depending on the setting of interp_theta = T/F, t_gc is is either theta Xor
     1269         !  temperature, and that means that the t_2 field is also the associated field.
     1270         !  It is better to interpolate temperature and potential temperature in LOG(p),
     1271         !  regardless of requested default.
     1272
    12641273         !!****MARS: normalement c'est vert_interp
    12651274         CALL vert_interp_old ( grid%em_t_gc , grid%em_pd_gc , grid%em_t_2               , grid%em_pb , &
     
    12701279                            ims , ime , jms , jme , kms , kme , &
    12711280                            its , ite , jts , jte , kts , kte )
     1281
     1282         IF ( .NOT. interp_theta ) THEN
     1283
     1284            !! correction Wee et al. 2012
     1285            !! first interpolate temperature (see above)
     1286            !! then interpolate pressure
     1287            !! and in the end compute potential temperature
     1288
     1289            !! scalar just an intermediate thing for interpolated pressure
     1290            !! -- it is reinitialized afterwards
     1291            !! It is better to interpolate pressure in p regardless default options
     1292            CALL vert_interp_old ( grid%em_p_gc , grid%em_pd_gc , scalar(:,:,:,1)         , grid%em_pb , &
     1293                            num_metgrid_levels , 'T' , &
     1294                            1, lagrange_order , lowest_lev_from_sfc , &
     1295                            zap_close_levels , force_sfc_in_vinterp , &
     1296                            ids , ide , jds , jde , kds , kde , &
     1297                            ims , ime , jms , jme , kms , kme , &
     1298                            its , ite , jts , jte , kts , kte )
     1299
     1300            CALL t_to_theta ( grid%em_t_2 , scalar(:,:,:,1) , p00 , &
     1301                              ids , ide , jds , jde , kds , kde , &
     1302                              ims , ime , jms , jme , kms , kme , &
     1303                              its , ite , jts , jte , kts , kte )
     1304     
     1305            scalar(:,:,:,1) = 0.
     1306         END IF
     1307
    12721308
    12731309                       
Note: See TracChangeset for help on using the changeset viewer.