Changeset 6 in lmdz_wrf for WRFV3/dyn_em


Ignore:
Timestamp:
Jul 18, 2014, 11:20:11 AM (10 years ago)
Author:
lfita
Message:

Fixing problem with the solar radiation:

1.- Correct values for the julian and the hour (0,1) to the LMDZ physiq

Adding NaN checking for 'PSFC' and 'T_2'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WRFV3/dyn_em/solve_em.F

    r1 r6  
    186186   CHARACTER(LEN=256)                         :: mminlu, mminsl
    187187   CHARACTER(LEN=50)                          :: errmsg
     188   INTEGER                                    :: hr, minute, sec, ms, julyr, &
     189     julday
     190   REAL                                       :: gmt
     191
    188192
    189193   errmsg = 'ERROR -- error -- ERROR -- error'
     
    845849
    846850       grid%qv_2 = moist(:,:,:,P_QV)
     851
     852! L. Fita, LMD. July 2014. Getting hour of the day
     853       CALL domain_clock_get( grid, current_time=CurrTime )
     854       CALL WRFU_TimeGet( CurrTime, YY= julyr, dayOfYear=julday, H=hr, M=minute, S=sec, MS=ms, rc=rc)
     855! Julian day hour (0, 1) !!
     856       gmt=(hr+real(minute)/60.+real(sec)/3600.+real(ms)/(1000*3600))/24.
     857
     858! Checking for NaNs (should not be necessary but....)
     859   im2 = ims + (ime - ims) / 2
     860   jm2 = jms + (jme - jms) / 2
     861
     862   IF (grid%t_2(im2,iz,jm2) /= grid%t_2(im2,iz,jm2) .OR. ABS(grid%t_2(im2,iz,jm2)) > 10000. ) THEN
     863     PRINT errmsg
     864     WRITE(wrF_err_message,*)'solve_em: wrong T value=',                 &
     865       grid%t_2(im2,iz,jm2),' at: ', im2,', ', iz,', ', jm2,' !!!'
     866#ifdef DM_PARALLEL
     867     CALL wrf_error_fatal(TRIM(wrf_err_message))
     868#else
     869     PRINT *,TRIM(wrf_err_message)
     870     STOP
     871#endif
     872   END IF
     873! Checking for NaNs (should not be necessary but....)
     874   IF (grid%psfc(im2,jm2) /= grid%psfc(im2,jm2) .OR. ABS(grid%psfc(im2,jm2)) > 1000000. ) THEN
     875     PRINT errmsg
     876     WRITE(wrF_err_message,*)'solve_em: wrong PSFC value=',               &
     877       grid%psfc(im2,jm2),' at: ', im2 ,', ', jm2, ' !!!'
     878#ifdef DM_PARALLEL
     879     CALL wrf_error_fatal(TRIM(wrf_err_message))
     880#else
     881     PRINT *,TRIM(wrf_err_message)
     882     STOP
     883#endif
     884   END IF
     885
    847886       IF (config_flags%lmdz_physics) THEN
    848887
     
    865904        &             ,WNUM3DM=num_3d_m, WPARFIRSTSCAL=PARAM_FIRST_SCALAR,           &
    866905        &        WNX=config_flags%e_we, WNY=config_flags%e_sn,                       &
    867         &        WNZ=config_flags%e_vert, WJULDAY=grid%julday, WGMT=grid%gmt,        &
     906        &        WNZ=config_flags%e_vert, WJULDAY=FLOAT(julday), WGMT=gmt,           &
    868907        &        WTIME_STEP=REAL(config_flags%time_step),                            &
    869908        &        WRF_FULLETA=grid%znw, WRF_HALFETA=grid%znu, WRF_DFULLETA=grid%dnw,  &
Note: See TracChangeset for help on using the changeset viewer.