adding fields #2518
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
Hi: The easiest way to accomplish this addition would be to use the User-Defined option in METplus. For a User-Defined command, the exact command to be run in PCP-Combine is specified directly. To run the addition this way, you would want to set the following in your configuration file: You should also be able to remove FCST_PCP_COMBINE_LOOKBACK, FCST_PCP_COMBINE_CONSTANT_INIT, FCST_PCP_COMBINE_INPUT_ACCUMS, FCST_PCP_COMBINE_INPUT_NAMES, and FCST_PCP_COMBINE_INPUT_LEVELS. The command listed in the resulting METplus log should show both variables, and also show that it is reading both variables. The MET output would look something like the following: Does this produce the expected output? Christina |
Beta Was this translation helpful? Give feedback.
-
Hi: I am checking in on this. Is it working as expected or are there still modifications needed? Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hi: When I look in the data file sent (rrfs.t00z.prslev.f000.conus_3km.grib2), the field MASSDEN is not record number 807 or 808. In this file, MASSDEN is the variable name for records 790, 791, and 792. Assuming you want to perform the addition on the variable MASSDEN, MET is not adding the correct fields with this configuration. I'm guessing that perhaps you want to add levels 790 and 791. If I switch the MET configuration levels to be R790 and R791, then the I get the following: The color bar ranges are not exactly the same, but it appears to be adding as expected. Using record numbers as the level can be tricky and is generally not recommended since record numbers can change between files, giving inconsistent results. There are other grib1/2 options available in MET to help select the correct field when variable names are duplicated. They are listed in the fcst section of the MET documentation (you will have to scroll down a little to get to the grib1/2 options). In this case, you can set GRIB2_ipdtmpl_index and GRIB2_ipdtmpl_val to help distinguish between fields instead of using record numbers. For the file you sent, it would look like this for the different MASSDEN variables: Record 790: Record 791: Record 792: Assuming you want to add records 790 and 791, the FCST_PCP_COMBINE_COMMAND would need to be changed to look like this: FCST_PCP_COMBINE_COMMAND = -add {FCST_PCP_COMBINE_INPUT_DIR}/{FCST_PCP_COMBINE_INPUT_TEMPLATE} 'name="MASSDEN"; level="L0"; GRIB2_ipdtmpl_index=2; GRIB2_ipdtmpl_val=62010;' {FCST_PCP_COMBINE_INPUT_DIR}/{FCST_PCP_COMBINE_INPUT_TEMPLATE} 'name="MASSDEN"; level="L0"; GRIB2_ipdtmpl_index=[2,6]; GRIB2_ipdtmpl_val=[62001,0];' Changing the command this way produces the same added output as the image above without needing to rely on record numbers. Does this produce the expected results on your end? Christina |
Beta Was this translation helpful? Give feedback.
Hi:
The easiest way to accomplish this addition would be to use the User-Defined option in METplus. For a User-Defined command, the exact command to be run in PCP-Combine is specified directly.
To run the addition this way, you would want to set the following in your configuration file:
FCST_PCP_COMBINE_METHOD = USER_DEFINED
FCST_PCP_COMBINE_COMMAND = -add {FCST_PCP_COMBINE_INPUT_DIR}/{FCST_PCP_COMBINE_INPUT_TEMPLATE} 'name="MASSDEN"; level="R807";' FCST_PCP_COMBINE_INPUT_DIR}/{FCST_PCP_COMBINE_INPUT_TEMPLATE} 'name="MASSDEN"; level="R808";'
You should also be able to remove FCST_PCP_COMBINE_LOOKBACK, FCST_PCP_COMBINE_CONSTANT_INIT, FCST_PCP_COMBINE_INPUT_ACCUMS, FCST_PCP_COMBINE_INPUT_NA…