Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Supporting curvilinear grids in MESSy/A2A regridding #149

Open
jimmielin opened this issue Jun 14, 2022 · 1 comment
Open
Labels
category: Feature Request New feature or request deferred Issues/PRs that we cannot work on right away help needed: Request Input from Community We need our user community to provide a fix/update topic: Regridding or Interpolation Related to issues with time interpolation or horiziontal/vertical regridding

Comments

@jimmielin
Copy link
Collaborator

Background

During IGC10 (Emissions and deposition working group?) there was discussion of support for regridding of lambert conformal grids for HEMCO. However, at present, HEMCO only supports regridding to/from rectilinear grids.

Feature request

It will be useful to support curvilinear grids such as Lambert in the HEMCO regridding for GEOS-Chem Classic, without introducing ESMF dependencies. This will also improve capabilities in WRF-GC and HEMCO within CESM (until we move to the CESM input/output system)

This implementation is technically possible because MAP_A2A and MESSY_NCREGRID should be able to do this, just that the feature was not implemented. For example, in HCO_REGRID_MOD's REGRID_MAPA2A, the following construct forces a rectilinear grid:

    ! get longitude / latitude sizes
    nLonEdge = SIZE(LonE,1)
    nLatEdge = SIZE(LatE,1)

    ! Write input grid edges to shadow variables so that map_a2a accepts them
    ! as argument.
    ! Also, for map_a2a, latitudes have to be sines...
    ALLOCATE(LonEdgeI(nlonEdge), LatEdgeI(nlatEdge), STAT=AS )
    IF ( AS /= 0 ) THEN
       CALL HCO_ERROR( 'alloc error LonEdgeI/LatEdgeI', RC, THISLOC=LOC )
       RETURN
    ENDIF
    LonEdgeI(:) = LonE
    LatEdgeI(:) = SIN( LatE * HcoState%Phys%PI_180 )

    ! Get output grid edges from HEMCO state
    LonEdgeO(:) = HcoState%Grid%XEDGE%Val(:,1)
    LatEdgeO(:) = HcoState%Grid%YSIN%Val(1,:)

Similarly in HCOIO_MESSY_MOD's HCO_MESSY_REGRID:

    !-----------------------------------------------------------------
    ! Destination grid description.
    ! This creates a MESSy axis object for the target (=HEMCO) grid.
    !-----------------------------------------------------------------

    ! Get horizontal grid directly from HEMCO state
    lon   => HcoState%Grid%XEDGE%Val(:,1)
    lat   => HcoState%Grid%YEDGE%Val(1,:)

...

    ! ----------------------------------------------------------------
    ! Assign longitude: this is always the first dimension
    ! ----------------------------------------------------------------
    IF ( ASSOCIATED(lon) ) THEN
       N        = N + 1
       ax(N)%lm = .true.     ! LONGITUDE IS MODULO AXIS

       ! Axis dimension
       XLON = SIZE(lon,1)

       ! FOR NOW, ASSUME NO DEPENDENCIES. NEED TO EDIT HERE
       ! IF WE WANT TO USE CURVILINEAR GRIDS
       ax(N)%ndp    = 1          ! LONGITUDE IS ...
       ALLOCATE(ax(N)%dep(1), STAT=status)
       IF ( status/= 0 ) THEN
          CALL HCO_ERROR ( HcoState%Config%Err, 'Cannot allocate lon dependencies', RC )
          RETURN
       ENDIF
       ax(N)%dep(1) = N          ! ... INDEPENDENT
       ndep_lon     = N

It should be possible to instead use the full 2-D information for input latitudes/longitudes. However I lack expertise in the MESSy regridding code to implement this immediately, so I am posting this on the HEMCO GitHub as a feature request so we could potentially figure out a solution.

@jimmielin jimmielin added the category: Feature Request New feature or request label Jun 14, 2022
@ktravis213
Copy link

Thanks for this request. I just want to add that as the EPA NEI emission (and other regional inventories) come in this format, this will be a very useful feature for streamlining future updates.

@yantosca yantosca added the deferred Issues/PRs that we cannot work on right away label Feb 27, 2023
@yantosca yantosca added help needed: Request Input from Community We need our user community to provide a fix/update topic: Regridding or Interpolation Related to issues with time interpolation or horiziontal/vertical regridding labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Feature Request New feature or request deferred Issues/PRs that we cannot work on right away help needed: Request Input from Community We need our user community to provide a fix/update topic: Regridding or Interpolation Related to issues with time interpolation or horiziontal/vertical regridding
Projects
None yet
Development

No branches or pull requests

3 participants