Skip to content

Commit

Permalink
Added longitude/latitude to output stream. Needed to sort through MPI…
Browse files Browse the repository at this point in the history
… output.
  • Loading branch information
dustinswales committed Jan 6, 2020
1 parent 5542aca commit 04ad9ed
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 7 deletions.
8 changes: 4 additions & 4 deletions physics/radlw_main.f
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ subroutine rrtmg_lw_run &
& gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, &
& gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, &
& icseed,aeraod,aerssa,sfemis,sfgtmp, &
& dzlyr,delpin,de_lgth, &
& dzlyr,delpin,de_lgth,xlon,xlat, &
& npts, nlay, nlp1, lprnt, cld_cf, lslwr, &
& hlwc,topflx,sfcflx,cldtau, & ! --- outputs
& HLW0,HLWB,FLXPRF, & ! --- optional
Expand Down Expand Up @@ -589,7 +589,7 @@ subroutine rrtmg_lw_run &
& cld_od
real (kind=kind_phys), dimension(npts), intent(in) :: sfemis, &
& sfgtmp, de_lgth
& sfgtmp, de_lgth, xlon, xlat
real (kind=kind_phys), dimension(npts,nlay,nbands),intent(in):: &
& aeraod, aerssa
Expand Down Expand Up @@ -1168,8 +1168,8 @@ subroutine rrtmg_lw_run &
do k=1,nlay
write(47,"(21f8.2)") plyr(iplon,k),clwp(k),relw(k),ciwp(k), &
& reiw(k),taucld(:,k)
write(47,"(23f8.2)") plyr(iplon,k),clwp(k),relw(k),ciwp(k), &
& reiw(k),taucld(:,k),xlon(k),xlat(k)
enddo
Expand Down
18 changes: 18 additions & 0 deletions physics/radlw_main.meta
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,24 @@
kind = kind_phys
intent = in
optional = F
[xlon]
standard_name = longitude
long_name = longitude
units = radians
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[xlat]
standard_name = latitude
long_name = latitude
units = radians
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[npts]
standard_name = horizontal_loop_extent
long_name = horizontal dimension
Expand Down
9 changes: 6 additions & 3 deletions physics/rrtmgp_lw_cloud_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ end subroutine rrtmgp_lw_cloud_optics_init
!!
subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nrghice, &
cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_swp, cld_resnow, cld_rwp, &
cld_rerain, p_lay, lw_cloud_props, lw_gas_props, &
cld_rerain, p_lay, lw_cloud_props, lw_gas_props, lon, lat, &
cldtaulw, lw_optical_props_cloudsByBand, errmsg, errflg)

! Inputs
Expand All @@ -370,6 +370,9 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr
nLev, & ! Number of vertical levels
nrghice, & ! Number of ice-roughness categories
cld_optics_scheme ! Cloud-optics scheme
real(kind_phys), dimension(nCol), intent(in) :: &
lon, & ! Longitude
lat ! Latitude
real(kind_phys), dimension(ncol,nLev),intent(in) :: &
p_lay, & ! Layer pressure (Pa)
cld_frac, & ! Total cloud fraction by layer
Expand Down Expand Up @@ -449,8 +452,8 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, nCol, nLev, cld_optics_scheme, nr
write(47,*),"nLay: ",nLev
do iCol=1,nCol
do iLay=1,nLev
write(47,"(21f8.2)") p_lay(iCol,iLay)/100.,cld_lwp(iCol,iLay),cld_reliq(iCol,iLay),&
cld_iwp(iCol,iLay),cld_reice(iCol,iLay),tau_cld(iCol,iLay,:)
write(47,"(23f8.2)") p_lay(iCol,iLay)/100.,cld_lwp(iCol,iLay),cld_reliq(iCol,iLay),&
cld_iwp(iCol,iLay),cld_reice(iCol,iLay),tau_cld(iCol,iLay,:),lon(iCol), lat(iCol)
enddo
enddo

Expand Down
18 changes: 18 additions & 0 deletions physics/rrtmgp_lw_cloud_optics.meta
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,24 @@
intent = in
type = ty_cloud_optics
optional = F
[lon]
standard_name = longitude
long_name = longitude
units = radians
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[lat]
standard_name = latitude
long_name = latitude
units = radians
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[cldtaulw]
standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band
long_name = approx 10mu band layer cloud optical depth
Expand Down

0 comments on commit 04ad9ed

Please sign in to comment.