With custom grid, INPUT/sfc_data.nc has different coverage area than output grid

Hi-

I'm trying to use a custom 12km grid in order to match previous work, and I'm finding that the INPUT/sfc_data.nc file covers a slightly different domain than the output grid, so we are getting fill values where the two diverge in extent.

See the attached image. On the left is the sfc_data.nc file generated by SRW. On the right is the vegetation type field from the output. You can see where fill values are present in the output along the north and west edges of the grid. You can also see part of Cuba in sfc_data.nc, but the output area does not extend that far south. It almost seems as if SRW is using different params to generate sfc_data.nc than it is to specify the output grid. But perhaps I have my grid params specified incorrectly? I used the RRFS_CONUS_13km as a template and modified it to match the domain I need, but it seems that even for an improperly-specified grid the input and output domains should match. Any help would be greatly appreciated.

My grid params are copied below. 

Thank you!

-Paddy McCarthy.

 

#
#-----------------------------------------------------------------------
#
# The NOAA Fire domain with ~12km cells.
#
#-----------------------------------------------------------------------
#
"NOAA_Fire_12km")

  GRID_GEN_METHOD="ESGgrid"

  ESGgrid_LON_CTR="-97.0"
  ESGgrid_LAT_CTR="40.0"

  ESGgrid_DELX="12000.0"
  ESGgrid_DELY="12000.0"

  ESGgrid_NX="481"
  ESGgrid_NY="300"

  ESGgrid_PAZI="0.0"

  ESGgrid_WIDE_HALO_WIDTH="6"

  DT_ATMOS="${DT_ATMOS:-40}"

  LAYOUT_X="${LAYOUT_X:-5}"
  LAYOUT_Y="${LAYOUT_Y:-2}"
  BLOCKSIZE="${BLOCKSIZE:-40}"

  if [ "$QUILTING" = "TRUE" ]; then
    WRTCMP_write_groups="1"
    WRTCMP_write_tasks_per_group="2"
    WRTCMP_output_grid="lambert_conformal"
    WRTCMP_cen_lon="${ESGgrid_LON_CTR}"
    WRTCMP_cen_lat="${ESGgrid_LAT_CTR}"
    WRTCMP_stdlat1="${ESGgrid_LAT_CTR}"
    WRTCMP_stdlat2="${ESGgrid_LAT_CTR}"
    WRTCMP_nx="476"
    WRTCMP_ny="295"
    WRTCMP_lon_lwr_left="-125.0"
    WRTCMP_lat_lwr_left="22.0"
    WRTCMP_dx="${ESGgrid_DELX}"
    WRTCMP_dy="${ESGgrid_DELY}"
  fi
  ;;

Hi Paddy,

The gfs_data.nc and sfc_data.nc files use the gnomonic grid projection, which is what FV3 uses.  The output (through the write component) uses either a lat/lon, rotated lat/lon, or Lambert conformal grid projection, which is chosen in the model_configure file.  Therefore if the write component-based grids aren't carefully chosen to fit within the ESG grid used for the forecast, you'll see areas filled with NaNs.

- Jeff

Jeff-

Thanks a ton -- this makes perfect sense.

Based on this info, I suspect the best way to fit the projections to the same area would be to decouple ESGgrid_LAT/LON_CTR from WRTCMP_cen_lat/lon since the center is the main parameter provided to a gnomonic projection. I'll give that a try.

Thank you for the speedy reply!

-Paddy.

Paddy,

Sure!  Yeah, you'll need to work on the creation of those two grids (run-time and output) separately.  Gerard has some NCL scripts he uses to fine-tune the write-component grids to fit nicely within the ESG grids.  I'll contact him to see if he can send you an email.

- Jeff

Hi Paddy,

I have some NCL scripts that can get the write-component parameters for a given native grid, but they're not at all user-friendly (they're in regional_workflow/ush/NCL; will probably be replaced by equivalent python scripts at some point since NCL is no longer supported).

I'll run the NCL scripts with your native grid numbers and let you know what I get.  The expected result is a write-component grid that just barely fits within the native grid (e.g. within one grid cell).

Gerard

Hi Gerard-

I've been looking into the grid we are trying to match, and these are the best params I can come up with to match that domain and projection. Could you use these params (in the write component below) instead of those I provided in my earlier request?

Thank you for the help!

-Paddy.

===========================

