diff --git a/README.md b/README.md
index 1b68c6c..602257a 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ LBLRTM uses the line parameters and [MT_CKD continuum](https://github.com/AER-RC
| LBLRTM Release | MT_CKD Release | Line File |
| :---: | :---: | :---: |
-| [v12.15.1](https://github.com/AER-RC/LBLRTM/releases/tag/v12.15.1) | [4.1.1](https://github.com/AER-RC/MT_CKD/releases/tag/4.1.1) | [v3.8.1](https://zenodo.org/record/4019178/files/aer_v_3.8.1.tar.gz?download=1) |
+| [v12.16](https://github.com/AER-RC/LBLRTM/releases/tag/v12.16) | [4.2](https://github.com/AER-RC/MT_CKD/releases/tag/4.2) | [v3.8.1](https://zenodo.org/record/4019178/files/aer_v_3.8.1.tar.gz?download=1) |
If any build or run issues occur, please [create an issue](https://github.com/AER-RC/LBLRTM/issues) or contact the [AER-RC Group](https://github.com/AER-RC).
@@ -65,19 +65,19 @@ git submodule update
in the `LBLRTM` directory.
-Currently, the latest release is LBLRTM v12.15.1, and it is recommended that this be the version that users clone and checkout (rather than the `master` branch). To do this, one needs to simply checkout the `v12.15.1` tag:
+Currently, the latest release is LBLRTM v12.16, and it is recommended that this be the version that users clone and checkout (rather than the `master` branch). To do this, one needs to simply checkout the `v12.16` tag:
```
-git checkout tags/v12.15.1
+git checkout tags/v12.16
```
No releases before v12.9 are available via GitHub, but they can be requested by contacting the [AER-RC Group](https://github.com/AER-RC). For information on previous releases, please visit the [What's New Wiki page](https://github.com/AER-RC/LBLRTM/wiki/What's-New).
-Instead of cloning, users can also download an LBLRTM [tarball](https://github.com/AER-RC/LBLRTM/archive/v12.15.1.zip) and unpack it:
+Instead of cloning, users can also download an LBLRTM [tarball](https://github.com/AER-RC/LBLRTM/archive/v12.16.zip) and unpack it:
```
-tar xvf lblrtm_v12.15.1.tar.gz
-mv LBLRTM-12.15.1/ lblrtm
+tar xvf lblrtm_v12.16.tar.gz
+mv LBLRTM-12.16/ lblrtm
```
Though not necessary, the move to `lblrtm` is for consistency with previous release packages and the associated documentation.
@@ -246,7 +246,7 @@ Unformatted optical depth files can be requested in the LBLRTM using options spe
# Tests
-As of LBLRTM v12.10, a [run example package](https://github.com/AER-RC/LBLRTM/releases/tag/v12.15/lblrtm_v12.15.examples.tar) is provided separately from the code repository. It can be used to validate building and running of the model for select atmospheric specifications and model configurations. See `README.setup` in top level of the package for further direction.
+As of LBLRTM v12.10, a [run example package](https://github.com/AER-RC/LBLRTM/releases/tag/v12.16/lblrtm_v12.16.examples.tar) is provided separately from the code repository. It can be used to validate building and running of the model for select atmospheric specifications and model configurations. See `README.setup` in top level of the package for further direction.
# Frequently Asked Questions
diff --git a/build/make_lblrtm b/build/make_lblrtm
index ac96380..f031a1d 100755
--- a/build/make_lblrtm
+++ b/build/make_lblrtm
@@ -12,7 +12,7 @@ include makefile.common
# change those two variables from what is provided here, no need to set this variable.
PRODUCT = lblrtm
-VERSION = v12.15.1
+VERSION = v12.16
# Define makefile name
MAKEFILE=make_$(PRODUCT)
diff --git a/data/absco-ref_wv-mt-ckd.nc b/data/absco-ref_wv-mt-ckd.nc
index 500ae8a..7d23830 100644
Binary files a/data/absco-ref_wv-mt-ckd.nc and b/data/absco-ref_wv-mt-ckd.nc differ
diff --git a/src/contnm.f90 b/src/contnm.f90
index 2dd696d..0e4e619 100644
--- a/src/contnm.f90
+++ b/src/contnm.f90
@@ -22,6 +22,7 @@ SUBROUTINE CONTNM(JRAD)
Use lblparams, ONLY: n_absrb, ipts, ipts2
USE phys_consts, ONLY: radcn2
USE mt_ckd_h2o
+ USE read_file
!
IMPLICIT REAL*8 (V)
@@ -49,10 +50,13 @@ SUBROUTINE CONTNM(JRAD)
& NLNGTH,KFILE,KPANEL,LINFIL,NFILE,IAFIL,IEXFIL, &
& NLTEFL,LNFIL4,LNGTH4
+ COMMON /CLOSURE/ FRGNX,mt_version
common /cntscl/ XSELF,XFRGN,XCO2C,XO3CN,XO2CN,XN2CN,XRAYL
real sh2o(n_absrb),fh2o(n_absrb)
logical radflag
+ character FRGNX
+ character*45 mt_version
!
!------------------------------------
! for analytic derivative calculation
@@ -284,8 +288,8 @@ SUBROUTINE CONTNM(JRAD)
radflag=.TRUE.
endif
call mt_ckd_h2o_absco(pave,tave,h2o_fac,v1abs,v2abs,dvabs,&
- sh2o,fh2o,radflag=radflag)
-
+ sh2o,fh2o,FRGNX,radflag=radflag,mt_version=mt_version)
+
! Special code just for stand alone continuum
v1h = v1abs
@@ -319,8 +323,6 @@ SUBROUTINE CONTNM(JRAD)
endif
-
-
!=======================================================================
! ******** CARBON DIOXIDE ********
@@ -1024,15 +1026,15 @@ SUBROUTINE PRCNTM
COMMON /CNTPR/ CINFO1,CINFO2,cnam3,CINFO3,cnam4,CINFO4,CHEADING
!
!
- CHARACTER*18 cnam3(9),cnam4(45)
- CHARACTER*51 CINFO1(2,12),CINFO2(2,14),CINFO3(2,9),CINFO4(2,45)
+ CHARACTER*18 cnam3(9),cnam4(46)
+ CHARACTER*51 CINFO1(2,11),CINFO2(2,14),CINFO3(2,9),CINFO4(2,46)
CHARACTER*40 CHEADING(3,2)
!
- WRITE (IPR,910) ((CINFO1(I,J),I=1,2),J=1,12)
+ WRITE (IPR,910) ((CINFO1(I,J),I=1,2),J=1,11)
WRITE (IPR,910) ((CINFO2(I,J),I=1,2),J=1,14)
WRITE (IPR,918) ((CHEADING(I,J),I=1,3),J=1,2)
WRITE (IPR,915) (cnam3(j),(CINFO3(I,J),I=1,2),J=1,9)
- WRITE (IPR,915) (cnam4(j),(CINFO4(I,J),I=1,2),J=1,45)
+ WRITE (IPR,915) (cnam4(j),(CINFO4(I,J),I=1,2),J=1,46)
!
910 FORMAT (18x,2A51)
@@ -1048,8 +1050,8 @@ BLOCK DATA CNTINF
! Continuum information for output to TAPE6 in SUBROUTINE PRCNTM
!
COMMON /CNTPR/ CINFO1,CINFO2,CNAM3,CINFO3,CNAM4,CINFO4,CHEADING
- CHARACTER*18 cnam3(9),cnam4(45)
- CHARACTER*51 CINFO1(2,12),CINFO2(2,14),CINFO3(2,9),CINFO4(2,45)
+ CHARACTER*18 cnam3(9),cnam4(46)
+ CHARACTER*51 CINFO1(2,11),CINFO2(2,14),CINFO3(2,9),CINFO4(2,46)
CHARACTER*40 CHEADING(3,2)
!
DATA cnam3/ &
@@ -1107,24 +1109,23 @@ BLOCK DATA CNTINF
& ' " ', &
& ' mt_ckd_3.6 12.13', &
& ' mt_ckd_4.0 12.14', &
- & ' mt_ckd_4.0.1 ', &
+ & ' mt_ckd_4.0.1 - ', &
& ' mt_ckd_4.1 12.15', &
- & ' mt_ckd_4.1.1 '/
+ & ' mt_ckd_4.1.1 - ', &
+ & ' mt_ckd_4.2 12.16'/
! 123456789-123456789-123456789-123456789-123456789-1
!
DATA CINFO1/ &
& ' ', &
& ' ', &
- & '*** CONTINUA mt_ckd_4.1.1 ', &
- & ' ', &
& ' ', &
& ' Most recent significant change ', &
- & ' H2O AIR 200 - 700 CM-1 ', &
- & ' mt_ckd_4.1.1 - adjust for self FIR mod(Jan 2023)', &
- & ' SELF 0 - 20000 CM-1 ', &
- & ' mt_ckd_4.0 - revise code/data external(Sep 2022)', &
- & ' SELF (T) 0 - 20000 CM-1 ', &
- & ' mt_ckd_3.6 - power law T dependence (Jan 2022)', &
+ & ' H2O AIR 600 - 1400 CM-1 ', &
+ & ' mt_ckd_4.2 - adjustment & alt. frgn (Nov 2023)', &
+ & ' SELF 600 - 1400 CM-1 ', &
+ & ' mt_ckd_4.2 - adjustment in IR window (Nov 2023)', &
+ & ' SELF (T) 600 - 1400 CM-1 ', &
+ & ' mt_ckd_4.2 - adjustment in IR window (Nov 2023)', &
& ' CO2 AIR 0 - 10000 CM-1 ', &
& ' mt_ckd_2.5 - modify 2000-3000 cm-1 (Jan 2010)', &
& ' AIR (T) 2386 - 2434 CM-1 ', &
@@ -1236,7 +1237,7 @@ BLOCK DATA CNTINF
& 'ive result depends on starting wavenumber(Aug 2008)', &
& ' H2O: modification to self and foreign continuum (', &
& 'microwave and IR ARM data 0-600 cm-1) (Nov 2008)', &
- & ' CO2: modification from 2000-3200 cm-1 (AERI(ARM), ', &
+ & ' CO2: modification from 2000-3200 cm-1 (AERI(ARM),', &
& 'IASI AIRS measurements); Temp. dep. added(Jan 2010)', &
& ' H2O: modification to self cont. 2000-3000 cm-1 ', &
& '(IASI data, fit to near-IR results of ', &
@@ -1271,7 +1272,7 @@ BLOCK DATA CNTINF
& ' Burch/Grynvak 1979, IR - Burch/Alt 1984 and Burch', &
& '/Grynvak; H2O foreign: MW - Payne et al. ', &
& ' Water vapor self continuum temperature dependence', &
- & 'computed as a power law (Mlawer, Mascio) (Jun 2022)', &
+ & ' computed as a power law (Mlawer, Mascio)(Jun 2022)', &
& ' Water vapor continuum code/data now external (Cad', &
& 'y-Pereira/Mlawer) (Sep 2022)', &
& ' Added changes to handle negative frequencies for ', &
@@ -1279,7 +1280,9 @@ BLOCK DATA CNTINF
& ' Revised foreign H2O continuum in far-IR to adjust', &
& 'for v3.5 changes to self (Mlawer, Mascio)(Dec 2022)', &
& ' Minor changes to MT_CKD_4.1 and MT_CKD_H2O_4.1 ', &
- & ' (Jan 2023)'/
+ & ' (Jan 2023)', &
+ & ' IR window: Derived from AERI - Self, frgn, self T', &
+ & '-dep; alt. frgn; Mlawer/Mascio/Turner (Dec 2023)'/
!
end block data CNTINF
!
diff --git a/src/lblrtm.f90 b/src/lblrtm.f90
index e8f8749..6757b9e 100644
--- a/src/lblrtm.f90
+++ b/src/lblrtm.f90
@@ -398,7 +398,7 @@ PROGRAM LBLRTM
CHARACTER*18 HVRSOL
!
CHARACTER*1 CONE,CTWO,CTHREE,CFOUR,CA,CB,CC,CDOL,CPRCNT,CBLNK
- CHARACTER*1 CMRG(2),CXIDA(80)
+ CHARACTER*1 IFRGNX,CMRG(2),CXIDA(80)
!
! PARAMETER (MXFSC=600, MXLAY=MXFSC+3,MXZMD=6000, &
@@ -449,7 +449,7 @@ PROGRAM LBLRTM
! -------------------------
!
- DIMENSION IDCNTL(16),IFSDID(17),IWD(2),IWD2(2),IWD3(2),IWD4(2)
+ DIMENSION IDCNTL(17),IFSDID(17),IWD(2),IWD2(2),IWD3(2),IWD4(2)
!
COMMON /MANE/ P0,TEMP0,NLAYRS,DVXM,H2OSLF,WTOT,ALBAR,ADBAR,AVBAR, &
& AVFIX,LAYRFX,SECNT0,SAMPLE,DVSET,ALFAL0,AVMASS, &
@@ -500,6 +500,10 @@ PROGRAM LBLRTM
COMMON /RCNTRL/ ILNFLG
COMMON /FLFORM/ CFORM
COMMON /IODFLG/ DVOUT
+
+ COMMON /CLOSURE/ FRGNX
+ character*1 FRGNX
+
COMMON /CNTSCL/ XSELF,XFRGN,XCO2C,XO3CN,XO2CN,XN2CN,XRAYL
common /profil_scal/ nmol_scal,hmol_scal(64),xmol_scal(64), &
& n_xs_scal,h_xs_scal(64),x_xs_scal(64)
@@ -535,10 +539,10 @@ PROGRAM LBLRTM
& (IWD4(1),V1LD)
EQUIVALENCE (CXID,CXIDA(1))
!
- DATA IDCNTL / ' HIRAC',' LBLF4',' CNTNM',' AERSL',' EMISS', &
- & ' SCNFN',' FILTR',' PLOT',' TEST',' IATM', &
- & ' IMRG',' ILAS',' OPDEP',' XSECT','ISOTPL' , &
- & ' IBRD'/
+ DATA IDCNTL / ' HIRAC',' LBLF4',' FRGNX',' CNTNM',' AERSL', &
+ & ' EMISS',' SCNFN',' FILTR',' PLOT',' TEST', &
+ & ' IATM',' IMRG',' ILAS',' OPDEP',' XSECT', &
+ & 'ISOTPL',' IBRD'/
!
DATA CONE / '1'/,CTWO / '2'/,CTHREE / '3'/,CFOUR / '4'/, &
& CA / 'A'/,CB / 'B'/,CC / 'C'/
@@ -667,11 +671,20 @@ PROGRAM LBLRTM
CALL CPUTIM (TIME0)
WRITE (IPR,920) TIME0
!
- READ(IRD,925,END=80) IHIRAC,ILBLF4,ICNTNM,IAERSL,IEMIT, &
+ READ(IRD,924,END=80) IHIRAC,ILBLF4,IFRGNX,ICNTNM,IAERSL,IEMIT, &
& ISCAN,IFILTR,IPLOT,ITEST,IATM,CMRG,ILAS, &
& IOD,IXSECT,IRAD,MPTS,NPTS,ISOTPL,IBRD
!
-
+
+ ! Set flag for choosing foreign continuum:
+! ----------------------------------------
+! IFRGNX Value Continuum type
+! 0 no closure
+! 1 closure
+
+ FRGNX = IFRGNX
+
+
ICNTNM_sav = ICNTNM
! Set continuum flags as needed
@@ -818,8 +831,8 @@ PROGRAM LBLRTM
!
JRAD = 1
IF (IRAD.NE.0) JRAD = -1
- WRITE (IPR,935) (IDCNTL(I),I=1,16)
- WRITE (IPR,940) IHIRAC,ILBLF4,ICNTNM_sav,IAERSL,IEMIT,ISCAN, &
+ WRITE (IPR,935) (IDCNTL(I),I=1,17)
+ WRITE (IPR,939) IHIRAC,ILBLF4,FRGNX,ICNTNM_sav,IAERSL,IEMIT,ISCAN, &
& IFILTR,IPLOT,ITEST,IATM,IMRG,ILAS,IOD,IXSECT,ISOTPL,IBRD
!
IF (IHIRAC.EQ.4) THEN
@@ -1159,11 +1172,14 @@ PROGRAM LBLRTM
910 FORMAT (10A8)
915 FORMAT ('0',10A8,2X,2(1X,A8,1X))
920 FORMAT ('0 TIME ENTERING LBLRTM ',F15.4)
+ 924 FORMAT (2(4X,I1),1X,A1,2X,I1,7(4X,I1),3X,2A1,3(4X,I1),I1,I4,1X, &
+ & I4,4X,I1,4x,I1,4x,I1)
925 FORMAT (10(4X,I1),3X,2A1,3(4X,I1),I1,I4,1X,I4,4X,I1,4x,I1,4x,I1)
!
930 FORMAT (I1)
- 935 FORMAT (16(A6,3X))
- 940 FORMAT (1X,I4,15I9)
+ 935 FORMAT (17(A6,3X))
+ 939 FORMAT (1X,I4,I9,8X,A1,14I9)
+ 940 FORMAT (1X,I4,16I9)
!
950 FORMAT ('0 IEMIT=0 IS NOT IMPLEMENTED FOR NLTE ',/, &
& ' CHANGE IEMIT TO 1 OR IHIRAC TO 1 ')
@@ -6152,6 +6168,9 @@ SUBROUTINE OPDPTH (MPTS)
COMMON /CONVF/ CHI(251),RDVCHI,RECPI,ZSQBND,A3,B3,JCNVF4
!
COMMON /CNTSCL/ XSELF,XFRGN,XCO2C,XO3CN,XO2CN,XN2CN,XRAYL
+
+ COMMON /CLOSURE/ FRGNX,mt_version
+ character*45 mt_version
!
EQUIVALENCE (FSCDID(1),IHIRAC) , (FSCDID(2),ILBLF4), &
& (FSCDID(3),IXSCNT) , (FSCDID(4),IAERSL), &
@@ -6207,6 +6226,7 @@ SUBROUTINE OPDPTH (MPTS)
10 CONTINUE
CALL CONTNM (JRAD)
ENDIF
+ WRITE (IPR,917) mt_version
DVR4 = 0.
!
IF (ILBLF4.GE.1) THEN
@@ -6257,7 +6277,8 @@ SUBROUTINE OPDPTH (MPTS)
910 FORMAT ('0 VLAS ',F20.8,8X,'V1 RESET ',F12.5,8X,'V2 RESET ', &
& F12.5)
915 FORMAT ('0',10A8,2X,2(1X,A8,1X),/,'0 TIME ENTERING OPDPTH ', &
- & F15.3)
+ & F15.3)
+ 917 FORMAT ('Using MT_CKD',A38)
920 FORMAT ('0 IPTS4 FOR LINF4 = ',I5,3X,' DV FOR LINF4 = ',F10.5, &
& 5X,'BOUND FOR LINF4 =',F10.4)
925 FORMAT ('0 TIME LEAVING OPDPTH ',F15.3,' TOTAL FOR LAYER ', &
diff --git a/src/mt_ckd_h2o_module.f90 b/src/mt_ckd_h2o_module.f90
index c78be14..267968f 100644
--- a/src/mt_ckd_h2o_module.f90
+++ b/src/mt_ckd_h2o_module.f90
@@ -47,6 +47,7 @@
! Description of output variables.
! self_absco - computed water vapor self continuum absorption coefficients (cm2/molec)
! for_absco - computed water vapor foreign continuum absorption coefficients (cm2/molec)
+! for_closure_absco - same as above, but allows for closure (cm2/molec)
Module mt_ckd_h2o
@@ -65,14 +66,16 @@ Module mt_ckd_h2o
contains
subroutine mt_ckd_h2o_absco(p_atm,t_atm,h2o_vmr,wv1abs,wv2abs,dvabs,self_absco,for_absco, &
- radflag)
+ FRGNX,radflag,mt_version)
! Inputs
real,dimension(:),intent(inout) :: self_absco,for_absco
real, intent(in) :: p_atm,t_atm,h2o_vmr
double precision, intent(in):: wv1abs,wv2abs
real, intent(in):: dvabs
+ character, intent(in):: FRGNX
logical,optional :: radflag
+ character(len=*),optional :: mt_version
! Local variables
integer :: ncoeff,nptabs,i1,i2,ist,lst,i
@@ -83,8 +86,9 @@ subroutine mt_ckd_h2o_absco(p_atm,t_atm,h2o_vmr,wv1abs,wv2abs,dvabs,self_absco,f
!real,dimension(:,:), allocatable,save :: coeff
real,dimension(:), allocatable :: sh2o_coeff,fh2o_coeff,rad
- integer :: iret
+ integer :: iret,vlen
logical,save :: lread=.False.
+ character(len=85) :: version
if (.not. present(radflag)) then
radflag = .TRUE.
@@ -93,7 +97,11 @@ subroutine mt_ckd_h2o_absco(p_atm,t_atm,h2o_vmr,wv1abs,wv2abs,dvabs,self_absco,f
! Read in spectral range and coefficients
if (.not. lread) then
lread = .True.
- if (getData(fDataname,dat)) STOP
+ if (getData(fDataname,FRGNX,dat,version)) STOP
+ if ( present(mt_version)) then
+ vlen = len(version)
+ mt_version=version(4:50)
+ endif
ncoeffin = size(dat%wavenumber)
if (allocated(wvn)) deallocate(wvn)
diff --git a/src/read_module.f90 b/src/read_module.f90
index 805d3bd..65d64fa 100644
--- a/src/read_module.f90
+++ b/src/read_module.f90
@@ -43,13 +43,16 @@ MODULE read_file
module procedure readReal1D
module procedure readDouble1D
module procedure readDouble
+ module procedure readString
end interface
contains
- function getData(fname, dat) result(isError)
+ function getData(fname,FRGNX,dat,version) result(isError)
character(len=*), intent(in) :: fname
+ character, intent(in) :: FRGNX
type(data2read), intent(inout) :: dat
+ character(len=*), intent(inout) :: version
logical :: isError
integer(kind=4) :: ncid
@@ -90,11 +93,16 @@ function getData(fname, dat) result(isError)
! read variables
call readVarNC(ncid,"wavenumbers", dat%wavenumber)
- call readVarNC(ncid,"for_absco_ref", dat%for_absco_ref)
+ if (FRGNX.EQ.'1') then
+ call readVarNC(ncid,"for_closure_absco_ref", dat%for_absco_ref)
+ else
+ call readVarNC(ncid,"for_absco_ref", dat%for_absco_ref)
+ endif
call readVarNC(ncid,"self_absco_ref", dat%self_absco_ref)
call readVarNC(ncid,"self_texp", dat%self_texp)
call readVarNC(ncid,"ref_temp", dat%ref_temp)
call readVarNC(ncid,"ref_press", dat%ref_press)
+ call readVarNC(ncid,"title", version)
call check( nf_close(ncid) )
end function getData
@@ -175,4 +183,15 @@ subroutine readDouble(id, varName, val, fatal)
call check(nf_get_var(id, varId, val), varName, fatal)
end subroutine readDouble
+ subroutine readString(id, varName, val, fatal)
+ integer(kind=4), intent(in) :: id
+ character(len=*), intent(in) :: varName
+ character(len=*), intent(inout):: val
+ integer(kind=4) :: varId
+ logical, optional, intent(in) :: fatal
+ integer :: status
+ if (dbg) print*, ' ncdfUtil::readString '
+ status= nf_get_att(id, NF_GLOBAL, varName, val)
+
+ end subroutine readString
end module read_file