Skip to content

Commit aab06c4

Browse files
authored
Merge pull request #416 from GEOS-ESM/feature/sdrabenh/GEOS-FP-5_44_into_main
2 parents 3d61da4 + d382347 commit aab06c4

14 files changed

Lines changed: 509 additions & 115 deletions

File tree

CHANGELOG.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Fixed
1515

16-
- Fix for Open MPI calls in `esma_mpirun` from Open MPI 5 testing
17-
1816
### Removed
1917

2018
### Deprecated
2119

20+
## [2.1.7] - 2026-04-15
21+
22+
### Added
23+
24+
- Minor changes for VIIRS additions
25+
26+
### Changed
27+
28+
- Synced latest changes from branch GEOS-FP-5_44 into main
29+
30+
### Fixed
31+
32+
- Fix for Open MPI calls in `esma_mpirun` from Open MPI 5 testing
33+
2234
## [2.1.6] - 2026-01-06
2335

2436
### Fixed
@@ -85,6 +97,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8597

8698
### Fixed
8799

100+
2026-01-17:
101+
102+
- added GOES, HIMAWARI, VIIRS SNPP & NOAA-20, and Lunar AERONET aerosol observations to the KX-lists
103+
104+
2026-01-12:
105+
106+
- r_dist for MILAN
107+
- minor bug fix in ODS code
108+
- add ak/bk for MLT 1st version
109+
- add ability to write out akbk to nc4 (JEDI support)
110+
111+
------------
88112
- fix vED
89113
- SLES15 stuff
90114
- fix to reading of table in time ave program

GMAO_etc/r_dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ return $put_rc;
401401
sub resolve {
402402

403403
my ( $LOCALROOT,$REMOTEROOT,$expno,$yyyy,$yy,$mm,$dd,$hh,$file ) = @_;
404-
$file =~ s/\${REMOTEROOT}/$REMOTEROOT/g;
405-
$file =~ s/\${LOCALROOT}/$LOCALROOT/g;
404+
$file =~ s/\$\{REMOTEROOT}/$REMOTEROOT/g;
405+
$file =~ s/\$\{LOCALROOT}/$LOCALROOT/g;
406406
$file =~ s/%y4/$yyyy/g;
407407
$file =~ s/%y2/$yy/g;
408408
$file =~ s/%m2/$mm/g;

GMAO_etc/setup_gaas_obs.pl

Lines changed: 0 additions & 87 deletions
This file was deleted.

GMAO_hermes/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if ( NOT HERMES_LIGHT )
1515
m_insitu.F m_interp.F90 m_lp.F m_maph.F90 m_maph_pert.F90 m_mapz.F m_mapz_pert.F90
1616
m_qsat.F m_remap.f90 m_set_eta.F90 m_vdc2vdc.F90 progsig.f90 shared_topo_remap.F90 m_topo_remap.F90
1717
m_interpack.F m_interpack_ad.F m_ec_set_eta.F90 m_ecdyn.f90 m_tick.f90
18-
m_dyn_util.F90 m_spline.f90 m_nc_JEDIinc.f90
18+
m_dyn_util.F90 m_spline.f90 m_nc_JEDIinc.f90 m_nc_akbk.f90
1919
)
2020

2121
esma_add_library(${this} SRCS ${srcs} DEPENDENCIES GMAO_mpeu GMAO_gfio_r8)

GMAO_hermes/dyn2dyn.f90

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ program dyn2dyn
1414
use m_dyn
1515
use m_set_eta, only : set_ncep72,unset_ncep72
1616
use m_dyn2dyn, only : dyn2dyn_do
17+
use m_topo_remap, only: dyn_topo_remap
1718

1819
use m_StrTemplate ! grads style templates
1920

@@ -75,6 +76,7 @@ program dyn2dyn
7576
! ------
7677
character(len=255) msg
7778
character(len=255), pointer :: xtrnames(:)
79+
character(len=255) phfile
7880
integer, parameter :: READ_ONLY = 1
7981
integer fid, nvars, ngatts
8082
integer ier, ifile
@@ -97,7 +99,7 @@ program dyn2dyn
9799
fakedate, nymdf, nhmsf, &
98100
dophys, expid, RCfile, verbose, oldana, force, &
99101
vectype, dgrid, ncep72, ncf, pncf, indxlevs, &
100-
xtrnames )
102+
xtrnames, phfile )
101103

102104

103105
! Loop over input eta files
@@ -155,6 +157,12 @@ program dyn2dyn
155157
end if
156158
if(ncep72) call set_ncep72
157159

