diff --git a/atmos_cubed_sphere/driver/fvGFS/atmosphere.F90 b/atmos_cubed_sphere/driver/fvGFS/atmosphere.F90
index 7f61bcab1..f0132cbb1 100644
--- a/atmos_cubed_sphere/driver/fvGFS/atmosphere.F90
+++ b/atmos_cubed_sphere/driver/fvGFS/atmosphere.F90
@@ -106,7 +106,7 @@ module atmosphere_mod
!
!
! IPD_typedefs_mod |
-! IPD_data_type, kind_phys |
+! IPD_data_type, kind_phys => IPD_kind_phys |
!
!
! mpp_mod |
@@ -165,7 +165,7 @@ module atmosphere_mod
use tracer_manager_mod, only: get_tracer_index, get_number_tracers, &
NO_TRACER
use DYCORE_typedefs, only: DYCORE_data_type
-use IPD_typedefs, only: IPD_data_type, kind_phys
+use IPD_typedefs, only: IPD_data_type, kind_phys => IPD_kind_phys
use fv_iau_mod, only: IAU_external_data_type
!-----------------
@@ -1640,9 +1640,9 @@ subroutine atmos_phys_driver_statein (IPD_Data, Atm_block)
!--------------------------------------
! Local GFS-phys consistent parameters:
!--------------------------------------
- real(kind=kind_phys), parameter:: p00 = 1.e5
- real(kind=kind_phys), parameter:: qmin = 1.0e-10
- real(kind=kind_phys):: pk0inv, ptop, pktop
+ real(kind=kind_phys), parameter :: p00 = 1.e5
+ real(kind=kind_phys), parameter :: qmin = 1.0e-10
+ real(kind=kind_phys) :: pk0inv, ptop, pktop
real(kind=kind_phys) :: rTv, dm, qgrs_rad
integer :: nb, blen, npz, i, j, k, ix, k1, dnats, nq_adv
diff --git a/atmos_cubed_sphere/makefile b/atmos_cubed_sphere/makefile
index 9b578bd1c..b696a800c 100644
--- a/atmos_cubed_sphere/makefile
+++ b/atmos_cubed_sphere/makefile
@@ -17,7 +17,7 @@ endif
LIBRARY = libfv3core.a
-FFLAGS += -I../fms -I../fms/include -I../gfsphysics -I../io
+FFLAGS += -I../fms -I../fms/include -I../gfsphysics -I ../ipd -I../io
SRCS_f =
diff --git a/atmos_cubed_sphere/tools/fv_iau_mod.F90 b/atmos_cubed_sphere/tools/fv_iau_mod.F90
index 9b5c41c8a..905573378 100644
--- a/atmos_cubed_sphere/tools/fv_iau_mod.F90
+++ b/atmos_cubed_sphere/tools/fv_iau_mod.F90
@@ -25,8 +25,8 @@
!> @author Philip Pegion
!> @date 09/13/2017
!
-! REVISION HISTORY:
-! 09/13/2017 - Initial Version based on fv_treat_da_inc.F90
+!> REVISION HISTORY:
+!> 09/13/2017 - Initial Version based on fv_treat_da_inc.F90
!-------------------------------------------------------------------------------
#ifdef OVERLOAD_R4
@@ -54,7 +54,7 @@ module fv_iau_mod
get_var3_r4, &
get_var1_real, check_var_exists
use IPD_typedefs, only: IPD_init_type, IPD_control_type, &
- kind_phys
+ kind_phys => IPD_kind_phys
use block_control_mod, only: block_control_type
use fv_treat_da_inc_mod, only: remap_coef
use tracer_manager_mod, only: get_tracer_names,get_tracer_index, get_number_tracers
diff --git a/atmos_model.F90 b/atmos_model.F90
index aa3527140..3cb2b87cc 100644
--- a/atmos_model.F90
+++ b/atmos_model.F90
@@ -80,14 +80,14 @@ module atmos_model_mod
use block_control_mod, only: block_control_type, define_blocks_packed
use IPD_typedefs, only: IPD_init_type, IPD_control_type, &
IPD_data_type, IPD_diag_type, &
- IPD_restart_type, kind_phys
-use IPD_driver, only: IPD_initialize, IPD_setup_step, &
- IPD_radiation_step, &
- IPD_physics_step1, &
- IPD_physics_step2
+ IPD_restart_type, IPD_kind_phys, &
+ IPD_func0d_proc, IPD_func1d_proc
+use IPD_driver, only: IPD_initialize, IPD_step
+use physics_abstraction_layer, only: time_vary_step, radiation_step1, physics_step1, physics_step2
use FV3GFS_io_mod, only: FV3GFS_restart_read, FV3GFS_restart_write, &
FV3GFS_IPD_checksum, &
- gfdl_diag_register, gfdl_diag_output
+ FV3GFS_diag_register, FV3GFS_diag_output, &
+ DIAG_SIZE
use fv_iau_mod, only: iau_external_data_type,getiauforcing,iau_initialize
!-----------------------------------------------------------------------
@@ -104,26 +104,27 @@ module atmos_model_mod
!
type atmos_data_type
- type (domain2d) :: domain ! domain decomposition
integer :: axes(4) ! axis indices (returned by diag_manager) for the atmospheric grid
! (they correspond to the x, y, pfull, phalf axes)
- real, pointer, dimension(:,:) :: lon_bnd => null() ! local longitude axis grid box corners in radians.
- real, pointer, dimension(:,:) :: lat_bnd => null() ! local latitude axis grid box corners in radians.
- real(kind=kind_phys), pointer, dimension(:,:) :: lon => null() ! local longitude axis grid box centers in radians.
- real(kind=kind_phys), pointer, dimension(:,:) :: lat => null() ! local latitude axis grid box centers in radians.
- type (time_type) :: Time ! current time
- type (time_type) :: Time_step ! atmospheric time step.
- type (time_type) :: Time_init ! reference time.
integer, pointer :: pelist(:) =>null() ! pelist where atmosphere is running.
+ integer :: layout(2) ! computer task laytout
logical :: pe ! current pe.
+ real(kind=8), pointer, dimension(:) :: ak, bk
+ real, pointer, dimension(:,:) :: lon_bnd => null() ! local longitude axis grid box corners in radians.
+ real, pointer, dimension(:,:) :: lat_bnd => null() ! local latitude axis grid box corners in radians.
+ real(kind=IPD_kind_phys), pointer, dimension(:,:) :: lon => null() ! local longitude axis grid box centers in radians.
+ real(kind=IPD_kind_phys), pointer, dimension(:,:) :: lat => null() ! local latitude axis grid box centers in radians.
+ real(kind=IPD_kind_phys), pointer, dimension(:,:) :: dx, dy
+ real(kind=8), pointer, dimension(:,:) :: area
+ real(kind=8), pointer, dimension(:,:,:) :: layer_hgt, level_hgt
+ type(domain2d) :: domain ! domain decomposition
+ type(time_type) :: Time ! current time
+ type(time_type) :: Time_step ! atmospheric time step.
+ type(time_type) :: Time_init ! reference time.
type(grid_box_type) :: grid ! hold grid information needed for 2nd order conservative flux exchange
- ! to calculate gradient on cubic sphere grid.
- integer :: layout(2) ! computer task laytout
- real(kind=8), pointer, dimension(:) :: ak, bk
- real(kind=kind_phys), pointer, dimension(:,:) :: dx, dy
- real(kind=8), pointer, dimension(:,:) :: area
- real(kind=8), pointer, dimension(:,:,:) :: layer_hgt, level_hgt
+ type(IPD_diag_type), pointer, dimension(:) :: Diag
end type atmos_data_type
+ ! to calculate gradient on cubic sphere grid.
!
integer :: fv3Clock, getClock, updClock, setupClock, radClock, physClock
@@ -146,7 +147,7 @@ module atmos_model_mod
!----------------
type(IPD_control_type) :: IPD_Control
type(IPD_data_type), allocatable :: IPD_Data(:) ! number of blocks
-type(IPD_diag_type) :: IPD_Diag(250)
+type(IPD_diag_type), target :: IPD_Diag(DIAG_SIZE)
type(IPD_restart_type) :: IPD_Restart
! IAU container
@@ -191,6 +192,8 @@ subroutine update_atmos_radiation_physics (Atmos)
type (atmos_data_type), intent(in) :: Atmos
!--- local variables---
integer :: nb, jdat(8)
+ procedure(IPD_func0d_proc), pointer :: Func0d => NULL()
+ procedure(IPD_func1d_proc), pointer :: Func1d => NULL()
if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "statein driver"
!--- get atmospheric state from the dynamic core
@@ -218,7 +221,8 @@ subroutine update_atmos_radiation_physics (Atmos)
IPD_Control%jdat(:) = jdat(:)
!--- execute the IPD atmospheric setup step
call mpp_clock_begin(setupClock)
- call IPD_setup_step (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart)
+ Func1d => time_vary_step
+ call IPD_step (IPD_Control, IPD_Data(:), IPD_Diag, IPD_Restart, IPD_func1d=Func1d)
call mpp_clock_end(setupClock)
if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "radiation driver"
@@ -226,12 +230,13 @@ subroutine update_atmos_radiation_physics (Atmos)
!--- execute the IPD atmospheric radiation subcomponent (RRTM)
call mpp_clock_begin(radClock)
+ Func0d => radiation_step1
!$OMP parallel do default (none) &
!$OMP schedule (dynamic,1), &
-!$OMP shared (Atm_block, IPD_Control, IPD_Data, IPD_Diag, IPD_Restart) &
+!$OMP shared (Atm_block, IPD_Control, IPD_Data, IPD_Diag, IPD_Restart, Func0d) &
!$OMP private (nb)
do nb = 1,Atm_block%nblks
- call IPD_radiation_step (IPD_Control, IPD_Data(nb), IPD_Diag, IPD_Restart)
+ call IPD_step (IPD_Control, IPD_Data(nb:nb), IPD_Diag, IPD_Restart, IPD_func0d=Func0d)
enddo
call mpp_clock_end(radClock)
@@ -245,12 +250,13 @@ subroutine update_atmos_radiation_physics (Atmos)
!--- execute the IPD atmospheric physics step1 subcomponent (main physics driver)
call mpp_clock_begin(physClock)
+ Func0d => physics_step1
!$OMP parallel do default (none) &
!$OMP schedule (dynamic,1), &
-!$OMP shared (Atm_block, IPD_Control, IPD_Data, IPD_Diag, IPD_Restart) &
+!$OMP shared (Atm_block, IPD_Control, IPD_Data, IPD_Diag, IPD_Restart, Func0d) &
!$OMP private (nb)
do nb = 1,Atm_block%nblks
- call IPD_physics_step1 (IPD_Control, IPD_Data(nb), IPD_Diag, IPD_Restart)
+ call IPD_step (IPD_Control, IPD_Data(nb:nb), IPD_Diag, IPD_Restart, IPD_func0d=Func0d)
enddo
call mpp_clock_end(physClock)
@@ -264,12 +270,13 @@ subroutine update_atmos_radiation_physics (Atmos)
!--- execute the IPD atmospheric physics step2 subcomponent (stochastic physics driver)
call mpp_clock_begin(physClock)
+ Func0d => physics_step2
!$OMP parallel do default (none) &
!$OMP schedule (dynamic,1), &
-!$OMP shared (Atm_block, IPD_Control, IPD_Data, IPD_Diag, IPD_Restart) &
+!$OMP shared (Atm_block, IPD_Control, IPD_Data, IPD_Diag, IPD_Restart, Func0d) &
!$OMP private (nb)
do nb = 1,Atm_block%nblks
- call IPD_physics_step2 (IPD_Control, IPD_Data(nb), IPD_Diag, IPD_Restart)
+ call IPD_step (IPD_Control, IPD_Data(nb:nb), IPD_Diag, IPD_Restart, IPD_func0d=Func0d)
enddo
call mpp_clock_end(physClock)
@@ -305,7 +312,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
integer :: isc, iec, jsc, jec
integer :: isd, ied, jsd, jed
integer :: blk, ibs, ibe, jbs, jbe
- real(kind=kind_phys) :: dt_phys
+ real(kind=IPD_kind_phys) :: dt_phys
real, allocatable :: q(:,:,:,:), p_half(:,:,:)
character(len=80) :: control
character(len=64) :: filename, filename2, pelist_name
@@ -422,6 +429,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
#endif
call IPD_initialize (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart, Init_parm)
+ Atmos%Diag => IPD_Diag
Atm(mytile)%flagstruct%do_skeb = IPD_Control%do_skeb
@@ -441,7 +449,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
!rab call atmosphere_tracer_postinit (IPD_Data, Atm_block)
call atmosphere_nggps_diag (Time, init=.true.)
- call gfdl_diag_register (Time, IPD_Data(:)%Sfcprop, IPD_Data(:)%Cldprop, IPD_Data(:)%IntDiag, IPD_Data(:)%grid, Atm_block, IPD_Control, Atmos%axes)
+ call FV3GFS_diag_register (IPD_Diag, Time, Atm_block, IPD_Control, Atmos%lon, Atmos%lat, Atmos%axes)
call FV3GFS_restart_read (IPD_Data, IPD_Restart, Atm_block, IPD_Control, Atmos%domain)
!--- set the initial diagnostic timestamp
@@ -524,7 +532,7 @@ subroutine update_atmos_model_state (Atmos)
type (atmos_data_type), intent(inout) :: Atmos
!--- local variables
integer :: isec,seconds
- real(kind=kind_phys) :: time_int, time_intfull
+ real(kind=IPD_kind_phys) :: time_int, time_intfull
call set_atmosphere_pelist()
call mpp_clock_begin(fv3Clock)
@@ -549,7 +557,7 @@ subroutine update_atmos_model_state (Atmos)
time_intfull = real(seconds)
if (mpp_pe() == mpp_root_pe()) write(6,*) ' gfs diags time since last bucket empty: ',time_int/3600.,'hrs'
call atmosphere_nggps_diag(Atmos%Time)
- call gfdl_diag_output(Atmos%Time, Atm_block, IPD_Control%nx, IPD_Control%ny, &
+ call FV3GFS_diag_output(Atmos%Time, IPD_DIag, Atm_block, IPD_Control%nx, IPD_Control%ny, &
IPD_Control%levs, 1, 1, 1.d0, time_int, time_intfull)
if (mod(isec,3600*nint(IPD_Control%fhzero)) == 0) diag_time = Atmos%Time
call diag_send_complete_instant (Atmos%Time)
diff --git a/gfsphysics/GFS_layer/GFS_abstraction_layer.F90 b/gfsphysics/GFS_layer/GFS_abstraction_layer.F90
index b8e6d8907..f4789a528 100644
--- a/gfsphysics/GFS_layer/GFS_abstraction_layer.F90
+++ b/gfsphysics/GFS_layer/GFS_abstraction_layer.F90
@@ -1,5 +1,6 @@
module physics_abstraction_layer
+ use machine, only: kind_phys
use GFS_typedefs, only: init_type => GFS_init_type, &
control_type => GFS_control_type, &
statein_type => GFS_statein_type, &
@@ -12,12 +13,27 @@ module physics_abstraction_layer
radtend_type => GFS_radtend_type, &
intdiag_type => GFS_diag_type
+ use GFS_restart, only: restart_type => GFS_restart_type, &
+ restart_populate => GFS_restart_populate
+
+ use GFS_diagnostics, only: diagnostic_type => GFS_externaldiag_type, &
+ diagnostic_populate => GFS_externaldiag_populate
+
use GFS_driver, only: initialize => GFS_initialize, &
time_vary_step => GFS_time_vary_step, &
radiation_step1 => GFS_radiation_driver, &
physics_step1 => GFS_physics_driver, &
physics_step2 => GFS_stochastic_driver
+ integer :: num_time_vary_steps = 1
+ integer :: num_rad_steps = 1
+ integer :: num_phys_steps = 2
+
+!-------------------------
+! public physics dataspec
+!-------------------------
+ public kind_phys
+
!----------------------
! public physics types
!----------------------
@@ -32,6 +48,15 @@ module physics_abstraction_layer
public cldprop_type
public radtend_type
public intdiag_type
+ public restart_type
+ public diagnostic_type
+
+!------------------
+! public variables
+!------------------
+ public num_time_vary_steps
+ public num_rad_steps
+ public num_phys_steps
!--------------------------
! public physics functions
diff --git a/gfsphysics/GFS_layer/GFS_diagnostics.F90 b/gfsphysics/GFS_layer/GFS_diagnostics.F90
index 498af7525..18a965582 100644
--- a/gfsphysics/GFS_layer/GFS_diagnostics.F90
+++ b/gfsphysics/GFS_layer/GFS_diagnostics.F90
@@ -1,3419 +1,2542 @@
-module physics_diag_layer
-
-!------------------------------------------------------------------------------------------!
-! !
-! This module populates the IPD_Diag container withe the elements from GFS physics that !
-! are to be output via the write component in the NEMS system. The IPD_Diag container !
-! contains properties from the GFS_diag_type, GFS_sfcprop_type and
-! !
-!------------------------------------------------------------------------------------------!
-
- use machine, only: kind_phys
- use IPD_typedefs, only: IPD_diag_type
- use physics_abstraction_layer, only: control_type, statein_type, &
- stateout_type, sfcprop_type, &
- coupling_type, grid_type, &
- tbd_type, cldprop_type, &
- radtend_type, intdiag_type, &
- init_type
-
- public diag_populate
-
+module GFS_diagnostics
+
+!-----------------------------------------------------------------------
+! GFS_diagnostics_mod defines a data type and contains the routine
+! to populate said type with diagnostics from the GFS physics for
+! use by the modeling system for output
+!-----------------------------------------------------------------------
+
+ use machine, only: kind_phys
+
+ !--- GFS_typedefs ---
+ use GFS_typedefs, only: GFS_control_type, GFS_statein_type, &
+ GFS_stateout_type, GFS_sfcprop_type, &
+ GFS_coupling_type, GFS_grid_type, &
+ GFS_tbd_type, GFS_cldprop_type, &
+ GFS_radtend_type, GFS_diag_type, &
+ GFS_init_type
+ implicit none
+ private
+
+ !--- private data type definition ---
+ type data_subtype
+ real(kind=kind_phys), dimension(:), pointer :: var2 => NULL()
+ real(kind=kind_phys), dimension(:), pointer :: var21 => NULL()
+ real(kind=kind_phys), dimension(:,:), pointer :: var3 => NULL()
+ end type data_subtype
+
+ !--- data type definition for use with GFDL FMS diagnostic manager until write component is working
+ type GFS_externaldiag_type
+ integer :: id
+ integer :: axes
+ logical :: time_avg
+ logical :: full_time_avg !no bucket
+ character(len=64) :: mod_name
+ character(len=64) :: name
+ character(len=128) :: desc
+ character(len=64) :: unit
+ character(len=64) :: mask
+ character(len=64) :: intpl_method
+ real(kind=kind_phys) :: cnvfac
+ type(data_subtype), dimension(:), allocatable :: data
+ end type GFS_externaldiag_type
+
+ !--- public data type ---
+ public GFS_externaldiag_type
+
+ !--- public interfaces ---
+ public GFS_externaldiag_populate
+
CONTAINS
-!*******************************************************************************************
-
-!----------------------
-! GFS_populate_IPD_Diag
-!----------------------
- subroutine diag_populate (IPD_Diag, Model, Statein, Stateout, Sfcprop, Coupling, &
- Grid, Tbd, Cldprop, Radtend, Diag, Init_parm)
-!------------------------------------------------------------------------------------------!
-! IPD_METADATA !
-! IPD_Diag%name [char*32 ] variable name in source [char*32] !
-! IPD_Diag%output_name [char*32 ] output name for variable [char*32] !
-! IPD_Diag%mod_name [char*32 ] module name (e.g. physics, radiation, etc) !
-! IPD_Diag%file_name [char*32 ] output file name for variable !
-! IPD_Diag%desc [char*128] long description of field !
-! IPD_Diag%unit [char*32 ] units associated with fields !
-! IPD_Diag%type_stat_proc [char*32 ] type of statistic processing: !
-! average, accumulation, maximal, minimal, etc. !
-! IPD_Diag%level_type [char*32 ] vertical level of the field !
-! IPD_Diag%level [int*4 ] vertical level(s) !
-! IPD_Diag%cnvfac [real*8 ] conversion factors to output in specified units !
-! IPD_Diag%zhour [real*8 ] forecast hour when bucket was last emptied !
-! IPD_Diag%fcst_hour [real*8 ] current forecast hour (same as fhour) !
-! IPD_Diag%data(nb)%var2p(:) [real*8 ] pointer to 2D data [=> null() for a 3D field] !
-! IPD_Diag%data(nb)%var3p(:,:) [real*8 ] pointer to 3D data [=> null() for a 2D field] !
-!------------------------------------------------------------------------------------------!
+
+!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+!-------------------------------------------------------------------------
+!--- GFS_externaldiag_populate ---
+!-------------------------------------------------------------------------
+! creates and populates a data type with GFS physics diagnostic
+! variables which is then handed off to the IPD for use by the model
+! infrastructure layer to output as needed. The data type includes
+! names, units, conversion factors, etc. There is no copying of data,
+! but instead pointers are associated to the internal representation
+! of each individual physics diagnostic.
+!-------------------------------------------------------------------------
+ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop, Coupling, &
+ Grid, Tbd, Cldprop, Radtend, IntDiag, Init_parm)
+!---------------------------------------------------------------------------------------------!
+! DIAGNOSTIC_METADATA !
+! ExtDiag%id [integer ] switch to turn on/off variable output !
+! ExtDiag%axes [integer ] dimensionality of variable (2 or 3) !
+! ExtDiag%time_avg [logical ] bucketed accumulation time average !
+! ExtDiag%full_time_avg [logical ] accumulation time average (no bucket) !
+! ExtDiag%mod_name [char*64 ] classification of the variable !
+! ExtDiag%name [char*64 ] output name for variable !
+! ExtDiag%desc [char*128] long description of field !
+! ExtDiag%unit [char*64 ] units associated with field !
+! ExtDiag%mask [char*64 ] description of mask-type !
+! ExtDiag%intpl_method [char*64 ] method to use for interpolation !
+! ExtDiag%cnvfac [real*8 ] conversion factor to output specified units !
+! ExtDiag%data(nb)%var2(:) [real*8 ] pointer to 2D data [=> null() for a 3D field] !
+! ExtDiag%data(nb)%var21(:) [real*8 ] pointer to 2D data for ratios !
+! ExtDiag%data(nb)%var3(:,:) [real*8 ] pointer to 3D data [=> null() for a 2D field] !
+!---------------------------------------------------------------------------------------------!
implicit none
!
! --- interface variables
- type(IPD_diag_type), intent(inout) :: IPD_Diag(:)
- type(control_type), intent(in) :: Model
- type(statein_type), intent(in) :: Statein(:)
- type(stateout_type), intent(in) :: Stateout(:)
- type(sfcprop_type), intent(in) :: Sfcprop(:)
- type(coupling_type), intent(in) :: Coupling(:)
- type(grid_type), intent(in) :: Grid(:)
- type(tbd_type), intent(in) :: Tbd(:)
- type(cldprop_type), intent(in) :: Cldprop(:)
- type(radtend_type), intent(in) :: Radtend(:)
- type(intdiag_type), intent(in) :: Diag(:)
- type(init_type), intent(in) :: Init_parm
-
- !--- local variabls
- integer :: idx, nblks, nb, num
+ type(GFS_externaldiag_type), intent(inout) :: ExtDiag(:)
+ type(GFS_control_type), intent(in) :: Model
+ type(GFS_statein_type), intent(in) :: Statein(:)
+ type(GFS_stateout_type), intent(in) :: Stateout(:)
+ type(GFS_sfcprop_type), intent(in) :: Sfcprop(:)
+ type(GFS_coupling_type), intent(in) :: Coupling(:)
+ type(GFS_grid_type), intent(in) :: Grid(:)
+ type(GFS_tbd_type), intent(in) :: Tbd(:)
+ type(GFS_cldprop_type), intent(in) :: Cldprop(:)
+ type(GFS_radtend_type), intent(in) :: Radtend(:)
+ type(GFS_diag_type), intent(in) :: IntDiag(:)
+ type(GFS_init_type), intent(in) :: Init_parm
+
+!--- local variables
+ integer :: idx, num, nb, nblks, NFXR
+ character(len=2) :: xtra
real(kind=kind_phys), parameter :: cn_one = 1._kind_phys
real(kind=kind_phys), parameter :: cn_100 = 100._kind_phys
real(kind=kind_phys), parameter :: cn_th = 1000._kind_phys
real(kind=kind_phys), parameter :: cn_hr = 3600._kind_phys
- real(kind=kind_phys), pointer :: var1(:) => null()
-
- nblks = size(Init_parm%blksz)
-
- !--- initialize GFS_diag
- IPD_Diag(:)%name = ' '
- IPD_Diag(:)%output_name = ' '
- IPD_Diag(:)%mod_name = ' '
- IPD_Diag(:)%file_name = ' '
- IPD_Diag(:)%desc = ' '
- IPD_Diag(:)%unit = ' '
- IPD_Diag(:)%type_stat_proc = ' '
- IPD_Diag(:)%level_type = ' '
- IPD_Diag(:)%level = 1
- IPD_Diag(:)%cnvfac = cn_one
- IPD_Diag(:)%zhour = Model%zhour
- IPD_Diag(:)%fcst_hour = Model%fhour
- do idx = 1,size(IPD_Diag,1)
- allocate (IPD_Diag(idx)%data(nblks))
- enddo
-
- idx = 0
-
- ! IPD DIAG CONTAINER DATA
- !--- FLUXR
- !--- This data array contains 33 fields including radiation flux,
- !--- cloud cover, pressure and many other fields, suggest to
- !--- split into 2D fields:
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr'
- IPD_Diag(idx)%output_name = ' '
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'flux from radiation'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = ' '
- IPD_Diag(idx)%level = Model%nfxr
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%fluxr
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr1'
- IPD_Diag(idx)%output_name = 'ulwrf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Upward long wave radiation flux at top of atmosphere'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'top_of_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,1)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr2'
- IPD_Diag(idx)%output_name = 'uswrf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Upward solar radiation flux at top of atmosphere'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'top_of_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,2)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr3'
- IPD_Diag(idx)%output_name = 'uswrf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Upward solar radiation flux at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,3)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr4'
- IPD_Diag(idx)%output_name = 'dswrf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Downward solar radiation flux at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,4)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr5'
- IPD_Diag(idx)%output_name = 'tcdc'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Total cloud cover at high cloud layer'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'high_cloud_lyr'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,5)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr6'
- IPD_Diag(idx)%output_name = 'tcdc'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Total cloud cover at middle cloud layer'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'mid_cloud_lyr'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,6)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr7'
- IPD_Diag(idx)%output_name = 'tcdc'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Total cloud cover at low cloud layer'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'low_cloud_lyr'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,7)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr8'
- IPD_Diag(idx)%output_name = 'pres'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Pressure at high cloud top level'
- IPD_Diag(idx)%unit = 'pa'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtimsw'
- IPD_Diag(idx)%level_type = 'high_cloud_top_lvl'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,8)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr9'
- IPD_Diag(idx)%output_name = 'pres'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Pressure at middle cloud top level'
- IPD_Diag(idx)%unit = 'pa'
- IPD_Diag(idx)%type_stat_proc = 'acc_cloud'
- IPD_Diag(idx)%level_type = 'mid_cloud_top_lvl'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,9)
- enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr10'
- IPD_Diag(idx)%output_name = 'pres'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Pressure at low cloud top level'
- IPD_Diag(idx)%unit = 'pa'
- IPD_Diag(idx)%type_stat_proc = 'acc_cloud'
- IPD_Diag(idx)%level_type = 'low_cloud_top_lvl'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,10)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr11'
- IPD_Diag(idx)%output_name = 'pres'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Pressure at high cloud bottom level'
- IPD_Diag(idx)%unit = 'pa'
- IPD_Diag(idx)%type_stat_proc = 'acc_cloud'
- IPD_Diag(idx)%level_type = 'high_cloud_bot_lvl'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,11)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr12'
- IPD_Diag(idx)%output_name = 'pres'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Pressure at middle cloud bottom level'
- IPD_Diag(idx)%unit = 'pa'
- IPD_Diag(idx)%type_stat_proc = 'acc_cloud'
- IPD_Diag(idx)%level_type = 'mid_cloud_bot_lvl'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,12)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr13'
- IPD_Diag(idx)%output_name = 'pres'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Pressure at low cloud bot level'
- IPD_Diag(idx)%unit = 'pa'
- IPD_Diag(idx)%type_stat_proc = 'acc_cloud'
- IPD_Diag(idx)%level_type = 'low_cloud_bot_lvl'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,13)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr14'
- IPD_Diag(idx)%output_name = 'tmp'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Temperature at high cloud top level'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'acc_cloud'
- IPD_Diag(idx)%level_type = 'high_cloud_top_lvl'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,14)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr15'
- IPD_Diag(idx)%output_name = 'tmp'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Temperature at middle cloud top level'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'acc_cloud'
- IPD_Diag(idx)%level_type = 'mid_cloud_top_lvl'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,15)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr16'
- IPD_Diag(idx)%output_name = 'tmp'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Temperature at low cloud top level'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'acc_cloud'
- IPD_Diag(idx)%level_type = 'low_cloud_top_lvl'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,16)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr17'
- IPD_Diag(idx)%output_name = 'tcdc'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Total cloud cover at total atmospheric column'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'entire_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,17)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr18'
- IPD_Diag(idx)%output_name = 'tcdc'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Total cloud cover (precent) at boundary layer cloud layer'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'bound_lyr_cloud_lyr'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,18)
- enddo
-
- !--- fluxr19 and fluxr20 are replaced with the surface temperature
- ! adjusted quantities for output
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr21'
- IPD_Diag(idx)%output_name = 'duvb'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'UV-B downward solar flux (w/m**2) at land sea surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,21)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr22'
- IPD_Diag(idx)%output_name = 'cduvb'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Clear sky UV-B downward solar flux (w/m**2) at land sea surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,22)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr23'
- IPD_Diag(idx)%output_name = 'dswrf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Downward solar radiation flux (w/m**2) at top of atmosphere'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'top_of_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
-
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,23)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr24'
- IPD_Diag(idx)%output_name = 'vbdsf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Downward sw uv+vis beam radiation flux (w/m**2) at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'surfaces'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,24)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr25'
- IPD_Diag(idx)%output_name = 'vddsf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Downward sw uv+vis diffuse radiation flux (w/m**2) at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'surfaces'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,25)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr26'
- IPD_Diag(idx)%output_name = 'nbdsf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Downward sw nir beam radiation flux (w/m**2) at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'surfaces'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,26)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr27'
- IPD_Diag(idx)%output_name = 'nddsf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Downward sw nir diffuse radiation flux (w/m**2) at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_timsw'
- IPD_Diag(idx)%level_type = 'surfaces'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,27)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr28'
- IPD_Diag(idx)%output_name = 'csulf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Clear sky upward long wave radiation flux (w/m**2) at top of atmosphere'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'top_of_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,28)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr29'
- IPD_Diag(idx)%output_name = 'csusf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Clear sky upward solar radiation flux (w/m**2) at top of atmosphere'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtimer'
- IPD_Diag(idx)%level_type = 'top_of_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,29)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr30'
- IPD_Diag(idx)%output_name = 'csdlf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Clear sky downward long wave radiation flux (w/m**2) at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtimer'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,30)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr31'
- IPD_Diag(idx)%output_name = 'csusf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Clear sky upward solar radiation flux (w/m**2) at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtimer'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,31)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr32'
- IPD_Diag(idx)%output_name = 'csdsf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Clear sky downward solar radiation flux (w/m**2) at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtimer'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,32)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'fluxr33'
- IPD_Diag(idx)%output_name = 'csulf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Clear sky upward long wave radiation flux (w/m**2) at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtimer'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%fluxr(:,33)
- enddo
- !--- done with FLUXR
-
- !--- dlwsfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'dlwsfc'
- IPD_Diag(idx)%output_name = 'dlwrf'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'downward longwave flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dlwsfc
- enddo
-!---need to convert to "ave" for output??
-
- !---ulwsfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'ulwsfc'
- IPD_Diag(idx)%output_name = 'ulwrf'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'upward long wave flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%ulwsfc
- enddo
-!--- need to convert to "ave" for output??
-
- ! COUPLING FIELDS
- !---nirbmdi
- idx = idx + 1
- IPD_Diag(idx)%name = 'nirbmdi'
- IPD_Diag(idx)%output_name = 'nbdsf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Downward short wave nir beam radiation flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'Inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Coupling(nb)%nirbmdi
- enddo
-
- !---nirdfdi
- idx = idx + 1
- IPD_Diag(idx)%name = 'nirdfdi'
- IPD_Diag(idx)%output_name = 'nddsf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Downward short wave nir diffuse radiation flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'Inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Coupling(nb)%nirdfdi
- enddo
-!--- need to convert to "ave" for output
-
- !---visbmdi
- idx = idx + 1
- IPD_Diag(idx)%name = 'visbmdi'
- IPD_Diag(idx)%output_name = 'vbdsf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'Downward short wave uv+vis beam radiation flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Coupling(nb)%visbmdi
- enddo
-
- !---visdfdi
- idx = idx + 1
- IPD_Diag(idx)%name = 'visdfdi'
- IPD_Diag(idx)%output_name = 'vddsf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'cpl '
- IPD_Diag(idx)%desc = 'Downward short wave uv+vis diffuse radiation flux [W/m**2] at surface '
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Coupling(nb)%visdfdi
- enddo
-
- !---nirbmui
- idx = idx + 1
- IPD_Diag(idx)%name = 'nirbmui'
- IPD_Diag(idx)%output_name = 'nbusf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'Upward short wave nir beam radiation flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Coupling(nb)%nirbmui
- enddo
-
- !---nirdfui
- idx = idx + 1
- IPD_Diag(idx)%name = 'nirdfui'
- IPD_Diag(idx)%output_name = 'ndusf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'Upward short wave nir beam radiation flux [W/m**2] at surface '
- IPD_Diag(idx)%unit = ' '
- IPD_Diag(idx)%type_stat_proc = ' '
- IPD_Diag(idx)%level_type = ' '
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Coupling(nb)%nirdfui
- enddo
-
- !---visbmui
- idx = idx + 1
- IPD_Diag(idx)%name = 'visbmui'
- IPD_Diag(idx)%output_name = 'vbusf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'Upward short wave uv+vis beam radiation flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = ' '
- IPD_Diag(idx)%type_stat_proc = ' '
- IPD_Diag(idx)%level_type = ' '
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Coupling(nb)%visbmui
- enddo
-
- !---visdfui
- idx = idx + 1
- IPD_Diag(idx)%name = 'visdfui'
- IPD_Diag(idx)%output_name = 'vdusf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'Upward short wave uv+vis diffuse radiation flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'w/m**2 '
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Coupling(nb)%visdfui
- enddo
- ! END COUPLING FIELDS
-
- !---topfsw%upfxc
- idx = idx + 1
- IPD_Diag(idx)%name = 'sw_upfxc'
- IPD_Diag(idx)%output_name = 'uswrf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'upward solar radiation flux [w/m**2] at top of atmosphere'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'top_of_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%topfsw(:)%upfxc
- enddo
-
- !---topfsw%dnfxc
- idx = idx + 1
- IPD_Diag(idx)%name = 'sw_dnfxc'
- IPD_Diag(idx)%output_name = 'dswrf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'downward solar radiation flux [w/m**2] at top of atmosphere'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'top_of_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%topfsw(:)%dnfxc
- enddo
-
- !---topfsw%upfx0
- idx = idx + 1
- IPD_Diag(idx)%name = 'sw_upfx0'
- IPD_Diag(idx)%output_name = 'csusf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'Clear sky upward solar radiation flux [w/m**2] at top of atmosphere'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'top_of_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%topfsw(:)%upfx0
- enddo
-
- !---topflw%upfxc
- idx = idx + 1
- IPD_Diag(idx)%name = 'lw_upfxc'
- IPD_Diag(idx)%output_name = 'ulwrf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'upward long wave radiation flux [w/m**2] at top of atmosphere '
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'top_of_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%topflw(:)%upfxc
- enddo
-
-!--- clear sky down long wave is missing?
-
- !---topflw%upfx0
- idx = idx + 1
- IPD_Diag(idx)%name = 'lw_upfx0'
- IPD_Diag(idx)%output_name = 'csulf'
- IPD_Diag(idx)%mod_name = 'radiation'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'Clear sky upward long wave radiation flux [w/m**2] at top of atmosphere '
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'top_of_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%topflw(:)%upfx0
- enddo
-
- !---srunoff
- idx = idx + 1
- IPD_Diag(idx)%name = 'srunoff'
- IPD_Diag(idx)%output_name = 'ssrun'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'storm water runoff [kg/m**2] at surface'
- IPD_Diag(idx)%unit = 'kg/m**2 '
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = 1.e3
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%srunoff
- enddo
-
- !---evbsa
- idx = idx + 1
- IPD_Diag(idx)%name = 'evbsa'
- IPD_Diag(idx)%output_name = 'EVBSA'
- IPD_Diag(idx)%mod_name = 'land'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Direct Evaporation [w/m**2] from Bare Soil'
- IPD_Diag(idx)%unit = 'w/m**2 '
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%evbsa
- enddo
-
- !---evcwa
- idx = idx + 1
- IPD_Diag(idx)%name = 'evcwa'
- IPD_Diag(idx)%output_name = 'evcw'
- IPD_Diag(idx)%mod_name = 'land'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Canopy water evaporation'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'surface '
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%evcwa
- enddo
-
- !---snohfa
- idx = idx + 1
- IPD_Diag(idx)%name = 'snohfa'
- IPD_Diag(idx)%output_name = 'snohf'
- IPD_Diag(idx)%mod_name = 'land'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Snow Phase Change Heat Flux [w/m**2] at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%snohfa
- enddo
-
- !---snowca
- idx = idx + 1
- IPD_Diag(idx)%name = 'snowca'
- IPD_Diag(idx)%output_name = 'snowc'
- IPD_Diag(idx)%mod_name = 'land'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Snow cover (fraction) at surface'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%snowca
- enddo
-
- !---sbsnoa
- idx = idx + 1
- IPD_Diag(idx)%name = 'sbsnoa'
- IPD_Diag(idx)%output_name = 'sbsno'
- IPD_Diag(idx)%mod_name = 'land'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Snow sublimation [w/m^2] at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%sbsnoa
- enddo
-
- !---transa
- idx = idx + 1
- IPD_Diag(idx)%name = 'transa'
- IPD_Diag(idx)%output_name = 'trans'
- IPD_Diag(idx)%mod_name = 'land'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Transpiration [w/m**2] at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%transa
- enddo
-
- !---soilm
- idx = idx + 1
- IPD_Diag(idx)%name = 'soilm'
- IPD_Diag(idx)%output_name = 'soilm'
- IPD_Diag(idx)%mod_name = 'land'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'total column soil moisture content [kg/m**2] at surface'
- IPD_Diag(idx)%unit = 'kg/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'soil layer'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_th
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%soilm
- enddo
-
- !---tmpmin
- idx = idx + 1
- IPD_Diag(idx)%name = 'tmpmin'
- IPD_Diag(idx)%output_name = 'tmin'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'minimum temperature at 2 m above ground'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'min'
- IPD_Diag(idx)%level_type = '2 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%tmpmin
- enddo
-
- !---tmpmax
- idx = idx + 1
- IPD_Diag(idx)%name = 'tmpmax'
- IPD_Diag(idx)%output_name = 'tmax'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'maximum temperature at 2 m above ground'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'max'
- IPD_Diag(idx)%level_type = '2 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%tmpmax
- enddo
-
- !---dusfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'dusfc'
- IPD_Diag(idx)%output_name = 'uflx'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Zonal momentum flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dusfc
- enddo
-
- !---dvsfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'dvsfc'
- IPD_Diag(idx)%output_name = 'vflx'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'meridional momentum flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dvsfc
- enddo
-
- !---dtsfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'dtsfc'
- IPD_Diag(idx)%output_name = 'shtfl'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'surface sensible heat flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dtsfc
- enddo
-
- !---dqsfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'dqsfc'
- IPD_Diag(idx)%output_name = 'lhtfl '
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'surface latent heat flux [W/m**2]'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dqsfc
- enddo
-
- !---totprcp
- idx = idx + 1
- IPD_Diag(idx)%name = 'totprcp'
- IPD_Diag(idx)%output_name = 'prate'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'precipitation rate [kg/m**2/s] at surface'
- IPD_Diag(idx)%unit = 'kg/m**2/s'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%totprcp
- enddo
-
- !---gflux
- idx = idx + 1
- IPD_Diag(idx)%name = 'gflux'
- IPD_Diag(idx)%output_name = 'gflux'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'ground heat flux [W/m**2/s] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%gflux
- enddo
-
- !---dlwsfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'dlwsfc'
- IPD_Diag(idx)%output_name = 'dlwrf'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Time accumulated downward long wave radiation flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dlwsfc
- enddo
-
- !---ulwsfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'ulwsfc'
- IPD_Diag(idx)%output_name = 'ulwrf'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'time accumulated upward lw flux at surface [W/m**2]'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'accumulation'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%ulwsfc
- enddo
-
- !---suntim
- idx = idx + 1
- IPD_Diag(idx)%name = 'suntim'
- IPD_Diag(idx)%output_name = 'sunsd'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Accumulated sunshine duration time [s]'
- IPD_Diag(idx)%unit = 's'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%suntim
- enddo
-
- !---runoff
- idx = idx + 1
- IPD_Diag(idx)%name = 'runoff'
- IPD_Diag(idx)%output_name = 'RUNOFF'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'total water runoff [kg/m**2] at surface'
- IPD_Diag(idx)%unit = 'kg/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_th
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%runoff
- enddo
-
- !---ep
- idx = idx + 1
- IPD_Diag(idx)%name = 'ep'
- IPD_Diag(idx)%output_name = 'pevpr'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Potential evaporation rate [w/m**2] at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%ep
- enddo
-
- !---cldwrk
- idx = idx + 1
- IPD_Diag(idx)%name = 'cldwrk'
- IPD_Diag(idx)%output_name = 'cwork'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'cloud work function (valid only with SAS) [J/kg] at total atmospheric column'
- IPD_Diag(idx)%unit = 'J/kg'
- IPD_Diag(idx)%type_stat_proc = 'acc '
- IPD_Diag(idx)%level_type = 'rntire_atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%cldwrk
- enddo
-
- !---dugwd
- idx = idx + 1
- IPD_Diag(idx)%name = 'dugwd'
- IPD_Diag(idx)%output_name = 'u-gwd'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Zonal gravity wave stress [N/m**2] at surface'
- IPD_Diag(idx)%unit = 'N/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dugwd
- enddo
-
- !---dvgwd
- idx = idx + 1
- IPD_Diag(idx)%name = 'dvgwd'
- IPD_Diag(idx)%output_name = 'v-gwd'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Meridional gravity wave stress [N/m**2] at surface'
- IPD_Diag(idx)%unit = 'N/m**2'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dvgwd
- enddo
-
- !---psmean
- idx = idx + 1
- IPD_Diag(idx)%name = 'psmean'
- IPD_Diag(idx)%output_name = 'pres'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'time accumulation surface pressure [kPa*s]'
- IPD_Diag(idx)%unit = 'kPa*s'
- IPD_Diag(idx)%type_stat_proc = 'acc'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%psmean
- enddo
-
- !---cnvprcp
- idx = idx + 1
- IPD_Diag(idx)%name = 'cnvprcp'
- IPD_Diag(idx)%output_name = 'cprat'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'convective precipitation rate [kg/m**2/s] at surface'
- IPD_Diag(idx)%unit = 'kg/m**2/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%cnvprcp
- enddo
-
- !---spfhmin
- idx = idx + 1
- IPD_Diag(idx)%name = 'spfhmin'
- IPD_Diag(idx)%output_name = 'spfhmin'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'minimum specific humidity [kg/kg] at 2 m above ground'
- IPD_Diag(idx)%unit = 'kg/kg '
- IPD_Diag(idx)%type_stat_proc = 'min'
- IPD_Diag(idx)%level_type = '2 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%spfhmin
- enddo
-
- !---spfhmax
- idx = idx + 1
- IPD_Diag(idx)%name = 'spfhmaxn'
- IPD_Diag(idx)%output_name = 'spfhmax'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'maximum specific humidity [kg/kg] at 2 m above ground'
- IPD_Diag(idx)%unit = 'kg/kg'
- IPD_Diag(idx)%type_stat_proc = 'max'
- IPD_Diag(idx)%level_type = '2 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%spfhmax
- enddo
-
- !---u10mmax
- idx = idx + 1
- IPD_Diag(idx)%name = 'u10mmaxn'
- IPD_Diag(idx)%output_name = 'u10mmax'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'maximum u-wind speed (m/s) at 10 m above ground'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'max'
- IPD_Diag(idx)%level_type = '10 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%u10mmax
- enddo
-
- !---v10mmax
- idx = idx + 1
- IPD_Diag(idx)%name = 'v10mmaxn'
- IPD_Diag(idx)%output_name = 'v10mmax'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'maximum v-wind speed (m/s) at 10 m above ground'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'max'
- IPD_Diag(idx)%level_type = '10 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%v10mmax
- enddo
-
- !---wind10mmax
- idx = idx + 1
- IPD_Diag(idx)%name = 'wind10mmaxn'
- IPD_Diag(idx)%output_name = 'wind10mmax'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'maximum wind speed (m/s) at 10 m above ground'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'max'
- IPD_Diag(idx)%level_type = '10 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%wind10mmax
- enddo
-
- !---rain
- idx = idx + 1
- IPD_Diag(idx)%name = 'rain'
- IPD_Diag(idx)%output_name = 'APCP'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'instantaneous total precipitation [m] at surface'
- IPD_Diag(idx)%unit = 'm'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%rain
- enddo
-
- !---rainc
- idx = idx + 1
- IPD_Diag(idx)%name = 'rainc'
- IPD_Diag(idx)%output_name = 'ACPCP'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'instantaneous convective precipitation [m] at surface'
- IPD_Diag(idx)%unit = 'm'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%rainc
- enddo
-
- !---ice
- idx = idx + 1
- IPD_Diag(idx)%name = 'ice'
- IPD_Diag(idx)%output_name = 'ICE'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'instantaneous ice fall'
- IPD_Diag(idx)%unit = ' '
- IPD_Diag(idx)%type_stat_proc = ' '
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%ice
- enddo
-
- !---snow
- idx = idx + 1
- IPD_Diag(idx)%name = 'snow'
- IPD_Diag(idx)%output_name = 'SNOW'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'instantaneous snow fall'
- IPD_Diag(idx)%unit = ' '
- IPD_Diag(idx)%type_stat_proc = ' '
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%snow
- enddo
-
- !---graupel
- idx = idx + 1
- IPD_Diag(idx)%name = 'graupel'
- IPD_Diag(idx)%output_name = 'GRAUPEL'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'instantaneous graupel fall'
- IPD_Diag(idx)%unit = ' '
- IPD_Diag(idx)%type_stat_proc = ' '
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%graupel
- enddo
-
- !---totice
- idx = idx + 1
- IPD_Diag(idx)%name = 'totice'
- IPD_Diag(idx)%output_name = 'TOTICE'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'surface ice precipitation rate [kg/m**2/s]'
- IPD_Diag(idx)%unit = 'kg/m**2/s'
- IPD_Diag(idx)%type_stat_proc = 'accumulation'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%totice
- enddo
-
- !---totsnw
- idx = idx + 1
- IPD_Diag(idx)%name = 'totsnw'
- IPD_Diag(idx)%output_name = 'TOTSNW'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'surface snow precipitation rate [kg/m**2/s]'
- IPD_Diag(idx)%unit = 'kg/m**2/s'
- IPD_Diag(idx)%type_stat_proc = 'accumulation'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%totsnw
- enddo
-
- !---totgrp
- idx = idx + 1
- IPD_Diag(idx)%name = 'totgrp'
- IPD_Diag(idx)%output_name = 'TOTGRP'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'surface graupel precipitation rate [kg/m**2/s]'
- IPD_Diag(idx)%unit = 'kg/m**2/s'
- IPD_Diag(idx)%type_stat_proc = 'accumulation'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one/cn_hr
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%totgrp
- enddo
-
- !---u10m
- idx = idx + 1
- IPD_Diag(idx)%name = 'u10m'
- IPD_Diag(idx)%output_name = 'ugrd'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'u wind component [m/s] at 10 m abover ground'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '10 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%u10m
- enddo
-
- !---v10m
- idx = idx + 1
- IPD_Diag(idx)%name = 'v10m'
- IPD_Diag(idx)%output_name = 'vgrd'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'v wind component [m/s] at 10 m above ground'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '10 m above ground'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%v10m
- enddo
-
- !---dpt2m
- idx = idx + 1
- IPD_Diag(idx)%name = 'dpt2m'
- IPD_Diag(idx)%output_name = 'dpt'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'Dew point temperature [K] at 2 m above ground'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '2 m above ground'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dpt2m
- enddo
-
- !---zlvl
- idx = idx + 1
- IPD_Diag(idx)%name = 'zlvl'
- IPD_Diag(idx)%output_name = 'hgt'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'height [m] at model layer 1'
- IPD_Diag(idx)%unit = 'm'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%zlvl
- enddo
-
- !---psurf
- idx = idx + 1
- IPD_Diag(idx)%name = 'psurf'
- IPD_Diag(idx)%output_name = 'pres'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'surface pressure [Pa]'
- IPD_Diag(idx)%unit = 'Pa'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%psurf
- enddo
-
- !---hpbl
- idx = idx + 1
- IPD_Diag(idx)%name = 'hpbl'
- IPD_Diag(idx)%output_name = 'HPBL'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'surface planetary boundary layer height [m]'
- IPD_Diag(idx)%unit = 'm'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%hpbl
- enddo
-
- !---pwat
- idx = idx + 1
- IPD_Diag(idx)%name = 'pwat'
- IPD_Diag(idx)%output_name = 'pwat'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'atmos column precipitable water [kg/m**2]'
- IPD_Diag(idx)%unit = 'kg/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'entire atmos'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%pwat
- enddo
-
- !---t1
- idx = idx + 1
- IPD_Diag(idx)%name = 't1'
- IPD_Diag(idx)%output_name = 'tmp'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Temperature [K] at model layer 1'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'model lyaer'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%t1
- enddo
-
- !---q1
- idx = idx + 1
- IPD_Diag(idx)%name = 'q1'
- IPD_Diag(idx)%output_name = 'spfh'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'specific humidity [kg/kg] sy model layer 1'
- IPD_Diag(idx)%unit = 'kg/kg'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%q1
- enddo
-
- !---u1
- idx = idx + 1
- IPD_Diag(idx)%name = 'u1'
- IPD_Diag(idx)%output_name = 'ugrd'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'layer 1 zonal wind [m/s] at model ayer 1'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%u1
- enddo
-
- !---v1
- idx = idx + 1
- IPD_Diag(idx)%name = 'v1'
- IPD_Diag(idx)%output_name = 'vgrd'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'meridional wind [m/s] at model ayer 1'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%v1
- enddo
-
- !---chh
- idx = idx + 1
- IPD_Diag(idx)%name = 'chh'
- IPD_Diag(idx)%output_name = 'CHH'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'thermal exchange coefficient'
- IPD_Diag(idx)%unit = 'kg/m**2/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%chh
- enddo
-
- !---cmm
- idx = idx + 1
- IPD_Diag(idx)%name = 'cmm'
- IPD_Diag(idx)%output_name = 'CMM'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'momentum exchange coefficient'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = ' '
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%cmm
- enddo
-
- !---dlwsfci
- idx = idx + 1
- IPD_Diag(idx)%name = 'dlwsfci'
- IPD_Diag(idx)%output_name = 'dlwrf'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'instantaneous downward lw flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dlwsfci
- enddo
-
- !---ulwsfci
- idx = idx + 1
- IPD_Diag(idx)%name = 'ulwsfci'
- IPD_Diag(idx)%output_name = 'ulwrf'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'instantaneous upward lw flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%ulwsfci
- enddo
-
- !---dswsfci
- idx = idx + 1
- IPD_Diag(idx)%name = 'dswsfci'
- IPD_Diag(idx)%output_name = 'dswrf'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'instantaneous downward sw flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dswsfci
- enddo
-
- !---uswsfci
- idx = idx + 1
- IPD_Diag(idx)%name = 'uswsfci'
- IPD_Diag(idx)%output_name = 'uswrf'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'instantaneous upward sw flux [W/m**2] at surface'
- IPD_Diag(idx)%unit = 'W/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%uswsfci
- enddo
-
- !---dusfci
- idx = idx + 1
- IPD_Diag(idx)%name = 'dusfci'
- IPD_Diag(idx)%output_name = 'uflx'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'instantaneous Zonal compt of momentum flux at surface'
- IPD_Diag(idx)%unit = 'n/m**2 '
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dusfci
- enddo
-
- !---dvsfci
- idx = idx + 1
- IPD_Diag(idx)%name = 'dvsfci'
- IPD_Diag(idx)%output_name = 'vflx'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'instantaneous v component of surface stress'
- IPD_Diag(idx)%unit = 'n/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dvsfci
- enddo
-
- !---dtsfci
- idx = idx + 1
- IPD_Diag(idx)%name = 'dtsfci'
- IPD_Diag(idx)%output_name = 'shtfl'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'instantaneous surface sensible heat flux [w/m**2] at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dtsfci
- enddo
-
- !---dqsfci
- idx = idx + 1
- IPD_Diag(idx)%name = 'dqsfci'
- IPD_Diag(idx)%output_name = 'lhtfl'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'instantaneous latent heat flux [w/m**2] at surface'
- IPD_Diag(idx)%unit = 'w/m**2 '
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%dqsfci
- enddo
-
- !---gfluxi
- idx = idx + 1
- IPD_Diag(idx)%name = 'gfluxi'
- IPD_Diag(idx)%output_name = 'gflux'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'instantaneous ground heat flux [w/m**2]at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%gfluxi
- enddo
-
- !---epi
- idx = idx + 1
- IPD_Diag(idx)%name = 'epi'
- IPD_Diag(idx)%output_name = 'pevpr'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'cpl'
- IPD_Diag(idx)%desc = 'instantaneous potential evaporation rate (w/m**2) at surface'
- IPD_Diag(idx)%unit = 'w/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc '
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%epi
- enddo
-
- !---smcwlt2
- idx = idx + 1
- IPD_Diag(idx)%name = 'smcwlt2'
- IPD_Diag(idx)%output_name = 'wilt'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'wilting point (proportion) at surface'
- IPD_Diag(idx)%unit = 'proportion '
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%smcwlt2
- enddo
-
- !---smcref2'
- idx = idx + 1
- IPD_Diag(idx)%name = 'smcref2'
- IPD_Diag(idx)%output_name = 'SMCREF2'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Field capacity (fraction) at surface'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%smcref2
- enddo
-
- !---wet1
- idx = idx + 1
- IPD_Diag(idx)%name = 'wet1'
- IPD_Diag(idx)%output_name = 'WET1'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'gocart_cpl '
- IPD_Diag(idx)%desc = 'normalized top soil layer wetness [frqaction]'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'soil layer'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%wet1
- enddo
-
- !---sr
- idx = idx + 1
- IPD_Diag(idx)%name = 'sr'
- IPD_Diag(idx)%output_name = 'cpofp'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Frozen precipitation fraction'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%sr
- enddo
-
- if (Model%ldiag3d) then
- !---dt3dt
- idx = idx + 1
- IPD_Diag(idx)%name = 'dt3dt1'
- IPD_Diag(idx)%output_name = 'LWHR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Long wave radiative heating rate [K/s] at model layers '
- IPD_Diag(idx)%unit = 'K/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dt3dt(:,:,1)
- enddo
+ NFXR = Model%NFXR
+ nblks = size(Statein)
- idx = idx + 1
- IPD_Diag(idx)%name = 'dt3dt2'
- IPD_Diag(idx)%output_name = 'SWHR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Short wave radiative heating rate [K/s] at model layers '
- IPD_Diag(idx)%unit = 'K/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dt3dt(:,:,2)
- enddo
+ ExtDiag(:)%id = -99
+ ExtDiag(:)%axes = -99
+ ExtDiag(:)%cnvfac = cn_one
+ ExtDiag(:)%time_avg = .FALSE.
+ ExtDiag(:)%full_time_avg = .FALSE.
+ ExtDiag(:)%mask = ''
+ ExtDiag(:)%name = ''
+ ExtDiag(:)%intpl_method = 'nearest_stod'
- idx = idx + 1
- IPD_Diag(idx)%name = 'dt3dt3'
- IPD_Diag(idx)%output_name = 'VDFHR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Vertical diffusion heating rate [K/s] at model layers '
- IPD_Diag(idx)%unit = 'K/s'
- IPD_Diag(idx)%type_stat_proc = 'amm_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dt3dt(:,:,3)
- enddo
+ idx = 0
- idx = idx + 1
- IPD_Diag(idx)%name = 'dt3dt4'
- IPD_Diag(idx)%output_name = 'CNVHR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Deep convective heating rate [K/s] at model layers '
- IPD_Diag(idx)%unit = 'K/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dt3dt(:,:,4)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ALBDO_ave'
+ ExtDiag(idx)%desc = 'surface albedo'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_100
+ ExtDiag(idx)%mask = 'positive_flux'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,3)
+ ExtDiag(idx)%data(nb)%var21 => IntDiag(nb)%fluxr(:,4)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dt3dt5'
- IPD_Diag(idx)%output_name = 'SHAHR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Shallow convective heating rate [K/s] at model layers '
- IPD_Diag(idx)%unit = 'K/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dt3dt(:,:,5)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'DLWRF'
+ ExtDiag(idx)%desc = 'surface downward longwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dlwsfc(:)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dt3dt6'
- IPD_Diag(idx)%output_name = 'LRGHR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Large scale condensate heat rate [K/s] at model layers '
- IPD_Diag(idx)%unit = 'K/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dt3dt(:,:,6)
- enddo
-
- !---dq3dt
- idx = idx + 1
- IPD_Diag(idx)%name = 'dq3dt1'
- IPD_Diag(idx)%output_name = 'VDFMR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Vertical diffusion moistening rate [kg/kg/s] at model layers'
- IPD_Diag(idx)%unit = 'kg/kg/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dq3dt(:,:,1)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'DLWRFI'
+ ExtDiag(idx)%desc = 'instantaneous surface downward longwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dlwsfci(:)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dq3dt2'
- IPD_Diag(idx)%output_name = 'CNVMR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Deep convective moistening rate [kg/kg/s] at model layers'
- IPD_Diag(idx)%unit = 'kg/kg/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dq3dt(:,:,2)
- enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dq3dt3'
- IPD_Diag(idx)%output_name = 'SHAMR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Shallow convective moistening rate [kg/kg/s] at model layers'
- IPD_Diag(idx)%unit = 'kg/kg/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dq3dt(:,:,3)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ULWRF'
+ ExtDiag(idx)%desc = 'surface upward longwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%ulwsfc(:)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dq3dt4'
- IPD_Diag(idx)%output_name = 'LRGMR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Large scale moistening rate [kg/kg/s] at model layers'
- IPD_Diag(idx)%unit = 'kg/kg/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dq3dt(:,:,4)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ULWRFI'
+ ExtDiag(idx)%desc = 'instantaneous surface upward longwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%ulwsfci(:)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dq3dt5'
- IPD_Diag(idx)%output_name = 'VDFOZ'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Ozone vertical diffusion [kg/kg/s] at model layers'
- IPD_Diag(idx)%unit = 'kg/kg/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dq3dt(:,:,5)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'DSWRF'
+ ExtDiag(idx)%desc = 'averaged surface downward shortwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,4)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dq3dt6'
- IPD_Diag(idx)%output_name = 'POZ'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Ozone production [kg/kg/s] at model layers'
- IPD_Diag(idx)%unit = 'kg/kg/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dq3dt(:,:,6)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'DSWRFI'
+ ExtDiag(idx)%desc = 'instantaneous surface downward shortwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dswsfci(:)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dq3dt7'
- IPD_Diag(idx)%output_name = 'TOZ'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Ozone tendency [kg/kg/s] at model layers'
- IPD_Diag(idx)%unit = 'kg/kg/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dq3dt(:,:,7)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'USWRF'
+ ExtDiag(idx)%desc = 'averaged surface upward shortwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,3)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dq3dt8'
- IPD_Diag(idx)%output_name = 'POZT'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Ozone production from temperature term [kg/kg/s] at model layers'
- IPD_Diag(idx)%unit = 'kg/kg/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dq3dt(:,:,8)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'USWRFI'
+ ExtDiag(idx)%desc = 'instantaneous surface upward shortwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%uswsfci(:)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dq3dt9'
- IPD_Diag(idx)%output_name = 'POZO'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Ozone production from col ozone term [kg/kg/s] at model layers'
- IPD_Diag(idx)%unit = 'kg/kg/s'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dq3dt(:,:,1)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'duvb_ave'
+ ExtDiag(idx)%desc = 'UV-B Downward Solar Flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,21)
+ enddo
- !---du3dt
- idx = idx + 1
- IPD_Diag(idx)%name = 'du3dt1'
- IPD_Diag(idx)%output_name = 'VDFUA'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Vertical diffusion zonal acceleration [m/s**2] at model layers'
- IPD_Diag(idx)%unit = 'm/s**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%du3dt(:,:,1)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'cduvb_ave'
+ ExtDiag(idx)%desc = 'Clear sky UV-B Downward Solar Flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,22)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'du3dt2'
- IPD_Diag(idx)%output_name = 'GWDU'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Gravity wave drag zonal acceleration [m/s**2] at model layers'
- IPD_Diag(idx)%unit = 'm/s**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%du3dt(:,:,2)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'vbdsf_ave'
+ ExtDiag(idx)%desc = 'Visible Beam Downward Solar Flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,24)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'du3dt3'
- IPD_Diag(idx)%output_name = 'CNVU'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Convective zonal momentum mixing acceleration [m/s**2] at model layers'
- IPD_Diag(idx)%unit = 'm/s**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%du3dt(:,:,3)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'vddsf_ave'
+ ExtDiag(idx)%desc = 'Visible Diffuse Downward Solar Flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,25)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'du3dt4'
- IPD_Diag(idx)%output_name = 'CNGWDU'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Convective Gravity wave drag zonal momentum mixing acceleration [m/s**2] at model layers'
- IPD_Diag(idx)%unit = 'm/s**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%du3dt(:,:,4)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'nbdsf_ave'
+ ExtDiag(idx)%desc = 'Near IR Beam Downward Solar Flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,26)
+ enddo
- !---dv3dt
- idx = idx + 1
- IPD_Diag(idx)%name = 'dv3dt1'
- IPD_Diag(idx)%output_name = 'VDFVA'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Vertical diffusion meridional acceleration [m/s**2] at model layers'
- IPD_Diag(idx)%unit = 'm/s**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dv3dt(:,:,1)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'nddsf_ave'
+ ExtDiag(idx)%desc = 'Near IR Diffuse Downward Solar Flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,27)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dv3dt2'
- IPD_Diag(idx)%output_name = 'GWDV'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Gravity wave drag meridional acceleration [m/s**2] at model layers'
- IPD_Diag(idx)%unit = 'm/s**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dv3dt(:,:,2)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'csulf_avetoa'
+ ExtDiag(idx)%desc = 'Clear Sky Upward Long Wave Flux at toa'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,28)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dv3dt3'
- IPD_Diag(idx)%output_name = 'CNVV'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Convective meridional momentum mixing acceleration [m/s**2] at model layers'
- IPD_Diag(idx)%unit = 'm/s**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dv3dt(:,:,3)
- enddo
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'csusf_avetoa'
+ ExtDiag(idx)%desc = 'Clear Sky Upward Short Wave Flux at toa'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,29)
+ enddo
- idx = idx + 1
- IPD_Diag(idx)%name = 'dv3dt4'
- IPD_Diag(idx)%output_name = 'CNGWDV'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Convective Gravity wave drag meridional acceleration [m/s**2] at model layers'
- IPD_Diag(idx)%unit = 'm/s**2'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtime'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%dv3dt(:,:,4)
- enddo
-
- idx = idx + 1
- IPD_Diag(idx)%name = 'cldcov'
- IPD_Diag(idx)%output_name = 'CDLYR'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'diag3d'
- IPD_Diag(idx)%desc = 'Amount of non-convective cloud [%] at model layers'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = 'acc_rtimsw'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%cldcov
- enddo
- endif
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'csdlf_ave'
+ ExtDiag(idx)%desc = 'Clear Sky Downward Long Wave Flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,30)
+ enddo
- if (Model%lgocart) then
- !---dqdtv
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'csusf_ave'
+ ExtDiag(idx)%desc = 'Clear Sky Upward Short Wave Flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,31)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'csdsf_ave'
+ ExtDiag(idx)%desc = 'Clear Sky Downward Short Wave Flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,32)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'csulf_ave'
+ ExtDiag(idx)%desc = 'Clear Sky Upward Long Wave Flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,33)
+ enddo
+
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'DSWRFtoa'
+ ExtDiag(idx)%desc = 'top of atmos downward shortwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,23)
+ enddo
+
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'USWRFtoa'
+ ExtDiag(idx)%desc = 'top of atmos upward shortwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,2)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ULWRFtoa'
+ ExtDiag(idx)%desc = 'top of atmos upward longwave flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,1)
+ enddo
+! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,bf ULWRFtoa,idx=',idx
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'TCDC_aveclm'
+ ExtDiag(idx)%desc = 'atmos column total cloud cover'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_100
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,17)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'TCDC_avebndcl'
+ ExtDiag(idx)%desc = 'boundary layer cloud layer total cloud cover'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_100
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,18)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'TCDCcnvcl'
+ ExtDiag(idx)%desc = 'convective cloud layer total cloud cover'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_100
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Cldprop(nb)%cv(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'PREScnvclt'
+ ExtDiag(idx)%desc = 'pressure at convective cloud top level'
+ ExtDiag(idx)%unit = 'pa'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%mask = 'cldmask'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Cldprop(nb)%cvt(:)
+ ExtDiag(idx)%data(nb)%var21 => Cldprop(nb)%cv(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'PREScnvclb'
+ ExtDiag(idx)%desc = 'pressure at convective cloud bottom level'
+ ExtDiag(idx)%unit = 'pa'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%mask = 'cldmask'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Cldprop(nb)%cvb(:)
+ ExtDiag(idx)%data(nb)%var21 => Cldprop(nb)%cv(:)
+ enddo
+! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,af PREScnvclb,idx=',idx
+
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'TCDC_avehcl'
+ ExtDiag(idx)%desc = 'high cloud level total cloud cover'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_100
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,5)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'PRES_avehct'
+ ExtDiag(idx)%desc = 'pressure high cloud top level'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%mask = "cldmask_ratio"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,8)
+ ExtDiag(idx)%data(nb)%var21 => IntDiag(nb)%fluxr(:,5)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'PRES_avehcb'
+ ExtDiag(idx)%desc = 'pressure high cloud bottom level'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%mask = "cldmask_ratio"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,11)
+ ExtDiag(idx)%data(nb)%var21 => IntDiag(nb)%fluxr(:,5)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'TEMP_avehct'
+ ExtDiag(idx)%desc = 'temperature high cloud top level'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%mask = "cldmask_ratio"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,14)
+ ExtDiag(idx)%data(nb)%var21 => IntDiag(nb)%fluxr(:,5)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'TCDC_avemcl'
+ ExtDiag(idx)%desc = 'mid cloud level total cloud cover'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_100
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,6)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'PRES_avemct'
+ ExtDiag(idx)%desc = 'pressure middle cloud top level'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%mask = "cldmask_ratio"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,9)
+ ExtDiag(idx)%data(nb)%var21 => IntDiag(nb)%fluxr(:,6)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'PRES_avemcb'
+ ExtDiag(idx)%desc = 'pressure middle cloud bottom level'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%mask = "cldmask_ratio"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,12)
+ ExtDiag(idx)%data(nb)%var21 => IntDiag(nb)%fluxr(:,6)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'TEMP_avemct'
+ ExtDiag(idx)%desc = 'temperature middle cloud top level'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%mask = "cldmask_ratio"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,15)
+ ExtDiag(idx)%data(nb)%var21 => IntDiag(nb)%fluxr(:,6)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'TCDC_avelcl'
+ ExtDiag(idx)%desc = 'low cloud level total cloud cover'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_100
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,7)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'PRES_avelct'
+ ExtDiag(idx)%desc = 'pressure low cloud top level'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%mask = "cldmask_ratio"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,10)
+ ExtDiag(idx)%data(nb)%var21 => IntDiag(nb)%fluxr(:,7)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'PRES_avelcb'
+ ExtDiag(idx)%desc = 'pressure low cloud bottom level'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%mask = "cldmask_ratio"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,13)
+ ExtDiag(idx)%data(nb)%var21 => IntDiag(nb)%fluxr(:,7)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'TEMP_avelct'
+ ExtDiag(idx)%desc = 'temperature low cloud top level'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%mask = "cldmask_ratio"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,16)
+ ExtDiag(idx)%data(nb)%var21 => IntDiag(nb)%fluxr(:,7)
+ enddo
+! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,af TEMP_avelct,idx=',idx
+
+!
+!--- accumulated diagnostics ---
+ do num = 1,NFXR
+ write (xtra,'(I2.2)') num
idx = idx + 1
- IPD_Diag(idx)%name = 'dqdti'
- IPD_Diag(idx)%output_name = 'DQDTV'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'gocart_cpl'
- IPD_Diag(idx)%desc = 'instantaneous total moisture tendency [kg/kg/s]'
- IPD_Diag(idx)%unit = 'kg/kg/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'model layer'
- IPD_Diag(idx)%level = 64
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'fluxr_'//trim(xtra)
+ ExtDiag(idx)%desc = 'fluxr diagnostic '//trim(xtra)//' - GFS radiation'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Coupling(nb)%dqdti
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%fluxr(:,num)
enddo
- endif
-
- ! GFS_SFCPROP CONTAINER DATA: with ialb=0: climatological albedo scheme
- !---alnsf
- idx = idx + 1
- IPD_Diag(idx)%name = 'alnsf'
- IPD_Diag(idx)%output_name = 'alnsf'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'mean nir albedo with strong cosz dependency'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = ''
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%alnsf
- enddo
-
- !---alnwf
- idx = idx + 1
- IPD_Diag(idx)%name = 'alnwf'
- IPD_Diag(idx)%output_name = 'ALNWF'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'nir albedo with weak cosz dependency [%] at surface'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%alnwf
- enddo
-
- !---alvsf
- idx = idx + 1
- IPD_Diag(idx)%name = 'alvsf'
- IPD_Diag(idx)%output_name = 'ALVSF'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'uv+vis albedo with strong cosz dependency [%] at surface'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%alvsf
- enddo
-
- !---alvwf
- idx = idx + 1
- IPD_Diag(idx)%name = 'alvwf'
- IPD_Diag(idx)%output_name = 'ALVWF'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'vis albedo with weak cosz dependency'
- IPD_Diag(idx)%unit = '%'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%alvwf
- enddo
-
- !---canopy
- idx = idx + 1
- IPD_Diag(idx)%name = 'canopy'
- IPD_Diag(idx)%output_name = 'CNWAT'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Canopy water content (kg/m**2)'
- IPD_Diag(idx)%unit = 'kg/m**2 '
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%canopy
- enddo
-
- !---f10m
- idx = idx + 1
- IPD_Diag(idx)%name = 'f10m'
- IPD_Diag(idx)%output_name = 'F10M'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'ratio of 10-meter wind speed to the lowest model layer wind speed [numeric]'
- IPD_Diag(idx)%unit = 'numeric'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '10 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%f10m
- enddo
-
- !---facsf
- idx = idx + 1
- IPD_Diag(idx)%name = 'facsf'
- IPD_Diag(idx)%output_name = 'FACSF'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'fractional coverage with strong cosz dependency'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%facsf
- enddo
-
- !---facwf
- idx = idx + 1
- IPD_Diag(idx)%name = 'facwf'
- IPD_Diag(idx)%output_name = 'FACWF'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'fractional coverage with weak cosz dependency [fraction] '
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%facwf
- enddo
-
- !---ffhh
- idx = idx + 1
- IPD_Diag(idx)%name = 'ffhh'
- IPD_Diag(idx)%output_name = 'FFHH'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'stability profile function [numeric] for heat at surface'
- IPD_Diag(idx)%unit = 'numeric'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%ffhh
- enddo
-
- !---ffmm
- idx = idx + 1
- IPD_Diag(idx)%name = 'ffmm'
- IPD_Diag(idx)%output_name = 'FFMM'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'stability profile function [numeric] for momentum at surface layer'
- IPD_Diag(idx)%unit = 'numeric'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%ffmm
- enddo
-
- !---uustar
- idx = idx + 1
- IPD_Diag(idx)%name = 'uustar'
- IPD_Diag(idx)%output_name = 'UUSTAR'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'frictiobal wind [numeric] at surface layer'
- IPD_Diag(idx)%unit = 'numeric'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%uustar
- enddo
-
- !---slope
- idx = idx + 1
- IPD_Diag(idx)%name = 'slope'
- IPD_Diag(idx)%output_name = 'SLOPE'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'surface slope type [numeric]'
- IPD_Diag(idx)%unit = 'numeric'
- IPD_Diag(idx)%type_stat_proc = ''
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%slope
- enddo
-
- !---fice
- idx = idx + 1
- IPD_Diag(idx)%name = 'fice'
- IPD_Diag(idx)%output_name = 'icec'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'surface ice concentration (ice=1, no ice=0) [fraction]'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%fice
- enddo
-
- !---hice
- idx = idx + 1
- IPD_Diag(idx)%name = 'hice'
- IPD_Diag(idx)%output_name = 'icetk'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'ice thickness [m] at surface'
- IPD_Diag(idx)%unit = 'm'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%hice
- enddo
-
- !---snoalb
- idx = idx + 1
- IPD_Diag(idx)%name = 'snoalb'
- IPD_Diag(idx)%output_name = 'mxsalb'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'maximum snow albedo in fraction'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%snoalb
- enddo
-
- !---shdmax
- idx = idx + 1
- IPD_Diag(idx)%name = 'shdmax'
- IPD_Diag(idx)%output_name = 'SHDMAX'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'maximum fractional coverage of green vegetation'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'max'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%shdmax
- enddo
-
- !---shdmin
- idx = idx + 1
- IPD_Diag(idx)%name = 'shdmin'
- IPD_Diag(idx)%output_name = 'SHDMIN'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'minimum fractional coverage of green vegetation'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'min'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%shdmin
- enddo
-
- !---snowd
- idx = idx + 1
- IPD_Diag(idx)%name = 'snowd'
- IPD_Diag(idx)%output_name = 'SNOWD'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'surface snow depth [m]'
- IPD_Diag(idx)%unit = 'm'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%snowd
- enddo
-
- !---stype
- idx = idx + 1
- IPD_Diag(idx)%name = 'stype'
- IPD_Diag(idx)%output_name = 'sotyp'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'soil type at surface'
- IPD_Diag(idx)%unit = 'numeric'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%stype
- enddo
-
- !---q2m
- idx = idx + 1
- IPD_Diag(idx)%name = 'q2m'
- IPD_Diag(idx)%output_name = 'spfh'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'specific humidity [kg/kg] at 2 m above ground'
- IPD_Diag(idx)%unit = 'kg/kg'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '2 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%q2m
- enddo
-
- !---t2m
- idx = idx + 1
- IPD_Diag(idx)%name = 't2m'
- IPD_Diag(idx)%output_name = 'tmp'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'temperature [K] at 2 m above ground'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '2 m above grnd'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%t2m
- enddo
-
- !---tsfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'tsfc'
- IPD_Diag(idx)%output_name = 'tmp'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'surface temperature [K]'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%tsfc
- enddo
-
- !---tg3
- idx = idx + 1
- IPD_Diag(idx)%name = 'tg3'
- IPD_Diag(idx)%output_name = 'TG3'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'deep soil temperature [K]'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%tg3
- enddo
-
- !---tisfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'tisfc'
- IPD_Diag(idx)%output_name = 'TISFC'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'surface temperature over ice fraction [K]'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%tisfc
- enddo
-
- !---tprcp
- idx = idx + 1
- IPD_Diag(idx)%name = 'tprcp'
- IPD_Diag(idx)%output_name = 'TPRCP'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'total precipitation at surface [m]'
- IPD_Diag(idx)%unit = 'm'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%tprcp
- enddo
-
- !---vtype
- idx = idx + 1
- IPD_Diag(idx)%name = 'vtype'
- IPD_Diag(idx)%output_name = 'VGTYP'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'vegetation type [index]'
- IPD_Diag(idx)%unit = 'index'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%vtype
- enddo
-
- !---weasd
- idx = idx + 1
- IPD_Diag(idx)%name = 'weasd'
- IPD_Diag(idx)%output_name = 'WEASD'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Water equivalent of accumulated snow depth [kg/m**2] at surface'
- IPD_Diag(idx)%unit = 'kg/m**2'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%weasd
- enddo
-
- !---hgtsfc
- idx = idx + 1
- IPD_Diag(idx)%name = 'hgtsfc'
- IPD_Diag(idx)%output_name = 'HGT'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'surface geopotential height [gpm]'
- IPD_Diag(idx)%unit = 'gpm'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%oro
- enddo
-
- !---slmsk
- idx = idx + 1
- IPD_Diag(idx)%name = 'slmsk'
- IPD_Diag(idx)%output_name = 'LAND'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'sea-land-ice mask (0-sea, 1-land, 2-ice)'
- IPD_Diag(idx)%unit = 'numeric'
- IPD_Diag(idx)%type_stat_proc = ''
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%slmsk
- enddo
-
- !---zorl
- idx = idx + 1
- IPD_Diag(idx)%name = 'zorl'
- IPD_Diag(idx)%output_name = 'sfcr'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'surface roughness [m]'
- IPD_Diag(idx)%unit = 'm'
- IPD_Diag(idx)%type_stat_proc = ' '
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%zorl
- enddo
-
- !---vfrac
- idx = idx + 1
- IPD_Diag(idx)%name = 'vfrac'
- IPD_Diag(idx)%output_name = 'veg'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'sfc'
- IPD_Diag(idx)%desc = 'vegetation fraction'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = 'sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%vfrac
- enddo
-
- !---slc 0-10cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'slc'
- IPD_Diag(idx)%output_name = 'soill'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'liquid soil moisture content at 0-10cm below land surface'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '0-10cm below sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%slc(:,1)
- enddo
-
- !---slc 10-40cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'slc'
- IPD_Diag(idx)%output_name = 'soill'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'liquid soil moisture content at 10-40cm below land surface'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '10-40cm below sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%slc(:,2)
- enddo
-
- !---slc 40-100cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'slc'
- IPD_Diag(idx)%output_name = 'SLC'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'liquid soil moisture content at 40-100cm below land surface'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '40-100cm below sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%slc(:,3)
- enddo
-
- !---slc 100-200cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'slc'
- IPD_Diag(idx)%output_name = 'soill'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'liquid soil moisture content at 100-200cm below land surface'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '100-200cm below sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%slc(:,4)
- enddo
-
- !---smc 0-10cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'smc'
- IPD_Diag(idx)%output_name = 'soilw'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Volumetric soil moist content (frac) at 0-10cm below land surface'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '0-10cm below sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%smc(:,1)
- enddo
-
- !---smc 10-40cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'smc'
- IPD_Diag(idx)%output_name = 'soilw'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Volumetric soil moist content (frac) at 10-40cm below land surface'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '10-40cm below sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%smc(:,2)
- enddo
-
- !---smc 40-100cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'smc'
- IPD_Diag(idx)%output_name = 'soilw'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Volumetric soil moist content (frac) at 40-100cm below land surface'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '40-100cm'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%smc(:,3)
- enddo
-
- !---smc 100-200cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'smc'
- IPD_Diag(idx)%output_name = 'soilw'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'Volumetric soil moist content (frac) at 100-200cm below land surface'
- IPD_Diag(idx)%unit = 'fraction'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '100-200cm below sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%smc(:,4)
- enddo
-
- !---stc 0-10cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'stc'
- IPD_Diag(idx)%output_name = 'TMP'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = ' '
- IPD_Diag(idx)%desc = 'soil temperature at 0-10cm below land surface'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '0-10cm below sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%stc(:,1)
- enddo
-
- !---stc 10-40cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'stc'
- IPD_Diag(idx)%output_name = 'tmp'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'soil temperature at 10-40cm below land surface'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '10-40cm below sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%stc(:,2)
- enddo
-
- !---stc 40-100cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'stc'
- IPD_Diag(idx)%output_name = 'tmp'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'soil temperature at 40-100cm below land surface'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '40-100cm below land surface'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%stc(:,3)
- enddo
-
- !---stc 100-200cm
- idx = idx + 1
- IPD_Diag(idx)%name = 'stc'
- IPD_Diag(idx)%output_name = 'tmp'
- IPD_Diag(idx)%mod_name = 'surface'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'soil temperature at 100-200cm below land surface'
- IPD_Diag(idx)%unit = 'K'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = '100-200cm below sfc'
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Sfcprop(nb)%stc(:,4)
- enddo
-
- !---skebu
- idx = idx + 1
- IPD_Diag(idx)%name = 'skebu_wts'
- IPD_Diag(idx)%output_name = 'skebu_wts'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'flx'
- IPD_Diag(idx)%desc = 'perturbation velocity'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = ''
- IPD_Diag(idx)%level = Model%levs
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%skebu_wts(:,:)
- enddo
-
- !---skebv
- idx = idx + 1
- IPD_Diag(idx)%name = 'skebv_wts'
- IPD_Diag(idx)%output_name = 'skebv_wts'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'surface'
- IPD_Diag(idx)%desc = 'perturbation velocity'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = ''
- IPD_Diag(idx)%level = Model%levs
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%skebv_wts(:,:)
- enddo
-
- !---dividing streamline
- idx = idx + 1
- IPD_Diag(idx)%name = 'zmtnblck'
- IPD_Diag(idx)%output_name = 'zmtnblck'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'surface'
- IPD_Diag(idx)%desc = 'perturbation velocity'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = ''
- IPD_Diag(idx)%level = 1
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var2p => Diag(nb)%zmtnblck(:)
- enddo
-
- !---sppt
- idx = idx + 1
- IPD_Diag(idx)%name = 'sppt_wts'
- IPD_Diag(idx)%output_name = 'sppt_wts'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'surface'
- IPD_Diag(idx)%desc = 'perturbation velocity'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = ''
- IPD_Diag(idx)%level = Model%levs
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%sppt_wts(:,:)
- enddo
-
- !---shum
- idx = idx + 1
- IPD_Diag(idx)%name = 'shum_wts'
- IPD_Diag(idx)%output_name = 'shum_wts'
- IPD_Diag(idx)%mod_name = 'physics'
- IPD_Diag(idx)%file_name = 'surface'
- IPD_Diag(idx)%desc = 'perturbation velocity'
- IPD_Diag(idx)%unit = 'm/s'
- IPD_Diag(idx)%type_stat_proc = 'inst'
- IPD_Diag(idx)%level_type = ''
- IPD_Diag(idx)%level = Model%levs
- IPD_Diag(idx)%cnvfac = cn_one
- IPD_Diag(idx)%zhour = Model%zhour
- IPD_Diag(idx)%fcst_hour = Model%fhour
- do nb = 1,nblks
- IPD_Diag(idx)%data(nb)%var3p => Diag(nb)%shum_wts(:,:)
- enddo
-
- if (idx > size(IPD_Diag)) then
- print *,'GFS_populate_IPD_Diag: increase size declaration of IPD_Diag'
- stop
- endif
+ enddo
- end subroutine diag_populate
+!--- the next two appear to be appear to be coupling fields in gloopr
+!--- each has four elements
+!rab do num = 1,4
+!rab write (xtra,'(I1)') num
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 2
+!rab ExtDiag(idx)%name = 'dswcmp_'//trim(xtra)
+!rab ExtDiag(idx)%desc = 'dswcmp dagnostic '//trim(xtra)//' - GFS radiation'
+!rab ExtDiag(idx)%unit = 'XXX'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab do nb = 1,nblks
+!rab ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dswcmp(:,num)
+!rab enddo
+!rab enddo
+!rab
+!rab do num = 1,4
+!rab write (xtra,'(I1)') num
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 2
+!rab ExtDiag(idx)%name = 'uswcmp_'//trim(xtra)
+!rab ExtDiag(idx)%desc = 'uswcmp dagnostic '//trim(xtra)//' - GFS radiation'
+!rab ExtDiag(idx)%unit = 'XXX'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab do nb = 1,nblks
+!rab ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%uswcmp(:,num)
+!rab enddo
+!rab enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'sw_upfxc'
+ ExtDiag(idx)%desc = 'total sky upward sw flux at toa - GFS radiation'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%topfsw(:)%upfxc
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'sw_dnfxc'
+ ExtDiag(idx)%desc = 'total sky downward sw flux at toa - GFS radiation'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%topfsw(:)%dnfxc
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'sw_upfx0'
+ ExtDiag(idx)%desc = 'clear sky upward sw flux at toa - GFS radiation'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%topfsw(:)%upfx0
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'lw_upfxc'
+ ExtDiag(idx)%desc = 'total sky upward lw flux at toa - GFS radiation'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%topflw(:)%upfxc
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'lw_upfx0'
+ ExtDiag(idx)%desc = 'clear sky upward lw flux at toa - GFS radiation'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%topflw(:)%upfx0
+ enddo
+
+!--- physics accumulated diagnostics ---
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ssrun_acc'
+ ExtDiag(idx)%desc = 'surface storm water runoff - GFS lsm'
+ ExtDiag(idx)%unit = 'kg/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%srunoff(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'evbs_ave'
+ ExtDiag(idx)%desc = 'Direct Evaporation from Bare Soil - GFS lsm'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%evbsa(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'evcw_ave'
+ ExtDiag(idx)%desc = 'Canopy water evaporation - GFS lsm'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%evcwa(:)
+ enddo
-end module physics_diag_layer
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'snohf'
+ ExtDiag(idx)%desc = 'Snow Phase Change Heat Flux - GFS lsm'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%snohfa(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'trans_ave'
+ ExtDiag(idx)%desc = 'transpiration - GFS lsm'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%transa(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'sbsno_ave'
+ ExtDiag(idx)%desc = 'Sublimation (evaporation from snow) - GFS lsm'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%sbsnoa(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'snowc_ave'
+ ExtDiag(idx)%desc = 'snow cover - GFS lsm'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%snowca(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'soilm'
+ ExtDiag(idx)%desc = 'total column soil moisture content'
+ ExtDiag(idx)%unit = 'kg/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%mask = "land_only"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%soilm(:)
+ ExtDiag(idx)%data(nb)%var21 => Sfcprop(nb)%slmsk(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'tmpmin2m'
+ ExtDiag(idx)%desc = 'min temperature at 2m height'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tmpmin(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'tmpmax2m'
+ ExtDiag(idx)%desc = 'max temperature at 2m height'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tmpmax(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'dusfc'
+ ExtDiag(idx)%desc = 'surface zonal momentum flux'
+ ExtDiag(idx)%unit = 'N/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dusfc(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'dvsfc'
+ ExtDiag(idx)%desc = 'surface meridional momentum flux'
+ ExtDiag(idx)%unit = 'N/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dvsfc(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'shtfl_ave'
+ ExtDiag(idx)%desc = 'surface sensible heat flux'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dtsfc(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'lhtfl_ave'
+ ExtDiag(idx)%desc = 'surface latent heat flux'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dqsfc(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'totprcp_ave'
+ ExtDiag(idx)%desc = 'surface precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%full_time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totprcp(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'totprcpb_ave'
+ ExtDiag(idx)%desc = 'bucket surface precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totprcpb(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'gflux_ave'
+ ExtDiag(idx)%desc = 'surface ground heat flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%mask = "land_ice_only"
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%gflux(:)
+ ExtDiag(idx)%data(nb)%var21 => Sfcprop(nb)%slmsk(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'dlwsfc'
+ ExtDiag(idx)%desc = 'time accumulated downward lw flux at surface- GFS physics'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dlwsfc(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ulwsfc'
+ ExtDiag(idx)%desc = 'time accumulated upward lw flux at surface- GFS physics'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%ulwsfc(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'sunsd_acc'
+ ExtDiag(idx)%desc = 'Sunshine Duration'
+ ExtDiag(idx)%unit = 's'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%suntim(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'watr_acc'
+ ExtDiag(idx)%desc = 'total water runoff'
+ ExtDiag(idx)%unit = 'kg/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%runoff(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'pevpr_ave'
+ ExtDiag(idx)%desc = 'averaged potential evaporation rate'
+ ExtDiag(idx)%unit = 'W/M**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%ep(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'cwork_ave'
+ ExtDiag(idx)%desc = 'cloud work function (valid only with sas)'
+ ExtDiag(idx)%unit = 'J/kg'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%cldwrk(:)
+ enddo
+
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'u-gwd_ave'
+ ExtDiag(idx)%desc = 'surface zonal gravity wave stress'
+ ExtDiag(idx)%unit = 'N/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dugwd(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'v-gwd_ave'
+ ExtDiag(idx)%desc = 'surface meridional gravity wave stress'
+ ExtDiag(idx)%unit = 'N/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dvgwd(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'psmean'
+ ExtDiag(idx)%desc = 'surface pressure'
+ ExtDiag(idx)%unit = 'kPa'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%psmean(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'cnvprcp_ave'
+ ExtDiag(idx)%desc = 'averaged surface convective precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%full_time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%cnvprcp(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'cnvprcpb_ave'
+ ExtDiag(idx)%desc = 'averaged bucket surface convective precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%cnvprcpb(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'cnvprcp'
+ ExtDiag(idx)%desc = 'surface convective precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%cnvprcp(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'spfhmin2m'
+ ExtDiag(idx)%desc = 'minimum specific humidity'
+ ExtDiag(idx)%unit = 'kg/kg'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%spfhmin(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'spfhmax2m'
+ ExtDiag(idx)%desc = 'maximum specific humidity'
+ ExtDiag(idx)%unit = 'kg/kg'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%spfhmax(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'u10mmax'
+ ExtDiag(idx)%desc = 'maximum (magnitude) u-wind'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'vector_bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%u10mmax(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'v10mmax'
+ ExtDiag(idx)%desc = 'maximum (magnitude) v-wind'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'vector_bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%v10mmax(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'wind10mmax'
+ ExtDiag(idx)%desc = 'maximum wind speed'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%wind10mmax(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'rain'
+ ExtDiag(idx)%desc = 'total rain at this time step'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%rain(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'rainc'
+ ExtDiag(idx)%desc = 'convective rain at this time step'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%rainc(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ice'
+ ExtDiag(idx)%desc = 'ice fall at this time step'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%ice(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'snow'
+ ExtDiag(idx)%desc = 'snow fall at this time step'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%snow(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'graupel'
+ ExtDiag(idx)%desc = 'graupel fall at this time step'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%graupel(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'totice_ave'
+ ExtDiag(idx)%desc = 'surface ice precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%full_time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totice(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'toticeb_ave'
+ ExtDiag(idx)%desc = 'bucket surface ice precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%toticeb(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'totsnw_ave'
+ ExtDiag(idx)%desc = 'surface snow precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%full_time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totsnw(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'totsnwb_ave'
+ ExtDiag(idx)%desc = 'bucket surface snow precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totsnwb(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'totgrp_ave'
+ ExtDiag(idx)%desc = 'surface graupel precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%time_avg = .TRUE.
+ ExtDiag(idx)%full_time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totgrp(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'totgrpb_ave'
+ ExtDiag(idx)%desc = 'bucket surface graupel precipitation rate'
+ ExtDiag(idx)%unit = 'kg/m**2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%cnvfac = cn_th
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%totgrpb(:)
+ enddo
+
+! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,af totgrp,idx=',idx
+
+!--- physics instantaneous diagnostics ---
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'u10m'
+ ExtDiag(idx)%desc = '10 meter u wind'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'vector_bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%u10m(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'v10m'
+ ExtDiag(idx)%desc = '10 meter v wind'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'vector_bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%v10m(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'dpt2m'
+ ExtDiag(idx)%desc = '2 meter dew point temperature'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dpt2m(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'hgt_hyblev1'
+ ExtDiag(idx)%desc = 'layer 1 height'
+ ExtDiag(idx)%unit = 'm'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%zlvl(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'psurf'
+ ExtDiag(idx)%desc = 'surface pressure'
+ ExtDiag(idx)%unit = 'Pa'
+ ExtDiag(idx)%mask = 'pseudo_ps'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%psurf(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'hpbl'
+ ExtDiag(idx)%desc = 'surface planetary boundary layer height'
+ ExtDiag(idx)%unit = 'm'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%hpbl(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'pwat'
+ ExtDiag(idx)%desc = 'atmos column precipitable water'
+ ExtDiag(idx)%unit = 'kg/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%pwat(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'tmp_hyblev1'
+ ExtDiag(idx)%desc = 'layer 1 temperature'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%t1(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'spfh_hyblev1'
+ ExtDiag(idx)%desc = 'layer 1 specific humidity'
+ ExtDiag(idx)%unit = 'kg/kg'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%q1(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ugrd_hyblev1'
+ ExtDiag(idx)%desc = 'layer 1 zonal wind'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'vector_bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%u1(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'vgrd_hyblev1'
+ ExtDiag(idx)%desc = 'layer 1 meridional wind'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'vector_bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%v1(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'sfexc'
+ ExtDiag(idx)%desc = 'Exchange Coefficient'
+ ExtDiag(idx)%unit = 'kg/m2/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%chh(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'acond'
+ ExtDiag(idx)%desc = 'Aerodynamic conductance'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%cmm(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'dlwsfci'
+ ExtDiag(idx)%desc = 'instantaneous sfc downward lw flux'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dlwsfci(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ulwsfci'
+ ExtDiag(idx)%desc = 'instantaneous sfc upward lw flux'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%ulwsfci(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'dswsfci'
+ ExtDiag(idx)%desc = 'instantaneous sfc downward sw flux'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dswsfci(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'uswsfci'
+ ExtDiag(idx)%desc = 'instantaneous sfc upward sw flux'
+ ExtDiag(idx)%unit = 'w/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%uswsfci(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'dusfci'
+ ExtDiag(idx)%desc = 'instantaneous u component of surface stress'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dusfci(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'dvsfci'
+ ExtDiag(idx)%desc = 'instantaneous v component of surface stress'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dvsfci(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'shtfl'
+ ExtDiag(idx)%desc = 'instantaneous surface sensible heat net flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dtsfci(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'lhtfl'
+ ExtDiag(idx)%desc = 'instantaneous surface latent heat net flux'
+ ExtDiag(idx)%unit = 'W/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%dqsfci(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'gfluxi'
+ ExtDiag(idx)%desc = 'instantaneous surface ground heat flux'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%gfluxi(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'pevpr'
+ ExtDiag(idx)%desc = 'instantaneous surface potential evaporation'
+ ExtDiag(idx)%unit = 'W/M**2'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%epi(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'wilt'
+ ExtDiag(idx)%desc = 'wiltimg point (volumetric)'
+ ExtDiag(idx)%unit = 'Proportion'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%smcwlt2(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'fldcp'
+ ExtDiag(idx)%desc = 'Field Capacity (volumetric)'
+ ExtDiag(idx)%unit = 'fraction'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%smcref2(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'wet1'
+ ExtDiag(idx)%desc = 'normalized soil wetness'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%wet1(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'cpofp'
+ ExtDiag(idx)%desc = 'Percent frozen precipitation'
+ ExtDiag(idx)%unit = '%'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%sr(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'crain_ave'
+ ExtDiag(idx)%desc = 'averaged categorical rain'
+ ExtDiag(idx)%unit = 'number'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tdomr(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'csnow_ave'
+ ExtDiag(idx)%desc = 'averaged categorical snow'
+ ExtDiag(idx)%unit = 'number'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tdoms(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'cfrzr_ave'
+ ExtDiag(idx)%desc = 'averaged categorical freezing rain'
+ ExtDiag(idx)%unit = 'number'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tdomzr(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'cicep_ave'
+ ExtDiag(idx)%desc = 'averaged categorical sleet'
+ ExtDiag(idx)%unit = 'number'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ ExtDiag(idx)%cnvfac = cn_one
+ ExtDiag(idx)%time_avg = .TRUE.
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%tdomip(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'skebu_wts'
+ ExtDiag(idx)%desc = 'perturbation velocity'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%skebu_wts(:,:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'skebv_wts'
+ ExtDiag(idx)%desc = 'perturbation velocity'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%skebv_wts(:,:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'zmtnblck'
+ ExtDiag(idx)%desc = 'level of dividing streamline'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%zmtnblck(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'sppt_wts'
+ ExtDiag(idx)%desc = 'perturbation velocity'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%sppt_wts(:,:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 3
+ ExtDiag(idx)%name = 'shum_wts'
+ ExtDiag(idx)%desc = 'perturbation velocity'
+ ExtDiag(idx)%unit = 'm/s'
+ ExtDiag(idx)%mod_name = 'gfs_phys'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var3 => IntDiag(nb)%shum_wts(:,:)
+ enddo
+! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,af shum_wts,idx=',idx
+
+!--- three-dimensional variables that need to be handled special when writing
+!rab do num = 1,6
+!rab write (xtra,'(I1)') num
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab ExtDiag(idx)%name = 'dt3dt_'//trim(xtra)
+!rab ExtDiag(idx)%desc = 'temperature change due to physics '//trim(xtra)//''
+!rab ExtDiag(idx)%unit = 'XXX'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab enddo
+!rab
+!rab do num = 1,5+Mdl_parms%pl_coeff
+!rab write (xtra,'(I1)') num
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab ExtDiag(idx)%name = 'dq3dt_'//trim(xtra)
+!rab ExtDiag(idx)%desc = 'moisture change due to physics '//trim(xtra)//''
+!rab ExtDiag(idx)%unit = 'XXX'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab enddo
+!rab
+!rab do num = 1,4
+!rab write (xtra,'(I1)') num
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab ExtDiag(idx)%name = 'du3dt_'//trim(xtra)
+!rab ExtDiag(idx)%desc = 'u momentum change due to physics '//trim(xtra)//''
+!rab ExtDiag(idx)%unit = 'XXX'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab enddo
+!rab
+!rab do num = 1,4
+!rab write (xtra,'(I1)') num
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab ExtDiag(idx)%name = 'dv3dt_'//trim(xtra)
+!rab ExtDiag(idx)%desc = 'v momentum change due to physics '//trim(xtra)//''
+!rab ExtDiag(idx)%unit = 'XXX'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab enddo
+!rab
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab !Requires lgocart = .T.
+!rab ExtDiag(idx)%name = 'dqdt_v'
+!rab ExtDiag(idx)%desc = 'instantaneous total moisture tendency'
+!rab ExtDiag(idx)%unit = 'XXX'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+
+!--- Surface diagnostics in gfs_sfc
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'alnsf'
+ ExtDiag(idx)%desc = 'mean nir albedo with strong cosz dependency'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%alnsf(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'alnwf'
+ ExtDiag(idx)%desc = 'mean nir albedo with weak cosz dependency'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%alnwf(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'alvsf'
+ ExtDiag(idx)%desc = 'mean vis albedo with strong cosz dependency'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%alvsf(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'alvwf'
+ ExtDiag(idx)%desc = 'mean vis albedo with weak cosz dependency'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%alvwf(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'canopy'
+ ExtDiag(idx)%desc = 'canopy water (cnwat in gfs data)'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%canopy(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'f10m'
+ ExtDiag(idx)%desc = '10-meter wind speed divided by lowest model wind speed'
+ ExtDiag(idx)%unit = 'N/A'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%f10m(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'facsf'
+ ExtDiag(idx)%desc = 'fractional coverage with strong cosz dependency'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%facsf(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'facwf'
+ ExtDiag(idx)%desc = 'fractional coverage with weak cosz dependency'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%facwf(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ffhh'
+ ExtDiag(idx)%desc = 'fh parameter from PBL scheme'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%ffhh(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ffmm'
+ ExtDiag(idx)%desc = 'fm parameter from PBL scheme'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%ffmm(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'uustar'
+ ExtDiag(idx)%desc = 'uustar surface frictional wind'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%uustar(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'slope'
+ ExtDiag(idx)%desc = 'surface slope type'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%slope(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'fice'
+ ExtDiag(idx)%desc = 'surface ice concentration (ice=1; no ice=0)'
+ ExtDiag(idx)%unit = 'fraction'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%fice(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'hice'
+ ExtDiag(idx)%desc = 'sea ice thickness (icetk in gfs_data)'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%hice(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'snoalb'
+ ExtDiag(idx)%desc = 'maximum snow albedo in fraction (salbd?? in gfs data)'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%snoalb(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'shdmax'
+ ExtDiag(idx)%desc = 'maximum fractional coverage of green vegetation'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%shdmax(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'shdmin'
+ ExtDiag(idx)%desc = 'minimum fractional coverage of green vegetation'
+ ExtDiag(idx)%unit = 'XXX'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%shdmin(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'snowd'
+ ExtDiag(idx)%desc = 'surface snow depth'
+ ExtDiag(idx)%unit = 'm'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ ExtDiag(idx)%cnvfac = cn_one/cn_th
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%snowd(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'crain'
+ ExtDiag(idx)%desc = 'instantaneous categorical rain'
+ ExtDiag(idx)%unit = 'number'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ ExtDiag(idx)%cnvfac = cn_one
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%srflag(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'stype'
+ ExtDiag(idx)%desc = 'soil type in integer 1-9'
+ ExtDiag(idx)%unit = 'number'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%stype(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'q2m'
+ ExtDiag(idx)%desc = '2m specific humidity'
+ ExtDiag(idx)%unit = 'kg/kg'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%q2m(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 't2m'
+ ExtDiag(idx)%desc = '2m temperature'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ ExtDiag(idx)%intpl_method = 'bilinear'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%t2m(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'tsfc'
+ ExtDiag(idx)%desc = 'surface temperature'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%tsfc(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'tg3'
+ ExtDiag(idx)%desc = 'deep soil temperature'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%tg3(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'tisfc'
+ ExtDiag(idx)%desc = 'surface temperature over ice fraction'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%tisfc(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'tprcp'
+ ExtDiag(idx)%desc = 'total precipitation'
+ ExtDiag(idx)%unit = 'kg/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%tprcp(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'vtype'
+ ExtDiag(idx)%desc = 'vegetation type in integer 1-13'
+ ExtDiag(idx)%unit = 'number'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%vtype(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'weasd'
+ ExtDiag(idx)%desc = 'surface snow water equivalent'
+ ExtDiag(idx)%unit = 'kg/m**2'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%weasd(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'hgtsfc'
+ ExtDiag(idx)%desc = 'surface geopotential height'
+ ExtDiag(idx)%unit = 'gpm'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ ExtDiag(idx)%cnvfac = cn_one
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%oro(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'slmsksfc'
+ ExtDiag(idx)%desc = 'sea-land-ice mask (0-sea, 1-land, 2-ice)'
+ ExtDiag(idx)%unit = 'numerical'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%slmsk(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'zorlsfc'
+ ExtDiag(idx)%desc = 'surface roughness'
+ ExtDiag(idx)%unit = 'm'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ ExtDiag(idx)%cnvfac = cn_one/cn_100
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%zorl(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'vfracsfc'
+ ExtDiag(idx)%desc = 'vegetation fraction'
+ ExtDiag(idx)%unit = 'fraction'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ ExtDiag(idx)%cnvfac = cn_100
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%vfrac(:)
+ enddo
+
+ do num = 1,4
+ write (xtra,'(i1)') num
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'slc_'//trim(xtra)
+ ExtDiag(idx)%desc = 'liquid soil mositure at layer-'//trim(xtra)
+ ExtDiag(idx)%unit = 'xxx'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%slc(:,num)
+ enddo
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'soilw1'
+ ExtDiag(idx)%desc = 'volumetric soil moisture 0-10cm'
+ ExtDiag(idx)%unit = 'fraction'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%smc(:,1)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'soilw2'
+ ExtDiag(idx)%desc = 'volumetric soil moisture 10-40cm'
+ ExtDiag(idx)%unit = 'fraction'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%smc(:,2)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'soilw3'
+ ExtDiag(idx)%desc = 'volumetric soil moisture 40-100cm'
+ ExtDiag(idx)%unit = 'fraction'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%smc(:,3)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'soilw4'
+ ExtDiag(idx)%desc = 'volumetric soil moisture 100-200cm'
+ ExtDiag(idx)%unit = 'fraction'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%smc(:,4)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'soilt1'
+ ExtDiag(idx)%desc = 'soil temperature 0-10cm'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%stc(:,1)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'soilt2'
+ ExtDiag(idx)%desc = 'soil temperature 10-40cm'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%stc(:,2)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'soilt3'
+ ExtDiag(idx)%desc = 'soil temperature 40-100cm'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%stc(:,3)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'soilt4'
+ ExtDiag(idx)%desc = 'soil temperature 100-200cm'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%stc(:,4)
+ enddo
+! print *,'in gfdl_diag_register,af soilt4,idx=',idx,model%nstf_name(1)
+
+!--------------------------nsst variables
+ if (model%nstf_name(1) > 0) then
+!--------------------------nsst variables
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'tref'
+ ExtDiag(idx)%desc = 'nsst reference or foundation temperature'
+ ExtDiag(idx)%unit = 'K'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%tref(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'z_c'
+ ExtDiag(idx)%desc = 'nsst sub-layer cooling thickness'
+ ExtDiag(idx)%unit = 'm'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%z_c(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'c_0'
+ ExtDiag(idx)%desc = 'nsst coefficient1 to calculate d(tz)/d(ts)'
+ ExtDiag(idx)%unit = 'numerical'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%c_0(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'c_d'
+ ExtDiag(idx)%desc = 'nsst coefficient2 to calculate d(tz)/d(ts)'
+ ExtDiag(idx)%unit = 'n/a'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%c_d(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'w_0'
+ ExtDiag(idx)%desc = 'nsst coefficient3 to calculate d(tz)/d(ts)'
+ ExtDiag(idx)%unit = 'n/a'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%w_0(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'w_d'
+ ExtDiag(idx)%desc = 'nsst coefficient4 to calculate d(tz)/d(ts)'
+ ExtDiag(idx)%unit = 'n/a'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%w_d(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'xt'
+ ExtDiag(idx)%desc = 'nsst heat content in diurnal thermocline layer'
+ ExtDiag(idx)%unit = 'k*m'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%xt(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'xs'
+ ExtDiag(idx)%desc = 'nsst salinity content in diurnal thermocline layer'
+ ExtDiag(idx)%unit = 'n/a'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%xs(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'xu'
+ ExtDiag(idx)%desc = 'nsst u-current content in diurnal thermocline layer'
+ ExtDiag(idx)%unit = 'm2/s'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%xu(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'xv'
+ ExtDiag(idx)%desc = 'nsst v-current content in diurnal thermocline layer'
+ ExtDiag(idx)%unit = 'm2/s'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%xv(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'xz'
+ ExtDiag(idx)%desc = 'nsst diurnal thermocline layer thickness'
+ ExtDiag(idx)%unit = 'm'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%xz(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'zm'
+ ExtDiag(idx)%desc = 'nsst mixed layer thickness'
+ ExtDiag(idx)%unit = 'm'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%zm(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'xtts'
+ ExtDiag(idx)%desc = 'nsst d(xt)/d(ts)'
+ ExtDiag(idx)%unit = 'm'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%xtts(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'xzts'
+ ExtDiag(idx)%desc = 'nsst d(xt)/d(ts)'
+ ExtDiag(idx)%unit = 'm/k'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%xzts(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'd_conv'
+ ExtDiag(idx)%desc = 'nsst thickness of free convection layer'
+ ExtDiag(idx)%unit = 'm'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%d_conv(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'ifd'
+ ExtDiag(idx)%desc = 'nsst index to start dtlm run or not'
+ ExtDiag(idx)%unit = 'n/a'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%ifd(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'dt_cool'
+ ExtDiag(idx)%desc = 'nsst sub-layer cooling amount'
+ ExtDiag(idx)%unit = 'k'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%dt_cool(:)
+ enddo
+
+ idx = idx + 1
+ ExtDiag(idx)%axes = 2
+ ExtDiag(idx)%name = 'qrain'
+ ExtDiag(idx)%desc = 'nsst sensible heat flux due to rainfall'
+ ExtDiag(idx)%unit = 'w/m2'
+ ExtDiag(idx)%mod_name = 'gfs_sfc'
+ allocate (ExtDiag(idx)%data(nblks))
+ do nb = 1,nblks
+ ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%qrain(:)
+ enddo
+!--------------------------nsst variables
+ endif
+!--- prognostic variable tendencies (t, u, v, sph, clwmr, o3)
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab ExtDiag(idx)%name = 'dtemp_dt'
+!rab ExtDiag(idx)%desc = 'gfs radiation/physics temperature tendency'
+!rab ExtDiag(idx)%unit = 'k/s'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab ExtDiag(idx)%name = 'du_dt'
+!rab ExtDiag(idx)%desc = 'gfs radiation/physics horizontal wind component tendency'
+!rab ExtDiag(idx)%unit = 'm/s/s'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab ExtDiag(idx)%name = 'dv_dt'
+!rab ExtDiag(idx)%desc = 'gfs radiation/physics meridional wind component tendency'
+!rab ExtDiag(idx)%unit = 'm/s/s'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab ExtDiag(idx)%name = 'dsphum_dt'
+!rab ExtDiag(idx)%desc = 'gfs radiation/physics specific humidity tendency'
+!rab ExtDiag(idx)%unit = 'kg/kg/s'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab ExtDiag(idx)%name = 'dclwmr_dt'
+!rab ExtDiag(idx)%desc = 'gfs radiation/radiation cloud water mixing ratio tendency'
+!rab ExtDiag(idx)%unit = 'kg/kg/s'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+!rab
+!rab idx = idx + 1
+!rab ExtDiag(idx)%axes = 3
+!rab ExtDiag(idx)%name = 'do3mr_dt'
+!rab ExtDiag(idx)%desc = 'gfs radiation/radiation ozone mixing ratio tendency'
+!rab ExtDiag(idx)%unit = 'kg/kg/s'
+!rab ExtDiag(idx)%mod_name = 'gfs_phys'
+
+ end subroutine GFS_externaldiag_populate
+!-------------------------------------------------------------------------
+
+end module GFS_diagnostics
diff --git a/gfsphysics/GFS_layer/GFS_restart.F90 b/gfsphysics/GFS_layer/GFS_restart.F90
index 80872824c..2d4ed4d25 100644
--- a/gfsphysics/GFS_layer/GFS_restart.F90
+++ b/gfsphysics/GFS_layer/GFS_restart.F90
@@ -1,15 +1,27 @@
-module physics_restart_layer
+module GFS_restart
- use machine, only: kind_phys
- use IPD_typedefs, only: IPD_restart_type
- use physics_abstraction_layer, only: control_type, statein_type, &
- stateout_type, sfcprop_type, &
- coupling_type, grid_type, &
- tbd_type, cldprop_type, &
- radtend_type, intdiag_type, &
- init_type
+ use machine, only: kind_phys
+ use GFS_typedefs, only: GFS_control_type, GFS_statein_type, &
+ GFS_stateout_type, GFS_sfcprop_type, &
+ GFS_coupling_type, GFS_grid_type, &
+ GFS_tbd_type, GFS_cldprop_type, &
+ GFS_radtend_type, GFS_diag_type, &
+ GFS_init_type
- public restart_populate
+ type var_subtype
+ real(kind=kind_phys), pointer :: var2p(:) => null() !< 2D data saved in packed format [dim(ix)]
+ real(kind=kind_phys), pointer :: var3p(:,:) => null() !< 3D data saved in packed format [dim(ix,levs)]
+ end type var_subtype
+
+ type GFS_restart_type
+ integer :: num2d !< current number of registered 2D restart variables
+ integer :: num3d !< current number of registered 3D restart variables
+ character(len=32), allocatable :: name2d(:) !< variable name as it will appear in the restart file
+ character(len=32), allocatable :: name3d(:) !< variable name as it will appear in the restart file
+ type(var_subtype), allocatable :: data(:,:) !< holds pointers to data in packed format (allocated to (nblks,max(2d/3dfields))
+ end type GFS_restart_type
+
+ public GFS_restart_type, GFS_restart_populate
CONTAINS
!*******************************************************************************************
@@ -17,55 +29,55 @@ module physics_restart_layer
!---------------------
! GFS_restart_populate
!---------------------
- subroutine restart_populate (IPD_Restart, Model, Statein, Stateout, Sfcprop, &
- Coupling, Grid, Tbd, Cldprop, Radtend, Diag, Init_parm)
+ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, &
+ Coupling, Grid, Tbd, Cldprop, Radtend, IntDiag, Init_parm)
!----------------------------------------------------------------------------------------!
-! IPD_METADATA !
-! IPD_Restart%num2d [int*4 ] number of 2D variables to output !
-! IPD_Restart%num3d [int*4 ] number of 3D variables to output !
-! IPD_Restart%name2d [char=32] variable name in restart file !
-! IPD_Restart%name3d [char=32] variable name in restart file !
-! IPD_Restart%fld2d(:,:,:) [real*8 ] pointer to 2D data (im,nblks,MAX_RSTRT) !
-! IPD_Restart%fld3d(:,:,:,:) [real*8 ] pointer to 3D data (im,levs,nblks,MAX_RSTRT) !
+! RESTART_METADATA !
+! Restart%num2d [int*4 ] number of 2D variables to output !
+! Restart%num3d [int*4 ] number of 3D variables to output !
+! Restart%name2d [char=32] variable name in restart file !
+! Restart%name3d [char=32] variable name in restart file !
+! Restart%fld2d(:,:,:) [real*8 ] pointer to 2D data (im,nblks,MAX_RSTRT) !
+! Restart%fld3d(:,:,:,:) [real*8 ] pointer to 3D data (im,levs,nblks,MAX_RSTRT) !
!----------------------------------------------------------------------------------------!
- type(IPD_restart_type), intent(inout) :: IPD_Restart
- type(control_type), intent(in) :: Model
- type(statein_type), intent(in) :: Statein(:)
- type(stateout_type), intent(in) :: Stateout(:)
- type(sfcprop_type), intent(in) :: Sfcprop(:)
- type(coupling_type), intent(in) :: Coupling(:)
- type(grid_type), intent(in) :: Grid(:)
- type(tbd_type), intent(in) :: Tbd(:)
- type(cldprop_type), intent(in) :: Cldprop(:)
- type(radtend_type), intent(in) :: Radtend(:)
- type(intdiag_type), intent(in) :: Diag(:)
- type(init_type), intent(in) :: Init_parm
+ type(GFS_restart_type), intent(inout) :: Restart
+ type(GFS_control_type), intent(in) :: Model
+ type(GFS_statein_type), intent(in) :: Statein(:)
+ type(GFS_stateout_type), intent(in) :: Stateout(:)
+ type(GFS_sfcprop_type), intent(in) :: Sfcprop(:)
+ type(GFS_coupling_type), intent(in) :: Coupling(:)
+ type(GFS_grid_type), intent(in) :: Grid(:)
+ type(GFS_tbd_type), intent(in) :: Tbd(:)
+ type(GFS_cldprop_type), intent(in) :: Cldprop(:)
+ type(GFS_radtend_type), intent(in) :: Radtend(:)
+ type(GFS_diag_type), intent(in) :: IntDiag(:)
+ type(GFS_init_type), intent(in) :: Init_parm
!--- local variables
integer :: nblks, num, nb, max_rstrt, offset
character(len=2) :: c2 = ''
nblks = size(Init_parm%blksz)
- max_rstrt = size(IPD_Restart%name2d)
+ max_rstrt = size(Restart%name2d)
- IPD_Restart%num2d = 3 + Model%ntot2d + Model%nctp
- IPD_Restart%num3d = Model%ntot3d
+ Restart%num2d = 3 + Model%ntot2d + Model%nctp
+ Restart%num3d = Model%ntot3d
- allocate (IPD_Restart%name2d(IPD_Restart%num2d))
- allocate (IPD_Restart%name3d(IPD_Restart%num3d))
- allocate (IPD_Restart%data(nblks,max(IPD_Restart%num2d,IPD_Restart%num3d)))
+ allocate (Restart%name2d(Restart%num2d))
+ allocate (Restart%name3d(Restart%num3d))
+ allocate (Restart%data(nblks,max(Restart%num2d,Restart%num3d)))
- IPD_Restart%name2d(:) = ' '
- IPD_Restart%name3d(:) = ' '
+ Restart%name2d(:) = ' '
+ Restart%name3d(:) = ' '
!--- Cldprop variables
- IPD_Restart%name2d(1) = 'cv'
- IPD_Restart%name2d(2) = 'cvt'
- IPD_Restart%name2d(3) = 'cvb'
+ Restart%name2d(1) = 'cv'
+ Restart%name2d(2) = 'cvt'
+ Restart%name2d(3) = 'cvb'
do nb = 1,nblks
- IPD_Restart%data(nb,1)%var2p => Cldprop(nb)%cv(:)
- IPD_Restart%data(nb,2)%var2p => Cldprop(nb)%cvt(:)
- IPD_Restart%data(nb,3)%var2p => Cldprop(nb)%cvb(:)
+ Restart%data(nb,1)%var2p => Cldprop(nb)%cv(:)
+ Restart%data(nb,2)%var2p => Cldprop(nb)%cvt(:)
+ Restart%data(nb,3)%var2p => Cldprop(nb)%cvb(:)
enddo
!--- phy_f2d variables
@@ -73,9 +85,9 @@ subroutine restart_populate (IPD_Restart, Model, Statein, Stateout, Sfcprop, &
do num = 1,Model%ntot2d
!--- set the variable name
write(c2,'(i2.2)') num
- IPD_Restart%name2d(num+offset) = 'phy_f2d_'//c2
+ Restart%name2d(num+offset) = 'phy_f2d_'//c2
do nb = 1,nblks
- IPD_Restart%data(nb,num+offset)%var2p => Tbd(nb)%phy_f2d(:,num)
+ Restart%data(nb,num+offset)%var2p => Tbd(nb)%phy_f2d(:,num)
enddo
enddo
@@ -84,9 +96,9 @@ subroutine restart_populate (IPD_Restart, Model, Statein, Stateout, Sfcprop, &
do num = 1, Model%nctp
!--- set the variable name
write(c2,'(i2.2)') num
- IPD_Restart%name2d(num+offset) = 'phy_fctd_'//c2
+ Restart%name2d(num+offset) = 'phy_fctd_'//c2
do nb = 1,nblks
- IPD_Restart%data(nb,num+offset)%var2p => Tbd(nb)%phy_fctd(:,num)
+ Restart%data(nb,num+offset)%var2p => Tbd(nb)%phy_fctd(:,num)
enddo
enddo
@@ -94,12 +106,12 @@ subroutine restart_populate (IPD_Restart, Model, Statein, Stateout, Sfcprop, &
do num = 1,Model%ntot3d
!--- set the variable name
write(c2,'(i2.2)') num
- IPD_Restart%name3d(num) = 'phy_f3d_'//c2
+ Restart%name3d(num) = 'phy_f3d_'//c2
do nb = 1,nblks
- IPD_Restart%data(nb,num)%var3p => Tbd(nb)%phy_f3d(:,:,num)
+ Restart%data(nb,num)%var3p => Tbd(nb)%phy_f3d(:,:,num)
enddo
enddo
- end subroutine restart_populate
+ end subroutine GFS_restart_populate
-end module physics_restart_layer
+end module GFS_restart
diff --git a/gfsphysics/IPD_layer/IPD_driver.F90 b/gfsphysics/IPD_layer/IPD_driver.F90
deleted file mode 100644
index a0e4c0be6..000000000
--- a/gfsphysics/IPD_layer/IPD_driver.F90
+++ /dev/null
@@ -1,141 +0,0 @@
-module IPD_driver
-
- use IPD_typedefs, only: IPD_init_type, &
- IPD_control_type, IPD_data_type, &
- IPD_diag_type, IPD_restart_type
-
- use physics_abstraction_layer, only: initialize, time_vary_step, &
- radiation_step1, physics_step1, &
- physics_step2
-
- use physics_diag_layer, only: diag_populate
-
- use physics_restart_layer, only: restart_populate
-
- implicit none
-
-!------------------------------------------------------!
-! IPD containers !
-!------------------------------------------------------!
-! type(GFS_control_type) :: IPD_Control !
-! type(IPD_data_type) allocatable :: IPD_Data(:) !
-! type(IPD_diag_type), :: IPD_Diag(:) !
-! type(IPD_restart_type), :: IPD_Restart !
-!------------------------------------------------------!
-
-!----------------
-! Public Entities
-!----------------
-! functions
- public IPD_initialize
- public IPD_setup_step
- public IPD_radiation_step
- public IPD_physics_step1
- public IPD_physics_step2
-
- CONTAINS
-!*******************************************************************************************
-
-
-!----------------
-! IPD Initialize
-!----------------
- subroutine IPD_initialize (IPD_control, IPD_Data, IPD_Diag, IPD_Restart, IPD_init_parm)
- type(IPD_control_type), intent(inout) :: IPD_Control
- type(IPD_data_type), intent(inout) :: IPD_Data(:)
- type(IPD_diag_type), intent(inout) :: IPD_Diag(:)
- type(IPD_restart_type), intent(inout) :: IPD_Restart
- type(IPD_init_type), intent(in) :: IPD_init_parm
-
- !--- initialize the physics suite
- call initialize (IPD_Control, IPD_Data(:)%Statein, IPD_Data(:)%Stateout, &
- IPD_Data(:)%Sfcprop, IPD_Data(:)%Coupling, IPD_Data(:)%Grid, &
- IPD_Data(:)%Tbd, IPD_Data(:)%Cldprop, IPD_Data(:)%Radtend, &
- IPD_Data(:)%Intdiag, IPD_init_parm)
-
-
- !--- populate/associate the Diag container elements
- call diag_populate (IPD_Diag, IPD_control, IPD_Data%Statein, IPD_Data%Stateout, &
- IPD_Data%Sfcprop, IPD_Data%Coupling, IPD_Data%Grid, &
- IPD_Data%Tbd, IPD_Data%Cldprop, IPD_Data%Radtend, &
- IPD_Data%Intdiag, IPD_init_parm)
-
-
- !--- allocate and populate/associate the Restart container elements
- call restart_populate (IPD_Restart, IPD_control, IPD_Data%Statein, IPD_Data%Stateout, &
- IPD_Data%Sfcprop, IPD_Data%Coupling, IPD_Data%Grid, &
- IPD_Data%Tbd, IPD_Data%Cldprop, IPD_Data%Radtend, &
- IPD_Data%Intdiag, IPD_init_parm)
-
- end subroutine IPD_initialize
-
-
-!---------------------------------------------
-! IPD setup step
-! surface data cycling, random streams, etc
-!---------------------------------------------
- subroutine IPD_setup_step (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart)
- type(IPD_control_type), intent(inout) :: IPD_Control
- type(IPD_data_type), intent(inout) :: IPD_Data(:)
- type(IPD_diag_type), intent(inout) :: IPD_Diag(:)
- type(IPD_restart_type), intent(inout) :: IPD_Restart
-
- call time_vary_step (IPD_Control, IPD_Data(:)%Statein, IPD_Data(:)%Stateout, &
- IPD_Data(:)%Sfcprop, IPD_Data(:)%Coupling, IPD_Data(:)%Grid, &
- IPD_Data(:)%Tbd, IPD_Data(:)%Cldprop, IPD_Data(:)%Radtend, &
- IPD_Data(:)%Intdiag)
-
- end subroutine IPD_setup_step
-
-
-!--------------------
-! IPD radiation step
-!--------------------
- subroutine IPD_radiation_step (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart)
- type(IPD_control_type), intent(inout) :: IPD_Control
- type(IPD_data_type), intent(inout) :: IPD_Data
- type(IPD_diag_type), intent(inout) :: IPD_Diag(:)
- type(IPD_restart_type), intent(inout) :: IPD_Restart
-
- call radiation_step1 (IPD_control, IPD_Data%Statein, IPD_Data%Stateout, &
- IPD_Data%Sfcprop, IPD_Data%Coupling, IPD_Data%Grid, &
- IPD_Data%Tbd, IPD_Data%Cldprop, IPD_Data%Radtend, &
- IPD_Data%Intdiag)
-
- end subroutine IPD_radiation_step
-
-
-!-------------------
-! IPD physics step1
-!-------------------
- subroutine IPD_physics_step1 (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart)
- type(IPD_control_type), intent(inout) :: IPD_Control
- type(IPD_data_type), intent(inout) :: IPD_Data
- type(IPD_diag_type), intent(inout) :: IPD_Diag(:)
- type(IPD_restart_type), intent(inout) :: IPD_Restart
-
- call physics_step1 (IPD_control, IPD_Data%Statein, IPD_Data%Stateout, &
- IPD_Data%Sfcprop, IPD_Data%Coupling, IPD_Data%Grid, &
- IPD_Data%Tbd, IPD_Data%Cldprop, IPD_Data%Radtend, &
- IPD_Data%Intdiag)
-
- end subroutine IPD_physics_step1
-
-
-!-------------------
-! IPD physics step2
-!-------------------
- subroutine IPD_physics_step2 (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart)
- type(IPD_control_type), intent(inout) :: IPD_Control
- type(IPD_data_type), intent(inout) :: IPD_Data
- type(IPD_diag_type), intent(inout) :: IPD_Diag(:)
- type(IPD_restart_type), intent(inout) :: IPD_Restart
-
- call physics_step2 (IPD_control, IPD_Data%Statein, IPD_Data%Stateout, &
- IPD_Data%Sfcprop, IPD_Data%Coupling, IPD_Data%Grid, &
- IPD_Data%Tbd, IPD_Data%Cldprop, IPD_Data%Radtend, &
- IPD_Data%Intdiag)
-
- end subroutine IPD_physics_step2
-
-end module IPD_driver
diff --git a/gfsphysics/IPD_layer/IPD_typedefs.F90 b/gfsphysics/IPD_layer/IPD_typedefs.F90
deleted file mode 100644
index da1e35715..000000000
--- a/gfsphysics/IPD_layer/IPD_typedefs.F90
+++ /dev/null
@@ -1,76 +0,0 @@
-module IPD_typedefs
- use machine, only: kind_phys
-
- use physics_abstraction_layer, only: IPD_control_type => control_type, &
- IPD_init_type => init_type, &
- statein_type, stateout_type, &
- sfcprop_type, coupling_type, &
- grid_type, tbd_type, &
- cldprop_type, radtend_type, &
- intdiag_type
-
-!--------------------
-! IPD sub-containers
-!--------------------
- type IPD_data_type
- type(statein_type) :: Statein
- type(stateout_type) :: Stateout
- type(sfcprop_type) :: Sfcprop
- type(coupling_type) :: Coupling
- type(grid_type) :: Grid
- type(tbd_type) :: Tbd
- type(cldprop_type) :: Cldprop
- type(radtend_type) :: Radtend
- type(intdiag_type) :: Intdiag
- end type IPD_data_type
-
-
- type var_subtype
- real(kind=kind_phys), pointer :: var2p(:) => null() !< 2D data saved in packed format [dim(ix)]
- real(kind=kind_phys), pointer :: var3p(:,:) => null() !< 3D data saved in packed format [dim(ix,levs)]
- end type var_subtype
-
-!-------------------------------------------
-! IPD_restart_type
-! data necessary for reproducible restarts
-!-------------------------------------------
- type IPD_restart_type
- integer :: num2d !< current number of registered 2D restart variables
- integer :: num3d !< current number of registered 3D restart variables
- character(len=32), allocatable :: name2d(:) !< variable name as it will appear in the restart file
- character(len=32), allocatable :: name3d(:) !< variable name as it will appear in the restart file
- type(var_subtype), allocatable :: data(:,:) !< holds pointers to data in packed format (allocated to (nblks,max(2d/3dfields))
- end type IPD_restart_type
-
-!----------------------------------------
-! IPD_diag_type
-! fields targetted as diagnostic output
-!----------------------------------------
- type IPD_diag_type
- character(len=32) :: name !< variable name in source
- character(len=32) :: output_name !< output name for variable
- character(len=32) :: mod_name !< module name (e.g. physics, radiation, etc)
- character(len=32) :: file_name !< output file name for variable
- character(len=128) :: desc !< long description of field
- character(len=32) :: unit !< units associated with fields
- character(len=32) :: type_stat_proc !< type of statistic processing:
- !< average, accumulation, maximal, minimal, etc.
- character(len=32) :: level_type !< vertical level of the field
- integer :: level !< vertical level(s)
- real(kind=kind_phys) :: cnvfac !< conversion factors to output in specified units
- real(kind=kind_phys) :: zhour !< forecast hour when bucket was last emptied for statistical processing
- real(kind=kind_phys) :: fcst_hour !< current forecast hour (same as fhour)
- type(var_subtype), allocatable :: data(:) !< holds pointers to data in packed format (allocated to nblks)
- end type IPD_diag_type
-
- public kind_phys
- public IPD_control_type
- public IPD_data_type
- public IPD_restart_type
- public IPD_diag_type
- public IPD_init_type
-
- CONTAINS
-!*******************************************************************************************
-
-end module IPD_typedefs
diff --git a/gfsphysics/makefile b/gfsphysics/makefile
index 6924264c2..9d9c591c1 100644
--- a/gfsphysics/makefile
+++ b/gfsphysics/makefile
@@ -141,7 +141,7 @@ SRCS_F90 = \
./physics/gfdl_cloud_microphys.F90 \
./physics/micro_mg_utils.F90 \
./physics/micro_mg2_0.F90 \
- ./physics/module_mp_radar.F90 \
+ ./physics/module_mp_radar.F90 \
./physics/module_mp_thompson_gfs.F90 \
./physics/module_mp_wsm6_fv3.F90 \
./GFS_layer/GFS_abstraction_layer.F90 \
@@ -150,9 +150,7 @@ SRCS_F90 = \
./GFS_layer/GFS_physics_driver.F90 \
./GFS_layer/GFS_radiation_driver.F90 \
./GFS_layer/GFS_restart.F90 \
- ./GFS_layer/GFS_typedefs.F90 \
- ./IPD_layer/IPD_driver.F90 \
- ./IPD_layer/IPD_typedefs.F90
+ ./GFS_layer/GFS_typedefs.F90
SRCS_c =
diff --git a/io/FV3GFS_io.F90 b/io/FV3GFS_io.F90
index c31611baf..1e4f76bc7 100644
--- a/io/FV3GFS_io.F90
+++ b/io/FV3GFS_io.F90
@@ -34,12 +34,14 @@ module FV3GFS_io_mod
use namelist_soilveg, only: salp_data, snupx
!
!--- GFS_typedefs
- use GFS_typedefs, only: GFS_sfcprop_type, GFS_diag_type, &
- GFS_cldprop_type, GFS_grid_type
+!rab use GFS_typedefs, only: GFS_sfcprop_type, GFS_diag_type, &
+!rab GFS_cldprop_type, GFS_grid_type
+ use GFS_typedefs, only: GFS_sfcprop_type
!
!--- IPD typdefs
use IPD_typedefs, only: IPD_control_type, IPD_data_type, &
- IPD_restart_type, kind_phys
+ IPD_restart_type, IPD_diag_type, &
+ kind_phys => IPD_kind_phys
!
!-----------------------------------------------------------------------
implicit none
@@ -48,7 +50,7 @@ module FV3GFS_io_mod
!--- public interfaces ---
public FV3GFS_restart_read, FV3GFS_restart_write
public FV3GFS_IPD_checksum
- public gfdl_diag_register, gfdl_diag_output
+ public fv3gfs_diag_register, fv3gfs_diag_output
#ifdef use_WRTCOMP
public fv_phys_bundle_setup
#endif
@@ -68,55 +70,29 @@ module FV3GFS_io_mod
real(kind=kind_phys), allocatable, target, dimension(:,:,:) :: oro_var2, sfc_var2, phy_var2
real(kind=kind_phys), allocatable, target, dimension(:,:,:,:) :: sfc_var3, phy_var3
-!-RAB
- type data_subtype
- real(kind=kind_phys), dimension(:), pointer :: var2 => NULL()
- real(kind=kind_phys), dimension(:), pointer :: var21 => NULL()
- real(kind=kind_phys), dimension(:,:), pointer :: var3 => NULL()
- end type data_subtype
- !--- data type definition for use with GFDL FMS diagnostic manager until write component is working
- type gfdl_diag_type
- private
- integer :: id
- integer :: axes
- logical :: time_avg
- logical :: full_time_avg !no bucket
- character(len=64) :: mod_name
- character(len=64) :: name
- character(len=128) :: desc
- character(len=64) :: unit
- character(len=64) :: mask
- character(len=64) :: intpl_method
- character(len=128) :: output_file
- real(kind=kind_phys) :: cnvfac
- type(data_subtype), dimension(:), allocatable :: data
-!rab real(kind=kind_phys), dimension(:), pointer :: var2 => NULL()
-!rab real(kind=kind_phys), dimension(:), pointer :: var21 => NULL()
- end type gfdl_diag_type
- real(kind=kind_phys) :: zhour
+ real(kind=kind_phys) :: zhour
!
- integer :: tot_diag_idx = 0
- integer :: total_outputlevel = 0
- integer :: isco,ieco,jsco,jeco
- integer :: fhzero, ncld, nsoil, imp_physics
- real(4) :: dtp
- integer,dimension(:), allocatable :: nstt, nstt_vctbl
- real(4), dimension(:,:,:), allocatable, target :: buffer_phys_bl
- real(4), dimension(:,:,:), allocatable, target :: buffer_phys_nb
- real(4), dimension(:,:,:,:), allocatable, target :: buffer_phys_windvect
- real(kind=kind_phys),dimension(:,:),allocatable :: lon
- real(kind=kind_phys),dimension(:,:),allocatable :: lat
- real(kind=kind_phys),dimension(:,:),allocatable :: uwork
- logical :: uwork_set = .false.
- character(128) :: uwindname
- integer, parameter :: DIAG_SIZE = 500
-! real(kind=kind_phys), parameter :: missing_value = 1.d30
- real(kind=kind_phys), parameter :: missing_value = 9.99e20
- real, parameter:: stndrd_atmos_ps = 101325.
- real, parameter:: stndrd_atmos_lapse = 0.0065
- type(gfdl_diag_type), dimension(DIAG_SIZE) :: Diag
-!-RAB
-
+ integer :: tot_diag_idx = 0
+ integer :: total_outputlevel = 0
+ integer :: isco,ieco,jsco,jeco
+ integer :: fhzero, ncld, nsoil, imp_physics
+ real(4) :: dtp
+ logical :: lprecip_accu
+ character(len=64) :: Sprecip_accu
+ integer,dimension(:), allocatable :: nstt, nstt_vctbl
+ real(4), dimension(:,:,:), allocatable, target :: buffer_phys_bl
+ real(4), dimension(:,:,:), allocatable, target :: buffer_phys_nb
+ real(4), dimension(:,:,:,:), allocatable, target :: buffer_phys_windvect
+ real(kind=kind_phys),dimension(:,:),allocatable :: lon
+ real(kind=kind_phys),dimension(:,:),allocatable :: lat
+ real(kind=kind_phys),dimension(:,:),allocatable :: uwork
+ logical :: uwork_set = .false.
+ character(128) :: uwindname
+ integer, parameter, public :: DIAG_SIZE = 500
+! real(kind=kind_phys), parameter :: missing_value = 1.d30
+ real(kind=kind_phys), parameter :: missing_value = 9.99e20
+ real, parameter:: stndrd_atmos_ps = 101325.
+ real, parameter:: stndrd_atmos_lapse = 0.0065
!--- miscellaneous other variables
logical :: use_wrtgridcomp_output = .FALSE.
@@ -1180,35 +1156,18 @@ end subroutine phys_restart_write
!
! calls: register_diag_field
!-------------------------------------------------------------------------
-! Current sizes
-! 13+NFXR - radiation, 16 nsst
-! 76+pl_coeff - physics
-!-------------------------------------------------------------------------
- subroutine gfdl_diag_register(Time, Sfcprop, Cldprop, Gfs_diag, Gfs_grid, Atm_block, Model, axes)
+ subroutine fv3gfs_diag_register(Diag, Time, Atm_block, Model, xlon, xlat, axes)
use physcons, only: con_g
!--- subroutine interface variable definitions
- type(time_type), intent(in) :: Time
- type(GFS_sfcprop_type), intent(in) :: Sfcprop(:)
- type(GFS_cldprop_type), intent(in) :: Cldprop(:)
- type(GFS_diag_type), intent(in) :: Gfs_diag(:)
- type(GFS_grid_type), intent(in) :: Gfs_grid(:)
- type (block_control_type), intent(in) :: Atm_block
- type(IPD_control_type), intent(in) :: Model
- integer, dimension(4), intent(in) :: axes
+ type(IPD_diag_type), intent(inout) :: Diag(:)
+ type(time_type), intent(in) :: Time
+ type (block_control_type), intent(in) :: Atm_block
+ type(IPD_control_type), intent(in) :: Model
+ real(kind=kind_phys), intent(in) :: xlon(:,:)
+ real(kind=kind_phys), intent(in) :: xlat(:,:)
+ integer, dimension(4), intent(in) :: axes
!--- local variables
- integer :: i, j, ix
- integer :: idx, num, nb, nblks, nx, ny, k, nrgst_bl, nrgst_nb, nrgst_vctbl, NFXR
- integer, allocatable :: blksz(:)
- character(len=2) :: xtra
- real(kind=kind_phys), parameter :: cn_one = 1._kind_phys
- real(kind=kind_phys), parameter :: cn_100 = 100._kind_phys
- real(kind=kind_phys), parameter :: cn_th = 1000._kind_phys
- real(kind=kind_phys), parameter :: cn_hr = 3600._kind_phys
-
- NFXR = Model%NFXR
- nblks = Atm_block%nblks
- allocate (blksz(nblks))
- blksz(:) = Atm_block%blksz(:)
+ integer :: idx, nrgst_bl, nrgst_nb, nrgst_vctbl
isco = Atm_block%isc
ieco = Atm_block%iec
@@ -1219,2456 +1178,22 @@ subroutine gfdl_diag_register(Time, Sfcprop, Cldprop, Gfs_diag, Gfs_grid, Atm_bl
nsoil = Model%lsoil
dtp = Model%dtp
imp_physics = Model%imp_physics
-! print *,'in gfdl_diag_register,ncld=',Model%ncld,Model%lsoil,Model%imp_physics, &
+! print *,'in fv3gfs_diag_register,ncld=',Model%ncld,Model%lsoil,Model%imp_physics, &
! ' dtp=',dtp
!
!save lon/lat for vector interpolation
allocate(lon(isco:ieco,jsco:jeco))
allocate(lat(isco:ieco,jsco:jeco))
- do j=jsco,jeco
- do i=isco,ieco
- nb = Atm_block%blkno(i,j)
- ix = Atm_block%ixp(i,j)
- lon(i,j) = Gfs_grid(nb)%xlon(ix)
- lat(i,j) = Gfs_grid(nb)%xlat(ix)
- enddo
- enddo
-
- Diag(:)%id = -99
- Diag(:)%axes = -99
- Diag(:)%cnvfac = 1.0_kind_phys
- Diag(:)%time_avg = .FALSE.
- Diag(:)%full_time_avg = .FALSE.
- Diag(:)%mask = ''
- Diag(:)%intpl_method = 'nearest_stod'
- Diag(:)%output_file = ''
-
- idx = 0
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ALBDO_ave'
- Diag(idx)%desc = 'surface albedo'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_100
- Diag(idx)%mask = 'positive_flux'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,3)
- Diag(idx)%data(nb)%var21 => Gfs_diag(nb)%fluxr(:,4)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'DLWRF'
- Diag(idx)%desc = 'surface downward longwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dlwsfc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'DLWRFI'
- Diag(idx)%desc = 'instantaneous surface downward longwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dlwsfci(:)
- enddo
-
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ULWRF'
- Diag(idx)%desc = 'surface upward longwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%ulwsfc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ULWRFI'
- Diag(idx)%desc = 'instantaneous surface upward longwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%ulwsfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'DSWRF'
- Diag(idx)%desc = 'averaged surface downward shortwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,4)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'DSWRFI'
- Diag(idx)%desc = 'instantaneous surface downward shortwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dswsfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'USWRF'
- Diag(idx)%desc = 'averaged surface upward shortwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,3)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'USWRFI'
- Diag(idx)%desc = 'instantaneous surface upward shortwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%uswsfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'duvb_ave'
- Diag(idx)%desc = 'UV-B Downward Solar Flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,21)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'cduvb_ave'
- Diag(idx)%desc = 'Clear sky UV-B Downward Solar Flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,22)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'vbdsf_ave'
- Diag(idx)%desc = 'Visible Beam Downward Solar Flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,24)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'vddsf_ave'
- Diag(idx)%desc = 'Visible Diffuse Downward Solar Flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,25)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'nbdsf_ave'
- Diag(idx)%desc = 'Near IR Beam Downward Solar Flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,26)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'nddsf_ave'
- Diag(idx)%desc = 'Near IR Diffuse Downward Solar Flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,27)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'csulf_avetoa'
- Diag(idx)%desc = 'Clear Sky Upward Long Wave Flux at toa'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,28)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'csusf_avetoa'
- Diag(idx)%desc = 'Clear Sky Upward Short Wave Flux at toa'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,29)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'csdlf_ave'
- Diag(idx)%desc = 'Clear Sky Downward Long Wave Flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,30)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'csusf_ave'
- Diag(idx)%desc = 'Clear Sky Upward Short Wave Flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,31)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'csdsf_ave'
- Diag(idx)%desc = 'Clear Sky Downward Short Wave Flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,32)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'csulf_ave'
- Diag(idx)%desc = 'Clear Sky Upward Long Wave Flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,33)
- enddo
-
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'DSWRFtoa'
- Diag(idx)%desc = 'top of atmos downward shortwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,23)
- enddo
-
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'USWRFtoa'
- Diag(idx)%desc = 'top of atmos upward shortwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,2)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ULWRFtoa'
- Diag(idx)%desc = 'top of atmos upward longwave flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,1)
- enddo
-! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,bf ULWRFtoa,idx=',idx
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'TCDC_aveclm'
- Diag(idx)%desc = 'atmos column total cloud cover'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_100
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,17)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'TCDC_avebndcl'
- Diag(idx)%desc = 'boundary layer cloud layer total cloud cover'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_100
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,18)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'TCDCcnvcl'
- Diag(idx)%desc = 'convective cloud layer total cloud cover'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_100
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Cldprop(nb)%cv(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'PREScnvclt'
- Diag(idx)%desc = 'pressure at convective cloud top level'
- Diag(idx)%unit = 'pa'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%mask = 'cldmask'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Cldprop(nb)%cvt(:)
- Diag(idx)%data(nb)%var21 => Cldprop(nb)%cv(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'PREScnvclb'
- Diag(idx)%desc = 'pressure at convective cloud bottom level'
- Diag(idx)%unit = 'pa'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%mask = 'cldmask'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Cldprop(nb)%cvb(:)
- Diag(idx)%data(nb)%var21 => Cldprop(nb)%cv(:)
- enddo
-! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,af PREScnvclb,idx=',idx
-
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'TCDC_avehcl'
- Diag(idx)%desc = 'high cloud level total cloud cover'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_100
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,5)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'PRES_avehct'
- Diag(idx)%desc = 'pressure high cloud top level'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%mask = "cldmask_ratio"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,8)
- Diag(idx)%data(nb)%var21 => Gfs_diag(nb)%fluxr(:,5)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'PRES_avehcb'
- Diag(idx)%desc = 'pressure high cloud bottom level'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%mask = "cldmask_ratio"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,11)
- Diag(idx)%data(nb)%var21 => Gfs_diag(nb)%fluxr(:,5)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'TEMP_avehct'
- Diag(idx)%desc = 'temperature high cloud top level'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%mask = "cldmask_ratio"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,14)
- Diag(idx)%data(nb)%var21 => Gfs_diag(nb)%fluxr(:,5)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'TCDC_avemcl'
- Diag(idx)%desc = 'mid cloud level total cloud cover'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_100
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,6)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'PRES_avemct'
- Diag(idx)%desc = 'pressure middle cloud top level'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%mask = "cldmask_ratio"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,9)
- Diag(idx)%data(nb)%var21 => Gfs_diag(nb)%fluxr(:,6)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'PRES_avemcb'
- Diag(idx)%desc = 'pressure middle cloud bottom level'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%mask = "cldmask_ratio"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,12)
- Diag(idx)%data(nb)%var21 => Gfs_diag(nb)%fluxr(:,6)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'TEMP_avemct'
- Diag(idx)%desc = 'temperature middle cloud top level'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%mask = "cldmask_ratio"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,15)
- Diag(idx)%data(nb)%var21 => Gfs_diag(nb)%fluxr(:,6)
- enddo
+ lon = xlon
+ lat = xlat
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'TCDC_avelcl'
- Diag(idx)%desc = 'low cloud level total cloud cover'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_100
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,7)
+ do idx = 1,DIAG_SIZE
+ if (trim(Diag(idx)%name) == '') exit
+ tot_diag_idx = idx
enddo
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'PRES_avelct'
- Diag(idx)%desc = 'pressure low cloud top level'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%mask = "cldmask_ratio"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,10)
- Diag(idx)%data(nb)%var21 => Gfs_diag(nb)%fluxr(:,7)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'PRES_avelcb'
- Diag(idx)%desc = 'pressure low cloud bottom level'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%mask = "cldmask_ratio"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,13)
- Diag(idx)%data(nb)%var21 => Gfs_diag(nb)%fluxr(:,7)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'TEMP_avelct'
- Diag(idx)%desc = 'temperature low cloud top level'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%mask = "cldmask_ratio"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,16)
- Diag(idx)%data(nb)%var21 => Gfs_diag(nb)%fluxr(:,7)
- enddo
-! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,af TEMP_avelct,idx=',idx
-
-!
-!--- accumulated diagnostics ---
- do num = 1,NFXR
- write (xtra,'(I2.2)') num
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'fluxr_'//trim(xtra)
- Diag(idx)%desc = 'fluxr diagnostic '//trim(xtra)//' - GFS radiation'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%fluxr(:,num)
- enddo
- enddo
-
-!--- the next two appear to be appear to be coupling fields in gloopr
-!--- each has four elements
-!rab do num = 1,4
-!rab write (xtra,'(I1)') num
-!rab idx = idx + 1
-!rab Diag(idx)%axes = 2
-!rab Diag(idx)%name = 'dswcmp_'//trim(xtra)
-!rab Diag(idx)%desc = 'dswcmp dagnostic '//trim(xtra)//' - GFS radiation'
-!rab Diag(idx)%unit = 'XXX'
-!rab Diag(idx)%mod_name = 'gfs_phys'
-!rab do nb = 1,nblks
-!rab Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dswcmp(:,num)
-!rab enddo
-!rab enddo
-!rab
-!rab do num = 1,4
-!rab write (xtra,'(I1)') num
-!rab idx = idx + 1
-!rab Diag(idx)%axes = 2
-!rab Diag(idx)%name = 'uswcmp_'//trim(xtra)
-!rab Diag(idx)%desc = 'uswcmp dagnostic '//trim(xtra)//' - GFS radiation'
-!rab Diag(idx)%unit = 'XXX'
-!rab Diag(idx)%mod_name = 'gfs_phys'
-!rab do nb = 1,nblks
-!rab Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%uswcmp(:,num)
-!rab enddo
-!rab enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'sw_upfxc'
- Diag(idx)%desc = 'total sky upward sw flux at toa - GFS radiation'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%topfsw(:)%upfxc
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'sw_dnfxc'
- Diag(idx)%desc = 'total sky downward sw flux at toa - GFS radiation'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%topfsw(:)%dnfxc
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'sw_upfx0'
- Diag(idx)%desc = 'clear sky upward sw flux at toa - GFS radiation'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%topfsw(:)%upfx0
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'lw_upfxc'
- Diag(idx)%desc = 'total sky upward lw flux at toa - GFS radiation'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%topflw(:)%upfxc
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'lw_upfx0'
- Diag(idx)%desc = 'clear sky upward lw flux at toa - GFS radiation'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%topflw(:)%upfx0
- enddo
-
-!--- physics accumulated diagnostics ---
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ssrun_acc'
- Diag(idx)%desc = 'surface storm water runoff - GFS lsm'
- Diag(idx)%unit = 'kg/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%srunoff(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'evbs_ave'
- Diag(idx)%desc = 'Direct Evaporation from Bare Soil - GFS lsm'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%evbsa(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'evcw_ave'
- Diag(idx)%desc = 'Canopy water evaporation - GFS lsm'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%evcwa(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'snohf'
- Diag(idx)%desc = 'Snow Phase Change Heat Flux - GFS lsm'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%snohfa(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'trans_ave'
- Diag(idx)%desc = 'transpiration - GFS lsm'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%transa(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'sbsno_ave'
- Diag(idx)%desc = 'Sublimation (evaporation from snow) - GFS lsm'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%sbsnoa(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'snowc_ave'
- Diag(idx)%desc = 'snow cover - GFS lsm'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%snowca(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'soilm'
- Diag(idx)%desc = 'total column soil moisture content'
- Diag(idx)%unit = 'kg/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%mask = "land_only"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%soilm(:)
- Diag(idx)%data(nb)%var21 => Sfcprop(nb)%slmsk(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'tmpmin2m'
- Diag(idx)%desc = 'min temperature at 2m height'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%tmpmin(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'tmpmax2m'
- Diag(idx)%desc = 'max temperature at 2m height'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%tmpmax(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'dusfc'
- Diag(idx)%desc = 'surface zonal momentum flux'
- Diag(idx)%unit = 'N/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dusfc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'dvsfc'
- Diag(idx)%desc = 'surface meridional momentum flux'
- Diag(idx)%unit = 'N/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dvsfc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'shtfl_ave'
- Diag(idx)%desc = 'surface sensible heat flux'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dtsfc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'lhtfl_ave'
- Diag(idx)%desc = 'surface latent heat flux'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dqsfc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'totprcp_ave'
- Diag(idx)%desc = 'surface precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%full_time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%totprcp(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'totprcpb_ave'
- Diag(idx)%desc = 'bucket surface precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%totprcpb(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'gflux_ave'
- Diag(idx)%desc = 'surface ground heat flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%mask = "land_ice_only"
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%gflux(:)
- Diag(idx)%data(nb)%var21 => Sfcprop(nb)%slmsk(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'dlwsfc'
- Diag(idx)%desc = 'time accumulated downward lw flux at surface- GFS physics'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dlwsfc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ulwsfc'
- Diag(idx)%desc = 'time accumulated upward lw flux at surface- GFS physics'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%ulwsfc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'sunsd_acc'
- Diag(idx)%desc = 'Sunshine Duration'
- Diag(idx)%unit = 's'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%suntim(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'watr_acc'
- Diag(idx)%desc = 'total water runoff'
- Diag(idx)%unit = 'kg/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%runoff(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'pevpr_ave'
- Diag(idx)%desc = 'averaged potential evaporation rate'
- Diag(idx)%unit = 'W/M**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%ep(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'cwork_ave'
- Diag(idx)%desc = 'cloud work function (valid only with sas)'
- Diag(idx)%unit = 'J/kg'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%cldwrk(:)
- enddo
-
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'u-gwd_ave'
- Diag(idx)%desc = 'surface zonal gravity wave stress'
- Diag(idx)%unit = 'N/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dugwd(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'v-gwd_ave'
- Diag(idx)%desc = 'surface meridional gravity wave stress'
- Diag(idx)%unit = 'N/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dvgwd(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'psmean'
- Diag(idx)%desc = 'surface pressure'
- Diag(idx)%unit = 'kPa'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%psmean(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'cnvprcp_ave'
- Diag(idx)%desc = 'averaged surface convective precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%full_time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%cnvprcp(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'cnvprcpb_ave'
- Diag(idx)%desc = 'averaged bucket surface convective precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%cnvprcpb(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'cnvprcp'
- Diag(idx)%desc = 'surface convective precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%cnvprcp(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'spfhmin2m'
- Diag(idx)%desc = 'minimum specific humidity'
- Diag(idx)%unit = 'kg/kg'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%spfhmin(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'spfhmax2m'
- Diag(idx)%desc = 'maximum specific humidity'
- Diag(idx)%unit = 'kg/kg'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%spfhmax(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'u10mmax'
- Diag(idx)%desc = 'maximum (magnitude) u-wind'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'vector_bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%u10mmax(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'v10mmax'
- Diag(idx)%desc = 'maximum (magnitude) v-wind'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'vector_bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%v10mmax(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'wind10mmax'
- Diag(idx)%desc = 'maximum wind speed'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%wind10mmax(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'rain'
- Diag(idx)%desc = 'total rain at this time step'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%rain(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'rainc'
- Diag(idx)%desc = 'convective rain at this time step'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%rainc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ice'
- Diag(idx)%desc = 'ice fall at this time step'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%ice(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'snow'
- Diag(idx)%desc = 'snow fall at this time step'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%snow(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'graupel'
- Diag(idx)%desc = 'graupel fall at this time step'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%graupel(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'totice_ave'
- Diag(idx)%desc = 'surface ice precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%full_time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%totice(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'toticeb_ave'
- Diag(idx)%desc = 'bucket surface ice precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%toticeb(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'totsnw_ave'
- Diag(idx)%desc = 'surface snow precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%full_time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%totsnw(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'totsnwb_ave'
- Diag(idx)%desc = 'bucket surface snow precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%totsnwb(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'totgrp_ave'
- Diag(idx)%desc = 'surface graupel precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%time_avg = .TRUE.
- Diag(idx)%full_time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%totgrp(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'totgrpb_ave'
- Diag(idx)%desc = 'bucket surface graupel precipitation rate'
- Diag(idx)%unit = 'kg/m**2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%cnvfac = cn_th
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%totgrpb(:)
- enddo
-
-! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,af totgrp,idx=',idx
-
-!--- physics instantaneous diagnostics ---
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'u10m'
- Diag(idx)%desc = '10 meter u wind'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'vector_bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%u10m(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'v10m'
- Diag(idx)%desc = '10 meter v wind'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'vector_bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%v10m(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'dpt2m'
- Diag(idx)%desc = '2 meter dew point temperature'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dpt2m(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'hgt_hyblev1'
- Diag(idx)%desc = 'layer 1 height'
- Diag(idx)%unit = 'm'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%zlvl(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'psurf'
- Diag(idx)%desc = 'surface pressure'
- Diag(idx)%unit = 'Pa'
- Diag(idx)%mask = 'pseudo_ps'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%psurf(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'hpbl'
- Diag(idx)%desc = 'surface planetary boundary layer height'
- Diag(idx)%unit = 'm'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%hpbl(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'pwat'
- Diag(idx)%desc = 'atmos column precipitable water'
- Diag(idx)%unit = 'kg/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%pwat(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'tmp_hyblev1'
- Diag(idx)%desc = 'layer 1 temperature'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%t1(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'spfh_hyblev1'
- Diag(idx)%desc = 'layer 1 specific humidity'
- Diag(idx)%unit = 'kg/kg'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%q1(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ugrd_hyblev1'
- Diag(idx)%desc = 'layer 1 zonal wind'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'vector_bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%u1(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'vgrd_hyblev1'
- Diag(idx)%desc = 'layer 1 meridional wind'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'vector_bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%v1(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'sfexc'
- Diag(idx)%desc = 'Exchange Coefficient'
- Diag(idx)%unit = 'kg/m2/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%chh(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'acond'
- Diag(idx)%desc = 'Aerodynamic conductance'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%cmm(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'dlwsfci'
- Diag(idx)%desc = 'instantaneous sfc downward lw flux'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dlwsfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ulwsfci'
- Diag(idx)%desc = 'instantaneous sfc upward lw flux'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%ulwsfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'dswsfci'
- Diag(idx)%desc = 'instantaneous sfc downward sw flux'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dswsfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'uswsfci'
- Diag(idx)%desc = 'instantaneous sfc upward sw flux'
- Diag(idx)%unit = 'w/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%uswsfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'dusfci'
- Diag(idx)%desc = 'instantaneous u component of surface stress'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dusfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'dvsfci'
- Diag(idx)%desc = 'instantaneous v component of surface stress'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dvsfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'shtfl'
- Diag(idx)%desc = 'instantaneous surface sensible heat net flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dtsfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'lhtfl'
- Diag(idx)%desc = 'instantaneous surface latent heat net flux'
- Diag(idx)%unit = 'W/m**2'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%dqsfci(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'gfluxi'
- Diag(idx)%desc = 'instantaneous surface ground heat flux'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%gfluxi(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'pevpr'
- Diag(idx)%desc = 'instantaneous surface potential evaporation'
- Diag(idx)%unit = 'W/M**2'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%epi(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'wilt'
- Diag(idx)%desc = 'wiltimg point (volumetric)'
- Diag(idx)%unit = 'Proportion'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%smcwlt2(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'fldcp'
- Diag(idx)%desc = 'Field Capacity (volumetric)'
- Diag(idx)%unit = 'fraction'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%smcref2(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'wet1'
- Diag(idx)%desc = 'normalized soil wetness'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%wet1(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'cpofp'
- Diag(idx)%desc = 'Percent frozen precipitation'
- Diag(idx)%unit = '%'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%sr(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'crain_ave'
- Diag(idx)%desc = 'averaged categorical rain'
- Diag(idx)%unit = 'number'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%tdomr(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'csnow_ave'
- Diag(idx)%desc = 'averaged categorical snow'
- Diag(idx)%unit = 'number'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%tdoms(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'cfrzr_ave'
- Diag(idx)%desc = 'averaged categorical freezing rain'
- Diag(idx)%unit = 'number'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%tdomzr(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'cicep_ave'
- Diag(idx)%desc = 'averaged categorical sleet'
- Diag(idx)%unit = 'number'
- Diag(idx)%mod_name = 'gfs_phys'
- Diag(idx)%intpl_method = 'bilinear'
- Diag(idx)%cnvfac = cn_one
- Diag(idx)%time_avg = .TRUE.
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%tdomip(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 3
- Diag(idx)%name = 'skebu_wts'
- Diag(idx)%desc = 'perturbation velocity'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var3 => Gfs_diag(nb)%skebu_wts(:,:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 3
- Diag(idx)%name = 'skebv_wts'
- Diag(idx)%desc = 'perturbation velocity'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var3 => Gfs_diag(nb)%skebv_wts(:,:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'zmtnblck'
- Diag(idx)%desc = 'level of dividing streamline'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Gfs_diag(nb)%zmtnblck(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 3
- Diag(idx)%name = 'sppt_wts'
- Diag(idx)%desc = 'perturbation velocity'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var3 => Gfs_diag(nb)%sppt_wts(:,:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 3
- Diag(idx)%name = 'shum_wts'
- Diag(idx)%desc = 'perturbation velocity'
- Diag(idx)%unit = 'm/s'
- Diag(idx)%mod_name = 'gfs_phys'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var3 => Gfs_diag(nb)%shum_wts(:,:)
- enddo
-! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,af shum_wts,idx=',idx
-
-!--- three-dimensional variables that need to be handled special when writing
-!rab do num = 1,6
-!rab write (xtra,'(I1)') num
-!rab idx = idx + 1
-!rab Diag(idx)%axes = 3
-!rab Diag(idx)%name = 'dt3dt_'//trim(xtra)
-!rab Diag(idx)%desc = 'temperature change due to physics '//trim(xtra)//''
-!rab Diag(idx)%unit = 'XXX'
-!rab Diag(idx)%mod_name = 'gfs_phys'
-!rab enddo
-!rab
-!rab do num = 1,5+Mdl_parms%pl_coeff
-!rab write (xtra,'(I1)') num
-!rab idx = idx + 1
-!rab Diag(idx)%axes = 3
-!rab Diag(idx)%name = 'dq3dt_'//trim(xtra)
-!rab Diag(idx)%desc = 'moisture change due to physics '//trim(xtra)//''
-!rab Diag(idx)%unit = 'XXX'
-!rab Diag(idx)%mod_name = 'gfs_phys'
-!rab enddo
-!rab
-!rab do num = 1,4
-!rab write (xtra,'(I1)') num
-!rab idx = idx + 1
-!rab Diag(idx)%axes = 3
-!rab Diag(idx)%name = 'du3dt_'//trim(xtra)
-!rab Diag(idx)%desc = 'u momentum change due to physics '//trim(xtra)//''
-!rab Diag(idx)%unit = 'XXX'
-!rab Diag(idx)%mod_name = 'gfs_phys'
-!rab enddo
-!rab
-!rab do num = 1,4
-!rab write (xtra,'(I1)') num
-!rab idx = idx + 1
-!rab Diag(idx)%axes = 3
-!rab Diag(idx)%name = 'dv3dt_'//trim(xtra)
-!rab Diag(idx)%desc = 'v momentum change due to physics '//trim(xtra)//''
-!rab Diag(idx)%unit = 'XXX'
-!rab Diag(idx)%mod_name = 'gfs_phys'
-!rab enddo
-!rab
-!rab idx = idx + 1
-!rab Diag(idx)%axes = 3
-!rab !Requires lgocart = .T.
-!rab Diag(idx)%name = 'dqdt_v'
-!rab Diag(idx)%desc = 'instantaneous total moisture tendency'
-!rab Diag(idx)%unit = 'XXX'
-!rab Diag(idx)%mod_name = 'gfs_phys'
-
-!--- Surface diagnostics in gfs_sfc
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'alnsf'
- Diag(idx)%desc = 'mean nir albedo with strong cosz dependency'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%alnsf(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'alnwf'
- Diag(idx)%desc = 'mean nir albedo with weak cosz dependency'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%alnwf(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'alvsf'
- Diag(idx)%desc = 'mean vis albedo with strong cosz dependency'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%alvsf(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'alvwf'
- Diag(idx)%desc = 'mean vis albedo with weak cosz dependency'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%alvwf(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'canopy'
- Diag(idx)%desc = 'canopy water (cnwat in gfs data)'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%canopy(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'f10m'
- Diag(idx)%desc = '10-meter wind speed divided by lowest model wind speed'
- Diag(idx)%unit = 'N/A'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%f10m(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'facsf'
- Diag(idx)%desc = 'fractional coverage with strong cosz dependency'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%facsf(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'facwf'
- Diag(idx)%desc = 'fractional coverage with weak cosz dependency'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%facwf(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ffhh'
- Diag(idx)%desc = 'fh parameter from PBL scheme'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%ffhh(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'ffmm'
- Diag(idx)%desc = 'fm parameter from PBL scheme'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%ffmm(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'uustar'
- Diag(idx)%desc = 'uustar surface frictional wind'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%uustar(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'slope'
- Diag(idx)%desc = 'surface slope type'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%slope(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'fice'
- Diag(idx)%desc = 'surface ice concentration (ice=1; no ice=0)'
- Diag(idx)%unit = 'fraction'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%fice(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'hice'
- Diag(idx)%desc = 'sea ice thickness (icetk in gfs_data)'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%hice(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'snoalb'
- Diag(idx)%desc = 'maximum snow albedo in fraction (salbd?? in gfs data)'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%snoalb(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'shdmax'
- Diag(idx)%desc = 'maximum fractional coverage of green vegetation'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%shdmax(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'shdmin'
- Diag(idx)%desc = 'minimum fractional coverage of green vegetation'
- Diag(idx)%unit = 'XXX'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%shdmin(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'snowd'
- Diag(idx)%desc = 'surface snow depth'
- Diag(idx)%unit = 'm'
- Diag(idx)%mod_name = 'gfs_sfc'
- Diag(idx)%cnvfac = cn_one/cn_th
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%snowd(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'crain'
- Diag(idx)%desc = 'instantaneous categorical rain'
- Diag(idx)%unit = 'number'
- Diag(idx)%mod_name = 'gfs_sfc'
- Diag(idx)%cnvfac = cn_one
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%srflag(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'stype'
- Diag(idx)%desc = 'soil type in integer 1-9'
- Diag(idx)%unit = 'number'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%stype(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'q2m'
- Diag(idx)%desc = '2m specific humidity'
- Diag(idx)%unit = 'kg/kg'
- Diag(idx)%mod_name = 'gfs_sfc'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%q2m(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 't2m'
- Diag(idx)%desc = '2m temperature'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_sfc'
- Diag(idx)%intpl_method = 'bilinear'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%t2m(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'tsfc'
- Diag(idx)%desc = 'surface temperature'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%tsfc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'tg3'
- Diag(idx)%desc = 'deep soil temperature'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%tg3(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'tisfc'
- Diag(idx)%desc = 'surface temperature over ice fraction'
- Diag(idx)%unit = 'K'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%tisfc(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'tprcp'
- Diag(idx)%desc = 'total precipitation'
- Diag(idx)%unit = 'kg/m**2'
- Diag(idx)%mod_name = 'gfs_sfc'
- allocate (Diag(idx)%data(nblks))
- do nb = 1,nblks
- Diag(idx)%data(nb)%var2 => Sfcprop(nb)%tprcp(:)
- enddo
-
- idx = idx + 1
- Diag(idx)%axes = 2
- Diag(idx)%name = 'vtype'
- Diag(idx)%desc = 'vegetation type in integer 1-13'
- Diag(idx)%unit = 'number'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%vtype(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'weasd'
- diag(idx)%desc = 'surface snow water equivalent'
- diag(idx)%unit = 'kg/m**2'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%weasd(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'hgtsfc'
- diag(idx)%desc = 'surface geopotential height'
- diag(idx)%unit = 'gpm'
- diag(idx)%mod_name = 'gfs_sfc'
- diag(idx)%cnvfac = cn_one
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%oro(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'slmsksfc'
- diag(idx)%desc = 'sea-land-ice mask (0-sea, 1-land, 2-ice)'
- diag(idx)%unit = 'numerical'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%slmsk(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'zorlsfc'
- diag(idx)%desc = 'surface roughness'
- diag(idx)%unit = 'm'
- diag(idx)%mod_name = 'gfs_sfc'
- diag(idx)%cnvfac = cn_one/cn_100
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%zorl(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'vfracsfc'
- diag(idx)%desc = 'vegetation fraction'
- diag(idx)%unit = 'fraction'
- diag(idx)%mod_name = 'gfs_sfc'
- diag(idx)%cnvfac = cn_100
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%vfrac(:)
- enddo
-
- do num = 1,4
- write (xtra,'(i1)') num
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'slc_'//trim(xtra)
- diag(idx)%desc = 'liquid soil mositure at layer-'//trim(xtra)
- diag(idx)%unit = 'xxx'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%slc(:,num)
- enddo
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'soilw1'
- diag(idx)%desc = 'volumetric soil moisture 0-10cm'
- diag(idx)%unit = 'fraction'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%smc(:,1)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'soilw2'
- diag(idx)%desc = 'volumetric soil moisture 10-40cm'
- diag(idx)%unit = 'fraction'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%smc(:,2)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'soilw3'
- diag(idx)%desc = 'volumetric soil moisture 40-100cm'
- diag(idx)%unit = 'fraction'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%smc(:,3)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'soilw4'
- diag(idx)%desc = 'volumetric soil moisture 100-200cm'
- diag(idx)%unit = 'fraction'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%smc(:,4)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'soilt1'
- diag(idx)%desc = 'soil temperature 0-10cm'
- diag(idx)%unit = 'K'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%stc(:,1)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'soilt2'
- diag(idx)%desc = 'soil temperature 10-40cm'
- diag(idx)%unit = 'K'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%stc(:,2)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'soilt3'
- diag(idx)%desc = 'soil temperature 40-100cm'
- diag(idx)%unit = 'K'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%stc(:,3)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'soilt4'
- diag(idx)%desc = 'soil temperature 100-200cm'
- diag(idx)%unit = 'K'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%stc(:,4)
- enddo
-! print *,'in gfdl_diag_register,af soilt4,idx=',idx,model%nstf_name(1)
-
-!--------------------------nsst variables
- if (model%nstf_name(1) > 0) then
-!--------------------------nsst variables
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'tref'
- diag(idx)%desc = 'nsst reference or foundation temperature'
- diag(idx)%unit = 'K'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%tref(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'z_c'
- diag(idx)%desc = 'nsst sub-layer cooling thickness'
- diag(idx)%unit = 'm'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%z_c(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'c_0'
- diag(idx)%desc = 'nsst coefficient1 to calculate d(tz)/d(ts)'
- diag(idx)%unit = 'numerical'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%c_0(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'c_d'
- diag(idx)%desc = 'nsst coefficient2 to calculate d(tz)/d(ts)'
- diag(idx)%unit = 'n/a'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%c_d(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'w_0'
- diag(idx)%desc = 'nsst coefficient3 to calculate d(tz)/d(ts)'
- diag(idx)%unit = 'n/a'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%w_0(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'w_d'
- diag(idx)%desc = 'nsst coefficient4 to calculate d(tz)/d(ts)'
- diag(idx)%unit = 'n/a'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%w_d(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'xt'
- diag(idx)%desc = 'nsst heat content in diurnal thermocline layer'
- diag(idx)%unit = 'k*m'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%xt(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'xs'
- diag(idx)%desc = 'nsst salinity content in diurnal thermocline layer'
- diag(idx)%unit = 'n/a'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%xs(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'xu'
- diag(idx)%desc = 'nsst u-current content in diurnal thermocline layer'
- diag(idx)%unit = 'm2/s'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%xu(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'xv'
- diag(idx)%desc = 'nsst v-current content in diurnal thermocline layer'
- diag(idx)%unit = 'm2/s'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%xv(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'xz'
- diag(idx)%desc = 'nsst diurnal thermocline layer thickness'
- diag(idx)%unit = 'm'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%xz(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'zm'
- diag(idx)%desc = 'nsst mixed layer thickness'
- diag(idx)%unit = 'm'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%zm(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'xtts'
- diag(idx)%desc = 'nsst d(xt)/d(ts)'
- diag(idx)%unit = 'm'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%xtts(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'xzts'
- diag(idx)%desc = 'nsst d(xt)/d(ts)'
- diag(idx)%unit = 'm/k'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%xzts(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'd_conv'
- diag(idx)%desc = 'nsst thickness of free convection layer'
- diag(idx)%unit = 'm'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%d_conv(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'ifd'
- diag(idx)%desc = 'nsst index to start dtlm run or not'
- diag(idx)%unit = 'n/a'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%ifd(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'dt_cool'
- diag(idx)%desc = 'nsst sub-layer cooling amount'
- diag(idx)%unit = 'k'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%dt_cool(:)
- enddo
-
- idx = idx + 1
- diag(idx)%axes = 2
- diag(idx)%name = 'qrain'
- diag(idx)%desc = 'nsst sensible heat flux due to rainfall'
- diag(idx)%unit = 'w/m2'
- diag(idx)%mod_name = 'gfs_sfc'
- allocate (diag(idx)%data(nblks))
- do nb = 1,nblks
- diag(idx)%data(nb)%var2 => sfcprop(nb)%qrain(:)
- enddo
-!--------------------------nsst variables
- endif
-!--------------------------nsst variables
-! if(mpp_pe()==mpp_root_pe())print *,'in gfdl_diag_register,af qrain,idx=',idx
-
-
-!--- prognostic variable tendencies (t, u, v, sph, clwmr, o3)
-!rab idx = idx + 1
-!rab diag(idx)%axes = 3
-!rab diag(idx)%name = 'dtemp_dt'
-!rab diag(idx)%desc = 'gfs radiation/physics temperature tendency'
-!rab diag(idx)%unit = 'k/s'
-!rab diag(idx)%mod_name = 'gfs_phys'
-!rab
-!rab idx = idx + 1
-!rab diag(idx)%axes = 3
-!rab diag(idx)%name = 'du_dt'
-!rab diag(idx)%desc = 'gfs radiation/physics horizontal wind component tendency'
-!rab diag(idx)%unit = 'm/s/s'
-!rab diag(idx)%mod_name = 'gfs_phys'
-!rab
-!rab idx = idx + 1
-!rab diag(idx)%axes = 3
-!rab diag(idx)%name = 'dv_dt'
-!rab diag(idx)%desc = 'gfs radiation/physics meridional wind component tendency'
-!rab diag(idx)%unit = 'm/s/s'
-!rab diag(idx)%mod_name = 'gfs_phys'
-!rab
-!rab idx = idx + 1
-!rab diag(idx)%axes = 3
-!rab diag(idx)%name = 'dsphum_dt'
-!rab diag(idx)%desc = 'gfs radiation/physics specific humidity tendency'
-!rab diag(idx)%unit = 'kg/kg/s'
-!rab diag(idx)%mod_name = 'gfs_phys'
-!rab
-!rab idx = idx + 1
-!rab diag(idx)%axes = 3
-!rab diag(idx)%name = 'dclwmr_dt'
-!rab diag(idx)%desc = 'gfs radiation/radiation cloud water mixing ratio tendency'
-!rab diag(idx)%unit = 'kg/kg/s'
-!rab diag(idx)%mod_name = 'gfs_phys'
-!rab
-!rab idx = idx + 1
-!rab diag(idx)%axes = 3
-!rab diag(idx)%name = 'do3mr_dt'
-!rab diag(idx)%desc = 'gfs radiation/radiation ozone mixing ratio tendency'
-!rab diag(idx)%unit = 'kg/kg/s'
-!rab diag(idx)%mod_name = 'gfs_phys'
-
- tot_diag_idx = idx
-
- if (idx > diag_size) then
- call mpp_error(fatal, 'gfs_driver::gfs_diag_register - need to increase diag_size')
+ if (tot_diag_idx == DIAG_SIZE) then
+ call mpp_error(fatal, 'FV3GFS_io::fv3gfs_diag_register - need to increase parameter DIAG_SIZE')
endif
allocate(nstt(tot_diag_idx), nstt_vctbl(tot_diag_idx))
@@ -3681,26 +1206,26 @@ subroutine gfdl_diag_register(Time, Sfcprop, Cldprop, Gfs_diag, Gfs_grid, Atm_bl
if (diag(idx)%axes == -99) then
call mpp_error(fatal, 'gfs_driver::gfs_diag_register - attempt to register an undefined variable')
endif
- diag(idx)%id = register_diag_field (trim(diag(idx)%mod_name), trim(diag(idx)%name), &
- axes(1:diag(idx)%axes), time, trim(diag(idx)%desc), &
- trim(diag(idx)%unit), missing_value=real(missing_value))
- if(diag(idx)%id > 0) then
- if (diag(idx)%axes == 2) then
- if( index(trim(diag(idx)%intpl_method),'bilinear') > 0 ) then
+ Diag(idx)%id = register_diag_field (trim(Diag(idx)%mod_name), trim(Diag(idx)%name), &
+ axes(1:Diag(idx)%axes), Time, trim(Diag(idx)%desc), &
+ trim(Diag(idx)%unit), missing_value=real(missing_value))
+ if(Diag(idx)%id > 0) then
+ if (Diag(idx)%axes == 2) then
+ if( index(trim(Diag(idx)%intpl_method),'bilinear') > 0 ) then
nrgst_bl = nrgst_bl + 1
nstt(idx) = nrgst_bl
- else if (trim(diag(idx)%intpl_method) == 'nearest_stod' ) then
+ else if (trim(Diag(idx)%intpl_method) == 'nearest_stod' ) then
nrgst_nb = nrgst_nb + 1
nstt(idx) = nrgst_nb
endif
- if(trim(diag(idx)%intpl_method) == 'vector_bilinear') then
- if(diag(idx)%name(1:1) == 'v' .or. diag(idx)%name(1:1) == 'v') then
+ if(trim(Diag(idx)%intpl_method) == 'vector_bilinear') then
+ if(Diag(idx)%name(1:1) == 'v' .or. Diag(idx)%name(1:1) == 'v') then
nrgst_vctbl = nrgst_vctbl + 1
nstt_vctbl(idx) = nrgst_vctbl
-! print *,'in phy_setup, vector_bilinear, name=', trim(diag(idx)%name),' nstt_vctbl=', nstt_vctbl(idx), 'idx=',idx
+! print *,'in phy_setup, vector_bilinear, name=', trim(Diag(idx)%name),' nstt_vctbl=', nstt_vctbl(idx), 'idx=',idx
endif
endif
-! elif (diag(idx)%axes == 3) then
+! elif (Diag(idx)%axes == 3) then
! nrgst = nrgst+levs
endif
endif
@@ -3714,10 +1239,10 @@ subroutine gfdl_diag_register(Time, Sfcprop, Cldprop, Gfs_diag, Gfs_grid, Atm_bl
buffer_phys_bl = 0.
buffer_phys_nb = 0.
buffer_phys_windvect = 0.
- if(mpp_pe() == mpp_root_pe()) print *,'in gfdl_diag_register, nrgst_bl=',nrgst_bl,' nrgst_nb=',nrgst_nb, &
+ if(mpp_pe() == mpp_root_pe()) print *,'in fv3gfs_diag_register, nrgst_bl=',nrgst_bl,' nrgst_nb=',nrgst_nb, &
' nrgst_vctbl=',nrgst_vctbl, 'isco=',isco,ieco,'jsco=',jsco,jeco
- end subroutine gfdl_diag_register
+ end subroutine fv3gfs_diag_register
!-------------------------------------------------------------------------
@@ -3729,15 +1254,11 @@ end subroutine gfdl_diag_register
!
! calls: send_data
!-------------------------------------------------------------------------
-!rab subroutine gfdl_diag_output(time, gfs_diag, statein, stateout, atm_block, &
-!rab nx, ny, levs, ntcw, ntoz, dt, time_int)
- subroutine gfdl_diag_output(time, atm_block, nx, ny, levs, ntcw, ntoz, &
+ subroutine fv3gfs_diag_output(time, diag, atm_block, nx, ny, levs, ntcw, ntoz, &
dt, time_int, time_intfull)
!--- subroutine interface variable definitions
type(time_type), intent(in) :: time
-!rab type(diagnostics), intent(in) :: gfs_diag
-!rab type(state_fields_in), intent(in) :: statein
-!rab type(state_fields_out), intent(in) :: stateout
+ type(IPD_diag_type), intent(in) :: diag(:)
type (block_control_type), intent(in) :: atm_block
integer, intent(in) :: nx, ny, levs, ntcw, ntoz
real(kind=kind_phys), intent(in) :: dt
@@ -3872,7 +1393,6 @@ subroutine gfdl_diag_output(time, atm_block, nx, ny, levs, ntcw, ntoz, &
enddo
enddo
endif
-!rab used=send_data(Diag(idx)%id, var2, Time, is_in=is_in, js_in=js_in)
! used=send_data(Diag(idx)%id, var2, Time)
! print *,'in phys, after store_data, idx=',idx,' var=', trim(Diag(idx)%name)
call store_data(Diag(idx)%id, var2, Time, idx, Diag(idx)%intpl_method, Diag(idx)%name)
@@ -3974,7 +1494,7 @@ subroutine gfdl_diag_output(time, atm_block, nx, ny, levs, ntcw, ntoz, &
enddo
- end subroutine gfdl_diag_output
+ end subroutine fv3gfs_diag_output
!
!-------------------------------------------------------------------------
subroutine store_data(id, work, Time, idx, intpl_method, fldname)
@@ -4046,7 +1566,7 @@ end subroutine store_data
!
#ifdef use_WRTCOMP
- subroutine fv_phys_bundle_setup(axes, phys_bundle, fcst_grid, quilting, nbdlphys)
+ subroutine fv_phys_bundle_setup(Diag, axes, phys_bundle, fcst_grid, quilting, nbdlphys)
!
!-------------------------------------------------------------
!*** set esmf bundle for dyn output fields
@@ -4057,6 +1577,7 @@ subroutine fv_phys_bundle_setup(axes, phys_bundle, fcst_grid, quilting, nbdlphys
!
implicit none
!
+ type(IPD_diag_type),intent(in) :: Diag(:)
integer, intent(in) :: axes(:)
type(ESMF_FieldBundle),intent(inout) :: phys_bundle(:)
type(ESMF_Grid),intent(inout) :: fcst_grid
diff --git a/io/ffsync__genmod.f90 b/io/ffsync__genmod.f90
deleted file mode 100644
index 45bd794d7..000000000
--- a/io/ffsync__genmod.f90
+++ /dev/null
@@ -1,11 +0,0 @@
- !COMPILER-GENERATED INTERFACE MODULE: Sat Feb 17 11:02:31 2018
- ! This source file is for reference only and may not completely
- ! represent the generated interface used by the compiler.
- MODULE FFSYNC__genmod
- INTERFACE
- FUNCTION FFSYNC(FN)
- INTEGER(KIND=4) :: FN
- INTEGER(KIND=4) :: FFSYNC
- END FUNCTION FFSYNC
- END INTERFACE
- END MODULE FFSYNC__genmod
diff --git a/io/makefile b/io/makefile
index 944168862..68d4509b7 100644
--- a/io/makefile
+++ b/io/makefile
@@ -18,7 +18,7 @@ $(info $$ESMF_INC is [${ESMF_INC}])
LIBRARY = libfv3io.a
-FFLAGS += -I../fms -I../gfsphysics
+FFLAGS += -I../fms -I../gfsphysics -I../ipd
SRCS_f =
@@ -67,7 +67,8 @@ module_wrt_grid_comp.o: module_wrt_grid_comp.F90
clean:
@echo "Cleaning io ... "
@echo
- $(RM) -f $(LIBRARY) *.o *.mod *.lst *.i depend
+ $(RM) -f $(LIBRARY) *__genmod.f90 *.o */*.o *.mod *.lst *.i depend
+
MKDEPENDS = ../mkDepends.pl
include ../conf/make.rules
diff --git a/ipd/IPD_driver.F90 b/ipd/IPD_driver.F90
new file mode 100644
index 000000000..34507bc96
--- /dev/null
+++ b/ipd/IPD_driver.F90
@@ -0,0 +1,98 @@
+module IPD_driver
+
+ use IPD_typedefs, only: IPD_kind_phys, IPD_init_type, &
+ IPD_control_type, IPD_data_type, &
+ IPD_diag_type, IPD_restart_type, &
+ IPD_func0d_proc, IPD_func1d_proc
+
+ use physics_abstraction_layer, only: initialize, time_vary_step, &
+ radiation_step1, physics_step1, &
+ physics_step2, &
+ diagnostic_populate, restart_populate
+
+ implicit none
+
+!------------------------------------------------------!
+! IPD containers !
+!------------------------------------------------------!
+! type(GFS_control_type) :: IPD_Control !
+! type(IPD_data_type) allocatable :: IPD_Data(:) !
+! type(IPD_diag_type), :: IPD_Diag(:) !
+! type(IPD_restart_type), :: IPD_Restart !
+!------------------------------------------------------!
+
+!----------------
+! Public Entities
+!----------------
+! functions
+ public IPD_initialize
+ public IPD_step
+!rab public IPD_setup_step
+!rab public IPD_radiation_step
+!rab public IPD_physics_step1
+!rab public IPD_physics_step2
+
+ CONTAINS
+!*******************************************************************************************
+
+
+!----------------
+! IPD Initialize
+!----------------
+ subroutine IPD_initialize (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart, IPD_init_parm)
+ type(IPD_control_type), intent(inout) :: IPD_Control
+ type(IPD_data_type), intent(inout) :: IPD_Data(:)
+ type(IPD_diag_type), intent(inout) :: IPD_Diag(:)
+ type(IPD_restart_type), intent(inout) :: IPD_Restart
+ type(IPD_init_type), intent(in) :: IPD_init_parm
+
+ !--- initialize the physics suite
+ call initialize (IPD_Control, IPD_Data(:)%Statein, IPD_Data(:)%Stateout, &
+ IPD_Data(:)%Sfcprop, IPD_Data(:)%Coupling, IPD_Data(:)%Grid, &
+ IPD_Data(:)%Tbd, IPD_Data(:)%Cldprop, IPD_Data(:)%Radtend, &
+ IPD_Data(:)%Intdiag, IPD_init_parm)
+
+
+ !--- populate/associate the Diag container elements
+ call diagnostic_populate (IPD_Diag, IPD_Control, IPD_Data%Statein, IPD_Data%Stateout, &
+ IPD_Data%Sfcprop, IPD_Data%Coupling, IPD_Data%Grid, &
+ IPD_Data%Tbd, IPD_Data%Cldprop, IPD_Data%Radtend, &
+ IPD_Data%Intdiag, IPD_init_parm)
+
+
+ !--- allocate and populate/associate the Restart container elements
+ call restart_populate (IPD_Restart, IPD_Control, IPD_Data%Statein, IPD_Data%Stateout, &
+ IPD_Data%Sfcprop, IPD_Data%Coupling, IPD_Data%Grid, &
+ IPD_Data%Tbd, IPD_Data%Cldprop, IPD_Data%Radtend, &
+ IPD_Data%Intdiag, IPD_init_parm)
+
+ end subroutine IPD_initialize
+
+
+!----------------------------------------------------------
+! IPD step
+! runs the given routine/function pointed to by IPD_func
+!----------------------------------------------------------
+ subroutine IPD_step (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart, IPD_func0d, IPD_func1d)
+ type(IPD_control_type), intent(inout) :: IPD_Control
+ type(IPD_data_type), intent(inout) :: IPD_Data(:)
+ type(IPD_diag_type), intent(inout) :: IPD_Diag(:)
+ type(IPD_restart_type), intent(inout) :: IPD_Restart
+ procedure(IPD_func0d_proc), intent(in), optional, pointer :: IPD_func0d
+ procedure(IPD_func1d_proc), intent(in), optional, pointer :: IPD_func1d
+
+ if (size(IPD_Data,1) == 1 .and. PRESENT(IPD_func0d)) then
+ call IPD_func0d (IPD_Control, IPD_Data(1)%Statein, IPD_Data(1)%Stateout, &
+ IPD_Data(1)%Sfcprop, IPD_Data(1)%Coupling, IPD_Data(1)%Grid, &
+ IPD_Data(1)%Tbd, IPD_Data(1)%Cldprop, IPD_Data(1)%Radtend, &
+ IPD_Data(1)%Intdiag)
+ else
+ call IPD_func1d (IPD_Control, IPD_Data(:)%Statein, IPD_Data(:)%Stateout, &
+ IPD_Data(:)%Sfcprop, IPD_Data(:)%Coupling, IPD_Data(:)%Grid, &
+ IPD_Data(:)%Tbd, IPD_Data(:)%Cldprop, IPD_Data(:)%Radtend, &
+ IPD_Data(:)%Intdiag)
+ endif
+
+ end subroutine IPD_step
+
+end module IPD_driver
diff --git a/ipd/IPD_typedefs.F90 b/ipd/IPD_typedefs.F90
new file mode 100644
index 000000000..01aee12d8
--- /dev/null
+++ b/ipd/IPD_typedefs.F90
@@ -0,0 +1,120 @@
+module IPD_typedefs
+
+ use physics_abstraction_layer, only: IPD_control_type => control_type, &
+ IPD_init_type => init_type, &
+ IPD_restart_type => restart_type, &
+ IPD_diag_type => diagnostic_type, &
+ IPD_kind_phys => kind_phys, &
+ statein_type, stateout_type, &
+ sfcprop_type, coupling_type, &
+ grid_type, tbd_type, &
+ cldprop_type, radtend_type, &
+ intdiag_type
+
+!--------------------
+! IPD sub-containers
+!--------------------
+ type IPD_data_type
+ type(statein_type) :: Statein
+ type(stateout_type) :: Stateout
+ type(sfcprop_type) :: Sfcprop
+ type(coupling_type) :: Coupling
+ type(grid_type) :: Grid
+ type(tbd_type) :: Tbd
+ type(cldprop_type) :: Cldprop
+ type(radtend_type) :: Radtend
+ type(intdiag_type) :: Intdiag
+ end type IPD_data_type
+
+!------------------------
+! IPD function procedure
+!------------------------
+ abstract interface
+ subroutine IPD_func0d_proc (Control, Statein, Stateout, &
+ Sfcprop, Coupling, Grid, &
+ Tbd, Cldprop, Radtend, &
+ Intdiag)
+ import :: IPD_control_type, statein_type, stateout_type, &
+ sfcprop_type, coupling_type, grid_type, tbd_type, &
+ cldprop_type, radtend_type, intdiag_type
+ type(IPD_control_type), intent(inout) :: Control
+ type(statein_type), intent(inout) :: Statein
+ type(stateout_type), intent(inout) :: Stateout
+ type(sfcprop_type), intent(inout) :: Sfcprop
+ type(coupling_type), intent(inout) :: Coupling
+ type(grid_type), intent(inout) :: Grid
+ type(tbd_type), intent(inout) :: Tbd
+ type(cldprop_type), intent(inout) :: Cldprop
+ type(radtend_type), intent(inout) :: Radtend
+ type(intdiag_type), intent(inout) :: Intdiag
+ end subroutine IPD_func0d_proc
+ subroutine IPD_func1d_proc (Control, Statein, Stateout, &
+ Sfcprop, Coupling, Grid, &
+ Tbd, Cldprop, Radtend, &
+ Intdiag)
+ import :: IPD_control_type, statein_type, stateout_type, &
+ sfcprop_type, coupling_type, grid_type, tbd_type, &
+ cldprop_type, radtend_type, intdiag_type
+ type(IPD_control_type), intent(inout) :: Control
+ type(statein_type), intent(inout) :: Statein(:)
+ type(stateout_type), intent(inout) :: Stateout(:)
+ type(sfcprop_type), intent(inout) :: Sfcprop(:)
+ type(coupling_type), intent(inout) :: Coupling(:)
+ type(grid_type), intent(inout) :: Grid(:)
+ type(tbd_type), intent(inout) :: Tbd(:)
+ type(cldprop_type), intent(inout) :: Cldprop(:)
+ type(radtend_type), intent(inout) :: Radtend(:)
+ type(intdiag_type), intent(inout) :: Intdiag(:)
+ end subroutine IPD_func1d_proc
+ end interface
+
+
+! type var_subtype
+! real(kind=kind_phys), pointer :: var2p(:) => null() !< 2D data saved in packed format [dim(ix)]
+! real(kind=kind_phys), pointer :: var3p(:,:) => null() !< 3D data saved in packed format [dim(ix,levs)]
+! end type var_subtype
+
+!-------------------------------------------
+! IPD_restart_type
+! data necessary for reproducible restarts
+!-------------------------------------------
+! type IPD_restart_type
+! integer :: num2d !< current number of registered 2D restart variables
+! integer :: num3d !< current number of registered 3D restart variables
+! character(len=32), allocatable :: name2d(:) !< variable name as it will appear in the restart file
+! character(len=32), allocatable :: name3d(:) !< variable name as it will appear in the restart file
+! type(var_subtype), allocatable :: data(:,:) !< holds pointers to data in packed format (allocated to (nblks,max(2d/3dfields))
+! end type IPD_restart_type
+
+!----------------------------------------
+! IPD_diag_type
+! fields targetted as diagnostic output
+!----------------------------------------
+! type IPD_diag_type
+! character(len=32) :: name !< variable name in source
+! character(len=32) :: output_name !< output name for variable
+! character(len=32) :: mod_name !< module name (e.g. physics, radiation, etc)
+! character(len=32) :: file_name !< output file name for variable
+! character(len=128) :: desc !< long description of field
+! character(len=32) :: unit !< units associated with fields
+! character(len=32) :: type_stat_proc !< type of statistic processing:
+! !< average, accumulation, maximal, minimal, etc.
+! character(len=32) :: level_type !< vertical level of the field
+! integer :: level !< vertical level(s)
+! real(kind=kind_phys) :: cnvfac !< conversion factors to output in specified units
+! real(kind=kind_phys) :: zhour !< forecast hour when bucket was last emptied for statistical processing
+! real(kind=kind_phys) :: fcst_hour !< current forecast hour (same as fhour)
+! type(var_subtype), allocatable :: data(:) !< holds pointers to data in packed format (allocated to nblks)
+! end type IPD_diag_type
+
+ public IPD_kind_phys
+ public IPD_control_type
+ public IPD_data_type
+ public IPD_restart_type
+ public IPD_diag_type
+ public IPD_init_type
+
+ CONTAINS
+!*******************************************************************************************
+
+end module IPD_typedefs
diff --git a/ipd/makefile b/ipd/makefile
new file mode 100644
index 000000000..edddb0662
--- /dev/null
+++ b/ipd/makefile
@@ -0,0 +1,69 @@
+SHELL = /bin/sh
+
+inside_nems := $(wildcard ../../../conf/configure.nems)
+ifneq ($(strip $(inside_nems)),)
+ include ../../../conf/configure.nems
+else
+ exist_configure_fv3 := $(wildcard ../conf/configure.fv3)
+ ifneq ($(strip $(exist_configure_fv3)),)
+ include ../conf/configure.fv3
+ else
+ $(error "../conf/configure.fv3 file is missing. Run ./configure")
+ endif
+ $(info )
+ $(info Build standalone FV3 gfsphysics ...)
+ $(info )
+endif
+
+LIBRARY = libipd.a
+
+FFLAGS += -I../fms -I../fms/include -I../gfsphysics
+
+CPPDEFS = -DNEW_TAUCTMAX -DSMALL_PE -DNEMS_GSM -DINTERNAL_FILE_NML
+
+SRCS_F90 = \
+ ./IPD_driver.F90 \
+ ./IPD_typedefs.F90
+
+SRCS_c =
+
+DEPEND_FILES = $(SRCS_f) $(SRCS_f90) $(SRCS_F) $(SRCS_F90)
+
+OBJS_f = $(SRCS_f:.f=.o)
+OBJS_f90 = $(SRCS_f90:.f90=.o)
+OBJS_F = $(SRCS_F:.F=.o)
+OBJS_F90 = $(SRCS_F90:.F90=.o)
+OBJS_c = $(SRCS_c:.c=.o)
+
+OBJS = $(OBJS_f) $(OBJS_f90) $(OBJS_F) $(OBJS_F90) $(OBJS_c)
+
+all default: depend $(LIBRARY)
+
+$(LIBRARY): $(OBJS)
+ $(AR) $(ARFLAGS) $@ $?
+
+# this is the place to override default (implicit) compilation rules
+# and create specific (explicit) rules
+
+./physics/radiation_aerosols.o : ./physics/radiation_aerosols.f
+ $(FC) $(FFLAGS) $(OTHER_FFLAGS) -xCORE-AVX-I -c $< -o $@
+
+./GFS_layer/GFS_diagnostics.o : ./GFS_layer/GFS_diagnostics.F90
+ $(FC) $(FFLAGS) $(OTHER_FFLAGS) -O0 -c $< -o $@
+
+.PHONY: clean
+clean:
+ @echo "Cleaning ipd ... "
+ @echo
+ $(RM) -f $(LIBRARY) *__genmod.f90 *.o */*.o *.mod *.lst *.i depend
+
+MKDEPENDS = ../mkDepends.pl
+include ../conf/make.rules
+
+include ./depend
+
+# do not include 'depend' file if the target contains string 'clean'
+ifneq (clean,$(findstring clean,$(MAKECMDGOALS)))
+ -include depend
+endif
+
diff --git a/makefile b/makefile
index ee68ccbf5..dfde756e6 100644
--- a/makefile
+++ b/makefile
@@ -2,7 +2,7 @@ SHELL = /bin/sh
include conf/configure.fv3
-FFLAGS += -Ifms -Igfsphysics -Iio -Iatmos_cubed_sphere
+FFLAGS += -Ifms -Igfsphysics -Iipd -Iio -Iatmos_cubed_sphere
FV3_EXE = fv3.exe
FV3CAP_LIB = libfv3cap.a
@@ -17,11 +17,12 @@ nems: libs
libs:
$(MAKE) -C fms $(MAKEFLAGS)
$(MAKE) -C gfsphysics $(MAKEFLAGS) 32BIT=N # force gfs physics to 64bit
+ $(MAKE) -C ipd $(MAKEFLAGS) 32BIT=N # force gfs physics to 64bit
$(MAKE) -C io $(MAKEFLAGS)
$(MAKE) -C atmos_cubed_sphere $(MAKEFLAGS)
$(MAKE) -C stochastic_physics $(MAKEFLAGS) 32BIT=N # force gfs physics to 64bit
-$(FV3_EXE): atmos_model.o coupler_main.o atmos_cubed_sphere/libfv3core.a io/libfv3io.a gfsphysics/libgfsphys.a stochastic_physics/libstochastic_physics.a fms/libfms.a
+$(FV3_EXE): atmos_model.o coupler_main.o atmos_cubed_sphere/libfv3core.a io/libfv3io.a ipd/libipd.a gfsphysics/libgfsphys.a stochastic_physics/libstochastic_physics.a fms/libfms.a
$(LD) -o $@ $^ $(NCEPLIBS) $(LDFLAGS)
$(FV3CAP_LIB): atmos_model.o module_fv3_config.o module_fcst_grid_comp.o time_utils.o fv3_cap.o
@@ -40,8 +41,8 @@ DEPEND_FILES = time_utils.F90 module_fv3_config.F90 atmos_model.F90 module_fcst_
esmf_make_fragment:
@rm -rf nems_dir; mkdir nems_dir
- @cp $(FV3CAP_LIB) atmos_cubed_sphere/libfv3core.a io/libfv3io.a gfsphysics/libgfsphys.a fms/libfms.a stochastic_physics/libstochastic_physics.a nems_dir
-# @cp $(FV3CAP_LIB) atmos_cubed_sphere/libfv3core.a io/libfv3io.a gfsphysics/libgfsphys.a fms/libfms.a nems_dir
+ @cp $(FV3CAP_LIB) atmos_cubed_sphere/libfv3core.a io/libfv3io.a ipd/libipd.a gfsphysics/libgfsphys.a fms/libfms.a stochastic_physics/libstochastic_physics.a nems_dir
+# @cp $(FV3CAP_LIB) atmos_cubed_sphere/libfv3core.a io/libfv3io.a ipd/libipd.a gfsphysics/libgfsphys.a fms/libfms.a nems_dir
@cp fv3gfs_cap_mod.mod nems_dir
@echo "# ESMF self-describing build dependency makefile fragment" > fv3.mk
@echo "# src location $(PWD)" >> fv3.mk
@@ -49,8 +50,8 @@ esmf_make_fragment:
@echo "ESMF_DEP_FRONT = fv3gfs_cap_mod" >> fv3.mk
@echo "ESMF_DEP_INCPATH = $(PWD)/nems_dir" >> fv3.mk
@echo "ESMF_DEP_CMPL_OBJS =" >> fv3.mk
- @echo "ESMF_DEP_LINK_OBJS = $(addprefix $(PWD)/nems_dir/, libfv3cap.a libfv3core.a libfv3io.a libgfsphys.a libfms.a libstochastic_physics.a)" >> fv3.mk
-# @echo "ESMF_DEP_LINK_OBJS = $(addprefix $(PWD)/nems_dir/, libfv3cap.a libfv3core.a libfv3io.a libgfsphys.a libfms.a )" >> fv3.mk
+ @echo "ESMF_DEP_LINK_OBJS = $(addprefix $(PWD)/nems_dir/, libfv3cap.a libfv3core.a libfv3io.a libipd.a libgfsphys.a libfms.a libstochastic_physics.a)" >> fv3.mk
+# @echo "ESMF_DEP_LINK_OBJS = $(addprefix $(PWD)/nems_dir/, libfv3cap.a libfv3core.a libfv3io.a libipd.a libgfsphys.a libfms.a )" >> fv3.mk
@echo "ESMF_DEP_SHRD_PATH =" >> fv3.mk
@echo "ESMF_DEP_SHRD_LIBS =" >> fv3.mk
@echo
@@ -74,6 +75,7 @@ clean:
@echo
(cd fms && make clean)
(cd gfsphysics && make clean)
+ (cd ipd && make clean)
(cd stochastic_physics && make clean)
(cd io && make clean)
(cd atmos_cubed_sphere && make clean)
diff --git a/module_fcst_grid_comp.F90 b/module_fcst_grid_comp.F90
index 50725d9c4..c0373bc1e 100644
--- a/module_fcst_grid_comp.F90
+++ b/module_fcst_grid_comp.F90
@@ -20,10 +20,10 @@ module module_fcst_grid_comp
NOLEAP, NO_CALENDAR, date_to_string, &
get_date
- use atmos_model_mod, only: atmos_model_init, atmos_model_end, &
- update_atmos_model_dynamics, &
- update_atmos_radiation_physics, &
- update_atmos_model_state, &
+ use atmos_model_mod, only: atmos_model_init, atmos_model_end, &
+ update_atmos_model_dynamics, &
+ update_atmos_radiation_physics, &
+ update_atmos_model_state, &
atmos_data_type, atmos_model_restart
use constants_mod, only: constants_init
@@ -468,7 +468,7 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc)
return ! bail out
enddo
!
- call fv_phys_bundle_setup(atm_int_state%Atm%axes, &
+ call fv_phys_bundle_setup(atm_int_state%Atm%diag, atm_int_state%Atm%axes, &
fieldbundlephys, fcstgrid, quilting, nbdlphys)
!
! Add the field to the importState so parent can connect to it