diff --git a/physics/GFS_suite_interstitial.F90 b/physics/GFS_suite_interstitial.F90 index 8d058e46f..0ea98446a 100644 --- a/physics/GFS_suite_interstitial.F90 +++ b/physics/GFS_suite_interstitial.F90 @@ -289,17 +289,63 @@ end subroutine GFS_suite_interstitial_2_run end module GFS_suite_interstitial_2 - module GFS_suite_update_stateout + module GFS_suite_stateout_reset contains - subroutine GFS_suite_update_stateout_init () - end subroutine GFS_suite_update_stateout_init + subroutine GFS_suite_stateout_reset_init () + end subroutine GFS_suite_stateout_reset_init - subroutine GFS_suite_update_stateout_finalize() - end subroutine GFS_suite_update_stateout_finalize + subroutine GFS_suite_stateout_reset_finalize() + end subroutine GFS_suite_stateout_reset_finalize -!> \section arg_table_GFS_suite_update_stateout_run Argument Table +!> \section arg_table_GFS_suite_stateout_reset_run Argument Table +!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | +!! |----------------|--------------------------------------------------------------|-----------------------------------------------------------------------|---------------|------|-------------------|-----------|--------|----------| +!! | Statein | FV3-GFS_Statein_type | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | +!! | Stateout | FV3-GFS_Stateout_type | Fortran DDT containing FV3-GFS prognostic state to return to dycore | DDT | 0 | GFS_stateout_type | | inout | F | +!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | +!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | +!! + subroutine GFS_suite_stateout_reset_run (Statein, Stateout, errmsg, errflg) + + use machine, only: kind_phys + use GFS_typedefs, only: GFS_statein_type, GFS_stateout_type + + implicit none + + ! interface variables + type(GFS_statein_type), intent(in) :: Statein + type(GFS_stateout_type), intent(inout) :: Stateout + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + Stateout%gt0(:,:) = Statein%tgrs(:,:) + Stateout%gu0(:,:) = Statein%ugrs(:,:) + Stateout%gv0(:,:) = Statein%vgrs(:,:) + Stateout%gq0(:,:,:) = Statein%qgrs(:,:,:) + + end subroutine GFS_suite_stateout_reset_run + + end module GFS_suite_stateout_reset + + + module GFS_suite_stateout_update + + contains + + subroutine GFS_suite_stateout_update_init () + end subroutine GFS_suite_stateout_update_init + + subroutine GFS_suite_stateout_update_finalize() + end subroutine GFS_suite_stateout_update_finalize + +!> \section arg_table_GFS_suite_stateout_update_run Argument Table !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |----------------|--------------------------------------------------------------|-----------------------------------------------------------------------|---------------|------|-------------------|-----------|--------|----------| !! | Statein | FV3-GFS_Statein_type | Fortran DDT containing FV3-GFS prognostic state data in from dycore | DDT | 0 | GFS_statein_type | | in | F | @@ -313,7 +359,7 @@ end subroutine GFS_suite_update_stateout_finalize !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine GFS_suite_update_stateout_run (Statein, Model, Grid, dudt, dvdt, dtdt, dqdt, Stateout, errmsg, errflg) + subroutine GFS_suite_stateout_update_run (Statein, Model, Grid, dudt, dvdt, dtdt, dqdt, Stateout, errmsg, errflg) use machine, only: kind_phys use GFS_typedefs, only: GFS_control_type, GFS_statein_type, GFS_grid_type, GFS_stateout_type @@ -330,7 +376,7 @@ subroutine GFS_suite_update_stateout_run (Statein, Model, Grid, dudt, dvdt, dtdt real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levs, Model%ntrac), intent(in) :: dqdt character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + integer, intent(out) :: errflg ! Initialize CCPP error handling variables errmsg = '' @@ -341,9 +387,9 @@ subroutine GFS_suite_update_stateout_run (Statein, Model, Grid, dudt, dvdt, dtdt Stateout%gv0(:,:) = Statein%vgrs(:,:) + dvdt(:,:) * Model%dtp Stateout%gq0(:,:,:) = Statein%qgrs(:,:,:) + dqdt(:,:,:) * Model%dtp - end subroutine GFS_suite_update_stateout_run + end subroutine GFS_suite_stateout_update_run - end module GFS_suite_update_stateout + end module GFS_suite_stateout_update module GFS_suite_interstitial_3 diff --git a/physics/GFS_surface_generic.f90 b/physics/GFS_surface_generic.f90 index 4de1f57f2..89722a2a2 100644 --- a/physics/GFS_surface_generic.f90 +++ b/physics/GFS_surface_generic.f90 @@ -144,7 +144,7 @@ end subroutine GFS_surface_generic_post_finalize !! | ep1d | surface_upward_potential_latent_heat_flux | surface upward potential latent heat flux | W m-2 | 1 | real | kind_phys | in | F | !! | gflx | upward_heat_flux_in_soil | upward soil heat flux | W m-2 | 1 | real | kind_phys | in | F | !! | tgrs_1 | air_temperature_at_lowest_model_layer | mean temperature at lowest model layer | K | 1 | real | kind_phys | in | F | -!! | qgrs_1 | specific_humidity_at_lowest_model_layer | specific humidity at lowest model layer | kg kg-1 | 1 | real | kind_phys | in | F | +!! | qgrs_1 | water_vapor_specific_humidity_at_lowest_model_layer | specific humidity at lowest model layer | kg kg-1 | 1 | real | kind_phys | in | F | !! | ugrs_1 | x_wind_at_lowest_model_layer | zonal wind at lowest model layer | m s-1 | 1 | real | kind_phys | in | F | !! | vgrs_1 | y_wind_at_lowest_model_layer | meridional wind at lowest model layer | m s-1 | 1 | real | kind_phys | in | F | !! | adjsfcdlw | surface_downwelling_longwave_flux | surface downwelling longwave flux at current time | W m-2 | 1 | real | kind_phys | in | F | @@ -176,7 +176,7 @@ end subroutine GFS_surface_generic_post_finalize !! | epi | instantaneous_surface_potential_evaporation | instantaneous sfc potential evaporation | W m-2 | 1 | real | kind_phys | inout | F | !! | gfluxi | instantaneous_surface_ground_heat_flux | instantaneous sfc ground heat flux | W m-2 | 1 | real | kind_phys | inout | F | !! | t1 | air_temperature_at_lowest_model_layer_for_diag | layer 1 temperature for diag | K | 1 | real | kind_phys | inout | F | -!! | q1 | specific_humidity_at_lowest_model_layer_for_diag | layer 1 specific humidity for diag | kg kg-1 | 1 | real | kind_phys | inout | F | +!! | q1 | water_vapor_specific_humidity_at_lowest_model_layer_for_diag | layer 1 specific humidity for diag | kg kg-1 | 1 | real | kind_phys | inout | F | !! | u1 | x_wind_at_lowest_model_layer_for_diag | layer 1 x wind for diag | m s-1 | 1 | real | kind_phys | inout | F | !! | v1 | y_wind_at_lowest_model_layer_for_diag | layer 1 y wind for diag | m s-1 | 1 | real | kind_phys | inout | F | !! | dlwsfci_cpl | instantaneous_surface_downwelling_longwave_flux_for_coupling | instantaneous sfc downward lw flux | W m-2 | 1 | real | kind_phys | inout | F | diff --git a/physics/gmtb_scm_sfc_flux_spec.f90 b/physics/gmtb_scm_sfc_flux_spec.f90 index 49d9f3209..11596a6c4 100644 --- a/physics/gmtb_scm_sfc_flux_spec.f90 +++ b/physics/gmtb_scm_sfc_flux_spec.f90 @@ -31,7 +31,7 @@ end subroutine gmtb_scm_sfc_flux_spec_finalize !! | v1 | y_wind_at_lowest_model_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | !! | z1 | height_above_ground_at_lowest_model_layer | height above ground at 1st model layer | m | 1 | real | kind_phys | in | F | !! | t1 | air_temperature_at_lowest_model_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | -!! | q1 | specific_humidity_at_lowest_model_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | +!! | q1 | water_vapor_specific_humidity_at_lowest_model_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !! | p1 | air_pressure_at_lowest_model_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | !! | roughness_length | surface_roughness_length | surface roughness length | cm | 1 | real | kind_phys | in | F | !! | spec_sh_flux | specified_kinematic_surface_upward_sensible_heat_flux | specified kinematic surface upward sensible heat flux | K m s-1 | 1 | real | kind_phys | in | F | diff --git a/physics/h2ophys.f b/physics/h2ophys.f index 8ee3c375c..11106f83b 100755 --- a/physics/h2ophys.f +++ b/physics/h2ophys.f @@ -30,7 +30,6 @@ end subroutine h2ophys_init !! | h2opltc | h2o_forcing | water forcing data | various | 3 | real | kind_phys | in | F | !! | h2o_coeff | number_of_coefficients_in_h2o_forcing_data | number of coefficients in h2o forcing data | index | 0 | integer | | in | F | !! | ldiag3d | flag_diagnostics_3D | flag for calculating 3-D diagnostic fields | flag | 0 | logical | | in | F | -!! | h2op | change_in_h2o_concentration | change in h2o concentration | kg kg-1 | 3 | real | kind_phys | inout | F | !! | me | mpi_rank | rank of the current MPI task | index | 0 | integer | | in | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | @@ -38,7 +37,7 @@ end subroutine h2ophys_init !! \section genal_h2ophys GFS H2O Physics Scheme General Algorithm !> @{ subroutine h2ophys_run(ix, im, levs, kh2o, dt, h2o, ph2o, prsl, - & h2opltc, h2o_coeff, ldiag3d, h2op, me, + & h2opltc, h2o_coeff, ldiag3d, me, & errmsg, errflg) ! ! May 2015 - Shrinivas Moorthi - Adaptation of NRL H2O physics for @@ -57,7 +56,7 @@ subroutine h2ophys_run(ix, im, levs, kh2o, dt, h2o, ph2o, prsl, real(kind=kind_phys), intent(in) :: prsl(ix,levs) real(kind=kind_phys), intent(in) :: h2opltc(ix,kh2o,h2o_coeff) logical , intent(in) :: ldiag3d - real(kind=kind_phys), intent(inout) :: h2op(ix,levs,h2o_coeff) + !real(kind=kind_phys), intent(inout) :: h2op(ix,levs,h2o_coeff) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! local variables diff --git a/physics/ozphys.f b/physics/ozphys.f index f5e276589..efbbcc537 100644 --- a/physics/ozphys.f +++ b/physics/ozphys.f @@ -1,31 +1,3 @@ -!> \file ozphys.f -!! This file is ozone sources and sinks. - -! \defgroup GFS_ozn GFS Ozone Physics -! - module ozphys_pre - contains - -!> \section arg_table_ozphys_pre_init Argument Table -!! - subroutine ozphys_pre_init() - end subroutine ozphys_pre_init - - -!> \section arg_table_ozphys_pre_run Argument Table -!! - subroutine ozphys_pre_run() - end subroutine ozphys_pre_run - - -!> \section arg_table_ozphys_pre_finalize Argument Table -!! - subroutine ozphys_pre_finalize() - end subroutine ozphys_pre_finalize - - end module ozphys_pre - - module ozphys contains @@ -213,70 +185,3 @@ subroutine ozphys_finalize() end subroutine ozphys_finalize end module ozphys - - - module ozphys_post - - contains - -!> \section arg_table_ozphys_post_init Argument Table -!! - subroutine ozphys_post_init() - end subroutine ozphys_post_init - - -#if 0 -! DH* TODO - split dq3dt into individual components? Or replace Interstitial%dq3dt_loc(:,:,1:) / dq3dt_loc(:,:,1:) -! in GFS_physics_driver entirely with Diag%dq3dt(:,:,6:) ? *DH -!! \section arg_table_ozphys_post_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|-------------------------------------------------------------------|-------------------------------------------------------------------|---------|------|---------------|-----------|--------|----------| -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | levs | vertical_dimension | number of vertical layers | count | 0 | integer | | in | F | -!! | oz_coeff | number_of_coefficients_in_ozone_forcing_data | number of coefficients in ozone forcing data | index | 0 | integer | | in | F | -!! | ldiag3d | flag_diagnostics_3D | logical flag for 3D diagnostics | flag | 0 | logical | | in | F | -!! | ozp | change_in_ozone_concentration | change in ozone concentration | kg kg-1 | 3 | real | kind_phys | in | F | -!! | dq3dt | cumulative_change_in_water_vapor_specific_humidity_due_to_physics | cumulative change in water vapor specific humidity due to physics | kg kg-1 | 3 | real | kind_phys | inout | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! -#endif - subroutine ozphys_post_run(im, levs, oz_coeff, ldiag3d, ozp, & - & dq3dt, errmsg, errflg) - - use GFS_typedefs, only: GFS_diag_type - use machine, only: kind_phys - - implicit none - - integer, intent(in) :: im, levs, oz_coeff - logical, intent(in) :: ldiag3d - real(kind=kind_phys), intent(in) :: ozp(im,levs,oz_coeff) - real(kind=kind_phys), intent(inout) :: dq3dt(im,levs,oz_coeff+5) - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (ldiag3d) then - dq3dt(:,:,6) = ozp(:,:,1) - dq3dt(:,:,7) = ozp(:,:,2) - dq3dt(:,:,8) = ozp(:,:,3) - dq3dt(:,:,9) = ozp(:,:,4) - end if - - return - - end subroutine ozphys_post_run - - -!> \section arg_table_ozphys_post_finalize Argument Table -!! - subroutine ozphys_post_finalize() - end subroutine ozphys_post_finalize - - - end module ozphys_post - diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index bd36f8dab..86fb9f39b 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -19,11 +19,15 @@ end subroutine sfc_diag_finalize !! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | !! |----------------|------------------------------------------------------------------------------|-------------------------------------------------------------|---------------|------|-----------|-----------|--------|----------| !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | +!! | grav | gravitational_acceleration | gravitational acceleration | m s-2 | 0 | real | kind_phys | in | F | +!! | cp | specific_heat_of_dry_air_at_constant_pressure | specific heat of dry air at constant pressure | J kg-1 K-1 | 0 | real | kind_phys | in | F | +!! | eps | ratio_of_dry_air_to_water_vapor_gas_constants | rd/rv | none | 0 | real | kind_phys | in | F | +!! | epsm1 | ratio_of_dry_air_to_water_vapor_gas_constants_minus_one | (rd/rv) - 1 | none | 0 | real | kind_phys | in | F | !! | ps | surface_air_pressure | surface pressure | Pa | 1 | real | kind_phys | in | F | -!! | u1 | x_wind_at_lowest_model_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | -!! | v1 | y_wind_at_lowest_model_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | -!! | t1 | air_temperature_at_lowest_model_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | -!! | q1 | specific_humidity_at_lowest_model_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | +!! | u1 | x_wind_at_lowest_model_layer_updated_by_physics | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | +!! | v1 | y_wind_at_lowest_model_layer_updated_by_physics | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | +!! | t1 | air_temperature_at_lowest_model_layer_updated_by_physics | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | +!! | q1 | water_vapor_specific_humidity_at_lowest_model_layer_updated_by_physics | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !! | tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | in | F | !! | qsurf | surface_specific_humidity | surface specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !! | f10m | ratio_of_wind_at_lowest_model_layer_and_wind_at_10m | ratio of fm10 and fm | ratio | 1 | real | kind_phys | out | F | @@ -43,33 +47,32 @@ end subroutine sfc_diag_finalize !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ -! DH* TODO add intent() information for variables subroutine sfc_diag_run & - & (im,ps,u1,v1,t1,q1, & + & (im,grav,cp,eps,epsm1,ps,u1,v1,t1,q1, & & tskin,qsurf,f10m,u10m,v10m,t2m,q2m, & & prslki,evap,fm,fh,fm10,fh2,errmsg,errflg & & ) -!! ! use machine , only : kind_phys use funcphys, only : fpvs - use physcons, grav => con_g, cp => con_cp, & - & eps => con_eps, epsm1 => con_epsm1 implicit none ! - integer im - real, dimension(im) :: ps, u1, v1, t1, q1, tskin, qsurf, & - & f10m, u10m, v10m, t2m, q2m, prslki, evap, & - & fm, fh, fm10, fh2 + integer, intent(in) :: im + real(kind=kind_phys), intent(in) :: grav,cp,eps,epsm1 + real(kind=kind_phys), dimension(im), intent(in) :: & + & ps, u1, v1, t1, q1, tskin, & + & qsurf, prslki, evap, fm, fh, fm10, fh2 + real(kind=kind_phys), dimension(im), intent(out) :: & + & f10m, u10m, v10m, t2m, q2m character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! ! locals ! - real (kind=kind_phys), parameter :: qmin=1.0e-8 - integer k,i + real(kind=kind_phys), parameter :: qmin=1.0e-8 + integer ::k,i ! - real(kind=kind_phys) fhi, qss, wrk + real(kind=kind_phys) :: fhi, qss, wrk ! real(kind=kind_phys) sig2k, fhi, qss ! ! real, parameter :: g=grav diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index ce8b6decb..f984df646 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -24,7 +24,7 @@ end subroutine sfc_ex_coef_finalize !! | u1 | x_wind_at_lowest_model_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | !! | v1 | y_wind_at_lowest_model_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | !! | t1 | air_temperature_at_lowest_model_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | -!! | q1 | specific_humidity_at_lowest_model_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | +!! | q1 | water_vapor_specific_humidity_at_lowest_model_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !! | z1 | height_above_ground_at_lowest_model_layer | height above ground at 1st model layer | m | 1 | real | kind_phys | in | F | !! | snwdph | surface_snow_thickness_water_equivalent | water equivalent surface snow thickness | mm | 1 | real | kind_phys | in | F | !! | tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | in | F | diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 867a92264..66d13019e 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -326,7 +326,7 @@ end subroutine lsm_noah_finalize !! | u1 | x_wind_at_lowest_model_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | !! | v1 | y_wind_at_lowest_model_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | !! | t1 | air_temperature_at_lowest_model_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | -!! | q1 | specific_humidity_at_lowest_model_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | +!! | q1 | water_vapor_specific_humidity_at_lowest_model_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !! | soiltyp | soil_type_classification | soil type at each grid cell | index | 1 | integer | | in | F | !! | vegtype | vegetation_type_classification | vegetation type at each grid cell | index | 1 | integer | | in | F | !! | sigmaf | bounded_vegetation_area_fraction | areal fractional cover of green vegetation bounded on the bottom| frac | 1 | real | kind_phys | in | F | diff --git a/physics/sfc_nst.f b/physics/sfc_nst.f index d4f86e1f4..8b303337c 100644 --- a/physics/sfc_nst.f +++ b/physics/sfc_nst.f @@ -31,7 +31,7 @@ end subroutine sfc_nst_finalize !! | u1 | x_wind_at_lowest_model_layer | x component of surface layer wind | m s-1 | 1 | real | kind_phys | in | F | !! | v1 | y_wind_at_lowest_model_layer | y component of surface layer wind | m s-1 | 1 | real | kind_phys | in | F | !! | t1 | air_temperature_at_lowest_model_layer | surface layer mean temperature | K | 1 | real | kind_phys | in | F | -!! | q1 | specific_humidity_at_lowest_model_layer | surface layer mean specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | +!! | q1 | water_vapor_specific_humidity_at_lowest_model_layer | surface layer mean specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !! | tref | sea_surface_reference_temperature | reference/foundation temperature | K | 1 | real | kind_phys | in | F | !! | cm | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | in | F | !! | ch | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | in | F | diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index 34424b5a0..4755d005c 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -1,74 +1,6 @@ !> \file sfc_sice.f !! This file contains the GFS three level thermodynamic sea ice model. - module sfc_sice_pre - contains - -!! \section arg_table_sfc_sice_pre_init Argument Table -!! - subroutine sfc_sice_pre_init - end subroutine sfc_sice_pre_init - -!! \section arg_table_sfc_sice_pre_finalize Argument Table -!! - subroutine sfc_sice_pre_finalize - end subroutine sfc_sice_pre_finalize - -!! \section arg_table_sfc_sice_pre_run Argument Table -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------|------------------------------------------------------------------------------|-------------------------------------------------------------|-------|------|-----------|-----------|--------|----------| -!! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | -!! | fice | sea_ice_concentration | sea-ice concentration [0,1] | frac | 1 | real | kind_phys | in | F | -!! | hice | sea_ice_thickness | sea-ice thickness | m | 1 | real | kind_phys | in | F | -!! | tisfc | sea_ice_temperature | sea-ice surface temperature | K | 1 | real | kind_phys | in | F | -!! | prsik | dimensionless_exner_function_at_lowest_model_interface | dimensionless Exner function at lowest model interface | none | 1 | real | kind_phys | in | F | -!! | prslk | dimensionless_exner_function_at_lowest_model_layer | dimensionless Exner function at lowest model layer | none | 1 | real | kind_phys | in | F | -!! | cice | sea_ice_concentration_for_physics | sea-ice concentration [0,1] | frac | 1 | real | kind_phys | out | F | -!! | zice | sea_ice_thickness_for_physics | sea-ice thickness | m | 1 | real | kind_phys | out | F | -!! | tice | sea_ice_temperature_for_physics | sea-ice surface temperature | K | 1 | real | kind_phys | out | F | -!! | work3 | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | out | F | -!! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | -!! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | -!! - subroutine sfc_sice_pre_run(im, fice, hice, tisfc, prsik, prslk, & - & cice, zice, tice, work3, errmsg, errflg) - - use machine, only : kind_phys - - implicit none - -! --- inputs - integer :: im - real(kind=kind_phys), dimension(im), intent(in) :: fice, hice, & - & tisfc, prsik, prslk - -! --- input/output - real(kind=kind_phys), dimension(im), intent(out) :: cice, zice, & - & tice, work3 - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - -! --- locals - integer :: i - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - do i = 1, im -! transfer ice thickness & concentration from global to local variables - zice(i) = hice(i) - cice(i) = fice(i) - tice(i) = tisfc(i) - work3(i)= prsik(i) / prslk(i) - enddo - - return - end subroutine sfc_sice_pre_run - - end module sfc_sice_pre - module sfc_sice_post contains @@ -88,18 +20,15 @@ end subroutine sfc_sice_post_finalize !! |----------------|-------------------------------------------------------|---------------------------------------------|-------|------|-----------|-----------|--------|----------| !! | im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | in | F | !! | islmsk | sea_land_ice_mask | sea/land/ice mask (=0/1/2) | flag | 1 | integer | | in | F | -!! | cice | sea_ice_concentration_for_physics | sea-ice concentration [0,1] | frac | 1 | real | kind_phys | in | F | -!! | zice | sea_ice_thickness_for_physics | sea-ice thickness | m | 1 | real | kind_phys | in | F | -!! | tice | sea_ice_temperature_for_physics | sea-ice surface temperature | K | 1 | real | kind_phys | in | F | !! | tsfc | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | in | F | -!! | fice | sea_ice_concentration | sea-ice concentration [0,1] | frac | 1 | real | kind_phys | out | F | -!! | hice | sea_ice_thickness | sea-ice thickness | m | 1 | real | kind_phys | out | F | -!! | tisfc | sea_ice_temperature | sea-ice surface temperature | K | 1 | real | kind_phys | out | F | +!! | fice | sea_ice_concentration | sea-ice concentration [0,1] | frac | 1 | real | kind_phys | inout | F | +!! | hice | sea_ice_thickness | sea-ice thickness | m | 1 | real | kind_phys | inout | F | +!! | tisfc | sea_ice_temperature | sea-ice surface temperature | K | 1 | real | kind_phys | inout | F | !! | errmsg | ccpp_error_message | error message for error handling in CCPP | none | 0 | character | len=* | out | F | !! | errflg | ccpp_error_flag | error flag for error handling in CCPP | flag | 0 | integer | | out | F | !! - subroutine sfc_sice_post_run(im, islmsk, cice, zice, tice, tsfc, & - & fice, hice, tisfc, errmsg, errflg) + subroutine sfc_sice_post_run(im, islmsk, tsfc, fice, hice, tisfc, & + & errmsg, errflg) use machine, only : kind_phys @@ -108,11 +37,10 @@ subroutine sfc_sice_post_run(im, islmsk, cice, zice, tice, tsfc, & ! --- input integer :: im integer, dimension(im) :: islmsk - real(kind=kind_phys), dimension(im), intent(in) :: cice, zice, & - & tice, tsfc + real(kind=kind_phys), dimension(im), intent(in) :: tsfc -! --- outputs - real(kind=kind_phys), dimension(im), intent(out) :: fice, hice, & +! --- input/output + real(kind=kind_phys), dimension(im), intent(inout) :: fice, hice, & & tisfc character(len=*), intent(out) :: errmsg @@ -128,11 +56,7 @@ subroutine sfc_sice_post_run(im, islmsk, cice, zice, tice, tsfc, & !--- return updated ice thickness & concentration to global arrays ! where there is no ice, set temperature to surface skin temperature. do i = 1, im - if (islmsk(i) == 2) then - hice(i) = zice(i) - fice(i) = cice(i) - tisfc(i) = tice(i) - else + if (islmsk(i) /= 2) then hice(i) = 0.0 fice(i) = 0.0 tisfc(i) = tsfc(i) @@ -168,7 +92,7 @@ end subroutine sfc_sice_finalize !! | u1 | x_wind_at_lowest_model_layer | u component of surface layer wind | m s-1 | 1 | real | kind_phys | in | F | !! | v1 | y_wind_at_lowest_model_layer | v component of surface layer wind | m s-1 | 1 | real | kind_phys | in | F | !! | t1 | air_temperature_at_lowest_model_layer | surface layer mean temperature | K | 1 | real | kind_phys | in | F | -!! | q1 | specific_humidity_at_lowest_model_layer | surface layer mean specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | +!! | q1 | water_vapor_specific_humidity_at_lowest_model_layer | surface layer mean specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !! | delt | time_step_for_dynamics | time step | s | 0 | real | kind_phys | in | F | !! | sfcemis | surface_longwave_emissivity | sfc lw emissivity | frac | 1 | real | kind_phys | in | F | !! | dlwflx | surface_downwelling_longwave_flux_absorbed_by_ground | total sky surface downward longwave flux absorbed by the ground | W m-2 | 1 | real | kind_phys | in | F | @@ -186,9 +110,9 @@ end subroutine sfc_sice_finalize !! | lsm | flag_for_land_surface_scheme | flag for land sfc scheme =0: osu; =1: noah | flag | 0 | integer | | in | F | !! | lprnt | flag_print | switch for printing sample column to stdout | flag | 0 | logical | | in | F | !! | ipr | horizontal_index_of_printed_column | horizontal index of printed column | index | 0 | integer | | in | F | -!! | hice | sea_ice_thickness_for_physics | sea-ice thickness | m | 1 | real | kind_phys | inout | F | -!! | fice | sea_ice_concentration_for_physics | sea-ice concentration [0,1] | frac | 1 | real | kind_phys | inout | F | -!! | tice | sea_ice_temperature_for_physics | sea-ice surface temperature | K | 1 | real | kind_phys | inout | F | +!! | hice | sea_ice_thickness | sea-ice thickness | m | 1 | real | kind_phys | inout | F | +!! | fice | sea_ice_concentration | sea-ice concentration [0,1] | frac | 1 | real | kind_phys | inout | F | +!! | tice | sea_ice_temperature | sea-ice surface temperature | K | 1 | real | kind_phys | inout | F | !! | weasd | water_equivalent_accumulated_snow_depth | water equivalent accumulated snow depth | mm | 1 | real | kind_phys | inout | F | !! | tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | inout | F | !! | tprcp | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep | nonnegative precipitation amount in one dynamics time step | m | 1 | real | kind_phys | inout | F |