Changes between Version 2 and Version 3 of WRF4G/WRF4GPostprocessor


Ignore:
Timestamp:
May 6, 2013 9:15:59 AM (9 years ago)
Author:
MarkelGarcia
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WRF4G/WRF4GPostprocessor

    v2 v3  
    77== WRF4G postprocessor ==
    88
    9 Similar to preprocessor, WRF4G postprocessor is an executable script that can be written in any programming language, provided it does accept one argument.
     9Similar to preprocessor, WRF4G postprocessor is an executable script that can be written in any programming language, provided it does accept one argument, which is one WRF raw file. We usually use a modified version of p_interp to interpolate to filter out unnecessary variables and interpolate to pressure levels. Note that users with large storage resources may not be interested in using a postprocessor.
     10
     11Sample postprocesor:
     12
     13{{{
     14#! /bin/bash
     15#
     16# Sample postprocessor
     17#
     18# This can be any kind of executable accepting one argument:
     19#
     20wrfnc_file=$1        # The WRF file to postprocess
     21#
     22# and creating a postprocessed file with the same name to be uploaded by register_file
     23#
     24
     25function pintnml(){
     26  idir=$1
     27  ifile=$2
     28  cat << EOF > namelist.pinterp
     29&io
     30  path_to_input            = '${idir}/',
     31  input_name               = '${ifile}',
     32  path_to_output           = '${idir}/',
     33  fields                   = 'RAINTOT,T2,Q2,PSFC,U10,V10,CLT,SFCEVP,QFX,GLW,SWDOWN,RAINC,HGT,SMOIS,PH,PHB,GHT,T,TT,PRES,MSLP,PLEV,ALBEDO,SST,ACSNOW,GRDFLX,CLDFRA,SMSTOT,LH,ACLHF,HFX,ACHFX,SNOWH,ACSNOM,PBLH,Times',
     34  process                  = 'list',
     35  debug                    = .FALSE.,
     36  grid_filt                = 3,
     37  ntimes_filt              = 10,
     38/
     39
     40&interp_in
     41  interp_levels            = 1000.0, 925., 850.0, 700., 500.0, 300,
     42  extrapolate              = 1,
     43  interp_method            = 1,
     44  unstagger_grid           = .TRUE.,
     45/
     46EOF
     47}
     48
     49pintnml . ${wrfnc_file}
     50p_interp
     51rm namelist.pinterp
     52
     53xptdsize=$( echo "print int($(stat -c %s ${wrfnc_file})*0.025)" | python )
     54if test "$(stat -c %s ${wrfnc_file}_PLEV)" -ge ${xptdsize}; then
     55  mv "${wrfnc_file}_PLEV" "${wrfnc_file}"
     56fi
     57
     58}}}