160+
! If topographic remap requested ...
161+
! ----------------------------------
162+
if ( trim(phfile) /= "NONE" ) then
163+
call dyn_topo_remap(trim(phfile), w_e, vectype, ier)
164+
endif
165+
158166
! Perform interpolation
159167
! ---------------------
160168
if ( trim(RCfile)=='NONE' ) then
@@ -211,7 +219,7 @@ subroutine Init_ ( mfiles, etafiles, nfiles, dynfile, lwifile, &
211219
fakedate, nymdf, nhmsf, &
212220
dophys, expid, RCfile, verbose, oldana, force, &
213221
vectype, dgrid, ncep72, ncf, pncf, indxlevs, &
214-
xtrnames )
222+
xtrnames, phfile )
215223

216224
implicit NONE
217225

@@ -245,6 +253,7 @@ subroutine Init_ ( mfiles, etafiles, nfiles, dynfile, lwifile, &
245253
logical, intent(out) :: pncf ! non-complaint dyn-perturbation file knob
246254
logical, intent(out) :: indxlevs! index levels (in place of pressure levs)
247255
character(len=*), pointer :: xtrnames(:)
256+
character(len=*) :: phfile
248257

249258
!
250259
! !REVISION HISTORY:
@@ -319,6 +328,7 @@ subroutine Init_ ( mfiles, etafiles, nfiles, dynfile, lwifile, &
319328
trnames = 'NONE'
320329
im_usr = -1
321330
jm_usr = -1
331+
phfile = 'NONE'
322332

323333
! Parse command line
324334
! ------------------
@@ -466,6 +476,10 @@ subroutine Init_ ( mfiles, etafiles, nfiles, dynfile, lwifile, &
466476
ncf = .true.
467477
case ('-pncf')
468478
pncf = .true.
479+
case ("-phfile")
480+
if ( iarg+1 .gt. argc ) call usage()
481+
iarg = iarg + 1
482+
call GetArg ( iarg, phfile )
469483
case ('-prec')
470484
if ( iarg+1 .gt. argc ) call usage()
471485
iarg = iarg + 1
@@ -604,6 +618,7 @@ subroutine usage()
604618
print *, '-ncf non-compliant dyn-vector (see NOTES)'
605619
print *, '-pncf non-compliant dyn-vector perturbation (see NOTES)'
606620
print *, '-tracers N,M read/write extra tracers of name N and M from ori file to new'
621+
print *, '-phfile FNAME when alternative dyn-vec file provided, will perform topo-remap'
607622
print *
608623
print *, ' NOTES:'
609624
print *, ' 1) For the time being, in order to do horizontal'

GMAO_hermes/eta_echo.f90

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ program eta_echo
22
use m_set_eta, only: set_eta
33
use m_set_eta, only: get_ref_plevs
44
use m_spline, only: spline
5+
use m_nc_akbk, only: write_nc_akbk
56
implicit none
67

78
integer :: nlevs,mlevs
@@ -13,6 +14,7 @@ program eta_echo
1314
real(4) :: ak4,bk4
1415
real(4) :: pbottom
1516
character(len=255) :: locfname
17+
character(len=255) :: akbkfname
1618

1719
call init_
1820

@@ -28,7 +30,7 @@ program eta_echo
2830
call write_plevs_()
2931
endif
3032

31-
call write_akbk_()
33+
if ( akbkfname /= "NULL" ) call write_nc_akbk ( akbkfname, ak8, bk8 )
3234

3335
deallocate(ak8,bk8)
3436

@@ -52,13 +54,15 @@ subroutine init_
5254
print *, " -mlevs LEVS - interpolate to this level setting"
5355
print *, " -plevs - echoes pressure levels"
5456
print *, " -r4 - single precision"
57+
print *, " -nc FILE - writes out ak/bk to nc4 file"
5558
print *, " "
5659
stop
5760
end if
5861
bot2top = .false.
5962
lsingle = .false.
6063
lplevs = .false.
6164
locfname = "NULL"
65+
akbkfname = "NULL"
6266
pbottom = -999.
6367
mlevs=0
6468
iarg = 1
@@ -84,6 +88,10 @@ subroutine init_
8488
iarg = iarg + 1
8589
call GetArg ( iarg, argv )
8690
locfname = trim(argv)
91+
case ("-nc")
92+
iarg = iarg + 1
93+
call GetArg ( iarg, argv )
94+
akbkfname = trim(argv)
8795
case default
8896
read(argv,*) nlevs
8997
end select

GMAO_hermes/m_nc_akbk.f90

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
module m_nc_akbk
2+
use netcdf
3+
implicit none
4+
private
5+
public :: write_nc_akbk
6+
interface write_nc_akbk
7+
module procedure write_nc_akbk_
8+
end interface
9+
integer :: mype_ = 0
10+
integer :: root_ = 0
11+
contains
12+
subroutine write_nc_akbk_ (fname,ak, bk)
13+
14+
character(len=*), intent(in) :: fname
15+
double precision, intent(in) :: ak(:), bk(:)
16+
17+
! NetCDF variables
18+
integer :: ncid, dimid_edge
19+
integer :: varid_edge, varid_ak, varid_bk
20+
integer :: rc
21+
integer :: i, km
22+
double precision, allocatable :: edge(:)
23+
24+
km = size(ak)
25+
allocate(edge(km))
26+
do i=1,km
27+
edge(i) = dble(i)
28+
enddo
29+
30+
! Create the NetCDF file
31+
call check_( nf90_create(fname, NF90_CLOBBER, ncid), rc, mype_, root_ )
32+
if(rc/=0) return
33+
34+
! Define dimensions
35+
call check_ ( nf90_def_dim(ncid, "edge", km, dimid_edge), rc, mype_, root_ )
36+
if(rc/=0) return
37+
38+
! Define variables
39+
call check_ ( nf90_def_var(ncid, "edge", NF90_DOUBLE, (/dimid_edge/), varid_edge), rc, mype_, root_ )
40+
call check_ ( nf90_def_var(ncid, "ak", NF90_DOUBLE, (/dimid_edge/), varid_ak), rc, mype_, root_ )
41+
call check_ ( nf90_def_var(ncid, "bk", NF90_DOUBLE, (/dimid_edge/), varid_bk), rc, mype_, root_ )
42+
43+
! Add attributes to edge
44+
call check_ ( nf90_put_att(ncid, varid_edge, "units", "level"), rc, mype_, root_ )
45+
call check_ ( nf90_put_att(ncid, varid_edge, "long_name", "sigma at layer edges"), rc, mype_, root_ )
46+
call check_ ( nf90_put_att(ncid, varid_edge, "standard_name", "atmosphere_hybrid_sigma_pressure_coordinate"),&
47+
rc, mype_, root_ )
48+
call check_ ( nf90_put_att(ncid, varid_edge, "coordinate", "eta"), rc, mype_, root_ )
49+
call check_ ( nf90_put_att(ncid, varid_edge, "positive", "down"), rc, mype_, root_ )
50+
call check_ ( nf90_put_att(ncid, varid_edge, "formulaTerms", "ap: ak b: bk ps: ps p0: p00"),&
51+
rc, mype_, root_ )
52+
53+
! Add attributes to ak
54+
call check_ ( nf90_put_att(ncid, varid_ak, "long_name", "hybrid_sigma_pressure_a"),&
55+
rc, mype_, root_ )
56+
call check_ ( nf90_put_att(ncid, varid_ak, "units", "Pa"), rc, mype_, root_ )
57+
58+
! Add attributes to bk
59+
call check_ ( nf90_put_att(ncid, varid_bk, "long_name", "hybrid_sigma_pressure_b"), &
60+
rc, mype_, root_ )
61+
call check_ ( nf90_put_att(ncid, varid_bk, "units", "1"), rc, mype_, root_ )
62+
63+
! Global attributes
64+
call check_ ( nf90_put_att(ncid, NF90_GLOBAL, "NASA/GMAO", &
65+
"Homepage = http://gmao.gfsc.nasa.gov/"), rc, mype_, root_ )
66+
67+
! End define mode
68+
call check_ ( nf90_enddef(ncid), rc, mype_, root_ )
69+
70+
! Write data
71+
call check_ ( nf90_put_var(ncid, varid_edge, edge), rc, mype_, root_ )
72+
call check_ ( nf90_put_var(ncid, varid_ak, ak), rc, mype_, root_ )
73+
call check_ ( nf90_put_var(ncid, varid_bk, bk), rc, mype_, root_ )
74+
75+
! Close file
76+
call check_ ( nf90_close(ncid), rc, mype_, root_ )
77+
78+
deallocate(edge)
79+
80+
print *, "NetCDF file ",trim(fname)," written successfully."
81+
82+
end subroutine write_nc_akbk_
83+
subroutine check_(status,rc, myid, root)
84+
integer, intent ( in) :: status
85+
integer, intent (out) :: rc
86+
integer, intent ( in) :: myid, root
87+
rc=0
88+
if(status /= nf90_noerr) then
89+
if(myid==root) print *, trim(nf90_strerror(status))
90+
rc=999
91+
end if
92+
end subroutine check_
93+
end module m_nc_akbk
94+

0 commit comments

Comments
 (0)