<p><b>laura@ucar.edu</b> 2011-02-09 10:04:59 -0700 (Wed, 09 Feb 2011)</p><p>revised drivers for long- and short-wave radiation parameterization<br>
</p><hr noshade><pre><font color="gray">Modified: branches/atmos_physics/src/core_physics/module_driver_radiation_sw.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_driver_radiation_sw.F        2011-02-09 17:02:13 UTC (rev 732)
+++ branches/atmos_physics/src/core_physics/module_driver_radiation_sw.F        2011-02-09 17:04:59 UTC (rev 733)
@@ -8,7 +8,7 @@
use module_physics_vars
!from wrf physics:
-!use module_ra_rrtmg_sw
+ use module_ra_rrtmg_sw
implicit none
private
@@ -25,30 +25,34 @@
subroutine allocate_radiation_sw
!=============================================================================================
- if(.not.allocated(xlat_p) ) allocate(xlat_p(ims:ime,jms:jme) )
- if(.not.allocated(xlon_p) ) allocate(xlon_p(ims:ime,jms:jme) )
+ if(.not.allocated(f_ice) ) allocate(f_ice(ims:ime,jms:jme) )
+ if(.not.allocated(f_rain) ) allocate(f_rain(ims:ime,jms:jme) )
- if(.not.allocated(sfc_albedo_p) ) allocate(sfc_albedo_p(ims:ime,jms:jme) )
- if(.not.allocated(snow_p) ) allocate(snow_p(ims:ime,jms:jme) )
- if(.not.allocated(tsk_p) ) allocate(tsk_p(ims:ime,jms:jme) )
- if(.not.allocated(xice_p) ) allocate(xice_p(ims:ime,jms:jme) )
- if(.not.allocated(xland_p) ) allocate(xland_p(ims:ime,jms:jme) )
+ if(.not.allocated(xlat_p) ) allocate(xlat_p(ims:ime,jms:jme) )
+ if(.not.allocated(xlon_p) ) allocate(xlon_p(ims:ime,jms:jme) )
- if(.not.allocated(coszr_p) ) allocate(coszr_p(ims:ime,jms:jme) )
- if(.not.allocated(gsw_p) ) allocate(gsw_p(ims:ime,jms:jme) )
- if(.not.allocated(swcf_p) ) allocate(swcf_p(ims:ime,jms:jme) )
- if(.not.allocated(swdnb_p) ) allocate(swdnb_p(ims:ime,jms:jme) )
- if(.not.allocated(swdnbc_p) ) allocate(swdnbc_p(ims:ime,jms:jme) )
- if(.not.allocated(swdnt_p) ) allocate(swdnt_p(ims:ime,jms:jme) )
- if(.not.allocated(swdntc_p) ) allocate(swdntc_p(ims:ime,jms:jme) )
- if(.not.allocated(swupb_p) ) allocate(swupb_p(ims:ime,jms:jme) )
- if(.not.allocated(swupbc_p) ) allocate(swupbc_p(ims:ime,jms:jme) )
- if(.not.allocated(swupt_p) ) allocate(swupt_p(ims:ime,jms:jme) )
- if(.not.allocated(swuptc_p) ) allocate(swuptc_p(ims:ime,jms:jme) )
- if(.not.allocated(swdnflx_p) ) allocate(swdnflx_p(ims:ime,jms:jme) )
- if(.not.allocated(swdnflxc_p) ) allocate(swdnflxc_p(ims:ime,jms:jme) )
- if(.not.allocated(swupflx_p) ) allocate(swupflx_p(ims:ime,jms:jme) )
- if(.not.allocated(swupflxc_p) ) allocate(swupflxc_p(ims:ime,jms:jme) )
+ if(.not.allocated(sfc_albedo_p) ) allocate(sfc_albedo_p(ims:ime,jms:jme) )
+ if(.not.allocated(snow_p) ) allocate(snow_p(ims:ime,jms:jme) )
+ if(.not.allocated(tsk_p) ) allocate(tsk_p(ims:ime,jms:jme) )
+ if(.not.allocated(xice_p) ) allocate(xice_p(ims:ime,jms:jme) )
+ if(.not.allocated(xland_p) ) allocate(xland_p(ims:ime,jms:jme) )
+
+ if(.not.allocated(coszr_p) ) allocate(coszr_p(ims:ime,jms:jme) )
+ if(.not.allocated(gsw_p) ) allocate(gsw_p(ims:ime,jms:jme) )
+ if(.not.allocated(swcf_p) ) allocate(swcf_p(ims:ime,jms:jme) )
+ if(.not.allocated(swdnb_p) ) allocate(swdnb_p(ims:ime,jms:jme) )
+ if(.not.allocated(swdnbc_p) ) allocate(swdnbc_p(ims:ime,jms:jme) )
+ if(.not.allocated(swdnt_p) ) allocate(swdnt_p(ims:ime,jms:jme) )
+ if(.not.allocated(swdntc_p) ) allocate(swdntc_p(ims:ime,jms:jme) )
+ if(.not.allocated(swupb_p) ) allocate(swupb_p(ims:ime,jms:jme) )
+ if(.not.allocated(swupbc_p) ) allocate(swupbc_p(ims:ime,jms:jme) )
+ if(.not.allocated(swupt_p) ) allocate(swupt_p(ims:ime,jms:jme) )
+ if(.not.allocated(swuptc_p) ) allocate(swuptc_p(ims:ime,jms:jme) )
+
+ if(.not.allocated(swdnflx_p) ) allocate(swdnflx_p(ims:ime,kms:kme+1,jms:jme) )
+ if(.not.allocated(swdnflxc_p) ) allocate(swdnflxc_p(ims:ime,kms:kme+1,jms:jme) )
+ if(.not.allocated(swupflx_p) ) allocate(swupflx_p(ims:ime,kms:kme+1,jms:jme) )
+ if(.not.allocated(swupflxc_p) ) allocate(swupflxc_p(ims:ime,kms:kme+1,jms:jme) )
if(.not.allocated(rthratensw_p) ) allocate(rthratensw_p(ims:ime,kms:kme,jms:jme) )
@@ -58,15 +62,15 @@
subroutine deallocate_radiation_sw
!=============================================================================================
+ if(allocated(f_ice) ) deallocate(f_ice )
+ if(allocated(f_rain) ) deallocate(f_rain )
if(allocated(xlat_p) ) deallocate(xlat_p )
if(allocated(xlon_p) ) deallocate(xlon_p )
-
if(allocated(sfc_albedo_p) ) deallocate(sfc_albedo_p )
if(allocated(snow_p) ) deallocate(snow_p )
if(allocated(tsk_p) ) deallocate(tsk_p )
if(allocated(xice_p) ) deallocate(xice_p )
if(allocated(xland_p) ) deallocate(xland_p )
-
if(allocated(coszr_p) ) deallocate(coszr_p )
if(allocated(gsw_p) ) deallocate(gsw_p )
if(allocated(swcf_p) ) deallocate(swcf_p )
@@ -103,8 +107,8 @@
do j = jts,jte
do i = its,ite
- xlat_p(i,j) = mesh % latCell % array(i)
- xlon_p(i,j) = mesh % lonCell % array(i)
+ xlat_p(i,j) = (mesh % latCell % array(i)) / degrad
+ xlon_p(i,j) = (mesh % lonCell % array(i)) / degrad
sfc_albedo_p(i,j) = diag_physics % sfc_albedo % array(i)
snow_p(i,j) = diag_physics % snow % array(i)
@@ -127,12 +131,17 @@
swupbc_p(i,j) = 0.
swupt_p(i,j) = 0.
swuptc_p(i,j) = 0.
- swdnflx_p(i,j) = 0.
- swdnflxc_p(i,j) = 0.
- swupflx_p(i,j) = 0.
- swupflxc_p(i,j) = 0.
enddo
+ do k = kts,kte+2
+ do i = its,ite
+ swdnflx_p(i,k,j) = 0.
+ swdnflxc_p(i,k,j) = 0.
+ swupflx_p(i,k,j) = 0.
+ swupflxc_p(i,k,j) = 0.
+ enddo
+ enddo
+
do k = kts,kte
do i = its,ite
rthratensw_p(i,k,j) = 0.
@@ -155,6 +164,7 @@
do j = jts,jte
do i = its,ite
+ diag_physics % coszr % array(i) = coszr_p(i,j)
diag_physics % gsw % array(i) = gsw_p(i,j)
diag_physics % swcf % array(i) = swcf_p(i,j)
diag_physics % swdnb % array(i) = swdnb_p(i,j)
@@ -165,12 +175,17 @@
diag_physics % swupbc % array(i) = swupbc_p(i,j)
diag_physics % swupt % array(i) = swupt_p(i,j)
diag_physics % swuptc % array(i) = swuptc_p(i,j)
- diag_physics % swdnflx % array(i) = swdnflx_p(i,j)
- diag_physics % swdnflxc % array(i) = swdnflxc_p(i,j)
- diag_physics % swupflx % array(i) = swupflx_p(i,j)
- diag_physics % swupflxc % array(i) = swupflxc_p(i,j)
enddo
+ do k = kts,kte+2
+ do i = its,ite
+ diag_physics % swdnflx % array(k,i) = swdnflx_p(i,k,j)
+ diag_physics % swdnflxc % array(k,i) = swdnflxc_p(i,k,j)
+ diag_physics % swupflx % array(k,i) = swupflx_p(i,k,j)
+ diag_physics % swupflxc % array(k,i) = swupflxc_p(i,k,j)
+ enddo
+ enddo
+
do k = kts,kte
do i = its,ite
tend_physics % rthratensw % array(k,i) = rthratensw_p(i,k,j)
@@ -223,6 +238,8 @@
type(tend_physics_type),intent(inout):: tend_physics
!local variables:
+ real(kind=RKIND):: radt,xtime_m
+
real(kind=RKIND),pointer:: xtime
!---------------------------------------------------------------------------------------------
@@ -234,75 +251,76 @@
102 format(3i6,8(1x,e15.8))
xtime => state % xtime % scalar
+ xtime_m = xtime/60.
!copy all MPAS arrays to rectangular grid:
call radiation_sw_from_MPAS(mesh,diag_physics,sfc_physics,sfc_input)
!... calculates solar declination:
call radconst(xtime,declin,solcon,julday,degrad,dpd)
- write(0,*) ' xtime = ',xtime
- write(0,*) ' declin = ',declin
- write(0,*) ' solcon = ',solcon
- write(0,*) ' julday = ',julday
- write(0,*) ' degrad = ',degrad
- write(0,*) ' dpd = ',dpd
+!... convert the radiation time_step to minutes:
+ radt = dt_radtsw/60.
+
!call to shortwave radiation scheme:
radiation_sw_select: select case (trim(radt_sw_scheme))
case ("rrtmg_sw")
- write(0,*) '--- enter subroutine rrtmg_sw:'
- write(0,*) ' gmt = ', gmt
- write(0,*) ' dt_radtsw = ', dt_radtsw
- write(0,*)
- do j = jts,jte
- do i = its,its+20
- write(0,101) j,i,xlon_p(i,j),xlat_p(i,j),xland_p(i,j),xice_p(i,j), &
- sfc_albedo_p(i,j),tsk_p(i,j)
- enddo
- enddo
- write(0,*)
- do j=jts,jte
- do i=its,its
- do k=kte,kts,-1
- write(0,102) j,i,k,pres_p(i,k,j),pi_p(i,k,j),dz_p(i,k,j),rho_p(i,k,j),t_p(i,k,j)
- enddo
- write(0,*)
- do k=kte,kts,-1
- write(0,102) j,i,k,cldfrac_p(i,k,j),qv_p(i,k,j),qc_p(i,k,j),qr_p(i,k,j), &
- qi_p(i,k,j),qs_p(i,k,j),qg_p(i,k,j)
- enddo
- enddo
- enddo
+! write(0,*) '--- enter subroutine rrtmg_sw:'
+! write(0,*) ' gmt = ', gmt
+! write(0,*) ' dt_radtsw = ', dt_radtsw
+! write(0,*)
+! do j = jts,jte
+! do i = its,its+20
+! write(0,101) j,i,xlon_p(i,j),xlat_p(i,j),xland_p(i,j),xice_p(i,j), &
+! sfc_albedo_p(i,j),tsk_p(i,j)
+! enddo
+! enddo
+! write(0,*)
+! do j=jts,jte
+! do i=its,its
+! do k=kte,kts,-1
+! write(0,102) j,i,k,pres_p(i,k,j),pi_p(i,k,j),dz_p(i,k,j),rho_p(i,k,j),t_p(i,k,j)
+! enddo
+! write(0,*)
+! do k=kte,kts,-1
+! write(0,102) j,i,k,cldfrac_p(i,k,j),qv_p(i,k,j),qc_p(i,k,j),qr_p(i,k,j), &
+! qi_p(i,k,j),qs_p(i,k,j),qg_p(i,k,j)
+! enddo
+! enddo
+! enddo
-! call rrtmg_swrad( &
-! rthratensw = rthratensw_p , swupt = swupt_p , swuptc = swuptc_p , &
-! swdnt = swdnt_p , swdntc = swdntc_p , swupb = swupb_p , &
-! swupbc = swupbc_p , swdnb = swdnb_p , swdnbc = swdnbc_p , &
-! swcf = swcf_p , gsw = gsw_p , xtime = xtime , &
-! gmt = gmt , xlat = xlat_p , xlong = xlon_p , &
-! radt = dt_radtsw , degrad = degrad , declin = declin , &
-! coszr = coszr_p , julday = julday , solcon = solcon , &
-! albedo = sfc_albedo_p , t3d = t_p , t8w = t2_p , &
-! tsk = tsk_p , p3d = pres_p , p8w = pres2_p , &
-! pi3d = pi_p , rho3d = rho_p , dz8w = dz_p , &
-! cldfra3d = cldfrac_p , r = R_d , g = g , &
-! icloud = icloud , warm_rain = warm_rain , f_ice_phy = f_ice , &
-! f_rain_phy = f_rain , xland = xland_p , xice = xice_p , &
-! snow = snow_p , qv3d = qv_p , qc3d = qc_p , &
-! qr3d = qr_p , qi3d = qi_p , qs3d = qs_p , &
-! qg3d = qg_p , f_qv = f_qv , f_qc = f_qc , &
-! f_qr = f_qr , f_qi = f_qi , f_qs = f_qs , &
-! f_qg = f_qg , &
-! !begin optional arguments:
-! swupflx = swupflx_p , swupflxc = swupflxc_p , swdnflx = swdnflx_p , &
-! swdnflxc = swdnflxc_p , &
-! !end optional arguments.
-! ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , &
-! ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , &
-! its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
-! )
+ f_ice(:,:) = 0.
+ f_rain(:,:) = 0.
+ call rrtmg_swrad( &
+ rthratensw = rthratensw_p , swupt = swupt_p , swuptc = swuptc_p , &
+ swdnt = swdnt_p , swdntc = swdntc_p , swupb = swupb_p , &
+ swupbc = swupbc_p , swdnb = swdnb_p , swdnbc = swdnbc_p , &
+ swcf = swcf_p , gsw = gsw_p , xtime = xtime_m , &
+ gmt = gmt , xlat = xlat_p , xlong = xlon_p , &
+ radt = radt , degrad = degrad , declin = declin , &
+ coszr = coszr_p , julday = julday , solcon = solcon , &
+ albedo = sfc_albedo_p , t3d = t_p , t8w = t2_p , &
+ tsk = tsk_p , p3d = pres_p , p8w = pres2_p , &
+ pi3d = pi_p , rho3d = rho_p , dz8w = dz_p , &
+ cldfra3d = cldfrac_p , r = R_d , g = g , &
+ icloud = icloud , warm_rain = warm_rain , f_ice_phy = f_ice , &
+ f_rain_phy = f_rain , xland = xland_p , xice = xice_p , &
+ snow = snow_p , qv3d = qv_p , qc3d = qc_p , &
+ qr3d = qr_p , qi3d = qi_p , qs3d = qs_p , &
+ qg3d = qg_p , f_qv = f_qv , f_qc = f_qc , &
+ f_qr = f_qr , f_qi = f_qi , f_qs = f_qs , &
+ f_qg = f_qg , &
+ !begin optional arguments:
+ swupflx = swupflx_p , swupflxc = swupflxc_p , swdnflx = swdnflx_p , &
+ swdnflxc = swdnflxc_p , &
+ !end optional arguments.
+ ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , &
+ ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , &
+ its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte &
+ )
+
case default
end select radiation_sw_select
@@ -354,7 +372,7 @@
rjul=djul*degrad
eccfac=1.000110+0.034221*cos(rjul)+0.001280*sin(rjul)+0.000719* &
cos(2*rjul)+0.000077*sin(2*rjul)
- solcon=1370.*eccfac
+ solcon=solcon_0*eccfac
end subroutine radconst
Modified: branches/atmos_physics/src/core_physics/module_physics_rrtmg_lwinit.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_rrtmg_lwinit.F        2011-02-09 17:02:13 UTC (rev 732)
+++ branches/atmos_physics/src/core_physics/module_physics_rrtmg_lwinit.F        2011-02-09 17:04:59 UTC (rev 733)
@@ -58,7 +58,7 @@
endif
enddo
if(istat /= 0) &
- call physics_error_fatal(istat,'module_ra_rrtmg_lw: rrtm_lwlookuptable: Can not '// &
+ call physics_error_fatal('module_ra_rrtmg_lw: rrtm_lwlookuptable: Can not '// &
'find unused fortran unit to read in lookup table.' )
endif
@@ -73,7 +73,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
endif
@@ -186,7 +186,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -263,7 +263,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -378,7 +378,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -466,7 +466,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -571,7 +571,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -651,7 +651,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -753,7 +753,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -861,7 +861,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -969,7 +969,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -1046,7 +1046,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -1136,7 +1136,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -1206,7 +1206,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -1293,7 +1293,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -1376,7 +1376,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -1456,7 +1456,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
@@ -1536,7 +1536,7 @@
if(istat /= 0) then
write(errmess,'(A,I4)') 'module_ra_rrtmg_lw: error reading RRTMG_LW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(fracrefao)
Modified: branches/atmos_physics/src/core_physics/module_physics_rrtmg_swinit.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_rrtmg_swinit.F        2011-02-09 17:02:13 UTC (rev 732)
+++ branches/atmos_physics/src/core_physics/module_physics_rrtmg_swinit.F        2011-02-09 17:04:59 UTC (rev 733)
@@ -58,7 +58,7 @@
endif
enddo
if(istat /= 0) &
- call physics_error_fatal(istat,'module_ra_rrtmg_sw: rrtm_swlookuptable: Can not '// &
+ call physics_error_fatal('module_ra_rrtmg_sw: rrtm_swlookuptable: Can not '// &
'find unused fortran unit to read in lookup table.' )
endif
@@ -70,9 +70,11 @@
open(rrtmg_unit,file='RRTMG_SW_DATA_DBL',form='UNFORMATTED',iostat=istat)
if(istat /= 0) then
+ write(0,*) 'rrtmg_unit=',rrtmg_unit
+ write(0,*) 'istat=',istat
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
endif
@@ -184,7 +186,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_REAL(rayl)
@@ -196,15 +198,6 @@
DM_BCAST_MACRO(forrefo)
DM_BCAST_MACRO(sfluxrefo)
-! write(0,*) rayl
-! write(0,*)
-! write(0,*) strrat1
-! write(0,*)
-! write(0,*) layreffr
-! write(0,*)
-! write(0,*) sfluxrefo
-! write(0,*) '--- end sw_kgb16:'
-
end subroutine sw_kgb16
! **************************************************************************
@@ -275,7 +268,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_REAL(rayl)
@@ -356,7 +349,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_REAL(rayl)
@@ -437,7 +430,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_REAL(rayl)
@@ -520,7 +513,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_REAL(rayl)
@@ -601,7 +594,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_REAL(rayl)
@@ -682,7 +675,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_REAL(rayl)
@@ -753,7 +746,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(raylo)
@@ -838,7 +831,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(raylao)
@@ -901,7 +894,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(raylo)
@@ -939,7 +932,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(raylo)
@@ -1007,7 +1000,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_MACRO(raylo)
@@ -1074,7 +1067,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_REAL(rayl)
@@ -1160,7 +1153,7 @@
write(0,*)
write(errmess,'(A,I4)') 'module_ra_rrtmg_sw: error reading RRTMG_SW_DATA on unit ', &
rrtmg_unit
- call physics_error_fatal(istat,errmess)
+ call physics_error_fatal(errmess)
endif
DM_BCAST_REAL(rayl)
</font>
</pre>