From 17c2248c1d033762b7e30a0dd4c68128935da5a6 Mon Sep 17 00:00:00 2001 From: Lulin Xue Date: Thu, 21 Sep 2017 11:55:35 -0600 Subject: [PATCH 01/22] modified: sfc_drv.f --- GFS_layer/GFS_physics_driver.F90 | 11 ++-- physics/sfc_diag.f | 37 +++++++++++++- physics/sfc_diff.f | 51 ++++++++++++++++++- physics/sfc_drv.f | 87 ++++++++++++++++++++++++++++++-- 4 files changed, 174 insertions(+), 12 deletions(-) diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index 9b92e4764..53f477cbf 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -866,7 +866,8 @@ subroutine GFS_physics_driver & ! ! if (lprnt) write(0,*)' tsea=',tsea(ipr),' tsurf=',tsurf(ipr),iter - call sfc_diff (im,Statein%pgr, Statein%ugrs, Statein%vgrs, & +! call sfc_diff (im,Statein%pgr, Statein%ugrs, Statein%vgrs, & + call sfc_ex_coef_run(im,Statein%pgr, Statein%ugrs, Statein%vgrs, & Statein%tgrs, Statein%qgrs, Diag%zlvl, & Sfcprop%snowd, Sfcprop%tsfc, Sfcprop%zorl, cd, & cdq, rb, Statein%prsl(1,1), work3, islmsk, stress, & @@ -965,7 +966,8 @@ subroutine GFS_physics_driver & ! if (lprnt) write(0,*)' tsead=',tsea(ipr),' tsurf=',tsurf(ipr),iter ! &,' pgr=',pgr(ipr),' sfcemis=',sfcemis(ipr) - call sfc_drv & +! call sfc_drv & + call lsmnoah_run & ! --- inputs: (im, Model%lsoil, Statein%pgr, Statein%ugrs, Statein%vgrs, & Statein%tgrs, Statein%qgrs, soiltyp, vegtype, sigmaf, & @@ -1070,9 +1072,10 @@ subroutine GFS_physics_driver & ! --- ... update near surface fields - call sfc_diag (im, Statein%pgr, Statein%ugrs, Statein%vgrs, & +! call sfc_diag (im, Statein%pgr, Statein%ugrs, Statein%vgrs, & + call sfc_diag_run(im, Statein%pgr, Statein%ugrs, Statein%vgrs, & Statein%tgrs, Statein%qgrs, Sfcprop%tsfc, qss, & - Sfcprop%f10m, Diag%u10m, Diag%v10m, & + Sfcprop%f10m, Diag%u10m, Diag%v10m, & Sfcprop%t2m, Sfcprop%q2m, work3, evap, & Sfcprop%ffmm, Sfcprop%ffhh, fm10, fh2) diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index 0ed0dfe13..6a91f997d 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -1,6 +1,37 @@ - subroutine sfc_diag(im,ps,u1,v1,t1,q1, + module surface_diagnose + contains + + subroutine sfc_diag_init + end subroutine sfc_diag_init + + subroutine sfc_diag_finalize + end subroutine sfc_diag_finalize + + subroutine sfc_diag_run(im,ps,u1,v1,t1,q1, & tskin,qsurf,f10m,u10m,v10m,t2m,q2m, & prslki,evap,fm,fh,fm10,fh2) + +!!| local var name | longname | description | units | rank | type | kind | intent | optional | +!!|----------------|-------------------------------------------------------------|-------------------------------------------------|------------|------|---------|-----------|--------|----------| +!!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | 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 | +!!| 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_level_and_wind_at_10m | ratio of fm10 and fm | ratio | 1 | real | kind_phys | out | F | +!!| u10m | x_wind_at_10m | x component of wind at 10 m | m s-1 | 1 | real | kind_phys | out | F | +!!| v10m | y_wind_at_10m | y component of wind at 10 m | m s-1 | 1 | real | kind_phys | out | F | +!!| t2m | temperature_at_2m | temperature at 2 m | K | 1 | real | kind_phys | out | F | +!!| q2m | specific_humidity_at_2m | specific humidity at 2 m | kg kg-1 | 1 | real | kind_phys | out | F | +!!| prslki | 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 | in | F | +!!| evap | surface_upward_latent_heat_flux | surface upward latent heat flux | W m-2 | 1 | real | kind_phys | in | F | +!!| fm | Monin-Obukhov_similarity_parameter_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | +!!| fh | Monin-Obukhov_similarity_parameter_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | +!!| fm10 | Monin-Obukhov_similarity_parameter_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | +!!| fh2 | Monin-Obukhov_similarity_parameter_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | ! use machine , only : kind_phys use funcphys, only : fpvs @@ -57,4 +88,6 @@ subroutine sfc_diag(im,ps,u1,v1,t1,q1, enddo return - end + end subroutine sfc_diag_run + + end module surface_diagnose diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 951997898..938d649be 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -1,10 +1,55 @@ - subroutine sfc_diff(im,ps,u1,v1,t1,q1,z1, + module surface_exchange_coefficients + contains + + subroutine sfc_ex_coef_init + end subroutine sfc_ex_coef_init + + subroutine sfc_ex_coef_finalize + end subroutine sfc_ex_coef_finalize + +! subroutine sfc_diff(im,ps,u1,v1,t1,q1,z1, + subroutine sfc_ex_coef_run(im,ps,u1,v1,t1,q1,z1, & snwdph,tskin,z0rl,cm,ch,rb, & prsl1,prslki,islimsk, & stress,fm,fh, & ustar,wind,ddvel,fm10,fh2, & sigmaf,vegtype,shdmax,ivegsrc, & tsurf,flag_iter,redrag) +!!| local var name | longname | description | units | rank | type | kind | intent | optional | +!!|----------------|-------------------------------------------------------------|-------------------------------------------------|------------|------|---------|-----------|--------|----------| +!!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | 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 | +!!| z1 | height_above_mean_sea_level_at_lowest_model_layer | height above mean sea level at 1st model layer | m | 1 | real | kind_phys | in | F | +!!| snwdph | surface_snow_thickness_water_equivalent | water equivalent surface snow thickness | m | 1 | real | kind_phys | in | F | +!!| tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | in | F | +!!| z0rl | surface_roughness_length | surface roughness length | m | 1 | real | kind_phys | inout | F | +!!| cm | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | out? | F | +!!| ch | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | out? | F | +!!| rb | bulk_richardson_number_at_lowest_model_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | out? | F | +!!| prsl1 | air_pressure_at_lowest_model_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | +!!| prslki | 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 | in | F | +!!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | +!!| stress | surface_wind_stress | surface wind stress | m2 s-2 | 1 | real | kind_phys | out? | F | +!!| fm | Monin-Obukhov_similarity_parameter_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out? | F | +!!| fh | Monin-Obukhov_similarity_parameter_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out? | F | +!!| ustar | surface_friction_velocity | surface friction velocity | m s-1 | 1 | real | kind_phys | out? | F | +!!| wind | surface_wind_speed | surface wind speed | m s-1 | 1 | real | kind_phys | out? | F | +!!| ddvel | surface_wind_enhancement_due_to_convection | surface wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | +!!| fm10 | Monin-Obukhov_similarity_parameter_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out? | F | +!!| fh2 | Monin-Obukhov_similarity_parameter_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out? | F | +!!| sigmaf | vegetation_area_fraction | areal fractional cover of green vegetation | frac | 1 | real | kind_phys | in | F | +!!| vegtype | cell_vegetation_type | vegetation type at each grid cell | index | 1 | integer | | in | F | +!!| shdmax | maximum_vegetation_area_fraction | max fractnl cover of green veg | frac | 1 | real | kind_phys | in | F | +!!| ivegsrc | vegetation_type | vegetation type data source umd or igbp | index | 0 | integer | | in | F | +!!| tsurf | surface_skin_temperature_after_iteration | surface skin temperature after iteration | K | 1 | real | kind_phys | in | F | +!!| flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | in | F | +!!| redrag | flag_for_reduced_drag_coefficient_over_sea | flag for reduced drag coefficient over sea | flag | 1 | logical | | in | F | + + ! use machine , only : kind_phys use funcphys, only : fpvs @@ -301,4 +346,6 @@ subroutine sfc_diff(im,ps,u1,v1,t1,q1,z1, enddo return - end + end subroutine sfc_ex_coef_run + + end module surface_exchange_coefficients diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 5195ed6a6..f316d0636 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -1,3 +1,12 @@ + module lsm_noah + contains + + subroutine lsmnoah_init + end subroutine lsmnoah_init + + subroutine lsmnoah_finalize + end subroutine lsmnoah_finalize + ! ===================================================================== ! ! description: ! ! ! @@ -52,7 +61,7 @@ ! cm - real, surface exchange coeff for momentum (m/s) im ! ! ch - real, surface exchange coeff heat & moisture(m/s) im ! ! prsl1 - real, sfc layer 1 mean pressure (pa) im ! -! prslki - real, im ! +! prslki - real, dimensionless exner function at layer 1 im ! ! zf - real, height of bottom layer (m) im ! ! islimsk - integer, sea/land/ice mask (=0/1/2) im ! ! ddvel - real, im ! @@ -104,7 +113,8 @@ ! ==================== end of description ===================== ! !----------------------------------- - subroutine sfc_drv & +! subroutine sfc_drv & + subroutine lsmnoah_run & !................................... ! --- inputs: & ( im, km, ps, u1, v1, t1, q1, soiltyp, vegtype, sigmaf, & @@ -120,7 +130,74 @@ subroutine sfc_drv & & cmm, chh, evbs, evcw, sbsno, snowc, stm, snohf, & & smcwlt2, smcref2, wet1 & & ) -! +!! +!!| local var name | longname | description | units | rank | type | kind | intent | optional | +!!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| +!!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | +!!| km | vertical_dimension | vertical layer dimension | index | 0 | integer | | 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 | +!!| soiltyp | cell_soil_type | soil type at each grid cell | index | 1 | integer | | in | F | +!!| vegtype | cell_vegetation_type | vegetation type at each grid cell | index | 1 | integer | | in | F | +!!| sigmaf | vegetation_area_fraction | areal fractional cover of green vegetation | frac | 1 | real | kind_phys | in | F | +!!| sfcemis | surface_longwave_emissivity | surface longwave emissivity | frac | 1 | real | kind_phys | in | F | +!!| dlwflx | surface_downwelling_longwave_flux | total sky surface downward longwave flux | W m-2 | 1 | real | kind_phys | in | F | +!!| dswsfc | surface_downwelling_shortwave_flux | total sky surface downward shortwave flux | W m-2 | 1 | real | kind_phys | in | F | +!!| snet | surface_net_downward_shortwave_flux | total sky surface net shortwave flux | W m-2 | 1 | real | kind_phys | in | F | +!!| delt | timestep_for_physics | physics time step | s | 0 | real | kind_phys | in | F | +!!| tg3 | deep_soil_temperature | bottom soil 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 | +!!| prsl1 | air_pressure_at_lowest_model_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | +!!| prslki | 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 | in | F | +!!| zf | height_above_mean_sea_level_at_lowest_model_layer | height above MSL at 1st model layer | m | 1 | real | kind_phys | in | F | +!!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | +!!| ddvel | surface_wind_enhancement_due_to_convection | surface wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | +!!| slopetyp | surface_slope_classification | class of sfc slope | index | 1 | integer | | in | F | +!!| shdmin | minimum_vegetation_area_fraction | min fractional coverage of green veg | frac | 1 | real | kind_phys | in | F | +!!| shdmax | maximum_vegetation_area_fraction | max fractnl cover of green veg (not used) | frac | 1 | real | kind_phys | in | F | +!!| snoalb | upper_bound_on_max_albedo_over_deep_snow | upper bound on max albedo over deep snow | frac | 1 | real | kind_phys | in | F | +!!| sfalb | surface_diffused_shortwave_albedo | mean surface diffused shortwave albedo | frac | 1 | real | kind_phys | in | F | +!!| flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | in | F | +!!| flag_guess | flag_for_guess_run | flag for guess run | flag | 1 | logical | | in | F | +!!| isot | soil_type | soil type (not used) | index | 0 | integer | | in | F | +!!| ivegsrc | vegetation_type | vegetation type data source umd or igbp | index | 0 | integer | | in | F | +!!| weasd | water_equivalent_accumulated_snow_depth | water equivalent accumulated snow depth | mm | 1 | real | kind_phys | inout | F | +!!| snwdph | water_equivalent_snow_depth_over_land | water equivalent snow depth over land | mm | 1 | real | kind_phys | inout | F | +!!| tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | inout | F | +!!| tprcp | precipitation_amount_in_one_timestep | total precipitation in each time step | kg m-2 | 1 | real | kind_phys | inout | F | +!!| srflag | flag_for_snow_or_rain_precipitation | flag for snow or rain precipitation | flag | 1 | real | kind_phys | inout | F | +!!| smc | volume_fraction_of_soil_moisture | volumetric fraction of soil moisture | frac | 2 | real | kind_phys | inout | F | +!!| stc | soil_temperature | soil temperature | K | 2 | real | kind_phys | inout | F | +!!| slc | volume_fraction_of_unfrozen_soil_moisture | volume fraction of unfrozen soil moisture | frac | 2 | real | kind_phys | inout | F | +!!| canopy | canopy_water_amount | canopy moisture content | kg m-2 | 1 | real | kind_phys | inout | F | +!!| trans | transpiration_flux | total plant transpiration rate | kg m-2 s-1 | 1 | real | kind_phys | inout | F | +!!| tsurf | surface_skin_temperature_after_iteration | surface skin temperature after iteration | K | 1 | real | kind_phys | inout | F | +!!| zorl | surface_roughness_length | surface roughness length | m | 1 | real | kind_phys | inout | F | +!!| sncovr1 | surface_snow_area_fraction | surface snow area fraction | frac | 1 | real | kind_phys | out | F | +!!| qsurf | surface_specific_humidity | surface specific humidity | kg kg-1 | 1 | real | kind_phys | out | F | +!!| gflux | upward_heat_flux_in_soil | upward soil heat flux | W m-2 | 1 | real | kind_phys | out | F | +!!| drain | subsurface_runoff_flux | subsurface runoff flux | kg m-2 s-1 | 1 | real | kind_phys | out | F | +!!| evap | surface_upward_latent_heat_flux | surface upward latent heat flux | W m-2 | 1 | real | kind_phys | out | F | +!!| hflx | surface_upward_sensible_heat_flux | surface upward sensible heat flux | W m-2 | 1 | real | kind_phys | out | F | +!!| ep | surface_upward_potential_latent_heat_flux | surface upward potential latent heat flux | W m-2 | 1 | real | kind_phys | out | F | +!!| runoff | surface_runoff_flux | surface runoff flux | kg m-2 s-1 | 1 | real | kind_phys | out | F | +!!| cmm | surface_drag_wind_speed_for_momentum_in_air | surf mom exch coef time mean surf wind | m s-1 | 1 | real | kind_phys | out | F | +!!| chh | surface_drag_mass_flux_for_heat_and_moisture_in_air | surf h&m exch coef time surf wind & density| kg m-2 s-1 | 1 | real | kind_phys | out | F | +!!| evbs | soil_upward_latent_heat_flux | soil upward latent heat flux | W m-2 | 1 | real | kind_phys | out | F | +!!| evcw | canopy_upward_latent_heat_flux | canopy upward latent heat flux | W m-2 | 1 | real | kind_phys | out | F | +!!| sbsno | snow_deposition_sublimation_upward_latent_heat_flux | latent heat flux from snow depo/subl | W m-2 | 1 | real | kind_phys | out | F | +!!| snowc | surface_snow_area_fraction | surface snow area fraction | frac | 1 | real | kind_phys | out | F | +!!| stm | soil_moisture_content | soil moisture content | kg m-2 | 1 | real | kind_phys | out | F | +!!| snohf | snow_freezing_rain_upward_latent_heat_flux | latent heat flux due to snow and frz rain | W m-2 | 1 | real | kind_phys | out | F | +!!| smcwlt2 | volume_fraction_of_condensed_water_in_soil_at_wilting_point | soil water fraction at wilting point | frac | 1 | real | kind_phys | out | F | +!!| smcref2 | threshold_volume_fraction_of_condensed_water_in_soil | soil moisture threshold | frac | 1 | real | kind_phys | out | F | +!!| wet1 | normalized_soil_wetness | normalized soil wetness | frac | 1 | real | kind_phys | out | F | + + use machine , only : kind_phys use funcphys, only : fpvs use physcons, only : grav => con_g, cp => con_cp, & @@ -544,6 +621,8 @@ subroutine sfc_drv & ! return !................................... - end subroutine sfc_drv +! end subroutine sfc_drv + end subroutine lsmnoah_run !----------------------------------- + end module lsm_noah From 918d6be031944e1b1ccf4b3e16e7b7e03663d42b Mon Sep 17 00:00:00 2001 From: Lulin Xue Date: Tue, 24 Oct 2017 10:57:20 -0600 Subject: [PATCH 02/22] temp update before doxygen work --- GFS_layer/GFS_physics_driver.F90 | 16 +++---- physics/sfc_diag.f | 47 +++++++++++++------- physics/sfc_diff.f | 55 +++++++++++++++-------- physics/sfc_drv.f | 75 ++++++++++++++++++++------------ 4 files changed, 122 insertions(+), 71 deletions(-) diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index 53f477cbf..090d0dac6 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -867,10 +867,10 @@ subroutine GFS_physics_driver & ! if (lprnt) write(0,*)' tsea=',tsea(ipr),' tsurf=',tsurf(ipr),iter ! call sfc_diff (im,Statein%pgr, Statein%ugrs, Statein%vgrs, & - call sfc_ex_coef_run(im,Statein%pgr, Statein%ugrs, Statein%vgrs, & - Statein%tgrs, Statein%qgrs, Diag%zlvl, & + call sfc_ex_coef_run(im,Statein%pgr, Statein%ugrs(:,1), Statein%vgrs(:,1), & + Statein%tgrs(:,1), Statein%qgrs(:,1,1), Diag%zlvl, & Sfcprop%snowd, Sfcprop%tsfc, Sfcprop%zorl, cd, & - cdq, rb, Statein%prsl(1,1), work3, islmsk, stress, & + cdq, rb, Statein%prsl(:,1), work3, islmsk, stress, & Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%uustar, & wind, Tbd%phy_f2d(1,Model%num_p2d), fm10, fh2, & sigmaf, vegtype, Sfcprop%shdmax, Model%ivegsrc, & @@ -969,10 +969,10 @@ subroutine GFS_physics_driver & ! call sfc_drv & call lsmnoah_run & ! --- inputs: - (im, Model%lsoil, Statein%pgr, Statein%ugrs, Statein%vgrs, & - Statein%tgrs, Statein%qgrs, soiltyp, vegtype, sigmaf, & + (im, Model%lsoil, Statein%pgr, Statein%ugrs(:,1), Statein%vgrs(:,1), & + Statein%tgrs(:,1), Statein%qgrs(:,1), soiltyp, vegtype, sigmaf, & Radtend%semis, gabsbdlw, adjsfcdsw, adjsfcnsw, dtf, & - Sfcprop%tg3, cd, cdq, Statein%prsl(1,1), work3, DIag%zlvl, & + Sfcprop%tg3, cd, cdq, Statein%prsl(:,1), work3, DIag%zlvl, & islmsk, Tbd%phy_f2d(1,Model%num_p2d), slopetyp, & Sfcprop%shdmin, Sfcprop%shdmax, Sfcprop%snoalb, & Radtend%sfalb, flag_iter, flag_guess, Model%isot, & @@ -1073,8 +1073,8 @@ subroutine GFS_physics_driver & ! --- ... update near surface fields ! call sfc_diag (im, Statein%pgr, Statein%ugrs, Statein%vgrs, & - call sfc_diag_run(im, Statein%pgr, Statein%ugrs, Statein%vgrs, & - Statein%tgrs, Statein%qgrs, Sfcprop%tsfc, qss, & + call sfc_diag_run(im, Statein%pgr, Statein%ugrs(:,1), Statein%vgrs(:,1), & + Statein%tgrs(:,1), Statein%qgrs(:,1), Sfcprop%tsfc, qss, & Sfcprop%f10m, Diag%u10m, Diag%v10m, & Sfcprop%t2m, Sfcprop%q2m, work3, evap, & Sfcprop%ffmm, Sfcprop%ffhh, fm10, fh2) diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index 6a91f997d..0b947247e 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -1,3 +1,12 @@ +!> \file sfc_diag.f +!! This file contains the land surface diagnose calculation scheme. + +!> \defgroup Land Surface Diagnose Calculation +!! @{ +!! \brief Brief description of the parameterization +!! \section diagram Calling Hierarchy Diagram +!! \section intraphysics Intraphysics Communication + module surface_diagnose contains @@ -7,31 +16,37 @@ end subroutine sfc_diag_init subroutine sfc_diag_finalize end subroutine sfc_diag_finalize - subroutine sfc_diag_run(im,ps,u1,v1,t1,q1, - & tskin,qsurf,f10m,u10m,v10m,t2m,q2m, - & prslki,evap,fm,fh,fm10,fh2) - +!> \brief Brief description of the subroutine +!! +!! \section arg_table_sfc_diag_run Arguments !!| local var name | longname | description | units | rank | type | kind | intent | optional | !!|----------------|-------------------------------------------------------------|-------------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | 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_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | +!!| v1 | y_wind_at_lowest_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | +!!| t1 | air_temperature_at_lowest_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | +!!| q1 | specific_humidity_at_lowest_layer | 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_level_and_wind_at_10m | ratio of fm10 and fm | ratio | 1 | real | kind_phys | out | F | +!!| f10m | ratio_of_wind_at_lowest_layer_and_wind_at_10m | ratio of fm10 and fm | ratio | 1 | real | kind_phys | out | F | !!| u10m | x_wind_at_10m | x component of wind at 10 m | m s-1 | 1 | real | kind_phys | out | F | !!| v10m | y_wind_at_10m | y component of wind at 10 m | m s-1 | 1 | real | kind_phys | out | F | !!| t2m | temperature_at_2m | temperature at 2 m | K | 1 | real | kind_phys | out | F | !!| q2m | specific_humidity_at_2m | specific humidity at 2 m | kg kg-1 | 1 | real | kind_phys | out | F | -!!| prslki | 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 | in | F | -!!| evap | surface_upward_latent_heat_flux | surface upward latent heat flux | W m-2 | 1 | real | kind_phys | in | F | -!!| fm | Monin-Obukhov_similarity_parameter_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | -!!| fh | Monin-Obukhov_similarity_parameter_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | -!!| fm10 | Monin-Obukhov_similarity_parameter_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | -!!| fh2 | Monin-Obukhov_similarity_parameter_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | +!!| prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | in | F | +!!| evap | kinematic_surface_upward_latent_heat_flux | surface upward evaporation flux | kg kg-1 m s-1 | 1 | real | kind_phys | in | F | +!!| fm | Monin-Obukhov_similarity_function_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | +!!| fh | Monin-Obukhov_similarity_function_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | +!!| fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | +!!| fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | +!! \section general General Algorithm +!! \section detailed Detailed Algorithm +!! @{ + subroutine sfc_diag_run(im,ps,u1,v1,t1,q1, + & tskin,qsurf,f10m,u10m,v10m,t2m,q2m, + & prslki,evap,fm,fh,fm10,fh2) + ! use machine , only : kind_phys use funcphys, only : fpvs @@ -89,5 +104,7 @@ subroutine sfc_diag_run(im,ps,u1,v1,t1,q1, return end subroutine sfc_diag_run +!> @} end module surface_diagnose +!> @} diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 938d649be..09c8273b8 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -1,3 +1,12 @@ +!> \file sfc_diff.f +!! This file contains the surface exchange coefficient calculation scheme. + +!> \defgroup Surface Exchange Coefficient Calculation +!! @{ +!! \brief Brief description of the scheme +!! \section diagram Calling Hierarchy Diagram +!! \section intraphysics Intraphysics Communication + module surface_exchange_coefficients contains @@ -8,39 +17,35 @@ subroutine sfc_ex_coef_finalize end subroutine sfc_ex_coef_finalize ! subroutine sfc_diff(im,ps,u1,v1,t1,q1,z1, - subroutine sfc_ex_coef_run(im,ps,u1,v1,t1,q1,z1, - & snwdph,tskin,z0rl,cm,ch,rb, - & prsl1,prslki,islimsk, - & stress,fm,fh, - & ustar,wind,ddvel,fm10,fh2, - & sigmaf,vegtype,shdmax,ivegsrc, - & tsurf,flag_iter,redrag) +!> \brief Brief description of the subroutine +!! +!! \section arg_table_sfc_ex_coef_run Arguments !!| local var name | longname | description | units | rank | type | kind | intent | optional | !!|----------------|-------------------------------------------------------------|-------------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | 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 | -!!| z1 | height_above_mean_sea_level_at_lowest_model_layer | height above mean sea level at 1st model layer | m | 1 | real | kind_phys | in | F | +!!| u1 | x_wind_at_lowest_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | +!!| v1 | y_wind_at_lowest_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | +!!| t1 | air_temperature_at_lowest_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | +!!| q1 | specific_humidity_at_lowest_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | +!!| z1 | height_above_mean_sea_level_at_lowest_layer | height above mean sea level at 1st model layer | m | 1 | real | kind_phys | in | F | !!| snwdph | surface_snow_thickness_water_equivalent | water equivalent surface snow thickness | m | 1 | real | kind_phys | in | F | !!| tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | in | F | !!| z0rl | surface_roughness_length | surface roughness length | m | 1 | real | kind_phys | inout | F | !!| cm | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | out? | F | !!| ch | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | out? | F | -!!| rb | bulk_richardson_number_at_lowest_model_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | out? | F | -!!| prsl1 | air_pressure_at_lowest_model_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | -!!| prslki | 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 | in | F | +!!| rb | bulk_richardson_number_at_lowest_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | out? | F | +!!| prsl1 | air_pressure_at_lowest_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | +!!| prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | in | F | !!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | !!| stress | surface_wind_stress | surface wind stress | m2 s-2 | 1 | real | kind_phys | out? | F | -!!| fm | Monin-Obukhov_similarity_parameter_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out? | F | -!!| fh | Monin-Obukhov_similarity_parameter_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out? | F | +!!| fm | Monin-Obukhov_similarity_function_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out? | F | +!!| fh | Monin-Obukhov_similarity_function_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out? | F | !!| ustar | surface_friction_velocity | surface friction velocity | m s-1 | 1 | real | kind_phys | out? | F | !!| wind | surface_wind_speed | surface wind speed | m s-1 | 1 | real | kind_phys | out? | F | !!| ddvel | surface_wind_enhancement_due_to_convection | surface wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | -!!| fm10 | Monin-Obukhov_similarity_parameter_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out? | F | -!!| fh2 | Monin-Obukhov_similarity_parameter_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out? | F | +!!| fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out? | F | +!!| fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out? | F | !!| sigmaf | vegetation_area_fraction | areal fractional cover of green vegetation | frac | 1 | real | kind_phys | in | F | !!| vegtype | cell_vegetation_type | vegetation type at each grid cell | index | 1 | integer | | in | F | !!| shdmax | maximum_vegetation_area_fraction | max fractnl cover of green veg | frac | 1 | real | kind_phys | in | F | @@ -48,6 +53,16 @@ subroutine sfc_ex_coef_run(im,ps,u1,v1,t1,q1,z1, !!| tsurf | surface_skin_temperature_after_iteration | surface skin temperature after iteration | K | 1 | real | kind_phys | in | F | !!| flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | in | F | !!| redrag | flag_for_reduced_drag_coefficient_over_sea | flag for reduced drag coefficient over sea | flag | 1 | logical | | in | F | +!! \section general General Algorithm +!! \section detailed Detailed Algorithm +!! @{ + subroutine sfc_ex_coef_run(im,ps,u1,v1,t1,q1,z1, + & snwdph,tskin,z0rl,cm,ch,rb, + & prsl1,prslki,islimsk, + & stress,fm,fh, + & ustar,wind,ddvel,fm10,fh2, + & sigmaf,vegtype,shdmax,ivegsrc, + & tsurf,flag_iter,redrag) ! @@ -347,5 +362,7 @@ subroutine sfc_ex_coef_run(im,ps,u1,v1,t1,q1,z1, return end subroutine sfc_ex_coef_run +!> @} end module surface_exchange_coefficients +!> @} diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index f316d0636..296f79219 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -1,3 +1,12 @@ +!> \file sfc_drv.f +!! This file contains the NOAH land surface scheme. + +!> \defgroup NOAH Land Surface +!! @{ +!! \brief Brief description of the parameterization +!! \section diagram Calling Hierarchy Diagram +!! \section intraphysics Intraphysics Communication + module lsm_noah contains @@ -114,32 +123,18 @@ end subroutine lsmnoah_finalize !----------------------------------- ! subroutine sfc_drv & - subroutine lsmnoah_run & -!................................... -! --- inputs: - & ( im, km, ps, u1, v1, t1, q1, soiltyp, vegtype, sigmaf, & - & sfcemis, dlwflx, dswsfc, snet, delt, tg3, cm, ch, & - & prsl1, prslki, zf, islimsk, ddvel, slopetyp, & - & shdmin, shdmax, snoalb, sfalb, flag_iter, flag_guess, & - & isot, ivegsrc, & -! --- in/outs: - & weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, & - & canopy, trans, tsurf, zorl, & -! --- outputs: - & sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, & - & cmm, chh, evbs, evcw, sbsno, snowc, stm, snohf, & - & smcwlt2, smcref2, wet1 & - & ) +!> \brief Brief description of the subroutine !! +!! \section arg_table_lsmnoah_run Arguments !!| local var name | longname | description | units | rank | type | kind | intent | optional | !!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | -!!| km | vertical_dimension | vertical layer dimension | index | 0 | integer | | in | F | +!!| km | soil_vertical_dimension | soil vertical layer dimension | index | 0 | integer | | 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_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | +!!| v1 | y_wind_at_lowest__layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | +!!| t1 | air_temperature_at_lowest_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | +!!| q1 | specific_humidity_at_lowest_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !!| soiltyp | cell_soil_type | soil type at each grid cell | index | 1 | integer | | in | F | !!| vegtype | cell_vegetation_type | vegetation type at each grid cell | index | 1 | integer | | in | F | !!| sigmaf | vegetation_area_fraction | areal fractional cover of green vegetation | frac | 1 | real | kind_phys | in | F | @@ -147,13 +142,13 @@ subroutine lsmnoah_run & !!| dlwflx | surface_downwelling_longwave_flux | total sky surface downward longwave flux | W m-2 | 1 | real | kind_phys | in | F | !!| dswsfc | surface_downwelling_shortwave_flux | total sky surface downward shortwave flux | W m-2 | 1 | real | kind_phys | in | F | !!| snet | surface_net_downward_shortwave_flux | total sky surface net shortwave flux | W m-2 | 1 | real | kind_phys | in | F | -!!| delt | timestep_for_physics | physics time step | s | 0 | real | kind_phys | in | F | +!!| delt | time_step_for_dynamics | dynamics time step | s | 0 | real | kind_phys | in | F | !!| tg3 | deep_soil_temperature | bottom soil 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 | -!!| prsl1 | air_pressure_at_lowest_model_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | -!!| prslki | 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 | in | F | -!!| zf | height_above_mean_sea_level_at_lowest_model_layer | height above MSL at 1st model layer | m | 1 | real | kind_phys | in | F | +!!| prsl1 | air_pressure_at_lowest_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | +!!| prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | in | F | +!!| zf | height_above_mean_sea_level_at_lowest_layer | height above MSL at 1st model layer | m | 1 | real | kind_phys | in | F | !!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | !!| ddvel | surface_wind_enhancement_due_to_convection | surface wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | !!| slopetyp | surface_slope_classification | class of sfc slope | index | 1 | integer | | in | F | @@ -166,9 +161,9 @@ subroutine lsmnoah_run & !!| isot | soil_type | soil type (not used) | index | 0 | integer | | in | F | !!| ivegsrc | vegetation_type | vegetation type data source umd or igbp | index | 0 | integer | | in | F | !!| weasd | water_equivalent_accumulated_snow_depth | water equivalent accumulated snow depth | mm | 1 | real | kind_phys | inout | F | -!!| snwdph | water_equivalent_snow_depth_over_land | water equivalent snow depth over land | mm | 1 | real | kind_phys | inout | F | +!!| snwdph | surface_snow_thickness_water_equivalent | water equivalent snow depth over land | mm | 1 | real | kind_phys | inout | F | !!| tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | inout | F | -!!| tprcp | precipitation_amount_in_one_timestep | total precipitation in each time step | kg m-2 | 1 | real | kind_phys | inout | F | +!!| tprcp | precipitation_amount_in_one_dynamic_time_step | total precipitation in each time step | kg m-2 | 1 | real | kind_phys | inout | F | !!| srflag | flag_for_snow_or_rain_precipitation | flag for snow or rain precipitation | flag | 1 | real | kind_phys | inout | F | !!| smc | volume_fraction_of_soil_moisture | volumetric fraction of soil moisture | frac | 2 | real | kind_phys | inout | F | !!| stc | soil_temperature | soil temperature | K | 2 | real | kind_phys | inout | F | @@ -181,8 +176,8 @@ subroutine lsmnoah_run & !!| qsurf | surface_specific_humidity | surface specific humidity | kg kg-1 | 1 | real | kind_phys | out | F | !!| gflux | upward_heat_flux_in_soil | upward soil heat flux | W m-2 | 1 | real | kind_phys | out | F | !!| drain | subsurface_runoff_flux | subsurface runoff flux | kg m-2 s-1 | 1 | real | kind_phys | out | F | -!!| evap | surface_upward_latent_heat_flux | surface upward latent heat flux | W m-2 | 1 | real | kind_phys | out | F | -!!| hflx | surface_upward_sensible_heat_flux | surface upward sensible heat flux | W m-2 | 1 | real | kind_phys | out | F | +!!| evap | kinematic_surface_upward_latent_heat_flux | surface upward evaporation flux | kg kg-1 m s-1 | 1 | real | kind_phys | out | F | +!!| hflx | kinematic_surface_upward_sensible_heat_flux | surface upward sensible heat flux | K kg-1 m s-1 | 1 | real | kind_phys | out | F | !!| ep | surface_upward_potential_latent_heat_flux | surface upward potential latent heat flux | W m-2 | 1 | real | kind_phys | out | F | !!| runoff | surface_runoff_flux | surface runoff flux | kg m-2 s-1 | 1 | real | kind_phys | out | F | !!| cmm | surface_drag_wind_speed_for_momentum_in_air | surf mom exch coef time mean surf wind | m s-1 | 1 | real | kind_phys | out | F | @@ -196,6 +191,26 @@ subroutine lsmnoah_run & !!| smcwlt2 | volume_fraction_of_condensed_water_in_soil_at_wilting_point | soil water fraction at wilting point | frac | 1 | real | kind_phys | out | F | !!| smcref2 | threshold_volume_fraction_of_condensed_water_in_soil | soil moisture threshold | frac | 1 | real | kind_phys | out | F | !!| wet1 | normalized_soil_wetness | normalized soil wetness | frac | 1 | real | kind_phys | out | F | +!! \section general General Algorithm +!! \section detailed Detailed Algorithm +!! @{ + subroutine lsmnoah_run & +!................................... +! --- inputs: + & ( im, km, ps, u1, v1, t1, q1, soiltyp, vegtype, sigmaf, & + & sfcemis, dlwflx, dswsfc, snet, delt, tg3, cm, ch, & + & prsl1, prslki, zf, islimsk, ddvel, slopetyp, & + & shdmin, shdmax, snoalb, sfalb, flag_iter, flag_guess, & + & isot, ivegsrc, & +! --- in/outs: + & weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, & + & canopy, trans, tsurf, zorl, & +! --- outputs: + & sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, & + & cmm, chh, evbs, evcw, sbsno, snowc, stm, snohf, & + & smcwlt2, smcref2, wet1 & + & ) +!! use machine , only : kind_phys @@ -624,5 +639,7 @@ subroutine lsmnoah_run & ! end subroutine sfc_drv end subroutine lsmnoah_run !----------------------------------- +!> @} end module lsm_noah +!> @} From eaf22f339bb4749fe5347802b964dce1e4bb1c47 Mon Sep 17 00:00:00 2001 From: Lulin Xue Date: Tue, 24 Oct 2017 11:11:33 -0600 Subject: [PATCH 03/22] fix doxygen for diag and diff --- physics/sfc_diag.f | 2 +- physics/sfc_diff.f | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index 0b947247e..d4dbbd8ce 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -1,7 +1,7 @@ !> \file sfc_diag.f !! This file contains the land surface diagnose calculation scheme. -!> \defgroup Land Surface Diagnose Calculation +!> \defgroup Sfc_diag Land Surface Diagnose Calculation !! @{ !! \brief Brief description of the parameterization !! \section diagram Calling Hierarchy Diagram diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 09c8273b8..4b31e9342 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -1,7 +1,7 @@ !> \file sfc_diff.f !! This file contains the surface exchange coefficient calculation scheme. -!> \defgroup Surface Exchange Coefficient Calculation +!> \defgroup Sfc_ex_cal Surface Exchange Coefficient Calculation !! @{ !! \brief Brief description of the scheme !! \section diagram Calling Hierarchy Diagram From 489a0fa0130562c5d53ed1fcbf3762742b4a1194 Mon Sep 17 00:00:00 2001 From: Lulin Xue Date: Thu, 26 Oct 2017 10:47:41 -0600 Subject: [PATCH 04/22] update sfc_diag sfc_diff doxygen doc --- physics/sfc_diag.f | 2 +- physics/sfc_diff.f | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index d4dbbd8ce..c40110aa9 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -46,7 +46,7 @@ end subroutine sfc_diag_finalize subroutine sfc_diag_run(im,ps,u1,v1,t1,q1, & tskin,qsurf,f10m,u10m,v10m,t2m,q2m, & prslki,evap,fm,fh,fm10,fh2) - +!! ! use machine , only : kind_phys use funcphys, only : fpvs diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 4b31e9342..be84194b1 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -63,7 +63,7 @@ subroutine sfc_ex_coef_run(im,ps,u1,v1,t1,q1,z1, & ustar,wind,ddvel,fm10,fh2, & sigmaf,vegtype,shdmax,ivegsrc, & tsurf,flag_iter,redrag) - +!! ! use machine , only : kind_phys From 37c31d84272cefef1a675deae7489192c2619d2a Mon Sep 17 00:00:00 2001 From: lulinxue Date: Thu, 26 Oct 2017 11:32:33 -0600 Subject: [PATCH 05/22] update sfc_diag.f sfc_diff.f for doxygen --- physics/sfc_diag.f | 14 ++++++++------ physics/sfc_diff.f | 45 +++++++++++++++++++++++---------------------- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index c40110aa9..aa03dc706 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -43,20 +43,22 @@ end subroutine sfc_diag_finalize !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ - subroutine sfc_diag_run(im,ps,u1,v1,t1,q1, - & tskin,qsurf,f10m,u10m,v10m,t2m,q2m, - & prslki,evap,fm,fh,fm10,fh2) + subroutine sfc_diag_run & + & (im,ps,u1,v1,t1,q1, & + & tskin,qsurf,f10m,u10m,v10m,t2m,q2m, & + & prslki,evap,fm,fh,fm10,fh2 & + & ) !! ! use machine , only : kind_phys use funcphys, only : fpvs - use physcons, grav => con_g, cp => con_cp, + 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, + real, dimension(im) :: ps, u1, v1, t1, q1, tskin, qsurf, & + & f10m, u10m, v10m, t2m, q2m, prslki, evap, & & fm, fh, fm10, fh2 ! ! locals diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index be84194b1..e1673f967 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -56,31 +56,32 @@ end subroutine sfc_ex_coef_finalize !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ - subroutine sfc_ex_coef_run(im,ps,u1,v1,t1,q1,z1, - & snwdph,tskin,z0rl,cm,ch,rb, - & prsl1,prslki,islimsk, - & stress,fm,fh, - & ustar,wind,ddvel,fm10,fh2, - & sigmaf,vegtype,shdmax,ivegsrc, - & tsurf,flag_iter,redrag) + subroutine sfc_ex_coef_run & + & (im,ps,u1,v1,t1,q1,z1, & + & snwdph,tskin,z0rl,cm,ch,rb, & + & prsl1,prslki,islimsk, & + & stress,fm,fh, & + & ustar,wind,ddvel,fm10,fh2, & + & sigmaf,vegtype,shdmax,ivegsrc, & + & tsurf,flag_iter,redrag & + & ) !! -! use machine , only : kind_phys use funcphys, only : fpvs - use physcons, grav => con_g, cp => con_cp - &, rvrdm1 => con_fvirt, rd => con_rd - &, eps => con_eps, epsm1 => con_epsm1 + use physcons, grav => con_g, cp => con_cp & + &, rvrdm1 => con_fvirt, rd => con_rd & + &, eps => con_eps, epsm1 => con_epsm1 implicit none ! integer im, ivegsrc - real(kind=kind_phys), dimension(im) :: ps, u1, v1, t1, q1, z1 - &, tskin, z0rl, cm, ch, rb - &, prsl1, prslki, stress - &, fm, fh, ustar, wind, ddvel - &, fm10, fh2, sigmaf, shdmax - &, tsurf, snwdph + real(kind=kind_phys), dimension(im) :: ps, u1, v1, t1, q1, z1 & + &, tskin, z0rl, cm, ch, rb & + &, prsl1, prslki, stress & + &, fm, fh, ustar, wind, ddvel & + &, fm10, fh2, sigmaf, shdmax & + &, tsurf, snwdph integer, dimension(im) :: vegtype, islimsk logical flag_iter(im) ! added by s.lu @@ -90,11 +91,11 @@ subroutine sfc_ex_coef_run(im,ps,u1,v1,t1,q1,z1, ! integer i ! - real(kind=kind_phys) aa, aa0, bb, bb0, dtv, adtv,qs1, - & hl1, hl12, pm, ph, pm10, ph2, rat, - & thv1, tvs, z1i, z0, z0max, ztmax, - & fms, fhs, hl0, hl0inf, hlinf, - & hl110, hlt, hltinf, olinf, + real(kind=kind_phys) aa, aa0, bb, bb0, dtv, adtv,qs1,& + & hl1, hl12, pm, ph, pm10, ph2, rat,& + & thv1, tvs, z1i, z0, z0max, ztmax, & + & fms, fhs, hl0, hl0inf, hlinf, & + & hl110, hlt, hltinf, olinf, & & restar, czilc, tem1, tem2, ztmax1 ! real(kind=kind_phys), parameter :: From 4ae10b059d26e10f01495f936ec087ccf7dd67a0 Mon Sep 17 00:00:00 2001 From: lulinxue Date: Thu, 2 Nov 2017 13:38:03 -0600 Subject: [PATCH 06/22] Update sfc_drv.f resolve conflict of long name --- physics/sfc_drv.f | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 4c112a4ec..9d1ac8c79 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -132,7 +132,7 @@ end subroutine lsmnoah_finalize !!| km | soil_vertical_dimension | soil vertical layer dimension | index | 0 | integer | | in | F | !!| ps | surface_air_pressure | surface pressure | Pa | 1 | real | kind_phys | in | F | !!| u1 | x_wind_at_lowest_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | -!!| v1 | y_wind_at_lowest__layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | +!!| v1 | y_wind_at_lowest_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | !!| t1 | air_temperature_at_lowest_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | !!| q1 | specific_humidity_at_lowest_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !!| soiltyp | cell_soil_type | soil type at each grid cell | index | 1 | integer | | in | F | @@ -146,8 +146,8 @@ end subroutine lsmnoah_finalize !!| tg3 | deep_soil_temperature | bottom soil 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 | -!!| prsl1 | air_pressure_at_lowest_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | -!!| prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | in | F | +!!| prsl1 | air_pressure_at_lowest_model_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | +!!| prslki | 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 | in | F | !!| zf | height_above_mean_sea_level_at_lowest_layer | height above MSL at 1st model layer | m | 1 | real | kind_phys | in | F | !!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | !!| ddvel | surface_wind_enhancement_due_to_convection | surface wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | @@ -163,8 +163,8 @@ end subroutine lsmnoah_finalize !!| weasd | water_equivalent_accumulated_snow_depth | water equivalent accumulated snow depth | mm | 1 | real | kind_phys | inout | F | !!| snwdph | surface_snow_thickness_water_equivalent | water equivalent snow depth over land | mm | 1 | real | kind_phys | inout | F | !!| tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | inout | F | -!!| tprcp | precipitation_amount_in_one_dynamic_time_step | total precipitation in each time step | kg m-2 | 1 | real | kind_phys | inout | F | -!!| srflag | flag_for_snow_or_rain_precipitation | flag for snow or rain precipitation | flag | 1 | real | kind_phys | inout | F | +!!| tprcp | precipitation_amount_in_one_dynamics_time_step | total precipitation in each time step | kg m-2 | 1 | real | kind_phys | inout | F | +!!| srflag | flag_for_precipitation_type | flag for snow or rain precipitation | flag | 1 | real | kind_phys | inout | F | !!| smc | volume_fraction_of_soil_moisture | volumetric fraction of soil moisture | frac | 2 | real | kind_phys | inout | F | !!| stc | soil_temperature | soil temperature | K | 2 | real | kind_phys | inout | F | !!| slc | volume_fraction_of_unfrozen_soil_moisture | volume fraction of unfrozen soil moisture | frac | 2 | real | kind_phys | inout | F | From 68ee9749af821be266964a236d0f3feb7e012a8f Mon Sep 17 00:00:00 2001 From: lulinxue Date: Thu, 2 Nov 2017 13:43:14 -0600 Subject: [PATCH 07/22] Update sfc_diff.f resolve longname conflict --- physics/sfc_diff.f | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index e1673f967..050324dec 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -26,7 +26,7 @@ end subroutine sfc_ex_coef_finalize !!| ps | surface_air_pressure | surface pressure | Pa | 1 | real | kind_phys | in | F | !!| u1 | x_wind_at_lowest_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | !!| v1 | y_wind_at_lowest_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | -!!| t1 | air_temperature_at_lowest_layer | 1st model layer air temperature | K | 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_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !!| z1 | height_above_mean_sea_level_at_lowest_layer | height above mean sea level at 1st model layer | m | 1 | real | kind_phys | in | F | !!| snwdph | surface_snow_thickness_water_equivalent | water equivalent surface snow thickness | m | 1 | real | kind_phys | in | F | @@ -34,9 +34,9 @@ end subroutine sfc_ex_coef_finalize !!| z0rl | surface_roughness_length | surface roughness length | m | 1 | real | kind_phys | inout | F | !!| cm | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | out? | F | !!| ch | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | out? | F | -!!| rb | bulk_richardson_number_at_lowest_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | out? | F | +!!| rb | bulk_richardson_number_at_lowest_model_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | out? | F | !!| prsl1 | air_pressure_at_lowest_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | -!!| prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | in | F | +!!| prslki | 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 | in | F | !!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | !!| stress | surface_wind_stress | surface wind stress | m2 s-2 | 1 | real | kind_phys | out? | F | !!| fm | Monin-Obukhov_similarity_function_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out? | F | From 232af66c5d98a6c3a8ac1eb2400d17b0df7798fa Mon Sep 17 00:00:00 2001 From: lulinxue Date: Thu, 2 Nov 2017 13:44:58 -0600 Subject: [PATCH 08/22] Update sfc_diag.f resolve longname conflict --- physics/sfc_diag.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index aa03dc706..754e5516a 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -34,7 +34,7 @@ end subroutine sfc_diag_finalize !!| v10m | y_wind_at_10m | y component of wind at 10 m | m s-1 | 1 | real | kind_phys | out | F | !!| t2m | temperature_at_2m | temperature at 2 m | K | 1 | real | kind_phys | out | F | !!| q2m | specific_humidity_at_2m | specific humidity at 2 m | kg kg-1 | 1 | real | kind_phys | out | F | -!!| prslki | ratio_of_exner_function_between_midlayer_and_interface_at_lowest_layer | Exner function ratio bt midlayer and interface at 1st layer | ratio | 1 | real | kind_phys | in | F | +!!| prslki | 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 | in | F | !!| evap | kinematic_surface_upward_latent_heat_flux | surface upward evaporation flux | kg kg-1 m s-1 | 1 | real | kind_phys | in | F | !!| fm | Monin-Obukhov_similarity_function_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | !!| fh | Monin-Obukhov_similarity_function_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | From 7a57cd12a8ec170d42c1aa658287d76f191667ea Mon Sep 17 00:00:00 2001 From: lulinxue Date: Thu, 2 Nov 2017 13:46:04 -0600 Subject: [PATCH 09/22] Update sfc_diff.f fix longname conflict --- physics/sfc_diff.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 050324dec..3c7f5efe1 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -26,7 +26,7 @@ end subroutine sfc_ex_coef_finalize !!| ps | surface_air_pressure | surface pressure | Pa | 1 | real | kind_phys | in | F | !!| u1 | x_wind_at_lowest_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | !!| v1 | y_wind_at_lowest_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 | +!!| t1 | air_temperature_at_lowest_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | !!| q1 | specific_humidity_at_lowest_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | !!| z1 | height_above_mean_sea_level_at_lowest_layer | height above mean sea level at 1st model layer | m | 1 | real | kind_phys | in | F | !!| snwdph | surface_snow_thickness_water_equivalent | water equivalent surface snow thickness | m | 1 | real | kind_phys | in | F | @@ -35,7 +35,7 @@ end subroutine sfc_ex_coef_finalize !!| cm | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | out? | F | !!| ch | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | out? | F | !!| rb | bulk_richardson_number_at_lowest_model_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | out? | F | -!!| prsl1 | air_pressure_at_lowest_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | +!!| prsl1 | air_pressure_at_lowest_model_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | !!| prslki | 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 | in | F | !!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | !!| stress | surface_wind_stress | surface wind stress | m2 s-2 | 1 | real | kind_phys | out? | F | From e62897b313415715759c5d95b0bf6f7e7e0f4ac1 Mon Sep 17 00:00:00 2001 From: lulinxue Date: Sun, 5 Nov 2017 16:06:54 -0700 Subject: [PATCH 10/22] update GFS_physics --- GFS_layer/GFS_physics_driver.F90 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index 090d0dac6..b31f07dc8 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -970,7 +970,7 @@ subroutine GFS_physics_driver & call lsmnoah_run & ! --- inputs: (im, Model%lsoil, Statein%pgr, Statein%ugrs(:,1), Statein%vgrs(:,1), & - Statein%tgrs(:,1), Statein%qgrs(:,1), soiltyp, vegtype, sigmaf, & + Statein%tgrs(:,1), Statein%qgrs(:,1,1), soiltyp, vegtype, sigmaf, & Radtend%semis, gabsbdlw, adjsfcdsw, adjsfcnsw, dtf, & Sfcprop%tg3, cd, cdq, Statein%prsl(:,1), work3, DIag%zlvl, & islmsk, Tbd%phy_f2d(1,Model%num_p2d), slopetyp, & @@ -1074,7 +1074,7 @@ subroutine GFS_physics_driver & ! call sfc_diag (im, Statein%pgr, Statein%ugrs, Statein%vgrs, & call sfc_diag_run(im, Statein%pgr, Statein%ugrs(:,1), Statein%vgrs(:,1), & - Statein%tgrs(:,1), Statein%qgrs(:,1), Sfcprop%tsfc, qss, & + Statein%tgrs(:,1), Statein%qgrs(:,1,1), Sfcprop%tsfc, qss, & Sfcprop%f10m, Diag%u10m, Diag%v10m, & Sfcprop%t2m, Sfcprop%q2m, work3, evap, & Sfcprop%ffmm, Sfcprop%ffhh, fm10, fh2) @@ -2649,11 +2649,16 @@ subroutine GFS_physics_driver & !!! this change allows gocart to use filtered wind fields !!! if (Model%lgocart) then - call sfc_diag (im, Statein%pgr, Stateout%gu0, Stateout%gv0, & - Stateout%gt0, Stateout%gq0, Sfcprop%tsfc, qss, & - Sfcprop%f10m, Diag%u10m, Diag%v10m, Sfcprop%t2m, & - Sfcprop%q2m, work3, evap, Sfcprop%ffmm, & - Sfcprop%ffhh, fm10, fh2) +! call sfc_diag (im, Statein%pgr, Stateout%gu0, Stateout%gv0, & +! Stateout%gt0, Stateout%gq0, Sfcprop%tsfc, qss, & +! Sfcprop%f10m, Diag%u10m, Diag%v10m, Sfcprop%t2m, & +! Sfcprop%q2m, work3, evap, Sfcprop%ffmm, & +! Sfcprop%ffhh, fm10, fh2) + call sfc_diag_run(im, Statein%pgr, Statein%ugrs(:,1), Statein%vgrs(:,1), & + Statein%tgrs(:,1), Statein%qgrs(:,1,1), Sfcprop%tsfc, qss, & + Sfcprop%f10m, Diag%u10m, Diag%v10m, & + Sfcprop%t2m, Sfcprop%q2m, work3, evap, & + Sfcprop%ffmm, Sfcprop%ffhh, fm10, fh2) if (Model%lssav) then Diag%tmpmax (:) = max(Diag%tmpmax (:),Sfcprop%t2m(:)) From d808dd24a1583cce8bdab689993d5c543efe09a9 Mon Sep 17 00:00:00 2001 From: lulinxue Date: Mon, 6 Nov 2017 15:10:12 -0700 Subject: [PATCH 11/22] temp --- GFS_layer/GFS_physics_driver.F90 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index b31f07dc8..2d11c53ef 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -16,6 +16,10 @@ module module_physics_driver GFS_tbd_type, GFS_cldprop_type, & GFS_radtend_type, GFS_diag_type + use lsm_noah + use surface_exchange_coefficients + use surface_diagnose + implicit none @@ -872,7 +876,7 @@ subroutine GFS_physics_driver & Sfcprop%snowd, Sfcprop%tsfc, Sfcprop%zorl, cd, & cdq, rb, Statein%prsl(:,1), work3, islmsk, stress, & Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%uustar, & - wind, Tbd%phy_f2d(1,Model%num_p2d), fm10, fh2, & + wind, Tbd%phy_f2d(:,Model%num_p2d), fm10, fh2, & sigmaf, vegtype, Sfcprop%shdmax, Model%ivegsrc, & tsurf, flag_iter, Model%redrag) @@ -973,7 +977,7 @@ subroutine GFS_physics_driver & Statein%tgrs(:,1), Statein%qgrs(:,1,1), soiltyp, vegtype, sigmaf, & Radtend%semis, gabsbdlw, adjsfcdsw, adjsfcnsw, dtf, & Sfcprop%tg3, cd, cdq, Statein%prsl(:,1), work3, DIag%zlvl, & - islmsk, Tbd%phy_f2d(1,Model%num_p2d), slopetyp, & + islmsk, Tbd%phy_f2d(:,Model%num_p2d), slopetyp, & Sfcprop%shdmin, Sfcprop%shdmax, Sfcprop%snoalb, & Radtend%sfalb, flag_iter, flag_guess, Model%isot, & Model%ivegsrc, & From 78cdce48a7971ac6cbf8009fc7079452409f7876 Mon Sep 17 00:00:00 2001 From: lulinxue Date: Tue, 7 Nov 2017 17:05:51 -0700 Subject: [PATCH 12/22] intestital code for lsmnoah_pre --- GFS_layer/GFS_physics_driver.F90 | 37 ++++++++++---------- physics/sfc_drv.f | 58 ++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 17 deletions(-) diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index 2d11c53ef..9c0b321f4 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -667,9 +667,9 @@ subroutine GFS_physics_driver & endif ! --- ... transfer soil moisture and temperature from global to local variables - smsoil(:,:) = Sfcprop%smc(:,:) +! smsoil(:,:) = Sfcprop%smc(:,:) stsoil(:,:) = Sfcprop%stc(:,:) - slsoil(:,:) = Sfcprop%slc(:,:) !! clu: slc -> slsoil +! slsoil(:,:) = Sfcprop%slc(:,:) !! clu: slc -> slsoil dudt(:,:) = 0. dvdt(:,:) = 0. dtdt(:,:) = 0. @@ -847,20 +847,22 @@ subroutine GFS_physics_driver & tsurf(:) = Sfcprop%tsfc(:) flag_guess(:) = .false. flag_iter(:) = .true. - drain(:) = 0.0 +! drain(:) = 0.0 ep1d(:) = 0.0 - runof(:) = 0.0 +! runof(:) = 0.0 hflx(:) = 0.0 evap(:) = 0.0 - evbs(:) = 0.0 - evcw(:) = 0.0 - trans(:) = 0.0 - sbsno(:) = 0.0 - snowc(:) = 0.0 - snohf(:) = 0.0 +! evbs(:) = 0.0 +! evcw(:) = 0.0 +! trans(:) = 0.0 +! sbsno(:) = 0.0 +! snowc(:) = 0.0 +! snohf(:) = 0.0 Diag%zlvl(:) = Statein%phil(:,1) * onebg - Diag%smcwlt2(:) = 0.0 - Diag%smcref2(:) = 0.0 +! Diag%smcwlt2(:) = 0.0 +! Diag%smcref2(:) = 0.0 + call lsmnoah_pre_run(im,Model%lsoil,smsoil,slsoil,Sfcprop%smc(:,:),Sfcprop%slc(:,:), & + drain,runof,evbs,evcw,trans,sbsno,snowc,snohf,Diag%smcwlt2(:),Diag%smcref2(:)) ! --- ... lu: iter-loop over (sfc_diff,sfc_drv,sfc_ocean,sfc_sice) @@ -2674,11 +2676,12 @@ subroutine GFS_physics_driver & ! --- ... total runoff is composed of drainage into water table and ! runoff at the surface and is accumulated in unit of meters - if (Model%lssav) then - tem = dtf * 0.001 - Diag%runoff(:) = Diag%runoff(:) + (drain(:)+runof(:)) * tem - Diag%srunoff(:) = Diag%srunoff(:) + runof(:) * tem - endif +! if (Model%lssav) then +! tem = dtf * 0.001 +! Diag%runoff(:) = Diag%runoff(:) + (drain(:)+runof(:)) * tem +! Diag%srunoff(:) = Diag%srunoff(:) + runof(:) * tem +! endif + call lsmnoah_post_run(im,Model%lssav,dtf,drain,runof,Diag%runoff(:),Diag%srunoff(:)) ! --- ... xw: return updated ice thickness & concentration to global array do i = 1, im diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 9d1ac8c79..d5acad976 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -10,6 +10,64 @@ module lsm_noah contains + subroutine lsmnoah_pre_run & + & (im,km,smsoil,slsoil,smsoilin,slsoilin,drain,runof,evbs,evcw, & + & trans,sbsno,snowc,snohf,smcwlt2,smcref2 & + & ) + + use machine, only: kind_phys + +! --- interface variables + integer, intent(in) :: im, km + + real(kind=kind_phys), dimension(im,km), intent(inout) :: & + & smsoil,slsoil + + real(kind=kind_phys), dimension(im,km), intent(in) :: & + & smsoilin,slsoilin + + real(kind=kind_phys), dimension(im), intent(inout) :: & + & drain,runof,evbs,evcw,trans,sbsno,snowc,snohf,smcwlt2,smcref2 + + smsoil(:,:) = smsoilin(:,:) + slsoil(:,:) = slsoilin(:,:) + + drain(:) = 0.0 + runof(:) = 0.0 + evbs(:) = 0.0 + evcw(:) = 0.0 + trans(:) = 0.0 + sbsno(:) = 0.0 + snowc(:) = 0.0 + snohf(:) = 0.0 + smcwlt2(:) = 0.0 + smcref2(:) = 0.0 + + end subroutine lsmnoah_pre_run + + subroutine lsmnoah_post_run & + & (im,lssav,dtf,drain,runof,runoff,srunoff & + & ) + use machine, only: kind_phys + +! --- interface variables + integer, intent(in) :: im + logical, intent(in) :: lssav + real, intent (in) :: dtf + + real(kind=kind_phys), dimension(im), intent(in ) :: & + & drain, runof + + real(kind=kind_phys), dimension(im), intent(inout) :: & + & runoff, srunoff + + if(lssav) then + runoff(:) = runoff(:) + (drain(:)+runof(:)) * dtf * 0.001 + srunoff(:) = srunoff(:) + runof(:) * dtf * 0.001 + end if + + end subroutine lsmnoah_post_run + subroutine lsmnoah_init end subroutine lsmnoah_init From 0803a31e98d736db520e55492a08473040004126 Mon Sep 17 00:00:00 2001 From: lulinxue Date: Tue, 21 Nov 2017 17:56:43 -0700 Subject: [PATCH 13/22] add GFS_surface_loop_control.f to include both sfc_diff_post and GFS_surface_loop_control --- GFS_layer/GFS_physics_driver.F90 | 40 +++++++------ makefile | 1 + physics/GFS_surface_loop_control.f | 95 ++++++++++++++++++++++++++++++ physics/sfc_diff.f | 6 +- physics/sfc_drv.f | 84 +++++++++++++++++++++++--- 5 files changed, 198 insertions(+), 28 deletions(-) create mode 100644 physics/GFS_surface_loop_control.f diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index 9c0b321f4..a107f8f9e 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -16,9 +16,10 @@ module module_physics_driver GFS_tbd_type, GFS_cldprop_type, & GFS_radtend_type, GFS_diag_type - use lsm_noah - use surface_exchange_coefficients + use lsm_noah, lsm_noah_pre, lsm_noah_post + use surface_exchange_coefficients, surface_exchange_coefficients_post use surface_diagnose + use GFS_surface_loop_control implicit none @@ -884,11 +885,12 @@ subroutine GFS_physics_driver & ! --- ... lu: update flag_guess - do i = 1, im - if (iter == 1 .and. wind(i) < 2.0) then - flag_guess(i) = .true. - endif - enddo +! do i = 1, im +! if (iter == 1 .and. wind(i) < 2.0) then +! flag_guess(i) = .true. +! endif +! enddo + call GFS_surface_loop_control_part1_run(im,iter,wind,flag_guess) if (Model%nstf_name(1) > 0) then @@ -1044,16 +1046,16 @@ subroutine GFS_physics_driver & ! --- ... lu: update flag_iter and flag_guess - do i = 1, im - flag_iter(i) = .false. - flag_guess(i) = .false. - - if (iter == 1 .and. wind(i) < 2.0) then - if ((islmsk(i) == 1) .or. ((islmsk(i) == 0) .and. & - (Model%nstf_name(1) > 0))) then - flag_iter(i) = .true. - endif - endif +! do i = 1, im +! flag_iter(i) = .false. +! flag_guess(i) = .false. +! +! if (iter == 1 .and. wind(i) < 2.0) then +! if ((islmsk(i) == 1) .or. ((islmsk(i) == 0) .and. & +! (Model%nstf_name(1) > 0))) then +! flag_iter(i) = .true. +! endif +! endif ! if(islmsk(i) == 1 .and. iter == 1) then ! if (wind(i) < 2.0) flag_iter(i) = .true. @@ -1061,7 +1063,9 @@ subroutine GFS_physics_driver & ! & .and. nstf_name(1) > 0) then ! if (wind(i) < 2.0) flag_iter(i) = .true. ! endif - enddo +! enddo + call GFS_surface_loop_control_part2_run(im,iter,wind,flag_guess,& + islmsk,Model%nstf_name(1)) enddo ! end iter_loop diff --git a/makefile b/makefile index 95c891e1b..1c4d4c63a 100644 --- a/makefile +++ b/makefile @@ -95,6 +95,7 @@ SRCS_f = \ ./physics/sascnv.f \ ./physics/sascnvn.f \ ./physics/set_soilveg.f \ + ./physics/GFS_surface_loop_control.f \ ./physics/sfc_cice.f \ ./physics/sfc_diag.f \ ./physics/sfc_diff.f \ diff --git a/physics/GFS_surface_loop_control.f b/physics/GFS_surface_loop_control.f new file mode 100644 index 000000000..86f897131 --- /dev/null +++ b/physics/GFS_surface_loop_control.f @@ -0,0 +1,95 @@ +!> \file GFS_surface_loop_control.f +!! This file contains the GFS_surface_loop_control scheme. + +!> \defgroup GFS_surface_loop_control GFS_surface_loop_control scheme +!! @{ +!! \brief Brief description of the parameterization +!! \section diagram Calling Hierarchy Diagram +!! \section intraphysics Intraphysics Communication + + module GFS_surface_loop_control + contains + +!> \brief Brief description of the subroutine +!! +!! \section arg_table_lsmnoah_pre_run Arguments +!!| local var name | longname | description | units | rank | type | kind | intent | optional | +!!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| +!!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | +!!| iter | iteration_number | number of iteration | index | 0 | real | kind_phys | in | F | +!!| wind | surface_wind_speed | surface wind speed | m s-1 | 1 | real | kind_phys | in | F | +!!| flag_guess | flag_for_guess_run | flag for guess run | flag | 1 | logical | | inout | F | +!! +!! \section general General Algorithm +!! \section detailed Detailed Algorithm +!! @{ + + subroutine GFS_surface_loop_control_part1_run & + & ( im,iter,wind,flag_guess + & ) + + use machine, only: kind_phys + +! --- interface variables + integer, intent(in) :: im, iter + real(kind=kind_phys), dimension(im), intent(in) :: & + & wind + real(kind=kind_phys), dimension(im), intent(inout) :: & + & flag_guess + + do i = 1, im + if (iter == 1 .and. wind(i) < 2.0) then + flag_guess(i) = .true. + endif + enddo + + end subroutine GFS_surface_loop_control_part1_run +!> @} + +!> \brief Brief description of the subroutine +!! +!! \section arg_table_lsmnoah_pre_run Arguments +!!| local var name | longname | description | units | rank | type | kind | intent | optional | +!!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| +!!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | +!!| iter | iteration_number | number of iteration | index | 0 | real | kind_phys | in | F | +!!| wind | surface_wind_speed | surface wind speed | m s-1 | 1 | real | kind_phys | in | F | +!!| flag_guess | flag_for_guess_run | flag for guess run | flag | 1 | logical | | inout | F | +!!| flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | in | F | +!!| islmsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | +!!| nstf_name1 | flag_for_nsstm_run | NSSTM flag: off/uncoupled/coupled=0/1/2 | flag | 0 | integer | | in | F | +!! +!! \section general General Algorithm +!! \section detailed Detailed Algorithm +!! @{ + + subroutine GFS_surface_loop_control_part2_run $ + $ (im,iter,wind,flag_guess,flag_iter,islmsk,nstf_name1 + $ ) + +! --- interface variables + integer, intent(in) :: im, iter, nstf_name1 + integer, dimension(im), intent(in) :: islmsk + real(kind=kind_phys), dimension(im), intent(in) :: & + & wind + real(kind=kind_phys), dimension(im), intent(inout) :: & + & flag_guess,flag_iter + + do i = 1, im + flag_iter(i) = .false. + flag_guess(i) = .false. + + if (iter == 1 .and. wind(i) < 2.0) then + if ((islmsk(i) == 1) .or. ((islmsk(i) == 0) .and. & + (nstf_name1 > 0))) then + flag_iter(i) = .true. + endif + endif + + enddo + + end subroutine GFS_surface_loop_control_part2_run +!> @} + + end module GFS_surface_loop_control +!> @} diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 3c7f5efe1..614c7c490 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -42,10 +42,10 @@ end subroutine sfc_ex_coef_finalize !!| fm | Monin-Obukhov_similarity_function_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out? | F | !!| fh | Monin-Obukhov_similarity_function_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out? | F | !!| ustar | surface_friction_velocity | surface friction velocity | m s-1 | 1 | real | kind_phys | out? | F | -!!| wind | surface_wind_speed | surface wind speed | m s-1 | 1 | real | kind_phys | out? | F | +!!| wind | surface_wind_speed | surface wind speed | m s-1 | 1 | real | kind_phys | out | F | !!| ddvel | surface_wind_enhancement_due_to_convection | surface wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | -!!| fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out? | F | -!!| fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out? | F | +!!| fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out | F | +!!| fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out | F | !!| sigmaf | vegetation_area_fraction | areal fractional cover of green vegetation | frac | 1 | real | kind_phys | in | F | !!| vegtype | cell_vegetation_type | vegetation type at each grid cell | index | 1 | integer | | in | F | !!| shdmax | maximum_vegetation_area_fraction | max fractnl cover of green veg | frac | 1 | real | kind_phys | in | F | diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index d5acad976..4cc8ebb08 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -1,15 +1,40 @@ !> \file sfc_drv.f !! This file contains the NOAH land surface scheme. -!> \defgroup NOAH NOAH Land Surface +!> \defgroup NOAH NOAH Land Surface pre !! @{ !! \brief Brief description of the parameterization !! \section diagram Calling Hierarchy Diagram !! \section intraphysics Intraphysics Communication - module lsm_noah + module lsm_noah_pre contains +!> \brief Brief description of the subroutine +!! +!! \section arg_table_lsmnoah_pre_run Arguments +!!| local var name | longname | description | units | rank | type | kind | intent | optional | +!!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| +!!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | +!!| km | soil_vertical_dimension | soil vertical layer dimension | index | 0 | integer | | in | F | +!!| smsoil | volume_fraction_of_soil_moisture | volumetric fraction of soil moisture | frac | 2 | real | kind_phys | inout | F | +!!| slsoil | volume_fraction_of_unfrozen_soil_moisture | volume fraction of unfrozen soil moisture | frac | 2 | real | kind_phys | inout | F | +!!| smsoilin | volume_fraction_of_soil_moisture_input | volumetric fraction of soil moisture input | frac | 2 | real | kind_phys | in | F | +!!| slsoilin | volume_fraction_of_unfrozen_soil_moisture_input | volume fraction of unfrozen soil moisture input | frac | 2 | real | kind_phys | in | F | +!!| drain | subsurface_runoff_flux | subsurface runoff flux | g m-2 s-1 | 1 | real | kind_phys | inout | F | +!!| runof | surface_runoff_flux | surface runoff flux | g m-2 s-1 | 1 | real | kind_phys | inout | F | +!!| evbs | soil_upward_latent_heat_flux | soil upward latent heat flux | W m-2 | 1 | real | kind_phys | inout | F | +!!| evcw | canopy_upward_latent_heat_flux | canopy upward latent heat flux | W m-2 | 1 | real | kind_phys | inout | F | +!!| trans | transpiration_flux | total plant transpiration rate | kg m-2 s-1 | 1 | real | kind_phys | inout | F | +!!| sbsno | snow_deposition_sublimation_upward_latent_heat_flux | latent heat flux from snow depo/subl | W m-2 | 1 | real | kind_phys | inout | F | +!!| snowc | surface_snow_area_fraction | surface snow area fraction | frac | 1 | real | kind_phys | inout | F | +!!| snohf | snow_freezing_rain_upward_latent_heat_flux | latent heat flux due to snow and frz rain | W m-2 | 1 | real | kind_phys | inout | F | +!!| smcwlt2 | volume_fraction_of_condensed_water_in_soil_at_wilting_point | soil water fraction at wilting point | frac | 1 | real | kind_phys | inout | F | +!!| smcref2 | threshold_volume_fraction_of_condensed_water_in_soil | soil moisture threshold | frac | 1 | real | kind_phys | inout | F | +!! +!! \section general General Algorithm +!! \section detailed Detailed Algorithm +!! @{ subroutine lsmnoah_pre_run & & (im,km,smsoil,slsoil,smsoilin,slsoilin,drain,runof,evbs,evcw, & & trans,sbsno,snowc,snohf,smcwlt2,smcref2 & @@ -45,14 +70,45 @@ subroutine lsmnoah_pre_run & end subroutine lsmnoah_pre_run +!> @} + end module lsm_noah_pre + +!> @} + +!> \defgroup NOAH NOAH Land Surface post +!! @{ +!! \brief Brief description of the parameterization +!! \section diagram Calling Hierarchy Diagram +!! \section intraphysics Intraphysics Communication + + module lsm_noah_post + contains + +!> \brief Brief description of the subroutine +!! +!! \section arg_table_lsmnoah_post_run Arguments +!!| local var name | longname | description | units | rank | type | kind | intent | optional | +!!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| +!!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | +!!| flag_lssav | flag_for_saving_diagnoses | flag for saving diagnoses | flag | 0 | logical | | in | F | +!!| dtf | time_step_for_dynamics | dynamics time step | s | 0 | real | kind_phys | in | F | +!!| drain | subsurface_runoff_flux | subsurface runoff flux | g m-2 s-1 | 1 | real | kind_phys | inout | F | +!!| runof | surface_runoff_flux | surface runoff flux | kg m-2 s-1 | 1 | real | kind_phys | inout | F | +!!| runoff | total_runoff | total runoff | kg m-2 | 1 | real | kind_phys | inout | F | +!!| srunoff | surface_runoff | surface runoff | kg m-2 | 1 | real | kind_phys | inout | F | +!! +!! \section general General Algorithm +!! \section detailed Detailed Algorithm +!! @{ + subroutine lsmnoah_post_run & - & (im,lssav,dtf,drain,runof,runoff,srunoff & + & (im,flag_lssav,dtf,drain,runof,runoff,srunoff & & ) use machine, only: kind_phys ! --- interface variables integer, intent(in) :: im - logical, intent(in) :: lssav + logical, intent(in) :: flag_lssav real, intent (in) :: dtf real(kind=kind_phys), dimension(im), intent(in ) :: & @@ -61,12 +117,25 @@ subroutine lsmnoah_post_run & real(kind=kind_phys), dimension(im), intent(inout) :: & & runoff, srunoff - if(lssav) then + if(flag_lssav) then runoff(:) = runoff(:) + (drain(:)+runof(:)) * dtf * 0.001 srunoff(:) = srunoff(:) + runof(:) * dtf * 0.001 end if end subroutine lsmnoah_post_run + +!> @} + end module lsm_noah_post +!> @} + +!> \defgroup NOAH NOAH Land Surface +!! @{ +!! \brief Brief description of the parameterization +!! \section diagram Calling Hierarchy Diagram +!! \section intraphysics Intraphysics Communication + + module lsm_noah + contains subroutine lsmnoah_init end subroutine lsmnoah_init @@ -233,11 +302,11 @@ end subroutine lsmnoah_finalize !!| sncovr1 | surface_snow_area_fraction | surface snow area fraction | frac | 1 | real | kind_phys | out | F | !!| qsurf | surface_specific_humidity | surface specific humidity | kg kg-1 | 1 | real | kind_phys | out | F | !!| gflux | upward_heat_flux_in_soil | upward soil heat flux | W m-2 | 1 | real | kind_phys | out | F | -!!| drain | subsurface_runoff_flux | subsurface runoff flux | kg m-2 s-1 | 1 | real | kind_phys | out | F | +!!| drain | subsurface_runoff_flux | subsurface runoff flux | g m-2 s-1 | 1 | real | kind_phys | out | F | !!| evap | kinematic_surface_upward_latent_heat_flux | surface upward evaporation flux | kg kg-1 m s-1 | 1 | real | kind_phys | out | F | !!| hflx | kinematic_surface_upward_sensible_heat_flux | surface upward sensible heat flux | K kg-1 m s-1 | 1 | real | kind_phys | out | F | !!| ep | surface_upward_potential_latent_heat_flux | surface upward potential latent heat flux | W m-2 | 1 | real | kind_phys | out | F | -!!| runoff | surface_runoff_flux | surface runoff flux | kg m-2 s-1 | 1 | real | kind_phys | out | F | +!!| runoff | surface_runoff_flux | surface runoff flux | g m-2 s-1 | 1 | real | kind_phys | out | F | !!| cmm | surface_drag_wind_speed_for_momentum_in_air | surf mom exch coef time mean surf wind | m s-1 | 1 | real | kind_phys | out | F | !!| chh | surface_drag_mass_flux_for_heat_and_moisture_in_air | surf h&m exch coef time surf wind & density| kg m-2 s-1 | 1 | real | kind_phys | out | F | !!| evbs | soil_upward_latent_heat_flux | soil upward latent heat flux | W m-2 | 1 | real | kind_phys | out | F | @@ -249,6 +318,7 @@ end subroutine lsmnoah_finalize !!| smcwlt2 | volume_fraction_of_condensed_water_in_soil_at_wilting_point | soil water fraction at wilting point | frac | 1 | real | kind_phys | out | F | !!| smcref2 | threshold_volume_fraction_of_condensed_water_in_soil | soil moisture threshold | frac | 1 | real | kind_phys | out | F | !!| wet1 | normalized_soil_wetness | normalized soil wetness | frac | 1 | real | kind_phys | out | F | +!! !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ From f3d93c5d942cdb37630a36fbbf2ce3c459ecc094 Mon Sep 17 00:00:00 2001 From: lulinxue Date: Thu, 30 Nov 2017 11:21:44 -0700 Subject: [PATCH 14/22] update on long name and module structures --- GFS_layer/GFS_physics_driver.F90 | 10 +++--- physics/GFS_surface_loop_control.f | 27 ++++++++++++++-- physics/sfc_diag.f | 11 ++++--- physics/sfc_diff.f | 11 ++++--- physics/sfc_drv.f | 50 ++++++++++++++++++------------ 5 files changed, 73 insertions(+), 36 deletions(-) diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index a107f8f9e..e4120b82e 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -17,9 +17,9 @@ module module_physics_driver GFS_radtend_type, GFS_diag_type use lsm_noah, lsm_noah_pre, lsm_noah_post - use surface_exchange_coefficients, surface_exchange_coefficients_post + use surface_exchange_coefficients use surface_diagnose - use GFS_surface_loop_control + use GFS_surface_loop_control_part1, GFS_surface_loop_control_part2 implicit none @@ -862,7 +862,7 @@ subroutine GFS_physics_driver & Diag%zlvl(:) = Statein%phil(:,1) * onebg ! Diag%smcwlt2(:) = 0.0 ! Diag%smcref2(:) = 0.0 - call lsmnoah_pre_run(im,Model%lsoil,smsoil,slsoil,Sfcprop%smc(:,:),Sfcprop%slc(:,:), & + call lsm_noah_pre_run(im,Model%lsoil,smsoil,slsoil,Sfcprop%smc(:,:),Sfcprop%slc(:,:), & drain,runof,evbs,evcw,trans,sbsno,snowc,snohf,Diag%smcwlt2(:),Diag%smcref2(:)) ! --- ... lu: iter-loop over (sfc_diff,sfc_drv,sfc_ocean,sfc_sice) @@ -975,7 +975,7 @@ subroutine GFS_physics_driver & ! &,' pgr=',pgr(ipr),' sfcemis=',sfcemis(ipr) ! call sfc_drv & - call lsmnoah_run & + call lsm_noah_run & ! --- inputs: (im, Model%lsoil, Statein%pgr, Statein%ugrs(:,1), Statein%vgrs(:,1), & Statein%tgrs(:,1), Statein%qgrs(:,1,1), soiltyp, vegtype, sigmaf, & @@ -2685,7 +2685,7 @@ subroutine GFS_physics_driver & ! Diag%runoff(:) = Diag%runoff(:) + (drain(:)+runof(:)) * tem ! Diag%srunoff(:) = Diag%srunoff(:) + runof(:) * tem ! endif - call lsmnoah_post_run(im,Model%lssav,dtf,drain,runof,Diag%runoff(:),Diag%srunoff(:)) + call lsm_noah_post_run(im,Model%lssav,dtf,drain,runof,Diag%runoff(:),Diag%srunoff(:)) ! --- ... xw: return updated ice thickness & concentration to global array do i = 1, im diff --git a/physics/GFS_surface_loop_control.f b/physics/GFS_surface_loop_control.f index 86f897131..496bf6ba8 100644 --- a/physics/GFS_surface_loop_control.f +++ b/physics/GFS_surface_loop_control.f @@ -7,9 +7,15 @@ !! \section diagram Calling Hierarchy Diagram !! \section intraphysics Intraphysics Communication - module GFS_surface_loop_control + module GFS_surface_loop_control_part1 contains + subroutine GFS_surface_loop_control_part1_init + end subroutine GFS_surface_loop_control_part1_init + + subroutine GFS_surface_loop_control_part1_finalize + end subroutine GFS_surface_loop_control_part1_finalize + !> \brief Brief description of the subroutine !! !! \section arg_table_lsmnoah_pre_run Arguments @@ -45,6 +51,23 @@ subroutine GFS_surface_loop_control_part1_run & end subroutine GFS_surface_loop_control_part1_run !> @} + end module GFS_surface_loop_control_part1 +!> @} + +!> \defgroup GFS_surface_loop_control GFS_surface_loop_control scheme +!! @{ +!! \brief Brief description of the parameterization +!! \section diagram Calling Hierarchy Diagram +!! \section intraphysics Intraphysics Communication + + module GFS_surface_loop_control_part2 + contains + + subroutine GFS_surface_loop_control_part2_init + end subroutine GFS_surface_loop_control_part2_init + + subroutine GFS_surface_loop_control_part2_finalize + end subroutine GFS_surface_loop_control_part2_finalize !> \brief Brief description of the subroutine !! @@ -91,5 +114,5 @@ subroutine GFS_surface_loop_control_part2_run $ end subroutine GFS_surface_loop_control_part2_run !> @} - end module GFS_surface_loop_control + end module GFS_surface_loop_control_part2 !> @} diff --git a/physics/sfc_diag.f b/physics/sfc_diag.f index 754e5516a..7e9395ac1 100644 --- a/physics/sfc_diag.f +++ b/physics/sfc_diag.f @@ -23,13 +23,13 @@ end subroutine sfc_diag_finalize !!|----------------|-------------------------------------------------------------|-------------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | !!| ps | surface_air_pressure | surface pressure | Pa | 1 | real | kind_phys | in | F | -!!| u1 | x_wind_at_lowest_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | -!!| v1 | y_wind_at_lowest_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | -!!| t1 | air_temperature_at_lowest_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | -!!| q1 | specific_humidity_at_lowest_layer | 1st model layer specific humidity | kg kg-1 | 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 | !!| 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_layer_and_wind_at_10m | ratio of fm10 and fm | ratio | 1 | real | kind_phys | out | 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 | !!| u10m | x_wind_at_10m | x component of wind at 10 m | m s-1 | 1 | real | kind_phys | out | F | !!| v10m | y_wind_at_10m | y component of wind at 10 m | m s-1 | 1 | real | kind_phys | out | F | !!| t2m | temperature_at_2m | temperature at 2 m | K | 1 | real | kind_phys | out | F | @@ -40,6 +40,7 @@ end subroutine sfc_diag_finalize !!| fh | Monin-Obukhov_similarity_function_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | !!| fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | in | F | !!| fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | in | F | +!! !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 614c7c490..707cb6928 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -24,11 +24,11 @@ end subroutine sfc_ex_coef_finalize !!|----------------|-------------------------------------------------------------|-------------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | !!| ps | surface_air_pressure | surface pressure | Pa | 1 | real | kind_phys | in | F | -!!| u1 | x_wind_at_lowest_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | -!!| v1 | y_wind_at_lowest_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | -!!| t1 | air_temperature_at_lowest_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | -!!| q1 | specific_humidity_at_lowest_layer | 1st model layer specific humidity | kg kg-1 | 1 | real | kind_phys | in | F | -!!| z1 | height_above_mean_sea_level_at_lowest_layer | height above mean sea level at 1st model layer | m | 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 | +!!| z1 | height_above_mean_sea_level_at_lowest_model_layer | height above mean sea level at 1st model layer | m | 1 | real | kind_phys | in | F | !!| snwdph | surface_snow_thickness_water_equivalent | water equivalent surface snow thickness | m | 1 | real | kind_phys | in | F | !!| tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | in | F | !!| z0rl | surface_roughness_length | surface roughness length | m | 1 | real | kind_phys | inout | F | @@ -53,6 +53,7 @@ end subroutine sfc_ex_coef_finalize !!| tsurf | surface_skin_temperature_after_iteration | surface skin temperature after iteration | K | 1 | real | kind_phys | in | F | !!| flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | in | F | !!| redrag | flag_for_reduced_drag_coefficient_over_sea | flag for reduced drag coefficient over sea | flag | 1 | logical | | in | F | +!! !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 4cc8ebb08..fd066a0d8 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -10,9 +10,15 @@ module lsm_noah_pre contains + subroutine lsm_noah_pre_init + end subroutine lsm_noah_pre_init + + subroutine lsm_noah_pre_finalize + end subroutine lsm_noah_pre_finalize + !> \brief Brief description of the subroutine !! -!! \section arg_table_lsmnoah_pre_run Arguments +!! \section arg_table_lsm_noah_pre_run Arguments !!| local var name | longname | description | units | rank | type | kind | intent | optional | !!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | @@ -35,7 +41,7 @@ module lsm_noah_pre !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ - subroutine lsmnoah_pre_run & + subroutine lsm_noah_pre_run & & (im,km,smsoil,slsoil,smsoilin,slsoilin,drain,runof,evbs,evcw, & & trans,sbsno,snowc,snohf,smcwlt2,smcref2 & & ) @@ -68,7 +74,7 @@ subroutine lsmnoah_pre_run & smcwlt2(:) = 0.0 smcref2(:) = 0.0 - end subroutine lsmnoah_pre_run + end subroutine lsm_noah_pre_run !> @} end module lsm_noah_pre @@ -84,9 +90,15 @@ end module lsm_noah_pre module lsm_noah_post contains + subroutine lsm_noah_post_init + end subroutine lsm_noah_post_init + + subroutine lsm_noah_pre_finalize + end subroutine lsm_noah_pre_finalize + !> \brief Brief description of the subroutine !! -!! \section arg_table_lsmnoah_post_run Arguments +!! \section arg_table_lsm_noah_post_run Arguments !!| local var name | longname | description | units | rank | type | kind | intent | optional | !!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | @@ -101,7 +113,7 @@ module lsm_noah_post !! \section detailed Detailed Algorithm !! @{ - subroutine lsmnoah_post_run & + subroutine lsm_noah_post_run & & (im,flag_lssav,dtf,drain,runof,runoff,srunoff & & ) use machine, only: kind_phys @@ -122,7 +134,7 @@ subroutine lsmnoah_post_run & srunoff(:) = srunoff(:) + runof(:) * dtf * 0.001 end if - end subroutine lsmnoah_post_run + end subroutine lsm_noah_post_run !> @} end module lsm_noah_post @@ -137,11 +149,11 @@ end module lsm_noah_post module lsm_noah contains - subroutine lsmnoah_init - end subroutine lsmnoah_init + subroutine lsm_noah_init + end subroutine lsm_noah_init - subroutine lsmnoah_finalize - end subroutine lsmnoah_finalize + subroutine lsm_noah_finalize + end subroutine lsm_noah_finalize ! ===================================================================== ! ! description: ! @@ -252,30 +264,30 @@ end subroutine lsmnoah_finalize ! subroutine sfc_drv & !> \brief Brief description of the subroutine !! -!! \section arg_table_lsmnoah_run Arguments +!! \section arg_table_lsm_noah_run Arguments !!| local var name | longname | description | units | rank | type | kind | intent | optional | !!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | !!| km | soil_vertical_dimension | soil vertical layer dimension | index | 0 | integer | | in | F | !!| ps | surface_air_pressure | surface pressure | Pa | 1 | real | kind_phys | in | F | -!!| u1 | x_wind_at_lowest_layer | x component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | -!!| v1 | y_wind_at_lowest_layer | y component of 1st model layer wind | m s-1 | 1 | real | kind_phys | in | F | -!!| t1 | air_temperature_at_lowest_layer | 1st model layer air temperature | K | 1 | real | kind_phys | in | F | -!!| q1 | specific_humidity_at_lowest_layer | 1st model layer specific humidity | kg kg-1 | 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 | !!| soiltyp | cell_soil_type | soil type at each grid cell | index | 1 | integer | | in | F | !!| vegtype | cell_vegetation_type | vegetation type at each grid cell | index | 1 | integer | | in | F | !!| sigmaf | vegetation_area_fraction | areal fractional cover of green vegetation | frac | 1 | real | kind_phys | in | F | !!| sfcemis | surface_longwave_emissivity | surface longwave emissivity | frac | 1 | real | kind_phys | in | F | !!| dlwflx | surface_downwelling_longwave_flux | total sky surface downward longwave flux | W m-2 | 1 | real | kind_phys | in | F | !!| dswsfc | surface_downwelling_shortwave_flux | total sky surface downward shortwave flux | W m-2 | 1 | real | kind_phys | in | F | -!!| snet | surface_net_downward_shortwave_flux | total sky surface net shortwave flux | W m-2 | 1 | real | kind_phys | in | F | +!!| snet | surface_net_downwelling_shortwave_flux | total sky surface net shortwave flux | W m-2 | 1 | real | kind_phys | in | F | !!| delt | time_step_for_dynamics | dynamics time step | s | 0 | real | kind_phys | in | F | !!| tg3 | deep_soil_temperature | bottom soil 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 | !!| prsl1 | air_pressure_at_lowest_model_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | !!| prslki | 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 | in | F | -!!| zf | height_above_mean_sea_level_at_lowest_layer | height above MSL at 1st model layer | m | 1 | real | kind_phys | in | F | +!!| zf | height_above_mean_sea_level_at_lowest_model_layer | height above MSL at 1st model layer | m | 1 | real | kind_phys | in | F | !!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | !!| ddvel | surface_wind_enhancement_due_to_convection | surface wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | !!| slopetyp | surface_slope_classification | class of sfc slope | index | 1 | integer | | in | F | @@ -322,7 +334,7 @@ end subroutine lsmnoah_finalize !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ - subroutine lsmnoah_run & + subroutine lsm_noah_run & & ( im, km, ps, u1, v1, t1, q1, soiltyp, vegtype, sigmaf, & & sfcemis, dlwflx, dswsfc, snet, delt, tg3, cm, ch, & & prsl1, prslki, zf, islimsk, ddvel, slopetyp, & @@ -761,7 +773,7 @@ subroutine lsmnoah_run & return !................................... ! end subroutine sfc_drv - end subroutine lsmnoah_run + end subroutine lsm_noah_run !----------------------------------- !> @} From b2cce39120fb15e5846ed174fa3eaa6defca081e Mon Sep 17 00:00:00 2001 From: lulinxue Date: Thu, 30 Nov 2017 13:29:19 -0700 Subject: [PATCH 15/22] fix sfc_drv.f --- physics/sfc_drv.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index fd066a0d8..dba435ecb 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -93,8 +93,8 @@ module lsm_noah_post subroutine lsm_noah_post_init end subroutine lsm_noah_post_init - subroutine lsm_noah_pre_finalize - end subroutine lsm_noah_pre_finalize + subroutine lsm_noah_post_finalize + end subroutine lsm_noah_post_finalize !> \brief Brief description of the subroutine !! From d23da77665efb39de8b157be6e238dd79f2e14b7 Mon Sep 17 00:00:00 2001 From: lulinxue Date: Thu, 30 Nov 2017 16:18:30 -0700 Subject: [PATCH 16/22] fix GFS_surface_loop bugs and get bfb results --- GFS_layer/GFS_physics_driver.F90 | 9 ++++++--- physics/GFS_surface_loop_control.f | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index e4120b82e..10b3f0e25 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -16,10 +16,13 @@ module module_physics_driver GFS_tbd_type, GFS_cldprop_type, & GFS_radtend_type, GFS_diag_type - use lsm_noah, lsm_noah_pre, lsm_noah_post + use lsm_noah + use lsm_noah_pre + use lsm_noah_post use surface_exchange_coefficients use surface_diagnose - use GFS_surface_loop_control_part1, GFS_surface_loop_control_part2 + use GFS_surface_loop_control_part1 + use GFS_surface_loop_control_part2 implicit none @@ -1065,7 +1068,7 @@ subroutine GFS_physics_driver & ! endif ! enddo call GFS_surface_loop_control_part2_run(im,iter,wind,flag_guess,& - islmsk,Model%nstf_name(1)) + flag_iter,islmsk,Model%nstf_name(1)) enddo ! end iter_loop diff --git a/physics/GFS_surface_loop_control.f b/physics/GFS_surface_loop_control.f index 496bf6ba8..999783ac4 100644 --- a/physics/GFS_surface_loop_control.f +++ b/physics/GFS_surface_loop_control.f @@ -40,7 +40,7 @@ subroutine GFS_surface_loop_control_part1_run & integer, intent(in) :: im, iter real(kind=kind_phys), dimension(im), intent(in) :: & & wind - real(kind=kind_phys), dimension(im), intent(inout) :: & + logical, dimension(im), intent(inout) :: & & flag_guess do i = 1, im @@ -90,12 +90,15 @@ subroutine GFS_surface_loop_control_part2_run $ $ (im,iter,wind,flag_guess,flag_iter,islmsk,nstf_name1 $ ) + use machine, only: kind_phys + ! --- interface variables integer, intent(in) :: im, iter, nstf_name1 integer, dimension(im), intent(in) :: islmsk +! integer, dimension(im) :: islmsk real(kind=kind_phys), dimension(im), intent(in) :: & & wind - real(kind=kind_phys), dimension(im), intent(inout) :: & + logical, dimension(im), intent(inout) :: & & flag_guess,flag_iter do i = 1, im @@ -104,7 +107,7 @@ subroutine GFS_surface_loop_control_part2_run $ if (iter == 1 .and. wind(i) < 2.0) then if ((islmsk(i) == 1) .or. ((islmsk(i) == 0) .and. & - (nstf_name1 > 0))) then + & (nstf_name1 > 0))) then flag_iter(i) = .true. endif endif From c083a0e52d3e63df948674dfeb786aff506dc3db Mon Sep 17 00:00:00 2001 From: "Grant.Firl" Date: Mon, 4 Dec 2017 14:51:14 -0700 Subject: [PATCH 17/22] fixed some standard name conflicts in sfc_diff.f and sfc_drv.f --- physics/sfc_diff.f | 18 +++++++++--------- physics/sfc_drv.f | 34 +++++++++++++++++----------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 707cb6928..77b1ddbef 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -3,7 +3,7 @@ !> \defgroup Sfc_ex_cal Surface Exchange Coefficient Calculation !! @{ -!! \brief Brief description of the scheme +!! \brief Brief description of the scheme !! \section diagram Calling Hierarchy Diagram !! \section intraphysics Intraphysics Communication @@ -42,7 +42,7 @@ end subroutine sfc_ex_coef_finalize !!| fm | Monin-Obukhov_similarity_function_for_momentum | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out? | F | !!| fh | Monin-Obukhov_similarity_function_for_heat | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out? | F | !!| ustar | surface_friction_velocity | surface friction velocity | m s-1 | 1 | real | kind_phys | out? | F | -!!| wind | surface_wind_speed | surface wind speed | m s-1 | 1 | real | kind_phys | out | F | +!!| wind | wind_speed_at_lowest_model_layer | wind speed at lowest model level | m s-1 | 1 | real | kind_phys | out | F | !!| ddvel | surface_wind_enhancement_due_to_convection | surface wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | !!| fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum | none | 1 | real | kind_phys | out | F | !!| fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat | none | 1 | real | kind_phys | out | F | @@ -65,14 +65,14 @@ subroutine sfc_ex_coef_run & & ustar,wind,ddvel,fm10,fh2, & & sigmaf,vegtype,shdmax,ivegsrc, & & tsurf,flag_iter,redrag & - & ) + & ) !! use machine , only : kind_phys - use funcphys, only : fpvs + use funcphys, only : fpvs use physcons, grav => con_g, cp => con_cp & &, rvrdm1 => con_fvirt, rd => con_rd & - &, eps => con_eps, epsm1 => con_epsm1 + &, eps => con_eps, epsm1 => con_epsm1 implicit none ! @@ -82,7 +82,7 @@ subroutine sfc_ex_coef_run & &, prsl1, prslki, stress & &, fm, fh, ustar, wind, ddvel & &, fm10, fh2, sigmaf, shdmax & - &, tsurf, snwdph + &, tsurf, snwdph integer, dimension(im) :: vegtype, islimsk logical flag_iter(im) ! added by s.lu @@ -128,11 +128,11 @@ subroutine sfc_ex_coef_run & ! parameter (rnu=1.51e-5,arnu=0.11*rnu) ! ! initialize variables. all units are supposedly m.k.s. unless specified -! ps is in pascals, wind is wind speed, +! ps is in pascals, wind is wind speed, ! surface roughness length is converted to m from cm ! do i=1,im - if(flag_iter(i)) then + if(flag_iter(i)) then wind(i) = max(sqrt(u1(i)*u1(i) + v1(i)*v1(i)) & + max(0.0, min(ddvel(i), 30.0)), 1.0) tem1 = 1.0 + rvrdm1 * max(q1(i),1.e-8) @@ -173,7 +173,7 @@ subroutine sfc_ex_coef_run & tem1 = 1.0 - shdmax(i) tem2 = tem1 * tem1 tem1 = 1.0 - tem2 - + if( ivegsrc == 1 ) then if (vegtype(i) == 10) then diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index dba435ecb..7539764d9 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -23,16 +23,16 @@ end subroutine lsm_noah_pre_finalize !!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | !!| km | soil_vertical_dimension | soil vertical layer dimension | index | 0 | integer | | in | F | -!!| smsoil | volume_fraction_of_soil_moisture | volumetric fraction of soil moisture | frac | 2 | real | kind_phys | inout | F | -!!| slsoil | volume_fraction_of_unfrozen_soil_moisture | volume fraction of unfrozen soil moisture | frac | 2 | real | kind_phys | inout | F | -!!| smsoilin | volume_fraction_of_soil_moisture_input | volumetric fraction of soil moisture input | frac | 2 | real | kind_phys | in | F | -!!| slsoilin | volume_fraction_of_unfrozen_soil_moisture_input | volume fraction of unfrozen soil moisture input | frac | 2 | real | kind_phys | in | F | +!!| smsoil | volume_fraction_of_soil_moisture | volumetric fraction of soil moisture | frac | 2 | real | kind_phys | inout | F | +!!| slsoil | volume_fraction_of_unfrozen_soil_moisture | volume fraction of unfrozen soil moisture | frac | 2 | real | kind_phys | inout | F | +!!| smsoilin | volume_fraction_of_soil_moisture_input | volumetric fraction of soil moisture input | frac | 2 | real | kind_phys | in | F | +!!| slsoilin | volume_fraction_of_unfrozen_soil_moisture_input | volume fraction of unfrozen soil moisture input | frac | 2 | real | kind_phys | in | F | !!| drain | subsurface_runoff_flux | subsurface runoff flux | g m-2 s-1 | 1 | real | kind_phys | inout | F | !!| runof | surface_runoff_flux | surface runoff flux | g m-2 s-1 | 1 | real | kind_phys | inout | F | !!| evbs | soil_upward_latent_heat_flux | soil upward latent heat flux | W m-2 | 1 | real | kind_phys | inout | F | -!!| evcw | canopy_upward_latent_heat_flux | canopy upward latent heat flux | W m-2 | 1 | real | kind_phys | inout | F | +!!| evcw | canopy_upward_latent_heat_flux | canopy upward latent heat flux | W m-2 | 1 | real | kind_phys | inout | F | !!| trans | transpiration_flux | total plant transpiration rate | kg m-2 s-1 | 1 | real | kind_phys | inout | F | -!!| sbsno | snow_deposition_sublimation_upward_latent_heat_flux | latent heat flux from snow depo/subl | W m-2 | 1 | real | kind_phys | inout | F | +!!| sbsno | snow_deposition_sublimation_upward_latent_heat_flux | latent heat flux from snow depo/subl | W m-2 | 1 | real | kind_phys | inout | F | !!| snowc | surface_snow_area_fraction | surface snow area fraction | frac | 1 | real | kind_phys | inout | F | !!| snohf | snow_freezing_rain_upward_latent_heat_flux | latent heat flux due to snow and frz rain | W m-2 | 1 | real | kind_phys | inout | F | !!| smcwlt2 | volume_fraction_of_condensed_water_in_soil_at_wilting_point | soil water fraction at wilting point | frac | 1 | real | kind_phys | inout | F | @@ -102,7 +102,7 @@ end subroutine lsm_noah_post_finalize !!| local var name | longname | description | units | rank | type | kind | intent | optional | !!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | -!!| flag_lssav | flag_for_saving_diagnoses | flag for saving diagnoses | flag | 0 | logical | | in | F | +!!| flag_lssav | flag_diagnostics | flag for calculating diagnostic fields | flag | 0 | logical | | in | F | !!| dtf | time_step_for_dynamics | dynamics time step | s | 0 | real | kind_phys | in | F | !!| drain | subsurface_runoff_flux | subsurface runoff flux | g m-2 s-1 | 1 | real | kind_phys | inout | F | !!| runof | surface_runoff_flux | surface runoff flux | kg m-2 s-1 | 1 | real | kind_phys | inout | F | @@ -135,7 +135,7 @@ subroutine lsm_noah_post_run & end if end subroutine lsm_noah_post_run - + !> @} end module lsm_noah_post !> @} @@ -285,13 +285,13 @@ end subroutine lsm_noah_finalize !!| tg3 | deep_soil_temperature | bottom soil 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 | -!!| prsl1 | air_pressure_at_lowest_model_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | +!!| prsl1 | air_pressure_at_lowest_model_layer | Model layer 1 mean pressure | Pa | 1 | real | kind_phys | in | F | !!| prslki | 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 | in | F | !!| zf | height_above_mean_sea_level_at_lowest_model_layer | height above MSL at 1st model layer | m | 1 | real | kind_phys | in | F | !!| islimsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | !!| ddvel | surface_wind_enhancement_due_to_convection | surface wind enhancement due to convection | m s-1 | 1 | real | kind_phys | in | F | !!| slopetyp | surface_slope_classification | class of sfc slope | index | 1 | integer | | in | F | -!!| shdmin | minimum_vegetation_area_fraction | min fractional coverage of green veg | frac | 1 | real | kind_phys | in | F | +!!| shdmin | minimum_vegetation_area_fraction | min fractional coverage of green veg | frac | 1 | real | kind_phys | in | F | !!| shdmax | maximum_vegetation_area_fraction | max fractnl cover of green veg (not used) | frac | 1 | real | kind_phys | in | F | !!| snoalb | upper_bound_on_max_albedo_over_deep_snow | upper bound on max albedo over deep snow | frac | 1 | real | kind_phys | in | F | !!| sfalb | surface_diffused_shortwave_albedo | mean surface diffused shortwave albedo | frac | 1 | real | kind_phys | in | F | @@ -304,26 +304,26 @@ end subroutine lsm_noah_finalize !!| tskin | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | inout | F | !!| tprcp | precipitation_amount_in_one_dynamics_time_step | total precipitation in each time step | kg m-2 | 1 | real | kind_phys | inout | F | !!| srflag | flag_for_precipitation_type | flag for snow or rain precipitation | flag | 1 | real | kind_phys | inout | F | -!!| smc | volume_fraction_of_soil_moisture | volumetric fraction of soil moisture | frac | 2 | real | kind_phys | inout | F | -!!| stc | soil_temperature | soil temperature | K | 2 | real | kind_phys | inout | F | -!!| slc | volume_fraction_of_unfrozen_soil_moisture | volume fraction of unfrozen soil moisture | frac | 2 | real | kind_phys | inout | F | +!!| smc | volume_fraction_of_soil_moisture | volumetric fraction of soil moisture | frac | 2 | real | kind_phys | inout | F | +!!| stc | soil_temperature | soil temperature | K | 2 | real | kind_phys | inout | F | +!!| slc | volume_fraction_of_unfrozen_soil_moisture | volume fraction of unfrozen soil moisture | frac | 2 | real | kind_phys | inout | F | !!| canopy | canopy_water_amount | canopy moisture content | kg m-2 | 1 | real | kind_phys | inout | F | !!| trans | transpiration_flux | total plant transpiration rate | kg m-2 s-1 | 1 | real | kind_phys | inout | F | !!| tsurf | surface_skin_temperature_after_iteration | surface skin temperature after iteration | K | 1 | real | kind_phys | inout | F | -!!| zorl | surface_roughness_length | surface roughness length | m | 1 | real | kind_phys | inout | F | +!!| zorl | surface_roughness_length | surface roughness length | m | 1 | real | kind_phys | inout | F | !!| sncovr1 | surface_snow_area_fraction | surface snow area fraction | frac | 1 | real | kind_phys | out | F | !!| qsurf | surface_specific_humidity | surface specific humidity | kg kg-1 | 1 | real | kind_phys | out | F | !!| gflux | upward_heat_flux_in_soil | upward soil heat flux | W m-2 | 1 | real | kind_phys | out | F | !!| drain | subsurface_runoff_flux | subsurface runoff flux | g m-2 s-1 | 1 | real | kind_phys | out | F | !!| evap | kinematic_surface_upward_latent_heat_flux | surface upward evaporation flux | kg kg-1 m s-1 | 1 | real | kind_phys | out | F | -!!| hflx | kinematic_surface_upward_sensible_heat_flux | surface upward sensible heat flux | K kg-1 m s-1 | 1 | real | kind_phys | out | F | +!!| hflx | kinematic_surface_upward_sensible_heat_flux | surface upward sensible heat flux | K kg-1 m s-1 | 1 | real | kind_phys | out | F | !!| ep | surface_upward_potential_latent_heat_flux | surface upward potential latent heat flux | W m-2 | 1 | real | kind_phys | out | F | !!| runoff | surface_runoff_flux | surface runoff flux | g m-2 s-1 | 1 | real | kind_phys | out | F | !!| cmm | surface_drag_wind_speed_for_momentum_in_air | surf mom exch coef time mean surf wind | m s-1 | 1 | real | kind_phys | out | F | !!| chh | surface_drag_mass_flux_for_heat_and_moisture_in_air | surf h&m exch coef time surf wind & density| kg m-2 s-1 | 1 | real | kind_phys | out | F | !!| evbs | soil_upward_latent_heat_flux | soil upward latent heat flux | W m-2 | 1 | real | kind_phys | out | F | -!!| evcw | canopy_upward_latent_heat_flux | canopy upward latent heat flux | W m-2 | 1 | real | kind_phys | out | F | -!!| sbsno | snow_deposition_sublimation_upward_latent_heat_flux | latent heat flux from snow depo/subl | W m-2 | 1 | real | kind_phys | out | F | +!!| evcw | canopy_upward_latent_heat_flux | canopy upward latent heat flux | W m-2 | 1 | real | kind_phys | out | F | +!!| sbsno | snow_deposition_sublimation_upward_latent_heat_flux | latent heat flux from snow depo/subl | W m-2 | 1 | real | kind_phys | out | F | !!| snowc | surface_snow_area_fraction | surface snow area fraction | frac | 1 | real | kind_phys | out | F | !!| stm | soil_moisture_content | soil moisture content | kg m-2 | 1 | real | kind_phys | out | F | !!| snohf | snow_freezing_rain_upward_latent_heat_flux | latent heat flux due to snow and frz rain | W m-2 | 1 | real | kind_phys | out | F | From c8f777d36950f10ab98da78370a280c9d3cbe101 Mon Sep 17 00:00:00 2001 From: "Grant.Firl" Date: Mon, 4 Dec 2017 16:12:02 -0700 Subject: [PATCH 18/22] updated standard name for surface wind and updated name of table for parser to find --- physics/GFS_surface_loop_control.f | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/physics/GFS_surface_loop_control.f b/physics/GFS_surface_loop_control.f index 999783ac4..f267799f9 100644 --- a/physics/GFS_surface_loop_control.f +++ b/physics/GFS_surface_loop_control.f @@ -18,12 +18,12 @@ end subroutine GFS_surface_loop_control_part1_finalize !> \brief Brief description of the subroutine !! -!! \section arg_table_lsmnoah_pre_run Arguments +!! \section arg_table_GFS_surface_loop_control_part1_run Arguments !!| local var name | longname | description | units | rank | type | kind | intent | optional | !!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | !!| iter | iteration_number | number of iteration | index | 0 | real | kind_phys | in | F | -!!| wind | surface_wind_speed | surface wind speed | m s-1 | 1 | real | kind_phys | in | F | +!!| wind | wind_speed_at_lowest_model_layer | wind speed at lowest model level | m s-1 | 1 | real | kind_phys | in | F | !!| flag_guess | flag_for_guess_run | flag for guess run | flag | 1 | logical | | inout | F | !! !! \section general General Algorithm @@ -32,16 +32,16 @@ end subroutine GFS_surface_loop_control_part1_finalize subroutine GFS_surface_loop_control_part1_run & & ( im,iter,wind,flag_guess - & ) + & ) use machine, only: kind_phys ! --- interface variables integer, intent(in) :: im, iter real(kind=kind_phys), dimension(im), intent(in) :: & - & wind + & wind logical, dimension(im), intent(inout) :: & - & flag_guess + & flag_guess do i = 1, im if (iter == 1 .and. wind(i) < 2.0) then @@ -71,12 +71,12 @@ end subroutine GFS_surface_loop_control_part2_finalize !> \brief Brief description of the subroutine !! -!! \section arg_table_lsmnoah_pre_run Arguments +!! \section arg_table_GFS_surface_loop_control_part2_run Arguments !!| local var name | longname | description | units | rank | type | kind | intent | optional | !!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | !!| iter | iteration_number | number of iteration | index | 0 | real | kind_phys | in | F | -!!| wind | surface_wind_speed | surface wind speed | m s-1 | 1 | real | kind_phys | in | F | +!!| wind | wind_speed_at_lowest_model_layer | wind speed at lowest model level | m s-1 | 1 | real | kind_phys | in | F | !!| flag_guess | flag_for_guess_run | flag for guess run | flag | 1 | logical | | inout | F | !!| flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | in | F | !!| islmsk | sea_land_ice_mask | landmask: sea/land/ice=0/1/2 | flag | 1 | integer | | in | F | @@ -88,7 +88,7 @@ end subroutine GFS_surface_loop_control_part2_finalize subroutine GFS_surface_loop_control_part2_run $ $ (im,iter,wind,flag_guess,flag_iter,islmsk,nstf_name1 - $ ) + $ ) use machine, only: kind_phys @@ -99,7 +99,7 @@ subroutine GFS_surface_loop_control_part2_run $ real(kind=kind_phys), dimension(im), intent(in) :: & & wind logical, dimension(im), intent(inout) :: & - & flag_guess,flag_iter + & flag_guess,flag_iter do i = 1, im flag_iter(i) = .false. From 810436eff820a42a9d269acf75d5cf569cfad4fc Mon Sep 17 00:00:00 2001 From: lulinxue Date: Wed, 6 Dec 2017 13:05:33 -0700 Subject: [PATCH 19/22] fix units in Noah --- physics/sfc_drv.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index dba435ecb..9b782646e 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -105,7 +105,7 @@ end subroutine lsm_noah_post_finalize !!| flag_lssav | flag_for_saving_diagnoses | flag for saving diagnoses | flag | 0 | logical | | in | F | !!| dtf | time_step_for_dynamics | dynamics time step | s | 0 | real | kind_phys | in | F | !!| drain | subsurface_runoff_flux | subsurface runoff flux | g m-2 s-1 | 1 | real | kind_phys | inout | F | -!!| runof | surface_runoff_flux | surface runoff flux | kg m-2 s-1 | 1 | real | kind_phys | inout | F | +!!| runof | surface_runoff_flux | surface runoff flux | g m-2 s-1 | 1 | real | kind_phys | inout | F | !!| runoff | total_runoff | total runoff | kg m-2 | 1 | real | kind_phys | inout | F | !!| srunoff | surface_runoff | surface runoff | kg m-2 | 1 | real | kind_phys | inout | F | !! @@ -316,7 +316,7 @@ end subroutine lsm_noah_finalize !!| gflux | upward_heat_flux_in_soil | upward soil heat flux | W m-2 | 1 | real | kind_phys | out | F | !!| drain | subsurface_runoff_flux | subsurface runoff flux | g m-2 s-1 | 1 | real | kind_phys | out | F | !!| evap | kinematic_surface_upward_latent_heat_flux | surface upward evaporation flux | kg kg-1 m s-1 | 1 | real | kind_phys | out | F | -!!| hflx | kinematic_surface_upward_sensible_heat_flux | surface upward sensible heat flux | K kg-1 m s-1 | 1 | real | kind_phys | out | F | +!!| hflx | kinematic_surface_upward_sensible_heat_flux | surface upward sensible heat flux | K m s-1 | 1 | real | kind_phys | out | F | !!| ep | surface_upward_potential_latent_heat_flux | surface upward potential latent heat flux | W m-2 | 1 | real | kind_phys | out | F | !!| runoff | surface_runoff_flux | surface runoff flux | g m-2 s-1 | 1 | real | kind_phys | out | F | !!| cmm | surface_drag_wind_speed_for_momentum_in_air | surf mom exch coef time mean surf wind | m s-1 | 1 | real | kind_phys | out | F | From c85635866b4d330c996541b8bf978b0af6f9581b Mon Sep 17 00:00:00 2001 From: lulinxue Date: Wed, 6 Dec 2017 16:22:31 -0700 Subject: [PATCH 20/22] more unit fixes --- physics/sfc_diff.f | 4 ++-- physics/sfc_drv.f | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/sfc_diff.f b/physics/sfc_diff.f index 77b1ddbef..d1f5dde54 100644 --- a/physics/sfc_diff.f +++ b/physics/sfc_diff.f @@ -29,9 +29,9 @@ end subroutine sfc_ex_coef_finalize !!| 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 | !!| z1 | height_above_mean_sea_level_at_lowest_model_layer | height above mean sea level at 1st model layer | m | 1 | real | kind_phys | in | F | -!!| snwdph | surface_snow_thickness_water_equivalent | water equivalent surface snow thickness | 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 | -!!| z0rl | surface_roughness_length | surface roughness length | m | 1 | real | kind_phys | inout | F | +!!| z0rl | surface_roughness_length | surface roughness length | cm | 1 | real | kind_phys | inout | F | !!| cm | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | out? | F | !!| ch | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | out? | F | !!| rb | bulk_richardson_number_at_lowest_model_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | out? | F | diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 7771b9aa4..8fb640c63 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -310,7 +310,7 @@ end subroutine lsm_noah_finalize !!| canopy | canopy_water_amount | canopy moisture content | kg m-2 | 1 | real | kind_phys | inout | F | !!| trans | transpiration_flux | total plant transpiration rate | kg m-2 s-1 | 1 | real | kind_phys | inout | F | !!| tsurf | surface_skin_temperature_after_iteration | surface skin temperature after iteration | K | 1 | real | kind_phys | inout | F | -!!| zorl | surface_roughness_length | surface roughness length | m | 1 | real | kind_phys | inout | F | +!!| zorl | surface_roughness_length | surface roughness length | cm | 1 | real | kind_phys | inout | F | !!| sncovr1 | surface_snow_area_fraction | surface snow area fraction | frac | 1 | real | kind_phys | out | F | !!| qsurf | surface_specific_humidity | surface specific humidity | kg kg-1 | 1 | real | kind_phys | out | F | !!| gflux | upward_heat_flux_in_soil | upward soil heat flux | W m-2 | 1 | real | kind_phys | out | F | From 1dfdcd1db10791216e852b427f643c36523dc0ee Mon Sep 17 00:00:00 2001 From: llpcarson Date: Tue, 19 Dec 2017 23:39:06 +0000 Subject: [PATCH 21/22] Fix a merge-error. --- GFS_layer/GFS_physics_driver.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index b4a79d8db..7b5ae89c8 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -707,6 +707,7 @@ subroutine GFS_physics_driver & ! --- ... transfer soil moisture and temperature from global to local variables ! smsoil(:,:) = Sfcprop%smc(:,:) + stsoil(:,:) = Sfcprop%stc(:,:) ! slsoil(:,:) = Sfcprop%slc(:,:) !! clu: slc -> slsoil ! dudt(:,:) = 0. ! dvdt(:,:) = 0. From ee89180cc439d71fc3606195427e895460c06094 Mon Sep 17 00:00:00 2001 From: llpcarson Date: Wed, 20 Dec 2017 22:09:19 +0000 Subject: [PATCH 22/22] Assign a couple more variables in the noah_post_run --- GFS_layer/GFS_physics_driver.F90 | 7 ++++--- physics/sfc_drv.f | 20 +++++++++++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index 7b5ae89c8..825929207 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -2720,7 +2720,8 @@ subroutine GFS_physics_driver & ! Diag%runoff(:) = Diag%runoff(:) + (drain(:)+runof(:)) * tem ! Diag%srunoff(:) = Diag%srunoff(:) + runof(:) * tem ! endif - call lsm_noah_post_run(im,Model%lssav,dtf,drain,runof,Diag%runoff(:),Diag%srunoff(:)) + call lsm_noah_post_run(im,Model%lsoil,smsoil,slsoil,Sfcprop%smc(:,:),Sfcprop%slc(:,:), & + Model%lssav,dtf,drain,runof,Diag%runoff(:),Diag%srunoff(:)) ! --- ... xw: return updated ice thickness & concentration to global array do i = 1, im @@ -2736,9 +2737,9 @@ subroutine GFS_physics_driver & enddo ! --- ... return updated smsoil and stsoil to global arrays - Sfcprop%smc(:,:) = smsoil(:,:) +! Sfcprop%smc(:,:) = smsoil(:,:) Sfcprop%stc(:,:) = stsoil(:,:) - Sfcprop%slc(:,:) = slsoil(:,:) +! Sfcprop%slc(:,:) = slsoil(:,:) ! --- ... calculate column precipitable water "pwat" ! Diag%pwat(:) = 0.0 diff --git a/physics/sfc_drv.f b/physics/sfc_drv.f index 8fb640c63..683399c4b 100644 --- a/physics/sfc_drv.f +++ b/physics/sfc_drv.f @@ -102,6 +102,11 @@ end subroutine lsm_noah_post_finalize !!| local var name | longname | description | units | rank | type | kind | intent | optional | !!|----------------|-------------------------------------------------------------|--------------------------------------------|------------|------|---------|-----------|--------|----------| !!| im | horizontal_loop_extent | horizontal loop extent, start at 1 | index | 0 | integer | | in | F | +!!| km | soil_vertical_dimension | soil vertical layer dimension | index | 0 | integer | | in | F | +!!| smsoil | volume_fraction_of_soil_moisture | volumetric fraction of soil moisture | frac | 2 | real | kind_phys | inout | F | +!!| slsoil | volume_fraction_of_unfrozen_soil_moisture | volume fraction of unfrozen soil moisture | frac | 2 | real | kind_phys | inout | F | +!!| smsoilout | volume_fraction_of_soil_moisture_output | volumetric fraction of soil moisture output| frac | 2 | real | kind_phys | in | F | +!!| slsoilout | volume_fraction_of_unfrozen_soil_moisture_output | volume fraction of unfrozen soil moisture output| frac | 2 | real | kind_phys | in | F | !!| flag_lssav | flag_diagnostics | flag for calculating diagnostic fields | flag | 0 | logical | | in | F | !!| dtf | time_step_for_dynamics | dynamics time step | s | 0 | real | kind_phys | in | F | !!| drain | subsurface_runoff_flux | subsurface runoff flux | g m-2 s-1 | 1 | real | kind_phys | inout | F | @@ -113,13 +118,20 @@ end subroutine lsm_noah_post_finalize !! \section detailed Detailed Algorithm !! @{ - subroutine lsm_noah_post_run & - & (im,flag_lssav,dtf,drain,runof,runoff,srunoff & + subroutine lsm_noah_post_run & + & (im,km,smsoil,slsoil,smsoilout,slsoilout, & + & flag_lssav,dtf,drain,runof,runoff,srunoff & & ) use machine, only: kind_phys ! --- interface variables - integer, intent(in) :: im + integer, intent(in) :: im,km + real(kind=kind_phys), dimension(im,km), intent(in) :: & + & smsoil,slsoil + + real(kind=kind_phys), dimension(im,km), intent(out) :: & + & smsoilout,slsoilout + logical, intent(in) :: flag_lssav real, intent (in) :: dtf @@ -133,6 +145,8 @@ subroutine lsm_noah_post_run & runoff(:) = runoff(:) + (drain(:)+runof(:)) * dtf * 0.001 srunoff(:) = srunoff(:) + runof(:) * dtf * 0.001 end if + smsoilout(:,:) = smsoil(:,:) + slsoilout(:,:) = slsoil(:,:) end subroutine lsm_noah_post_run