"NOAA_Fire_12km")

  GRID_GEN_METHOD="ESGgrid"

  ESGgrid_LON_CTR="-97.0"
  ESGgrid_LAT_CTR="40.0"

  ESGgrid_DELX="12000.0"
  ESGgrid_DELY="12000.0"

  ESGgrid_NX="500"
  ESGgrid_NY="300"

  ESGgrid_PAZI="0.0"

  ESGgrid_WIDE_HALO_WIDTH="6"

  DT_ATMOS="${DT_ATMOS:-40}"

  LAYOUT_X="${LAYOUT_X:-10}"
  LAYOUT_Y="${LAYOUT_Y:-5}"
  BLOCKSIZE="${BLOCKSIZE:-40}"

  if [ "$QUILTING" = "TRUE" ]; then
    WRTCMP_write_groups="1"
    WRTCMP_write_tasks_per_group="2"
    WRTCMP_output_grid="lambert_conformal"
#    WRTCMP_cen_lon="${ESGgrid_LON_CTR}"
#    WRTCMP_cen_lat="${ESGgrid_LAT_CTR}"
#    WRTCMP_stdlat1="${ESGgrid_LAT_CTR}"
#    WRTCMP_stdlat2="${ESGgrid_LAT_CTR}"
    WRTCMP_cen_lon="97.0"
    WRTCMP_cen_lat="40.0"
    WRTCMP_stdlat1="33.0"
    WRTCMP_stdlat2="45.0"
    WRTCMP_nx="444"
    WRTCMP_ny="269"
    WRTCMP_lon_lwr_left="-125.0"
    WRTCMP_lat_lwr_left="22.0"
    WRTCMP_dx="${ESGgrid_DELX}"
    WRTCMP_dy="${ESGgrid_DELY}"
 

Hi Paddy,

Ok, typo noted.  

Once you specify the write-component parameters, there isn't anything for my NCL scripts to do (their job is to determine the WRTCMP_... parameters).  So I think what I'll do is get the parameters using the scripts, then plot the corresponding write-component grid as well as the one that your numbers produce.  Then you can compare and see which you prefer.

One other thing I could try is to relax the requirement in the scripts that stdlat1 = stdlat2 and instead use your numbers, then see what that gives.

What do you think?

Gerard

Hi Gerard-

Yes, this makes sense. What you suggest sounds good, because it will give me a sense if my fv3 grid is far bigger than what I need to cover the output area we need. I can see how my case is a bit backwards because we are trying to match an old grid. But don't spend a bunch of time on the projection stuff -- if we are close, I can do a test run to see if we have complete coverage.

Thank you!

Hi Paddy,

I've attached plots of the two grids.  

1) NOAA_Fire_12km.ortho.whole.wrtcmp_Paddy.png -- This is the write-component generated using your parameters.

2) NOAA_Fire_12km.ortho.whole.wrtcmp_tuned.png -- This is the write-component generated using the parameters that the NCL scripts return.

I haven't done the step of relaxing the stdlat1 = stdlat2 requirement in the scripts yet; hopefully one of the two grids above will be sufficient.  Let me know what you think.  Thanks.

Gerard

Btw, the parameters for the second case are as follows (variable names have changed in parts of my version of the app but same meanings; pls continue using your variable names in your version):

  "NOAA_Fire_12km")

    __grid_gen_method__="ESGgrid"

    __esggrid_lon_ctr__="-97.0"
    __esggrid_lat_ctr__="40.0"

    __esggrid_delx__="12000.0"
    __esggrid_dely__="12000.0"

    __esggrid_nx__="500"
    __esggrid_ny__="300"

    __esggrid_pazi__="0.0"

    __esggrid_wide_halo_width__="6"

    __dt_atmos__="${dt_atmos:-40}"

    __layout_x__="${layout_x:-10}"
    __layout_y__="${layout_y:-5}"
    __blocksize__="${blocksize:-40}"

    if [ "$quilting" = "TRUE" ]; then
      __wrtcmp_write_groups__="1"
      __wrtcmp_write_tasks_per_group__="2"
      __wrtcmp_output_grid__="lambert_conformal"
      __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}"
      __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}"
      __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}"
      __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}"
      __wrtcmp_nx__="498"
      __wrtcmp_ny__="289"
      __wrtcmp_lon_lwr_left__="-124.60050025"
      __wrtcmp_lat_lwr_left__="20.62994753"
      __wrtcmp_dx__="${__esggrid_delx__}"
      __wrtcmp_dy__="${__esggrid_dely__}"
    fi
    ;;