Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Apps/Regrid_Util/Regrid_Util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ subroutine UnpackGridName(gridName,im,jm,date,pole)
integer :: nn
character(len=5) :: imsz,jmsz

if (index(gridName, 'EASE') /=0) return ! Not necessary for EASE grid

nn = len_trim(Gridname)
imsz = Gridname(3:index(Gridname,'x')-1)
jmsz = Gridname(index(Gridname,'x')+1:nn-3)
Expand Down Expand Up @@ -260,13 +262,22 @@ function create_cf(grid_name,im_world,jm_world,nx,ny,lm,cs_stretch_param,lon_ran
character(len=2) :: pole,dateline
integer :: nn

cf = MAPL_ConfigCreate(_RC)
call MAPL_ConfigSetAttribute(cf,value=NX, label=trim(grid_name)//".NX:",_RC)
call MAPL_ConfigSetAttribute(cf,value=lm, label=trim(grid_name)//".LM:",_RC)

if (index(grid_name, 'EASE') /=0) then
!These three attributes are enough to create a EASE grid from the EASE factory
call MAPL_ConfigSetAttribute(cf,value="EASE", label=trim(grid_name)//".GRID_TYPE:",_RC)
call MAPL_ConfigSetAttribute(cf,value=trim(grid_name), label=trim(grid_name)//".GRIDNAME:",_RC)
call MAPL_ConfigSetAttribute(cf,value=ny, label=trim(grid_name)//".NY:",_RC)
_RETURN(_SUCCESS)
endif

nn = len_trim(grid_name)
dateline=grid_name(nn-1:nn)
pole=grid_name(1:2)

cf = MAPL_ConfigCreate(_RC)
call MAPL_ConfigSetAttribute(cf,value=NX, label=trim(grid_name)//".NX:",_RC)
call MAPL_ConfigSetAttribute(cf,value=lm, label=trim(grid_name)//".LM:",_RC)
if (dateline=='CF') then
call MAPL_ConfigSetAttribute(cf,value="Cubed-Sphere", label=trim(grid_name)//".GRID_TYPE:",_RC)
call MAPL_ConfigSetAttribute(cf,value=6, label=trim(grid_name)//".NF:",_RC)
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added EASE grid support to Regridder_Util program

### Changed

### Removed
Expand Down
Loading